Open access

Adaptive Noise Removal of ECG Signal Based On Ensemble Empirical Mode Decomposition

Written By

Zhao Zhidong, Luo Yi and Lu Qing

Submitted: October 7th, 2010 Published: July 5th, 2011

DOI: 10.5772/16263

Chapter metrics overview

3,797 Chapter Downloads

View Full Metrics

1. Introduction

The electrocardiogram (ECG) records the electrical activity of the heart,which is a noninvasively recording produced by an electrocardiographic device and collected by skin electrodes placed at designated locations on the body. The ECG signal is characterized by six peaks and valleys, which are traditionally labeled P, Q, R, S, T, and U, shown in figure 1.

Figure 1.

ECG signal

It has been used extensively for detection of heart disease. ECG is non-stationary bioelectrical signal including valuable clinical information, but frequently the valuable clinical information is corrupted by various kinds of noise. The main sources of noise are: power-line interference from 50–60 Hz pickup and harmonics from the power mains; baseline wanders caused by variable contact between the electrode and the skin and respiration; muscle contraction form electromyogram (EMG) mixed with the ECG signals; electromagnetic interference from other electronic devices and noise coupled from other electronic devices, usually at high frequencies. The noise degrades the accuracy and precision of an analysis. Obtaining true ECG signal from noisy observations can be formulated as the problem of signal estimation or signal denoising. So denoising is the method of estimating the unknown signal from available noisy data. Generally, excellent ECG denoising algorithms should have the following properties: Ameliorate signal-to-noise ratio (SNR) for obtaining clean and readily observable signals; Preserve the original characteristic waveform and especially the sharp Q, R, and S peaks, without distorting the P and T waves.

A lot of methods have been proposed for ECG denoising. In general both linear and nonlinear filters are presented, such as elliptic filter, median filter, Wiener filter and wavelet transform etc. These methods have some drawbacks. They remove not only noise but also the high frequency components of non-stationary signals. In the worse they can remove the characteristic points of signals that are crucial for successful detection of waveform. In recent years wavelet transform (WT) has become favourable technique in the field of signal processing. Donoho et al proposed the denoising method called “wavelet shrinkage”; it has three steps: forward wavelet transform, wavelet coefficients shrinkage at different levels and the inverse wavelet transform, which work in denoising the signals such as Universal threshold, SureShrink, Minimax. Wavelet shrinkage methods have been successful in denoising ECG signals (Agante, P.M&Marques J.P, 1999; Brij N. Singh & Arvind.K, 2006). A New wavelet shrinkage method for denoising of biological signals is proposed based on a new thresholding filter (Prasad V.V.K.D.V; Siddaiah P; Rao BP,2008).De-noising using traditional DWT has a translation variance problem which results in Pseudo-Gibbs phenomenon in the Q and S waves, so the following algorithms tried to solve this problem: used cyclic shift tree de-noising technique for reducing white Gaussian noise or random noise, EMG noise and power line interference (Kumari, R.S.S. et al,2008).The selected optimal wavelets basis has been investigated with suitable shrinkage method to de-noise ECG signals, not only it obtains higher SNR, but preserves the peaks of R wave in ECG(Suyi Li. et al,2009).Scale-dependent threshold methods are successively proposed. A new thresholding procedure is proposed based on wavelet denoising using subband dependent threshold for ECG signals: The S-median-DM and S-median thresholds (Poornachandra.S, 2008).

