eeg segmentation using glr

12
Digital Signal Processing 23 (2013) 1103–1114 Contents lists available at SciVerse ScienceDirect Digital Signal Processing www.elsevier.com/locate/dsp A hybrid evolutionary approach to segmentation of non-stationary signals Hamed Azami a,, Saeid Sanei b , Karim Mohammadi a , Hamid Hassanpour c a Department of Electrical Engineering, Iran University of Science and Technology, Tehran, Iran b Department of Computing, Faculty of Engineering and Physical Sciences, University of Surrey, UK c School of Information Technology and Computer Engineering, Shahrood University, Iran article info abstract Article history: Available online 5 March 2013 Keywords: Non-stationary signal Adaptive segmentation Kalman filter Fractal dimension Evolutionary algorithm Genetic algorithm Imperialist competitive algorithm Automatic segmentation of non-stationary signals such as electroencephalogram (EEG), electrocardiogram (ECG) and brightness of galactic objects has many applications. In this paper an improved segmentation method based on fractal dimension (FD) and evolutionary algorithms (EAs) for non-stationary signals is proposed. After using Kalman filter (KF) to reduce existing noises, FD which can detect the changes in both the amplitude and frequency of the signal is applied to reveal segments of the signal. In order to select two acceptable parameters of FD, in this paper two authoritative EAs, namely, genetic algorithm (GA) and imperialist competitive algorithm (ICA) are used. The proposed approach is applied to synthetic multi-component signals, real EEG data, and brightness changes of galactic objects. The proposed methods are compared with some well-known existing algorithms such as improved nonlinear energy operator (INLEO), Varri’s and wavelet generalized likelihood ratio (WGLR) methods. The simulation results demonstrate that segmentation by using KF, FD, and EAs have greater accuracy which proves the significance of this algorithm. © 2013 Elsevier Inc. All rights reserved. 1. Introduction Non-stationary data such as electroencephalogram (EEG), elec- trocardiogram (ECG) and electromyogram (EMG) originate from the sources of time-varying statistics. In such cases the signals are of- ten divided into smaller segments during which the signal remains approximately stationary. The segmentation may be fixed or adap- tive. Dividing the non-stationary signals into fixed size segments is easy and fast. However, it cannot accurately follow the epoch boundaries [1–3]. In adaptive segmentation, on the other hand, the boundaries are accurately and automatically followed [4–6]. Since time–frequency signal analysis and processing (TFSAP) ex- ploits variations in both time and frequency, most of the brain signals are decomposed in the time–frequency (TF) domain [7]. Be- cause the instantaneous energy depends on the frequency of the signal, in [8], Anisheh and Hassanpour have proposed to use TF distribution (TFD) as a test method for their proposed signal seg- mentation method. In order to increase the accuracy of the classification in EEG signals, Kosar, Lhotska and Krajca have proposed to use the seg- mentation method as a pre-processing step. It is done by dividing * Corresponding author. E-mail addresses: [email protected] (H. Azami), [email protected] (S. Sanei), [email protected] (K. Mohammadi), [email protected] (H. Hassanpour). signal to segments of different lengths that are stationary. In this method two characteristics are used that are based on estimation of average frequency in the segment and the value of mean ampli- tude in the window [9]. We have proposed a novel method to segment a signal in gen- eral and real EEG signal in particular using standard deviation, in- tegral operation, discrete wavelet transform, and variable threshold [10]. In this paper we illustrate that the standard deviation can in- dicate changes in the amplitude and/or frequency [10]. To remove the effect of shifting and smooth the signal, the integral operation is used as a pre-processing step. However, the performance of the method is completely dependent on the noise components. In order to detect the anomalies in the traffic signal of com- puter networks, a new method called generalized likelihood ratio (GLR) is proposed [11]. In this method two sliding windows move alongside the entire signal. Each window of this method is mod- eled by an auto regressive (AR) model. If the sliding windows fall within a segment, since both windows have the same statistical properties, the modeling error between the two windows is low. However, if both sliding windows aren’t placed in the same seg- ments, the modeling error rises. Defining a suitable threshold level, if the local maximum of modeling error is above this level, a seg- ment boundary point is detected [12]. To enhance the GLR method, it has been suggested to use wavelet as a pre-processing stage. This new method was named wavelet GLR (WGLR) method [13]. There are still two shortages in 1051-2004/$ – see front matter © 2013 Elsevier Inc. All rights reserved. http://dx.doi.org/10.1016/j.dsp.2013.02.019

Upload: jayaraman-tamilvendhan

Post on 20-Jan-2016

45 views

Category:

Documents


0 download

DESCRIPTION

glr

TRANSCRIPT

Page 1: EEG Segmentation Using GLR

Digital Signal Processing 23 (2013) 1103–1114

Contents lists available at SciVerse ScienceDirect

Digital Signal Processing

www.elsevier.com/locate/dsp

A hybrid evolutionary approach to segmentation of non-stationarysignals

Hamed Azami a,∗, Saeid Sanei b, Karim Mohammadi a, Hamid Hassanpour c

a Department of Electrical Engineering, Iran University of Science and Technology, Tehran, Iranb Department of Computing, Faculty of Engineering and Physical Sciences, University of Surrey, UKc School of Information Technology and Computer Engineering, Shahrood University, Iran

a r t i c l e i n f o a b s t r a c t

Article history:Available online 5 March 2013

