

ORIGINAL ARTICLE 

Year : 2021  Volume
: 11
 Issue : 2  Page : 100107 

Electrocardiogram signals denoising using improved variational mode decomposition
Vikas Malhotra, Mandeep Kaur Sandhu
Department of Electronic and Communication Engineering, University School of Engineering and Technology, Rayat Bahra University, Mohali, Punjab, India
Date of Submission  29Feb2020 
Date of Decision  22Apr2020 
Date of Acceptance  24May2020 
Date of Web Publication  24May2021 
Correspondence Address: Vikas Malhotra 18B, Jagdish Colony, Rajpura Road, Patiala, Punjab India
Source of Support: None, Conflict of Interest: None
DOI: 10.4103/jmss.JMSS_17_20
Background: Electrocardiogram (ECG) plays a vital role in the analysis of heart activity. It can be used to analyze the different heart diseases and mental stress assessment also. Various noises, such as baseline wandering, muscle artifacts and power line interface disturbs the information within the ECG signal. To acquire correct information from ECG signal, these noises should be removed. Methods: In the proposed work, the improved variational mode decomposition (IVMD) method for the removal of noise in ECG signals is used. In the proposed method, the weighted signal amplitude integrated over the timeframe of the ECG signal varies the window size during decomposition. Raw ECG data are extracted from 10 subjects and ECG data are also taken from the MIT BIH database for the proposed method. Results: The performance comparison of traditional variational mode decomposition (VMD) and the proposed technique is also calculated using mean square error, percentage root mean square difference, signal to noise ratio and correlation coefficient. The extracted highest signal to noise ratio (SNR) value of acquired ECG signals using traditional VMD is 42db whereas highest value of signal to noise ratio (SNR) using improved VMD (IVMD) is 83db. Conclusion: The proposed IVMD technique represented better performance than traditional VMD for denoising of ECG signals.
Keywords: Denoising, electrocardiogram, variational mode decomposition
How to cite this article: Malhotra V, Sandhu MK. Electrocardiogram signals denoising using improved variational mode decomposition. J Med Signals Sens 2021;11:1007 
Introduction   
Electrocardiogram (ECG) patterns reflect the electrical activity produced by the heart. It accumulates a ton of information for human heart wellbeing.^{[1]} ECG signal is commonly weak and it is mostly affected by noise. Noise is an undesirable component. Noise does not store any heartrelated information.^{[2]} Noise is the basic reason for the error in analysis measurement. Different types of noises are baseline wander noise (0.15–3 Hz) produced because of breath, electromyography (EMG) or muscle artifacts created because of muscle constriction, power line interface (PLI) (50–60 Hz) produced because of power supply, and electrosurgical noise (100 kHz to 1 MHz) produced because of others clinicalrelated machines. Electrode contact noise created because of inadequate closeness among electrodes and skin.^{[3]} However, the most widely recognized noises are PLI, baseline wandering, and motion artifacts.^{[4]} Thus, for accurate and reliable analysis, these noises should be removed from the corrupted signal. The techniques to denoise the ECG signal can be separated into three classifications: (1) frequency domain, (2) spatiotemporal technique, and (3) statistical method. Distinctive decompositions, for example, empirical mode decomposition (EMD), variational mode decomposition (VMD), and ensemble EMD (EEMD), are used in frequencydomain method to denoise the ECG signal. Different neural networks such as principal component analysis (PCA) and independent component analysis are used in the statistical method.
Various filters such as median filter, adaptive filter, and lowpass filter are also used under the spatiotemporal method.^{[5]} Error in reference signal reduces the effectiveness of the adaptive filter. Edges of the ECG signals are not protected in the Wavelet method. The neural network system and principal component analysis (PCA) do not represents good performance for noise cancellation in a single channel ECG Signal.^{[6]}
Because of the variety in the ECG signal range, highpass filtering can distort the ECG waveform.^{[7]} It is hard to remove EMG noise using various filters, such as infinite impulse response and finite impulse response filter, because of overlap ECG recurrence use, i.e., 20–200 Hz.^{[8]}
Numerous analysts used various novel techniques for ECG denoising. Yadav et al.^{[9]} proposed a nonlocal wavelet transform (NLWT) technique to denoise the ECG signal distorted by additive white Gaussian noise (AWGN). This NLWT technique outperformed the nonlocal mean (NLM) and hybrid EMD methods, but complexity is increased because of adaptive thresholding.
Cuomo et al.^{[10]} used a recursive filtering technique (Gaussian filter based) to remove the noises, such as electrical PLI and baseline drift noise in realtime ECG signals. The result represented that the time and memory utilization are less when contrasted with other filtration techniques, such as bandpass filter, lowpass filter, Kalman filter, doublestage moving average filter, and single and doublestage median filter. Tobon and Falk^{[11]} proposed an adaptive spectrotemporal technique using a bandpass filter to remove noises such as baseline wandering and muscle artifacts from synthetic ECG signal as well as from long haul recorded ECG signal, but the spectrotemporal method takes twice the computational time when contrasted with standard techniques (EMD and wavelet). Hesar and Mohebbi^{[12]} used marginalized particle extended Kalman filter (MPEKF) to denoise the MITBIH typical sinus rhythm ECG signals. The ECG signals are altered with artificial white Gaussian noise, muscle artifacts, pink noise, and brown noise at various input signaltonoise ratios (SNRs) in MPEKF method. Underestimated MPEKF is much slower in speed than in extended kalman filter (EKF)/Kalman smoother denoising algorithm (EKS). The backtracking issue in EKS provided smooth but not the best result. Lahmiri^{[13]} compared two hybrid denoising systems, for example, EMDDWT and VMDDWT. Gurjit^{[14]} evaluated the performances of various windows (Hamming, Rectangular, Welch, Kaiser, and Hanning) for denoising ECG signals for various noises (power noise, muscle noise, and EMG noise).
El B'charri et al.^{[15]} used a dualtree wavelet transform with an appropriate modified threshold function for denoising the synthetic ECG. The synthetic ECG signal is combined with various noises (colored, white, baseline wander, electromyogram, and motion artifacts), but some distortion because of flicker noise is present in the denoised signal. Oliveira et al.^{[16]} proposed a novel discrete wavelet transformbased technique without a thresholding method for the removal of PLI noise in the ECG signal. This novel discrete wavelet transform technique presented better results over the notch filter, but the performance of a novel discrete wavelet transform technique relies on adequate sampling frequency and decomposition level.
EMD is generally used for nonstationary and nonlinear signals. It is usually implemented by most of the researchers. The performance of EMDbased method is superior to the wavelet technique.^{[17]} However, the EMD technique experienced the issue of mode mixing and loss of evolutionary trend information in the final residue. Even though the problem of mode mixing has been resolved in EEMD, missing out of evolutionary trend information in final residue is still an issue in the EEMD method. In addition, CEEMDAN with wavelet technique is used to evacuate the mode mixing issue of EMD technique. Even though the CEEMDAN with wavelet method represented better results than EMD, the impotence of wavelet technique to the removal of baseline wandering noise in the realtime ECG signal is a disadvantage.^{[18]} EMDbased method is useful, but the drawback of this method is that it is incapable to estimate the accurate morphological QRS complexes.^{[19]}
Prabhakararao and Manikandan^{[20]} suggested using VMD technique for ECG denoises, instead of other denoising techniques such as EMD, DFT, and DWT methods, as VMD has better capability to reduce noises. The VMD technique is appropriate for the ECG signal examination. However, existing VMD includes smooth windowing, for example, the static window of little and fixed size that works well on the shorter chunks of signals, over which the signals are almost stationary. Due to usage of small window size in existing VMD algorithm, the processing time of algorithm increases. This limitation can be minimized using the dynamic window of variable size. In the proposed work, the window size is being made as a function of weighted signal amplitude integrated over the timeframe.
Variational mode decomposition
Dragomiretskiy and Zosso^{[21]} proposed the VMD method. VMD is a nonrecursive signal processing technique. The variational issue is to discover the mode functions (modes) of a signal with the end goal that the sum of the bandwidth of every mode is least, and the requirement is that the sum of the bandwidth of every mode is equivalent to the original signal.^{[21]}
For the variational problem, VMD breaks down the signal into the discrete number of inherent modes. Every mode has explicit sparsity properties in the frequency domain, and it is compressed around a center frequency.
The bandwidth of every mode is dictated by the following criteria.
 The singlefrequency spectrum of every mode is controlled by the Hilbert transform of every mode i(k). Symmetrical pair for every Intrinsic mode function (IMF) is a stage moved by 90° through Hilbert transform. Every IMF set and its symmetrical pair can be utilized to assess the momentary variation in magnitude and frequency of the IMF as for time. An analytical function is shaped after Hilbert change as demonstrated as follows:
