Sei sulla pagina 1di 5

International Journal of Emerging Trends in Signal Processing

ISSN(2319-9784) IJETSP , Volume 1 , Issue 3 March 2013




http://


Detection of Heart Blocks by Cardiac Cycle Extraction
using Time- Scale Analysis
A. Mukherjee
Department of Electronics & Communications Engineering
University of Engineering & Management, Jaipur, India
anandar upmukher j ee@gmai l . com

Abstract This paper proposes a method of detecting heart
blocks by visual analysis of overlapping ECG recordings of
individual cardiac cycles. The cardiac cycles from the ECG of a
subject are extracted using Continuous Wavelet Transform
based QRS complex detection technique and each cardiac cycle is
plotted over the previous one allowing one to visually and hence,
quickly analyze the correlation between the recorded cardiac
cycles and perceive the degree of randomness of the normally
quasi- periodic ECG signal without the use of classifiers.

Keywords Electrocardiogram, Continuous Wavelet
Transform, QRS Complex Detection, Cardiac Cycle Extraction,
Heart Blocks.
I. INTRODUCTION
Cardiology has evolved to its present state mainly due to
the various signal processing techniques applied in
conjunction with the biological concepts. Presently, whatever
we know of the cardiac functions is mostly due to the
biological signal processing technique called
electrocardiography (ECG). ECG is a two dimensional
representation of the cardiac potentials plotted with respect to
time. The ECG signal is quasi- periodic as it is a combined
function of different waves, each wave signifying the
functioning of a particular part of the human heart. The ECG
wave for a single cardiac cycle is divided into three categories
viz.: P, QRS and T (fig. 1). These waves occur after regular
intervals of time. Deviation of the ECG waves or their time
intervals from the regular pattern signifies problems in the
heart. The detection of this deviation is the essence of ECG.
The P wave represents atrial repolarization and depolarization.
The QRS wave represents ventricular repolarization and the T
wave represents ventricular depolarization. The time taken for
the complete generation of a normal P wave is about 80ms to
100ms. The QRS wave duration is approximately 120ms wide.
Any ambiguity in these intervals can broadly identify most of
the cardiac diseases; further analysis of the wave morphology
can even pinpoint the location and cause of the cardiac
abnormality.
Increasing cases of cardiac diseases around the world is of
major concern and requires immediate attention, therefore the
detection and diagnosis of these diseases is important. The
huge amount of data generated every day is too much for
humans to analyze alone, hence automated analysis of these
signals is very crucial. The first step in the analysis of ECG
signals is the removal of noise from the recorded signals. The
noise in ECG signals is mainly due to power line interference
which is in the range of 50Hz to 60Hz; other noises are
motion artifacts due to electrode and skin interface, muscle
noise and noise from other electrical equipment near the ECG
machine. The second stage is the detection of the R- peak or
the QRS complex. The P and T waves are detected with
respect to the R- peak. The later stages may include analysis
of the wave time intervals such as PR interval, RR interval,
ST interval, etc. The final stages mostly include the use of
classifiers to automatically segregate the detected signals into
various categories.
The automated detection of cardiac cycles by analyzing
ECG recordings has reached an advanced stage with the
emergence of a lot of powerful and robust algorithms and
tools. These algorithms are mostly based on Time- frequency
analysis of the ECG signals, more specifically, the discrete
wavelet transform (DWT) [1] [2] [3]. This paper proposes a
method of extracting all the cardiac cycles individually from
ECG recordings containing multiple cardiac cycles and

Fig. 1: An ECG representation of a single cardiac cycle showing all
the waves and intervals.


Fig. 2: Overlapping, singular cardiac cycle ECG for an arrhythmic
heart with no heart block.

12
International Journal of Emerging Trends in Signal Processing
ISSN(2319-9784) IJETSP , Volume 1 , Issue 3 March 2013


http://ijetsp.info/article/IJETSPV1I302.pdf


overlapping them to visually compare and detect
abnormalities in the heart using Continuous Wavelet
Transforms (CWT). A normal heart will have regular time
intervals and regular wave morphology; when overlapped,
almost all of the cardiac cycles will form a regular wave
boundary not deviating much from each other (fig.2). A heart
with cardiac abnormalities will produce an output which has
no clear wave boundaries and is random and garbled (fig.3);
higher the randomness in the pattern, higher is the degree of
heart abnormality, indicating the absence of regular rhythms.