Keywords:Non-stationary signalAdaptive segmentationKalman filterFractal dimensionEvolutionary algorithmGenetic algorithmImperialist competitive algorithm

Automatic segmentation of non-stationary signals such as electroencephalogram (EEG), electrocardiogram(ECG) and brightness of galactic objects has many applications. In this paper an improved segmentationmethod based on fractal dimension (FD) and evolutionary algorithms (EAs) for non-stationary signals isproposed. After using Kalman filter (KF) to reduce existing noises, FD which can detect the changesin both the amplitude and frequency of the signal is applied to reveal segments of the signal. Inorder to select two acceptable parameters of FD, in this paper two authoritative EAs, namely, geneticalgorithm (GA) and imperialist competitive algorithm (ICA) are used. The proposed approach is appliedto synthetic multi-component signals, real EEG data, and brightness changes of galactic objects. Theproposed methods are compared with some well-known existing algorithms such as improved nonlinearenergy operator (INLEO), Varri’s and wavelet generalized likelihood ratio (WGLR) methods. The simulationresults demonstrate that segmentation by using KF, FD, and EAs have greater accuracy which proves thesignificance of this algorithm.

© 2013 Elsevier Inc. All rights reserved.

1. Introduction

Non-stationary data such as electroencephalogram (EEG), elec-trocardiogram (ECG) and electromyogram (EMG) originate from thesources of time-varying statistics. In such cases the signals are of-ten divided into smaller segments during which the signal remainsapproximately stationary. The segmentation may be fixed or adap-tive. Dividing the non-stationary signals into fixed size segmentsis easy and fast. However, it cannot accurately follow the epochboundaries [1–3]. In adaptive segmentation, on the other hand, theboundaries are accurately and automatically followed [4–6].

Since time–frequency signal analysis and processing (TFSAP) ex-ploits variations in both time and frequency, most of the brainsignals are decomposed in the time–frequency (TF) domain [7]. Be-cause the instantaneous energy depends on the frequency of thesignal, in [8], Anisheh and Hassanpour have proposed to use TFdistribution (TFD) as a test method for their proposed signal seg-mentation method.

In order to increase the accuracy of the classification in EEGsignals, Kosar, Lhotska and Krajca have proposed to use the seg-mentation method as a pre-processing step. It is done by dividing

* Corresponding author.E-mail addresses: [email protected] (H. Azami), [email protected]

(S. Sanei), [email protected] (K. Mohammadi), [email protected]

(H. Hassanpour).

1051-2004/$ – see front matter © 2013 Elsevier Inc. All rights reserved.http://dx.doi.org/10.1016/j.dsp.2013.02.019

signal to segments of different lengths that are stationary. In thismethod two characteristics are used that are based on estimationof average frequency in the segment and the value of mean ampli-tude in the window [9].

We have proposed a novel method to segment a signal in gen-eral and real EEG signal in particular using standard deviation, in-tegral operation, discrete wavelet transform, and variable threshold[10]. In this paper we illustrate that the standard deviation can in-dicate changes in the amplitude and/or frequency [10]. To removethe effect of shifting and smooth the signal, the integral operationis used as a pre-processing step. However, the performance of themethod is completely dependent on the noise components.

In order to detect the anomalies in the traffic signal of com-puter networks, a new method called generalized likelihood ratio(GLR) is proposed [11]. In this method two sliding windows movealongside the entire signal. Each window of this method is mod-eled by an auto regressive (AR) model. If the sliding windows fallwithin a segment, since both windows have the same statisticalproperties, the modeling error between the two windows is low.However, if both sliding windows aren’t placed in the same seg-ments, the modeling error rises. Defining a suitable threshold level,if the local maximum of modeling error is above this level, a seg-ment boundary point is detected [12].

To enhance the GLR method, it has been suggested to usewavelet as a pre-processing stage. This new method was named

wavelet GLR (WGLR) method [13]. There are still two shortages in
Page 2: EEG Segmentation Using GLR

1104 H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114

WGLR method: 1) in the method, several parameters such as win-dow length and overlapping percentage of the successive windowsmust experimentally be adjusted; 2) moving step 1 in successivewindows for GLR method causes the method to become unreliablefor signal segmentation.

Kaser has introduced nonlinear energy operator (NLEO) for seg-menting a signal, as follows [14]:

ψ[x(n)

] = x2(n) − x(n − 1)x(n + 1) (1)

He has also proved if the signal is a sinusoidal wave, ψ[x(n)]will be defined as:

Q (n) = ψ[

A Cos(ω0n + θ)] = A2 Sin2 ω0 (2)

If ω0 is significantly smaller than the sampling frequency, then,Q (n) is equal to A2ω2

0 . In other words, any change in ampli-tude (A) or frequency (ω0) affects Q (n). When there is a multi-frequency or multi-component signal, the output of the NLEO willinclude a DC part and the time-varying parts called cross-terms( f (wi ± w j)|i, j=1,2,...,R&i �= j) are defined as:

ψ

[R∑

i=1

Ai Cos(ωin + φ)

]

=R∑

i=1

A2i Sin2 ωi + f (wi ± w j)

∣∣i, j=1,2,...,R&i �= j (3)

These cross-terms decrease the accuracy of signal segmentation.An improved NLEO (INLEO) method utilizes wavelet transform toovercome the effects of these cross-terms [2].

