Sie sind auf Seite 1von 11

An Automated Seizure Detection Algorithm Using

Time and Frequency Analysis with Pattern


Recognition Neural Network for FPGA
Implementation
Farzaneh Shalbaf
*
, Amir HajiRassouliha
**
, Ehsan Vaghefi
***

*
School of Electrical Engineering, Isfahan University of Technology, Iran

**
School of Electrical Engineering, Iran University of Science and Technology, Iran
***
(Corresponding Author) Auckland Bioengineering Institute, University of Auckland, New Zealand
*
farzaneh.shalbaf@gmail.com
**
amir.hajirassouliha@gmail.com
***
e.vaghefi@auckland.ac.nz

Abstract The purpose of this paper is to investigate a novel
algorithm to detect the start and stop time of the seizure
occurrence by observing EEG signals. This algorithm has been
intended to be implantable in patient-monitoring devices for real
time applications. Initially, we selected four frequency bands of
EEG signals with the aid of multi-stage FIR filter banks.
Subsequently, effective features in time and frequency domains
are extracted to build a feature matrix. The time domain features
include the number of positive and negative peaks, the
summation of absolute values of the voltage and the number of
zero crossings. The frequency features include the summation of
the FFT values and the number of Fourier coefficients crossing
the average FFT coefficient values. The resultant feature matrix
is then passed through a pattern recognition artificial neural
network to be classified into two categories of normal and seizure
activities. A post-processing is then applied on the raw
classification results to obtain more accurate and stable
outcomes. The performance of the algorithm is evaluated on 13
hours of seven cases collected from six epileptic patients.
Experiments show that the proposed method could achieve the
accuracy of 98.83% for detecting the start time of the seizure (in
second) and 99.31% for detecting the end time of the seizure (in
second).
Keywords Seizure detection, Multi-Stage FIR Filter banks,
Artificial Neural Network, FPGA implementation.
I. INTRODUCTION
The disease epilepsy is characterized by a sudden and
recurrent malfunction of the brain that is termed seizure [1].
As a result, patients experience loss of coherence or cognition,
loss of motor control, involuntary motion (convulsions), and
possibly even death [2]. Many epileptic patients seem to be
resistant to available seizure control therapies and have to live
with unforeseen seizure onsets [3,4]. An implementable
automated seizure detection algorithm is highly desired in that
regard. Such device would help clinicians for long-term
monitoring of patients without the need for housing them in
hospital. This improvement could subsequently decrease the
costs for epileptic patients and the health care system.
During the history of introducing automated seizure
detection algorithms, electroencephalogram (EEGs) of
epileptic patients has gotten remarkable attention. This is due
to the fact that these signals include very useful information of
the real time activities of the patients brain and their
wellbeing state [5]. In the literature, various characteristics of
EEG signals in time and frequency domains have been
observed to provide a reliable pattern of seizure activity. This
seizure pattern recognitions have been achieved with the aid
of Fast Fourier Transform (FFT) [6,7,8], Wavelet Transform
[9,10,11], Autoregressive Method (AR) and Maximum
Likelihood Estimation (MLE) [4,12,13,14]. These tools have
assisted extracting some time and/or frequency features of the
EEG signals in order to build feature matrices. The feature
matrices are then fed into a classifier to be categorized into
normal or seizure states. Artificial Neural Networks (ANNs)
and Support Vector Machine (SVM) have been widely applied
as such classifiers [8, 11, 15, 16, 17]. In such approach, the
classifier is trained by many examples of seizure and non-
seizure EEG patterns (feature matrixes). The classifier
gradually learns to discriminate between the characteristics
of normal activity of brain and the seizure state.
However, these approaches are based on bedside
monitoring applications in the clinic and need further
improvements to make the algorithms proficient enough for
real time purposes using wearable devices. For instance, FFT
suffers from high noise sensitivity due to the fact that it
processes signal and noise simultaneously [12,14]. Wavelet
Transform, although resulted in higher accuracy, is not fast
enough for real time applications and is not very suitable for
hardware implementations [18]. Parametric power spectral
estimation methods (e.g. AR) could reduce the spectral loss
and give better frequency resolution in shorter operating times
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
23


