EE Senior Project Presentation (2)
-
Upload
daniel-villarreal -
Category
Documents
-
view
47 -
download
3
Transcript of EE Senior Project Presentation (2)
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
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.
In simple terms...
Build a real-time wearable non-invasive epileptic seizure detector that runs on a
MCU powered by a reasonably small battery.
>15kNumber of papers published on the subject
of epileptic seizure detection.
90.4%
68.2%
We achieved...
Sensitivity
Specificity
Pre-ictal Ictal Post-ictal
It seems simple...
Still an open research question...What is the problem with
the published approaches?
Causality
Diagnosis tool (CAD)
Clinical environme
nt
MATLAB (Non-RT)
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
FilteringMulti-stage filtering for acquiring the most accurate EEG signals.
Common noise sources include:• 60Hz from AC power• Ambient background noise• Amplification stage noise
Filtering
60Hz notch filter to be used
as first stage of amplification
to immediately cut off this spike in noise from
the source.
FilteringSecond stage of amplification and noise reduction to be
usedis digitally using an FIR low-pass filter with a cutoff
frequencyof 2.5 kHz.
Building the classifier
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
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
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
Feature extraction: Mathematical formulationsFor a discrete-time signal:
Energy:
Line-length:
Rhythmicity:
Modified power:
0.00117Ratio of positive (epileptogenic) samples to negative
(normal) samples. In this problem, there is a significant class unbalance.
An SVM… the ideal case
An SVM… the real case
Undersampling data
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.
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.
PCB and Demo
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
Thank you!Any questions?