Comparative Study of ECG Signal Denoising and R-peak Registration Methods

DOI : 10.17577/IJERTV3IS061000

Download Full-Text PDF Cite this Publication

Text Only Version

Comparative Study of ECG Signal Denoising and R-peak Registration Methods

Vikramjit Singp ,Simranjeet Kaur2 , Aditi Gupta3

1DAV University, Assistant professor, Dept. of ECE, Jalandhar 2 DAV University,Student, Dept. of ECE, Jalandhar (India) 3DAV University,Student,Dept. of ECE, Jalandhar (India)

Abstract–This paper present the review and tutorial of comparative study of ECG signal denoising methods and R-peak registration.ECG signal is widely used for diagnosing cardiac diseases. So a good quality ECG signal is required which must be free from all noise corruptions. The artifacts and noises need to be eliminated for better clinical evaluation. Two dominant artifacts present in ECG recordings are power line interference and baseline wanders. Comparison between three denoising methods, empirical mode decomposition, discrete wavelet transform and filters had been made. Peak detection is a crucial step after denoising for analysis of ECG signal. R-peaks suffer from the non-stationery of both QRS morphology and noise. For R-peak detection Shannon entropy and empirical mode decomposition methods are reviewed.

Index TermsElectrocardiogram (ECG), Empirical mode decomposition (EMD), Denoising, Power Line Interference, baseline wander, Shannon Entropy(SE), Discrete Wavelet Transformation (DWT), Hilbert Transform(HT).

  1. INTRODUCTION

    1. Power line interference

      It consist of 50/60 Hz pickup and harmonics, which can be modeled as sinusoids. The amplitude varies up to 50 percent of peak-to-peak ECG

      amplitude, which is

      approximately equivalent to 25mv. Fig. 2 represents PLI graph.

    2. Patient-Electrode motion artifact:

      Electrode motion away from the contact region of skin causes variation in

      impedance

      between electrode and the skin which leads to potential variation in ECG

    3. Electromyography (EMG) noise

      Electromyography (EMG) noise is Electrical activity due to contraction of muscles lasting for around 50 ms between dc and 10,000 Hz with average amplitude of 10% FSD.

      ECG signal is a graphical representation of electrical cardiac activity and is used prominently for diagnosing heart malfunctioning (Manuel Blanco-Velasco, 2007). There are five waves in ECG signal, a P wave, QRS complex and a T wave corresponding to atrial depolarization, ventricular depolarization and rapid repolarization of ventricles. Fig. 1shows normal ECG signal. QRS complex is a name for combination of three graphical deflections seen on typical ECG signal. After denoising, next step is QRS detection, especially detection of R wave. R wave is one of the most important sections of this complex, which has an essential role in diagnosis of heart rhythm irregularities and also in determining heart rate variability (HRV) (M.Sabarimalai Manikandan, 2011).

  2. NOISE SOURCES IN ECG SIGNAL

    6

    x 10

    3

    2.5

    Amplitude

    2

    1.5

    1

    Fig. 1Normal ECG Signal

    ECGsignal gets contaminated by various noises and artifacts that can be within frequency band of interest. Noise sources can be classified as (Friesen, 1990):

    0.5

    0

    0 20 40 60 80 100 120 140

    Frequency

    Fig. 2 Power Line Interference

    1. Base line drifts with respiration

      The drift of the base line with respiration can be represented by a sinusoidal component at the frequency of respiration added to the ECG signal. The amplitude and frequency of the sinusoidal component should be variable. It occurs usually from respiration with amplitude of around 15% FSD at frequencies drifting between 0.15 and 0.3 Hz. Fig. 3 shows removal of baseline wander noise.

      Original signal

      12

      .

      Fig. 4Three Level Decomposition

      10

      8

      6

      0 5000

      12

      10

      8

      6

      Denoised signal 10000 15000

      The wavelet filter bank decomposes the signal by passing it through high pass and low pass filters. Output coefficients of LPF are known as approximations while those of HPF are known as details. After decomposing using Db4 wavelet thresholding is applied. Thresholding remove the coefficients below a certain value; remove noise with low amplitude and any overlapped noise. Two methods of thresholding are used

      Amplitude

      1

      0.5

      0

      0 5000 10000 15000

      Noise removed from signal

      0 5000 10000 15000

      No of Samples

      namely (Fig 5) (Daqrouq, 2008):

      1. Hard thresholding

      2. Soft Thresholding

        Fig. 3 ECG Signal With and Without Base Line noise

    2. Electrode contact noise

    It is caused due to loss of contact between the electrode and the skin that effectively disconnects the measurement system from the subject.

    All the above noises corrupt the ECG signal and reduces its clinical value. Thus denoising of ECG is necessary pre-

    1

    0.8

    0.6

    0.4

    0.2

    0

    -0.2

    -0.4

    -0.6

    -0.8

    Original signal

    Hard thresholded signal 1

    0.8

    0.6

    0.4

    0.2

    0

    -0.2

    -0.4

    -0.6

    -0.8

    Soft thresholded signal 0.6

    0.4

    0.2

    0

    -0.2

    -0.4

    -0.6

    processing step to save useful information and to remove such noises.

    -1

    0 50 100

    -1 -0.8

    0 50 100 0 50 100

  3. DENOISING METHODS

    For a noise free and clean recording, denoising algorithms are performed based on improve SNR and MSE.

    1. Using Discrete Wavelet Transform (DWT) (Daqrouq, 2008):

      It is decomposition using wavelet filter banks. LPF and HPF are used for decomposition of signal into different scales (Daqrouq, 2008).

      ECG signal, contaminated with noise, is represented as:

      Ê = + () (1)

      Where,

      Ê (n) is noisy ECG signal S (n) is noise added

      E (n) is original ECG signal

      This signal is passed through wavelet filter bank as shown in the Fig.4.

      Fig. 5: Hard and Soft Thresholding

      Formula used for calculation of threshold is given below:

      = log N (2)

      Where,

      is threshold value

      N is number of coefficients and is standard deviation of detail.

      But this method may not be so efficient because fixed value of threshold is used. Hence, it is non- adaptive. Also, ECG is non- stationery signal. So, adaptive threshold value must be used or we can say that threshold should have lower value in case of lower level and higher value in case of higher level of detail coefficients. Adaptivethresholding is given as:

      i = log N /log 1 + i (3)

      Where,

      i is adaptive threshold value and

      iis level of detail coefficients.

      Fig 6 showsECG signal without noise using DWT decomposition.

      Original signal

      10

      8

      6

      200 400 600 800 1000 1200 1400

      Denoised signal

      10

      1. To get the first component p,subtract M1 from data X(t)

        1 = 1 (5)

      2. Check whether 1 is IMF or not.If conditions are not satisfied repeats the steps.

        Now the stopping process for sifting:

        t=0

        k1

        A widely used criterion is the sum of difference (SD) and is given by (Lakhvir Kaur, 2013):

        8

        6

        200 400 600 800 1000 1200 1400

        SD = T

        hk1 t hk t 2/p

        t (6)

        Amplitude

        0.8

        0.6

        0.4

        0.2

        0

        Noise removed from signal

        200 400 600 800 1000 1200 1400

        No of Samples

        When the SD is smaller than a threshold, the first IMF C1 t is obtained and it is denoted as C1 t =p t . To get the remaining IMFs, C1 t is subtracted from original data to get the residual signal R1 t .

        Fig. 6: Noise Removed From ECG signal using DWT

    2. Using Empirical Mode Decomposition (EMD) (N. E. Huang, 1998)

      Empirical mode decomposition is Hilbert transformation for time frequency analysis. With EMD any complex signal can be broken into finite and small number of intrinsic mode functions (IMF).It is any function with the same number of extrema and zero crossings, with its envelopes being symmetric with respect to zero. This decomposition operates in the time domain and is suitable for nonlinear and non- stationary processes. There are some basic requirements for IMF-

      • In the whole data set, the number of extrema and the

        R1 t = X t C1 t (7)

        The residual now contains the information about the components of longer periods. The process to obtain more IMFs can be stopped when the component Rn t becomes less than a predetermined value or becomes a monotonic function, or constant, or a function with only one maxima and one minima from which no more IMFs can be extracted. The subsequent IMFs and residues are compared as:

        R1 t C2 t = R2 t (8)

        Rn1 t Cn t = Rn t (9)

        At the end of decompositionthe original signal x (t) will be represented as sum of IMFs plus a residue Signal

        i=1

        number of zero-crossings must either be equal or differ at most by one.

        X t = n

        Ci t + Rn t

        (10)

      • At any point, the mean value of the envelope defined by local maxima and local minima is zero.

        Basically EMD decomposes the signal into a sum of IMFs.

        .An IMF is extracted through the sifting process. Few assumptions are required for the decomposition. Theyare (Hariharan, 2006):-

        • The signal must be having one minimum and one maximum

        • Time scale is given by the time lapse between the maxima and minima

        • If the signal has inflection points then the signal can be differentiated one or more times.

      Sifting is a step by step procedure and it is given below:

      1. Find all the local extrema in the test data

      2. The signal should have at least two extrema: one maxima and one minima.

      3. Now generate the envelope (upper and lower ) by connecting all the maxima and minima points by a cubic spline line.

      4. Find out their mean as

      1 = + /2 (4)

      WhereCi t isthe n-empirical modes and the component Rn (t)

      is the mean trend or a constant.

      a) Reduction of Power Line Interference

      The ECG signal is enhanced using EMD to express the noisy ECG as sum of a series of IMFs. The 1st IMF contains high frequency noise only. After that few IMFs contains both noise and information and in the last IMFs there is only low frequency. Power line interference is a high frequency noise. So we can easily eliminate this component. EMD is used for filtering of 60 Hz power line interference in ECG signals (Tompkins, 2007). When SNR is low, the 60 Hz noise is removed in the first IMF but when SNR is high, a pseudo noise is added at a higher frequency to filter out the 60 Hz noise. The pseudo noise helps the power line noise leaving the other signal frequencies intact as when the SNR is high, the EMD filters out some of the important lowerfrequency signal components along with the power line noise. So by applying this technique noise can be extracted in the first IMF in a single step. Fig7shows power spectral density (PSD) plot of original signal with the 60 Hz noise in first waveform and with 90 Hz noise in second waveform. In last waveform, denoised signal is shown with removal of both 60 and 90 Hz noise.

      Fig. 7 PSD of the Plot with 60Hz and 90 Hz Noise

      100

      Magnitude (dB)

      0

      -100

      -200

      -300

      400

      Phase (degrees)

      200

      0

      -200

      -400

      n=7 Chebyshev Type II Bandpass Filter

      0 20

      40

      60

      Frequency (Hz)

      80

      100

      120

      0 20

      40

      60

      Frequency (Hz)

      80

      100

      120

      Fig. 8: Response of Chebyshev Filter

    3. Using Filters

    A classical method using high pass filters eliminates very low frequency components from ECG recording. Linear filtering is also performed to eliminate baseline wander from ECG recording in the frequency range of 0.5 Hz. But by using this method, ringing effects are introduced. Butterworth or Chebyshev filters may be used for noise removal.

    1. Butterworth Filter:

      These filters have the property of maximally flat frequency and no ripples in pass band (Chinchkhede, 2011). It rolls off towards zero in stop band. It requires a

      200

      Amplitude

      150

      100

      50

      0

      40

      Amplitude

      30

      20

      10

      Original Signal

      0 20 40 60 80 100 120 140

      No of samples

      Denoised Signal using Chebyshev Filter

      higher order to implement a particular stop band specification.

    2. Chebyshev Filter:

      Chebyshev filters type I are analog or digital filters possess more pass band ripples and type II is having more stop band ripples.Fig .8shows the response of Chebyshev filter. They also have steeper roll off compared to Butterworthfilters.Chebyshevfilters reduce error between ideal and actual filter over range of filter but the drawback is that it loses important frequencies. Fig. 9 shows denoised signal using Chebyshev filter. Ringing effects are introduced and low frequencies were also get eliminated.

      It is impossible to design an ideal filter.

      0

      0 20 40 60 80 100 120 140

      No of samples

      Fig. 9: Denoised Signal Using Chebyshev Filter

  4. R-PEAKS DETECTION METHODS