Where i (k) is intrinsic mode function, *is the convolution, δ(t) is the unit impulse function (Dirac distribution), and j is an imaginary part.
The lowfrequency components represented by mode i with a higher value of k.
 The frequency spectrum of each intrinsic mode function (mode) is shifted to baseband (center frequency) by multiplying the analytical function:
Where w_{k} is the center frequency.
The bandwidth of each intrinsic mode function i (k) is determined by the integral of the square of the time derivative of this frequency translated signal.
Subjected to:
Where ∂t is partial derivative and x(t) is input signal to be decomposed.
Now to solve the optimizing problem (i.e., a minimum point) of Eq. 1, Dragomiretskiy and Zosso proposed the Lagrangian function and penalty term for Eq. 1 as given below:
Where λ = Lagrangian multiplier and α = penalty parameter, and by increasing it, the bandwidth of IMF is decreased.
To obtain the corresponding updated equation of i_{K }and W_{K}, an alternate direction method of multipliers (ADMM) is used. The updated equation of each mode in the frequency domain is obtained as given below:
Where ^ are frequency domain variables and n + 1 is the number of iteration.
This Eq. 3 is the result of the current residue considered as the Wiener filtering with the signal prior
Similarly, the center frequency is transferred into the frequency domain and the update equation is given below:
Dual ascent for all ω ≥0, Lagrangian multiplier (λ) is updated as:
Where τ is timestep of the dual ascent.
Repeat the upgradation of Eq. 3, 4, 5 until
Where ɛ is the tolerance of the convergence criterion, and in the VMD algorithm, it required to set manually.
Now, adaptive decomposition of the signal band can be used due to frequency domain characteristics.
Before performing the VMD algorithm, the Gaussian window is simply applied to the input signal x (t). By simple addition after decomposition, the individual modes can be sewed together without error amplification, instead of window division. Because window division affects, the reconstruction fidelity closes to the window borders. The flowchart of traditional variational mode decomposition is shown in [Figure 1].
Improved Variational Mode Decomposition   
In improved VMD (IVMD), the estimation of K is assessed by estimation of r with subject to the threshold ceiling estimation of 0.05, where r is the correlation coefficient (CC) of Y and X. The CC can be represented as:
r = cov (Y, X)/std (X) std (Y)^{[22]} (7)
Where cov (Y, X) is the covariance between X and Y, X is the combined modal segments, and Y is the original input signal.
The idea of the dynamic window involved an element of weighted signal amplitude integrated over a period of time, and it is implemented using inverse shorttime Fourier transform (STFT) and STFT rather than traditional discrete Fourier transform. The output of the STFT function is complex STFT coefficients, a time vector, and a frequency vector. STFTself does not improve the frequency or time resolution. The dynamic window is implemented by the Hamming window and Blackman–Harris window. Hamming window cancels the nearest side lobes for the better results than other windowing techniques. The Blackman–Harris window has good side lobe compression. Blackman–Harris breaks our signal in segments that are processed independently and added to the other processed segments using the WOLA algorithm. This technique helps avoid the anomalies on boundaries encountered in the VMD algorithm.
Improved algorithm
 Generate the analysis window and the synthesis window:
 awin = blackmanharris (wlen, “periodic”);
 swin = hamming (wlen, “periodic”);
