Está en la página 1de 5

Hardware Implementation of Genetic Algorithm for

Epileptic Seizure Detection and Prediction


Pradip S. Thorbole1, Shirish D. Kalbhor2 Prof. Varsha K. Harpale3 Dr. V. K. Bairagi4
Pimpri Chinchwad College of Engineering Assistant Prof. at PCCOE and Prof. at AISSMS-IOIT
Akurdi, Pune-44, India research scholar at AISSMS-IOIT college, Pune-01, India
pradipthorbole@gmail.com1 college, Pune-44, India vbairagi@yahoo.co.in4
shirishkalbhor@gmail.com2 varshaks3@gmail.com3

Abstract— Millions of people living with epilepsy in the world electrodes are either 10% or 20% of front-back or right-left
and most of them are from developing countries. Epilepsy occurs distance of the skull[4]. Electrodes find the electrical impulses
due to epileptic seizures and mainly observed in children and from brain scalp and send signals to storage device, where the
adults. It shows symptoms like violent shaking and loss of results are recorded. Any irregular pattern and increase in
control. Seizure detection and prediction is done by using
action potential will be a sign of seizures or other brain
analytical methods applied to features, which are extracted from
Electroencephalographic (EEG) brain signals. Predictive disorders. Seizures are abnormal changes in the brains
algorithms use high dimensionality EEG data to evaluate the electrical activity. Seizure detection and prediction is
likelihood of an impending seizure. In this paper Seizure important for epileptic patient, whom will helpful to give
detection and prediction is done by two main steps, first one is treatment on time and prevents harm caused by such disorder.
feature extraction and second is feature classification. Feature This paper describes moving average peak to peak filter
extraction is done by using moving average peak to peak for feature extraction from EEG data, minimum redundancy
filtering. Seizure feature classification is done by combining a maximum relevance (mRMR) approach for seizures channel
minimum redundancy maximum relevance (mRMR) approach selection and genetic algorithm (GA) for seizure classification
for seizures feature selection and genetic algorithm (GA) for
from Electroencephalogram(EEG) signal and displays the
seizure classification. Preprocessing is done in MATLAB tool and
Hardware implementation of genetic algorithm is done on FPGA preictal duration which is occurred before seizures. After
in Xilinx ISE design suit 14.4. Results are reported on the getting appropriate features set, classification algorithm
standard EEG dataset and hardware simulation of genetic applied to detect and predict exact seizure duration.
algorithm on FPGA. Paper sections organized as follows: In section II, all
materials and proposed methods are given which includes,
Keywords— Electroencephalography (EEG), Epileptic Seizure, feature extraction, feature Selection and Genetic Algorithm
Feature extraction, Genetic Algorithm(GA). (GA) for feature classification. In section III, all
experimentation is given which includes preprocessing results
I. INTRODUCTION
and hardware implementation. In section IV, conclusion is
Epilepsy patient’s survey from different parts of the given.
India ranged from 967-4,070 with a mean of 2394 per 100000
population, providing a rough estimate of over 30 million II. MATERIALS AND METHODS
people with neurological disorders[2]. Higher neurological A. Feature extraction
disorders finds in rural areas around 6-8 million people with
epilepsy. Epilepsy is one of the raw disorder due to seizure. Feature extraction is done by using moving average peak to
peak filtering.
Many people with active epilepsy do not get treatment on time
because of unavailability of low cost seizure prediction device,
leading to large treatment gap[2]. The symptoms of seizures
can vary from uncontrolled shaking movement to a
momentary loss of control . There are no obvious indications
of seizure before its onset, making seizures a major threat to
the lives of epileptic patients in certain circumstances such as Fig.1. Method to extract seizure pattern feature.
when driving.
EEG recordings can be used to help detect potential Simple moving average filter will applied to EEG pattern
problems associated with brain activity. The EEG test tracks and its take unweighted mean of the previous n dada.
and records wave patterns by using small metal discs called However, in various applications mean is normally taken from
electrodes, that are attached to scalp with wires. For selecting an equal number of data on either side of a central value. It
location of electrodes on scalp the standard method 10-20 ensures that variations in the mean are aligned with the
system is used. The 10-20 means actual distances between variations in the data rather than being shifted in time.

978-1-5386-4008-1/17/$31.00 ©2017 IEEE


