EE Senior Project Presentation (2)
-
Upload
daniel-villarreal -
Category
Documents
-
view
46 -
download
3
Transcript of EE Senior Project Presentation (2)
![Page 1: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/1.jpg)
EpiCap
EE Senior Project
SeizureA mobile real-time epileptic seizure
detector using only a MCU and a lot of Machine
Learning
Hector D. VillarrealJose Galindo
![Page 2: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/2.jpg)
What is Epilepsy?Epilepsy is the 4th most common neurological disease in the world.
It is a chronic disease that produces seizures that affect control of the body motor functions.
In a third of patients with epilepsy the disorder becomes refractory and randomly subjects patients to seizures.
![Page 3: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/3.jpg)
In simple terms...
Build a real-time wearable non-invasive epileptic seizure detector that runs on a
MCU powered by a reasonably small battery.
![Page 4: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/4.jpg)
>15kNumber of papers published on the subject
of epileptic seizure detection.
![Page 5: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/5.jpg)
90.4%
68.2%
We achieved...
Sensitivity
Specificity
![Page 6: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/6.jpg)
Pre-ictal Ictal Post-ictal
It seems simple...
![Page 7: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/7.jpg)
Still an open research question...What is the problem with
the published approaches?
Causality
Diagnosis tool (CAD)
Clinical environme
nt
MATLAB (Non-RT)
![Page 8: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/8.jpg)
We propose...
FilteringNotch +
Bandpass
MCU
Feature Calculation8 simple features x
channel
SVM Classificatio
nJust a dot product.
EpiCap
Ch A
Ch B
Ch C
3 chs51 feats
Decision>0? epileptic:normal
![Page 9: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/9.jpg)
FilteringMulti-stage filtering for acquiring the most accurate EEG signals.
Common noise sources include:• 60Hz from AC power• Ambient background noise• Amplification stage noise
![Page 10: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/10.jpg)
Filtering
60Hz notch filter to be used
as first stage of amplification
to immediately cut off this spike in noise from
the source.
![Page 11: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/11.jpg)
FilteringSecond stage of amplification and noise reduction to be
usedis digitally using an FIR low-pass filter with a cutoff
frequencyof 2.5 kHz.
![Page 12: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/12.jpg)
![Page 13: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/13.jpg)
Building the classifier
![Page 14: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/14.jpg)
One task, two architectures
● Data selection (16 bits)
● Digital filtering● Epoch segmentation● Feature extraction● Majority class
reduction● Classifier training● Classification ● Performance tuning
Python
Intel i7 2.2 GHz, 64 bit, 8 GB RAM
● Feature Extraction● Classification
TI MCU (TM4C123X)
ARM Based 80 MHz, 32 bit, 256KB FlashADC 12 bits
![Page 15: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/15.jpg)
Python: Preparing data for classificationData selection
Labeled EEG data was provided by the HifoCap Research Group (EE).
One patient,
115 hours
22 seizures
21 channels
256 S/s (Hz)
Raw 16 bit interleaved
Digital filtering
FIR Low pass
Fpass= 55 Hz
Fstop= 60Hz
65 taps
Epoch creation
Epilepsy is already diagnosed, we know the parts of the brain were the seizure originates.
3 channels
CZ, F3, C3
1s windows
256 samples per window, per channel
![Page 16: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/16.jpg)
Feature extraction...
O(n )
2
We are limited to features with a maximum complexity of n^2, in order to maintain real-time operation and low
power consumption.
Energy RMS Line-length
Mean RhythmicityStandard deviation
Specialized Features
Amplitude Features
Total power
Power per band
Peak frequency
Power Features
![Page 17: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/17.jpg)
Feature extraction: Mathematical formulationsFor a discrete-time signal:
Energy:
Line-length:
Rhythmicity:
Modified power:
![Page 18: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/18.jpg)
0.00117Ratio of positive (epileptogenic) samples to negative
(normal) samples. In this problem, there is a significant class unbalance.
![Page 19: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/19.jpg)
An SVM… the ideal case
![Page 20: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/20.jpg)
![Page 21: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/21.jpg)
![Page 22: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/22.jpg)
An SVM… the real case
![Page 23: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/23.jpg)
![Page 24: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/24.jpg)
![Page 25: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/25.jpg)
![Page 26: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/26.jpg)
![Page 27: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/27.jpg)
Undersampling data
![Page 28: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/28.jpg)
![Page 29: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/29.jpg)
![Page 30: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/30.jpg)
![Page 31: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/31.jpg)
![Page 32: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/32.jpg)
![Page 33: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/33.jpg)
![Page 34: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/34.jpg)
C=1e-7, kernel=linear
The best kernel and C hyperparameter were found using an exhaustive Grid Search algorithm. Polynomial and RBF
kernels, generated only marginal improvements.
![Page 35: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/35.jpg)
Support Vector Machine
● If D(x) > 0, the sample contains an epileptic seizure.
● If D(x) < 0, the sample is not a seizure.● D(x) = 0 is impossible.
![Page 36: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/36.jpg)
![Page 37: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/37.jpg)
PCB and Demo
![Page 38: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/38.jpg)
![Page 39: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/39.jpg)
![Page 40: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/40.jpg)
![Page 42: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/42.jpg)
Bill of Materials
1x TI TIVA MCU = $12.99
1x Capacitor = $2.00
1x PCB = $81.98
Total = $103.33
5x Resistor = $1.00
1x INA128 Op Amp = $5.36
![Page 43: EE Senior Project Presentation (2)](https://reader036.fdocuments.us/reader036/viewer/2022062522/58a314a21a28ab1d068b55eb/html5/thumbnails/43.jpg)
Thank you!Any questions?