[12,19]. These methods, however, are computationally
demanding and hardware implementation of such methods is
difficult due to their nonlinear nature.
In this paper, we describe the details of a high accuracy,
linear automated seizure detection algorithm which could be
easily implemented in wearable devices. In this algorithm we
have chosen some easily calculable characteristics of EEG
signals which would ease the hardware implementation
process. Here, we have also improved the sensitivity of the
algorithm to detect the start and stop time points of seizure
with high accuracy so the clinicians could have better
estimation of their patients circumstances.
II. METHODS
A. Description of EEG Data Set
EEG signals of seven epileptic cases from six patients are
used in this paper to assess the reliability of our algorithm.
The EEG data of these patients are obtained from [21],
collected at the Children's Hospital Boston. The observed
cases are named Ch-01-03, Ch-01-15, Ch-02-16, Ch-03-02,
Ch_04_05, Ch-05-13 and Ch_07_12 which all are sampled at
256 samples per second (f
s
= 256Hz) with 16-bit resolution.
The International 10-20 system [22] of EEG electrode
positions and nomenclature was used for these recordings.
The recordings are saved in EDF format and for our work, the
software EDF 2 Wave Converter1.0 [23] was employed to
convert one channel (FP1-F7) of the raw data to WAV, the
input format of our algorithms. Each case contained one hour
of EEG recording (except Ch_07_12 and Ch_04_06 which
contained 4 hours) [21]. However, only the results of 500
seconds of each recording, which contained non-seizure and
seizure activities, are shown so the figures are more readable. .
The observed duration of each case and associated time points
of seizure activities are detailed below (Table I).
TABLE I
THE DURATION OF THE OBSERVED EEG SIGNALS OF EACH CASE
AND ASSOCIATED SEIZURE ACTIVITY DURATION INDEXES
Cases
Observed
Start-Stop
Time (s)
Seizure
Duration (s)
Associated
seizure
indexes in
observed 500
seconds (s)
Ch_01_03 2600-3100 2996-3036 233-272
Ch_01_015 1500-2000 1732-1772 397-436
Ch_02_16 1-500 130-212 130-205
Ch_03_02 500-1000 731-796 210-293
Ch_04_05 7800-8300 7804-7853 5-53
Ch_05_15 900-1400 1086-1196 187-269
Ch_07_12 4600-5100 4920-5006 321-406


B. The Proposed Method
Our method consists of four main blocks (Fig.1): first, the
pre-processing block including FIR filter banks, second the
feature extraction block, third the classifier (i.e. pattern
recognition ANN) and fourth the block of post processing.
Here all these blocks are detailed.
B.1) Pre-processing Block: In this study, both frequency
and time domain characteristics are considered for the
detection process. The EEG signals of each case were passed
through a filter bank of seven FIR filter stages, covering the
range of 0 to 21.5Hz (Table II). Within this range both
physiological and pathophysiological of the scalp-recorded
EEG activity could be monitored [24]. Filters were designed
with associated start and stop frequencies in Table II with 1.5
Hz for transition band, 3 Hz for -3 dB bandwidth and -25 dB
for the Stop band gain [2]. The number of filter taps for the
first stage was 103 and 171 for the other stages. These
numbers deemed to be reasonable to be implemented in
hardware such as FPGA for real time purposes. The output of
each filter is then sent to the feature extraction block.
TABLE II
CHARACTERISTICS OF FILTER BANK WHICH COVERS THE RANGE
OF 0-21.5 HZ. FILTERS ARE DESIGNED WITH 1.5 HZ. FOR
TRANSITION BAND, 3 HZ FOR -3 DB BANDWIDTH AND -25 DB FOR
THE STOP BAND GAIN
Filter
Stage
Stop
Freq.1
(Hz)
Pass
Freq.1
(HZ)
Pass
Freq.2
(Hz)
Stop
Freq.2
(Hz)
1 --- -- 0 2.5
2 0.5 2 5 6.5
3 3.5 5 8 9.5
4 6.5 8 11 12.5
5 9.5 11 14 15.5
6 12.5 14 17 18.5
7 15.5 17 20 21.5

B.2) Feature Extraction Block: To minimize the
computation workload and to make training of the neural
network easier, the input of the ANN was not connected to the
output of the filters directly, but the features of the signals.
These features subsequently were set in different rows of a
matrix (the feature matrix) which was the input of the
classifier block (Fig. 1). Prior to the analysis of the features of
EEG signals, the outputs of filters were divided into frames of
1 second duration using the moving window technique. These
frames were used to find the features of signal in short periods
and also helped to detect the time of the seizure more
accurately. The features in time domain include:
Summation of absolute values of the voltage: Since
the majority of seizure activity is paroxysmal, the amplitude
relative to the background would increase when the seizure
occurs [25]. Here, to track such changes we took absolute
values of all indices in each frame (in each frame there are
256 indices due to the sampling rate frequency of 256 Hz)
and added them together. This summation of the absolute
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
24



