EPILEPTIC SEIZURE DETECTION USING WAVELET TRANSFORM Sneha R. Rathod 1, Chaitra B. 2, Dr. H.P.Rajani 3, Dr. Rajashri khanai 4 1 MTech VLSI Design and Embedded systems,dept of ECE, KLE Dr.MSSCET, Belagavi, India, 2 MTech VLSI Design and Embedded systems,dept of ECE, KLE Dr.MSSCET, Belagavi, India, 3 Professor, Dept. of Electronics and communication Engg, KLE Dr.MSSCET, Belagavi, India, 4 Professor, Dept. of Electronics and communication Engg, KLE Dr.MSSCET, Belagavi, India, Abstract The neurological disorder known as Epilepsy is caused due to unpredicted interruption of electrical signals in the brain. Seizure is a process of rhythmic discharge of cortical cells from local area of brain and also individual behavior of person is considered that lasts from few seconds to minutes. Detection of epileptic ictals is done using Electro-Encephalo-Gram (EEG). EEG plays vital role in epileptic detection. Detection of ictal signals need expert to examine full length EEG information. Different types of filters are applied on EEG signals to observe the presence of sharp waves and spikes. Due to presence of sudden spikes, EEG can be considered as a non-stationary signal and therefore time and frequency domain methods are not applicable. Processing and examination of EEG signals can be done by utilizing Wavelet Transform (WT). WT is employed for assigning spikes and spindles. Discrete Wavelet Transform (DWT) is flexible and effective method employed to detect the ictal and ictal-free signals. In DWT, EEG signals are decomposed into detailed and approximate co-efficient. Keywords Electroencephalogram (EEG) signal, Epilepsy, Seizures, Ictal, WT, DWT, Wavelet decomposition, Low pass filter, High pass filter, ApEn. I. INTRODUCTION About 1% of world s populace is influenced by a neurological disorder known as Epilepsy. Epileptic seizure is brought on because of impermanent electrical unsettling or abrupt changes in the brain. Careful and detailed analysis of EEG records will be helpful to find out brain disorder. The disorder of brain can be analyzed by making use of clinical diagnostic signal known as EEG waveform. Important features of EEG signals are spikes and spindles which help to detect epileptic seizures. Online seizure detection helps to identify segments of EEG more effectively. The parameters and elements acquired from EEG signals are utilized to recognize ictal and non-ictal signals present in EEG. In some cases if the system is unable to detect the ictal signals, those signals are used by doctors for diagnosing the type and pattern of the Epilepsy in the patients. EEG is random signal i.e. blend of both stationary and non-stationary signals. Gotman proposed a strategy in which an EEG signal is decomposed into half waves and then the features such as peak amplitude, duration, sharpness and slope of signal is extracted for seizure detection. If we assume EEG signals as stationary, we employ frequency and time-domain methods for examination and classification of ictal signals. Using Wavelet Transform, variable size windows can be obtained for representation of both time and frequency components. Using long time windows, low frequency information can be obtained and for windows with short time, high frequency information can be obtained. WT allows analysis of data with irregular patterns like impulses occurring at different time instances. DWT is successfully used to capture transient features and localize them accurately in both frequency and time domain. Using DWT, EEG signal can be decomposed into sub-frequency bands and tested using biomedical @IJRTER-2016, All Rights Reserved 199
EEG data collected from the effected and healthy patients. With this method, detection of seizures is highly accurate. Hans Berger discovered/recorded electrical currents in brain and named it as EEG which encompasses much information about state of patient s health. EEG is non-invasive method employed to record longer duration signals. It is used for monitoring incidental disorders like ictal signals. Approximate Entropy is a method used to quantify the quantity of regularity and also unpredictability of fluctuations over time series information. Regularity was first measured by precise regularity statistics that has principally targeted on numerous entropy measures. Calculation of these statistics needs huge amount of information and the results obtained consists of system noise Hence application of such methods for experimentation of practical data is complex. ApEn was created by Steve M Pincus by modifying a particular regularity to overcome such drawbacks. II. LITERATURE SURVEY Hojjat Adeli [1] predicted that the ictals are troublesome as there is very less knowledge accessible regarding the signal mechanism. Wavelet method is utilized for analysis of EEG and detection of various sub bands such as alpha, beta, theta, delta and gamma. The method is applied on seizure free, seizure and healthy subjects. Correlation Dimension method is used for high frequency gamma and beta sub bands. Lyapunov Exponent method is applied for low frequency alpha sub bands. Accessibility of these sub bands tends to build the accuracy of the analysis and detection of ictals in EEG. Hasan Ocak [2] studied about EEG signals and applied different methods on these signals for detection and classification of ictals in EEG. In this study, Approximate Entropy and Wavelet Transform methods were employed. It consists of two stages. At first, EEG signals are decayed into coarse and fine co-efficient using DWT and then the co-efficient values are computed by ApEn. Accuracy of about 96% is obtained while using DWT and without DWT only 76% accuracy was accomplished hence DWT proves to be an efficient method to detect ictals in EEG signals. Abdulhamit Subasi [3] have discussed about epileptic seizure that it is caused due to temporary electrical disturbance or abrupt changes in the brain. Careful and detailed analysis of EEG records will help to find out brain disorder. In this study utilizing Discrete Wavelet Transform (DWT), signals are decomposed into number of recurrence sub bands. Blend of Expert modular network makes utilization of these sub groups as inputs and gives ordinary and ictal discrete yields. Utilizing ME system model, higher precision is obtained compared to other neural systems. III. METHODOLOGY A. DATASET EEG consists of random and non-stationary signals. Dataset is taken from the University of Bonn, Germany. EEG consists of dataset Z, N, F and S. These dataset includes both healthy and ictal signals. Each dataset consists of 100 signal files and the size of each signal file is 4097. B. WAVELET TRANSFORM Wavelet Transform (WT) is a flexible and efficient tool used to distinguish between epileptic seizures and normal signals present in EEG. It is also used to analyze and localize ictal components. The resolution problem occurring in Fourier Transform method can be overcome by WT approach. There is ease of analyzing non-stationary or random signals utilizing WT rather than other methods. This method is used to identify the spikes and spindles present in EEG signal. Complex events occurring at different scales can be detected and analyzed using WT. It acts as powerful tool in @IJRTER-2016, All Rights Reserved 200
applied science. WT is generally implemented in various bio-medical engineering fields to get solution for different real time difficulties. It is powerful tool for bio-medical signal processing which can implement other applications such as analysis of EEG data. Discrete Wavelet Transform is a Wavelet Transform strategy in which the signal is being decomposed into fine and coarse approximation at various frequency bands and resolutions. Signal is being decomposed into various frequency bands using high and low pass filters in time domain method. Continuous Wavelet Transform can be obtained for signal x(t) by multiplying the shifted and scaled wavelet function ψ. Continuous Wavelet Transform equation is given by: Here b denotes the shifting/time values and a denotes scaling/frequency values. Computation of wavelet coefficients at each scale is expensive Hence based on the power of two, shifts and scales are picked known as position and dyadic scales. Because of this approach of power of two shifts, the wavelet analysis is too much efficient. Discrete Wavelet Transform can be defined as- Mallat Mallat in 1989 carried out a research and found an efficient method for implementing DWT. He passed EEG signals via a series of high pass and low pass filter pairs and called them as quadrature mirror filters. DWT technique consists of following steps: 1. At first, for cut off frequency equal to one fourth of sampling recurrence, the EEG signal is continuously sent through high pass and low pass filters. 2. The output obtained from high and low pass filters are called as detailed (fine) and approximate (coarse) coefficient of first level. 3. According to Nyquist rate, the output obtained at half of frequency bandwidth to that of original signal can be down sampled by using two filters i.e. low pass and high pass. 4. Similar procedure is applied again and again for first level detailed coefficient and approximate coefficient in order to obtain second level coefficients. 5. Through filtering, frequency resolution gets doubled and through down sampling, time resolution gets halved at every step of decomposition. The figure 3.1 shows the EEG signal decomposed into three levels. C. FLOW CHART The flow chart of DWT consists of step by step procedure of how EEG signal is being decomposed using Wavelet method. @IJRTER-2016, All Rights Reserved 201
Fig.3.1 Flow chart of DWT method. During initial step of seizure detection, EEG epochs can be examined using discrete wavelet transform. For both normal and ictal patients, third level decomposition is assigned for the decomposed EEG features. The obtained features are then analyzed by discrete wavelet method at pre-processing step. The frequency band and structure of each wavelet is found from detailed and approximate coefficient. During second stage of wavelet decomposition, detailed and approximate coefficients obtained are calculated at each step by utilizing Approximate Entropy method (ApEn). Time delay, embedding dimension and vector distance are set with prescribed values while ApEn computation. Later A1, A2, A3 and D1, D2, D3 coefficient values are computed with the same method for all the given EEG epochs having both ictal and ictal-free signals. Based on the given data, epochs can be assigned with some set of values and then the comparison of those epochs can be made by ApEn method. ApEn values compared for such epochs allow us to find the difference between seizure and non-seizure signal and higher accuracy can be achieved. For obtained coefficients, ApEn values can be found by the equation: Where r represents vector comparison distance, m is embedding dimension, Ʈ represents time delay and N represents number of levels. @IJRTER-2016, All Rights Reserved 202
D. BLOCK DIAGRAM The general block diagram of Discrete Wavelet method is shown below. EEG data contains dataset Z, N, F and S. These datasets are given as input and decomposition of data into wavelets is done. Fig.3.2 Block diagram of DWT method. Figure 3.2 represents the block diagram of Discrete Wavelet Transform. EEG data is random and non-stationary signals which consist of mixture of both ictal and non-ictal signals. Pre-processing of EEG data is done using Discrete Wavelet Transform technique. In this method, features are extracted from the signal then wavelet decomposition is done in which low pass and high pass filters are applied to remove unwanted peaks. Down sampling of signal is done to obtain Detailed and approximate coefficients. Obtained co-efficient are analyzed and classified as non seizure and seizure using Approximate Entropy method. Calculation of the co-efficient is done using ApEn. Table 3.1: Summary of EEG data IV. RESULTS AND DISCUSSIONS The experimentation is done for extraction, decomposition and classification of EEG data. The results obtained are tabulated and discussed in this chapter. @IJRTER-2016, All Rights Reserved 203
A. ANALYSIS OF INDIVIDUAL DATASET Z, F and S. Analysis has been made for individual data set Z, N, F and S and dataset are classified as ictal and non-ictal based on the results obtained. Fig.4.1 Wavelet decomposition of EEG signal with 300 epochs for dataset1 i.e. Z set. Fig.4.2 Graphical representation of data set Z containing non- ictal signals. Figures 4.1 and 4.2 show wavelet decomposition and graphical representation of dataset Z. Z set consists of 100 signal files. For 300 epochs data has been analyzed and from figure 4.1 it is concluded that dataset Z contains non-ictal signal. Epochs having Approximate Entropy values equal to or higher than threshold are classified as normal or ictal free. Graph consists of upper and lower threshold values as 19 and 29 respectively. Fig.4.3 Wavelet decomposition of EEG signal with 300 epochs for dataset4 i.e. S set. @IJRTER-2016, All Rights Reserved 204
Fig.4.4 Graphical representation of data set S containing ictal signals. Figures 4.3 and 4.4 show wavelet decomposition and graphical representation of dataset S. S set consists of 100 signal files. For 300 epochs data has been analyzed and from figure 4.3 it is concluded that dataset S contains ictal signal. Epochs having Approximate Entropy values lower than threshold are classified as ictal signals. Graph consists of upper and lower threshold values as 135 and -225 respectively. B. ANALYSIS OF EEG SIGNALS FOR ALL DATASET WITH 100, 200, 300 AND 400 EPOCHS INCLUDING GRAPHS. EEG signal is analyzed for all the datasets Z, N, F and S for 100, 200, 300 and 400 epochs. With relevant figures and graphs, results have been shown in this chapter. Fig.4.5 Wavelet decomposition of all EEG dataset with 100 epochs. Figure 4.5 shows the wavelet decomposition of all four EEG datasets named as 'Z', 'N', 'F' and 'S'. Features have been extracted considering 100 epochs for each dataset containing 100 signal files. Accuracy obtained for A1, A2, A3, D1, D2 and D3 is 3, 7, 4, 95, 49 and 58. @IJRTER-2016, All Rights Reserved 205
Fig.4.6 Wavelet decomposition of all EEG dataset with 200 epochs. Figure 4.6 shows the wavelet decomposition of all four EEG datasets named as 'Z', 'N', 'F' and 'S'. Features have been extracted considering 200 epochs for each dataset containing 100 signal files. Accuracy obtained for A1, A2, A3, D1, D2 and D3 is 1, 12, 46, 93, 66 and 93. Fig.4.7 Wavelet decomposition of all EEG dataset with 300 epochs. Figure 4.7 shows the wavelet decomposition of all four EEG datasets named as 'Z', 'N', 'F' and 'S'. Features have been extracted considering 300 epochs for each dataset containing 100 signal files. Accuracy obtained for A1, A2, A3, D1, D2 and D3 is 0, 3, 26, 92, 82 and 79. Fig.4.8 Wavelet decomposition of all EEG dataset with 400 epochs. @IJRTER-2016, All Rights Reserved 206
Figure 4.8 shows the wavelet decomposition of all four EEG datasets named as 'Z', 'N', 'F' and 'S'. Features have been extracted considering 400 epochs for each dataset containing 100 signal files. Accuracy obtained for A1, A2, A3, D1, D2 and D3 is 1, 10, 32, 97, 91 and 66. Fused accuracy of about 99 percent is obtained for 400 epochs of EEG data. Table 4.1: Summary of different sub band classification of DWT method. EEG datasets from both epileptic and normal patients were decayed using Discrete Wavelet Transform method and corresponding sub-bands are obtained. For EEG signal with 100 epochs, the accuracy obtained for A1, A2, A3, D1, D2 and D3 are 3, 7, 4, 95, 49 and 58. For 200 epochs, the accuracy obtained is 1, 12, 46, 93, 66 and 93. For 300 epochs, the accuracy obtained is 0, 3, 26, 92, 82 and 79 respectively. For 400 epochs, the accuracy obtained is 1, 10, 32, 97, 91 and 66 respectively. Approximate Entropy values are calculated and analyzed for both detail coefficients and approximate coefficients. From the analysis it is found that signals containing ictal consists of higher threshold than that of signals without seizures. Epochs having ApEn values lower than threshold values were said to be ictal and epochs having the ApEn values similar or higher than threshold were classified as non-ictal signals. Analysis has been made considering the accuracy of 100, 200, 300 and 400 epochs. From table 4.1 for D1, accuracy of about 97% is obtained for 400 epochs whereas for 100 epochs it s 95% and for 200 epochs it s 93% and for 300 epochs it s 92%. For D2, 91% accuracy is obtained for 400 epochs whereas for 100 epochs its 49% and for 200 epochs it s 66% and 82% accuracy is obtained for all dataset with 300 epochs. The results obtained from table 4.1 conclude that D1 provides highest accuracy of about 97% compared to other sub-bands. From the analysis, dataset Z, N and F contains non-ictal signals whereas dataset S contain ictal signals. Fused accuracy for all dataset having A1, A2, A3 and D1, D2, D3 coefficients for 300 epochs has been found and 98% accuracy has been obtained. Fused accuracy for all dataset having A1, A2, A3 and D1, D2, D3 coefficients for 400 epochs has been found and 99% accuracy has been obtained. @IJRTER-2016, All Rights Reserved 207
V. CONCLUSION AND FUTURE SCOPE Detection of epileptic seizures in EEG signals is lengthy, time-consuming and costlier. This study involves employing Discrete Wavelet Transform method for automatic detection of ictals. The signal is decomposed into different sub-bands and then ApEn method is applied for calculation and analysis of decomposed and classified signal is done by DWT. Using ApEn, very accurate results can be obtained. About 99% accuracy can be obtained by fusing the accuracy of all co-efficients. This is the new improvement that can be made to obtain accurate and efficient detection of ictals in EEG signals. REFERENCES 1. Hojjat Adeli, A Wavelet Choas Methodology For Analysis Of EEGs and EEG sub bands to Detect Seizure and Epilepsy, IEEE VOL.54, NO.2, FEB 2007. 2. Hasan Ocak, Automatic detection of epileptic seizures in EEG using Discrete Wavelet Transform and Approximate Entropy, VOL. 36, NO 2027-2036, 2009. 3. Abdulhamit Subasi, EEG signal classification using Wavelet feature extraction and Mixture of expert models, Expert systems with applications, VOL 32, NO. 1084-1093, 2007. 4. Varun Joshi, Antony Vijesh, Ram Bilas Pachori, Classification of Ictal and Seizure free EEG signals using Fractional Linear Prediction, Bio-medical signal processing and control, VOL 9, NO 1-5, 2014. 5. Shufang Li, Feature Extraction and Recognition of Ictal EEG using Empirical Mode Decomposition (EMD) and SVM, Computers in biology and medicine, VOL 43, NO 807-816, 2013. 6. Sudipta Mukhopadhyay, A New Interpretation of Non linear Energy Operator and its Efficacy in spike Detection, IEEE, VOL 45, NO.2, FEB 1998. 7. Alexander T Tzallas, Markos G. Tsipouras, Epileptic seizure detection in EEGs using Time-Frequency Analysis, IEEE, NO. 13, OCT 2007. 8. Leon D. Iasemidis, Panos M. Pardalos, Adaptive Epileptic Seizure Prediction System, IEEE, VOL 50, N0.5, MAY 2003. 9. Vairavan Srinivasan, Approximate Entropy(ApEn) Based Epileptic EEG detection using Artificial Neural Network (ANN), IEEE, VOL 11, NO.3, MAY 2007. 10. Ram Bilas Pachori, Epileptic Seizure Classification in EEG signals using Second Order Difference Plot (SODP) of intrinsic mode functions (IMF s), VOL 113, NO. 494-502, 2014. @IJRTER-2016, All Rights Reserved 208