Real data often includes noise; this noise deteriorates theboundary detection procedure. To better avoid the noise effect,Kalman filter (KF) is used in this article. KF is an efficient recursivefilter that predicts the state of a dynamic system from a series ofmeasurements with error. After filtering the signal, fractal dimen-sion (FD) is estimated. FD has two parameters which are namedwindow length and overlapping percentage of the successive win-dows. If these parameters are not selected properly, the segmentboundaries may inaccurately be selected.

To obtain the desired parameters of FD, evolutionary algorithm(EA) may be employed as a fast search technique. The fundamentalmotivation behind using EA, which makes it suitable for this ap-plication, is its fast convergence to an acceptable response in thedefined space.

Two well established EAs have been examined here. These twomethods are called genetic algorithm (GA) and imperialist compet-itive algorithm (ICA). GA is a primitive EA inspired by evolutionarybiology and genetics such as inheritance, mutation, selection, andrecombination [15]. From the results of their performances, ICA hasbeen confirmed to be more powerful and performs better than GA[16].

The rest of this paper is organized as follows. In Section 2.1 KFis briefly reviewed. In Section 2.2 Katz’s algorithm as a way to ob-tain FD is introduced briefly. Section 2.3 explains two EAs includeGA and ICA. In Section 2.4 the proposed method is introduced infour steps. Section 3 provides introduction to three types of datathat includes synthetic data, real EEG and real photon emissiondata and then, the achieved results of this proposed method com-pared with the results of some of the existing methods such asWGLR, Varri’s and INLEO. The final section presents the conclusionof this novel method for segmentation of non-stationary signals

based on KF, FD and EAs.

2. The hybrid approach

2.1. Kalman filter

KF is a powerful recursive algorithm that approximates the stateof a dynamic system linearly from a signal sequence [17–19]. KF ismainly applied for solving two major problems (I) reducing noiseand (II) tracking the changes in the state of linear systems [20,21]. The KF works in two stages: first stage is prediction and thesecond is correction. In the first stage, the system state is predictedusing a dynamic model. In the second stage the model is correctedwith the help of the observation sequence. During this process thecovariance of the approximation error is minimized.

2.2. Fractal dimension

In Euclidean space, line and image are known to be one-dimensional and two-dimensional, respectively and non-integer di-mension does not exist but FD represents a non-integer dimensionby exploiting the concepts from modern mathematics. It is com-monly used in analysis of biomedical signals such as EEG and ECG,image processing and electrochemical processes [22–24]. FD is auseful method to indicate variation in both amplitude and fre-quency of a signal. In Fig. 1, it is shown how FD is changed whenfrequency or amplitude of a signal is changed.

The original signal includes four segments. The first and sec-ond segments have the same amplitude. The frequency of the firstpart is however different from that of the second part. In the thirdsegment the amplitude becomes different from that of the secondsegment. Amplitude and frequency in the 4th segment are differ-ent from those of the third segment. The reason for creating thissignal is to show that if two adjacent epochs of a signal have dif-ferent amplitudes and/or frequencies, the FD will vary.

There are some methods to calculate FD of a signal such as Hi-aguchi, Petrosian, Katz’s methods [25,26]. Because FD is directlycomputed in time-varying signal, it has low calculation load, inother words FD is calculated fast. Generally, each one of thesemethods has some advantages and disadvantages that vary in dif-ferent applications. Katz’s algorithm has a lower sensitivity andgood speed in contrast with the two other algorithms [26,27].

In this algorithm the dimension of FD of a signal is defined asfollows:

FD = log(L)

log(d)(4)

where L shows the length of the time series or the total distancebetween consecutive points and d shows the maximum distancebetween the first data of time series and the data that has max-imum distance from it. Mathematically, d is expressed by the fol-lowing equation:

d = max(distance(x1, xi)

)(5)

where xi is the ith data point that has maximum distance fromthe first data point of the time sequence at time point l [26,27].

2.3. Evolutionary algorithm

In this part two EAs, namely, ICA and GA are briefly introduced.

2.3.1. Genetic algorithmGA is a search technique to find the approximate solutions

in the defined space. GA has been successfully applied to somedifficult problems such as customizable FPGA IP core, travelingsalesman problem (TSP), network routing problems, and cluster-

ing methods [28,29]. The GA has many benefits, for example, its
Page 3: EEG Segmentation Using GLR

H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114 1105

Fig. 1. Variation of FD when amplitude or frequency changes.

Fig. 2. Children reproduction.

concept is easy to understand, it supports multi-objective opti-mization, it is good for noisy environments, its answers get betterduring the time, and it inherently parallels [29].

Regarding our particular interest, GA has five steps as follows:

Step 1: Initializing population; first step in GA is generating a pop-ulation of strings (called chromosomes), then, encode theminto the so-called individuals. Since a binary GA has beenused in the paper, first we have converted continuous val-ues into binary. This is performed by uniform samplingand linear quantization of the samples into 28 levels. Thesample values are then grouped into non-overlapping seg-ments (subranges) of 16 bits and each segment (subrange)is divided into two fixed parts of 8 bits. Then, a uniquediscrete value is assigned to each subrange [30].

Step 2: Calculating the fitness of each member; in the second stepthe fitness function is calculated to evaluate the proximityof each member to a desired value.

Step 3: Reproducing new members for the best fits; in each it-eration of GA, some of the chromosomes with highestfitness values are eliminated and replaced by new mem-bers. New members are produced by the so-called parents.Fig. 2 shows how two chromosomes are recreated fromtheir parents [30].