Fig 1The procedure of proposed algorithm. First the data set are passed through pre-processing block where with the aid of the FIR filter bank, the EEG data
are decomposed to seven sub-bands. Then, each sub-band is passed through feature extraction block where seven time and frequency features are extracted to
build feature matrix. Afterwards, the feature matrix is fed to two layer pattern recognition neural network to be classified into normal and epileptic activity
values for each frame is stored as a single variable in the
first row of the feature matrix.
Zero Crossing: it is the other feature of the
oscillating EEG signal. In recent study, it has been showed
that this feature considerably changes during seizure
activity of brain [26]. To calculate this feature, indices with
the values between -0.001 and 0.001(mV) in each frame are
considered as a zero point because the values have been
digitized and quantized. The total number of zeros in each
frame was considered as Zero Crossing and set in the
second row of the feature matrix.
Number of positive peaks: The number of signal
peaks over a preferred positive threshold voltage was also
considered as the number of positive peaks. In stages 1 to 3,
the threshold value was selected to be 0.05 mV. In stages 4
up to 6, however, the threshold was selected to be 0.02 mV
and for the 7
th
stage the threshold was 0.01 mV. These
values are chosen decidedly based on our observation of the
normal and epileptic EEG signal amplitude in different
frequency sub-bands. For each frame the total number of
indices which their values exceeded these thresholds were
regarded as the Number of Positive Peaks and set in the
third row of the feature matrix.
Number of negative peaks: The number of signal
peaks over a negative preferred voltage was chosen as
another seizure detection indication. The way of defining
this feature was similar to defining the number of positive
peaks. However, the values of threshold for negative peaks
were -0.05,-0.02 and -0.01mV.
To analyse the EEG signals in frequency domain the FFT
tool with 1024 points (1k FFT) was employed. The outputs
of 7 stage filters were sent to a FFT block to study the
oscillation of energy in different frequency intervals. The
index selection of the output of the FFT block was based on
pass-band frequencies of filters in Table II. Therefore, for
each stage, Equation 1 and Equation 2 could be driven:
Equation 1:


Equation 2:


This selection was in order to both choose the effective part
of the signal which has passed through the filter and reduce
the overall calculations. Features in frequency domain are
defined as follows:
Summation of the FFT values: The summation of the
FFT values of each index i.e. the power of signal in the
specific frequency band, in each frame was stored in the
fifth row of the feature matrix.
Average Crossing: The oscillation rate of the EEG
signal in frequency band of each filter was also stored as the
Average Crossing. The total numbers of indices in each
frame that their values were between 0.7 of average
[Equation 3] and 1.3 of average were considered for the
Average Crossing points and set in sixth row of the feature
matrix.
Equation 3:





Average Crossing: We also considered the number of
peaks which was the total numbers of indices in each frame
that their values exceed the 2.5 times of the average. This is
set as the seventh feature in feature matrix.
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
25



Fig 2 From top to bottom left to right the diagrams are the outputs of the first to 7th ANN for training data Ch-01015. The vertical lines show the probability of
seizure activity in associated time index (the horizontal line). It is evident from these results that the probability of seizure activity is higher around indices of
200-300.
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
26


Note that these seven features were chosen because they could
clearly indicate the time and frequency domain features of
EEG signal during epileptic seizure.
B.3) Classifier: In this block a pattern recognition neural
network with two layers was employed (Fig. 1). Two sigmoid
functions were used to map the inputs with their labels. The
number of neurons in first layer was chosen to be 20 at first
try and two neurons are placed at the output layer to
investigate the state of patients. Decidedly, the output matrix
[1; 0] would illustrate the presence of seizure in related time
index and the matrix [0; 1] could show the normal activity of
brain in the associated time index. The network was trained
with scaled conjugate gradient back-propagation algorithm
(Trainscg) [27]. The problem in this study could be stated as
follows: an unknown function g: XY must be verified to
map extracted features of EEG signal indices (x X) to output
label (y Y). The training data were then employed to produce
the function h: XY that could approximate the correct
mapping of the function g. Essentially, this combined
maximum likelihood estimation with a regularization
procedure that favoured simpler models over more complex
models. In a Bayesian context, the regularization procedure
can be viewed as placing a prior probability p() on different
values of (Equation 4).
Equation 5:


Where * is the value used for in the subsequent evaluation
procedure p(|D), and, the posterior probability of is given
by [Equation 5].
Equation 6:


In this study the case Ch-01-15 was used for training the
neural networks while the usage of other cases for training led
to similar results. For obtaining the weights of each neuron, 80%
of data were used for training, 10% for validation and 10% for
evaluation. The final outputs of all seven stages for the
training data (Ch-01-15) are shown in Fig. 2. (Note that these
results here have been passed through a smoothing filter for
better investigation)
B.4) Post-Processing Block: The probability of seizure
occurrence in the case Ch-01-15 was higher between the
200th and 300th indices (Fig. 2). However, it was not possible
to investigate the exact start and stop time indices. For
estimating the start and stop indices of seizure with better
accuracy, all the raw outputs of each ANNs (without
smoothing) were added together to calculate the average
amount of probability in each frame. The output of this
averaging was extremely erratic (Fig. 3) which made detecting
the start and stop indices very hard. To reduce the random
noise, while keeping the sharpest step response, this erratic
waveform was passed through a median filter with the size of
10 [20]. This filtering in turn reduced the undesired sharp
sudden peaks and made the results appropriate for detecting
the duration of seizure (Fig. 4). The reason of such filtering
can be explained by the nature of the seizure. Seizures do not
start or stop suddenly (see the Table I or records-with-seizures
in [21]). Hence, the sudden sharp peaks are most probably due
to the incorrect mapping of ANNs or the effect of background
noise. After such smoothing, all the indices that have half-
value of the highest probability were considered as seizure
indices and the earliest and the latest indices regarded as the
start and the stop seizure indices. This way, the detected start
and stop indices for the trained data were the 241 and 272,
where the real start and stop indices (based on the available
clinically approved information in the dataset) were 233 and
272 respectively.