In this work, in order to enhance ECG, the new adaptive shrunken denoising method based on Ensemble Empirical Mode Decomposition (EEMD) is presented that has a good influence in enhancing the SNR, and also in terms of preserving the original characteristic waveform. The paper is organized as follows: section 2 introduces Empirical Mode Decomposition (EMD) and EEMD is studied in section 3. EMD is a relatively new, data-driven adaptive technique used to decompose ECG signal into a series of Intrinsic Mode Functions (IMFs). The EEMD overcomes largely the mode mixing problem of the original EMD by adding white noise into the targeted signal repeatedly and provides physically unique decompositions. Wavelet shrinkage is studied in section 4; the wavelet shrinkage denoising method is simply signal extraction from noisy signal via wavelet transform. It has been shown to have asymptotic near-optimality properties over a wide class of functions. The crucial points are the selections of threshold value and thresholding function. The generalized threshold function is build. Computationally exact formulas of bias 、variance and risk of generalized threshold function are derived. Section 5 concentrates on adaptive threshold values based on EEMD.Noisy signal is decomposed into a series of IMFs, and then the threshold values are derived by the noise energies of each IMFs. To evaluate the performance of the algorithm, Test signal and Clinic noisy ECG signals are processed in section 6. The results show that the novel adaptive threshold denoising method can achieve the optimal denoising of the ECG signal. Conclusions are presented in section7.


2. Empirical mode decomposition

EMD has recently been proposed by N.E. Huang in 1998 which is developed as a data-driven tool for nonlinear and non-stationary signal processing. EMD can decompose signal into a series of IMFs subjected to the following two conditions:

  1. In the whole dataset, the number of extrema and the number of zero-crossing must either be equal or differ at most by one.

  2. At any time, the mean value of the envelope of the local maxima and the envelope of the local minima must be zero.

Figure.2 shows a classical IMF. The IMFs represent the oscillatory modes embedded in signal. Each IMF actually is a zero mean monocomponent AM-FM signal with the following form:


with time varying amplitude envelop a(t) and phaseϕ(t). The amplitude and phase have both physically and mathematically meaning.

Most signals include more than one oscillatory mode, so they are not IMFs. EMD is a numerical sifting process to disintegrate empirically a signal into a finite number of hidden fundamental intrinsic oscillatory modes, that is, IMFs.The sifting process can be separated into following steps:

  1. Finding all the local extrema, including maxima and minima; then connecting all the maxima and minima of signal x(t) using smooth cubic splines to get its upper envelopexup(t) and lower envelopexlow(t).

  2. Subtracting mean of these two envelopes m1(t)=(xup(t)+xlow(t))/2 from the signal to get their difference:h1(t)=x(t)m1(t).

  3. Regarding theh1(t)as the new data and repeating steps 1 and 2 until the resulting signal meets the two criteria of an IMF, defined asc1(t). The first IMF c1(t) contains the highest frequency component of the signal. The residual signalr1(t) is given byr1(t)=x(t)c1(t).

  4. Regarding r1(t) as new data and repeating steps (1) (2) (3) until extracting all the IMFs. The sifting procedure is terminated until the Mth residue rM(t)becomes less than a predetermined small number or becomes monotonic.

The original signal x (t) can thus be expressed as following:


cj(t)is an IMF where j represents the number of corresponding IMF and rM(t) is residue.

The EMD decomposes non-stationary signals into narrow-band components with decreasing frequency. The decomposition is complete, almost orthogonal, local and adaptive. All IMFs form a completely and “nearly” orthogonal basis for the original signal. The basis directly comes from the signal which guarantees the inherent characteristic of signal and avoids the diffusion and leakage of signal energy. The sifting process eliminates riding waves, so each IMF is more symmetrical and is actually a zero mean AM-FM component.

Figure 2.

A classical IMF

The major disadvantage of EMD is the so-called mode mixing effect. For example, the simulated signal is defined as follows:


The signal is composed of sine wave and impulse functions, shown as figure3.It is decomposed into a series of IMFs by EMD, illustrated as figure 4. The decomposition is polluted by mode mixing, which indicates that oscillations of different time scales coexist in a given IMF, or that oscillations with the same time scale have been assigned to different IMFs.

Figure 3.

Simulated signal

Figure 4.

IMFs obtained by EMD


3. Ensemble empirical mode decomposition

Ensemble EMD (EEMD) was introduced to remove the mode-mixing effect. The EEMD overcomes largely the mode mixing problem of the original EMD by adding white noise into the targeted signal repeatedly and provides physically unique decompositions when it is applied to data with mixed and intermittent scales.

