You are currently on the new version of our website. Access the old version .
SensorsSensors
  • Article
  • Open Access

25 April 2017

Adaptive Interference Cancellation of ECG Signals

,
,
,
,
and
1
School of Electronic Engineering, Xidian University, Xi’an 710071, China
2
King Saud University, Riyadh 11653, Saudi Arabia
3
National University of Sciences and Technology (NUST), Islamabad 44000, Pakistan
4
Department of Computer Sciences, Florida Institute of Technology (FIT), Melbourne, FL 32901, USA
This article belongs to the Special Issue Advances in Body Sensor Networks: Sensors, Systems, and Applications

Abstract

As an important biological signal, electrocardiogram (ECG) signals provide a valuable basis for the clinical diagnosis and treatment of several diseases. However, its reference significance is based on the effective acquisition and correct recognition of ECG signals. In fact, this mV-level weak signal can be easily affected by various interferences caused by the power of magnetic field, patient respiratory motion or contraction, and so on from the sampling terminal to the receiving and display end. The overlapping interference affects the quality of ECG waveform, leading to the false detection and recognition of wave groups, and thus causing misdiagnosis or faulty treatment. Therefore, the elimination of the interference of the ECG signal and the subsequent wave group identification technology has been a hot research topic, and their study has important significance. Based on the above, this paper introduces two improved adaptive algorithms based on the classical least mean square (LMS) algorithm by introducing symbolic functions and block-processing concepts.

1. Introduction

As the most important organ in the human body, the heart is the power source of metabolism of various organs and tissues. The basic units of the heart are the cardiomyocytes, and the human electrocardiogram (ECG) signal is actually their electrical activity response [1]. When there is a certain way to stimulate a certain intensity through the myocardial cells, it will result in intracellular and extracellular ion flows, resulting in an action potential. ECG signals completely record this change process [2], and ECG waveform reflects the physiological conditions of various parts of the heart in medical diagnosis, and is a very valuable reference for treatment [3].
The amplitude of the ECG signal is in the range of 10 μV to 4 mV and it is very small and weak and therefore very sensitive to the effects of various disturbances [4]. One of the main sources of interference are loop factors and 50 Hz frequency interference caused by the electromagnetic field and the patient, baseline wander (BW) caused by the patient’s limb movement and breathing, and electromyogram (EMG) interference caused by skeletal muscle stimulation and contraction [5].
Power frequency interference [6], the most common ECG signal interference, is caused by the magnetic field distributed by the human body by the power supply, resulting in added 50 Hz sinusoidal and harmonic components in the pure ECG signals [7]. Figure 1 shows the time-domain and frequency-domain diagrams of the ECG signals with power-line interference (PLI).
Figure 1. ECG signal with PLI.
BW is another interference affected by the patient’s ECG monitored breathing, electrode movement, and other frequently occurring factors [8]; its shape is similar to a periodic sinusoidal signal, generally below the 1 Hz low-frequency signal, resulting in a baseline signal instability drift, making the ECG waveform show a slow change [9]. The time and frequency domains of the ECG waveforms affected by BW are shown in Figure 2.
Figure 2. ECG signals under BW interference.
When the ECG signal is collected using different measurement modes, the signal strength is different. In the actual acquisition in front of the armpit the ECG signal is the most obvious, as the ECG signal is obtained with no interference, as shown in Figure 3.
Figure 3. ECG signals with no interference.
Based on the classical least mean square (LMS) algorithm [10], two improved adaptive algorithms are proposed, namely, the normalized LMS (NLMS) algorithm [11] based on symbol function and the normalized block-processing LMS (BLMS) algorithm based on symbol function [12]. The symbolic functions [13] and the block-processing [14] concept are introduced and applied to the the elimination of two kinds of interference: ECG signal frequency interference and BW interference. The MIT-BIH ECG database and the real ECG data collected by a miniature ECG collector in the laboratory were used to validate the algorithm and analyze the results in detail.

2. Proposed Technique for Adaptive Interference Cancellation

2.1. Adaptive Noise Cancellation Based on LMS Algorithm