Fig 3 For defining the start and stop indices of seizure activity, all the outputs
of each ANNs are added together to calculate the average amount of the
probability of seizure activity in each frame. The waveform of this averaging
is extremely erratic and needs to be smoothed for detecting the in-part indexes
in seizure duration.

Fig 4 To reduce the sharp sudden noises of the waveform of the average of all
ANNs outputs, a median filter with size of 10 is employed. This filtering
successfully reduces the sharp sudden noises in fig. 3. and makes the outputs
of ANNs appropriate for detecting the start and stop indices of seizure activity.
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
27



Fig 5 From top to bottom left to right the diagrams are the outputs of the first to 7th ANN for testing data Ch-03-02. The horizontal line shows the time index
while the vertical line shows the probability of seizure occurrence for associated time index. It is evident from the diagrams that the first, second and the sixth
ANNs lead to more wrong mapping than others. Consequently, theses sub-bands are excluded from our algorithm for minimizing the wrong seizure detection of
it.
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
28


III. RESULTS
In the previous section we detailed the training and testing
procedure of our algorithm with the case number Ch_01_15.
The final results for the detection of the start and stop time
indices of seizure activity for this case were quite close to the
actual time points. However, prior to testing of our algorithm
on other cases available in our dataset, we needed to further
optimize our algorithm. Such optimization would lead to
higher reliability, sensitivity and improved required
calculation. Here, we undertook three approaches to establish
a reasonable trade-off among two conflicting issues of
achieving the most accurate result and having the least amount
of calculations. These approaches included the range of the
frequency involved in seizure detection, the number of
neurons in the first layer of ANNs and the width of the frames.
A. The Involved Frequency Bands
Comparing the results of each ANNs for the case Ch-01-15
in Fig. 2 revealed higher possibilities of incorrect seizure
detection in stages 1 and 2 compared to other stages. To test
this in other cases, we trained and tested our algorithm by the
case Ch-03-02 (Fig. 5) and the case Ch-05-13 (not shown). It
was again evident that the probability of incorrect mapping in
our algorithm was higher in the 1
st
, 2
nd
and the 6
th
stages of
our FIR filter bank. Hence, to decrease the incorrectly
detected probability of seizure occurrence, we omitted these
sub-bands from our algorithm. This preferred range of
frequency is close to the reported effective range of involved
frequency bands for seizure detection [5, 11].
B. The Number of Neurons in First Layer
In the second approach, we optimized the number of
neurons in the first layer. This parameter affected the
sensitivity of the ANNs considerably and needed to be
optimized to achieve reasonable sensitivity. We increased the
number of neurons from 1 to 20 and trained and tested the
algorithm, as described in the Methods, for the two cases of
Ch-02-16 and Ch-01-15 (Fig. 6). It then seemed that although
increasing the number of neurons initially helps better
classification, having more than 5 neurons in the first layer
would ultimately increase the incorrect mapping of the
algorithm or have no measurable effect on the outcomes.
Therefore, from here we used 5 neurons in first layer of ANNs.
C. Frame Width
In our third approach, we studied the effect of the width of
the frames on the accuracy of the detected start and stop
indices for seizure state. This parameter directly affected the
amount of calculations required and hence the processing time
of our algorithm. We used the frame width of 0.25, 1, 2, 4 and
20 seconds and trained and examined our algorithm with the
cases Ch-01-15 and Ch-02-16 (Fig.7). Consequently it
appeared that frame width of 4 seconds would result in faster
calculation and more accurate detection of the seizure state.
However, this way the specification of the seizures start and
stop indices would be limited to 4 seconds. Hence, to
minimize the amounts of calculation and to maintain a good


Fig 6 The diagrams show how increasing the number of neurons in the first
layer of ANNs affects the inaccurate mapping of the system for the cases Ch-
01-15 (top diagram) and Ch-02-16 (lower diagram). The vertical axes label
the errors in finding the start time of seizure (sec) and the horizontal axes
label the number of neurons in first layer. From these results we concluded
that 5 neurons in the first layer of ANNs is the optimum number for our
approach.

