 Open Access
 Total Downloads : 542
 Authors : Vikramjit Singh, Simranjeet Kaur, Aditi Gupta
 Paper ID : IJERTV3IS061000
 Volume & Issue : Volume 03, Issue 06 (June 2014)
 Published (First Online): 23062014
 ISSN (Online) : 22780181
 Publisher Name : IJERT
 License: This work is licensed under a Creative Commons Attribution 4.0 International License
Comparative Study of ECG Signal Denoising and Rpeak 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 Rpeak 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. Rpeaks suffer from the nonstationery of both QRS morphology and noise. For Rpeak 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).

INTRODUCTION

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 peaktopeak ECG
amplitude, which is
approximately equivalent to 25mv. Fig. 2 represents PLI graph.

PatientElectrode 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

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 BlancoVelasco, 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).


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

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):

Hard thresholding

Soft Thresholding
Fig. 3 ECG Signal With and Without Base Line noise


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


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

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

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

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


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 zerocrossings 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:

Find all the local extrema in the test data

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

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

Find out their mean as
1 = + /2 (4)
WhereCi t isthe nempirical 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


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.

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.

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


RPEAKS DETECTION METHODS
ECG signal can be expressed as repetition of PQRST waves as per Fig 10.As we know that Rpeak 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 Rpeak detection are Empirical mode decomposition and Shannon entropy.
A.
B.
Fig. 10: Illustration of QRS complex

Using Empirical Mode Decomposition
EMDbased approach overcomes the problem of basis
=
2
(11)
=1
function (X. Hongyan, 2008). QRS complex shows oscillatory patterns typically presented in 1stthree IMFs.Rpeak detection comprises of the following steps. The steps are gives as:

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

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.

Find the position of the maximum of a segment of time
Detection using Shannon entropy is processed using 4stage algorithm. In stage1, 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 Pand Twaves 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)
Instage2, Fig. 13, positive peaks are obtained by passing the dECG signal through nonlinear transform. Value of Shannon Energy (SE) of the dECG signal is calculated as per following equation:
= 2 2 . (14)
duration starting from the first nonzero value)of .This is the first Rpeak 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 Rpeak

Similarly, find all other Rpeak positions until the end of a t is reached.
According to the width of QRS complex which is normally
Shannon
Energy Computation
ZeroPhase Filtering
100 ms with variation of Â± 20 ms tR is selected to be about 200 ms. After finding the Rpeak position, find whether the peak is positive or negative from the value of 2C3 (t0). If 2C3 (t0) is positive then Rpeak is positive


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(PeakFinding 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 Rpeaks are detected by using a simple true Rpeak locator. Largest amplitude is find within Â±25 samples of identified location of candidate Rpeak in previous stage. Waveform of Fig.16 (c) shows detected Rpeaks
conclusion is that decomposition by EMD is better but it is not adaptive.
In case of Rpeak 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 Rpeak 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 truepositive when a Rpeak is correctly detected, false negative when a Rpeak is missed and falsepositive when a noise spike is detected as Rpeak.
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

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

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 , 276281.
12
x 10
Amplitude
2
0
2
Hilbert of Shannon Entropy

Friesen, G. (1990). Comparison of noise sensitivity of Nine QRS detection Methods. IEEE trans.Biomed. Eng. , 8598.

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 , 1631.

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

M.Sabarimalai Manikandan, K. S. (2011). Novel Method For Detecting Rpeaks in ECG. Biomedical Signal Processing and Control , 111.

Manuel BlancoVelasco, B. W. (2007). ECG signal denoising and baselinewander correction based on EMD. Computers In Biology and Medicine 38 , 113.
Fig. 16: Waveforms Showing (a) Shannon Entropy Envelop (b) Zero
Crossing (c) Detected RPeaks
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

N. E. Huang, Z. S. (1998). The emperical Mode Decomposition and Hilbert Spectrum For NonLinear and NonStationary Time Series Analysis. Proc. Roy. Soc. London A, Vol. 454 , 903995.

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

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