Вы находитесь на странице: 1из 4

2nd International Conference on Electrical and Information Technologies ICEIT’2016

Adaptive ECG Wavelet analysis for R-peaks


detection
Mounaim AQIL 1, Atman JBARI 2 , Abdennasser BOUROUHOU 3
Electrical Engineering Research Laboratory
High School of Technical Education (ENSET), Mohamed V University
Rabat, Morocco
1
mounaimaqil@hotmail.fr
2
atmjbari@gmail.com
3
a.bourouhou@um5s.net.ma

Abstract— The Electrocardiogram has been established as In this work we propose a new method based on
a powerful diagnostic tool in medicine which provides continuous wavelet transform with an automatic decision of
important information about the patient’s heart condition. scale selection corresponding to the maximum energy of the
The feature extraction of ECG such as R-peak detection is ECG signal.
highly useful in cardiology. Continuous Wavelet
The article is organized as follows. A background theory
transform based methods present best performance as
is given in the section II, while an algorithm for R-peak
irregularity measures and makes them suitable for ECG
detection based on CWT coefficients is given in the section
data analysis. In this work we propose a new method for
III. The section IV is reserved for the simulation results and
R-peak detection based on continuous wavelet coefficients.
discussion. Finally conclusion and future scope are
The core of our method is to select automatically the
presented in section V.
analysis scale corresponding to maximum energy of ECG
signal instead to consider all scales. In order to validate II. THEORY BACKGROUND
this method we apply it to several from apnea’s database
records. This new algorithm can be used to extract other
a- Morphology of ECG signal
features of ECG signals.
The electrical activity of the heart is represented by the ECG
Keywords— ECG, continous wavelet transform, Mortelet, R- signal. The ECG trace is essentially a periodic waveform as
peak detection shown in figure 1 [2].

I. INTRODUCTION
Electrocardiography is considered to be one of the most
powerful diagnostic tools in medicine that is routinely used
for the assessment of the functionality of the heart. The R-
peak detection is the crucial first step in every automated
algorithm for ECG analysis.
The earlier method of ECG signal analysis [1] was based
on time domain method. But this is not always sufficient to
study all the features of the ECG signal. So the frequency
components of a signal are required. To accomplish this,
Fast Fourier Transform (FFT) technique is applied. But the
unavailable limitation of this FFT is that the technique Fig.1. ECG representation in Time-domain [2]
failed to provide information regarding the exact location of
frequency components. The immediate tool available for One period of the ECG waveform represents one cycle
this purpose is the Short Term Fourier Transform (STFT), of the blood transform process from the heart of the arteries.
but the major drawback of this STFT is that its time- One cardiac cycle in ECG consists of P- QRS - T waves. P-
frequency precision is not optimal. Hence, we opt a more wave is a low voltage deflection away from the baseline
suitable technique to overcome this drawback. Among the caused by depolarization of the atria. QRS complex is the
various time-frequency transform, the wavelet transform is largest amplitude portion of the ECG caused by vertical
found to be simple and more valuable. depolarization thereby the cardiac muscle is prepared for the

978-1-4673-8469-8/16/$31.00 ©2016 IEEE


2nd International Conference on Electrical and Information Technologies ICEIT’2016

next cycle of the ECG. Most of the clinically useful III. ALGORITHM FOR R-PEAKS DETECTION BASED ON
information of the electrocardiogram (ECG) is found in the CWT COEFFICIENTS
intervals and amplitude defined by its features. The steps of the proposed algorithm are given in figure 2.
The ECG parameters are summarized in the following
tables

Wave Amplitude Reading and normalizing


P wave 0.25 mV the ECG signal
R wave 1.6 mV
Q wave 25% of R wave
T wave 0.1 – 0.5 mV
Evaluating the time-
Table 1. Amplitude of different waves frequency content

Interval Duration in seconds