ECG signal can be expressed as repetition of P-QRS-T waves as per Fig 10.As we know that R-peak is sharpest component in the ECG signal, lower order IMF can capture it which may also contain high frequency noise. The two methods used in this paper for R-peak detection are Empirical mode decomposition and Shannon entropy.

A.

B.

Fig. 10: Illustration of QRS complex

    1. Using Empirical Mode Decomposition

      EMD-based approach overcomes the problem of basis

      =

      2

      (11)

      =1

      function (X. Hongyan, 2008). QRS complex shows oscillatory patterns typically presented in 1stthree IMFs.R-peak detection comprises of the following steps. The steps are gives as:

      1. Sum the first three IMFs to get 2C3 (t) and take its absolute value as

      2. Retain the amplitudes of larger than a threshold, T, where T is statistically selected to be half of the maximum value of and make others zero. This eliminates the noise.

      3. Find the position of the maximum of a segment of time

        Detection using Shannon entropy is processed using 4-stage algorithm. In stage-1, Fig. 12, ECG signal is passed through band pass filter and 1st order differentiation to reduce noise. After filtering, filtered signal, , is differentiated and is applied as per following equation:

        = + 1 , (12)

        Interference of tall P-and T-waves is reduced by differentiation. ow, normalization of ECG signal (dECG) is done. It is given as:

        =

        =1

        (13)

        Where N denotes number of samples in ECG segment

        .

        Band Pass Filtering

        First Order Forward Differencing

        Amplitude Normalization

        Fig. 12: Stage 1(Linear Digital Filtering)

        Instage-2, Fig. 13, positive peaks are obtained by passing the dECG signal through non-linear transform. Value of Shannon Energy (SE) of the dECG signal is calculated as per following equation:

        = 2 2 . (14)

        duration starting from the first non-zero value)of .This is the first R-peak position (Fig. 11)

        This signal is then passed to zero phase filtering. It gives sharp peaks around the QRS complex area and then smooth it out.

        Fig 11: Steps to detect R-peak

      4. Similarly, find all other R-peak positions until the end of a t is reached.

      According to the width of QRS complex which is normally

      Shannon

      Energy Computation

      Zero-Phase Filtering

      100 ms with variation of ± 20 ms tR is selected to be about 200 ms. After finding the R-peak position, find whether the peak is positive or negative from the value of 2C3 (t0). If 2C3 (t0) is positive then R-peak is positive

    2. Using Shannon Entropy (M.Sabarimalai Manikandan, 2011)