Fig 7: The effect of length of the window on the incorrect mapping for
detecting the start time of seizure activity in our model for the cases Ch-01-15
(top diagram) and Ch-02-16 (lower diagram). The vertical axes label the
errors in finding the start time of seizure (sec) and the horizontal axes label
the width of each frame in seconds. From these results we concluded that a
frame width 1 second will minimize the amounts of calculation and still
achieve a reasonable accuracy of seizure activity detection.
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
29


and reasonable temporal resolution, we preferred to acquire
the frame width of 1 second for the rest of our investigations.
We optimized our algorithm by the results of above three
approaches and trained the ANNs with the case number Ch-
01-15. To test the success of our optimization approach, we
tested our algorithm on the remaining cases (Ch-01-03, Ch-
02-16, Ch-03-02, Ch_04_05, Ch-05-13 and Ch-07-12).
Initially, each 500 second long recordings of channel FP1-
F7of each case (Table I) was decomposed into four sub-
signals through four stages of FIR filter bank (third, fourth,
fifth and seventh stages of Table II). After that, the time
domain (the number of positive and negative peaks, the
summation of absolute values of the voltage and the number
of zero crossing) and then the frequency features (the
summation of the FFT values and the number of indexes
crossing the average FFT values) were calculated for a frame
width of 1 second of each sub-band.
These sub-band features form a feature matrix with the size
of 7*500*1. There were seven features calculated for 500
second long recording for channel FP1-F7. Sub-band features
were then passed through a pattern recognition neural network
to be classified. In all cases, the algorithm could successfully
find seizure activity region Fig.8. The start and stop time
indices of the seizure duration were also detected very
accurately. These final outcomes and the associate accuracy
rates for each case are presented in Fig.9 and Table III.
According to these final results (Table III), our seizure
detection algorithm achieved an average accuracy rate
of %98.83 for detecting the start time and %99.31 for
detecting the stop time of seizure (in seconds).
TABLE III
THE FINAL RESULTS OF ALGORITHM AND ITS ACCURACY FOR
DETECTING THE START AND STOP TIME OF SEIZURE ACTIVIT.
Cases
Detect
ed
start
index
of
seizur
e (sec)
Actu
al
start
inde
x of
seizu
re
(sec)
Accura
cy (%)
for
detecti
ng
start of
seizure
Dete
cted
stop
inde
x of
seizu
re(se
c)
Actual
stop
index
of
seizure
(sec)
Accura
cy (%)
for
detecti
ng stop
of
seizure
Ch-
01-15
241 233 98.4 272 272 100
Ch-
01-03
406 397 98.2 437 436 99.8
Ch-
02-16
130 130 100 200 205 99
Ch-
03-02
212 210 99.6 290 293 99.4
Ch_04
_05
12 5 98.6 42 53 97.8
Ch-
05-13
195 187 98.4 296 296 100
Ch-
07-12
328 321 98.6 402 406 99.2
IV. CONCLUSIONS AND DISCUSSION
Recently many seizure detection and EEG classification
tools have been designed, in order to help clinicians to
observe the circumstances of epileptic patients with more
accuracy and at lower costs [4, 8, 10, 11, 12]. Khamis et.al [4]
described a non-linear approach based on extracting AR
parameter of EEG signals. From AR parameter, they
calculated spectral peak power, sharpness and location in a
delta/low theta frequency range (<8 Hz) to build their feature
matrix. They optimized their algorithm with two cases and
assessed the performance of it on another ten. EEG signals of
each case were monitored for several days, recorded by 21
electrodes with frequency of 256 Hz. They reported a true
positive detection rate of %91.57 for their algorithm. Shoeb [8]
has developed a seizure detection algorithm based on the
application of machine learning to epileptic seizure onset
detection. He simultaneously has captured the spectral and
spatial (electrode locations) information contained within each
frame of EEG signals to build his feature matrix. The feature
matrix subsequently has been passed through a SVM to be
classified into seizure and non-seizure activity. He has
reported that this algorithm could reach to the accuracy rate
of %96 for 23 cases with total number of 183 seizures. In the
Tzallas et al. study [10], the distribution of the energy of the
signal over a specific frequency band within a specified frame
has been captured with the aid of Power Spectral Density
(PSD). The calculated features then are fed into one hidden
layer feed forward ANN to be classified. In this way, the
average reported accuracy was %96.33 on three classification
problems on the dataset described in [28]. In another study,
Liu et.al [11] have used Daubechies-4 wavelet transform to
decompose the EEG signal into three sub-signals within the
range of 16 32 Hz (d3), 8 16 Hz (d4), and 4 8 Hz (d5).
Afterwards, the proposed sub-band signals were passed
through a feature extraction block to calculate four main
features of relative energy, relative amplitude, coefficient of
variation and fluctuation index from wavelet coefficients.
Subsequently, these features build a feature matrix and are fed
into a SVM to be classified into two categories of seizure and
non-seizure activities. They showed that by employing this
method on a large dataset of 509hrs from 21 epileptic patients,
they could achieve a specificity of 95.26%. Subasi et al. [12]
compared the performance of ANN with two inputs of AR
coefficients and Fourier coefficients. They reported that ANN
classification of EEG signals with input of AR parameter will
give better performance than FFT parameter, i.e. %92.3
and %91.66 respectively. In comparison with the mentioned
systems, our algorithm could achieve a higher performance
rate with average accuracy of %98.83 for detecting the start
time and %99.31 for extracting the stop time of seizure (in
second) (Table III). Table IV presents a comparison of the
results between our proposed method and the other algorithms
mentioned here.