Where wlen is the window length.
 Generate the zeros vector:
 Equal to the length of the signal (xlen) to save the successive results obtained from each processed window segment
 Equal to the length of the signal (xlen) to save the successive modes (number of modes had been calculated earlier) results obtained from each processed window segment.
 Calculate the number of window frames to be processed.
L = 1+fix ((xlenwlen)/hop)
where hop is the shifting parameter to move to the next window.
 Note: these windows overlap for the “hop” number of points in the signal.
 For each window:
 Generate the window part by multiplying each wlen long part of the signal by an analysis window
Signal (1+l*hop: wlen + l * hop).*awin
 Process it with the traditional VMD method
 Save the processed signal window by adding it to the zero vectors after multiplying it with the synthesis window “swin” as it has been truncated along sides in VMD processing and we want smooth WOLA addition of the overlapping processed signal segments
 Do the same for all the modes of the VMD processed windowed signal.
 Now revert the amplitude change induced by a window function (W0) by:
 W0 = sum (awin * swin)
 Processed signal = Processed signal/W0
 Processed signal modes = Processed signal modes/W0.
Experimental Work   
Noisy ECG data acquired from 10 subjects (between age 30 and 35) and ECG data from the MITBIH database are also used for the proposed algorithm. The signal's duration is taken as 10 s and sampled at a sampling frequency of 720 Hz, with a resolution of 10 bits per sample. The 118 and 119 signals of noise stress test data taken from the MITBIH database are already altered with three different types of noises, i.e., baseline wander, muscle (EMG) artifact, and electrode motion artifact, whereas other MITBIH database signals (100, 101, and 102) are altered with electrode motion (em) noise using nstgen() script with different noise levels. The proposed IVMD is used for decomposition for all these ECG signals. The noises are removed by eliminating the lowest and the highest IMF functions after decomposition using both VMD as well as IVMD technique. MATLAB R2019a platform is used for all data processing.
Results and Discussion   
The four parameters, i.e., mean square error (MSE), percentage root mean square difference (PRD), SNR, and CC, are used to investigate the performance of proposed IVMD method. MSE, percentage root mean square, and CC at the different SNR of the ECG signals are taken from the MITBIH database. SNR parameter is extracted from acquired ECG signals of 10 subjects.
If x(n) is original signal, x_{n}(n) is noisy signal, and y(n) is denoised ECG signal, N is the length of the ECG signal, the parameters for performance evaluation can be expressed as follows:
Mean square error
To estimate the original signal, the filtering technique's accuracy has been traced by the MSE. The energy of the error signal in the noise removal process is generally defined by the MSE. For better estimation of the original signal and better protection of signal details, the MSE value is generally lower.
Percentage root mean square difference
It is generally used for the detection of the efficiency of the noise removal technique during signal extraction with the protection of the necessary medical information within the signal. The superior preservation of necessary physiological information in the denoised ECG signal shows a lower value of PRD.
Signaltonoise ratio
The energy of the signal concerning related noise is called the SNR. This SNR parameter valve should be higher for a better denoising method. It can be defined as:
Correlation coefficient
It represents the statistical relationship between the original signal and the denoised signal. A higher value of the CC of a method represents the better reinstate property of the original signal by that method.
The graphical representation of the CC of arrhythmia signal (118) taken from MITBIH database using VMD and IVMD method at different SNR is shown in [Figure 2]. Similarly, the graphical representations of the MSE and PRD of arrhythmia signal (118) taken from MITBIH database using VMD and IVMD method at different SNR are shown in [Figure 3] and [Figure 4], respectively. The graphical representation of the SNR of acquired signals using VMD and IVMD method at different SNR is shown in [Figure 5]. The result of noisy acquired ECG signal [Figure 6] after denoising using VMD and IVMD is represented in [Figure 7] and [Figure 8], respectively. It can be seen that IVMD represented better results as compared to VMD decomposition.  Figure 2: Graphical representation of the correlation coefficient using variational mode decomposition and improved variational mode decomposition process at different signaltonoise ratio of signal 118.
Click here to view 
 Figure 3: Graphical representation of the mean square error using variational mode decomposition and improved variational mode decomposition process at different signaltonoise ratio of signal 118