Fig. 13: Stage 2(Smooth SE Envelope Extraction)

In Stage 3, Fig.14, property of Hilbert Transform (HT) is used for reducing the complexity of local maxima finding process. The HT of a real signal is given as:

= = 1 (15) Zero

Hilbert Crossing

Shannon entropy is the average unpredictability in a random variable, which is equivalent to its information content. The Shannon entropy of A is given by:

Transform

Point Detection

Fig. 14: Stage 3(Peak-Finding Logic)

From Fig.15(c), it can be observed that maximum value of SE corresponds to zero crossing of Hilbert transform, which is referred as odd symmetric function. Later on, zero crossing algorithms can be used to detect zero crossing points.

In last stage, true R-peaks are detected by using a simple true R-peak locator. Largest amplitude is find within ±25 samples of identified location of candidate R-peak in previous stage. Waveform of Fig.16 (c) shows detected R-peaks

conclusion is that decomposition by EMD is better but it is not adaptive.

In case of R-peak detection, we have compared traditional method with new method developed by (M.Sabarimalai Manikandan, 2011) using Shannon entropy. In comparison, it is concluded that method using SE is more novel and produces better results in term of R-peak sensitivity (Se) , positive productivity (+P) and detection error rate (DER) where,

Amplitude

3000

2000