The EEMD decomposing process can be separated into following steps:

1. Add a white noise seriesw(t)to the targeted datax(t), the noise must be zero mean and variance constant, soX(t)=x(t)+w(t).

2. Decompose the data with added white noise into Intrinsic Mode Functions (IMFs) and residue rn


3. Repeat step 1 and step 2 N times, but with different white noise serried wi(t) each time, so


4. Obtain the ensemble means of corresponding IMFs of the decompositions as the final result. Each IMF is obtained by decomposed the targeted signal.


This new approach utilizes the full advantage of the statistical characteristics uniform distribution of frequency of white noise to improve the EMD method. The above signal is decomposed into a series of IMFs by EEMD, which is shown in figure 5. Through adding white noise into the targeted signal makes all scaled continues to avoid mode mixing phenomenon. Comparing the IMF component of the same level, EEMD has more concentrated and band limited components.

Figure 5.

IMFs obtained by EEMD

We consider the following model of a discrete noisy signal:


The vector x represents noisy signal and θ is an unknown original clean signal. zis independent identity distribution Gaussian white noise with mean zero and unit variance. For simplicity, we assume intensity of noise is one. The step of wavelet shrinkage is defined as follows:

  1. Apply discrete wavelet transform to observed noisy signal.

  2. Estimate noise and threshold value, thresholding the wavelet coefficients of observed signal.

  3. Apply the inverse discrete wavelet transform to reconstruct the signal.

The wavelet shrinkage method relies on the basic idea that the energy of signal will often be concentrated in a few coefficients in wavelet domain while the energy of noise is spread among all coefficients in wavelet domain. Therefore, the nonlinear shrinkage function in wavelet domain will tend to keep a few larger coefficients over threshold value that represent signal, while noise coefficients down threshold value will tend to reduce to zero.

In the wavelet shrinkage, how to select the threshold function and how to select the threshold value are most crucial. Donoho introduced two kinds of thresholding functions: hard threshold function and soft threshold function.


Hard threshold function (8) results in larger variance and can be unstable because of discontinuous function. Soft threshold function (9) results in unnecessary bias due to shrinkage the large coefficients to zero. We build the generalized threshold function:

λis threshold value.

When m is even number:


When m is odd number:


When m=1, it is soft threshold function; when m=, it is hard threshold function. When m=2 it is Non-Negative Garrote threshold function. We show slope signal as an example, Figure.6 graphically shows generalized threshold functions for different m. It can be clearly seen that when the coefficient is small, the smaller m is, the closer the generalized function is to the soft threshold function; when the coefficient is big, the bigger m is, the closer the generalized function is to the hard threshold function. As1<m<, generalized threshold function achieves a compromise between hard and soft threshold function. With careful selection of m, we can achieve better denoising performance.

Figure 6.

Generalized threshold function

We derived the exact formula of mean, bias, variance andl2 risk for generalized threshold function.


xN(θ,1)Am(θ)=λϕ(xθ)ϕ(x+θ)xmdx Bm(θ)=λϕ(xθ)+ϕ(x+θ)xmdx

ϕandΦ are density and probability function of standard Gaussian random variable respectively. Then:










MH(λ,θ)=θ+θ[1Φ(λθ)Φ(λ+θ)]+ϕ(λθ)ϕ(λ+θ) ρλH(θ)=1+(θ21)(Φ(λθ)Φ(λθ))+(λ+θ)ϕ(λ+θ)+(λθ)ϕ(λθ)

Mm(λ,θ),SBm(λ,θ) ,Vm(λ,θ) ,ρλm(θ) are the mean, bias, variance and risk of generalized threshold function When m is 1, 2, , they are the mean, bias, variance and risk of the risk of soft, Non-Negative Garrote, hard threshold functions, respectively.