Selection of individuals done by using one fitness function.
GA is self-repair, adaptive, easy to parallelism and robust
algorithm; also consider parameters from weak population.
That's why Genetic Algorithm is best for EEG analysis and
Brain Seizure Detection [6]. Flowchart of simple genetic
algorithm is shown in fig.3.

Fig.2. Moving average for EEG waveform

Simple equally weighted running mean for an n-time


sample of EEG pattern is compared with the mean of the
previous n-time EEG pattern. If those patterns are
ܲெǡ ܲெିଵ ǡ ǥ ǡ ܲெିሺ௡ିଵሻ then the formula is

௉ಾ ା௉ಾషభ ା‫ڮ‬ା௉ಾషሺ೙షభሻ
ܵ‫ ܣܯ‬ൌ (1)


ൌ σ௡ିଵ
௜ୀ଴ ܲெି௜ (2)

B. Feature Selection Fig.3. Flowchart of simple genetic algorithm


The classification of a huge feature set is a difficult task
C.1. The genetic operators and parameters
that efficiency will improved using feature selection
techniques. Generally selected feature having high predictive Crossover is one of the important genetic operator. It
power. Remaining feature which having low predictive power consists, splitting two chromosomes or individuals at
those are eliminated and importance of any feature is based on particular point and obtaining two new child chromosomes by
prediction algorithms [5]. Then one can say that accuracy of exchanging parts of one parent chromosome to other parent
predictors using different input EEG sets is based on selection chromosome [10]. For crossover we have to decide one cut
of the most informative set of features. Filter methods quantify point called as cross point. Cross point can be one or more as
a certain parameter of relevance between each feature and the per selected application, as shown in fig 4. For simplicity in
target. This parameter, e.g. mutual information and statistical hardware implementation, one point cross over is selected for
tests, allows selecting the features that give more information seizure detection problem. After selection of crossover point,
of the data. However, the EEG subset selected can present part of parent chromosome is swapped with another parent
correlation between features [5]. chromosome part. In this chromosomes is equals to EEG
Minimum redundancy condition: feature set [10].


ܹ݉݅݊௜ ǡ ܹ௧  ൌ ȁௌȁమ σ௜௝‫א‬ௌ ‫ܫ‬ሺ݅ǡ ݆ሻ (3)

Where ‫ܫ‬ሺ݅ǡ ݆ሻ is mutual information and ȁܵȁ is the number


of features in S.
Maximum relevance condition:

ܸ݉݅݊ூ ǡ ܸூ  ൌ ȁௌȁ σ௜‫א‬ௌ ‫ܫ‬ሺ݄ǡ ݅ሻ (4)

Where‫ܫ‬ሺ݄ǡ ݅ሻ denotes mutual information, ȁܵȁ is number of Fig.4. A scenario for the crossover operator [10]
feature in set S, The mRMR feature set is obtained by
optimizing the conditions in Max and min simultaneously In Mutation operator randomly alter single bit of gene
from binary converted chromosome, such chromosome are
C. Genetic Algorithm (GA) for feature classification near about fittest in respective generation. So mutated
Genetic algorithm Invented by Prof. John Holland in chromosome take as it is without losing fitness of
1995. Based on survival of the best fittest principle by Darwin. chromosome [10]. Termination criteria must be applied to
That is Select The Best, Discard The Rest. GA is inspired by such algorithm otherwise such algorithm cannot terminate at
natural evolutionary theory, which tells that stronger best solution point.
individuals are winner of respective generations in competing Selection, crossover and mutation are three genetic
environment. GA assumes that solution of any optimization operators and perform their respective tasks and genetic
problem is an individual. Those individuals are represented by algorithm will be terminated. Generation by generation only
one set called as population pool. Individuals from population stronger individuals are remaining in population pool and GA
pool are converted into binary format for further process [11]. comes across one optimized solution.
III. PREPROCESSING RESULTS AND HARDWARE B. Genetic algorithm architecture and hardware synthesis
IMPLEMENTATION report.
For simulation, Xilinx ISE design suit 14.4 is used.
A. Preprocessing plots and results
Design is implemented on FPGA board Spartan 6 xc6slx45-
A.1. EEG Dataset 3csg324 by using VHDL language. Number of resources
Standard EEG data set of 16 Channel is plotted by using utilized by FPGA for implementation of genetic algorithm
plot function in MATLAB. Plotted data set is taking from 16 mentioned in Device Utilization Summary is shown in table 1.
channel of abnormal person and displayed in fig.5.
Table 1. Device utilization summary

