On+an+Algorithm
On+an+Algorithm
Abstract─Electrocardiogram (ECG) signal provides the valuable implemented for R-peak detection. They are of finite duration
information for detection of abnormal heart disease. Detection of and non stationary in nature. Hence, a technique likes Fourier
QRS complexes is the first step towards recognition of heart series (based on sinusoids of infinite duration) is inefficient
disease from the ECG signal. ECG would be much more useful as
for ECG signal analysis. On the other hand wavelet, which is a
a diagnostic tool if unwanted noise embedded in the signal is
removed. The aims of the work are to (i) ECG signal
very recent addition in this field of research, provides a
enhancement using empirical mode decomposition (EMD) based powerful tool for extracting information from such signals.
method. (ii) Detection of QRS complexes using continuous
wavelet transform method from the enhanced signal. The The paper is organized as follows: Section II describes the
experiments are carried out on MIT-BIH database. The results theoretical background which includes empirical mode
show that our proposed method is very effective and an efficient decomposition and continuous wavelet transform. Section III
method for fast computation of R peak detection. shows the methodology of the proposed technique,
experimental results and analysis are described in Section IV
Keywords: ECG signal, MIT-BIH Arrhythmias database, Empirical
and Section V represents the conclusions for this paper.
mode decomposition, Wavelet transform, QRS detection.
I.INTRODUCTION
ECG Signal
R peak detection
R peaks
Enhancement
ECG signals being non-stationary in nature, it is very difficult Fig.1 Block diagram of the proposed method
to visually analyze them. Thus the computer based method is
required for ECG signal analysis. II.BACKGROUND
Transmission of ECG often results in the corruption of signal
due to introduction of noise [1]. Various factors are A. Empirical Mode Decomposition Method (EMD):
responsible for introduction of noise including poor channel
conditions, Baseline wander (caused by respiration), 50 or 60 A new non-linear technique, called empirical mode
Hz power line interference etc. Analyzing such a noisy signal decomposition method, has recently been developed by
is bound to give erroneous results. Thus the signal is first N.E.Huang et al for adaptively representing non-stationary
made free of noise, a process called denoising or rather we signals as sums of zero mean AM-FM components [2]. EMD
may call it enhancement. A number of methods have been is an adaptive, high efficient decomposition with which any
incorporated for enhancement of ECG signal. These are filter complicated signal can be decomposed into a finite number of
banks, neural network, adaptive filtering etc. Empirical Mode intrinsic mode functions (IMFs). The IMFs represent the
Decomposition is a recent development which provides a oscillatory modes embedded in the signal, hence the name
powerful tool for decomposing a signal into a finite number of intrinsic mode function. The starting point of EMD is to
IMFs (intrinsic mode functions). ECG analysis basically consider oscillations in signals at a very local level. It is
involves QRS complex detection and subsequent feature applicable to non-linear and non-stationary signal such as
extraction. The block diagram of the proposed method is ECG signal. An intrinsic mode function is a function that
shown in Fig. 1. However, the basic principle of all the satisfies two following conditions [2].
methods involves the transformation of ECG signals using
different transformation techniques including Fourier (i) The number of extreme and the number of zero
transform, Hilbert transform, wavelet transform etc. crossings must differ by at most 1.
Physiological signals like ECG are considered to be quasi- (ii) At any point the mean value of the envelope defined
periodic in nature. Various approaches have been by maxima and the envelope defined by minima
must be zero.
A systematic way to extract the IMFS is called the sifting Wavelet transforms are applied to decompose the signal
process and its algorithm is given below into a set of coefficients that describe the signal frequency
i) Identify all the extremes of x (t). content at given times.
ii) Interpolate between minima, ending up with a signal
min(t) and similarly between extreme to give max(t). The continuous wavelet transform of the signal, x(t), is
iii) Compute the average: defined as [5].
e(t)=(min (t)+max (t))/2
iv) Extract the detail: d(t) = x(t)-e(t) (Steps 1-4 are
repeated till d(t) satisfies both the criteria of IMF)
v) Iterate on the residual e(t) ∞
1 t −b
In practice, after a certain number of iterations, the resulting
F ( a, b ) =
a ∫ x(t ) *ψ (
−∞
a
)dt (1)
The nstd is set between 0.2 and 0.3 for proper results [3]. 1 t −τ
The sifting process was applied on an ECG signal to
ψ s ,τ
(t ) =
s
ψ(
s
) dt (2)
obtain the various IMFs. This has been represented in Fig. 2.
Here τ is the scaling factor and √ (1/s) is for normalization
The EMD method is a powerful tool for analyzing ECG
across the different scales. Due to the scaling and translation,
signal. It is very reliable as the base functions depend on the
Wavelet Transform is localized in both time and frequency.
signal itself. It is very adaptive and avoids diffusion and
Several Mother Wavelets like Mexican-hat and Morlet have
leakage of signal.
been used in ECG signal analysis. The mother wavelet has a
1
lot of significance for the efficiency of the process. In this
ECG 0
-1 paper we have used a Haar Wavelet as the mother wavelet
0 100 200 300 400 500 600 700 800 900 1000
0.5
0
because the oscillatory nature of other mother wavelets results
IMF1
-0.5 in several ridges for each ECG component, while only one
0 100 200 300 400 500 600 700 800 900 1000
1 pair of ridges is generated via the Haar wavelet due to its
IMF2 0
-1
0 100 200 300 400 500 600 700 800 900 1000 configuration. The Haar mother wavelet function Ψ(t) as
IMF3 1
0
-1 shown in Fig. 2 can be described as:
0 100 200 300 400 500 600 700 800 900 1000
IMF4
0.5
0 Ψ(t) = 1 0 ≤ t < 1 /2
-0.5
0 100 200 300 400 500 600 700 800 900 1000
IMF5
0.5
0
= -1 1/ 2 ≤ t < 1
-0.5
0 100 200 300 400 500 600 700 800 900 1000
IMF6 0.1
=0 otherwise
0
-0.1
0 100 200 300 400 500 600 700 800 900 1000
-0.05
IMF7 -0.1
-0.15
0 100 200 300 400 500 600 700 800 900 1000
No.of Samples
Clean ECG
0 [a]
i. The ECG signal is first decomposed into IMFs. The
sum of these IMFs should represent the signal well. -1
0 200 400 600 800 1000 1200 1400 1600 1800 2000
The IMFs are obtained using the sifting process
1
described in the earlier section.
Noisy ECG
ii. The first four IMFs are removed by using low pass 0 [b]
frequency response.
0 [c]
iii. The 1st IMF is now eliminated. We reconstruct the
enhanced signal by eliminating the 1st IMF and -2
0 200 400 600 800 1000 1200 1400 1600 1800 2000
adding up the rest IMFs. No.of Samples