Click here to view 
 Figure 4: Graphic representation of the percentage root mean square difference using variational mode decomposition and improved variational mode decomposition process at different signaltonoise ratio of the signal 118
Click here to view 
 Figure 5: Graphic representation of the signal to noise ratio of the acquired electrocardiogram signals after using traditional variational mode decomposition and improved variational mode decomposition process
Click here to view 
 Figure 7: Denoised electrocardiogram signal after using the traditional variational mode decomposition
Click here to view 
 Figure 8: Denoised electrocardiogram signal after using the improved variational mode decomposition
Click here to view 
The minimum extracted values of PRD and MSE and the highest extracted value of CC of proposed IVMD method for MITBIH ECG data signals are 71.63, 0.191, and 0.952, respectively, as shown in [Table 2]. The minimum extracted values of PRD and MSE and the highest extracted value of the SNR of traditional VMD technique for MITBIH ECG data signals are 83.87, 0.229, and 0.852, respectively, as also shown in [Table 2]. In addition, for acquired ECG data, proposed VMD represented better result than traditional VMD technique as the highest extracted value of the SNR of traditional VMD is 42 dB and the highest extracted value of the SNR of improved variational mode decay is 83 dB as shown in [Table 1]. As compared to existing methods such as EMD with adapting switching filter method,^{[19]} periodic nonlinear mean filter method,^{[8]} and EMD with NLM method,^{[6]} the proposed method represented better results with the lowest value in terms of MSE. The proposed method still involves the limitation of the Fourier spectrum, i.e., in the Fourier spectrum, different components cannot be separated. However, the proposed method can be used for ECG analysis in the future to find various diseases, arrhythmia with enhanced performance.  Table 1: Signaltonoise ratio after variational mode decomposition and improved variational mode decomposition processing of acquired noisy real electrocardiogram data
Click here to view 
Conclusion   
This IVMD represented better results than traditional VMD. It is increasingly proficient to utilize this method for noise removal in ECG data.
Financial support and sponsorship
None.
Conflicts of interest
There are no conflicts of interest.
Vikas Malhotra received his B.E degree in Electronics and Communication (ECE) in the year 2005 from Shaheed Udham Singh College of Engineering & Technology, Punjab Technical University, Punjab, M.E. degree in Electronics and Communication (ECE) in the year 2014. He is currently a research scholar with the University School of Engineering and Technology (USET), Department of Electronics and Communication (ECE), Rayat Bahra University (RBU), Mohali, Punjab. His research interest includes biomedical signal processing, Embedded system.
Email: [email protected]
Mandeep Kaur Sandhu Mandeep Kaur Sandhu received her Bachelor's degree in Electronics and Communication Engineering from Punjabi University and the Masters degree from Punjabi University in 2005 and 2007 respectively. She has done her Ph.D. in the Department of Electrical and Electronics Engineering, Maharishi Markandeshwar University (MMU), Mullana, India in the year 2018. Presently, she is working as a Assistant Professor in Electronics & Communication Engineering department, University School of Engineering and Technology (USET), RayatBahra University (RBU), Mohali. Her research interest includes Optical Networks and Wireless Networks, Neural networks.
Email: [email protected]
References   
1.  Sahoo S, Biswas P, Das T, Sabut S. Denoising of ECG signal and detection using Hilbert transform and adaptive thresholding. Process Technol 2016;25:6875. 
2.  Wing Z, Wan F, Wong CM, Zhang L. Adaptive Fourier decomposition based ECG denoising. Comput Biol Med 2016;77:195206. 
3.  Berkaya SK, Uysal AK, Uysal ES, Gunal ES, Ergin S. A survey on ECG analysis. Biomed Sig Process Control 2018;43:21635. 
4.  Tayel MB, Eltrass AS, Ammar AI. A new multistage combined kernel filtering approach for ECG noise removal. Electron Cardiol J 2017;51:26575. 
5.  Tian X, Li Y, Zhou H, Li X, Chen L, Zhang X. Electrocardiogram signal denoising using extremepoint symmetric mode decomposition and nonlocal mean. Sensors 2016;16:10. 
6.  Kumar S, Panigrahy D, Sahu PK. Denoising of electrocardiogram signal by using empirical mode decomposition with nonlocal mean technique. Biocybern Biomed Eng 2018;38;297312. 
7.  Gupta P, Sharma KK, Joshi SD. Baseline wander removal of electrocardiogram signals using multivariate empirical mode decomposition. IEEE Health Technol Lett 2015;2:1646. 
8.  Lee YD, Hwang D. Periodicitybased nonlocal means denoising method for electrocardiography in low SNR nonwhite noisy conditions. Biomed Sig Process Control 2018;39:28493. 
9.  Yadav SK, Sinha R, Bora PK. Electrocardiogram signal denoising using nonlocal wavelet transform domain filtering. IET Sig Process 2015;9:8896. 
10.  Cuomo S, Pietro GD, Farina R, Galletti A, Sannino G. A revised scheme for realtime ECG signal denoising based on recursive filtering. Biomed Sig Process Control 2016;27:13444. 
11.  Tobon DP, Falk TH. Adaptive spectrotemporal filtering for electrocardiogram signal enhancement. IEEE J Biomed Health Inform 2018;22:2. 
12.  Hesar HD, Mohebbi M. ECG denoising using marginalized particle extended kalman filter with automatic particle weighting strategy. IEEE J Biomed Health Inform 2017;21:3. 
13.  Lahmiri S. Comparative study of ECG signal denoising by wavelet thresholding in empirical and variational mode decomposition domains. Health Technol Lett 2014;1:1049. 
14.  Gurjit PK. Noise removal in ECG signal using windowing technique and its optimization. Adv Biotechnol Microbiol 2017;6:1. 
15.  El B'charri O, Latif R, Elmansouri K, Abenaou A, Jenkal W. ECG signal performance denoising assessment based on threshold tuning of dualtree wavelet transform. Biomed Eng Online 2017;16:26. 
16.  Oliveira BR, Duarte MA, Abreu CC. A waveletbased method for power line interface removal in ECG signals. Res Biomed Eng 2018;34:7386. 
17.  Suchetha M, Kumaravel N, Jagannath M, Jaganathan SK. A comparative analysis of EMD based filtering methods for 50Hz noise cancellation in ECG signal. Inform Med Unloc 2017;8:549. 
18.  Xu Y, Luo M, Li T, Song G. ECG signal denoising and baseline wander correlation based on CEEMDAN and wavelet threshold. Sensors 2017;17:12. 
19.  Rakshit M, Das S. An efficient ECG denoising methodology using empirical mode decomposition and adaptive switching mean filter. Biomed Sig Procees Control 2018;40:1408. 
20.  Prabhakararao E, Manikandan MS. On the use of Variational Mode Decomposition for Removal of Baseline Wander in ECG Signals. National Conference on Communications (NCC); 2016. p. 16. 
21.  Dragomiretskiy K, Zosso D. Variational mode decomposition. IEEE Trans Sig Proce 2014;62:53144. 
22.  Liu S, Tang G, Wang X, He Y. Timefrequency analysis based on improved variational mode decomposition and teager energy operator for rotor system fault diagnosis. Math Probl Eng 2016;11:119. 
[Figure 1], [Figure 2], [Figure 3], [Figure 4], [Figure 5], [Figure 6], [Figure 7], [Figure 8]
[Table 1], [Table 2]