A. ECG Intervals
The normal ECG wave intervals of a healthy person have
the following characteristics: a PR interval lying within 120ms
to 200ms time interval, a QRS complex of duration less than
120ms and a QT interval lying between 400ms to 440ms.
Long PR intervals are generally associated with heart blocks
and fascicular blocks [4] [5]; QRS complexes with longer
duration are associated with bundle branch blocks and long
QT intervals are generally associated with myocardial
infarction or myocardial disease. Long QT intervals are
sometimes due to the effect of certain drugs such as sotalol
and amiodarone [4].

B. Wavelet Transform
Traditional signal processing techniques such as Fourier
Transform is able to detect the frequencies present in a time
domain signal; its major drawback lies in the fact that it
cannot localize the positions of occurrence of these
frequencies, thus, the need for Wavelet Transform. Wavelet
Transform is effective in localizing a signal in both time and
frequency domain. It consists of two major operations of time
shifting and dilation [6]. In time shifting operation, an
analyzing wavelet of fixed window length called the mother
wavelet is convoluted with the time- domain signal for the
signal length of 0 toL

[6]. The analyzing window is shifted
along the time axis and again convolved with the time domain
signal for the next window length from L to L 2 . This process
is repeated until the whole range of the signal has been
analyzed. The second operation of dilation repeats the above
time shifting process with a reduced window length. The
reduction in window length is also called scaling. The scale is
directly proportional to the inverse of frequency. Larger the
window length, higher is the probability of detecting changes
in low frequency signals and smaller window length detects
changes in signals of higher frequencies with greater
probability. The range of scales and the type of analyzing
wavelet, also called the wavelet family, is generally based on
the users discretion and the type of signal to be analyzed. The
CWT of a continuous square integrable function ) (t x at a scale
0 > a and a translational value or window lengthb is given by:


= dt
a
b t
t x
a
b a X

) (
1
) , (
(1)
Where ) (t is continuous in both time and frequency
domain and is also known as the mother wavelet, which is
responsible for generating dilated copies of itself based on the
value of scalesa . The dilated versions of the mother wavelet
are known as daughter wavelets. The transformed signal is
generally plotted in a 2D plot called a scalogram plot. A
scalogram plot has scales on one axis and time on the other.
The values of coefficients are represented in colored spectrum
with violet having the lowest value and red having the highest
value (fig. 4).

C. Database
The work for this paper is done on the freely available
MIT- BIH Arrhythmia database (mitdb). This database
contains dual channel, long term ECG recordings of patients
from mixed age groups and both genders. The patients
medical history is provided with the database along with the
analysis and diagnosis of the ECG signals by a specialist. The
signals are sampled at a sampling rate of 360 samples per
second with 11 bit resolution over a 10 millivolt range [7] [8].

Fig. 3: Overlapping, singular cardiac cycle ECG for an arrhythmic
heart with block.


Fig. 4: A time domain ECG signal and its corresponding scalogram
plot.

13
International Journal of Emerging Trends in Signal Processing
ISSN(2319-9784) IJETSP , Volume 1 , Issue 3 March 2013


http://ijetsp.info/article/IJETSPV1I302.pdf


II. METHODOLOGY
The signals from the MIT-BIH Arrhythmia database is
analysed by CWT using Symlet6 family of wavelets for a
scale range of 1 to 130. The Symlet 6 wavelet closely
resembles a normal ECG pattern and hence, provides greater
accuracy in detection of abnormalities in ECG signals using
CWT [9]. The wavelet coefficients generated are used for
locating the start and end of individual QRS complexes in the
ECG signal [10].

A. QRS Complex Detection
The time domain ECG signal is converted to time- scale
domain using CWT. The position of the maximum coefficient
generated ) (MAX POS is selected as reference. Positions of
other coefficients, ) ( ts coefficien POS , are selected based on
the criteria in (2) below.
if end
ts coefficien POS
else
ts coefficien POS
MAX POS ts coefficien POS if
; 0 ) (
; 1 ) (
) ( 55 . 0 ) (
=
=

(2)

) ( ts coefficien POS forms an array which has unit amplitude
along the time axis whenever QRS complex is encountered,
otherwise it has zero amplitude. To rectify erroneous multiple
detection or multiple detection within a single QRS complex,
a checking operation has been provided based on the
following criteria:
end
CNT PEAK CNT PEAK
i POS i POS while
; 1 _ _
50 ) ( ) 1 (
+ =
> +
(3)

The positions between two detected complexes should be at
least 50 samples which roughly equals to 0.13 seconds, as the
sampling rate of the database is 360 samples per second and
multiple QRS complexes cannot lie within each other. The
start and end positions of the detected QRS complexes are
recorded and stored in two separate arrays, namely
loc START _ and loc END _ respectively. The output of the
above method is shown in fig.5.

B. Estimation of P and T waves
The positions of P and T waves can be approximated by
simple arithmetic operations. The array containing the
location of the start of QRS complexes and the array
containing the locations of the end of the QRS complexes are
element-wise averaged and stored in an array named
loc MEAN _ as shown in (4).
2
) ( _ ) ( _
) ( _
i loc END i loc START
i loc MEAN
+
= (4)
It is known that the PR interval of a normal ECG has a
maximum duration of 0.2 seconds. Since, this method deals
with detection of abnormalities of the ECG signals, a PR
interval of 0.3 second is considered as worst case scenario
value. Similarly, a QT interval value of 0.44 seconds is
considered. The signal is sampled at a rate of 360 samples per
second, which gives a boundary value of 108 samples and 150
samples for PR and QT intervals respectively. Single cardiac
cycles are extracted from the time domain ECG signal based
on the criteria in (5) and (6) below.

Fig. 5: Time- domain ECG signals (blue) with detected QRS
complexes (green) superimposed on it.

MIT- BIH Arrhythmia Database
Continuous Wavelet Transform
Family= symlet6
Scales=1:130
QRS Complex Detection
Estimate location of P and T waves
from sampling rate
Extract single cardiac cycles from
the long term ECG signal
Store each cardiac cycle in an array
Plot all the cardiac cycles, one over
the other.
Fig. 6: Flowchart for extraction of singular cardiac cycles from long
termECG recordings.

14
International Journal of Emerging Trends in Signal Processing
ISSN(2319-9784) IJETSP , Volume 1 , Issue 3 March 2013



http://ijetsp.info/article/IJETSPV1I302.pdf



108 ) ( _ ) ( _ = i loc MEAN i start CC (5)
150 ) ( _ ) ( _ + = i loc MEAN i end CC (6)
The flowchart for the above process is given in fig.6 which
gives an overview of the QRS complex detection and cardiac
cycle extraction process mentioned in this paper.
III. RESULTS
The results of application of the aforementioned method are
shown in figs. 7 to 10. Select records from the MIT-BIH
Arrhythmia database are chosen to test the method. One set
contains arrhythmic patients having no heart blocks and the
other set has arrhythmic patients with major blockage of heart.
The first set contains records 100 and 102. The record ID 100
contains significant instances of atrial premature contraction
(APC) and premature ventricular contraction (PVC). Record
ID 102 contains paced beats and pacemaker fusion beats. The
second set contains records 107 and 111. Record ID 107 has
complete heart blockage and ID 111 has first degree AV block.
The diagnosis is provided along with the database itself. Fig. 7
shows the overlapping cardiac cycles of record ID 100. The
time intervals of the cardiac cycles are more or less same;
hence, a neat boundary is achieved. Fig. 8 shows the
overlapping cardiac cycles of record ID 102. The patients
ECG has elevated ST segments and diminished QRS
complexes, but no heart block. The time intervals of the
patients cardiac cycle are almost the same; hence, again a
clear boundary has been achieved.
The overlapping cardiac cycle plot of record ID 107 is
shown in fig. 9. The patient is suffering from complete heart
block causing the plot to be garbled and with no clear and
uniform boundary. Fig. 10 contains the plot of record ID 111,
suffering from 1
st
degree AV block. Just like the previous
figure, this figure has no clear boundaries due to changes in
the time intervals caused by blocked conduction of the Atrio-
Ventricular (AV) node. This type of block causes a delay in
the completion of some of the cardiac cycles, causing the
normally overlapping and constant intervals to vary from the
regular intervals.
IV. CONCLUSION
Figs. 7 and 8 clearly show that the cardiac cycles are being
accurately extracted and all the time intervals within a cardiac
cycle such as the PR interval and the QT interval overlap in
the consecutive plots of the cardiac cycles, forming a single,
clearly cognizable boundary. The plot in Fig.7 has some of the
cardiac cycles with higher wave amplitudes than the other
cardiac cycles but the time intervals overlap perfectly. This
ambiguity in the cardiac amplitudes is due to the presence of

Fig. 7: Overlapped plot of extracted cardiac cycles for record ID 100
indicating absence of cardiac blocks.


Fig. 8: Overlapped plot of extracted cardiac cycles for record ID 102
indicating absence of cardiac blocks.


Fig. 9: Overlapped plot of extracted cardiac cycles for record ID 107
indicating the presence of cardiac blocks.


Fig. 10: Overlapped plot of extracted cardiac cycles for record ID 111
indicating the presence of cardiac blocks.

15
International Journal of Emerging Trends in Signal Processing
ISSN(2319-9784) IJETSP , Volume 1 , Issue 3 March 2013


http://ijetsp.info/article/IJETSPV1I302.pdf


baseline wander noise present in the signal as seen in fig.11.
Figs. 9 and 10 have no single cognizable wave boundary due
to the presence of multiple QRS complexes within the plot
area. Since, the record IDs 107 and 108 suffer from heart
blocks, the plots in fig. 9 and fig. 10 show absence of regular
time intervals, causing the extracted cardiac cycles to deviate
vastly from each other.
This paper proposes a method for quick analysis of the
ECG signals visually and without any numeric calculation of
intervals, so that even a non- specialist can judge the condition
of the heart just by looking at the plot of the cardiac cycles.
However, for specific and detailed diagnosis of the heart, the
involvement of a cardiac specialist is a must.
ACKNOWLEDGMENT
The efforts of Prof. K. K. Ghosh in the Department of
Electronics and Communications Engineering at the Institute
of Engineering and Management, Kolkata and Dr. K. K.
Mukherjee, Inspector General (Medical), ITBP, New Delhi,
India are gratefully acknowledged for their constant guidance
and assistance with my work.
REFERENCES
[1] S.Z. Mahmoodabadi, A. Ahmadian, M.D. Abolhasni, M.Eslami, J .H.
Bidgoli, ECG Feature Extraction based on Multiresolution Wavelet
Transform, Procedings of the 2005 IEEE Engineering in Medicine and
Biology 27
th
Annual Conference, Shanghai, China, Sep 1-4, 2005
[2] A. Pachauri, M. Bhuyan, Robust Detection of R- Wave Using Wavelet
Technique, World Academy of Science, Engineering and Technology
56, 2009, p.901-905.
[3] A. Mukherjee, K.K. Ghosh, An Efficient Wavelet Analysis for ECG
Signal Processing, IEEE Xplore, 2012, DOI:
10.1109/ICIEV.2012.6317419, p.411- 415.
[4] www.ecglibrary.com/norm.htm
[5] Leo Schamroth, An Introduction to Electrocardiography, Oxford
University Press, SBN: 0 19 562790 3
[6] R. Polikar, The Wavelet Tutorial, Part
IV,www.cs.ucf.edu/courses/cap5015/WTpart4.pdf, 2008
[7] Goldberger AL, Amaral LAN, Glass L, Hausdroff J M, Ivanov PCh,
Mark RG, Mietus J E, Moody GB, Peng C-K, Stanley HE, PhysioBank,
PhysioToolkit and PhysioNet: Components of a New Research
Resource for Complex Physiologic Signals. Circulation 101(23):e215-
e220, [Circulation Electronic Pages;
http://circ.ahajournals.org/cgi/content/full/101/23/e215]; 2000 (J une
13).
[8] http://physionet.org/physiobank/database/html/mitdbdir/mitdbdir.htm
[9] A. Mukherjee, S. Chatterjee, k. Chattopadhyay, K. K. Ghosh, A
Comparative Study on the Accuracy of ECG Detection for Arrhythmia
by Different Wavelet Families, IEMIJ MT, Vol.2 No.1, J an. 2012, p.93-
98.
[10] A. Mukherjee, K.K.Ghosh, A Noise Independent Approach to QRS
Complex Detection using CWT, communicated to the International
Conference on Informatics, Electronics and Vision, 2013, Dhaka,
Bangladesh, 2013.

Fig. 11: A time domain plot of the ECG recordings for record ID 100,
showing the presence of baseline wanders in the signal.

16

Potrebbero piacerti anche