Step 4: Introducing random mutations in new generation; muta-tion is a physiologically-inspired disturbance to the systemand is often used to avoid possible local minima. To modelthis for real-world optimization, initially, a random num-ber for each bit of the chromosome is created, then, if therandom number is greater than a pre-defined “mutation

threshold”, that bit is flipped.

Fig. 3. The flowchart of GA-based optimization cycle.

Step 5: Stopping condition; continue performing steps 2, 3 and 4until a pre-specified number of iterations is reached. Fi-nally, the flowchart of GA is presented in Fig. 3 [31].

2.3.2. Imperialist competitive algorithmICA is a novel population-based optimization algorithm pro-

posed in 2007 by Atashpaz-Gargari and Lucas [16]. Today thisalgorithm has many applications such as designing controller forindustrial systems, solving optimization problems in PID controller,communication systems, and training and analysis of artificial neu-ral networks [32–35].

Like other evolutionary algorithms, this algorithm begins with

the initial population with random numbers that each of them is
Page 4: EEG Segmentation Using GLR

1106 H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114

Fig. 4. Flowchart of the ICA.

Fig. 5. A real photon emission data; (a) the number of received photons as a function of time and (b) the difference between the received photons.

called a “Country”. Some of the members of the population thathave best fitness values are selected as imperialists. Each memberof the remaining population is called a colony. Total fitness valuesof an empire relies on both the power of the imperialist countryand the power of its colonies.

In each stage, the countries move toward their related imperi-alist. If the fitness value of a colony achieves more than its relatedfitness value of imperialist then, this colony and its related im-perialist transform to imperialist and colony, respectively. In everystage, the weakest colony of the weakest empire moves toward theclosest empire, and the empire without any colony is eliminated.After a while, all empires fall down except for the most powerfulone and all the colonies go under the control of this unique empire[16]. Finally the flowchart of the corresponding ICA is presented inFig. 4.

2.4. Proposed adaptive segmentation

This method consists of four steps as follows:

(1) First, the original signal is filtered by KF. KF reduces the

noise of the original signal which makes the obtained signal

smoother than the original signal. This filter does not intro-duce any shift to the signal either. The third advantage of KF isthat it is able to approximate the missing parts of the signal.Moreover, KF is much faster than discrete wavelet transform(DWT) that has used in previous signal segmentation meth-ods. Also, we can change the KF parameters easily and it isvery flexible. However, in DWT we can use limited number oflevels and parameters compared with KF.

(2) The FDs of the filtered signal are computed by two slidingwindows mentioned in the INLEO and WGLR methods. FD iscalculated using Katz’s method. We use FD variations to ob-tain the segment boundaries as follows:

Gt = |FDt+1 − FDt |, t = 1,2, . . . , L − 1 (6)

where t and L are the number of analyzed window and the to-tal number of analyzed windows, respectively. In other words,FDt is the fractal dimension of the signal overlapped with tthwindow analyzed.

(3) As noted before, there are two parameters that affect the seg-mentation method (i) length of the window and (ii) percent-

age of overlap. If these parameters aren’t chosen correctly, the
Page 5: EEG Segmentation Using GLR

H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114 1107

Fig. 6. Results of the proposed technique (window length = 1.986 s and overlapping percentage of the successive windows = 54.1%); (a) original signal, (b) filtered signal byKF, (c) output of FD, and (d) G function result.

Fig. 7. Minimum fitness values of all imperialists versus number of iterations using EG as fitness function.

boundaries of segments may be detected inaccurately. In thispart we propose two EAs, namely, GA and ICA. The EAs mini-mize the following fitness function over k shifts of the slidingwindow:

EG =∑k

t=0 |ceil(Gt − mean(Gt))|2N

(7)

where N shows the number of samples in G , and ceil standsfor ceiling. It should be mentioned that the GA and ICA searchthe best responses for each time instant.

(4) Determining a threshold is one of the important problemsin segmentation of the signal. In many researches, the meanvalue or sum of the mean value and standard deviation (or asimilar offset value) is proposed as a threshold. If the definedthreshold is large, some segment boundaries may not be de-tected. When the threshold is low, some idle points may bedetected as boundaries. In this paper the mean value of G (G)is defined as the threshold. When the local maximum is biggerthan the threshold, the current time is chosen as a boundaryof the segment.

Page 6: EEG Segmentation Using GLR

1108 H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114

Fig. 8. Minimum fitness values of all chromosomes versus number of iterations using EG as fitness function.

Fig. 9. Results of the proposed technique without using ICA or GA (window length = 2.159 s and overlapping percentage of the successive windows = 52.5%); (a) original

signal, (b) filtered signal by KF, (c) output of FD, and (d) G function result.

3. Simulation data and results