International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
30



Fig 8 from top to bottom left to right, the diagrams are the final results of the proposed algorithm trained with the case Ch_01_15 and tested by the cases
Ch_01-03, Ch_0 2_16, Ch_03_02, Ch_04_05, Ch_05_13 and Ch_07_12. The vertical lines show the probability of seizure occurrence for the associated time
index (the horizontal lines).
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
31



Fig 9: The diagram shows the performance of neural network in detecting the start and stop indices for each case. The dark columns show the accuracy for
detecting the start indices and the light columns show the accuracy of detecting the stop indices for each cases.

TABLE IV
COMPARISON OF THE BEST PERFORMANCE FOR DIFFERENT
METHODS
Method
Number of
observed
cases
Accuracy%
(s)
Spectral analysis with SVM
[8]
23 96.6
PSD in t-f plane and ANN
[10]
10 96.33
Wavelet and SVM [11] 21 95.26
AR and ORC [4] 12 91.57
Our method 7 >98
As discussed above, there are many ways to extract the
parameters involved in seizure detection. Here, we have put
our emphasis on the features that could decrease the
computation load of our algorithm while keeping it accurate.
This has been due to our goal of developing light algorithms
that would be installed on mobile monitoring stations, with
limited computation grunt. In our approach and through the
pre-processing block, the EEG signals are decomposed into
four frequency bands with the aid of FIR filter banks. This
approach is similar to employing wavelet transform [11];
however, FIR filter banks are easier to be implemented on
hardware such as Xilinx FPGAs than Wavelet Transform
since FIR filters have a dedicated Intellectual Property (IP)
core for this purpose [29] and have been implemented on such
hardware (Xilinx FPGAs) for different purposes several times
[30,31]. In the feature extraction block, basic tools such as
FFT and basic linear mathematical operations such as
summation and comparison are employed to extract the time
and frequency features of EEG signals. These operations need
fewer hardware computational resources and are very easy to
be implemented on a minimalistic hardware due to available
Intellectual Property (IP) cores for Fast Fourier Transform in
Xilinx FPGAs [32]. In comparison, in reported algorithms,
extracting effective features to detect seizure activities require
non-linear approaches and heavy computational operations.
For examples, in [4, 10, 11] calculating different coefficients
such as the coefficients of AR, PSD and Wavelet Transforms,
and require a larger amount of resources and hardware
considerations which make them more difficult to be
implemented in comparison with our linear proposed method.
Finally, in the classifier block, we have employed ANNs
instead of reported heavy computational classifiers such as
SVM in previous algorithms [8, 11]. Trained ANNs can be
easily implemented in hardware with some multiplications,
summation, threshold and comparison functions [34]. From
these points, we can be hopeful that the method introduced in
this paper is suitable for implementation in FPGAs for
wearable devices, in order to accurately detect seizure
activities.
However, in comparison with previous studies, our
proposed algorithm has been tested on smaller amount of EEG
data set (about 13 hours from 7 cases). In our future work, we
intend to test our algorithm with the widely used dataset
described in [28]. We are also looking into implementing our
algorithm on potentially wearable hardware based on
technologies such as FPGAs. For this purpose, the algorithm
needs to be optimized so that the whole algorithm could get
fixed-pointed because current technologies for this hardware
(FPGA) are designed to only compute fixed-point calculations.
In Addition to that, it is essential to optimize the algorithm to
96.6
96.8
97
97.2
97.4
97.6
97.8
98
98.2
98.4
98.6
98.8
99
99.2
99.4
99.6
99.8
100
100.2
A
c
c
u
r
a
c
y

f
o
r

d
e
t
e
c
t
i
n
g

t
h
e

s
t
a
r
t

a
n
d

s
t
o
p

i
n
d
i
c
e
s

o
f

s
e
i
z
u
r
e

a
c
t
i
v
i
t
y