Soft threshold function provides smoother results in comparison with the hard threshold function; however, the hard threshold function provides better edge preservation in comparison with the soft threshold function. The hard threshold function is discontinuous and this leads to the oscillation of denoised signal. Soft threshold function tends to have bigger bias because of shrinkage, whereas hard threshold function tends to have bigger variance because of discontinuity. Non-Negative Garrote threshold function is the trade-off between the hard and soft threshold function. Firstly it is continuous; secondly the shrinkage amplitude is smaller than the soft threshold function.


5. Adaptive threshold values based on EEMD

Threshold value is a parameter that controls the bias and vriance tradeoff of the risk. If it is too small, the estimators tend to overfit the data, then result is close to the input and the estimate bias is reduced but the variance is increased. If the threshold value is too large, a lot of wavelet coefficients are set zero and the estimators tend to underfit the data; the estimate variance is reduced but the bias is increased. The optimal threshold value is the best compromise between variance and bias and it should minimize the risk of the results as compared with noise-free data.

Several methods have been proposed for the determinations of threshold values. The universal threshold, proposed by Donoho and Johnstone, uses the fixed form threshold equal to the square root of two times the logarithm of the length of the signal. LDT, the level dependent threshold, proposed by I.M.Johnstone, and B.W.Silverman, uses a different threshold for each of the levels based on a single formula. Stein Unbiased Risk Estimate (SURE) is an adaptive threshold selection rule. It is data driven and the threshold value minimizes an estimate of the risk. Other threshold values include minimaxi threshold etc. In this paper, an adaptive threshold method is proposed based on EEMD. The threshold values directly relate to the energy of noise on each IMFs. Next, the derivation of adaptive threshold values is initiated by the characteristic of Fractional Gaussian noise (fGn).

fGn is a generalization of white noise. The statistical properties of fGn are controlled by a single parameter H, and the autocorrelation sequence


This can also be defined as:


σ2is the variance of fGn. The value of H is in the range of 0 to 1. The Fourier transform of (18) gives the power spectral density of fGn:


In the decomposing of a given fGn, EMD is worked as a dyadic filter. Restricting to the band-pass IMFs, self-similarity would mean that


Given the self-similar relation (6) for PSDs for band-pass IMFs we can deduce how the variance should evolve as a function of k:


VH[k]is the variance of the IMF index.

According to lots of simulation:


WH[k]denotes the H-dependent variation of the IMF energy. In practice, WH[1]can be estimated from (23), which also gives the model energy of the noisy signal


c1represents the first IMF coefficients.

According to (21)


CH=W^H[1]/βH,the parameter H andβH are given in table 1. Through (25) we can obtain the model energy of noise only signal.


Table 1.

H andβH

According to the relationship between energy and variance WH[k]are given by


For white noise,

H=12  ,  βH=0.719E26

The energies of each IMFs can be defined as:


σn2is the noise energy that can be achieved by the first IMF variance, which can be achieved by (23).

The adaptive threshold value of each IMF can be identified as:


N is the length of signal.

Given these results, a possible strategy for de-noising a signal (with a known H) is generalized as follows:

  1. Decompose the noisy signal into IMFs with EEMD.

  2. Assuming that the first IMF captures most of the noise, estimate the noise level in the noisy signal by computingVkfrom (28).

  3. Discarding the first IMF, for other IMFs, calculate the adaptive threshold value Tk from (29); shrink the coefficients using the Non-Negative Garrote threshold function.

  4. Reconstruct the signal by the shrunken IMFs, obtain the denoised signal.

Figure 7.

The block diagram of the denoising algorithm


6. Results and discussions

To evaluate the performance of the algorithm, Test signal and Clinic noisy ECG signals are processed.

6.1. Test signal

We choose time shifted sine signal which shapes similarly to ECG to test above method; Gaussian White Noise is added as noise, which is zero mean and standard deviation change with the SNR.SNR=10log(var(signal)/var(noise)), var means standard deviation. The SNR of noisy test signals are 5. Figure8 shows the original clean signal; figure9 shows the noisy signal; figure10 shows the denoised signal by the above algorithm, the SNR of which achieve 14. Furthermore, the original characteristic waveform is preserved.