The basic principle of the adaptive noise canceller is to use the noise source to output, then to digitally filter [15], to estimate the noise most accurately, and then to subtract the estimated noise from the original input, thus achieving the separation of the pure useful signal from the noise. Figure 4 shows a block diagram of an adaptive noise canceller based on Wiener filtering [16], wherein the main input signal is X(n), which consists of the useful signal s(n) and the background interference signal v0(n), and these two are not related. The reference input signal v1(n) must be the input signal associated with the interfering signal v0(n).
Figure 4. Block diagram of adaptive noise cancellation.
Because the reference signal v1(n) is correlated with the interference portion v0(n) in the main input, the filter will remove this correlation at its output. This is achieved by generating an estimate of the interference in the main input signal from the noise of the reference channel and subtracting the estimated interference value from the main input to obtain the final output of the system as an estimate of the wanted signal. In summary, the specific steps for implementing adaptive noise cancellation based on LMS can be summarized as follows:
  • The initial value is set to start the default weight coefficient vector.
  • Calculate the output signal of the adaptive FIR filter, wherein the order is L − 1:
    v ^ ( n ) = i = 0 L 1 W i v 1 ( n i ) ,
  • Estimate the error of the current time n:
    e ( n ) = x ( n ) v ^ ( n ) s ^ ( n ) ,
  • Use the steepest descent LMS algorithm to adjust the weight vector of the filter continuously:
    W i + 1 ( n + 1 ) = W i ( n ) + 2 μ e ( n ) X ( n i )   0 i L 1 ,
  • Verify whether the standard deviation of the standard error has been satisfied. If it is, immediately stop iteration; otherwise, continue to the following operation.

2.2. NLMS Algorithm Based on Symbol Function

The NLMS algorithm is a kind of adaptive algorithm that is extended and improved based on LMS algorithm. The improvement of the algorithm is to use the variable step method, thus reducing the time required for full convergence, which corresponds to the weight coefficient update formula:
W ( n + 1 ) = W ( n ) + [ μ p + X T ( n ) X ( n ) ] e ( n ) X ( n ) ,
Therefore, the variable step size can be expressed as:
μ e ( n ) = μ p + X T ( n ) X ( n ) ,
Here, the step size is a fixed factor that controls the speed of convergence of the algorithm. The parameter p prevents the denominator from being too small. When the step size parameter is too large, the p value is generally a small positive number [17].
One of the major drawbacks of the adaptive algorithm extended by the basic LMS algorithm is that the excess mean square error is too large to cause distortion of the filtered signal. Thus, Muhammad proposed an error NLMS (ENLMS) algorithm with a variable step size proportional to the square of the error signal in the adaptive algorithm for removing the ECG signal power frequency interference. The corresponding iterative adjustment formula of the algorithm is as follows:
W ( n + 1 ) = W ( n ) + [ μ p + e T ( n ) e ( n ) ] e ( n ) X ( n ) ,
Therefore, in the LMS algorithm, the variable step size is expressed as:
μ e ( n ) = μ p + e T ( n ) e ( n ) ,
The parameters μ and p have the same meanings as above. Compared to the NLMS algorithm, ENLMS in the step-length selection is no longer dependent on the input signal; thus, for the convergence rate and steady-state error, ENLMS should perform better.
However, according to the formula of the variable step size, the ENLMS algorithm needs additional computation to obtain the variable step size compared to the traditional LMS algorithm. Therefore, to further reduce the amount of computation without affecting the quality of the filtered signal, a sign function is introduced in the weight coefficient updating Equation (9).
The symbolic function sgn( x ) is defined as follows:
sgn ( n ) = { 1 : x > 0 0 : x = 0 1 : x < 0 } ,
An NLMS algorithm based on the symbolic function is obtained. Therefore, the final weight coefficient iterative adjustment formula is as follows:
W ( n + 1 ) = W ( n ) + μ e ( n ) sgn { X ( n ) } { e ( n ) } .

2.3. Normalized BLMS Algorithm Based on Symbol Function