Accuracy for detecting the start
indice of seizure activity
Accuracy for detecting the stop
indice of seizure activity
International Journal of Emerging Trends in Signal Processing
ISSN(Online)2319-9784, Volume 1 ,Issue 2, January 2013
http://ijetsp.info/article/IJETSPV1I204.pdf
32


make the procedure completely parallel. For example, the
feature extraction blocks could be implemented at the output
of each FIR filter bank stages separately with higher clock
frequency. This will help to extract the features more rapidly
and reaching to higher speed of calculation for real-time
purposes. Implementation of 4 FIR filters, FFTs and 4 ANNs
in line also require some hardware considerations. For
instance, the system frequency of the whole design can be
chosen an integer multiplication of the sampling frequency of
the EEG data capturing units. It will help to do computations
in higher speed and at the meantime take the advantage of
resource sharing. Overall, we believe that using our optimized
and light algorithm, we can achieve our goal of constant and
remote monitoring of epileptic patients, using wearable
hardware.
ACKNOWLEDGMENT
The authors are grateful to the team of investigators from
Children's Hospital Boston (CHB) and the Massachusetts
Institute of Technology (MIT) for creating and contributing
this open access database to PhysioNet.
REFERENCES
[1] K. Lehnertz, F. Mormann, T. Kreuz, R.G. Andrzejak, C. Rieke, P.
David and C.E. Elger, Seizure Prediction By Nonlinear EEG
Analysis, in proceeding of IEEE engineering in medicine and biology
magazine, vol.22, no. 1, pp. 57-63, Jan/Feb 2003.
[2] N.Verma, A. Shoeb, J. Bohorquez, J. Dawson, J. Guttag and A.P.
Chandrakasan, A Micro-Power EEG Acquisition SoC With Integrated
Feature Extraction Processor for a Chronic Seizure Detection System,
IEEE Journal of Solid-State Circuits, vol. 45, no. 4, pp.804 816, 2010.
[3] D.E. Blum, J. Eskola, J.J. Bortz, R.S. Fisher Patient awareness of
seizures Neurology, Vol.47, No.1 pp. 260264, Jul 1996
[4] H. Khamis, A. Mohamed, S. Simpson, Seizure State Detection of
Temporal Lobe Seizures by Autoregressive Spectral Analysis Of Scalp
EEG Clinical Neurophysiology 120, pp.14791488, Jun 2009.
[5] Y.U. Khan, J. Gotman, Wavelet Based Automatic Seizure Detection
In Intracerebral Electroencephalogram Clinical Neurophysiology, Vol.
114, No. 5 , pp. 898908, May 2003.
[6] B. Greene, W. Marnane, G. Lightbody, R. Reilly, G. Boylan,
Classier Models And Architectures For EEG-Based Neonatal
Seizure Detection Physiol Meas;Vol. 29, No.1, pp.157178,Sep 2008
[7] S. Faul, G. Boylan, S. Connolly, L. Marnane, G. Lightbody, An
Evaluation Ofautomated Neonatal Seizure Detection Methods, Clin
Neurophysiol, Vol. 116, No.7, pp. 15331541., Jul. 2005
[8] A. Shoeb, Application of Machine Learning to Epileptic Seizure
Onset Detection and Treatment. PhD Thesis, Massachusetts Institute
of Technology, 2009.
[9] A.S. Zandi, M. Javidan, G. A. Dumont ; R. Tafreshi, Automated
Real-Time Epileptic Seizure Detection in Scalp EEG Recordings Using
an Algorithm Based on Wavelet Packet Transform, IEEE
Transactions on Biomedical Engineering Vol. 57,No.7, pp.1639-
1651,Jul 2010
[10] A. T. Tzallas, M. G. Tsipouras, and D. I. Fotiadis, Epileptic Seizure
Detection in EEGs Using TimeFrequency Analysis, IEEE
Transactions On Information Technology In Biomedicine, vol. 13, No.
5, pp.703-710, Sep 2009.
[11] Y. Liu, W. Zhou, Q. Yuan, and S. Chen, Automatic Seizure Detection
Using Wavelet Transform And SVM In Long-Term Intracranial
EEG, IEEE Transactions On Neural Systems And Rehabilitation
Engineering, Vol. 20, No. 6, pp.749-755, Nov. 2012.
[12] A. Subasi, M. K. Kiymik, A. Alkan and E. Koklukaya Neural
Network Classification of EEG Signals by using AR with MLE
Preprocessing for Epileptic Seizure Detection in proc. of
Mathematical and Computational Applications, Vol. 10, No. 1, pp. 57-
70, 2005.
[13] M.K. Kiymik, A. Subasi, H.R. Ozcalik, Neural networks with
periodogram and autoregressive spectral analysis methods in detection
of epileptic seizure Journal of Medical Systems, Vol.28, No. 6 , pp.
511522, Dec. 2004
[14] I .Guler, M.K. Kiymik, M .Akin, A. Alkan, AR Spectral Analysis Of
EEG Signals By Using Maximum Likelihood Estimation, Comput
Biol Med.vol.31,no.6 ,pp.441450, 2001.
[15] S. Ghosh-Dastidar.; H. Adeli.; N. Dadmehr,Principal Component
Analysis-Enhanced Cosine Radial Basis Function Neural Network for
Robust Epilepsy and Seizure Detection IEEE Transactions on
Biomedical Engineering, Vol. 55, No. 2, pp. 512 518, Feb.2008
[16] V. Srinivasan,.; C. Eswaran,.; N. Sriraam, Approximate Entropy-
Based Epileptic EEG DetectionUsing Artificial Neural Networks
IEEE Transactions on Information Technology in Biomedicine,
Vol.11 , No. 3, pp. 288 295., May 2007.
[17] A. Temko, E. Thomas; G. Boylan,; W. Marnane ; G. Lightbody, An
SVM-Based System And Its Performance Fordetection Of Seizures In
Neonates Engineering in Medicine and Biology Society, EMBC
Annual International Conference of the IEEE, pp(s): 2643 2646. 3-6
Sep 2009.
[18] M. Akin, Comparison of Wavelet Transform and FFT Methods in the
Analysis of EEG Signals Journal Of Medical Systems, Vol. 26, No. 3,
pp.241-247, Mar.2002.
[19] M. Akin, M.K. Kiymik, Application of Periodogram and AR Spectral
Analysis To EEG Signals. Journal of Medical System;Vol. 24, No. 4
pp. 24756, 2000.
[20] A. Temko, E. Thomas, W. Marnane, G. Lightbody, and G.
Boylan,EEG-Based Neonatal Seizure Detection With Support Vector
Machines, Clin. Neurophysiol., Vol. 122, No. 3, pp. 464473, 2011.
[21] Available at :http://www.physionet.org/physiobank/database/chbmit/
[22] H. H. Jasper, Ten-Twenty Electrode System of The International
Federation Electroencephalogr. Clin. Neurophysiol., vol. 10, pp. 371
375, 1958
[23] Available at:http://www.softpedia.com/get/Multimedia/Audio/Audio-
Convertors/EDF-EDF-plus-to-WAV-Converter.shtml
[24] J. Gotman. J.R Ives, P.Gloor. Frequency Content Of EEG And EMG
At Seizure Onset: Possibility Of Removal Of EMG Artifact By Digital
Filtering. Electroencephalography and clinical Neurophysiology,
Vol.52, No. 6, pp.626-639, Dec 1981
[25] S. Grewal and J. Gotman, An Automatic Warning System for
Epileptic seizures Recorded on Intracerebral Eegs Clin. Neurophysiol.,
Vol.116, No. 10, pp. 24602472,Oct. 2005
[26] I. Conradsen; S. Beniczky; K. Hoppe; P. Wolf; H. B. D.
Sorensen,Automated Algorithm for Generalized TonicClonic
Epileptic Seizure Onset Detection Based on sEMG Zero-Crossing Rate
IEEE Transactions on Biomedical Engineering, Vol.59 , No. 2, pp.
579- 585, Dec. 2011
[27] Scales, L. E.,Introduction to Non-Linear Optimization, New York:
Springer-Verlag 1985
[28] R. G. Andrzejak, K. Lehnertz, F. Mormann, C. Rieke, P. David, and C.
E. Elger, Indications Of Nonlinear Deterministic And Finite-
Dimensional Structures in Time Series of Brain Electrical Activity:
Dependence on Recording Region and Brain State, Phys. Rev. E, vol.
64, No. 6, pp. 061907-1061907-8, Nov. 2001.
[29] Available at: http://www.xilinx.com/products/intellectual-
property/FIR_Compiler.htm
[30] K. N. Macpherson; R. W. Stewart, Rapid Prototyping - Area Efficient
FIR Filters for High Speed FPGA Implementation IEE Proceedings
on Vision, Image and Signal Processing, ,Vol. 153, No. 6, pp:711-720,
Dec. 2006
[31] S. Ghadrdan,M. A. Shirvani Harandi, A. HajiRassouliha, A.
Moeinyavari, Design And Implementation of FPGA Based Novel
Blind Carrier Frequency Estimation For Wireless Communications,
19th Iranian Conference on Electrical Engineering (ICEE), pp. 1-6, 7-
19 May 2011
[32] Available at: http://www.xilinx.com/products/intellectual-
property/FFT.htm
[33]
A. Dinu; M. N. Cirstea; S. E. Cirstea, Direct Neural-Network Hardware-
Implementation Algorithm IEEE Transactions on Industrial Electronics, Vol.
57, No.5, pp. 1845- 1848, 2005
http://ijetsp.info/article/IJETSPV1I204.pdf
33

Das könnte Ihnen auch gefallen