R-T 0.12 – 0.2
Q-T 0.35 – 0.44 Localizing the maximum
S-T 0.05 – 0.155 CWT coefficients
P wave 0.11
QRS 0.09
Table 2. Duration of different intervals Automatic selection of a
scale corresponding to a
b- Continuous wavelet transform maximum energy
An efficient method of providing localization of a
signal in both time and frequency domain is given by
Wavelet Transform. Wavelet Transform (WT) is basically a
time-scale representation of continuous-time signals. A Maximum wavelet analysis
continuous wavelet transform (CWT) of a function x(t)∈ at a selective scale
L2(ℜ) and a wavelet ψ(t) is defined as [3, 4] :

( , )= ( ) ∗ ( ) (1)
,
R-peak detection
Where:
Fig.2. Steps of the proposed algorithm
, ( )=

(2)
In this algorithm the wavelet coefficients are exploited
And (ℜ) is a one-dimensional vector space of functions
to compute the following distributions:
which are measurable and integrable in a sense of the mean
square, σ is a scale parameter and τ a shift.
- Time-frequency content: evaluate the energy
( ) of the signal ( ) presented at the time
The scale can be converted to frequency (1/ reflects
the frequency). The τ parameter represents the location of based on the result coefficient ( , ),
the wavelet along the time axis. = 1, ⋯ , of the applied transform. It can be
In order to be a wavelet, the function ψ(t) must be limited in expressed as,
time and satisfy the following condition [5, 6, 7]:
( )= | ( , )| (4)
Ψ( )| = ( ) |
= ( ) (3) - Relative Time-frequency content: to study the
=0 most important contribution at each time point
, we propose to evaluate the rate of absolute
The concept of a continuous wavelet transform (CWT) maximum coefficient and the total energy as
requires the continuous scale and continuous shift in time. follow,
max ( | ( , )| ) ,⋯,
( )= (5)
( )
2nd International Conference on Electrical and Information Technologies ICEIT’2016

IV. SIMULATION RESULTS AND DISCUSSION 1

In the first step, the algorithm reads the ECG signal 0.5

ECG-Amplitude
imported from apnea database [8], with 100 samples per
0

-0.5

second and 16 bits per sample. We normalize the ECG -1


0 1 2 3 4 5 6 7 8 9 10

signal according parameters given in .info file of the file 1


time (s)

record. Then, we apply the continuous wavelets transform to

Selectd Wavelet Coeff


0.8

decompose into wavelet coefficients. 0.6

0.4

For this purpose, the signal is decomposed into 32 0.2

successive scales using a Mortlet’s wavelet. We choose this 0


0 1 2 3 4 5
time (s)
6 7 8 9 10

mother wavelet for the given reasons [9]: Fig.5. analysis at selected scale.
- Morlet’s wavelet shows balanced time and fre-
quency widths and a reduced frequency overlap. In the remaining steps we do a mean computation of
- The good results obtained in ECG analysis by this wavelet analysis at a selected scale. Then after we localize
the R-peaks which coincide with the peaks in the vector
basic wavelet could be explained by the significant
containing the means values of wavelet coefficients.
meaning of the presence of synchronous relative The simulation result of this step is given in figure 6.
maxima in the wavelet transform, due to the
relatively smaller information redundancy of the 1
ECG Signal

scale. 0.8
Selected Scale Wavelet Analysis

The simulation result is given in figure 3. 0.6

0.4
ECG signal
1

Amplitude
0.2
0
0
-1
0 100 200 300 400 500 600 700 800 900 1000
Continuous wavelet analysis
-0.2
30
20
-0.4
10

100 200 300 400 500 600 700 800 900 1000 -0.6
Square CWT
10
-0.8
5 0 1 2 3 4 5 6 7 8 9 10
time (s)
0
0 100 200 300 400 500 600 700 800 900 1000

1
Relative Square CWT Fig. 6. R-peak .detection
0.5

0
0 100 200 300 400 500 600 700 800 900 1000
In order to evaluate the performance of the algorithm,
Fig. 3. Time-frequency content we applied it to different apnea ECG records. The results are
summarized the table given below.

