Denoising the ECG Signal Using Ensemble Empirical Mode Decomposition

-In this paper, a novel electrocardiogram (ECG) denoising method based on the Ensemble Empirical Mode Decomposition (EEMD) is proposed by introducing a modified customized thresholding function. The basic principle of this method is to decompose the noisy ECG signal into a series of Intrinsic Mode Functions (IMFs) using the EEMD algorithm. Moreover, a modified customized thresholding function was adopted for reducing the noise from the ECG signal and preserve the QRS complexes. The denoised signal was reconstructed using all thresholded IMFs. Real ECG signals having different Additive White Gaussian Noise (AWGN) levels were employed from the MIT-BIH database to evaluate the performance of the proposed method. For this purpose, output SNR (SNRout), Mean Square Error (MSE), and Percentage Root mean square Difference (PRD) parameters were used at different input SNRs (SNRin). The simulation results showed that the proposed method provided significant improvements over existing denoising methods.

INTRODUCTION Empirical Mode Decomposition (EMD) is a powerful algorithm for splitting non-stationary signals [1]. The goal of EMD is to represent the signals as sums of zero-mean oscillating components, named Intrinsic Mode Functions (IMFs) via a sifting process [1]. Signal reconstruction is achieved by summing all IMFs and the residual. EMD techniques have been used for signal denoising, and specifically, those based on thresholding were developed in [2][3][4][5][6][7][8][9][10]. A denoising technique can be based on signal estimation using all the previously thresholded IMFs [3][4][5][6][7][8][9][10][11][12][13]. Since the useful information of the signal is often concentrated on lowfrequency IMFs (last IMFs) and the noise is primarily located in high-frequency IMFs (first IMFs), another approach is to perform denoising by partial construction of the signal with the IMFs that contain useful information [2,14]. Authors in [2] proposed a method for estimating the energy of noisy IMFs from a theoretical model and IMFs' energies of the test signal, and the signal was reconstructed partially by using only the IMFs that contained useful information, eliminating those that essentially maintained noise. In [14], an EMD consecutive mean square error (EMD-CMSE) method was developed for IMF selection. Since Electrocardiogram (ECG) signals are nonstationary and nonlinear methods, a wavelet thresholding technique was proposed in [15,16] without preserving ECG components such as QRS complexes [17]. A customized thresholding function was proposed in [18] to overcome the disadvantages of hard and soft thresholding functions [15,16]. EMD combined with a customized thresholding function (EMD-Custom) can be useful for reducing noise and significantly improve the results of EMD soft and hard thresholding [3,4,8]. To overcome the drawbacks of EMD such as mode mixing (presence of oscillations of different amplitudes in one mode) [1], a variant of the EMD algorithm called Ensemble Empirical Mode Decomposition (EEMD) was proposed in [19]. EEMD was based on averaging the modes obtained from EMD applied to several trials of Additive Gaussian White Moise (AWGN) added to the signal. The EEMD decomposition resolved efficiently the mode mixing and has been widely used in noise reduction. Moreover, EEMD achieved better denoising performance than EMD with a reduced number of trials.
The main objective of this paper is to propose a denoising method for ECG signals using EEMD and a modified custom thresholding function. The basic principle of the proposed method is to decompose the noisy signal into a series of IMFs using the EEMD algorithm and then use the modified custom thresholding function. The denoised signal is reconstructed using all the thresholded IMFs. Denoising experiments were used on MIT-BIH ECG signals to assess the performance of the proposed method [20] with different AWGN levels. Three standard parameters were used at different input SNR (SNRin): output SNR (SNRout), Mean Square Error (MSE), and percentage Root Mean square Difference (PRD). The proposed method is compared to EMD-CMSE [14], EMD-Custom [8], and wavelet [15,16] denoising methods.
II. WAVELET DENOISING Wavelet denoising is a powerful tool for removing the noisy component of a corrupted data sequence [15,16]. Its • Decompose: Choose a wavelet and a level N. Compute the wavelet decomposition of the signal at level N.
• Threshold detail coefficients: For each level from 1 to N, select a threshold and apply soft thresholding to the detail coefficients.
• Reconstruct: Compute wavelet reconstruction using the original approximation coefficients of level N and the modified detail coefficients of levels 1 to N.
This work used the Symlet wavelet (sym8), while thresholding can be performed by using the soft or hard thresholding of the input signal. Wavelet soft thresholdingbased denoising technique was applied, the signal was divided into a set of approximations, and detail coefficients were thresholded using soft thresholding. The universal threshold estimator proposed in [15,16] was used.
III. EMD-CUSTOM THRESHOLDING EMD-custom suggests the decomposition of a noisy signal to noisy IMFs via the EMD algorithm [1]. After that, the noisy denoted IMFs were thresholded using a customized thresholding function [18]. Finally, the denoised signal was reconstructed using all thresholded IMFs. The outline of the EMD-Custom [8] method is demonstrated in Figure 1. Outline of the EMD-custom.
IV. EEMD ALGORITHM The EEMD method [19] overcomes the "mode mixing" problem of the EMD method and consists of: • Adding a white noise ‫ݓ‬ ሺ‫ݐ‬ሻ to the original signal ‫ݔ‬ሺ‫ݐ‬ሻ: where N e is the ensemble number.
• Decomposing the noisy signal ‫ݔ‬ ሺ‫ݐ‬ሻ into IMFs by the EMD method to obtain the corresponding IMF of each order denoted ‫ݖ‬ N is the number of IMFs, and 1 ݅ ܰ.
• Calculating the mean of the corresponding IMFs as the final signal IMF, by: V. PROPOSED DENOISING METHOD The proposed method suggests the decomposition of the noisy signal to noisy IMFs via the EEMD algorithm [19]. Afterward, the noisy IMFs denoted as ݂ ሺ‫ݐ‬ሻ are thresholded using a modified custom thresholding function. Let ‫ݏ‬ሺ‫ݐ‬ሻ be a noisy signal given as: where ‫ݔ‬ሺ‫ݐ‬ሻ is the noiseless signal and ‫ݓ‬ሺ‫ݐ‬ሻ is an independent noise of finite amplitude. The proposed EEMD-Custom method consists of the following steps: • Decompose the noisy signal ‫ݏ‬ሺ‫ݐ‬ሻ by the EEMD algorithm to extract the noisy IMFs ݂ ሺ‫ݐ‬ሻ.
• Apply a modified custom thresholding function on the noisy IMFs ݂ ሺ‫ݐ‬ሻ . A modification of the customized thresholding function [18] is introduced to define a new one as: where 0 ൏ ߛ ൏ ߬ , 0 ߙ 1 and ߬ is the universal threshold reported in [15,16] defined as: where C is a constant depending on the type of the signal, n is the length of the signal, and i E is given by: where ‫ܧ‬ ଵ ଶ is the energy of the first IMF, obtained as: where ߠ ൌ 0.719 and ߩ ൌ 2.01 are empirically calculated constants [2].
• Reconstruct the signal using: where ‫ݎ‬ሺ‫ݐ‬ሻ is the residual signal.
VI. RESULTS AND DISCUSSION In this section, the results of the proposed denoising method are assessed compared to three denoising methods: wavelet denoising [15,16], EMD-CMSE [14], and EMD-Custom [8]. The proposed EEMD-Custom algorithm was applied to 8 real biomedical ECG signals using the MIT-BIH database [20], labeled 111m, 112m, 113m, 114m, 115m, 116m, 121m, and 122m. An AWGN was added to each clean ECG signal at different SNRin levels: -4dB, 0 dB, 4 dB, 8 dB, and 12 dB. The data length was 2048. At first, each noisy ECG signal was decomposed into a series of IMFs via the EEMD algorithm, and subsequently, the modified customized thresholding function (4) was utilized to threshold all IMFs for reducing noise and preserve QRS complexes. Thresholding can be used to detect QRS complexes [21]. So, the combination between EEMD and the modified customized thresholding function can be considered as an R peak preservation technique, as the IMFs containing high-frequency signal information (QRS complex) were thresholded by the modified customized thresholding function to preserve the QRS complexes.
Finally, the denoised signal was reconstructed using all thresholded IMFs. Three standard parameters, SNRout, MSE, and PRD, were used to evaluate the capabilities of the proposed method at different SNRin, which were respectively given as: The performance of the proposed EEMD-Custom method was evaluated for different values of ensemble number Ne (10,  20, 30, 40, 50, 100, 150, 200, 250, 300). Figure 2 depicts the SNRout for different values of Ne at SNRin=4dB on ECG record 112m. Figure 3 displays the plot of SNRout for different values of Ne at SNRin=4dB on ECG records 114m, 116m, and 122m. As it can be observed, the SNRout increases as Ne increases. Moreover, the proposed method achieved a significant improvement when Ne was high. Based on the results, an ensemble number of 200 was selected as the best EEMD parameter. Furthermore, as the results of the proposed EEMD-Custom method were influenced by the α value in (4), an appropriate value of α should be determined. SNRout of the proposed EEMD-Custom in terms of Ne, SNRin=4dB, for the ECG 112m signal.  The value of the ensemble number was Ne=200, the SNRin was 8dB, and the value of α was determined by trials between 0.1 and 1, with a fixed step of 0.1. The values of a where the SNRout was maximum, were 0.7, 0.3, 0.5, 0.5, 0.5, 0.5, 0.3, and 0.5 for ECG records 111m, 112m, 113m, 114m, 115m, 116m, 121m, and 122m respectively. The α parameter depended on SNRin and the type of ECG signal. Fig. 4.
SNRout of the proposed EEMD-Custom in terms of α, SNRin=8dB, for different ECG signals.
The SNRout of five ECG signals at various SNRin values is presented in Table I to provide quantitative analysis. The proposed EEMD-Custom denoising method on the ECG record 112m reached an improvement of SNR equal to 6.95dB at SNRin=-4dB compared to the wavelet denoising method. An improvement of 3.89dB was obtained at SNRin=0dB compared to EMD-CMSE, while an improvement of 4.46dB was obtained at SNRin=-4dB compared to the EMD-Custom. The proposed EEMD-Custom denoising method improved SNR by 6.36dB, 4.34dB, and 3.87dB on the ECG 121m at SNRin=-4dB compared to wavelet denoising [2], EMD-CMSE [5,6] and EMD-Custom [8], respectively. As it can be noted, the proposed method worked better for high and low values of SNRin. Moreover, the values of MSE and PRD of ECG signals for different SNRin values are presented in Tables II and III, respectively. The quality of the reconstructed ECG signal was evaluated in terms of PRD, SNRout, and MSE. The MSE and PRD values should be small for better denoising and preserving ECG signal details. Lower PRD and MSE values indicate better preservation of physiological information in ECG signal processing [17]. As it can be noted, the proposed EEMD-Custom method provided less MSE and PRD than the other methods.   [2], EMD-CMSE [5,6], EMD-Custom [8], and the proposed EEMD-Custom method. The proposed EEMD-Custom method gave better results in all cases.  The clean ECG records 112m and 122m, their noisy versions, and denoised ECG records using the proposed EEMD-Custom at SNRin=8dB with Ne=200 are depicted in Figures 9 and 10 respectively. It can be noted that the proposed method removes noise successfully. Figure 11 depicts the denoised ECG record 122m using the wavelet method at SNRin=8dB. A careful comparison of the denoised signals in Figures 10 and 11 shows that the proposed method preserves morphological information of ECG better than the wavelet denoising method. The results also indicate that the proposed method can remove noise from real ECG signals and provide significant improvements in denoising performance. The computational complexity of EEMD can be expressed as: ܶ ாாெ ൌ ܰ * ܶ ாெ (12) demonstrating that EEMD takes more time than EMD.

VII. CONCLUSION
This paper presented a novel denoising method based on the EEMD algorithm for noise removal from ECG signals by introducing a modified custom thresholding function. Three standard parameters SNRout, MSE, and PRD were used for evaluating the capabilities of the proposed method at different values of SNRin. The simulation results on MIT-BIH ECG signals showed clearly that the proposed method provided better SNRout and lesser MSE and PRD compared to other well-known denoising methods. Therefore, the proposed method is characterized as highly suitable for denoising ECG signals.