Slice Logic Utilization Used Available Utilization

Number of Slice Registers 767 54576 1%


Number of Slice LUTs 1,305 27,288 4%
Number used as logic 1,299 27,288 4%
Number used as Memory 1 6,408 1%
Number of occupied 414 6,822 6%
Slices
Number of MUXCYs 628 13,644 4%
used
Number of 13 116 11%
RAMB16BWERs
Fig.5. EEG plot Number of fully used 728 1334 54%
LUT-FF pairs
A.2. Preictal and ictal EEG pattern of abnormal person Number of bonded IOBs 62 218 28%
In various clinical studies showed evidence of Number of DSP48A1s 13 58 22%
premonitory symptoms in 6% of 1000 epileptic patients.
Another interview-based study found that 50% of 562 patients After synthesis, we have RTL schematic of top module of
felt discomfort before seizures [7]. Such studies give evidence the genetic algorithm which shows a preoptimized design at
of changes in EEG recordings before actual seizure signal is register transfer level and RTL schematics are also shows
come into picture. The epileptic brain continuously transitions ports and data flow between various modules. In GA top
through different states of activity: from normal interictal (far module tow RAM blocks, mutation, crossover, selection and
from seizures signals) to preictal (minutes or sometimes hours control unit are implemented by using VHDL language on
before the seizure signals) then ictal (seizure signals) and selected targeted device Spartan 6. Out of that mutation,
postictal, before returning to the interictal state [8]. Moving crossover, selection are the genetic operators. Control unit is
average filter is used to find out event potential of preictal implemented to control all date flow and control flow between
duration. After applying filter it shows detected abnormal those operator and RAM block. Viewing RTL schematic, it
duration of seizures in different colors as shown in fig.6. After will helps us in discovering design issues early at the time of
feature extraction of abnormal patterns, those are sent to the design process, as shown in fig.7.
genetic algorithm for classification which is implemented on
FPGA. C. Simulation results
Extracted EEG feature data patterns are given to the
genetic algorithm and it will convert in to binary format,
because GA support to the binary format data, After that each
genetic operator performs its desired task and data patterns
will pass to the next operator. All those data follow and
control flow will managed by using control unit as shown in
RTL schematic in fig.7.
Selection processes is depend on fitness of each
individuals, which means fitness of each extracted EEG
feature. Fitness value is calculated by using fitness function.
Here, feature fitness is depending on higher voltage peak
values of features, such features are selected by using fitness
function. Simulation result of selection operator is shown in
fig.8, which shows, one individual is taken into account, that
is din and dout will gives fitness value. Depending on this
fitness value finesse pool is maintained in one RAM block.
Fig.6. Preictal and ictal EEG pattern of abnormal person. Then those individuals are given to crossover and mutation for
further processing.
Here, prdg[7:0] is the parent individual and child[7:0] is the
fittest child produced by mutation operator.

Fig. 10. Simulation result of mutation operator

All those operators, data and control are controlled by


control unit and it will also maintain population pool in RAM
block which is shown in RTL schematic.
After all simulation and synthesis, time synthesis report
generated in Xilinx ISE for genetic algorithm is 23.789ns, that
is 6.913ns for logic and 16.876ns for route which means
29.1% for logic and 70.9% for route.

