- Open Access
Sliding Window Empirical Mode Decomposition -its performance and quality
© Stepien; licensee Springer on behalf of EPJ. 2014
Received: 24 July 2014
Accepted: 11 September 2014
Published: 22 November 2014
In analysis of nonstationary nonlinear signals the classical notion of frequency is meaningless. Instead one may use Instantaneous Frequency (IF) that can be interpreted as the frequency of a sine wave which locally fits the signal. IF is meaningful for monocomponent nonstationary signals and may be calculated by Hilbert transform (HT).
A multicomponent signal may be decomposed into its monocomponents. Empirical Mode Decomposition (EMD), developed by Norden E. Huang, is a new method of such breaking down of a signal into its monocomponents. EMD combined with HT (called Hilbert-Huang Transform) is a good tool for analyzing nonstationary signals, but unfortunately the traditional EMD algorithm consumes a lot of time and computer resources. I propose a modified EMD algorithm - Sliding Window EMD, SWEMD.
Proposed algorithm speeds up (about 10 times) the computation with acceptable quality of decomposition.
Sliding Window EMD algorithm is suitable for decomposition of long signals with high sampling frequency.
Empirical Mode Decomposition (EMD) is a new method of analyzing nonlinear nonstationary signals. It was proposed by Norden E. Huang in 1996 . EMD is an entirely data-driven algorithm and it does not depend on any predefined basis functions. EMD breaks down nonstationary, multicomponent signal into its monocomponents. Such monocomponents are called Intrinsic Mode Function s (IMFs) (see subsection ‘Intrinsic mode function’). Analyzing long signals with EMD is time consuming or even impossible in reasonable time due to the fact, that spline interpolation of large number of points takes a lot of computer resources. For such signals ’classical algorithm’ needs some modifications. There are several modifications of EMD improving its performance. C. D. Blakely developed FastEMD method ; instead of cubic spline interpolation, matrix-free moving least-squares approximation is used. Q. Chen et al. proposed representing of IMFs as B-splines . This method was tested on earthquake records. It decomposes signal into more modes than ‘classical’ EMD so it gives better frequency resolution. Unfortunately authors did not give information about time performance of this method. S. Meignen and V. Perrier  eliminate sifting process (subsection ‘EMD algorithm’) by calculating IMFs through the resolution of a quadratic programming problem with equality and inequality constraints. This method should greatly accelerate decomposition of short signals (no sifting iterations), but for long signals it can take longer than ‘classical’ EMD (quadratic optimization problem is solved in polynomial time, spline interpolation is solved in linear time). A. Roy and J. F. Doherty  use the raised cosine filter based interpolation instead splines, RCEMD. They tested it on signal being a superposition of two harmonics with different frequencies. Depending on harmonic separation complexity (the ratio of the frequencies), calculations were performed from 0 to 10 times faster than when using the ‘classical’ method. Their method also needs lower sampling rates of signal than the ‘classical’ EMD. Further investigation of this method  shows that RCEMD algorithm is generally faster than EMD for short signal, so the authors developed windowed version of RCEMD which speeds up calculation about 10 times.
For long data sets, I suggest to calculate EMD in a small window and to slide this window along the time axis (Sliding Window EMD, SWEMD) . In this paper I describe proposed algorithm (subsection ‘Sliding Window Empirical Mode Decomposition’), test its performance (subsection ‘Performance of SWEMD’) and quality (subsection ‘Quality of SWEMD’). Then I compare time-frequency characteristics of specimen signals obtained by my algorithm, with those obtained by ‘classical’ EMD and those obtained by typical calculation of EMD in time windows (subsection ‘Quality of SWEMD’).
Empirical Mode Decomposition
Intrinsic mode function
EMD decomposes signal into, so called, intrinsic mode functions (IMFs). Each IMF is a signal that must meet the following criteria :
the number of extrema and zeros are equal or their difference is not greater than 1,
the signal has “zero mean” - the mean value of the envelope determined by maxima and the envelope determined by minima is equal 0 at every point.
These conditions show the essence of the EMD decomposition: non-stationary signal is decomposed into symmetrical oscillations around zero amplitude, which are easy for further analysis.
Above procedure is called sifting process.
where ′:=′ means it becomes.
where i is index of current mode. Decomposition is finished when residue r i (t) has less than three extrema (there is no possibility to construct envelopes) or all its points are nearly equal zero.
where n is number of all modes.
Sifting process stopping criteria
and e max is the upper envelope, e min - the lower envelope.
There are two thresholds:
θ1 - guaranteeing globally small fluctuations of the envelopes’ mean around zero,
θ2 - locally allowing higher fluctuations.
These values of parameters allow a compromise between quality and speed of decomposition process.
Sliding Window Empirical Mode Decomposition
Sliding Window Empirical Mode Decomposition, SWEMD, is based on calculation of EMD in a relatively small window and sliding this window along the time axis ,. Size of the window depends on the signal’s frequency band - there must be at least 5 maxima and 5 minima in the window for correct spline interpolation. To prevent possible discontinuities in IMFs between windows, the total number of modes and also the number of sifting iterations must be set a priori. The number of sifting steps should be tailored for each module. These parameter depends on the sampling frequency and on analyzed signal, its complexity and spectrum. The empirical determination of these values can be difficult. Thus, I propose a simple algorithm for determining the number of sifting iterations: decomposition of several signal’s windows by classic algorithm and counting the average number of sifting steps for each mod.
During calculation performed on the subsequent modes in a SWEMD step, it may occur (especially for modes containing low frequencies) that the window size is too small for spline interpolation (not enough extrema). In such a case, the calculation for this mode (and the next modes) is canceled in this SWEMD step. In the next step these modes will be calculated in a longer window. Therefore, in the implementation of the algorithm, the table for storing indices of the windows’ start point is used (Ind in Figure 3). If extraction of mode M in SWEMD step at time t is successful then the array element corresponding to the given mode (Ind[M]) is assigned the value of the last window point: t + win. In a case of too small number of extrema, Ind[M] remains unchanged, therefore, the size of the window in the next step will be greater by win points from the basic size: win.
The calculation of the mode M in the SWEMD step begins with extracting from the analyzed signal y points corresponding to the window in time t and its surroundings (in Figure 3 these data are assigned to the variable R). Then, in order to prepare input data for calculation of the mode M, the signal R is reduced by the IMFs of orders lower than M (in Figure 3 block labeled “Prepare data for calc. Current mode”). Prepared data are subjected to the sifting process. If there is not enough extrema, calculations in this SWEMD step are interrupted and the counting of the first IMF in the next step (t + win) is started. If the sifting process is completed correctly, the resulting mode (after discarding surroundings) is placed in the array imf[.,.] (Figure 3) that stores IMFs at appropriate indices. Then, the value of the start point of the window for the mode M in the next SWEMD step is changed and a process of calculating the module M +1 is started or current step is completed (if mode M was the last to achieve).
Results and discussion
Performance of SWEMD
Quality of SWEMD
In order to verify the quality of the proposed algorithm I compared the results SWEMD and ‘classical’ EMD. The test consisted of the following steps:
decomposition of the test EEG signal using EMD and SWEMD;
calculation of the marginal Hilbert-Huang spectrum for both EMD and SWEMD in time windows length of 10 seconds (the same window was used in the calculations of SWEMD);
calculation of the difference of the EMD and SWEMD marginal spectra’s mean amplitudes and the standard deviation of this difference;
designate 95% confidence interval  for this difference
I also compared results of SWEMD analysis with classical EMD and with concatenated results of calculation of EMD in windows (window EMD) on simple signals.
Superposition of two chirp signals
Frequency modulated signal
Superposition of two FM signals
Superposition of two harmonics
Before using the classical EMD one needs to consider whether multiple spline interpolation does not take too much time. In particular this applies to analysis of long signals or acquisition systems with high sampling frequency or a large number of channels. Proposed algorithm, Sliding Window EMD, can speed up computation about 10 times. Examples of using SWEMD presented in this article show that it has similar quality as classical EMD - boundary effects in typical windowing are nearly completely reduced in SWEMD. Proposed algorithm is suitable also in real time analysis of data.
This work was supported by Nalecz Institute of Biocybernetics and Biomedical Engineering, Polish Academy of Sciences, Warsaw, through statutory project.
- Huang NE, Shen Z, Long SR, Wu MC, Shih HH, Zheng Q, Yen N-C, Tung CC, Liu HH: The empirical mode decomposition and the Hilbert spectrum for nonlinear and non-stationary time series analysis. Proc Roy Soc Lond Math Phys Sci 1971, 454: 903–995. 10.1098/rspa.1998.0193MathSciNetView ArticleMATHGoogle Scholar
- Blakely CD: A fast Empirical Mode Decomposition technique for nonstationary nonliear time series. In Center for Scientific Computation and Mathematical Modeling. College Park, USA: University of Maryland. Preprint CSCAMM-05-10; 2005. Online: , [http://www.cscamm.umd.edu/publications/fastEMDcBlakelyFinal_CS-05–10.pdf] Blakely CD: A fast Empirical Mode Decomposition technique for nonstationary nonliear time series. In Center for Scientific Computation and Mathematical Modeling. College Park, USA: University of Maryland. Preprint CSCAMM-05-10; 2005. Online:
- Chen Q, Huang N, Riemenschneider S, Xu Y: A B-spline approach for empirical mode decompositions. Adv Comput Math 2006, 24: 171–195. 10.1007/s10444-004-7614-3MathSciNetView ArticleMATHGoogle Scholar
- Meignen S, Perrier V: A new formulation for empirical mode decomposition based on constrained optimization. IEEE Signal Process Lett 2007, 14(12):932–935. 10.1109/LSP.2007.904706ADSView ArticleGoogle Scholar
- Roy A, Doherty JF: Raised cosine interpolation for empirical mode decomposition. In Information Sciences and Systems, 2009. CISS 2009. 43rd Annual Conference on. Baltimore: IEEE; 2009. Roy A, Doherty JF: Raised cosine interpolation for empirical mode decomposition. In Information Sciences and Systems, 2009. CISS 2009. 43rd Annual Conference on. Baltimore: IEEE; 2009.Google Scholar
- Roy A, Doherty JF: Improved signal analysis performance at low sampling rates using raised cosine empirical mode decomposition. Electron Lett 2010, 46(2):176–177. 10.1049/el.2010.2361View ArticleGoogle Scholar
- Roy A, Doherty JF: Raised cosine filter-based empirical mode decomposition. IET Signal Process 2011, 5(2):121–129. 10.1049/iet-spr.2009.0207MathSciNetView ArticleGoogle Scholar
- Stepien P: Application of empirical mode decomposition method in biomedical signal analysis (in polish). PhD thesis. Warsaw University of Technology; 2011. Supervisor: W. Klonowski. Stepien P: Application of empirical mode decomposition method in biomedical signal analysis (in polish). PhD thesis. Warsaw University of Technology; 2011. Supervisor: W. Klonowski.Google Scholar
- Rilling G, Flandrin P, Gonçalvès P: On empirical mode decomposition and its algorithms. In IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing NSIP-03. Grado, Italy; 2003. Online: , [http://perso.ens-lyon.fr/paulo.goncalves/pub/NSIP03_GRPFPG.pdf] Rilling G, Flandrin P, Gonçalvès P: On empirical mode decomposition and its algorithms. In IEEE-EURASIP Workshop on Nonlinear Signal and Image Processing NSIP-03. Grado, Italy; 2003. Online:
- Pierzchalski MP, Stepien RA, Stepien P: New nonlinear methods of heart rate variability analysis in diagnostics of atrial fibrillation. Int J Biol Biomed Eng 2011, 5(4):201–208.Google Scholar
- Huang NE, Wu MLC, Long SR, Shen SSP, Qu W, Gloersen P, Fan KL: A confidence limit for the empirical mode decomposition and Hilbert spectral analysis. Proc R Soc Lond Math Phys Sci 2003, 459(2037):2317. 10.1098/rspa.2003.1123ADSMathSciNetView ArticleMATHGoogle Scholar
This article is published under license to BioMed Central Ltd. This is an Open Access article distributed under the terms of the Creative Commons Attribution License(http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.