1000

0

-1000

Original ECG signal

0 1000 2000 3000 4000 5000 6000

=

+

× 100% (16)

Amplitude

500

No of Samples Normalized dECG signal

+ =

+

× 100% (17)

0

-500

0 1000 2000 3000 4000 5000 6000

No of Samples

= + × 100%

(18)

12

Amplitude

x 10

3

2

1

0

Shannon Entropy of ECG Signal

Here TP, FN, FP are three quantitative results corresponds to true-positive when a R-peak is correctly detected, false- negative when a R-peak is missed and false-positive when a noise spike is detected as R-peak.

0 1000 2000 3000 4000 5000 6000

No of Samples

Fig. 15: Different Waveforms of (a) Original ECG signal (b) Normalized dECG signal (c) Shannon Entropy Envelop

Also, this method is more robust and reliable as it shows good performance even in extreme conditions

VI. REFERENCES

12

x 10

Amplitude

3

2

1

0

Shannon Entropy of ECG Signal

  1. Chinchkhede. (2011). Implementation of FIR Filter with Various Windows for Enhancement of ECG signals. International Journal of Engineering Science & Technology , 110-119.

  2. Daqrouq, M. A. (2008). ECG signal denoising by wavelet

    0 1000 2000 3000 4000 5000 6000

    No of Samples

    transform thresholding. American Journal of Applied Sciences, vol. 5 , 276-281.

    12

    x 10

    Amplitude

    2

    0

    -2

    Hilbert of Shannon Entropy

  3. Friesen, G. (1990). Comparison of noise sensitivity of Nine QRS detection Methods. IEEE trans.Biomed. Eng. , 85-98.

  4. Hariharan, H. (2006). Image Fusion and Enhancement via Emperical Mode Decomposition. Journal of Pattern Recognition

    Amplitude

    3000

    2000

    1000

    0

    -1000

    0 1000 2000 3000 4000 5000 6000

    No of Samples R peak detected

    0 1000 2000 3000 4000 5000 6000

    No of Samples

    Research, Vol.1 , 16-31.

  5. Lakhvir Kaur, V. S. (2013). Enhancement of ECG using Emperical Mode Decomposition. International Journal of Science and Research(IJSR) , 109-113.

  6. M.Sabarimalai Manikandan, K. S. (2011). Novel Method For Detecting R-peaks in ECG. Biomedical Signal Processing and Control , 1-11.

  7. Manuel Blanco-Velasco, B. W. (2007). ECG signal denoising and baseline-wander correction based on EMD. Computers In Biology and Medicine 38 , 1-13.

    Fig. 16: Waveforms Showing (a) Shannon Entropy Envelop (b) Zero

    Crossing (c) Detected R-Peaks

    V. CONCLUSION

    We have compared three methods of denoising. Out of them, performance of filter method is not up to the mark due to introduction of ringing effects. Empirical mode decomposition shows better results because it is data derived approach. Therefore, it decomposes signal more efficiently and accurately. Denoising using discrete wavelet transform shows good result in context with adaptive thresholding. So the

  8. N. E. Huang, Z. S. (1998). The emperical Mode Decomposition and Hilbert Spectrum For Non-Linear and Non-Stationary Time Series Analysis. Proc. Roy. Soc. London A, Vol. 454 , 903-995.

  9. Tompkins, A. J. (2007). EM- Based 60 Hz Noise Filtering of The ECG. proc. 29th IEEE EMBS Annual International Conf. , 1904- 1907.

  10. X. Hongyan, H. (2008). A New QRS Detection AlgorithmBased on EMD. Proceedings of 2nd nternational Conf. on Bioinformatics and Biomedical Engg. , 693-696.

Leave a Reply