IV. CONCLUSION
EEG is one of the important tool for diagnosis and
representation of brain signals. Moving average peak to peak
filtering is used for feature extraction and efficiently finds out
Fig.7. RTL Schematic of top level module of GA. event potential of brain signals. mRMR algorithm is used to
select extracted features and reduce feature set, that will
ultimately reduce population pool for genetic algorithm and
improve performance of hybrid algorithm. Selected EEG
features are the huge quantity of data which is optimize by
using genetic algorithm. Thus GA is the robust, best for non-
linear data and it also takes values and parameter from weak
solution into account. Some times this technique may be slow
but it is robust in nature and confirmly gives the possible best
solution for optimization. In this work genetic algorithm is
Fig. 8. Simulation result of selection operator
implemented on hardware and hardware implemented genetic
algorithm gives fast processing speed, because parallel
In crossover operator two parent individuals is taken and processing is possible on FPGA. So Genetic Algorithm is
crossover them at crossover point, it will generate two efficient for EEG analysis and seizure detection and
children’s which is shown in fig.9. Here, p1 and p2 is the prediction.
parents and c1 and c2 will be children’s. Crosspt is the ACKNOWLEDGMENT
crossover point is taken at 4, it will be 100 in binary format,
as shown in fig.9. The authors would like to thank Dr. N.B. Chopade
(HOD E & T.C department, PCCOE, Pune) for their valuable
comments and providing all facilities to this work.
REFERENCES
[1] P. W. Mirowski et. al, "Comparing SVM and convolutional networks for
epileptic seizure prediction from intracranial EEG," IEEE Workshop on
Machine Learning for Signal Processing, Cancun, pp. 244-249,2008.
[2] Santhosh, Nandanavana Subbareddy, Sanjib Sinha and Satishchandra.
“Epilepsy: Indian Perspective.” Annals of Indian Academy of Neurology
vol.17.Suppl 1: S3–S11. PMC. Web. 30 Mar. 2017.
[3] Ahammad, Nabeel and Paul Joseph. "Detection of epileptic seizure
Fig. 9. Simulation result of crossover operator event and onset using EEG." BioMed research international, 2014.
[4] EEGinformation:
The mutation operator is done random alteration in a single http://www.desertsleepinstitute.com/electroencephalogram-eeg.html
bit of a near about fittest individual and produces one fit child
which is again depend on fitness function. As shown in fig.10
[5] Sahni, Pearl, and Gaganjot Kaur. "Study of Various Filtering
Techniques, Genetic Algorithm and Fuzzy Logic for Reducing Blocking
Artifacts in Compressed Images." Vol. 3, Issue 6, June 2014.
[6] Mehta, A. Sharma, and Anshul Sharma. "Observing the Effect of Elitism
on the Performance of GA.", International Journal of Advanced
Research in Computer Science and Software Engineering, vol. 3, pp. 6,
2013.
[7] Mirowski, Piotr W., et al. "Method, system, and computer-accessible
medium for classification of at least one ICTAL state." U.S. Patent No.
9,443,141. 13 Sep. 2016.
[8] Mirowski, Piotr, et al. "Classification of patterns of EEG
synchronization for seizure prediction." Clinical neurophysiology vol.
120.11, pp.1927-1940, 2009.
[9] Hsu, Kai-Cheng, and Sung-Nien Yu. "Detection of seizures in EEG
using subband nonlinear parameters and genetic algorithm." Computers
in Biology and Medicine, vol. 40, pp.823-830,2010
[10] Bernardeschi, Cinzia, et al. "GABES: A genetic algorithm based
environment for SEU testing in SRAM-FPGAs." Journal of Systems
Architecture vol. 59.10, pp. 1243-1254, 2013.
[11] Hsu, Kai-Cheng, and Sung-Nien Yu. "Detection of seizures in EEG
using subband nonlinear parameters and genetic algorithm." Computers
in Biology and Medicine vol. 40, no.10, pp. 823-830,2010.
[12] EEGlabtoolbox: :
https://in.mathworks.com/matlabcentral/fileexchange/56415-eeglab
[13] Z. Pang and D. Liu, "Seizure Prediction Using a Dynamic Model with
Hidden Variable," 2nd International Conference on Bioinformatics and
Biomedical Engineering, Shanghai, pp. 506-509, 2008.
[14] Devarajan, Kavya, et al. "EEG-Based Epilepsy Detection and
Prediction." International Journal of Engineering and Technology vol.
6.3,pp. 212,2014.
[15] Assi, E. Bou, et al. "A hybrid mRMR-genetic based selection method for
the prediction of epileptic seizures." Biomedical Circuits and Systems
Conference (BioCAS), IEEE, 2015.
[16] Wickramasuriya, Dilranjan S., Lakshitha P. Wijesinghe, and Sudaraka
Mallawaarachchi. "Seizure prediction using Hilbert Huang Transform on
field programmable gate array." Signal and Information Processing
(GlobalSIP), 2015 IEEE Global Conference on. IEEE, 2015.
[17] Varsha K. Harpale et al, "Significance of Independent Component
Analysis (ICA) for Epileptic Seizure Detection Using EEG Signals."
Proceedings of the International Conference on Data Engineering and
Communication Technology. Springer Singapore, 2017.

También podría gustarte