1 Introduction

Epilepsy is a disorder caused by recurrent and sudden discharge of the neurons in the cerebral cortex, and 1% of the population worldwide suffer from it according to the statistical reports [1]. Electroencephalogram (EEG) is a noninvasive diagnosis method based on the records of electrical activity fired by the neurons in the brain. Multichannel signals from scalp electrodes and the required long-term recordings make the use of advanced signal processing methods an essential step of EEG-based detection [28, 35] and other computer-aided diagnosis systems [6, 7].

Epileptic seizure onset detection and classification are more convenient and practical approaches to warn the patient and his/her relatives as quick and accurate as possible [27, 33]. Furthermore, the onset detection is widely used for mobile EEG devices capable for epileptic seizure analysis [34]. Accuracy is a desired property of off-line methods as well, but elapsed time during the analysis is not the most important constraint in such systems. Off-line approaches enable us to make more comprehensive analysis for epilepsy detection, such as types of epilepsy, duration and location. Other design criteria are the patient-dependent properties of the epilepsy detection. For patient-specific detection methods, a threshold or features have been extracted using seizure-free EEG recordings of the patient [21, 23, 27]. In this approach, detection threshold or features should be set specific for each patient. Patient non-specific seizure detection systems have a common database obtained from several different patients EEG data, whereas it requires more detailed studies and high speed and large amount of memory to process and store [34, 36].

EEG signals may be analyzed in time or frequency domains. Time-domain signal processing methods are commonly based on the investigation of the nonlinear dynamics and chaotic properties of the EEG. Lyapunov exponent (LE) [12] and entropy [5] are well-studied methods for the analysis of complexity and irregularity of the EEG time series in order to classify an activity as seizure or non-seizure using artificial neural network (ANN) or support vector machine (SVM). However, time-domain methods are noise sensitive so advanced denoising methods should be applied before [8, 16]. Fourier transform (FT) and FT-based power spectral density (PSD) methods [30] are the basic approaches of frequency domain EEG analysis. It is reported that they provide quietly discriminative feature vector. However, the stationary assumption of the signal for FT-based methods decreases its performance compared to time-frequency methods. Short-time Fourier transform (STFT) is the basic enhancement to analyze stochastic time-varying properties of EEG [17]. Discrete wavelet transform (DWT) is reported as a successful method due to capability of sub-band analysis [20].

Empirical mode decomposition (EMD) is proposed as an alternative method to process nonlinear and non-stationary signals [15]. It is a completely adaptive and data-driven algorithmic approach. It decomposes the signal into amplitude and frequency modulated (AM-FM) oscillations called intrinsic mode functions (IMFs) without a priori assumptions and using basis functions. Generally, the decomposed IMFs have overlapping limited bandwidth due to its dyadic filter bank structure [19, 32]. The filter bank property of the EMD algorithm is also data driven [11]. Thus, filter bank response of the EMD is related to the signal characteristics.

More recently, new techniques for biomedical signal analysis based on the EMD algorithm have been proposed. Ensemble EMD (EEMD) with independent component analysis (ICA) is adopted for a single channel electromyography (EMG) source estimation and feature (waveform length, zero crossings, slope sign changes , Willison amplitude, and root-mean-square) extraction [22]. Principal component analysis (PCA) adopted EEMD and ICA method is also proposed to split a single channel EEG into sources [13], and the performance of local mean decomposition (LMD) with ICA is compared to EEMD-ICA-PCA [14]. The AM-FM bandwidths of the decomposed IMFs during seizure and non-seizure periods are studied for single channel recordings [7]. Analytic representation of IMFs called Hilbert–Huang transform (HHT) [15] is also proposed. It is reported that area properties of the IMFs in the complex plane are distinguishable for epileptic and normal EEG [29]. Similarly, epilepsy classification is employed using higher-order statistics of the IMFs [2]. In [26], the energy levels of the first three IMFs are determined for threshold estimation to detect seizures.

In this study, epileptic EEG onset detection is proposed based on frequency domain properties of the EMD. The detection process is realized by a scalar score resulted from the proposed methods. Frequency domain analysis of EEG signals contains energy levels of the IMFs caused by the adaptive filter bank property of the EMD. Finally, score-based detection methods are proposed without using test and training vectors with complex machine learning algorithms. This adaptive threshold estimation using energy distribution of the IMFs combined with moving average filter is performed on four different EEG signals.