In the second step the program extracts the maximum Record Selected Total Beats Recogniti Recognition
wavelet analysis coefficients at each time point. The No scale beats correctly on time in
simulation result of this step is presented in figure 4. Recognized accuracy seconds
in %
a01 6 11 11 100 1.015797
1
a04 7 14 14 100 1.019833
ECG-Amplitude

0.5
0 a05 7 11 10 90.9 1.083395
-0.5
-1
a06 5 9 9 100 1.086968
0 1 2 3 4 5 6 7 8 9 10
time (s) a07 7 12 12 100 1.122287
Max Wavelet Coeff

1
a08 6 15 14 93.33 1.143988
0.5
a09 7 12 12 100 1.111464
0
0 1 2 3 4 5 6 7 8 9 10 a10 7 10 9 90 1.116375
a11 6 10 10 100 1.107610
time (s)
40

a12 4 14 14 100 1.149721


Max Scales

30
20
10 a13 6 13 13 100 1.139319
0
0 1 2 3 4 5
time (s)
6 7 8 9 10
a14 6 12 11 91.66 1.170935
a15 10 10 10 100 1.026949
Fig. 4. Maximum wavelet coefficients
a16 6 13 13 100 1.084633
a17 9 12 10 83.33 1.100998
In order to select automatically the scale in which the a18 6 11 11 100 1.020436
analysis will be done the algorithm computes the peaks in average 6.5625 11.8125 11.4375 99.1666 1.09
maximum wavelet coefficients vector and looking for all the
scales corresponding to these peaks. An averaging of these Table 3. R-peak detection result
scales gives us the selected scale.
The simulation result of this step is presented in figure 5. In this table, for each record the proposed algorithm
computes the selected scale in which the analysis is
2nd International Conference on Electrical and Information Technologies ICEIT’2016

conducted. Consequently, we evaluate the recognition


accuracy and the time recognition.
V. CONCLUSION
In this work we presented a new R-peak detection algorithm
based on continuous wavelet transform. The core of this
algorithm is an automatic selection of one scale on which
the ECG signal analysis can be done to localize the R-peak.
The automatic selection of the scale is based on learning the
maxima of coefficients transform and their position in the
time domain. The algorithm was tested on multiple ECG
records and gave a 99.16% average recognition. In the other
hand the average recognition time is 1.09 seconds what
promises second operation of the algorithm in the real-time
detection.
Perspective can be considered to extract other features of the
ECG signal (waves P, T, Q and S points) based on the
continuous wavelet transform coefficients.

REFERENCES
[1] V.Sukanya et al. ECG signal Analysis using wavelet transform.
Bulg.J.Phys.35(2008)68-77.
[2] V. Scena and J. Yomas. A review on feature extraction and denoising of
ECG signal using wavelet transform. 2nd International Conference on
Devices, Circuits and Systems (ICDCS). 2014
[3] ] C. S. Burrus, R. A. Gopinath, H. Guo. Introduction to wavelets and
wavelet transforms: A Primer. Prentice Hall Inc, (1998).
[4] S. Qian, D. Chen. Joint time-frequency analysis. Englewood Cliffs,
N.J., Prentice-Hall, (1996)
[5] L.Cohen. Time–frequency analysis. Prentice-Hall, New York, (1995).
[6] L. Cohen, P. Loughlin. Recent developments in time-frequency
Analysis. Springer, (1998).
[7] C. Heil, David F. Walnut. Fundamental papers in wavelet theory.
Princeton University Press, (2009).
[8] PhysioBank databases [Online]. available:
http://www.physionet.org/physiobank/database/apnea-ecg .
[9] D. Morlet , J.Ph. Couderc , P. Touboul , P. Rubel. Wavelet analysis of
high-resolution ECGs in post-infarction patients: role of the basic wavelet
and of the analyzed lead . International Journal of Bio-Medical Computing
39 (1995) 31 l-325.

Вам также может понравиться