Figure 8.

The clean time shifted sine signal

Figure 9.

The noisy time shifted sine signal

Figure 10.

The denoised time shifted sine signal

6.2. Clinical noisy ECG signal

The ECG signal as Figure.11 illustrates comes from clinical patient. Signal is sampled at 360 Hz; signal length is 1500; the ECG signal is corrupted by noise. Figure12 shows its phase space diagram, which is a plot of the time derivative of the ECG signal against the ECG signal itself. The derivative can accentuate the noisy and high frequency content in signal, so it can better show dramatic improvement after denoising. The noisy ECG signal is processed using the method mentioned above. For the generalized threshold function, m is selected as 2, which is Non-Negative Garrote threshold function. The noisy ECG signal is decomposed into a series of IMFs by EEMD. The first seven IMFs are shown in figure13; the latter seven IMFs are shown in figure 14.The First IMF is discarded owing to predominant noise. Obtain the adaptive threshold value of each IMFs by formula (29). The values are 0.0422, 0.0297, 0.0210, 0.0148, 0.0104, 0.0074, 0.0052, 0.0037, 0.0026, 0.0018, 0.0013, 0.0009, 0.0006. Then shrink the coefficients of each IMFs by the adaptive threshold values and Non-Negative Garrote threshold function. The first shrunken six IMFs are shown in figure15; the latter shrunken seven IMFs are shown in figure16. Reconstruct the signal by the shrunken 13 IMFs and obtain the denoised signal. The filtered ECG signal is illustrated as figure17. The phase space diagram of filtered ECG signal is shown as figure 18. From visual inspection, the ECG signal is much cleaner after being denoised; the original characteristic waveform, especially the sharp Q, R, and S peaks is preserved, without distorting the P and T waves.The results indicate that the method we have proposed significantly reduces noise and well preserves the characteristics of ECG signal.

Figure 11.

Noisy ECG signal

Figure 12.

Phase space diagram of noisy ECG signal

Figure 13.

The first seven IMFs

Figure 14.

The latter seven IMFs

Figure 15.

The first shrunken six IMFs

Figure 16.

The latter shrunken seven IMFs

Figure 17.

The denoised ECG signal

Figure 18.

The Phase space diagram of denoised ECG signal

Another ECG signal as Fig.19 illustrates comes from clinical patient. Signal is sampled at 360 Hz. Length is 1500; the ECG signal is corrupted by noise. Figure20 shows its phase space diagram. The filtered ECG signal is illustrated as figure 21 using the above algorithm. The phase space diagram of filtered ECG signal is shown as figure 22. It is obvious that the noise is reduced.

Figure 19.

The noisy ECG signal

Figure 20.

Phase space diagram of noisy ECG signal

Figure 21.

The denoised ECG signal

Figure 22.

Phase space diagram of the denoised ECG signal


7. Conclusion

In this paper, the adaptive noise removal scheme based EEMD is studied for ECG signal. EEMD reduces the mode mixing existing in EMD. Better filtering performance for EEMD is achieved. The adaptive threshold values guarantee the better estimation of noise. We have demonstrated that the algorithm is useful for removing noise from clinic ECG signal. It not only decreases the signal noise, but also the ECG waveform is better conserved. Application of EEMD with adaptive threshold value also has potential for other biomedical signals or other fields.