The rest of the paper is organized as follows: The EMD and filter bank structure are summarized in Sect. 2.1. EEG datasets used in this study are described in Sect. 2.2. Proposed detection approaches are presented in Sect. 2.3. Results of frequency domain epileptic seizure detection for EEG recordings are presented in Sect. 3. Results are discussed in Sect. 4. Finally, Sect. 5 concludes the paper.

2 Methods

2.1 Empirical mode decomposition

Empirical mode decomposition (EMD) was introduced as a tool of data-driven and adaptive signal processing method by Huang et al. in 1998 [15]. It decomposes a multicomponent signal into intrinsic mode functions (IMFs) so that the sum is equal to the original signal. The EMD algorithm is basically composed of Sifting process based on envelope extraction to obtain IMFs. The detailed steps are given as

  1. (i)

    Find local maxima and minima as \(M_{i}\), \(i=1,2,\ldots ,\) and \(m_{k}\), \(k=1,2,\ldots ,\) in \(x\left( n\right) \).

  2. (ii)

    Extract upper and lower envelops by the interpolating signals \(M(n)=f_{M}(M_{i},n)\), and \(m(n)=f_{m}(m_{k},n)\) using cubic spline.

  3. (iii)

    Calculate the mean of the envelopes, \(h(n)=[M(n)+m(n)]/2\).

  4. (iv)

    When h(n) satisfies the IMF requirements, keep it, and remove \(h\left( n\right) \) from the signal; \(x\left( n\right) =x(n)-h(n)\).

  5. (v)

    Return to step (i) and stop when \(x\left( n\right) \) remains nearly unchanged.

  6. (vi)

    If an IMF, \(\varphi \left( n\right) \) is obtained, remove it from the signal \(x\left( n\right) =x(n)-\varphi \left( n\right) \) and return to (i) if \(x\left( n\right) \) is not constant or trend, \(r\left( n\right) \).

Consequently, the iterative process continues depending on the stopping criteria. The original signal can be reconstructed by the IMFs as follows:

$$\begin{aligned} x(n)=\underset{i=1}{\overset{L}{\sum }}\varphi _{i}(n)+r(n) \end{aligned}$$
(1)

The IMFs satisfy two criteria: First, the number of the extrema and the number of zero crossings must be equal or must differ by one at most. Second, the mean of the envelopes determined by the local maxima and minima namely upper and lower envelope should be zero [15]. Therefore, each IMF has limited bandwidth and instantaneous frequency (IF) fluctuation [32]. Moreover, the stopping criteria related to the steps (v) and (vi) are originally suggested as standard deviation (SD)-based technique to detect whether the retained signal changes or not. A recent EMD algorithm [31] with user defined energy-based resolution option is preferred to decompose the EEG signals as follows:

$$\begin{aligned} \mathrm{qResol}= & {} 10\log \left( \frac{\sigma _{x\left( n\right) }^{2}}{\sigma _{h\left( n\right) }^{2}}\right) \end{aligned}$$
(2)
$$\begin{aligned} \mathrm{qResid}= & {} 10\log \left( \frac{\sigma _{x\left( n\right) }^{2}}{\sigma _{r\left( n\right) }^{2}}\right) \end{aligned}$$
(3)

where qResol and qResid are signal energy ratios to IMFs and residue, respectively, when there are several attempts to enhance decomposition capability of the EMD [3].

The filter bank property of the EMD is also data-driven and dependent on the statistical properties of the signal. Generally, it has dyadic filter bank structure, but the cutoff frequencies of the each filter and overlapping in the structure are data dependent. In other words, statistical properties of the signal determine the bandwidth of each IMF. This filter bank structure has been investigated by analyzing the Hurst exponent (H) of the signal. The filter bank structure of the EMD originated from the studies [10, 11] is shown in Fig. 1.

Fig. 1
figure 1

EMD filter bank structure[10]

Power spectral densities of IMFs of the fractional Gaussian noise with the Hurst exponent from 0.1 t to 0.9 are estimated in Fig. 1. If a signal with lower Hurst exponent is decomposed, the bandwidth of the first IMF quietly covers the other IMFs bands or the cutoff frequency of the filter is highly wider. Therefore, it is expected that the first IMF has the highest energy level when compared to other IMFs. From another point of view, in case of lower Hurst exponent, the first IMF must have the highest level of fluctuations due to wide band components.

2.2 EEG datasets