From the NLMS algorithm based on symbol function proposed in the previous section, the concept of block processing can be introduced to further reduce the computational complexity of the algorithm.
The basic idea of the widely used BLMS algorithm [11] is that, unlike the basic LMS algorithm, the filter coefficients are recalculated and updated for each sample value. The block-processing algorithm is implemented in each block region, that is, every k points to a weight coefficient update [18]. Therefore, the filter weight vector iterative adjustment formula of the block-processing algorithm is as follows:
W ( n + 1 ) = W ( n ) + μ i = 0 k 1 X ( n k + i ) e ( n k + i ) ,
Then, the time-averaged gradient vector is:
ϕ ( n ) = μ i = 0 k 1 X ( n k + i ) e ( n k + i ) ,
The filter coefficient vector based on the BLMS algorithm is adjusted once per k sampling points, and the coefficient update is based on the average gradient vector of the k sampling points. It can be deduced that the BLMS algorithm also converges to the Wiener solution, but this does not mean that it will achieve the final result sooner than the LMS.
The block processing is introduced into the NLMS algorithm based on symbol function proposed in the previous section, that is, the input signal is processed in blocks (10), and then the absolute value of the error signal in each block region of length L is selected. The value is used to obtain the variable step size. Thus, the weight coefficient updating formula becomes:
W ( n + 1 ) = W ( n ) + μ e L i 2 sgn { X ( n ) } sgn { e ( n ) } ,
Then, we obtain the weight coefficient update formula of the normalized BLMS algorithm based on symbol function, which is further simplified, where e L i = max { | e k | , k Z i } , Z i = { i L , i L + 1 , , i L + L 1 } , i Z , and if e L i = 0 , Equation (12) becomes:
W ( n + 1 ) = W ( n ) .

3. Implementation

3.1. Adaptive Interference Cancellation to Remove Power Frequency Interference

In the following, we use the MIT-BIH public library’s record file and the data collected by the minicollector to compare and validate the ECG signal’s interference elimination performance.
First of all, for the pure ECG signal from the MIT-BIH public library, artificially joining the same sampling rate of 50 Hz power frequency interference will add interference after the signal as the main filter input, the reference input, and select interference with the same frequency cosine [14]. Figure 5 shows the pure ECG signal and the waveform after superimposed PLI. Figure 6 shows the spectrum of ECG with PLI. It is clear that there is a strong 50 Hz noise.
Figure 5. MIT-BIH ECG waveform before and after PLI.
Figure 6. Spectrum of MIT-BIH ECG by PLI.
Figure 7 shows the output of adaptive interference cancellation. Figure 8 shows the convergence of the statistical mean square error of the three adaptive interference cancellation algorithms.
Figure 7. Output of the three adaptive interference cancellation algorithms.
Figure 8. Mean square error convergence of the three adaptive interference cancellation algorithms.
Based on the algorithms of ECG data acquisition in the MIT-BIH public library, the ECG data of a classmate were processed using a mini-ECG collector. Figure 9 shows the original ECG waveforms and the waveforms after adding PLI. Figure 10 is its spectrum.
Figure 9. Before and after the impact of PLI by the ECG waveform.
Figure 10. Influence of PLI on the ECG.
Figure 11 shows the output of adaptive interference cancellation. Figure 12 shows the average mean square error convergence curve for 100 simulation simulations of the three adaptive interference cancellation algorithms.
Figure 11. Output of the three adaptive interference cancellation algorithms.
Figure 12. Convergence of mean square error of the three adaptive interference cancellation algorithms.

3.2. Adaptive Interference Cancellation Removes BW