In this part synthetic data, real EEG data, and brightness ofgalactic objects downloaded from NASA’s website (http://adsabs.harvard.edu/abs/1998ApJ...504..405S) are introduced. The proposedmethod was applied to these data and the results were comparedwith the other methods including WGLR, Varri’s and INLEO. Tosimulate all of these methods, MATLAB R2009a was used.

3.1. Simulation data

To evaluate the performance of this method we created 50multi-component signals. One piece of these signals includes thefollowing seven epochs:

Epoch 1: 5.5 cos(2πt) + 3.5 cos(6πt)Epoch 2: 3.5 cos(3πt) + 7 cos(11πt)Epoch 3: 7 cos(πt) + 5.5 cos(7πt)

Epoch 4: 2.5 cos(3πt) + 4.5 cos(5πt) + 3 cos(7πt)

Epoch 5: 2 cos(2.5πt) + 2 cos(5πt) + 8 cos(10πt)Epoch 6: 5 cos(3πt) + 5 cos(8πt) + 4 cos(10πt)Epoch 7: 5 cos(2.5πt) + 3.8 cos(5πt) + 4.5 cos(8πt)

In order to make the signals more similar to a real non-stationarysignals we added Gaussian noise with SNR = 5, 10, and 15 dBs.

Electrical activity of a group of neural cells of the brain gener-ates potentials that are called EEG signals. In this paper we used40 EEG signals recorded from the scalp of ten patients. The lengthof signals and the sampling frequency were 30 s and 256 Hz, re-spectively.

Analysis of brightness of galactic objects is used widely in as-tronomy science. For example, when a galactic object is moving infront of a star, the receiving brightness from the star is changed.By analyzing such information, we can obtain some valuable in-formation about the moving galactic object such as its orbit andsize. If the rate of photon arrival experiences some serious statis-

tical changes, this could be because of an explosion that has made
Page 7: EEG Segmentation Using GLR

H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114 1109

Fig. 10. Results of the proposed technique without using ICA or GA (window length = 2.028 s and overlapping percentage of the successive windows = 53.2%); (a) originalsignal, (b) filtered signal by KF, (c) output of FD, and (d) G function result.

Fig. 11. Results of the proposed technique without using ICA or GA (window length = 1.907 s and overlapping percentage of the successive windows = 55.7%); (a) originalsignal, (b) filtered signal by KF, (c) output of FD, and (d) G function result.

a new source or just sudden increase in brightness of an existingsource [36].

A signal which shows the number of photons that have beendetected as a function of time is illustrated in Fig. 5(a). The sig-nal in Fig. 5(a) can be considered to have Poisson distribution. Bycalculating the time difference of the signal in Fig. 5(b) we canachieve a signal that represents the number of input photons ineach time instance. Sampling cycle was assumed to be two mi-croseconds.

3.2. Simulation results

In Fig. 6(a) and Fig. 6(b) the synthetic data described above andthe filtered signal by KF are shown, respectively. As we can see,the filtered signal is smoother than the original signal. Fig. 6(c) andFig. 6(d) illustrate the FD of the filtered signal and the changes inG function.

Selecting an acceptable initial population and the number ofiterations is very important in EAs. For lower values of these pa-

rameters, the speed of our approach considerably increases. On

the other hand, for larger values of the selected parameters thespeed of the proposed methods significantly reduces. Like otherEAs, we must make a trade-off for the parameters in the applica-tion. Generally, the trade-off is only made by trials and errors. Thenumber of iterations for ICA was 70 and initial imperialist valuesand colonies were defined as 5 and 40 countries, respectively. TheGA applied here has 45 populations and the number of iterationsis 70. When the initial populations and number of iterations wereincreased, the performance of the proposed method was not sig-nificantly changed. Therefore, for this application of the EAs, thesepopulations and number of iterations were accurately selected.

The crossover and mutation functions are assumed to be twopoints and Gaussian, respectively. Small windows may not be ableto explain long-term statistics effectively, and long windows ignoresmall block variations. The overlapping percentage of the succes-sive windows affects both the computational load and accuracy ofthe segmentation results. Length of the window and the percent-age of overlap for both the GA and the ICA are selected between

2% and 10% of the signal length.
Page 8: EEG Segmentation Using GLR

1110 H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114

Fig. 12. Results of the existing techniques; (a) original signal, (b) output of Varri’s method, (c) output of WGLR method, and (d) output of INLEO method.

Fig. 13. Segmentation of real EEG by the proposed method; (a) original signal, (b) after filtering by KF, (c) output of the FD, and (d) G function result. It can be seen that allfive segments can be accurately segmented.

Figs. 7 and 8 depict the minimum cost of all imperialistsversus number of iterations (for ICA) and minimum cost ofchromosomes versus number of iterations (for GA), respectively.

As it can be seen in Figs. 7 and 8, ICA converges to the de-sired solution faster, while GA has trapped in the local op opti-mums.

Page 9: EEG Segmentation Using GLR

H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114 1111

Fig. 14. Segmentation of real EEG using the existing methods; (a) original signal, (b) output of GLR method, (c) output of WGLR method, (d) output of INLEO method, and

(e) output of Varri’s method.

It should be mentioned that generally, window length and over-lapping percentage of the successive windows are the major con-cern for the conventional methods. In other words, empiricallyadjusting these parameters is the main problem in those meth-ods. Hence, we have suggested the use of ICA or GA to overcomethis problem. In Figs. 6, 9, 10, and 11, the percentage of overlapsand the window lengths are approximately equal. There are manyfigures the same as these figures.

EG =∑k

t=0 |ceil(Gt − mean(Gt))|2N

depends on

Gt = |FDt+1 − FDt | (t = 1,2, . . . , L − 1)

where Gt and L pertain to the window length and percentage ofoverlap. As can be seen, Figs. 9, 10 and 11 have several undesiredrecognitions. When the undesired recognitions were increased, thesum of difference between Gt and mean value of Gt (threshold)

or Gt − mean(Gt) was increased. Thus, in the proposed approach,

ICA or GA tries to reduce these undesired recognitions by minimiz-ing EG and automatically choose the best parameters (parametersin Fig. 6). It should be noted that to increase the effect of thedifference, we have used ceil (using ceil enhances only a bit theperformance of the function).

To demonstrate the results of applying our proposed methodwe compared its results with those of Varri’s, WGLR and IN-LEO methods [37,13,2]. Fig. 12(a) shows the original signal as inFig. 6(a). The outputs of segmentation by the above three methodsare shown in Figs. 12(c), 12(d), and 12(e). As can be seen in Fig. 12,Varri’s, WGLR and INLEO methods cannot accurately detect seg-ments boundaries of the synthetic signal. Thus, the reliabilities ofthe methods are much worse than the proposed method. It shouldbe noted that in this paper, threshold parameters have been se-lected based on the references quoted in the paper without anychanges. As can be seen in Figs. 12(b), 12(c), 12(d) and 12(e), ifwe decrease the threshold levels, although the number of missingboundaries decreases, the false boundaries increase significantly or

vice versa.
Page 10: EEG Segmentation Using GLR

1112 H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114

In order to evaluate the performance of this method com-pared to other existing methods three ratios are used: the truepositive (TP), miss or false negative (FN) and false positive (FP)that are defined respectively as: TP = (Nt/N), FN = (Nm/N), andFP = (N f /N).

Here Nt , Nm and N f represent the number of true, missed andfalsely detected segments and N shows the actual number of seg-ment boundaries.

As can be seen in Table 1, although INLEO method can dis-tinguish between the segments rather accurately, the FP ratios ofthe method are not sufficiently acceptable. Unlike INLEO method,WGLR method has the low FPs. However, the method cannot detectthe segments accurately. In other words, the TPs obtained by theWGLR method are not reliable. Varri’s method performs approxi-mately the same as WGLR method regarding to the TPs. However,the FPs obtained by the Varri’s method are worse than those ofWGLR. None of the previous methods have acceptable reliabilitywith respect to TPs, FNs, and/or FPs. The results show that thesuggested methods with ICA and GA have better FPs and TPs val-ues compared to the existing methods, respectively. It ought to benoted that the performance of ICA is better than that of GA for allthe evaluation parameters.

Fig. 13(a) shows real EEG signal and Figs. 13(b), 13(c) and 13(d)show the signal after filtering by KF, the FD of the filtered signal,and changes in G function, respectively.

Fig. 14(a) shows the real EEG signal, as in Fig. 13(a). To realizethe performance of the proposed method, the output of segmen-tation by GLR, WGLR, INLEO and Varri’s methods is also shown inFigs. 14(b), 14(c), 14(d) and 14(e), respectively. It can be realizedthat the proposed method detects the EEG signal segments betterthan those achieved by the existing methods.

The results of segmentation applying the proposed method us-ing ICA as the better EA comparing with GA, and the three otherexisting methods to a set of 40 real EEG data are shown in Table 2.Although INLEO method has the acceptable true positive ratio, the

Table 1Results of applying the proposed methods on a set of synthetic data compared withthree existing techniques including INLEO, WGLR and Varri’s methods.

Proposed method using ICASNR 5 dB 10 dB 15 dBTP 0.824 0.893 0.932FN 0.181 0.109 0.072FP 0.103 0.029 0.029

Proposed method using GASNR 5 dB 10 dB 15 dBTP 0.819 0.893 0.930FN 0.176 0.107 0.070FP 0.147 0.205 0.176

INLEO methodSNR 5 dB 10 dB 15 dBTP 0.624 0.701 0.732FN 0.376 0.299 0.268FP 1.194 0.813 0.752

WGLR methodSNR 5 dB 10 dB 15 dBTP 0.362 0.416 0.456FN 0.638 0.584 0.544FP 0.187 0.144 0.13

Varri’s methodSNR 5 dB 10 dB 15 dBTP 0.360 0.395 0.434FN 0.640 0.605 0.566FP 0.263 0.227 0.182

Table 2Results of applying the proposed method with ICA to 40 real EEG data comparedwith INLEO, WGLR and Varri’s methods.

Method TP ratio FN ratio FP ratio

Proposed method with ICA 89.78% 10.22% 8.1%INLEO method 83.05% 16.95% 224.5%WGLR method 67.85% 32.15% 38%Varri’s method 50.05% 49.95% 65.35%

Fig. 15. Segmentation of the difference signal of the real photons’ arrival rates using the proposed method; (a) original signal, (b) filtered signal by KF, (c) output of FD, and(d) G function result. It can be seem that all five segments can be accurately detected.

Page 11: EEG Segmentation Using GLR

H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114 1113

Fig. 16. Segmentation of the difference signal of the real photons’ arrival rates using the existing methods; (a) original signal, (b) output of GLR method, (c) output of WGLRmethod, (d) output of Varri’s method, and (e) output of INLEO method.

false positive ratio of this method has the highest false positive ra-tio. Therefore, INLEO method has low reliability and may not besuitable in segmentation of real EEG data. Also, WGLR and Varri’smethods not only don’t have true positive ratios but also their falsepositive ratios are slightly higher.

In Fig. 15(a) the signal segmentation as the difference be-tween the real photons’ arrival rates using the proposed methodis shown. Figs. 15(b), 15(c), and 15(d) show the signal after filter-ing by KF, the FD of the filtered signal, and changes in G function,respectively.

As can be seen in Fig. 15, in the first segment the signal hassmooth variation. In the first part of the second segment, the am-plitude starts to increase and unlike the second segment, in the3rd segment the amplitude of the signal increases. The 4th and5th segments have different frequencies. When the input signal is

collected online from person’s body, the above concept can assistthe physiologists to recognize when there is a change or an onsetof an abnormality.

In Fig. 16(a) the real data signal as in Fig. 15(a) is shown. Torealize the performance of the proposed method, first, the outputof segmentation by GLR, WGLR, Varri’s and INLEO methods is alsoshown in Figs. 16(b), 16(c), 16(d), and 16(e), respectively.

4. Conclusions

In this paper an improved adaptive segmentation approach us-ing KF, Katz’s method for computing FD and EAs has been in-troduced. The new hybrid structure has provided a stronger evo-lutionary technique for analysis of non-stationary data such asEEG and ECG signals. Although Katz’s method, as the best method

Page 12: EEG Segmentation Using GLR

1114 H. Azami et al. / Digital Signal Processing 23 (2013) 1103–1114

to calculate the fractal dimension, is not very sensitive to smallchanges in signal, the results considerably have changed when wehave had ordinary noises. Therefore, KF could be useful as a pre-processing step for all data sources. After filtering signal by KF, FDthat is a fast technique has revealed the changes in both the ampli-tude and frequency of the signal. Finally, to optimize the selectionof parameters of the FD, the EAs have been used. In this paper, twoEAs, namely, GA and ICA have been used. The proposed algorithmhas been applied to synthetic data, real EEG data, and brightnesschanges of the galactic objects. The results have indicated superi-ority of the proposed method for segmenting the signals comparedwith three existing well established methods as benchmarks.

Acknowledgments

The authors would like to thank the anonymous editor and re-viewers for their valuable suggestions and comments.

References

[1] J.D. Scargle, Studies in astronomical time series analysis. V. Baysian blocks,a new method to analyze structure in photon counting date, Astron. J. 504(1998) 405–418.

[2] H. Hassanpour, M. Shahiri, Adaptive segmentation using wavelet transform, in:International Conference on Electrical Engineering, April 2007, pp. 1–5.

[3] R. Agarwal, J. Gotman, Adaptive segmentation of electroencephalographic datausing a nonlinear energy operator, in: IEEE International Symposium on Cir-cuits and Systems (ISCAS’99), vol. 4, 1999, pp. 199–202.

[4] H. Azami, A. Khosravi, M. Malekzadeh, S. Sanei, A new adaptive signal segmen-tation approach based on Hiaguchi’s fractal dimension, in: Communications inComputer and Information Science, vol. 304, Springer-Verlag, 2012, pp. 152–159.

[5] H. Hassanpour, M. Mesbah, B. Boashash, Time–frequency based newborn EEGseizure detection using low and high frequency signatures, Physiol. Meas. 25(2004) 935–944.

[6] S. Sanei, J. Chambers, EEG Signal Processing, John Wiley & Sons, 2007.[7] B. Boashash, Introduction to the concepts of time–frequency signal analysis and

processing, in: Time–Frequency Signal Analysis and Processing: A Comprehen-sive Reference, Part I, Elsevier, Oxford, 2003.

[8] S.M. Anisheh, H. Hassanpour, Adaptive segmentation with optimal windowlength scheme using fractal dimension and wavelet transform, Internat. J. En-grg. 22 (3) (2009) 257–268.

[9] K. Kosar, L. Lhotska, V. Krajca, Classification of long-term EEG recordings, in:Lecture Notes in Comput. Sci., vol. 3337, 2004, pp. 322–332.

[10] H. Azami, S. Sanei, K. Mohammadi, A novel signal segmentation method basedon standard deviation and variable threshold, J. Comput. Appl. 34 (2) (2011)27–34.

[11] D. Wang, R. Vogt, M. Mason, S. Sridharan, Automatic audio segmentation usingthe generalized likelihood ratio, in: 2nd IEEE International Conference on SignalProcessing and Communication Systems, 2008, pp. 1–5.

[12] U. Appel, A.V. Brandt, Adaptive sequential segmentation of piecewise stationarytime series, Inform. Sci. 29 (1) (1983) 27–56.

[13] J. Lv, X. Li, T. Li, Web-based application for traffic anomaly detection algorithm,in: Second IEEE International Conference on Internet and Web Applications andServices, 2007, pp. 44–60.

[14] J.F. Kaiser, On a simple algorithm to calculate the energy of a signal, Acoust.Speech Signal Process. 1 (1990) 381–384.

[15] P.R. Fernando, S. Katkoori, D. Keymeulen, R. Zebulum, A. Stoica, CustomizableFPGA IP core implementation of a general-purpose genetic algorithm engine,IEEE Trans. Evol. Comput. 14 (2010) 133–149.

[16] E. Atashpaz-Gargari, C. Lucas, Imperialist competitive algorithm: an algorithmfor optimization inspired by imperialistic competition, in: IEEE Congress onEvolutionary Computation, 2007, pp. 4661–4666.

[17] M. Karimi-Ghartemani, M.R. Iravani, A nonlinear adaptive filter for on-line sig-nal analysis in power systems: applications, IEEE Trans. Power Deliv. 17 (2)(2002) 617–622.

[18] M. Karimi-Ghartemani, A.K. Ziarani, A nonlinear time frequency analysismethod, IEEE Trans. Signal Process. 52 (2004) 1585–1595.

[19] R. Brown, P. Hwang, Introduction to Random Signals and Applied Kalman Fil-tering, 2nd ed., Wiley, New York, 1992.

[20] M.S. Grewal, A.P. Andrews, Kalman Filtering: Theory and Practice Using MAT-LAB, 2nd ed., Wiley, New York, 2001.

[21] S.M. Bozic, Digital and Kalman Filtering: An Introduction to Discrete-Time Fil-tering and Optimal Linear Estimation, Wiley, New York, 1983.

[22] Y. Tao, E.C.M. Lam, Y.Y. Tang, Feature extraction using wavelet and fractal, Pat-tern Recognit. 22 (3–4) (2001) 271–287.

[23] U.R. Acharya, O. Faust, N. Kannathal, T. Chua, S. Laxminarayan, Non-linearanalysis of EEG signals at various sleep stages, Comput. Meth. ProgramsBiomed. 80 (1) (2005) 37–45.

[24] W.Y. Hsu, C.C. Lin, M.S. Ju, Y.N. Sun, Wavelet-based fractal features with ac-tive segment selection: application to single-trial EEG data, Neurosci. Meth-ods 163 (1) (2007) 145–160.

[25] R. Esteller, G. Vachtsevanos, J. Echauz, B. Litt, A comparison of fractal dimen-sion algorithms using synthetic and experimental data, in: IEEE InternationalSymposium on Circuits and Systems (ISCAS’99), vol. 3, 1999, pp. 199–202.

[26] R. Esteller, G. Vachtsevanos, J. Echauz, B. Litt, A comparison of waveform fractaldimension algorithms, IEEE Trans. Circuits Syst. 48 (2) (2001) 177–183.

[27] M.J. Katz, Fractals and the analysis of waveforms, Comput. Biol. Med. 18 (3)(1988) 145–156.

[28] M. Mohammadi, H. Alizadeh, B. Minaei-Bidgoli, Neural network ensembles us-ing clustering ensemble and genetic algorithm, in: IEEE Conference on Conver-gence and Hybrid Information Technology, 2008, pp. 761–766.

[29] M.R. Mosavi, H. Azami, Applying neural network ensembles for clustering ofGPS satellites, Internat. J. Geoinform. 7 (3) (2011) 7–14.

[30] R.L. Haupt, S.E. Haupt, Practical Genetic Algorithm, John Wiley & Sons, 2004.[31] O. Ludwig Jr., U. Nunes, R. Araújo, L. Schnitman, H.A. Lepikson, Applications of

information theory, genetic algorithms, and neural models to predict oil flow,Commun. Nonlinear Sci. Numer. Simul. 14 (2009) 2870–2885.

[32] M. Abdechiri, K. Faez, H. Bahrami, Neural network learning based on chaoticimperialist competitive algorithm, in: 2nd International Intelligent Systems andApplications (ISA), 2010, pp. 1–5.

[33] E. Atashpaz-Gargari, F. Hashemzadeh, R. Rajabioun, C. Lucas, Colonial competi-tive algorithm: a novel approach for PID controller design in MIMO distillationcolumn process, Int. J. Intell. Comput. Cybern. 1 (3) (2008) 337–355.

[34] R. Rajabioun, E. Atashpaz-Gargari, C. Lucas, Colonial competitive algorithm as atool for Nash equilibrium point achievement, in: Lecture Notes in Comput. Sci.,2008, pp. 680–695.

[35] E. Atashpaz-Gargari, R. Rajabioun, F. Hashemzadeh, F. Salmasi, A decentralizedPID controller based on optimal shrinkage of Gershgorin bands and PID tun-ing using colonial competitive algorithm, Int. J. Innov. Comput. Inform. Control(IJICIC) 5 (10) (2009) 3227–3240.

[36] http://adsabs.harvard.edu/abs/1998ApJ...504..405S.[37] V. Krajca, S. Petranek, I. Patakova, A. Varri, Automatic identification of signifi-

cant grapholements in multichannel EEG recordings by adaptive segmentationand fuzzy clustering, Int. J. Bio-Med. Comput. 28 (1–2) (1991) 71–89.

Hamed Azami received his M.Sc. degree from Iran University of Sci-ence and Technology (IUST), Tehran, Iran in 2011, as a top-ranked studentwith honor degrees. He is currently a lecturer at Department of Electricaland Computer Engineering, Shomal University, Iran. His research interestsinclude Biomedical Signal and Image Processing, Neural Networks, Evolu-tionary Algorithms, and Wireless Communication Systems.

Saeid Sanei received his Ph.D. degree in biomedical signal and im-age processing from Imperial College London, London, U.K. in 1991. Hehas authored many books, book chapters, and more than 260 papers andhas chaired many international events. Currently, he is a Reader in neuro-computing at the Department of Computing, University of Surrey, U.K. Hisresearch interests include Signal Processing, Biomedical Engineering, andPattern Recognition.

Karim Mohammadi received his Ph.D. degree from Department ofElectrical Engineering, Oakland University, USA in 1981. He is the authorof several books, book chapters and more than 160 scientific publicationsin journals and international conferences. He is currently a faculty mem-ber of Department of Electrical Engineering of IUST as a professor.

Hamid Hassanpour received his Ph.D. degree in Electronic Engineeringfrom Queensland University of Technology, Brisbane, Australia, in 2004. Heis the author of several books, book chapters and approximately 130 sci-entific publications in journals and international conferences. His researchinterests include Biomedical Signal Processing, Time–Frequency Signal Pro-cessing and Analysis, Image Processing, and Robotics.