The single channel EEG signals are obtained from publicly available datasets of Bonn University [4]. There are five datasets namely A, B, C, D, and E. All of them are recorded and digitized at 173.61 Hz with a 12-bit resolution. Thus, each dataset consists of 2360 seconds recordings. The Set A and Set B were collected from five healthy volunteers using international 10/20 electrode position scheme, while their eyes were open and closed, respectively. The EEG signals in Set C and Set D were acquired from the electrodes placed in hippocampal formation of the opposite hemisphere, and in the epileptogenic zone during seizure-free intervals, respectively. On the other hand, Set E is obtained intracranially from these electrodes during seizure. Thus, Sets A, B, C, and D are seizure-free signals, and the results of the proposed methods on these sets are compared to Set E consisting of epileptic EEG signals.

Fig. 2
figure 2

Energy levels of IMFs adopted into proposed method. a Energy levels of original EEG recordings (y-axis in log-scale for better visualization). b Energy levels of normalized EEG deployed in the proposed method for robustness

2.3 Proposed EMD-based epileptic EEG detection

In this paper, an epileptic EEG detection method is proposed using bandwidth property of the EMD in frequency domain to detect epileptic seizure. The EMD is employed as main tool to analyze EEG signals. The data-driven filter bank property of EMD given in Sect. 2.1 is exploited to detect epileptic seizures in the frequency domain. In other words, different statistical properties of the epileptic and normal recordings form different filter bank structure particularly bandwidths of the decomposed IMFs. Thus, the energy distribution of the IMFs is investigated to depict the adaptive filter bank structure of the EMD.

Fig. 3
figure 3

PSDs of the IMFs. Demonstration of the different filter bank structure formed by epileptic and normal EEGs

  1. (i)

    Let \(x\left( n\right) \) be recorded epileptic or normal EEG signals.

  2. (ii)

    Normalize EEG signals, \(\bar{x}\left( n \right) \) in the range of [\(-1\),1].

  3. (iii)

    Decompose \(\bar{x}\left( n \right) \) into IMFs, \(\varphi _{i}\left( n\right) \), \(i=1,2,\ldots ,L,\) where L is the total number of decomposed IMFs.

  4. (iv)

    Estimate energy level of each IMF by discrete Fourier transform, \(S_{i}\left( f\right) = \sum \nolimits _{{n = 0}}^{{N - 1}} \left[ |\sum \nolimits _{{n = 0}}^{{N - 1}}\varphi _{i}\left( n\right) e^{-j\left( 2\pi f/F_{s}\right) n}|^{2}\right] \).

  5. (v)

    Characterize the distribution of the energy levels of the IMFs by the variance, \(\sigma ^{2}=\frac{1}{L}\sum \nolimits _{{i = 1}}^{{L}}\left[ S_{i}-\bar{S}\right] ^{2}\) for single channel EEG.

  6. (vi)

    Repeat the steps for the next epochs.

Thus, changing of the energy level caused by adaptive PSDs of the IMFs is used for seizure detection and called as frequency domain metric of the EMD-based epileptic EEG detection. To illustrate the principle of the proposed method, energy of the IMFs is shown in Fig. 2.

As referring Fig. 2, the adaptive filter bank of the EMD yields distinctive distribution of energy level for epileptic and normal EEG. While the sudden discharge of neurons during seizure generates higher amplitude compared to seizure-free intervals, electrode placement and quality, amplification gain or environmental noise can also cause spikes or higher amplitude levels. Thus, adopted max-min normalization to EEG signals is applied before decomposing for robustness, as given the energy distribution of IMFs in Fig. 2b. To prevent misdetection caused by fluctuated variance score of the IMFs, moving average (MA) filtering is also applied to obtained variance score in step (V). Thus, the step (Vi) is added to the previous steps as follows:

  1. (vii)

    \({\sigma ^2}\left( n \right) = {1 \over 6}\sum \nolimits _{k = 0}^5 {{\sigma ^2}\left( {n - k} \right) } \)

Finally, this method is performed on single EEG recordings to investigate success rate, and they are demonstrated in the next section.

Fig. 4
figure 4

Results of detection in the frequency domain using EMD

3 Results

The performances of the proposed methods are evaluated using the publicly available EEG data sets [4] for benchmarking. The scores of the frequency domain property of the EMD-based method are conducted on healthy and epileptic EEG recordings.

First, frequency domain-based results based on data-driven filter bank structure of the EMD are given. As mentioned in Sect. 2.1, the adaptive filter bank structure is also tested on the signals emphasizing the different structure between epileptic and normal EEG. Thus, the PSDs of the IMFs of both epileptic and normal EEG are shown in Fig. 3.

Fig. 5
figure 5

Results of seizure onset detection adopted by filter bank property of the EMD. Overlapped scores are in black circles