First of all, for the pure ECG waveform sampled from the MIT-BIH common library, the baseline drift interference in the common library with the same sampling rate is superimposed on the pure ECG waveform, and then the mixed signal is used as the main input and the reference input is used as the artificial input of the baseline drift interference. Thus, the correlation between the reference input and the interfering signal in the main input is 1, and interference cancellation is most effective. Figure 13 shows the pure ECG waveform and the waveform after adding the baseline drift. Figure 14 is the spectrum of the waveform after adding the baseline drift. It can be seen that the baseline drift interference mostly concentrates on the low-frequency band near the zero frequency.
Figure 13. MIT-BIH ECG waveform before and after BW.
Figure 14. MIT-BIH ECG before and after BW.
Figure 15 shows the output of adaptive interference cancellation. Figure 16 shows the convergence curve of the statistical mean square error of the three adaptive interference cancellation algorithms.
Figure 15. Output MIT-BIH signal after adaptive interference cancellation.
Figure 16. Mean square error convergence of the three adaptive interference cancellation algorithms for MIT-BIH signals.
After verifying the waveforms of the central bank of the public library, the ECG waveforms of a certain classmate are collected for processing using a minicollector. Figure 17 shows the actual measurement of the signal obtained. Figure 18 shows the spectrum.
Figure 17. ECG waveforms before and after interference with BW.
Figure 18. ECG spectrum disturbed by BW.
Figure 19 shows the output of adaptive interference cancellation. Figure 20 shows the convergence curve of the statistical mean square error of the three adaptive interference cancellation algorithms.
Figure 19. Adaptive interference cancellation after the output signal.
Figure 20. Mean square error convergence of the three adaptive interference cancellation algorithms.

4. Conclusions and Analysis

The basic LMS algorithm, the NLMS algorithm based on symbol function, and the normalized BLMS algorithm based on symbol function are shown in Table 1 for comparison of the computational complexity per L sample points.
Table 1. Comparison of complexity of three kinds of adaptive algorithms.
As shown in Table 2 and Table 3, these three algorithms can effectively filter out the PLI and obtain the pure ECG waveform at the output. The improved NLMS algorithm and its block-processing algorithm based on symbol function are compared to the LMS algorithm get a higher signal-to-noise ratio (SNR) value.
Table 2. SNR changes of MIT-BIH ECG with PLI before and after denoising.
Table 3. Changes of SNR before and after denoising of ECG signals from the minicollector with PLI.
Table 4 shows the variation of SNR before and after the interference cancellation. It can be seen that the interference cancellation of the three algorithms improves the SNR by 12.5809, 15.8217, and 15.8337 dB, respectively, when the initial SNR is −3.2003 dB.
Table 4. SNR changes of MIT-BIH ECG signals before and after filtering with BW interference.
Table 5 shows the change of SNR before and after the interference cancellation. It can be seen that, under the strong baseline drift interference with the initial SNR of −2.7754 dB, the three adaptive interference cancellation algorithms increase the signal SNR by 13.9228, 16.6120, and 16.6158 dB, respectively.
Table 5. SNR changes before and after denoising of ECG signals from the minicollector with BW interference.
In summary, the improved symbol-based NLMS algorithm and its block-processing algorithm both improve the SNR both for the central database of the public library and for the analysis of signals from the mini-ECG. Its convergence is reached earlier and eliminating the signal noise interference is better with frequency variation. The improved symbol-based NLMS algorithm has achieved a higher enhancement.

Acknowledgments

The work is supported in part by the National Natural Science Foundation of China (No. 61671349), in part by the Project Funded by China Postdoctoral Science Foundation, and in part by the Postdoctoral Research Projects Funded in Shaanxi Province. The authors also would like to extend their sincere appreciation to the Deanship of Scientific Research at King Saud University for its funding of this research through the Research Group Project No. RG-1435-048.

Author Contributions