This work was supported in part by the public welfare Program of Zhejiang Province Science and technology department under the Grant: 2010C31022.


  1. 1. BrijN.SinghArvindK. 2006 Optimal selection of wavelet basis function applied to ECG signal denoising, Digital Signal Processing, 16 3 275287 .
  2. 2. AganteP. M.MarquesJ. P. 1999 ECG noise filtering using wavelets with soft-thresholding methods, Computers in Cardiology, 1999, 535538 .
  3. 3. EnriqueC. B.HartmannE. 2003 ECG Front-End Design is Simplified with MicroConverter, Analog Dialogue,37 4
  4. 4. DonohoD. L.JohnstoneI. M. 1994 Ideal spatial adaptation by wavelet shrinkage, Biometrika, 81 3 425455 .
  5. 5. DonohoD. L. 1995 De-noising by soft-thresholding, IEEE Trans Inform Theory, 14 3 612627 .
  6. 6. GaoH. Y. 1998 Wavelet shrinkage denoising using the non-negative garrote, J. Comput. Graph. Statist, 7 4 469488 .
  7. 7. PrasadV. V. K. D. V.SiddaiahP.RaoB. P. 2008 Denoising of Biological Signals using a New Wavelet Shrinkage Method, IEEE region 10 and the Third international Conference on Industrial And Information Systems, 15 .
  8. 8. KumariR. S. S. .ThilagamanimalaA. .SadasivamV. 2008 ECG signal interferences removal using wavelet based CSTD technique, Proceedings- International Conference on Computational Intelligence and Multimedia Applications, 530534 .
  9. 9. Suyi LiYanju JiGuangdaLiu 2009 Optimal wavelet basis selection of wavelet shrinkage for ECG de-noising, International Conference on Management and Service Science, 14 .
  10. 10. PoornachandraS. 2008 Wavelet-based denoising using subband dependent threshold for ECG signals, Digital Signal Processing, 18 1 4955 .
  11. 11. SadAbadi. H.GhasemiM.GhaffariA. 2007 A mathematical algorithm for ECG signal denoising using window analysis, Biomedical papers- Palacky Univesrisy Inolomouc, 151 1 7378 .
  12. 12. ChangKang-Ming 2010 Arrhythmia ECG Noise Reduction by Ensemble Empirical Mode Decomposition, sensors, 60636080 .
  13. 13. HuangN. al. 1998 The empirical mode composition and the Hilbert spectrum for nonlinear and non-stationary time series analysis, Proceeding of R.Soc.Lond.A, 454 903995 .
  14. 14. LiangH. L. et al 2000 Artifact reduction in electrogastrogram based on the empirical model decomposition method, Medical and Biological Engineering and Computing,38 1 3541 .
  15. 15. FlandrinP. .RillingG. .GoncalvesP. 2003 Empirical mode decomposition as a filter bank, IEEE Signal Processing Letter, 11 2 112114 .
  16. 16. FlandrinP.RillingG. .GoncalvesP. 2004 Empirical mode decomposition as a filter bank, IEEE Signal Processing Letters, 11 2 112114 .
  17. 17. FlandrinP. .RillingG.GoncalvesP. 2004 Detrending and denoising with empirical mode decomposition, European Signal Processing Conference, 15811584 .
  18. 18. FlandrinP. .RillingG. .GoncalvesP. 2005 Empirical mode decomposition, fractional Gaussian noise and Hurst exponent estimation, Proceedings of IEEE International Conference on Acoustics, Speech and Signal Processing, 4 489492 ..
  19. 19. WuZ. H.HuangN. E. 2009 Ensemble Empirical Mode Decomposition: A Noise Assisted Data Analysis Method, Advances in Adaptive Data Analysis, 141 .
  20. 20. ChangKang-Ming 2010 Ensemble empirical mode decomposition based ECG noise filtering method, International Conference on Machine Learning and Cybernetics, 210213 .
  21. 21. BinweiWeng.Blanco-VelascoM.EarnerK. E. 2006 ECG Denoising Based on the Empirical Mode Decomposition, 28th IEEE Annual International Conference of Engineering in Medicine and Biology Society, 14 .
  22. 22. LihuangShe.ZhongqiangXu.ShiZhang.YuningSong. 2010 De-noisng of ECG based on EMD improved-thresholding and mathematical morphology operation, 3rd International Conference on Biomedical Engineering and Informatics, 838842 .

Written By

Zhao Zhidong, Luo Yi and Lu Qing

Submitted: October 7th, 2010 Published: July 5th, 2011