After signals are decomposed by the EMD, six and four IMFs and the residues are obtained. The PSDs of the IMFs driven by the epileptic and normal EEGs are estimated Welch’s method, and the bandwidth differences which are the main property of the proposed method are shown. The first IMFs of the epileptic signal have wider bandwidths compared to the IMFs belonging to normal IMFs. In other words, epileptic IMF1 never reaches to 0 dB, while normal IMF1 reaches 0 dB at 0.35 normalized frequency (\(f_{n})\). Therefore, the first IMFs of the epileptic signal involve wider band, which cause the first IMFs to have higher energy levels than normal IMFs. This result can be also demonstrated examining the original study on filter bank structure. The epileptic and normal EEG signals yield Hurst exponents of 0.66 and 0.90, so the first IMFs of the normal EEG are expected to have limited bandwidths comparing to epileptic ones. Finally, we suggest energy level measurement of the IMFs to quantify this signal dependent property of the EMD for epilepsy detection. The energy distributions of the IMFs are given in Fig. 2 for one epoch. The epileptic IMF1 has distinctly higher energy level than the other IMFs, but the energy of the normal EEG is distributed nearly to IMFs. Consequently, the unbalanced energy distribution from mean is characterized and quantified using variance score, and the results are shown in Fig. 4.

The epochs have 10-second-length EEG recordings, and the proposed frequency domain-based EEG detection is tested on totally 472 epochs. The provided variance scores of the energy levels of the epileptic IMFs are distinctly higher than normal IMFs, but some overlapping scores shown in Fig. 5 are existed due to fluctuations in scores of both Set E and others. It decreases the successes rate of the proposed method.

Fig. 6
figure 6

Results of seizure onset detection using the second method with MA filtering

For this reason, the second approach with MA filtering is applied, and then the results are shown in Fig. 6.

Since the proposed method is based on detection of energy distribution level characterized by variance score, the fluctuations in Fig. 6 are decreased using MA filtering. Set A has mean score of 277.111 (max = 685.536, min = 19.584), while Set E has 3890.1 mean value (max = 15789, min = 815), with no overlapping scores. For Sets B, C, and D, the results are 906.95 (max = 2941.10, min = 50.46), 465.01 (max = 1342.40, min = 47.44), and 1492.7 (max = 1479.90, min =  92.45), respectively. Depending on the proposed method, the detection scheme starts with thresholding level estimation. When signal acquisition begins at seizure-free interval, the mean of the energy distribution is measured, and then the threshold is determined as twice the mean value. Thus, success rates of the method in this study are given in Table 1.

Table 1 Results of the EMD-based epileptic EEG detection
Table 2 Comparisons of the proposed methods with previous studies

Referring Table 1, the proposed frequency domain properties of the EMD can be successfully used to detect epileptic seizure. Especially, Set A is the most successfully detected EEG recording with 10 epochs FN rate (accuracy of 97.89%), and the other detections have 83.68, 96.39, and 93.00%, respectively.

4 Discussion

The proposed EMD-based method with the appropriate frequency domain metric can be alternative and successful technique to detect epileptic seizure. Advanced decomposition capability of the EMD and its data-driven property enable to detect signal changes such as epileptic and normal EEG. Thus, without using a machine learning algorithm, the energy distribution of the IMFs can be used for detection.

Referring Table 2, the proposed EMD method has promising accuracy rates like the studies [9, 24], when compared to the results of the algorithms in [12, 18, 25]. On the other hand, these higher scores can be achieved with the help of a machine learning algorithm while the proposed method and Orosco’s method [26] do not require. Furthermore, only energy distribution of the IMFs deployed as threshold estimation outperforms the previous EMD-based study [26], and the common issue for seizure onset detection is 8–10-second latency due to processing and epoch length [23, 33].

Generally, Set A and Set B recordings from scalp are studied and compared with Set E to evaluate epileptic EEG detection in other studies. From this point, these results (97.89 and 83.68%) are promising when compared to that of several state-of-the-art studies in Table 2.

5 Conclusion

In this paper, frequency domain properties of the empirical mode decomposition (EMD) are explored for epileptic electroencephalogram (EEG) onset detection. Data-driven properties of the EMD algorithm enable us to use simple metrics to identify seizure. Filter bank property of the EMD is exploited by measuring the energy of the decomposed IMFs in our frequency domain approach. The EMD-based method has promising accuracy rate (up to 97.89%), and it is only based on the calculation of the scalar scores as thresholding level, instead of using more complicated feature vectors and machine learning algorithms. Therefore, seizure onset detection is successfully implemented by analyzing the change in the energy level of the IMFs extracted from the EEG signal.