Aifeng Ren, Zhenxing Du, Juan Li and Fangming Hu wrote the paper, Xiaodong Yang and Haider Abbas contributed the ideas.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Sufi, F.; Qiang, F.; Khalil, I.; Mahmoud, S.S. Novel methods of faster cardiovascular diagnosis in wireless telecardiology. IEEE J. Sel. Areas Commun. 2009, 27, 537–552. [Google Scholar] [CrossRef]
  2. Gravina, R.; Alinia, P.; Ghasemzadeh, H.; Fortino, G. Multi-sensor fusion in body sensor networks: State-of-the-art and research challenges. Inf. Fusion 2017, 35, 68–80. [Google Scholar] [CrossRef]
  3. Fortino, G.; Giannantonio, R.; Gravina, R.; Kuryloski, P.; Jafari, R. Enabling Effective Programming and Flexible Management of Efficient Body Sensor Network Applications. IEEE Trans. Hum. Mach. Syst. 2013, 43, 115–133. [Google Scholar] [CrossRef]
  4. Lin, Y.D.; Hu, Y.H. Power-line interference detection and suppression in ECG signal processing. IEEE Trans. Biomed. Eng. 2008, 55, 354–357. [Google Scholar] [CrossRef] [PubMed]
  5. Kiremire, B.; Marwala, T. Nonstationarity detection: The use of the cross correlation integral in ECG, and EEG profile analysis. In Proceedings of the Congress on Image and Signal Processing (CISP’08), Sanya, China, 27−30 May 2008; pp. 373–378. [Google Scholar]
  6. Bhavani Sankar, A.; Kumar, D.; Seethalakshmi, K. Performance Study of Various Adaptive Filter Algorithms for Noise Cancellation in Respiratory Signals. Signal Process. Int. J. 2010, 4, 267–278. [Google Scholar]
  7. Covello, R.; Fortino, G.; Gravina, R.; Aguilar, A.; Breslin, J.G. Novel method and real-time system for detecting the Cardiac Defense Response based on the ECG. In Proceedings of the 2013 IEEE International Symposium on Medical Measurements and Applications (MeMeA), Gatineau, QC, Canada, 4–5 May 2013; pp. 53–57. [Google Scholar]
  8. Leski, J.M.; Henzel, N. ECG Baseline Wander Powerline Interface Reduction Using Nonlinear Filter Bank. Signal Process. 2004, 35, 781–793. [Google Scholar]
  9. Blanco-Velasco, M.; Weng, B.; Barner, K.E. ECG Signal Denoising and Baseline Wander Correction Based on the Empirical Mode Decomposition. Comput. Biol. Med. 2008, 38, 1–13. [Google Scholar] [CrossRef] [PubMed]
  10. Gravina, R.; Fortino, G. Automatic Methods for the Detection of Accelerative Cardiac Defense Response. IEEE Trans. Affect. Comput. 2016, 7, 286–298. [Google Scholar] [CrossRef]
  11. Singh, S.; Yadav, K.L. Performance evaluation of different adaptive filters for ECG signal processing. Int. J. Comput. Sci. Eng. 2010, 40, 1880–1883. [Google Scholar]
  12. Esposito, A.; D’Andria, P. An Adaptive Learning Algorithm for ECG Noise and Baseline Drift Removal. In Italian Workshop on Neural Nets; Springer: Berlin/Heidelberg, Germany, 2003; pp. 139–147. [Google Scholar]
  13. Sayadi, O.; Shamsollahi, M.B. ECG Denoising and Compression Using a Modified Extended Kalman Filter Structure. IEEE Trans. Biomed. Eng. 2008, 55, 2240–2248. [Google Scholar] [CrossRef] [PubMed]
  14. Kumar, N.; Ahmad, I.; Rai, P. Signal Processing of ECG Using Matlab. Int. J. Sci. Res. Publ. 2012, 12, 601–604. [Google Scholar]
  15. Jagtap, S.K.; Chavan, M.S.; Wagvekar, R.C.; Uplane, M.D. Application of the digital filter for noise reduction in electrocardiogram. J. Instrum. 2010, 40, 83–86. [Google Scholar]
  16. Koike, S. Analysis of adaptive filters using normalized signed regressor LMS algorithm. IEEE Trans. Signal Process. 1999, 47, 2710–2723. [Google Scholar] [CrossRef]
  17. Eweda, E. Analysis and design of a signed regressor LMS algorithm for stationary and nonstationary adaptive filtering with correlated Gaussian data. IEEE Trans. Circuits Syst. 1990, 37, 1367–1374. [Google Scholar] [CrossRef]
  18. Rahman, M.Z.U.; Shaik, R.A.; Reddy, D.R.K. Efficient sign based normalized adaptive filtering techniques for cancelation of artifacts in ECG signals: Application to wireless biotelemetry. Signal Process. 2011, 91, 225–239. [Google Scholar] [CrossRef]

Article Metrics

Citations

Article Access Statistics

Multiple requests from the same IP address are counted as one view.