Download as pdf or txt
Download as pdf or txt
You are on page 1of 127

1

Noise Sensitivity Analysis of Different ECG


Detection Algorithms

by
A. B. M. Aowlad Hossain

A Thesis
Submitted to the Department of
Electrical and Electronic Engineering, BVET,
in partial fulfillment of the requirements for the degree of

MASTER OF SCIENCE IN
ELECTRICAL AND ELECTRONIC ENGINEEIUNG

ll~P'l...ij.!.~ill!1
~_
---.-- -
•• ::::::::r
m;:w

DEPARTMENT OF ELECTRICAL AND ELECTRONIC ENGINEERING


BANGLADESH UNIVERSITY OF ENGINE.ERING AND TECHNOLOGY

NOY..EMBER.200S--
t
:/ ~-===~
.. ililmiji,ilim~"r=;;II
er'
•• '11
1 #10103911
., .I
... ..:=-.---= __ _ _ . ~_'_ ...••...•..•_. J

. -.~--
,
The thesis titled Noise Sensitivity Analysis of Different ECG Detection Algorithms
Submitted by A. B. M. Aowlad Hossain Roll No: 040306225 F Session April 2003
has been accepted as satisfactory in partial fulfillment of the requirement for the
degree of Master of Science in Electrical and Electronic Engineering on 26
November 2005.

BOARD OF EXAMINERS

~ 'I-'/II/6S'
I. Dr. Md. Aynal Haque Chairman
Professor (Supervisor)
Dept. ofEEE, BUET, Dhaka

2. Dr. S. Shahnawaz Ahmed Member


Professor & Head (Ex -officio)
Dept. ofEEE, BUET, Dhaka

3. Dr. Newaz Muhammad Syfur Rahim Member


Associate Professor
Dept. ofEEE, BUET, Dhaka

4. Dr. P\. Wa Member


Associate Professor (External)
National Institute of Cardiovascular Diseases
Sher-E-Bangla Nagar, Dhaka

,,
,

••
ii
CANDIDATE'S DECLARATION

It is hereby declared thal this thesis or any part of it has not been submitted elsewhere
for the award of any degree or diploma.

A. B. M. Aowlad Hossain

-iii
ACKNOWLEDGEMENTS

The author would like to express his indebtedness and gratitude to his supervisor Dr.
Md. Aynal Haque for his endless patience, effective supervision and invaluable

assistance in making a difficult task to a pleasant one.

The author wishes to express his thanks and regards to the I-lead of the Department of
Electrical and Electronic Engineering, BUET, Dhaka, for the opportunity to do this

work.

The author also expresses sincere thanks to Dr. A. K. Azad, Professor and I-lead,
Department of Computer Science and Engineering, KUET, Kliulna for his
encouragement in completing the work.

Sincerest gratitude for my family specially to my parents who have always supported

my studies.

Sincerest thanks to friends and colleagues for their encouragement, technical advice
and criticism of the thesis work.

. .

iv
CONTENTS

Acknowlcdgcmcnts iv

Abstract vii
List of Abbreviations viii'
List of Figures ix
List of Tables xl

I INTRODUCTION 1
l.l Historical Background I
1.2 Scope of the Thesis 4
1.3 Organization of the Dissertation 5

2 AUTOMATIC ECG DETECTION TECHNIQUES 6


2.1 Introduction 6
2.2 Electrocardiogram 6
2.2.1 Cardiac Activity 6
2.2.1.1 Cardiac Mechanical System 7
2.2.1.2 Cardiac Electrical System 7
2.2.2 Electrocardiogram Recordings II
2.2.2.1 ECG Standard Leads 11
2.2.2.2 Augmented Limb Leads 12
2.2.2.3 Precordial Leads 13
2.3 ECG Detection Techniques 13
2.3.1 Approaches Based on Derivatives and Digital Filters 14
2.3.2 Wavelet Based QRS Detection 17
2.3.3 Neural Networks as Adaptive Nonlinear Predictors 19
2.3.4 Additional Approaches 20

3 NOISE DESCRIPTION 26
3.1 Introduction 26
3.2 Disturbances of Physiological Origin 26
3.2.1 Baseline Shift 27 .
3.2.2 Muscle Noise 28
3.2 Disturbances of Technical Origin 29
3.2.1 Power Line Noise 29
3.2.2 Electrode Contact Noise 31
3.2.3 Motion Artifacts 31
3.2.4 Noise Generated by Signal Processing Equipments 32
3.2.5 Electrosurgical Noise 32

v
4 SIMULATION STUDY 33
4.1 Introduction 33
4.2 Description of the Database 33
4.3 Realization in MATLAB@ 34
4.4 ECG Signal Characteristics 35
4.5 Noise Simulation 37
4.5.1 Power Line Noise 38
4.5.2 Electromyographic (EMG) Noise 38
4.5.3 Baseline Drift Noise 41
4.5.4 Abrupt Shift Noise 41
4.5.5 Composite Noise 44
4.6 QRS Detection Algorithms 44
4.6.1 Algorithm Parameter Determination 46
4.6.2 Algorithm Based on Amplitude and First Derivative 46
4.6.3 Algorithm Based on First Derivative 48
4.6.4 Algorithm Based on First and Second Derivative 49
4.6.5 Algorithm Based on Digital Fiiter (FIR) 51
4.6.6 Algorithm Based on Digital Filter (IIR) 53
4.6.7 Neural Network Analysis for QRS Detection 56 .
4.6.7.1 -Forwardpass - 58
4.6.7.2 Back-propagation pass 60
4.6.7.3 QRS Detection 62
4.6.8 Wavelet Transform Analysis for QRS Detection 63
4.6.8.1 Discrete Wavelet Transform and Multiresolution
Analysis 65
4.6.8.2 Wavelet Selection 68
4.6.8.3 Wavelet-based Denoising 68
4.6.8.4 QRS Detection 73 .
4.7 Performance Analysis 75
4.7.1 Analysis for Noise free ECG signal 76
4.7.2 Analysis for Power Line Interference Corrupted ECG Signal 81
4.7.3 Analysis for Base Line Drift Corrupted ECG Signal 83
4.7.4 Analysis for Abrupt Base Line Shift Corrupted ECG Signal 85
4.7.5 Analysis for Electromyographic Noise Corrupted ECG Signal 90
4.7.6 Analysis for Composite Noise Corrupted ECG Signal' 95

5 CONCLUSION 102
5.1 Discussions 102
5.2 Future Perspective 104

APPENDIX 105
REFERENCES 112

vi
ABSTRACT

The electrocardiography is fully non-invasive, totally harmless and quick method for
measuring the electrical activity of the heart. Computer based automatic recognition
of electrocardiogram (ECG) characteristic points is necessary to help physicians for
quick and easy diagnosis of cardiac conditions. Because of its specific shape, the QRS
complex serves as an entry point for almost all automated ECG analysis algorithms.
Despite large variety of existing QRS detection algorithms, large diversity of the QRS
complex waveforms and the noise & artifacts accompanying the ECG signals make
no single algorithm universally acceptable. Also, most recent algorithms are not tested
for noise corrupted ECG signal.

In this thes.is, the noise. sensitivities of different QRS detection algorithms are
analyzed for ECG signal taken from MIT-BIH Arrhythmia database. The algorithms
based on amplitude and first derivative (AFD), first derivative (FD), first and second
derivative (FSD), FIR digital filter, IIR digital filter, neural network (NN) and wavelet
transform (WT) are applied to the ECG corrupted with five different types of
synthesized noise with different noise levels. The noise types are electromyographic
(EMG) interference, 50 Hz power line interference, base line drift due to respiration,
abrupt baseline shift and a composite noise constructed from the other noise types.
The noise levels arc 25%, 50%, 75% and 100%. The origin of noises, their'
characteristics and consequently their effects on QRS complex detection are
discussed.

The number of false positives & negatives and the percentage error rate of QRS
complexes detected are calculated for different types 0 f noisy and noiseless E CG.
None of the algorithms are able to detect all QRS complexes without any error for all
of the noise types at the highest noise level. Algorithms based on digital filter (both
FIR and IIR), NN and WT show very small deviation of error rate to power line and
baseline drift noise up to maximum level. Algorithms based on AFD, FD and FSD are'
insensitive to base line drift but sensitive to power line noise of higher level and order
of derivati~e. Algorithms based on derivatives arc very sensitive to abrupt base line
shift and EMG noise and conventional digital filter cannot eliminate these noises also.
Algorithms based on NN and WT show better performance considering all noise
types. Up to 100% of all noise, total 235 datasets (5,37,070 beats) are used to evaluate
the performance. WT based algorithm gives mean percentage error rate of 7.76%
while NN based algorithm gives 7.84%. The result of this study will help to develop a
more robust ECG detector and this will make ECG interpretation system more
effective. .

. vii
List of Abbreviations
ANN Artificial Neural Network
ANS Autonomic Nervous System
AR . Autoregressive
AV Atrio- Ventricular
BUI Beth Israel Hospital
CWT Continuous Wavelet Transform
DF Digital Filter
DWT Discrete Wavelet Transform
ECG Electrocardiogram
EMG Electromyogram
FIR Finite impulse response
FIXTHRES Fixed Threshold
FFT Fast Fourier Transform
GA Genetic Algorithm
HF High frequency
HMM Hidden Markov Model
HR Heart rate
HRV Heart rate variability
IIR Impulse Response Filter
LBBB Left Bundle Branch Block
LF Low frequency
LMS Least mean square
LVQ Linear Vector Quantization
MIT Massachusetts Institute of Technology
MLP Multi Layer Perceptron
NN Neural Network
QMF Quadrature mirror filter
QRS Q-, R-, and S-waves in electrocardiogram
RBBB Right Bundle Branch Block
SA Sino-Atrial
SD Standard deviation
SOM Self Organizing Map
STFT Short Time Fourier Transform
SURE Stein's Unbiased Risk Estimate
TFR Time Frequency Representation
TLFN Time Lagged Feedforward Network
WT Wavelet Transform
,

viii
List of Figures
2.1 The mechanical and electrical components of the heart 7
2.2 ECG tracing over time 8
2.3 The physiological correspondence between the cardiac cycle and the
ECG signal 8
2.4 Einthoven's triangle showing how leads I, II, and III are recorded II
2.5 12-Lead ECG. A diagram illustrating the position and combinations
of the 12 leads electrocardiogram recordings 12
2.6 A sample Daubechies Wavelet 17
2.7 Multi-layer perceptron 19
2.8 LVQ Network 20
2.9 Prediction Filter 21
3.1 Base line shifted ECG Signal 28
3.2 ECG signal corrupted with muscle (EMG) noise 29
. 3.3 a) Power line interference in ECG signal. b) Frequency spectrum of
power frequency noisy ECG signal 30
3.4 Abrupt base line shift in ECG signal 31
4.1 a) Time and frequency domain representation for one period of an
electrocardiogram signal. b) Time and frequency domain
representation Spectrum of a signal containing many' beats of an
electrocardiogram 36
4.2 ECG corrupted by power line noise of different levels;
(a) 25%, (b) 50%, (c) 75% and (d) 100% 39
4.3 ECG corrupted by electromyographic noise of different levels;
(a) 25%, (b) 50%, (c) 75% and (d) 100% 40
4.4 ECG corrupted by baseline drift noise of different levels;
(a) 25'Yo, (b) 50%, (c) 75% and (d) 100% 42
4.5 ECG corrupted by abrupt baseline shift noise of different levels;
(a) 25%, (b) 50%, (c) 75% and (d) 100% 43
. 4.6 ECG corrupted by composite noise of different levels;
(a) 25%, (b) 50%, (c) 75% and (d) 100% 45
4.7 Response for First Derivative filter 47
4.8 ECG Signal and its First Derivative 47
4.9 Response for Parabolic Smoothing filter 48
4.10 ECG Signal and Parabolic Smoothing filter output 48 '
4.11 Response for Moving Average Filter 49 .
4.12 a) ECG Signal b) Rectified first derivative signal c) Output of
Moving Average Filter d) Rectified second derivative signal e) Sum
of (c) and (d) . 50
4.13 Response for Low Pass Filter (FIR) 51
4.14 a) ECG Signal b) Output of Moving Average Filter c) Output of
Low Pass Filter d) Square of Output to Input Difference of Low Pass
Filter e) Enhancement ofQRS Peaks t) Pruning of False Peaks 52
4.15 Process involved in the QRS detection algorithm 53
4.16 Response for Low Pass Filter (IIR) 54
4.17 Response of High Pass Filter 54
4.18 The relationship of a QRS complex to the moving average

ix
waveform: ECG signal and Output of the moving average filter. QS:
QRS width. W: width of the moving average filter 55
4.19 a) The digitized ECG signal, b) after band pass filtering. c) after
band p ass filtering and differentiating. d) after band pass filtering,
differentiating and squaring. e) the final process; after band pass
filtering, differentiating, squaring and moving average filter 56
4.20 Functional Description of a Single Neuron 57
4.21 A 3-2-2 Configured Multilayer Perceptron with Direct Input-Output
Connection 57
4.22 Block Diagram of the Detection Algorithm 58
4.23 The Time Lagged Feedforward Network 59
4.24 Mean Square Error vs. Epoch Curve during training 62
4.25 a) Noisy Signal b) Noise Removing by NN c) Averaging and
Smoothing d) Match Filtered Signal 63
4.26 Equivalent frequency response of DWT at different scales 65.

4.27 Filter Bank Implementation of DWT. a) Decomposition


b) Reconstruction 66
4.28 Soft-threshold function
,
69
4.29 a) C oif2 scaling and wavelet function a nd corresponding low-pass
and high-pass decomposition and reconstruction filter coefficient
respectively, b) High-pass filter response, and c) Low-pass filter
responsc 72
4.30 Bior6.8 scaling and wavelet functions and corresponding low-pass
and pigh-pass decomposition and reconstruction filter coefficient
respectively 73
4.31 a) Noisy ECG Signal b) Denoised Signal by WT c)
WaveleDecomposition of the Denoised Signal at Levell, d) Wavelet
Decomposition of the Denoised Signal at Level 2 74
4.32 Comparison of the percentage error rate of different QRS detection
algorithms for raw ECG signal . 80
4.33 Comparison of the percentage error rate of different QRS detection
algorithms for powcr line noise corrupted ECG signal 83
4.34 Comparison of the percentage error rate of different QRS detection
algorithms for base line drift noise corrupted ECG signal 85
4.35 Comparison of the percentage error rate of different QRS detection
algorithms for abrupt base line shift corrupted ECG signal 89
4.36 Comparison of the percentage error rate of different QRS detection
algorithms for electromyographic noise corrupted ECG signal 94
4.37 Comparison of the percentage error rate of different QRS detection
algorithms for composite Noise corrupted ECG signal 99
4.38 Comparison of the percentage error rate of neural network and
wavelet transform based QRS detection algorithms for all the at a
sets tested in this experiment 101

x
List of Tables

2.1 Stages of cardiac excitation with corresponding ECG representation 9


4.1 Denoising performance for different threshold criterion of wavelet
denoising approach 72
4.2 Performance (% Error Rate) for Raw ECG Signal 77.
4.3 Performance (% Error Rate) of Different Algorithms for Power Line
Noise Corrupted ECG signal 82
4.4 Performance (% Error Rate) of Different Algorithms for Base Line
Drift Noise Corrupted ECG Signal 84
4.5 Performance (% Error Rate) of Different Algorithms for Abrupt
Base Line Shift Corrupted ECG Signal 86
4.6 Performance (% Error Rate) of Different Algorithms for EMG Noise
Corrupted ECG Signal 91
4.7 Performances (% Error Rate) of Different Algorithms for Composite
Noise Corrupted ECG Signal 96
4.8 Comparison of Performance (% Error Rate) of Neural Network and
Wavelet Based Algorithm lOa

xi
Chapter 1

INTRODUCTION

1.1 Historical Background


The establishment of the clinical electrocardiograph by the Dutch physician Willem
Einthoven in 1903 marked the beginning of a new era in medical diagnostic
techniques, including the entry of electronics into health care. Since then, electronics,
and subsequently computers, have become integral components of biomedical signal
analysis systems, performing a variety of tasks from data acquisition and
preprocessing for removal of artifacts to feature extraction and interpretation [I].
Electronic instrumentation and computers have been applied to investigate a host of
biological and physiological systems and phenomena. The primary step in
investigations of physiological systems requires the development of appropriate
sensors and instrumentation to transduce the phenomenon of interest into a
measurable electrical signal [2]-[4]. The next step of analysis of the signals, however,
is not always an easy task for a physician or life science specialist.

ECG is the representation of the bioelectric potential generated by the muscles of the
heart. ECG is a standard tool to diagnose heart diseases. Physicians record ECG easily
and noninvasively by attaching small electrodes to the human body. The Holter ECG
device is used most frequently for recording the ECG. Physicians apply the device to
a patient when they need to monitor his or her ECG to find the few abnormal cycles in
the, ECG throughout the day. They first locate such fiducial points as Q, R, S in the
ECG from which they locate P waves, QRS complexes, T waves and U waves and
then interpret the shapes of those waves and complexes. They calculate parameters to
determine whether the ECG shows signs of cardiac disease or not. The parameters are
the height and the interval of each wave, such as R-R interval, P-P interval, Q-T
interval and S-T segment. The process is very much time consuming i.e. recognition
of the fiducial points and calculations of the parameters is a tedious work.
2

Approximately 1,00,000 cardiac cycles are recorded per patient in a day with a Holler
device. The physicians have to interpret this large amount of ECG data to search for
only a few abnormal cardiac beats in the ECG. Physicians may overlook some
abnormal cycles because they have to interpret such a large amount of data. The ECG
signal may be masked by noise and interference, and the signal features may not bc
readily comprehensible by the visual systems of a human observer. Furthermore, the
variability present in a given type of signal from one subject to another, and the inter-
observer variability inherent ip subjective analysis performed by physicians or
analysts make consistent understanding or evaluation of a~y phenomenon difficult, if
not impossible. Analysis of signals by human observers is almost always
accompanied by perceptual limitations, interpersonal variations, errors caused by'
fatigue, errors caused by the very low rate of incidence of a certain sign of
abnormality, environmental distractions, and so on. These factors created the need not
only for improved instrumentation, but also for the development of methods for
objective analysis via signal processing algorithms implemented in electronic
hardware or on computers. The interpretation of a signal by an expert bears the weight
of the experience 'and expertise of the analyst; however, such analysis is almost
always subjective. Computer a nalysis of biomedical signals, if performed with the
appropriate logic, has the potential to add objective strength to the interpretation of
the expert. Therefore, there is an urgent need for an automatic ECG interpreting
system to help to reduce the burden of ECG interpretation.

Since software implementation allows a more complex structure than realization in


hardware, computerized cardiography is now a well-established practice after several
years of significant progress. Many algorithms have been proposed over years for
ECG beat detection. An extensive review of the approaches proposed in the last
decade can be found in [5]. They include mathematical models, signal processing
techniques; such as frequency analysis, template matching and other parameter
extraction methods. Since QRS portion is usually easy to distinguish due to its
relatively high amplitude, sharp peak, simple slope criteria [6]-[9], second Order
derivatives [10]-[12] are the major consideration for many ECG bcat detection
algorithms. Commonly, the peaks in the differentiated signal and the duration
3

between these peaks are compared to threshold. However there are many sources of
noise in a clinical environment that can degrade the ECG signal. To avoid power line
noise and to reduce the influence of the muscle artifact and base line shift, digital
filter used [13]-[15]. Application of the match filter discussed in [16], where the
problem of defining an accurate fudicial point also considered. Most of the current
QRS detector can be divided into two stages: a preprocessor stage to emphasize the
QRS complex and a decision stage to threshold the QRS enhanced signal. Typically
the preprocessor stage consists of both linear and non-linear filtering of the ECG. The
ECG is first band pass filtered to reduce noise and differentiated to emphasize the
large slope of the Rwave; itis then squired to further exploit the high frequency
content of the QRS complex. A short time frequency estimate is obtained by
smoothing the resulting signal with a integrator [13], [15]. Afonso et al. [17] have
proposed filter banks for ECG signal decomposition in separate frequency bands,
where scveral features were independcntly computed and combined in a decision rule.
Artificial ncural network have been widely accepted for pattern recognition tasks.
Their abilities to learn from examples and extract the statistical propertics of the
examples presented during training sessions make them ideal choice for an automated
process that imitates human logic. Several efforts have been made to apply artificial
neural network for the purpose ofECG beat detection [18]-[23]. A time lagged neural,
network was a pplied as a n adaptive filter [18], where current sample predict from
immediately previous samples was also employed to detect QRS complexes. Wavelet
tninsform (WT) has becn applied to ECG analysis specially for QRS detection [24]-
[29]. Discrete wavelet transform (DWT) exhibits local maxima at successive scales at
the time of oCCUrrenceof transients, and since the QRS complex is transient in ECG
signal. Furthermore for its application as filter bank [30], different algorithms based
on wavelet transform proposed. Other approaches reported for QRS detection include
artificial intelligence using hidden Markov models [31], genetic algorithm [32], fuzzy
hybrid neural network [23], mixture of experts approach [33], etc.

The ECG signal is usually contaminated by noise of various origins. The predominant
types of noise are base line wander, power line interference, electromyographi?
(EMG) noise and electrode motion artifacts [2], Noise sensitivities for QRS detection
4

algorithms based on slope and simple digital filters were measured by Friesen et al..
[34] with only 32 second normal ECG data corrupted with different types of
synthesized noise. A wavelet transform based QRS detector is compared with digital
filter and multiplication of backward difference (MOBD) algorithms by S. Kadambe
[24], using two types of noises; power line noise and EMG.noise.

1.2 Scope of the Thesis


The great variety of QRS detection algorithms presented above section reflects the
need for reliable QRS detection in cardiac signal processing. Moreover, recent
literature dealing with design consideration of cardiac pacemakers suggests that the
latest generation of these devices employs an ECG analysis capability. Despite large
variety of existing QRS detection algorithms, continuous efforts for their
enhancement are running to find universally acceptable solution. The major problems
faced by today's automatic ECG analysis approaches is the wide variation in the
morphologies of ECG waveforms, not only of different patients or patient groups but
also within the same patient and the noise and artifacts accompanying the ECG
signals. The ECG waveforms may differ for the same patient to such extend that they
are unlike to each other. Such an inconsistency in performance is a major hurdle,
preventing highly reliable, fully automated ECG processing system to be widely used
clinically. This is the main reason that the beat detector, performing well on training
the data, behaves badly when presented with different patients ECG waveform. One
obvious approach to alleviate this problem is to use as much testing data as possible.
Many of the presented algorithms were not tested against a standard database or any
database at all. This makes the result difficult to compare and to evaluate. In order to
make a comparison possible all t he algorithms should bet ested a gainst a standard
database. Many of the existing ECG analysis programs yield satisfactory results for
detecting the QRS in noiseless or low noise environments. These algorithms require a
relatively noise free digitized ECG. Data corrupted with noise must either be filtered
or discarded. But most of the algorithms didn't tested against noise corrupted ECG.
Furthermore no significant comparative study of recent algorithms have done till now.
With respect to the problems left in the QRS detection, in particular the algorithmic
5

behavior in case of noisy signals, only a comparable and reproducible evaluation on a


standard database may show the progress achieved by a novel method.

The overall goal of this thesis is to quantify the relative noise susceptibility of
different recent and formerly proposed QRS detection schemes that tested against a
standard database of reasonable size and different types of noise contaminated ECG
signal at different noise level. The result of this study will help in the development of
a more .robust ECG detector by making signal processing more effective.

1.3 Organization of the Dissertation


This dissertation is divided into five chapters. Chapter 2 explores the physiological
background of bioelectric potential generation and its propagation through heart and
the measuring system of ECG. This chapterprovides an overview of tlie recent as
well as the formerly proposed QRS detection algorithms.

Chapter 3 provides a background of how the noise generated and describes about the
source of noises from both physiological and technical viewpoint. A brief description
of each noise signal will be given. Additionally, the chapter gives the identification of
the pertinent characteristics of each noise signal.

Chapter 4 gives a description of the materials and methods used in this study..The
ECG database that is used in this work is discussed. This chapter goes into detail
about simulation of different types of noise and about differcnt typcs of QRS
detection algorithms used in this study. These chapters also explains how the
experiments were conducted, the accuracy results, and the meaning of the results and
evaluates and compare the performance of different QRS detection algorithms against
a standard database and against contaminated ECG data corrupted with different types
noise at different level. Finally, this chapter provides an an~lysis of the overall
performance of different QRS detection algorithms used in this study.

Finally, C haptcr 5 provides a discussion 0f t he findings and suggestions for futurc


work.

.~.
,. \
Chapter 2

AUTOMATIC ECG DETECTION


TECHNIQUES

2.1 Introduction
One must have a clear idea about the Electrocardiogram (ECG) waves before going
for the recognition of the ECG patterns. Also the knowledge about the structure and
the conducting system of the heart i.e. a clear view of the heart anatomy is also very
important. So, before getting familiar with the ECG detection it would be helpful to
provide some idea about the heart anatomy, the conducting system of the heart, the
generation of ECG waves and it's several parameters. This chapter describes how the
bioelectric potential generated from heart and presents variety of QRS detection
algorithms .

. 2.2 Electrocardiogram
In order to fully appreciate the significance and meaning of the diagnoses of heart
ailments via the ECG, it is important to understand the manner in which the heart
functions The cardiac muscle (heart) is the center of the cardiovascular system. This
muscle pumps life-sustaining blood to the entire body. The blood supplies oxygen and
nutricnts to thc body's organs so that they can perform their designated functions. The
heart is controlled by a very precise electrical system. This system regulates thc
mechanical pumping action of the heart so that the entire cardiovascular system can
function properly. If a problem occurs in the electrical system of the heart, it can have
devastating effects for the entire body.

2.2.1 Cardiac Activity


The function of the cardiovascular system is to supply oxygen to the organs of the
body. Blood is the body's medium for transporting oxygen to the organs. The'
7

muscular pump, known as the heart, pumps blood throughout the body. A complex set
of arteries, vessels and capillaries connect the heart to the entire body.

2.2.1.1 Cardiac Mechanical System


There are four pumping chambers in the heart: the left and right atria and the left and
right ventricles (Figure 2.1). T he purpose of the atria is to receive blood from the
body; the right atrium receives oxygen-devoid blood from the body and the left atrium
receives oxygen-rich blood from the lungs. The atria are separated from the ventricles
by the tricuspid valve on the right side and the mitral valve on the left side. When
these valves are opened,. the blood from the atria flows into the ventricles. The
ventricles are stronger than the atria because they pump the blood throughout the
body. The right ventricle pumps the oxygen-devoid blood to the lungs to absorb'
oxygen and release carbon dioxide. The left ventricle pumps the oxygen-rich blood to
the body's organs. The right ventricle is regulated by the pulmonary valve and the left
ventricle is regulated by the aortic valve [3].

Fig. 2.1: The mechanical and electrical components of the heart

2.2.1.2 Cardiac Electrical System


The mechanical pumping action of the heart results from electrical activation fronts
transversing the cardiac tissue. Figure 2.2 shows an example of the electrocardiogram'
8

(ECG), for a single heartbeat. The labels indicate the approximate location of the
important waves and components of the ECG signal.
•...•.....• sec
0_04 , 0.2 aee ,
>
~I
=
x
~ - -
T ••
-..- ~
f:
-
i!i T

1 R
~ ...•.- -
Fig. 2.2: ECG tracing over time

The relationship between the ventricular volume, pressure and ECG of the entire
cardiac cycle, systole and diastole can be seen in Fig. 2.3. From these figures, one.
can draw parallel between the heart's activity with the electrocardiograph signal
recorded.

Fig. 2.3: The physiologicalcorrespondencebetweenthe cardiac cycle and the ECG signal.

By understanding abnormalities 0 f certain sections of the signal, the physician can


assess the patient's sickness. Below are the descriptions of the physiological
significance of each wave recorded in the ECG. The heart tissue experiences a series
9

of stages of electrical depolarization and repolarization that lead to particular muscle


contractions. These stages, summarized in Table 2.1, are described in the following
paragraphs. The components of the heart discussed throughout this section are labeled.
in Figure 2.1.
Table 2.1 - Stages of cardiac excitation with corresponding ECG representation

Electrical Function . Mechanical Function Electrical


Rcp~esentatiou

1. SA Node emits electrical pulse


2. Atria depolarize Atria contract Start ofP Wave'

3. Electrical pulse pauses at AV Blood flows to EndofPWave

Node Ventricles

4. Pulse travels down His Bundle to Q wave


Bundle Branches
5. Atria repolarize while ventricles Atria relax, Ventricles Rand S wave

depolarize contract pumping


blood to lungs and
body
6. Ventricles repolarize Ventricles relax Twave

The first stage of a heartbeat begins when the sino-atrial (SA) node of the heart
depolarizes. During this stage, the right atrium is filled with oxygen-devoid blood that
has returned from the circulatory system and the left atrium is filled with oxygcn-rich
blood that has returned from the pulmonary circulation. The SA node, located on the
posterior wall of the right atrium, is the pacemaker of the heart, depolarizing at '
regular time intervals to ensure proper pacing. In a normal heart, the rate at which this
node emits pulses is directly correlated to the amount of work that the heart as doing.
As the body works harder and requires more oxygen-rich blood, the SA node
increases its p ace to satisfy t he demand. The electrical impulse from t he SA node
causes the upper portion of the heart, called the left and right atrium, to dcpolarize.
This depolarization cauSes the atria to contract forcing the blood from these chambers,
downward into the large lower portion of the heart, called the ventricles. The
10

corresponding component of the electrical signal is the P wave. As soon as the atria.
have completely contracted, they begin to repolarize in preparation for the next beat.
The electrical signaturc of the repolarization is not disccmable in the clectrical signal
because it 0 ccurs at the same time as t he ventricular contraction, which yields the
large QRS complex [3].

Following the depolarization of the atria, the depolarizing wave fronts signals
converge at the atrioventricular (AV) node. The AV node serves two very important
purposes. Its first purpose is to bridge the electrical signal from the atria to the
ventricles. T he second purpose is to slow the electrical depolarization to allow the
blood to completely flow from the atria to the ventricles. The electrical depolarization
propagates from the AV node to the His Bundles, which are located at the base of the
ventricles. The His Bundles lead to the bundle branches and then into the purkinje
fibers, which rapidly spread the depolarizing wavefront across both ventricles. This
electrical signal moves rapidly across the ventricular tissue causing the muscles of the
ventricles to pump the blood to the rest of the body. The right ventricle pumps the
oxygen-devoid blood to the pulmonary system for oxygenation. The left ventricle
pushes the oxygen-rich blood to the circulatory system to bring oxygen to the body.
Following the depolarization and contraction, the ventricles begin to repolarize to
prepare for the next cycle.

As long as the heart is operating properly, the process described above repeats
rhythmically with a natural variability. Generally, the resting heartbeat of a healthy
person is about 60-80 BPM [4]. If the electrical system of the heart does not properly
function, the heart's rhythrn can become abnormal. This directly affects the heart's
ability to supply blood to the entire body. To monitor for such problems, physicians
record and analyze the cardiac electrical signals using the electrocardiogram (ECG).

Body tissues are conductors of electricity. Hence the electromotive forces which arise
from heart muscles (myocardium) as a result of electrical activity of cardiac cclls give
rise to clcctric ficlds and current throughout the torso (which is a volumc conductor
11

and is linear, resistive, inhomogeneous, anisotropic, and bounded [35]) and therefore
electric potentials on the skin [36].

2.2.2 Electrocardiogram Recordings


The electrocardiogram (ECG) is a recording of the electrical signals that control the
cardiac function. By analyzing these signals, clinicians can monitor the rhythmic
function of the cardiac system. In order to record an electrocardiogram (ECG) from a
.patient, a number of electrodes are placed on the patient's body. The number of
electrodes used can vary between two and fourteen depending on what parts of the
heart the physician would like to focus the examination [2], [36]. The following is a
brief description of the ways to acquire different channels of the ECG.

2.2.2.1 ECG Standard Leads


There are three standard leads, usually designated as I, II and III (Figure 2.4). They
are bipolar (i.e., they detect a change in electric potential between two points) and
detect the electrical potential change in the frontal plane.
o Lead I: between the right arm and left arm electrodes, the left arm defined as
positive.
o Lead II: between the right arm and left leg electrodes, the left leg defined as
positive.
o Lead III: between the left ann and left Icg electrodes, thc left leg defined as
positivc.
The region between these three leads is termed Einthoven's triangle as shown in Fig
2.4.
"odl
right ann
I
, ,
I

••. /''''~' ._-- .", .. ,;:- , ., ----


.- - --_.
"od II

loft log

Figure 2.4: Einthoven's triangle showing how leads I, II, and III are recorded
12

2.2.2.2 Augmented Limb Leads


The same three leads that fonn the standard leads also fonn the three unipolar leads
known as the augmented leads. These leads are referred to as:
• aVR (right ann),
• aVL (left arm) and
• aVF (left leg).
They also record a change in electric potential in the frontal plane.

Lead I

AUGlUI.:N'"I':I) LIMfJ LEAI)S

Lend AVR lAud AVL


I»RECO:RI)IAL LEAJ)S

I ..•...•
6

Th~ E(,::<'; 1:'11 r~orded


1116 different icn:nHolI!lI
(\I I '0 V6. ,)II thr- cht'~t
U~ lllu~tratil,"d on
chi,ll din):rllm.

Fig. 2.5: l2-Lead ECG. A diagram illustrating the position and combinations
of the 12 leads electrocardiogram recordings.

These augmented leads are unipolar in that they measure the electric potential at one
point with respect to a null point (one which doesn't register any significant variation
in electric potential during contraction of the heart).
13

This null point is obtained for each lead by adding the potential from the other two
leads. For example, in lead aVR, the electric potential of the right arm is compared to
a null point which is obtained by adding together the potential of lead aVL and lead
aVF (Figure 2.5).

2.2.2.3 Precordial Leads


These six unipolar leads, each in a different position along the chest, record the
electric potential changes in the heart in a cross sectional plane. Each lead records
the electrical potential variations that occur directly under the electrode (Figure 2.5).

The ECG measures the change in the .electrical potential across the electrodes. The
recorded potential is converted to a waveform after signal filtering and amplification.
In this work, each waveform will be referred to as a lead.

2.3 ECG Detection Techniques


The QRS complex is the most striking waveform among other candidates within the
ECG by means of the following parameters: I) high amplitude, 2) steep leading
and/or trailing slope, and 3) sharp peaks. Since it reflects the electrical activity within
the heart during the ventricular contraction, the time of its occurrence as well as its
shape provides much information about the current state of the heart. Due to its
characteristic shape it serves as the basis for the automated determination of the heart
rate, as an entry point for classification schemes of the cardiac cycle. In that sense,
QRS detection provides the fundamentals for almost all automated ECG analysis
algorithms. Since software implementation allows a more complex structure than
realization in hardware, computerize cardiography is now a well established practice
after several years of significant progress. Many algorithms have been proposed over
years for ECG beat detection. They include mathematical models, signal processing
techniques; such as frequency. analysis, template matching and other parameter
extraction methods. Within the last decade many new approaches to QRS detection
have been proposed; for example, algorithms from the field of artificial neural
networks, genetic algorithms, wavelet transforms, filter banks as well as heuristic
14

methods mostly based on nonlinear transforms. An overview of these recent


developments as well as of formerly proposed algorithms is given in this section.

2.3.1 Approaches Based on Signal Derivatives and Digital Filters


Typical frequency component of a QRS complex range from about 10Hz to about 25

Hz. The attenuation of the P- and T-wave, baseline drift requires high-pass filtering
and the suppression of incoupling noise is accomplished by a low-pass filter. The
combination of low and high pass means a band-pass filter. In many algorithms high
and low pass filter carried out separately. Some a Igorithms use only the high pass

filter part.

Derivative Based Algorithms


The high pass filter is often, in particular in the older algorithms, realized as a
differentiator. This points out the usage of steep slope of the QRS complex for its
detection. Difference equations for possible differentiator filter are:

yl (n)=x(n+ I)-x(n-I) (2.1)

yl (n)=2x(n+2)+x(n+ I)-x(n-I )-2x(n-2) (2.2)

yl (n)=x(n)-x(n-I) (2.3)

yl(n)= x (n)- x (n-I) (2.4)

IX('ll
where x (n)= {
o Ix('JI<0

and 0 is an amplitude threshold determined from the measured ECG signal x(n). In
most cases the defferentiator from eq" (2.1) is used. Some algorithms also computed
the second derivative. It can be estimated by,
y2(n)=x(n+2)-2x(n)+x(n+2) (2.5)

Typical features z(n) of such algorithms are the differentiated signal itself [6],[7],

z(n)=yl(n) (2.6)

a linear combination of the magnitude of the first and second derivative [12]

z(n)=1.3Iyl((n)1 + 1.3Iy2(n)1 (2.7)

or a linear combination of the smoothed first derivative magnitude and ,the magnitude
of the second derivative [10],
15

z(n)= yl (n)+ ly2(n)1 (2.8)

where yl(n) = {0.25,0.5,0.25}*lyl(n)1 and * denotes the linear convolution operator.

The detection of QRS complex is accomplished by comparing the feature against a


threshold. Usually the threshold level is computed signal dependent such that an
adaption to changing signal characteristics is possible. For the feature in eqn (2.6), the
threshold EJ is proposed,
EJ = 0.3, .. , OAma.x[x(n)] (2.9)

where the maximum is determined online or from the current signal segment. Most
QRS detector use this or a similar method to determined the threshold.

Algorithm Based on Digital Filters


Algorithm based on more sophisticated digital filter was published [13]-[15], [37]-
[39]. In [13] an a Igorithm is proposed where the ECG is filtered in parallel by to
different low pass filters with different cut off frequencies. The difference between
the filter outputs is effectively the band-pass filter ECG yl(n), Which is afterWards
further processed by

Y2(1I)=Yl(Il)[,tlI2 (II + k) J (2.10)

This nonlinear operation leads to a relative suppression of small values and a slight
smoothing of peaks. The feature signal zen) is formed out of y2(n) by putting
additional sign constraints on the output signal of the low pass with the higher cut off
frequency. The threshold is computed adaptively bye,;, ma.x[z(n)]/8.

The algorithm describes in [15] and [38] uses basically the same preprocessor. The
ECG is band pass filter and afterwards differentiated. The feature signal z(ll) is
computed by squiring and averaging the output of the differentiator. The band pass
and differentiator use filter coefficients that are particularly suited for an
implementation on fixed-point processors with a short word length. For the peak
detection a variable, v is introduced that contains the value of the most recent feature
maximum. Peaks in the feature signal are detected by comparing the feature against.
v. If the feature drops below v /2 a peak is detected. Then the current value of v is
16

taken as the peak height and v is reset tom the current value of the feature signal
v=z(n). The fudicial mark is set to the location of the largest peak in the band-pass
filtered signal in an interval from 225 ms to 125 ms preceding a peak detection. The
fudicial mark and the height of the peak are put into an event vector that is further
processed by the decision stage. In the decision stage, a QRS peak level Lp and a

noise level L N are estimated recursively by

Lp(n) = A ,.Lp(n'-I)+(I-A ,).Ap (2.11)

(2.12)

Where AN and A, are forgetting factors (e.g. A'" 0.98) and Ap is the peak

amplitude. Depending on whether a peak is classified a peak as QRS complex or as a


noise peak, either the QRS peak level Lp or the noise level LN is updated using eq"

(2.11) or eq" (2.12), respectively. Eventually the decision threshold is determined


from

(2.13)

where the positive threshold coefficient r <I is a design parameter.


Generalized digital filters for ECG processing with the transfer function

K,L>O (2.14)

are proposed in [38]. Such filters have a linear phase response and are
computationally highly efficient. They were applied, for example in [14], where (K,
L)=(5,4) at a sampling frequency 250 Hz.
17

2.3.2 Wavelet Based QRS Detection


The wavelet transform (WT) of a functionj(l) is an integral transform defined by

...,
Wf(a,b) = If(I)If'".h(l)d1 (2.15) ,
-~

Where If '(1) denotes the complex conjugate of the wavelet If (I). The wavelet
transform use a set of analyzing functions, that allows a variable time and frequency
resolution for different frequency bands. The set of analyzing functions, the wavelet

family If",!" is deduced from mother wavelet If (I) by

'f'",1' (I) =
I If (I-a-
.fi - bJ (2.16)

where a and b are the dilation (scale) and translation parameter respectively. The
mother wavelet is a short oscillation with a zero mean as in fig 2.6.

. ... . "'" ._- - -,-_ .... _ .. _._,'----'---' ..-------,._. - .... -, ---_ .. _-..,-
o .08

o .06 -

o .04

o .02

.0.0" -

•0 .0 4 .

• 0 _0 6

,...
.... - - , . _. __ . - .' , ,---

" '" '"


11100 1 aoo 2000

Fig. 2.6: A sample Daubechies Wavelet

The discrete wavelet transform (DWT) results from discretized scale and translation
parameters; e.g., a=i and b=n.i where j and n are integer numbers. This choice of a
and b leads to the dyadic DWT (DyWT) .

...,
Wf(2j ,b) = ff(l)If',I.h(l)dl (2.17)
-~
18

with

'l'".b ()1=- I
21/2 If/
(t - b)
-21

and j,ne Z

Although defined as integral transfonn DyWT is usually implemented using a dyadic'


filter bank where the filter coefficients are directly derived from the wavelet function
used in the analysis [30],[31]. The input signal to the filter bank is the sampled ECG
signal. Almost all wavelet based peak detection methods [24]-[27] are based on local
maxima of the wavelet coefficient signals. Therein the correspondence between the
singularities of a function j(1) and local maxima in its wavelet transfonn Wj{a.l) is
investigated. It is shown that singularities correspond to pair of modulas maxima
across several scales [40]. Characteristics points are detected by comparing the
coefficients of the discrete WT on selected scale against fixed thresholds.

Filter Bank Methods


Filter banks are closely related to wavelets. Their application to QRS detection is
reported in [17]. Therein a 32-band filter bank used to generate down sampled
subband signal. The FB-based algorithm enables independent time and frequency
analysis to be perfonned on the signal. Features computed from a set of the subbands
and a heuristic detection strategy used to fused decisions from multiple one-channel
beat detection algorithms.

2.3.3 Neural Networks as Adaptive Nonlinear Predictors


In the context of QRS detection, neural network has been used.as adaptive nonlinear
predictors [18],[19]. The objective is to predict the current signal value X(II) from its
past values x(lI-i), i>O. Because the ECG consists almost solely of non-QRS,
19

segments, the neural network converges to a point where samples from non-QRS
segments are well predicted. Segments with sudden changes (i.e., QRS segments)
follow a different statistics .and lead to a sudden increase in the prediction error. It
follows that the prediction error e(ll) can be used as a feature signal for QRS
detection.

~(t)
+

x(t) x(t-l) x(t - 2) • •• X(t - p)


Fig. 2.7: Multi-layer perceptron

Due to the nonlinear behavior of the background noise as described in [19], a


nonlinear prediction filter may show better performance than its linear counterpart. In
[18],[19] the neural network is an MLP network with a three-layer st~cture. The
input layer consists of eight to ten linear neurons with the time-delayed signal samples
as inputs: the hidden has three to five nonlinear (Iogisistic nonlinearity) neurons and.
the output layer contains one, again a linear neuron. In [19] the output of the nonlinear
prediction filter is further processed by a matched filter, providing a better attenuation
of the residual noise.
20

2.3.4 Additional Approaches

Learning Vector Quantization for QRS Detection


In [22] the authors propose the application of a two-layer LVQ network for QRS
detection and the discrimination of premature ventricular contractions (PVC): The
input and the competitive layer consist of 20-40 neurons, where as in the linear layer
there are two neurons corresponding to the number of output classes. The inputs are
adjacent samples of the ECG. Training data were taken from several records of the
MIT/BIH database. The classification is carried out with an overlap of 10-30 samples.

Linear Layar

Competitive
Loyer

1nP\l1
Loyer

ECG x(n)
~x(n-l) x(n~2)x(n~) x(n-4)x(n-5)
I x(n-P)

Fig. 2.8: LVQ Network.

As reported in [22) the results do not reach the results of classical approaches, such as
[15). However, once trained the LVQ network offers fast computations and
furthermore a discrimination between QRS and PVC contraction.

Adaptive Filters
The application of adaptive prediction filters to QItS detection has been investigated

e.g. in [16]. Figure 2.9 shows the structure of an FIR prediction filter. Similar to the
nonlinear case (see the previous section) the objective of the filter is to gain an
estimate x (II) for the current signal sample x(ll) from the past signal values by means
of a weighted superposition; that is,
21

r
x(n) = La,(n)x(n -i) (2.18)
;=1

with the time-variant coefficients a,(n), i=1...P. They are adaptively adjusted

. according to the changing signal statistics. From the literature several adaption rules
for the coefficients are known; e.g. the least mean square (LMS) algorithm

a (n + 1) = a (II) + A e(lI)x(n) (2.19)

where a(n) = [a,(n), a,(n), , ar(n) f denotes the coefficient vector at time II,

A, is the step size parameter. e(n)=x(n)-x (II ) denotes the prediction error and
X(II)=[ x(II-I), x(n-2), ,x(n-p) f is the vector of the time delayed ECG signal

samples.

1
a.(:; ..... ~ lpln)
. I
__ ,-+1,$
-X{n) ;

-_.~
Fig. 2.9: Prediction Filter.

Further applications of adaptive filters to QRS detection are reported in [30] and [41].
In [30] it was shown that at a sampling frequency of 500 Hz two tap filters are
sufficient for a good prediction performance. In [41] the application of a .

midprediction filter

. p
x(n) = La,x(n-i) (2.20)
k=-P

is proposed.
22

Hidden Markov Models


In [31] the application of hidden Markov models (HMM) to QRS and ECG waveform
detection is investigated. HMMs model the observed data sequence by a probability
function that varies according to the state of an underlying (hidden) Markov chain. By
means of the Markov chain the global structural characteristics of the process are
preserved while the parameters of th~ probability density function account for the
varying statistical properties of the observed data. The objective of the algorithm is to.
infer the underlying state sequence from the observed signal. In the case of ECG
I
signals, possible states are P-wave, QRS, and T-wave.

The advantage of this detection method is that not only the QRS complex is
determined but also P- and T-waves. Problems of the method include a necessary
manual segmentation for training prior to the analysis of a record, its patient
dependence and the considerable computational complexity even when the
computationally efficient Viterby algorithm [31] is applied.

Matched Filters
Besides the neural-network-based matched filtering approach in [19], there are linear
matched filtering approaches as, for example reported in [42]. In [42], after some
analog preprocessing steps such as an automatic gain control, the ECG signal is
digitized and further processed by a comb filter (low-pass) with a notch at 50 Hz and
a band-pass filter with cut-off frequencies at 15 Hz and 40 Hz. This digital filter stage
is followed by a matched filter for further improvement of the signal-to-noise ratio
(SNR). The matched filtering is accomplished by

N-I
y(n) = 2:h(i)x(n -i)'
1=0 (2.21 )
where the impulse response h(n) is the time-reversed template of the waveform to be
detected. The impulse response of the matched filter h(n) is manually taken from the.
first cardiac cycles of the current measurements; i.e, it needs to be determined
interactively. For further enhancement of the timing accuracy, the output of the
matched filter is interpolated up to four times the original sampling frequency. The
23

final decision about a QRS complex is taken by comparing the filtered signal against a
fixed threshold. It is reported in [42] that the matched filter also improves the timing
accuracy of the detected R-wave.

Genetic Algorithms
In [32], genetic algorithms have been applied to a combined design of optimal
polynomial filters for the preprocessing of the ECG and the parameters of a decision
stage. Polynomial filters are defined by [32].

M MM.

y" = 2: 2>. ....2:


~1"'Ok~=O kN=O

L';<M (2.22)
where the d j , are delays with respect to the time n. Three different special cases of a

polynomial filter are investigated: quasi-linear filters with consecutive samples (M =1


and N = 10), quasi-linear filters with selected samples (M=I and N =5), and quadratic
filters with selected samples (M =2 and N =3). The decision stage consists mainly of
an adaptive threshold that is compared against the filtered ECG signal. The threshold
adaption parameters are optimized in conjunction with the polynomial filter via a
genetic optimization algorithm.

Hilbert Transform-Based QRS Detection


In [43], [44] the use of the Hilbert transform for QRS detecti6n is proposed. The
Hlilbert transform of a real signal x is defined by

xl/(t)=H{x}=- I J" xC,)


--d,
7T-"'t-t

I
= xH (I) = x(t) *- (2.23)
m
and may be computed in the frequency domain as
X ,,(jOJ) = x(jOJ).[- j.sgn(OJ)]

=x(jOJ).H(jOJ) (2.24)

where the transfer function of the Hilbert transform H( jOJ} is given by


24

-J
H(jOJ) ={ J (2.25)

Using the fast Fourier transform (FFT), the Hilbert transform can easily be computed.
In [44] the ideal Hilbert transformator is approximated by a band limited (2N +I)-tap
FIR filter with the impulse response h(n). For example, the impulse response for the
filter of the order N =11 is given by [44].

h(n) =;{ -0.038,0,-0.143,0,-0.61 0,0,0.61 0,0,0.143,0,0.038} (2.26)

Impulse responses for other filter orders are listed in [44]. The Hilbert transform

xH (n) of the ECG signal xH(n) is used for the computation of the signal envelope [44]

which is given for band-limited signals by

x,(n) = ~x'(n)+xH '(n) (2.27) .

A computationally less expensive approximation to the envelope can he made by [44]

(2.28)

In order to remove ripples from the envelope and to avoid ambiguities in the peak
level detection, the envelope is low-pass filtered. Additionally, in [44] a waveform
adaptive scheme for the removal of low frequency ECG components is proposed.

The method published in [43] is related to the algorithms based on the Hilbert

transform. In [43] the envelope of the signal is approximated by

x,(n) '" lx, (n)1 + lx, (n)1 (2.29)


25

where XI (n) and x, (n) are the outputs of two orthogonal digital filters; i.e.,

X, (n) =x(n)-x(n-6) (2.30)

x, (n) =x(n )-x(n-2)-x(n-6)-x(n-8) (2.31 )

In order to remove noise, the envelope signal x, (n) is smoothed by a four-tap moving

average filter.

Lellgth alld Ellergy Trallsforllls


In [45] the application of length and energy transforms to QRS detection is

investigated. The transforms are defined for multi-channel ECG signals but may also

be used for single-channel ECG analysis. They are given by

/~l
L(n,q,i) = 2....
k=i (2.32)

length transform

I~I n

E(n,q,O = 2.... L(Llxj.,)'


b=i j=1 (2.33)

cnergy transform

where n is the number ofECG channels, i is the time index and Llxj.,= :>j.' -xj.,_,.
These formulas are based on the assumption that the derivatives of the ECG channels
can be considered as the elements of a vector. The length of the vector is determined'
from the square root of the second sum in Eq. (2.33). The length transform represents
a temporarily smoothed time course of the vector length. A similar assumption leads
to the encrgy transform, which can be interpreted as the short-term e'ncrgy cstimation
of the vector. The authors [45] state that both transforms are superior to conventional

transforms for feature extraction, whereas the length transform works particularly

good in case of small QRS complexes.


Chapter 3

NOISE DESCRIPTION

3.1 Introduction
There are many sources of noise that degrade the ECG signal quality. The ECG is
particularly susceptible to low frequency noise, known as baseline shift and ECG
amplitude modulation with respiration, which induces false changes in the ECG
waveform shape. Other noise sources are muscle noise (Electromyographic, EMG);
power-line noise, electrode contact noise, instrumentation noise generated by
electronic d9vices used in signal processing and electrosurgical noise and other less
significant noise sources [2]. The causes of ECG artifacts are poor skin contact, gel
drying up due to exposure to air for long time, damaged cables, skeletal muscle
contraction, electrocautery. While using electrocautery, placing of the ground plate
should such a way that, current path from the surgical site to ground plate is far from
chest. This chapter provides a brief description about sources of noise that degrade the
ECG. signal and identification of the pertinent characteristics of each noise signal will
be given.

3.2 Disturbances of Physiological Origin


Abnormal initiations of the heart beat (ectopic beats) can lead to a variety of
morphologies of QRS complexes and cause difficulties in both their classification and
their detection. Potential physiological sources of errors also include: abnormally
large P or T waves, and myopotentials similar enough to QRS complexes in amplitude
and frequency content to cause spurious detection. Variations in the position of the
heart with respect to the measuring electrodes and changes in the propagation medium
between the heart and the electrodes, both being dependent on the position and
breathing of the patient, can cause: sudden changes in the amplitude of the ECG
signal and morphology of the QRS complex, leading to missed QRS complexes, as
well as low frequency baseline shift. When the sweat glands are filled with.
conducting sweat (sweat can be considered the equivalent of 0.3 % saline), many low-
27

resistance parallel pathways result, thus significantly reducing the electrode-skin


impedance and alleviating the problems. A further lowering of the impedance takes
place due to hydration of the skin. W hen an impedance change takes place at the
electrode-skin interface, the potential differences drive a current over the electrode-
skin-tissue-skin-electrode circuit, or parts of it, and a shift in voltage is measured by )
the differential amplifier. /

3.2.1 Baseline Shift


Baseline shift is a slow-moving, non-deterministic wave (Figure 3.1), which hinders
accurate measurement of ECG features. The source of baseline shift is mostly due to
electrode movement, a changing impedance of the reference electrode-skin interface
and possibly a chemical reaction between the electrode and the skin itself. The degree
of baseline shift can vary from a slowly rising quasi-linear trend as shown in Figure
3.1(a), a slow quasi-harmonic wave as shown in Figure 3.1(b) or a sudden transition
as shown in Figure 3.I(c). The amplitude and frequency of the sinusoidal component
should be variables.

Typical parameters:
Amplitude Variation -15 % of peak to peak ECG amplitude
Baseline Variation - 15 % peak to peak ECG amplitude variation at 0.15 to
0.30 Hz

A major problem with baseline shift is that its spectrum is often wide and overlaps
with that 0f the E CG signa!. To design an optimal filter to remove baseline shifts
would, by definition, require a-priori knowledge of the E CG signal spectrum. The
ECG waveform itself is only quasi-stationary so it is impossible to define a fixed
frequency spectrum and how to optimally filter out the '1:Jaseline shift without
removing the important information within the ECG signa!. The signal enhancement
scheme must therefore be carefully designed so that the important information in the
ECG waveform is not lost or distorted. There are periods of very poor quality data
when significant baseline shift energy still remains despite the signal enhancement.
28

(a)

,~,

.:.
t
• • I(H..'

• 1'.'\' '
.;.-,( ..
...:J'n.O •
0:'\01')"
.

.;>(••'~
-------_
4"'''' .
•.•.•••

Ie)

..•••lUI.",'
...•"'. "',.' 1 ~'n
•'• ..•....,
Fig. 3.1: Base line shifted ECG Signal

3.2.2 Muscle Noise


For muscles to contract, the muscle cells generate chemically induced electrical

impulses, and this can be measured from the body surface. Muscle noise is caused by
the random firing of muscle fibers. An example of muscle noise is shown in Figure

3.2. Muscle noise obscures the important features and timing points, such as the P, Q,
R, Sand T peaks. Muscle contractions caused artifactual millivolt level potentials to
be generated. The baseline of electromyogram is usually in the microvolt range and
therefore is usually insignificant, as shown in figure 3.2. Its spectrum spans that of the
ECG signal and so it can never be completely removed with linear filtering.
29

1.4

1.2

0.8

0.6

Fig. 3.2: ECG signal corrupted with muscle (EMG) noise.

Typical parameters:
Standard Deviation - 10 percent of peak to peak ECG amplitude
Duration - 50 msec
Frequency Content - de to 10000 Hz

3.3 Disturbances of Technical Origin


Like physiological changes in the ECG signal, the tolerance of different QRS
detection procedures can vary with respect to technical disturbances (Friesen et al.
[34], Hamilton & Tompkins 1986 [37] ). These include movement of electrodes.
(relative to the skin and heart) or other changes in conductivity between the electrodes
and the skin, which can result in rapid baseline shift. Capacitively or inductively
coupled disturbances, e.g. power line interference and extra peaks originating from
the movement of wires or discharges of static electricity when clothes, skin,
electrodes and wires chafe against each other in the presence of dry air and skin can
also cause disturbances.

3.3.1 Power Line Noise


Power-line noise is often picked up by the electrode leads from neighboring
equipment such as fluorescent lighting and IS amplified by the instrumentation
amplifiers [34], shown in Figure 3.3(a). It IS almost periodic (50Hz:!: 1% in
Bangladesh) and often high in amplitude with respect to the ECG waveform.

~.'.
30

Harmonics of 50Hz are observed in the power-spectrum of the ECG signal shown in .
Figure 3.3(b).

1(00
(0)
'!{l]

WI
i 0

.t.ClI

• roO)
M>I#I'>I"JJ.j~IM,j/~J.~

" ;\ '(0
Salllp k'es
~'I) 'ffl ;Iro

. ,,,';'10'
:l! H (0)

1 Plll\.rlnt I'IQi;e,*1'IQ11C;
,
I
1~ /-" /
..
1. \

I • 'J \

(lJ )
I 01.

°D
'\f!.,
;)
,
100
I

Ftoqumy (fj~
'!J

1!11 100

Fig. 3.3: a) Power line interference in ECG signal.


b) Frequency spectrum of power frequency noisy ECG signal.

Typical parameters:
Frequency content - 50 Hz fundamental with harmonics
Amplitue - up to 50 percent of pick-to-pick ECG Amplitude

If power-line noise is not suppressed it can obscure the P, Q, R, Sand T peaks in the
ECG waveform and distort their true amplitudes. The QRS amplitude, which is used
throughout the system as a physiological constant, will jitter in the presence of power-
line noise and so it is important that is removed. The fundamental harmonic is 50Hz
which lies within the useful spectrum of the ECG waveform. Care has to be taken in
designing a filter to remove unwanted 50Hz power from the signal. The 100Hz peak
shown Figure 3.3 in is outside the useful spectrum of the EeG, so could be removed
by low-pass filtering.

',~
31

3.3.2 Electrode Contact Noise


Electrode contact noise is transient interference caused by loss of contact between the
electrode and skin, which effectively disconnects the measurement system from the
subject. The loss of contact can be permanent or can be intermittent, as would be the
case when a loose electrode is bought in and out of contact with the skin as a result of
movements and vibration. This switching action at the measurement system input can
result in large artifacts since the ECG signal is usually capacitively coupled to the
system. With the amplifier input disconnected, the 50 Hz interference may be

significant. Electrode contact noise c an be modeled a s a randomly 0 ccurring rapid


base line transition (step), Which decay exponentially to the base line value and has a
superimposed 50 Hz component. This transition may occur only once or may rapidly
occur several times in succession. Characteristics of this noise signal include the
amplitude of the initial transition, the amplitude of the 50 Hz component and the time
constant of the decay.
Typical parameters:
Duration - 1 second
Amplitude - maximum recorder output

Frequency - 60 Hz
Time constant - about 1 second

3.3.3 Motion Artifacts


Motion artifacts are transient but not in step. Baseline changes caused by changes in
the electrode skin impedance with electrode motion. A typical example is shown in

figure 3.4.

1.6

,.
n !J

u
-

1
. 1 () ~_>OCl 1000 2000 2~:;OO :lOOO

Fig.3.4: Abrupt base line shift in ECG signal.


32

As t his impedance changes, the E CG a mplifier sees a different source impedance,


which forms voltage divider with amplifier input impedance. Therefore, the amplifier
input voltage depends on the source impedance, which changes as the electrode
position changes. The usual caused of the motion artifacts will be assumed to be
vibration or movement of the subject. The shape of the baseline disturbance caused by
motion artifacts can be assumed to be a biphasic signal resembling one cycle of asine
wave. The pick amplitude and duration of the artifacts are variables.

Typical parameters:
Duration - 100 - 500 msec.
Amplitude - 500 percent of peak-to-peak ECG amplitude.

3.3.4 Noise Generated by Signal Processing Equipments


Artifacts generated by electronic device in the instrumentation system cannot be
corrected by QRS detection algorithm. The input amplifier has saturated and no.
information about the ECG can reach the detector. In this case an alarm must be
sound to alert the ECG technician to take corrective action.

3.3.5 Electrosurgical Noise


Electrosurgical noise completely destroy the ECG and. can be represented by a large
amplitude sinusoid with frequencies approximately between 100 KHz to I MHz .
Since the sampling rate of an ECG signal 250 to 1000 Hz, an alias version of this
signal would be added to the ECG signal. The amplitude, duration, and possibly the
aliased should be variable.

Typical parameters
Amplitude -:-200 percent of peak to peak ECG amplitude
Frequency Content - Aliased 100 kHz to I MHz
Duration - I to 10 seconds
Chapter 4

SIMULATION STUDY

4.1 Introduction
Noise sensitivity analysis of different QRS detection algorithms against different
types of noisy and noiseless ECG signal is the main focus of this chapter. Evaluation
of these algorithms should be done using well-annotated and validated standard
database. One of the available standard database, MIT-BIH arrhythmia database used
in this study. A key part to understand a particular process is to model it by means of
simulations. Different types of noise described in the previous chapter are simulated
in this chapter. The QRS detection algorithms are implemented and applied against
noisy and noiseless signal. The project demands various mathematical, digital signal
processing, wavelet, and Neural Network designing functions as well as the design of.
Graphical User Interface for the final system. MATLAB package was chosen as base,
which serves as the platform for all the technical computing needs

4.2 Description of the Database


Several standard ECG databases are available for the evaluation of different QRS
detection algorithms. Tests on these well-annotated validated databases provide
reproducible and comparable results. Furthermore, these databases contain a large
number of selected signals representative for the large varieties of ECG as well as
signals that are rarely observed but clinically important. One of the available standard
database is MIT-BIH database [46] provided by MIT and Boston's Beth Israel
Hospital, consists of ten databases for various test purposes; among which the MIT-
BIH Arrhythmia Database is most frequently used. In this study the MIT-BIH
Arrhythmia Database was used to evaluate the performance of different QRS
detection algorithms. It contains 48 half hour, two channel recordings of annotated
ECG with sampling rate 360 Hz and II-bit resolution over a 10 mV range [47]. The
ECG rccordings are obtained from 47 subjccts (two records 201, 202 from same
subject). Of these, 23 (the 100 series) were chosen at random from a collection of
34

over 4000 Holter tapes, and the 0 ther 2 5 (the 200 series) were selected to include
examples of uncommon but clinically important that would not be well represented in
a small random sample. The subjects include 25 men aged 32t089yearsand22
women aged 23 to 89 years; approximately 60% of the subjects were inpatients. The
ECG leads varies among the subjects as would be expected in clinical practice, since
surgical dressing and variation in anatomy do not permit use of the same electrode
placement in all cases. In most records, one channel is a modified limb lead II (MLlI),
obtained by placing the electrode on the chest as is standard practice for ambulatory
ECG recording, and the other channel is usually VI (sometimes V2, V3, or V5,
depending on the subject). Altogether there are 116137 QRS complexes in this
database. While some records contain clear R peaks and few artifacts, for some
records the detection of QRS complex is very difficult due to abnormal shapes, noise

and artifacts.

4.3 Realization in MATLAB@


All QRS detection algorithm evaluation and ECG noise implementation have done

using MATLAB@. The name MATLAB stands for matrix laboratory. MA TLAB is a

high-performance language for technical computing. It integrates computation,


visualization, and. programming in an easy-to-use environment where problems and
solutions are expressed in familiar mathematical notation. Typical uses include:

).> Math and computation


)l> Algorithm development

)l> Modeling, simulation, and prototyping

)l> Data analysis, exploration, and visualization

)l> Scientific and engineering graphics


)l> Application development, including Graphical User Interface building

MA TLAB is an interactive system whose basic data element is an array that does not
require dimensioning. This allows us to solve many technical computing problems,
especially those with matrix and vector formulations, in a fraction of the time it would
35

take to w rite a program ina scalar n on-interactive language such as Cor Fortran.
Matlab programs can be automatically converted to C or c++ codes by simulink
which is a utility of Matlab. The reason that I have decided to use MATLAB for the
development of this project is its toolboxes. Toolboxes allow user to learn and apply
specialized technology. Toolboxes are comprehensive collections of MATLAB
functions (M-files) that extend the MATLAB environment to solve particular classes
of problems. It includes among others signal processing, wavelet, and neural networks
toolboxes [48].

4.4 ECG Signal Characteristics


The clinical bandwidth used for recording the standard 12-lead ECG is 0.05-100 Hz.
For monitoring application such as for intensive care patients and for ambulatory
patients, the bandwidth is restricted 0.5-50 Hz. In these applications, such as for
intensive care patients, rhythm disturbances (i.e. arrhythmias) are principally of
interest rather than subtle morphological changes in the waveforms. A third
bandwidth used for heart rate meters (cardio-tachometers) maximizes the signal to
noise ratio for detecting the QRS complex. Such filter passes the QRS complex while
rejecting noise including non-QRS waves in the signal [49]. The frequency spectrum
of the ECG signal can provide useful information about the QRS complex. A plot of .
frequency spectrum of ECG signal taken from arrhythmia database using MATLAB
signal processing toolbox, for single beat and thirty two beats are shown in figure 4.1.
36

800
000
'00
200

.200
0 .- -~
.0.6 -0.<1 -0., 0 0.2 OA 0.0

ECG signal vs. time (in seconds)


30

20

'0

0
.20 20 30 '0
-40 -30 .'0
° '0

Magnitude vs. frequency in Hertz

0.5

..().!i

-,
•••0 -<>0 -2O -'0 0 '0 20 '0 '0

Phase/pi vs. frequency in Hertz

(a)

.500

o 2 5

Time snapshot (in seconds)

600

GOO

20 30 40 50 60 70
frequency in Hertz

Spectrum

(b)
Fig. 4.1: a) Time and frequency domain representation for one period of an
electrocardiogram signal. b) Time and frequency domain representation Spectrum ofa
signal containing many beats of an electrocardiogram.
37

4.5 Noise Simulation


A number of clean ECG input signal provided from an MIT-BIH Arrhythmia
Database was used as the source raw data. The algorithms were tested for their
effectiveness against five variable noise types applied to the ECG data. The noises
that were tested are:
1. Powerline Noise
2. Electromyographic Interference
3. Baseline Drift
4. Abrupt Baseline Shift
5. Composite noise.

In order to dcteffiline the accuracy of the detection algorithms' under different


circumstances a clean ECG signal provided, had to be contaminated with different
types of noise simulating real life sources of error. This error was varied in intensity,
which ranged from 0% to 100% in increments of 25%. Since the purpose of this study
was to evaluate the noise rejection properties of different QRS detection algorithms,
the different representative noise sources for simulation are:

1. Electromyographic Interference because of its random properties and


high frequency content,
2. Powerline Interference because it is ubiquitous,
3. Base line drift due to respiration because of its low frequency ,
properties,
4. Abrupt shift in the base line due to its large first derivative, and
5. A composite of all of the above.

Electrosurgical and instrumental noise behaves similarly as random model for EMG
and motion artifact is much like base line drift in respiration, hence these were not
specifically modeled.
38

4.5.1 Power Line Noise


Power Line Interference consists of 50 Hz frequency (in Bangladesh) and hannonics,
which can be modeled as sinusoids and combination of sinusoids. Characteristics,
which might need to be varied in a model of power line noise, include the amplitude
and the frequency content of the signal. These characteristics are generally consistent
for a given measurement situation and once set, will not change during a detector
evaluation. For the generation of power line noise, a 50Hz sine wave was generated
having the peak amplitude as I. Then this generated sine wave is scaled with max
peak-to-peakamplitude of 0.333 mY. It is then scaled further by the percent noise to
be added. As stated above; the intensity of the noise was varied and figures 4.2 show.
intensities of25%, 50%, 75%, and 100% noise, respectively.

4.5.2 Electromyographic (EMG) Noise


Muscle contractions caused artifactual millivolt level potentials to be generated. The.
baseline electromyogram is usually in the microvolt range and therefore is usually
insignificant, as shown in figure 4.3. The signals resulting from muscle contraction
can be assumed to be transient bursts of zero mean band limited Gaussian noise. The
variance of the distribution may be estimated from the variance and distribution of the
bursts. The EMG noise was simulated using the scaled input 0f a random number
generator to the ECG signal, so that its amplitude would show random deviations in
amplitude from the clean signal. So, in this case, array of random numbers was
created consisting of values of +/- 0.50. Then these random numbers were multiplied
the max ECG amplitude value and scaled by the percent noise that is to be added.
This type of noise is shown in the figure 4.3 with intensity of 25%, 50%, 75%, and
100% respectively.

\
39

o,a
O,S (I)
0,4

0,2

-0,::'
.0 ..04

.0.6

.0.°0 ~oo AOO BOO BOO 1000 1=0 ••• 00 1BOO 1 BOO ~ooo

1,2

O,G
(b)
0,6

0,'

0,2

a
.0,2

.0.4
.0,6

-0.8
0 200 '00 300 BOO '000 , :ilOO 1.400 ''''0
"."" 2000

1,2

0.0

O,G (C)
0,'

0.2

-0.4
.0.0

,,"
o,a
0,6
(d)
0,'

0,"

0
.0.2

-o,A
_D.G

Fig. 4.2: EeG corrupted by power line noise of different levels;


(a) 25%, (b) 50%, (c) 75% and (d) 100%
40

,.
(d)
0.5 -

Fig. 4.3: EeG corrupted by electro myographic noise of different levels;


(a) 25%, (b) 50%, (c) 75% and (d) 100%
41

4.5.3 Baseline Drift Noise


Baseline drift noise represents a low frequency shift due to the rhythmic inhalation
and exhalation during respiration. The amplitude and frequency of the sinusoidal
component should be variables. The amplitude of the ECG signal also varies with 15
percent with respiration. The variation could be reproduced by amplitude modulation
of the ECG by the sinusoidal component, which is added to the baseline. Baseline
drift noise was simulated by adding a 0.333 Hz and 1 mV sinusoid to the ECG signal.
Amplitude effects due to respiration were not modeled. It is then scaled further by the
percent noise to be added. The figures 4.4 show baseline drift noise at 25%, 50%,
75% and 100% intensity, respectively.

4.5.4 Abrupt Shift Noise


The abrupt shift of the ECG baseline due to sudden movement of the body. In this
case, random numbers (within :!: 0.5 mV) were generated, but the same random
number was taken for 500 ms duration cycle. After completing 0 ne cycle, another
random number was generated and it was taken as the one for that cycle. After
generating for all the cycles, if any data points remain, then another random number.
was generated & this was taken for the remaining data points. This sudden body
movement shown at 25%,50%,74%, and 100% intensity, respectively in figure 4.5,
was imitated by adding a random deviation in amplitude to the baseline.
42

, .2
, (a)
0,8

0.8

0,'
0.2

-0,2

-0,4
-0.6
-O.B
O 800 '000 1&00 2000 ","00

, .2

(b)
0."
0.6

0,.

0.2 .
0

.0.:>
.0.4

-01.0'

-0.8 2SOC> 2000


0 SOO 1000 "'00 2000

, ,S

(e)

a,1E$

.0.&

., 0 =0 1000 .=0 ~ccc

, .r.\>

(d)
,
D,S

.0.5

"0 .000 000

Fig, 4.4: ECG corrupted by baseline drift noise of different levels;


(a) 25%, (b) 50%, (c) 75% and (d) 100%
43

"" (a)
0."
0."
0."
0."
a •
40.2 4

40 ..••
40,&
.Q,fiit
o

""f:\

(b)

0.0

.() ...
"0 a , 0

, .0

(c)
,
0 .••

-0.0

"0 '000 '500 '"'00

•. S

(d)

0."

-0,'5

,.,
41.4
0

500 1000 ,~ =be ~SQC

Fig. 4.5: ECG corrupted by abrupt baseline shift noise of different levels;
(a) 25%. (b) 50%, (c) 75% and (d) 100%
44

4.5.5 Composite Noise


The final noise most accurately replicates an actual ECG signal by incorporating all
four aforementioned types of noises into one. In this case, the maximum noise level
was constructed by reducing the maximum noise levels for each of the previous
described noise types to 50% of maximum and then summing them [34]. The reduced
noise levels 0 f t he composite are formed by scaling the composite noise and then
added with the uncorrupted ECG. Figure 4.6 shows a plot of composite noise ECG .
signals at different intensities.

Noise intensities were decided upon by approximating the noise levels used by
Friesen et. al. [34]. It is noteworthy that the maximum noise amplitudes used are well
above the typical noise parameters present in an ECG signal.

4.6 QRS Detection Algorithms


A large number of QRS detection schemes are described in the literature. It would be
impractical to compare all of them. Several considerations were used to limit the
number of QRS detections schemes to a reasonable cross section of the different basic
techniques described in the literature. A great deal of study was fused to determine
which of the available QRS detection algorithms were to be used. Each algorithm used
in this study is based on a specific scheme presented in the literature. However, they
are not copies and should be considered as a generic adaptation of the fundamental
concept. There are seven basic types of algorithms included in this study.
45

, ..
,
.
c•.• ,

-0."
..
~.5
~
•. 0

0.5

"
-.
-0.8

,,'DD

Fig. 4.5: ECG corrupted by composite noise of different levels;


(a) 25%, (b) 50%, (c) 75% and (d) 100%

,
46

4.6.1 Algorithm Parameter Determination


Each 0 f the a Igorithms used in this study employed 0 ne or m ore preset constants,
either as multipliers or as thresholds. In some cases these constants were not given in
the literature, while in others they were not compatible with the data fonnat that used
in this study. A tuning procedure was carried out in order to detemiine the value for
these constants, which would give the best results for the composite noise corrupted
data. The approximate values of these constants were detennined by observing
intennediate stages of the algorithms when the nonnal uncorrupted ECG was applied.
The precise value of these constants was detennined by varying each of the constants
in an algorithm independently and recording t he combinations of constants, which
gave the best results when the 75 or 100 percent composite noise corrupted ECG was
applied. Preference will given to the highest noise level that allowed reasonable result.
The scoring criteria for the s election of t he constants were based 0 n 0 btaining the
highest possible value for the difference between the number of QRS complexes
correctly detected and the number of false positives. If a range of values of a.
particular constant gave equally good results, the process was carried out on the 75
and 100 percent levels of the other types of noise. The results of these runs suggested
the values of the constants. Finally, the algorithm was executed on all of the noise-
corrupted data and the results were tabulated. The results were checked to insure that
no decrease in perfonnance had occurred following the final selection of the constants
compared to the best results obtained during the tuning procedure.

4.6.2 Algorithm Based on Amplitude and First Derivative


The concept of this QRS complex detector was derived from the algorithm developed
by Moriet - Mahoudeaux [6]. Let x(n) = x(I), x(2), (k), where k is the number of
samples for analysis, represent a one dimensional array of sample points of the
synthesized digitized ECG. An amplitude threshold is calculated as a fraction of the
largest positive valued element of that array
Amplitude Threshold = O.3max [x(n)] ; I < n <k
The first derivative yen) is calculated at each point of x(n), such that
y(n)=x(n+I)-x(n-I); 2<n<k-1 (4.1) ,
47

The difference equation based on three-point central difference algorithm whose


transfer function is z-z.1, places zeros at z = 1 and z = -1. so the approximation to the
derivative is poor above/lID as shown in fig. 4.7. However since the response goes to
zero at/s12, the filter has some built in smoothing.

-I .. .l
Fig. 4.7: Response for Difference Equation (4.2)

0.0 • ~ ~ ~

-J L-----.-."
o :.....••.......• "r'.-..-~-,,~•.., ,,-'---J l- - /-_._._-_/""",.,~
l--.--,._~ ,,-'"
_o.~0-----1-00---2-60-.--:;.6.0 ..•00 - !'Sao -000 70'0 000

Fl •.•t Oer1vlltlve of ECGl Dete

Fig. 4.8: ECG Signal and its First Derivative

A QRS candidate occurs when three consecutive points in the first derivative array
exceeds a positive slope threshold and are followed within the next lOOms by two
consecutive points which exceeds the negative slope threshold. All data points in the
ECG between the onset of the rising slope and before the end of the descending slope
must meet or exceed the amplitude threshold.
y(i), y(HI), y(i+2) > 0.1 (4.2)
And y(j),y(j+l) < -0.1 (4.3)

Where (H2) <) < U+25)

And x(i),x(i+ I )•... '" ... ,x(j+ 1) >= Amplitude Threshold


48

4.6.3 Algorithm Based on First Derivative


This algorithm was adapted from one developed by Menard [9]. The first derivative is
calculated for each point ofECG, using the formula specified by Menard [9]:

Y(Il) = -2x(1l-2)-x(Il-1 )+>:(11 + 1)+ 2x(1l +2); 3<Il<k-2 (4.4)

This difference equation h as zeros at 1, - 0.2500 + 0.9682i, - 0.2500 - 0.9682i, .1,


which is similar to a five point parabolic smoothing filter. Fig. 4.9 shows the response
approximate the true derivative at low frequencies only, since the smoothing nature of
the parabolic fits attenuateS high frequencies significantly.
l'V1agnit•..•
d. R •• pon •• (dB)

~~P-ilifff~::t
:"i::.
-:.,-;-~:-"
.. -!
.J ..
.. !. .1--~-jE..
: !.; i:
+ .. ' :::::"" '1"
.: 'j.: "j.: "j,:
i,: i,i.,!,!

-j'Y"1'~~-r ":"'-'~'.' ..
i,' ':"!"::::
' : : ::::
1. j'l'l!:":.'"
.,,,,', :,...:.:"i _ ..: -...: .: ":',:<~;:':;'" ... _.. __. .. :,.• :,..,: '::;:.:""_ ......•..... '" "~,.,i".,1..i"jj,
U't. Pr••q •.•••ncy (H",'

Fig. 4.9: Response for Difference Equation (4.4)

The slope threshold is calculated a s a fraction 0f the maximum s lope for t he first
derivative array. In the original only the 1.2 sec of data is considered, but in this
experiment the entire data is used.

-l' ,.........
,..-.-~-~':
-,--
Slope threshold = 0.25max[y(Il)] ; 3 <11 <k-2

.:~-,._"b,=:...J~-=J
mV
o

4,---~--~
100 200 300 ~oo ~oo . 600 700
No. of.empl •••.
&00

:--~-
j 1-.---
-2 .. ~

200
F ••..•t 00<1""'11". or ECG Slgr,..1

Fig. 4.10: ECG Signal and its First Derivative using eq" (4.4)
49

The first derivative array was searched for points, which exceed the slope threshold.
The first point that exceeds the slope threshold is taken as the onset of a QRS

candidate:
y(i) > slope threshold

4.6.4 Algorithm Based on First and Second Derivative


This algorithm was adapted from the QRS detector scheme developed by Ahlstrom
and Tompkins [10). The rectified first derivative is calculated from the ECG:

yo (n)=abs[x(n+ I)-x(n-I)]; 2<n<k-1 (4.5)

The rectified first derivative is then smoothed. Smoothing is done to reduce high
frequency noise by averaging several data point together (moving average). Here a
three point moving average filter was used for smoothing (fig. 4.11):

y,(n)=[Yo(n-I)+2yo(n)+yo(n+l)]/4; 2<n<k-1 (4.6)

'. ':

!" ,! 1 •• "" "1" .... !._ ... - - --- - -_ .... -- .. 1--. --:--_ .. _-

.
.. _: ..., - - -~... _ .. _.:
.
... .. ; ... , :. 'j, ! _.: . - .... ;.. :- .
.,..;,," ......... . - ..... . ..
, , - .... ,- - ~-.. .. "
. • 'In __
.__ __._i __ L. _.__.. 1 _._.. ._,l__. j. .• ~: ..i.. ...;,
..
__
" <:t <'I,; 0 1 <:I-'.. <:' ". (I ~"'.. (;I::l •.•.:,.. <:t.. •• .••••
r,,-. •..•.•.••u ••nCly CH",,)

Fig. 4.11: Response for Moving Average Filter

The rectified second derivative is calculated:


Y2(n)=abs[x(n+2)-2x(n)+x(n-2)] ; 3 <n<k-2 (4.7)

This filter derived by cascading two stage of three point central difference derivative

of equation (4.7). The rectified and smoothed first derivative is added to the rectified
second derivative:
50

3<n<k-2 (4.8)

The maximum value of this array is determined and scaled to serve as primary and
secondary thresholds:
Primary threshold = OAma.x[Y3(n)] ; 3<n<k-2
Secondary threshold = 0.05ma.x[Y3(n)] ; 3<n<k-2
The array of the summed first and second derivatives is scaled until a point exceeds
the primary threshold. In order to be classified as a QRS candidate, the next six
consecutive points must all meet or exceed the secondary threshold:
Y3 (i»= primary threshold; 3<n<k-2 (4.9)

Y3(i + 1), Y3(i+ 2), , Y3(i+G» secondary threshold (4.10)

;A: ;1
~ '~i~
600
A. ] 700
No. of
800 S8mple~

600
A: 700
iNO'Of
800 Semple1

:."A :
600 700
-INo of
600 Sample

: A:
600 700
j No 01
800 Samplel

Fig. 4.12: a) ECG Signal b) Rectified first derivative signal c) Output of


Moving Average Filter d) Rectified second derivative signal e) Sum of (c) and
(d).

In the original version of this algorithm, the second derivative of the rectified ECG
was smoothed, presumably in the same manner as the first derivative. The
performance of the original algorithm was erratic in the presence of no~se and was
substandard when compared to the current form as specified above.
51

4.6.5 Algorithm Based on Digital Filter (FIR)


This algorithm is an adaptation of Okada's QRS detection algorithm [13]. The first
stage smoothes the EeG using a three point moving average filter:
Yo(n)=[x(n-l)+2x(n)+x(n+l)]/4 ; 2<n<k-l (4.11)
The response of this filter is shown in fig. 4.11. The output of the moving point
averaging filter is passes through a low pass filter:
n+m
YI(n)=[1/(2m+I)] L:>o(l); m<n<k-m (4.12)
I=n-m

The response of the low pass filter for m=6 is shown in fig. 4.13.
Magnitude ResponsB (dB)
-'-r" -'-1 "1""-1"-1""1"]"1 'J """"" _•••• ~-_.,._.~._-!"--~-~'-~'-~.~~--_._'--~--
, . , "
, , , , , ""
" ..,
, , , , " , .
T~F~... r '. r!Trn T" -'.
I , , , , " "
,
-:-:;~:-:-. --;-
~u .
, ," , .
rr
"" ,
:-:~~---~-~-~-:-~:~;~---
0'" ,.",,,,,
, ".. .. . ,.
., ,. ,,"
" r,- - - -,.-
,
-.-. ...•..• .
,,
,,'"". ", """ ",.
, ,
.. ,... ,", .., ." ... ,-",,-,- .-, -.....• .-,' '"' . -,". -

_40 .•.., .. ,_.,-, .


-co ..
...,_ ....,-.,.., ', .
,, ,, ,, , ",,'
, , , ,""
..
.(If.l .• '
10 1(f" , l]'~

flfs Frequency (HlI:)

Fig. 4.13: Response for Low Pass Filter

The difference between the input and output of the low pass filter, which is act as a
band-pass filter is then squared:
Y2(n)=(yO(Il)-YI(Il))2; m<ll<k-1II (4.13)
The squared difference is filtered to enhanced the QRS complex:
"+m
Y2(n)=Y2(n){ L:>2(1)}2 ; m<n<k-m (4.14)
I=,,-m

A fourth array is form to discard peaks due to abrupt baseline shift, using the
following fomlUla :
Y4(n)=Y3(1l) if [yo(n)-Yo(n-m)][ Yo (1l)-Yo(ll+m)]>O
Y4(n)=O otherwise (4.15)
52

a)

b)

c)

0,2 Square of Output.lnputDifferenceof L:PF


d) 0,1
o

e)
0' 1
04
0,02
1:0 ?~O 3:0 4:0 ~Q~SE~:~nce~:;l 8:0 9:0 JO
6 O
00:1
0,02
1:0 2~0 3:0 4:0 ~ j:~se p e:a p~~:ing
ks 8:0 9:0 JO
o
o 100 200 300 400 500 600 700 800 900 1000

Fig, 4.14: a) ECG Signal b) Output of Moving Average Filter c) Output

of Low Pass Filter d) Square of Output to Input Difference of Low


Pass Filter e) Enhancement ofQRS Peaks t) Pruning of False Peaks.

The maximum value of this array is determined and scaled to form the threshold:

Threshold = O.l25ma.x[Y4(n)] ; m<n<k-m


A QRS candidate occurs when a point inY4(n) exceeds the threshold:

Y4(n) > threshold


Okada suggests setting m equal to three for best result; however, it was determined
using the tuning procedure that larger values of m result in improved performance for
several types of noise. As m increased the performance increases along with
computational demands. The improvement in performance begins to fall off at values
of m greater than four while the computational demands continue to increase. The
value of m was set to six in order to give good performance while keeping the

computational requirements at a reasonable level.


53

4.6.6 Algorithm Based on Digital Filter (IIR)


This algorithm uses the QRSdetection developed by [15]. Figure 4.15 below shows
the process involved in the QRS detection algorithm. The digitized ECG signal, ECG
(k) is passed through a band pass filter composed of cascaded high pass filter and low
pass integer filter, differentiation, squaring and moving average filter.

Eee (lc)

Lowp- Hichp.a.

Filt.:r
••
rut.!r

Bandpass Filter
N•••••••
o!"QRS
Peak

Fig. 4.15: Process involved in the QRS detection algorithm

This filter isolates the predominant QRS energy centered at 15 Hz. Energy of QRS is
between 5Hz-30Hz [20]. The filter implemented in this algorithm is a recursive
integer filter in which poles are located to cancel the zeros on the unit circle of the z
plane or known as the I1R filter. The transfer functions, difference equation and

frequency response for the second order low pass filter is as below and its response'
shown in fig. 4.16. It has a cutoff frequency at 18Hz. This filter eliminates noise such

as the EMG aild 50Hz power line noise.

Transfer Function:

(4.16)

Frequency Response:

IH(wT)[ = sin'(3wT) (4.17)


sin'(wT/2)
54

Difference Equation:
Y[IIT] = 2Y[IIT - 2T] + x[IIT] - 2x[IIT - 6T]+ x[IIT -12T] (4.18)

:T~--~T:-:~:r::-=
:::~~--:-:~:-~:-T----;~--_-:r-_-~T:-:-::-~_::
M<aQnitud •• R"' ••pan •••• (dS)

,,';'1:1 .' •..... __ .j,_.__ ..._j.. ..-j-----t-----.:- ---, --'--~-----:-~- --


Iri" : : : : • •

I:::: --:: ::--:--__-;: ::;:--:':::--;:::-: j:.: :~ ;:.':__::


: .:.i: ~ _

..'uo .._.._._...,~--_._._.-:._.. -.:-.- ..,--~.-_.---:---

. " •• ~. ...' .. .. "1 .. . . .-: ,.. . : : :" ,, , ~,: -"._ ,: .. ,.!:.,.::.,.~.__ ~:..:.: __ .. ,~I,.":._~~_.~._
":.-_L._~_~-.~.'_:~_::_
. ..,-._.,::._~_
..~:_
..-' .••,-' •.:; _.'6..::J.~;.,- f.J,-' 0;),-' ~> 0,;1 n.;'~.\ O.i._ 0,,':'31':' '.l,"l I:' 'H'
U(.. "'requenov (HZ)

Fig. 4.16: Response of Low Pass Filter.

The transfer function and difference equation for the high pass filter is as below and
its response shown in fig. 4.17. It has a cutofffrequency at 5Hz. This filter eliminates

motion artifacts and also the P wave and T wave.


Transfer Function:

(4.19)

Frequency Response:

I H(wT) 1= [256+sin2(16wT)j1l2
cos(wT /2) (4.20)

Difference Equation:
Y[IlT] = Y[IIT - T] - x[nT]/ 32 + x[IIT -16T] - x[IIT -17T] + x[IIT - 32T]/ 32
(4.21)
__, .. ~~gn~ltu':'~._R~_~,p':,
..n~~._~.~_~]
__,.__
...._.... , .
.
"---r--:---r
- .- .
,: :

., .. ,,,.. .. .. -
, , ...,'
,
- -' -,- ..
. ----~-----~----1--- -:-----
,~,
..... .., .,;.... ,.... j .. -' .,... -!" - - ,.... - - - - "j" .. - ". - t - ..- ..'j - - - .,-~..- - - --
r.> -- •••• !--- ..-:- --'"';'.''' ._-:----- ----~-, ~~~~----i---.-l-----
;>,-,

., .~.... .- . '

., . ... ~ ' . "~. .. .. . ... 1""

I .. " ..• .._.__•.._.1 •• " "" i


.•...
',1'.,"'. ,',I" ".,,'.
f/r.
,'1 •••
"r••",u••nov (Hz)
" '.~' n.-;"" "

Fig. 4.17: Response of High Pass Filter.


55

After the signal has been filtered, it is then differentiated through a five point
differentiator to obtain information on slope of QRS complex and overcome the
baseline drift problem. Its response is similar as shown in fig. 4.9. It also helps to
accentuate QRS complexes relative to P & T wave. Below are the transfer function,
frequency response and the difference equation.
Transfer Function:
H(z) = 0.1(-2z-' - Z-1 + z + 2z') (4.22)
Frequency Response:
l
1 H(wT) 1= 4 T (sin2wT + 2 sin wT)
(4.23)
Difference Equation:
8y[nT] = 2x[nT]+ x[nT - T]-x[nT -3T]- 2x[nT -4T] (4.24)

The previous process and the moving average that will be explained next are linear
processing parts of the QRS detector. The squaring function that the signal now
passes through is a nonlinear operation. This squaring 0 peration besides makes all
data positive; it emphasizes the higher frequency component nonlinearly and
attenuates the lower frequency component. The equation is as follow:
y[n] = x[n]' (4.25)
The last transformation of the signal before the QRS wave detection is done was a
moving average filter, which acts as a smoother and performs a moving window
integrator over 150ms (e.g., 54 points at a sampling rate of 360Hz). Refer to Equation
4.32. Generally, the width of the window should be approximately same as the widest
QRS.
y[nT] =(x[n T-(N-l) TJ +x[nT-(N-l)TJ + +x[ nTJ)1N (4.26)

--~---~--
,....
: : :
------ . ~-_---O-S-)----
~

Fig. 4.18: The relationship of a QRS complex to the moving average waveform: ECG
signal and Output of the moving average filter. QS; QRS width, W; width.
of the moving average filter.
56

a)
_~FJ~,:~: :=J~:~EC~S_ign~_,:~;
500 00 200
;Ad
300 0 500 0 700 BO a 00
Bandpass Filtered
b) a
-50
200 300 400 500 600 BOO 00
100 100
Defferentiated
c). 0

-10
1000,-----,,10¥"0'--
...•
2"'1-00"---"'30;"'0'--..:I4¥'00'-~5'>i0"'0
_",60",0'--~"TOO~~B",,~f"'0_.
~9~¥'0~400

d) 5:t ; : : M ~qUared: M: ~ ~ Mj
400 100 200 300 400 500 600 700 BOO 00 000
Averaged
ej 20

00 100 200 300 400 500 600 700 BOO 900 1000

Fig. 4.19: a) The digitized ECG signal b) after band pass filtering. c) after band pass
filtering and differentiating. d) after band pass filtering, differentiating and
squaring. e) the final process; after band pass filtering, differentiating,
squaring and moving average filter.

Thresholds are set up to detect QRS complexes in the output of the moving average
filter. This algorithm uses a dual threshold technique and a search back for missed
beats.

4.6.7 Neural Network Analysis for QRS Detection


The Artificial Neural Network has parallel, distributive computational structure,
which is reminiscent of human neural system. In an ANN structure many simple,
nonlinear processing element, called neurons, are interconnected via wcighted '
synapse to form a network. Fig. 4.20 shows the function of each neuron is to compute
a weighted sum of all synapse inputs and a predicted bias and pass the result through a
linear or nonlinear function.
57

.x;
..

u.r aI.
.Xj
..
X
N

Fig. 4.20: Functional Description of a Single Neuron.

If the neurons are grouped in layer of weighted synapse interconnecting Qnly neurons
in successive layers, the ANN structure is called Multilayer Perceptron model as
shown in fig. 4.21. An MLP model is the most popular and the most studied ANN
model. An MLP consists of an input layer and an output layer, with 0 ne or more
hidden layer in between.

OUt-I
@) ; Sigmoid nudrl

o: l..intIar ncdtl

In_I
Fig. 4.21: A 3-2-2 Configured Multilayer Perceptron with Direct Input-Output
Connection.

With sufficient number of synapse weights, an MLP is capable of approximating any .


nonlinear functional mapping to arbitrary accuracy. In the QRS complex detection

application, an MLP can use to model the background noise process. A Time Lagged

Feed forward Network can be applied as an adaptive filter (19), [50). A matc~ed filter
58

is used in order to maximize the QRS amplitude in a noisy environment. Finally, an


adaptive threshold is used to decide whether or not a QRS has occurred. The TLFN is
a supervised network, which acts like a one-step predictor of the current sample using
the immediately preceding samples ("whitening filter") [19]. The over-all behavior of
the network is primarily to predict lower frequencies contained in the
electrocardiogram. The occurrence of a QRS complex, which is associated with
higher frequency content, implies that the prediction error will suddenly increase, and,
accordingly, indicate the presence of a QRS. The TLFN consists of a forward and a
backward pass, as shown in Figure 4.23. In the forward pass; the stimulus (input) is
propagated r ightwards through the entire network in order to produce a prediction.
The error between such a prediction and the desired response is then propagated
backwards in order to update the synaptic weights. This procedure is referred to as the
training of the network. All the free adjustable synaptic weights, w(Il), are updated in
order to minimize the error with a least mean square (LMS) algorithm [50].

E03 L

fLFN . Malcllad RIlEf . Maplli'e •


• • Thrrmr.ld •

4 ORS
Tampal£!
..•.

Fig. 4.22: Block Diagram of the Detection Algorithm

4.6.7.1 Forward pass


The applied TLFN has M input nodes, according to M preceding samples for the
prediction, L nodes in a hidden layer and (M+2)L+l synaptic weights, w(Il). as shown
in Figure 4.23. Each node is consists of a summation point, an externally applied bias
connected to an input fixed at +1, and a nonlinear activation or threshold function.
The most common applied activation function also used in this network is the
hyperbolic tangent function, which is a graceful balance between linear and nonlinear
behavior [50].
59

. ~.

Fig. 4.23: The Time Lagged Feedforward Network

II)
The nodes in the hidden layer are represented by the vector V' • Such a vector V",

contains the bias and the weighted inputs according to:


(I) (I)
V =W x(ll) (4.27)

W(I) (n)
v~')(n) 1M I
(I) ( )
vi')(n) wi~(n) wi~)(n) W2M n x(n-I)
(4.28)

w:.:.'t (n) x(n - M)

with M=6 and L=5. Thereafter, the output v") is further processed with the nonlinear

activation function according to:

(4.29)

which is the output of the hidden layer. Such an output of the hidden layer, according
to eq" (4.29), is propagated further to the next layer. Since the network only has one

hidden layer the next layer is the output layer. The output layer consists of a single

node. Thus the response of the network is calculated as,

v~2)(n) = W(2'i1 y"f (4.30)

As shown in eq" (4.30) the output of the network IS the weighted and summed

response of the hidden layer.


60

4.6.7.2 Back-propagation pass


In the back-propagation pass all the synaptic weights, w(n), are updated with the well
known back-propagation algorithm [50]. The objective of the back-propagation
algorithm is to train the network. This is done in order to minimize the deviation of
the response to the desired prediction. Such a deviation (error) is defined as,

e(n)=x(n)-v~2)(n) (4.31)

All the errors are squared and summed according to:

(4.32

where the set of C includes. all the neurons in the output layer. The error function is
minimized wjth the use of the LMS algorithm [50] as

&(n) _ &(n)&}(n)5y}(n)Ov}(n)
Ow}(il) &} (n)5y} (n)Ov} (n)Owj (n)

(4.33)

. The correction W}I applied to the synaptic weights is performed with the delta rule

according to:

~wjl(n) = -77 6(n) (4.34)


Ow}1 (n)

where 77 is the learning rate. The negative sign in (4.34) is due to the gradient descent

in weight space. Inserting (4.33) in (4.34) yields,

!!.wjl (n) = 77 e/11 )q" ( v} (II »y} (II ) (4.35)

where rp' is the time derivative of the activation function. The learning speed is

accelerated with the addition 0 fa fraction a , of the previous weight update to the
current update. Moreover, the use of a momentum term a. is a possibility to overcome.
the problem of getting stuck in a local minima. The weight updates for the hidden
layer and the output layer are calculated according to:

I1wii (n) =J}e/n)q;' (Vi (n))y /n) + al1wii(n -1) (4.36)


and

(4.37)
61

Finally, all the free adjustable synaptic weights, W(II), in the network are updated by
adding (4.36) and (4.37) to the corresponding weights. This issteepest descent rule

for standard backpropagation algorithm. In some adaptive algorithms, a changes


with time, but this requires many iterations and leads to a high computational burden:
Fortunately, the nonlinear least square Gauss-Newton method has been used to solve
many supervised NN training problems. When the Gauss-Newton update rule is
employed, the solution procedure iteratively as:

W(II+I)=W(II)+~W(II), 11=0,1, ... (4.38)

where W(II) denote the NN weight vector at the n'th iteration and ~W(II) is the

ehanged weight. ~W(II) is computed from:

minIIJ(II)~W(II) + e(II)11 (4.39)

Le.,

J(II)T J(II)~W(II) = _J(II)T e(lI) (4.40)

where

J(II) = [Ge, (II)],


Ow, (II)
->
is the Euclidean norm and M is the size of the training sets. If y, is the NN output
11.11

->
vector and x, is the expeeted output vector for each training pair i, then

e(lI) = [;'(11)"'''''';'" (lI)r


with
-> -> ->
e, (II) = y, (II) - x, (II),

The above deviation is the essence of the Gauss-Newton algorithm. However the
Gauss-Newton algorithm is generally not locally convergent on problems that are

very nonlinear. To improve the situation, the following formula is usually adopted:

(J(k)" J(k) + fISTS)~W(k) = -J(k)" e(k) (4.41)

. -~\
62

where S E R"'" is a non-singular matrix and fJ is a coefficient. The searching

direction obtained from this formula varies as fJ changes. The Levcnberge-

Marquardt algoritlm1 is based on this method and replaces S with the identity matrix
and the update weights can be obtained. To reduce training time Levcnbergc-
Marquardt algorithm is used in this study.

4.6.7.3 QRS Detection


Tompkins el. al. [18] used a two layer MLP ANN with a 6-3-1 configuration

empirically. But this did not show generalize performance against different noisy
ECG signal. To growing the network for better performance new neuron added to the
hidden layer. The growing network was tested against the noisy signal.and it was seen
that a 6-5-1 configuration perform satisfactory. A 6-5-1 MLP configuration was
trained with different sets of 200000 samples noisy signal by Levenberge-Marquardt
algorithm using a adaptive scalar constant (fJ) which is initially 0.00 I with a

increasing factor 10 and decreasing factor 0.1. Plotting the errors in an approximation
is a good way to check generalization. Information has to be obtained from looking at
how the error decreases during training. In general the error used is the Mean Squared
Error (mse) given by:
1 /1-1

mse =- L(y(n)-x(n»' (4.42)


n k=O
A plot of the performance function (mse) for a 6-5-1 TLFN is shown figure 4.24
below. Training stops when the change in error flattens off and becomes asymptotic.
The training was stopped at 500 iterations with an MSEofO.0206393.

MSE
10' .. . .-- . . , ~--- ~-----.

"0"

"0"

•• <:> ~ ~-- ~B.'o---.,-oo----.•,;C>----2oo--"",;o----:i"o;:;;-----5'".;.-6---- .•<'.o--- -.;.ii-~--


.••
000 •.•pco.,. •.••

Fig. 4.24: Mean Square Error vs. Epoch Curve during training.
63

This TLFN used for simulation process. After averaging and smoothing the output of
TLFN, a matched filter is applied to improve the SNR. It is well-known that the
impulse response h(II), of the matched filter is a time-reversed replica of the event to
be detected, i.e., the QRS complex. The template of the match filter updated after each
beat detection. Figure 4.25 shows noise suppression by TLFN and the output of match
filter.

.. :PE • o 500 1000 1500 2000 2500 3000 3500 4000 4500 5000

b) .J1J~~~~~=qTj
o 500 1000 1500 2000 2500 3000 3500 4000 4500 5000
O.5[ , , , , , , , , , ]

c) .o.:I_j~ti=~'+j:~L
0,06
o
__I,L.~~_~t!jTij=i=8
500 1000
.-------.--.-r--
.....
__
1500 2000 2500 3000 3500 4000
-..---f'--.-------r---.------,---,--,--,----~-----r
4500
--
5000

d) 0.04

0,02

500 1000 1500 2000 2500 3000 3500 4000 4500 5000

Fig. 4.25: a) Noisy Signal b) Noise Removing by NN c) Averaging and Smoothing


d) Match Filtered Signal.

The output of the matched filter is then propagated further to the adaptive threshold
function to detect the QRS complex. Such a threshold function uses 60% of peak
amplitude of the previous detected QRS complex in order to adapt the threshold.

4.6.8 Wavelet Transform Analysis for QRS Detection


Fourier transform based spectral analysis is the dominant analytical tool for frequency
domain analysis. However, Fourier transform cannot provide any information of the'
spectrum changes with respect to time. Fourier transform assumes the signal is
stationary, but ECG signal is always non-stationary. To overcome this deficiency, a
modified method-short time Fourier transform allows to represent the signal in both

• r
64

time a nd frequency domain through time windowing function. The window length
determines a constant time and frequency resolution. Thus, a shorter time windowing
is used in order to capture the transient behavior of a signal; which sacrifice the
frequency resolution. The nature of the real ECG signals is non-periodic and transient;
such signals cannot easily be analyzed by conventional transforms. So, an alternative
mathematical tool wavelet transform can be selected to extract the relevant the timc-
frequency information from a signal. In this work, we stated only some keys
equations and concepts of wavelet transform, more rigorous mathematical treatment
of this subject can be found in [51]. A continuous-time wavelet. transform of /(t) is

defined as:

(4.43)

Here a,b E R,a l' 0 and they are dilating and translating coefficients, respectively.
,
The asterisk denotes a complex conjugate. This multiplication of lal' is for energy
normalization purposes so that the transformed signal will have the same energy at
every scale. The analysis function 'Y(t) , the so-called mother wavelet, is scaled by a,

so a wavelet analysis is often called a time-scale analysis rather than a time-

frequency analysis. The requirement that 'Y(t) has compact temporal and spectral

support (limited by the uncertainty principle of course), upon which set of basis
functions can be defined. The 'Y(t) must have zero mean. This condition can be stated

as,
ro

flfl(t)dt =0 (4.44)

and known as the admissibility condition.

The other main requirement is that the mother wavelet must have finite energy:
ro

fllfl(t)[' dt < 00 (4.45)


oro

The wavelet transform decomposes the signal into different scales with different
levels of resolution by dilating a single prototype function, the mother wavelct.
Furthermore, a mother wavelet has to satisfy that it has a zero net area, which suggest
65

that the transformation kernel of the wavelet transform is a compactly support


function (localized in time), thereby offering the potential to capture the QRS spikes
which normally occur in a short period of time.

4.6.8.1 Discrete Wavelet transform and MultiresolutioD Analysis


One drawback of the CWT is that the representation of the signal is often redundant,
since a and bare continuous 0 ver R ( the real n umber). The 0 riginal signal can be
completely reconstructed by a sample version of W[(b,a). Typically, we sample Wr
(b,a) in dyadic grid, i.e.,
(4.46)

m, n E Z, and Z is the set of positive integers. Substituting (4.46) into (4.43), we have
~
DWT f(m,n) = ff(t)lf: .•(t)dt (4.47)

where '¥ m •• (I) = 2-m12


'¥(2m t - n) is the dilated and translated version of the mother

wavelet '¥(I). The family of dilated mother wavelets of selected a and b constitute an

orthonormal basis of L' (R). Due to the orthonormal properties, there is no

information redundancy in the discrete wavelet transform. Figure 4.26 shows the

equivalent frequency response of the DWT at different scales.

D••

D.'

D.'

0 .•

0.'
0.'
0.3

0.'
0.'
.0 0.• 1.6
P~.-q•.••ncy 1•.• ""'-1
g ...
Fig. 4.26: Equivalent frequency response of DWT at different scales

To guarantee perfect reconstruction, a low-passing term called scaling function

invited to DWT. The wavelet function and the scaling function represent as impulse
66

responses g(n) and hen), can be viewed as a high-pass and a low-pass filter. For
discrete time signals, discrete wavelet transform is equivalent, according to Mallat's
algorithm, to an octave filter bank [52], and can be implemented as a cascade cells'
[low pass and high pass finite impulse response filters (FIR)], as illustrated in figure
4.27.

_Original I Levt-I I l.evel2


Sign,)1 I

I
I
D'(l) I
<VB. /"1
0'(\)
(f.M .1,J:d
I
(a)

ReeonltrUot.d
Ltvtl2 leval 1
Sign.J1

(b)
Fig. 4.27: Filter Bank Implementation ofDWT. a) Decomposition b) Reconstruction.

This multi resolution analysis (MRA) algorithm decomposes a signal into'scales with
different time and frequency resolution. MRA is designed to give good time
resolution and poor frequency resolution at high frequencies and good frequency
resolution and poor time resolution at low frequencies. The fundamental concept

, )
Q
67

involved in MRA is to find the average features and the details of the signal via scalar
products with scaling signals and wavelets. In the ECG signals we have seen, sharp
spikes are observed when QRS occurs. The spikes are typically of high frequency and
we are able to discriminate the QRS spikes with other noises VJrough the
decomposition of MRA into different levels. The differences between different
mother wavelet functions (e.g. Haar, Daubechies, Coiflets, Symlet, biorthogonal and
etc.) consist in how these scaling signals and the wavelets are defined. To have a
unique reconstructed signal from wavelet transform, we need to select the orthogonal
wavelets to perform the transforms. The wavelet decomposition results in levels of
approximated and detailed coefficients. This multi-resolution analysis enables us to
analyze the signal in different frequency bands; therefore, we could observe any
transient in time domain as well as in frequency domain.

The relation between the low-pass and high-pass filter and the scaling function
rjJ (I) and the wavelet '¥ (I) can be states as following:

rjJ (I) = Lh[k]rjJ[21-k] (4.48


k

'¥ (I) = Lg[k]rjJ[21-k] (4.49)


k

The relation between the low-pass filter and high-pass filter is not independent to each
other, they are related by:
g[L-l-n]=(-I)" .h[n] (4.50) .

where g[n] is the high-pass, h[n] is the low-pass filter, L is the filter length (total
number of points). Filters satisfying this condition are commonly used in signal
processing, and they are known as the Quadrature Mirror Filters (QMF). The two
filtering and downsampling operation can be expressed by:
A'[k] = L, .r'(t). h[2k-n]
(4.51)

D' [k] ~ L.-/'-'


(I), g[2k - n]
• (4.52)
The reconstruction in this case is very easy SInce the halfband filters form the
orthonormal bases. The above procedure is followed in reverse order for the
reconstruction. The signals at every level are upsampled by two, passed. through the
68

synthesis filters g'[n], and h'[n] (highpass and lowpass, respectively), and then added.
The interesting point here is that the analysis and synthesis filters are identical to each
other, except for a time reversal. Therefore, the reconstruction formula becomes (for'
each layer)

A' [k] =
.
L (D'-'[k] .g[ -II + 2k] + A'.'[k]. /;[-11 + 2k])
- 0.53)
Almost all wavelet based peak detection methods [24]-[27] are based on local
maxima of the wavelet coefficient signals. A number of wavelets proposed in
different literature, such as; quadratic spline wavelet in [25],[ 27] derivative of a
Gaussian smoothing function in [26], symlet in [29].

4.6.8.2 Wavelet Selection


The design of a wavelet system involves the estimate of the scaling fun.ction ~ (I),

and the wavelet and scaling filters g(n) and h(n). In practice, the wavelet design can
be started first by choosing the scaling function [53]. In this study, we choose to select
the mother wavelet based on the method of correlation between two signals. Because
shape and smoothness of the scaling function tend to appear in the de-noised signal,
choice of regular wavelet is advised. Wavelets with higher rank in the family are more
regular and smoother. Non-regular distortions in ECG signal were shown, that appear
in the signal after using wavelet denoising procedure were studied. It has been noted
that these distortions have similar shape to the scaling function of the wavelet
transform that is used for signal decomposition. Hence, the type of wavelet used for
signal de-noising has to be selected carefully. It is belter to use regular wavelet, which
resembles shape of the waves in ECG signal. Belter results are obtained if wavelets
with a high rank in the family are used. We choose coiflet2 for denoising and
biorthogonal6.8 for detection process. Most of the energy of the QRS complex lies
between 5 Hz to 30 Hz [IS]. Selection of maximum decomposition levels depends on
this frequency band.

4.6.8.3 Wavelet-based Denoising


A possible application of the discrete wavelet analysis is to remove undesired
components (noise) from the signal through a de-noising approach. Basically the
69

procedure includes decomposing the signal into the detail components, identifYing the
noise components and reconstructing the signal without those components. This is
called the linear denoising approach. The linear denoising approach assumes that the
noise can be found within certain scales, for example, at the finest scales when the
coarsest scales are assumed to be noise free. More sophisticated non-linear
thresholding approach also use for de-noising, which involves discarding the details
exceeding a certain limit. This approach assumes thaI every wavelet coefficient
contains noise and it is distributed over all scales. The non-linear de-noising by both
soft- and hard-thresholding methods can be performed [54]. The hard threshold signal
is x if Ixl> th, and is 0 if Ixl<thoThe soft threshold signal is sign(x)(lxl - th) if Ixl> th
and is 0 if Ixl< tho Hard thresholding can be described as the usual process of setting
to zero the elements whose absolute values are lower than the threshold. Soft
thresholding is an extension of hard thresholding, first setting to zero the elements
whose absolute values are lower than the threshold, and then shrinking the nonzero
coefficients towards 0, as shown in figure 4.28.

Fig. 4.28: Soft-threshold function

The threshold can be select by four threshold estimation procedures: SURE,


HEURISTIC SURE, FIXTHRES and MINIMAX principles. Stein's Unbiased Risk
Estimate (SURE) is an adaptive threshold selection rule defined as

th = ~210g, (n.log, (n)) , where n is the number of samples in the signal vector. With

this approach obtaining risks and minimizing them with respect to til values gives a
threshold selection. The method is adaptive through searching a threshold level for
each wavelet decomposition level. A fixed threshold approach FlXTHRES calculates
the threshold with respect to the length of the signal and the estimated threshold is
70

given by liz = ~210g,(n), [54]. The HEURISTIC SURE approach being a variant of

the first, replaces in very noisy conditions the sure with FIXTHRES estimate [55].
Further, the MINIMAX procedure applies a fixed liz = 0.3936 + 0.1829.log(n) [55] to
produce the so-called MINIMAX performance for mean square error against an ideal
case [54].

During simulation it was assume that the noise being normally distributed withzero
mean and v'ariance of I, which means that we have to rescale the threshold values
when dealing with unsealed and nonwhite noise. When normally and uniformly
distributed noises were studied, calculated thresholds were rescaled by the standard
deviation of noise estimated from the finest level of the decomposition of each signal
A

so that liz = (J'llz . As a robust estimate of the standard deviation.

(J' = median([dj(k)[)/0.6745 was used by Donoho [54].

Twenty independent simulations were used to evaluate the performance of the applied
deiJoising methods. The performances of the methods were studied by obtaining
errors within an ECG including 2000 samples. When considering the compactly
supported orthogonal wavelet families (Daubechies, Symlets, Coiflets) with discrete.
transform, the Coiflet wavelet basis was found most suitable. The denoising
performances were very near between these families, however, Coiflets showing
slightly the best performance. The Coiflet wavelet (Coifl) of order N = 2 was used
which had lowest denoising error among Coiflet functions. The error performance
was measured with Lz-norm given by Equation:

(4.54)

where 1 0 denotes the original ECG signal being the same for all simulations, and
XI denotes the ECG signal with added noise after noise removal.

A five level wavelet decomposition of the noisy signal using Coif2 wavelet analyzed
for denoising. The energy for motion artifacts and baseline wander (i.e. noise)
increases for scales greater than five. Figure 4.29 shows the Coif2 scaling and wavelet
71

function, corresponding low-pass and high-pass decomposition and reconstruction


filter and their response respectively.

Scaling function phi Wavelel function psi


1.5

0.5
0.5
o

o
o
\J
2 4
v
6 a 10
-0.5

o
Decomposliion Iow:pass filler Decomposition high-pass filler

0.5 0.5
O::I----'--,-~-----_._.j
\'i' '-,
O:.f-7, -':"_-':" __ -':"_--~-j

-0.5 -0.5

o 2 4 6 a 10 o 2 4 6 a 10

Reconsl~ctlon low-pass filler Reconstruction high-pass filler

0.5 ,t" .~}

O. '.'. ,
-0.5 -0.5

o 2 4 6 a 10 0 2 4 6 a 10

(a)
M.""IIUd.
, ,
R•• pon ••• IdB)

,
."'"

'''''''''" ;,;',~,'
.. ,
n,n"
... '..
•.•.
""
•••.• '1•••••
- - .. -
oay,_
n.'
. n,1'
"'-" "'"

..-
.' ...

(b)
72

M."nlt':',~_.,,~,~.~':'~~
_.,._-----~-....,.---"..,.-._-, --'-_ ... ..
.•.(~.~J. ,
_, _-_
...:...._---_.--'-----...;...-
'., '

••••••••• I- •• ••• ••••.


, -,
• ,:- ••• __ •• .:.:"

,"
. .. . I .

" ,

. -11:0<) Q ---'-'---'--l>~~I1-"'-._. ii:h~-----,,-.'-O.,~ll


...---- "--i:i~6n--.-D~I--~--"d-2--n.~1.'-----ij":~iA-
,.••'l•••••••
,,~

(c)
Fig. 4.29: a) Coif2 scaling and wavelet function and corresponding low-pass and
high-pass decomposition and reconstruction filter coefficient respectively,
b) High-pass filter response, and c) Low-pass filter response.

Denoising performances of the four threshold selection methods are reported in


Tables 4.1 for decomposition level five. Methods are compared in wavelet analyses
applying both soft and hard thresholding.

Table 4.1. Denoising performance for different threshold criterion of wavelet

denoising approach. Values are means and standard deviations of I/;:- ;1.
Thresholding Thresholding selection rule
Nonlinearity SURE FIXTHRES HEURISTIC MINIMAX
SURE
Soft 28.44:f: 6.5 27.71:f:6.66 27.92:f: 6.67 27.88:f: 6.65

Hard 29.85:f: 6.26 28.29:t 6.57 28.53:f: 6.55 29.52:f: 6.32

In the wavelet based approach, the most efficient noise removing method with soft
thresholding was the FIXTHRES, which gave the lowest error averages (Table 4.1).
In this study for denoising of ECG signal soft thresholding method used with scaling
fixed threshold (FIXTHRES).
73

4.6.8.4 QRS Detection


The wavelet used for QRS detection is Biorthogonal spline wavelet bior6.8 for which.
symmetry and exact reconstruction are possible with FIR filters (in orthogonal case it
is impossible except for Haar). In biorthogonal case two different wavelet and scaling
function used for decomposition and reconstruction. The useful properties for analysis
(e.g., oscillations, zero moments) can be concentrated on the decompositi.on function
whereas the interesting properties for synthesis (regularity) are assigned to the
reconstruction function; the separation of these two tasks proves very useful. The.
wavelet and the scaling function and corresponding filter coefficients are shown in
figure 4.30.

1
Decomposition scaling function phi
1.5
1
.-------T-------,
Decomposnlon wavelel fUnction psi

i
0.5
o.~I------f ,\,1 II 1"------1
o -0.5
v
I I'
,I
o 5 10 15 o 5 10 15
Decomposition low-pass filler Decomposition high-pass filter

0.*
-0.5
o
:
2
:":
4 6
',;
8
'::0 ~
10 12 14 16
: : J -:H.~:'"~': : ~.~1
o 2 4 6 8 10 12 14 16
Reconstruction scaling function phi Reconstruction wavelet function psi
1

0.5

o
0.:
-05
, tl f--'''-'-- ,
\1v ,I
\. ./ . V
o 5 10 15 o 5 10 15

~.~t
Reconstruction low-pass filler Reconstruction high-pass filler

_::*.~ :." ~~- .co : . : : :-- ': ;,' " :' .; 1


o 2 4 6 8 10 12 14 16 2 4 6 8 10 12 14 16

Fig, 4.30: Bior6.8 scaling and wavelet functions and corresponding low-pass and
high-pass decomposition and reconstruction filter coefficient respectively.
74

The QRS complex detection is accomplished by using the modulus maxima pair of
the wavelet transform coefficients. The transitions in the input denoised ECG signal
correspond to local maxima in the decomposition modulus at different scales. The
frequency content of the ECG characteristic waves is different, .so they are
distinguished at different decomposition scales. The energy of the QRS complex
usually is cover scale I and 2 (scale a=21 and 22 the dyadic sampling grid). Abrupt
shift in base line causes isolated peaks in wavelet transformed signal. After rejecting
all isolated and redundant peaks, the modulus maxima pair of the wavelet transformed
signal is searched for local maxima by peak detection logic with threshold value.

Fig 4.31: a) Noisy ECG Signal b) Denoised Signal by WT c) Wavelet Decomposition


of the Denoised Signal at Level I, d) Wavelet Decomposition of the
Denoised Signal at Level 2.

When a local peak exceeds the threshold, it is stored as a QRS candidate and
successive search in vicinity is performed for higher peaks, which could replace the
previous QRS candidate. After a QRS complex is declared, a refractory period of 0.2s
follows, during which no further excitation could cause heart muscle's contraction,
and peaks are not registered. TIle average RR interval of the last ten QRS complexes
75

detected is maintained and if no peak is found within this interval, the threshold is
lowered and a back-search is performed. Highest QRS between two scale taken as
exact. Thus the QRS detector adapts to the changing signal amplitude and prevents
omissions of QRS complexes. The threshold has a lower bound, preventing false
detections of the noise content in the signal.

4.7 Performance Analysis


The accuracy of different algorithms tested against different types of noisy and
noiseless signal where the performance criterion is the percentage error rate [56].
Error rate is the rate to obtain an incorrect decision'. The detection error rate ER is:

Error Rate, ER = FP+ FN *100


Total no. of QRS complex
where TP denotes number of true positives and FP is the number of false positives
that correspondences to a detector error of detecting a QRS complex when there is
none and FN is the number of false positives that correspondences to a detector error
of not detecting a QRS complex when there is one.

There are seven basic types of algorithms included in this study. The basic type is
designated by a letter prefix to make analysis simple. "AFD" for algorithm based on
both Amplitude and First Derivative, "FD" for algorithm based on FirstDerivative
only, "FSD" algorithm utilize both First and Second Derivative, "DF]IR" algorithm
used Finite Impulse Response Digital Filter, "DF_IIR" algorithm used Infinite
Impulse Response Digital Filter, "NN" algorithm based on Neural Network and the
last category was designated as "WT" which refers to Wavelet Transform analysis for
QRS detection.

The results obtained from this experiment are given in percentage error rate for all of
the a Igorithms against different levels 0 fag iven type of noise and noiseless E CO
signal separately and mean error rate with standard deviation considering all datasets.
76

4.7.1 Analysis for Noise free ECG signal


The performance of the algorithms was tested against fifteen records 0f MIT-BIH
Arrhythmia Database are listed in table 4.2. The records were chosen to evaluate
detectors ability to normal as well as abnormal QRS complex and rhythm of beals i.e.
fast or slow rate (bigeminy). According to [53], among 33774 beats there are21061
normal beats and 12713 abnormal beats. Abnormal beats consist PVC (QRS complex
that do not arise along the normal conduction route, ventricular ectopic beats), APC
(supra ventricular ectopic beats), Paced, RBBB (Right Bundle Branch Block), LBBB
(Left Bundle Branch Block), Fusional PVC, Blocked APC, Blocked APC, Junctional
Premature, Junctional Escape, Aberrated APC and Unclassifiable beats. The WT
detector exhibits the best performance with an average error rate 1.29 and standard
deviation 1.74 which indicates that variation of performance is not prominent for
different ECG morphology. NN shows slightly less performance than WT, yielding an
error rate 1.77 ~ 1.88. The other algorithms AFD (ER=5.28 ~ 11.75), FD
(ER=4.06~ 12.58), FSD (ER=2.02~ 3.22), DF]IR (ER=3.98~ 8.77), and DF_IIR,
(ER=2.67 ~ 7.34 ) shows good performance in most records except few. Algorithms
AFD(ER=40.43) and DF]IR(ER=35.27) shows poor performance for the record 228
which consists 3 supraventricular ectopic and 362 ventricular ectopic beats.
Algorithms FD(ER=49.48) and DF_IIR(ER=29.l1) shows poor performance for
record 107 which consist all abnormal beats (ventricular ectopic and paced beats), it
should be noted here that DF_IIR algorithm used FD as an intermediate step. AFD
(ER=26.27) also gives poor performance for the record 118, which consists all
abnormal beats as shown in table 4.2. Figure 4.32 shows error curves of the
algorithms for noise free ECG data with different morphology (normal and abnormal)
to provide visual clarity.
77

Table 4.2 Peiformallce (% Error Rate) of Different Algorithms for Raw ECG Signal
Record No. Total Beats Description Detected beats Error Rate
Beats (%)

100 2273 AFD 2264 0.40


Normal 2239
FD 2266 0.31
FSD 2264 0.40
APC 33
DFjlR 2264 0.40
PVC DUIR 2265 OJ5
NN 2265 0.35
WT 2265 0.35

103 2048 AFD 2073 1.22


NOffilal 2082
FD 2079 1.51
FSD 2080 1.56
APC 2
DFJIR 2067 0.93
DF_IIR 2078 1.46
NN 2077 1.42
WT 2077 1.42

105 2572 AFD 2596 0.93


Normal 2526
FD 2614 1.63

PVC 41 FSD 2728 6.07


DF]IR 2514 2.26

Unclassifiable 5 DF_I1R 2602 1.17


NN 2549 0.89
WT 257/ 0.04

107 2137 AFD 2155 0.84


PVC 59
FD 3194 49.46
FSD 2066 3.32
Paced 2078
DFJIR 2064 3.42
DF_IIR 2759 29.11
NN 2104 1.54
WT
2126 0.51

109 2532 Left BBB 2492


AFD 2546 0.55
PVC 38
FD 2541 0.36
Fusion PVC 2
FSD 2563 1.22

DFJIR 2522 0.39

DF_"R 2524 0.32

NN 2522 0.39

WT 2524 0.32

f
78

Record No. Total Beats Description Detected beats Error Rate

Beats (%)
AFD 1944 0.46
115 1653 Normal 1953
FD 1946 0.36

FSD 1946 0.36


OF_FIR 1944 0.46

DF_"R 1946 0.36


NN 1946 0.36
WT /946 0.36
AFD
118 2288 RightBBB 2166 1687 26.27
FD 0.57
2275
APC 96 FSD 2281 0.31

pVC 16 DFJIR 4.59


2183
DF _IIR 0.57
2275
Blocked APC 10
NN 2274 0.61

WT 2270 0.79

124 1619 Right BBB 1531


AFD 1546 4.51
. APC 2
FD 1615 0.25
Junctional premature 29

PVC 47 FSD 1612 0.43

Fusion PVC 5 DFJIR 1550 4.26

Junctional escape 5
DF_"R 1613 0.37

NN 1591 1.73

WT 1604 0.93

202 2136 Normal 2061


AFD 2100 1.69
APC 36
FD 2130 0.28
Aberrated APC 19

PVC 19 FSD 2114 1.03

Fusion PVC
DFJIR 2066 3.28

DF_"R 2120 0.75

NN 2003 6.23

WT 1994 6.65


79

Record No. Total Beats Description Detected beats Error Rate


Beats (%)
AFD 3011 0.20
209 3005 Normal 2621
FD 3039 1.13
APC 383 FSD 2968 1.23
DFJIR 2965 1.33
PVC DU1R 2928 2.56
NN 2833 5.72
WT 1865 4.66
AFD 2742 0.22
212 2748 Normal 923
FD 2770 0.80
Right BBB 1825 FSD 2744 0.15
DFJ1R 2727 0.76
DF_IIR 2740 0.29
NN 2726 0.80
WT 1740 0.29
AFD 2041 0.34
220 2048 Nonnal 1954
FD 2041 0.34
APC 94 FSD 2040 0.39
DFJIR 2039 0.44
DF_IIR 2041 0.34
NN 2025 1.12
WT 2026 1.07

228 2053 AFD 1223 40.43


Nonnal 1688
FD 1991 3.02
APC 3 FSD 2305 12.27
DFJIR 1329 35.27
PVC 362
DUIR 2020 1.61
NN 1982 3.46
WT 2065 0.58

231 1573 AFD 1565 0.51


Normal 314
FD 1565 0.51
Right BBB 1254 FSD 1558 0.95
DFJIR 1557 1.02
APC
DF_IIR 1565 0.51
PVC 2 NN 1560 0.83
WT
Blocked APC 2 1564 0.57

234 2753 AFD 2732 0.76


Normal 2700
FD 2744 0.33
Junctional FSD 2733 0.73
50
premature DFJIR 2728 0.91
DF_IIR 2745 0.29
PVC 3
NN 2724 1.05
wr 2730 0.84


. ~~-~.

(:' .' t'\


~f
80

Record No. Total Beats Description Algorithms Error Rate


Beats (%)
Total 33774 Normal 21061
AFO 5.28I 11.75
(ER is in APC 650
PVC 589
Mean :t FO 4.06:t 12.58
Paced 2078
Standard LBBB 2492 FSO 2.02:t 3.22

Deviation) RBBB 6776


OF_FIR 3.98I 8.77
Fusion PVC 8
Blocked APC 10 OF_"R 2.6H 7.34
Blocked PVC 2
NN 1.7H 1.88
Junctional Premature 79
Junctional Escape 5
Unclassiblc 5 WT
Aberrated APC 19 1.29I 1.74 .

Error Curves of Different Algorithms


for Noise Free ECG Signal
20

e••• 15
w 10
••••
o
'*' 5
o
"<"""N(y)'<;f"LO<Dt--OO(J) O"<"""N(y) '<;f"LO
-r-~~~-r-~

Fig. 4.32: Comparison of the percentage error rate of different QRS Detection
Algorithms for Raw ECG Signal. The marker of X-axis corresponds
different signal from MIT-BIH records.
81

4.7.2 Analysis for Power Line Interference Corrupted ECG Signal


The results for the 50 Hz power line interference are listed in Table 4.3.. The
frequency spectrum for the power line interference is 50 Hz. Algorithms based on
digital filters, neural network and wavelet transform show approximately constant
error rate, which indicates that these algorithms are relatively insensitive to power line
noise. Algorithms based on derivatives show that the error rate increase as the noise
level increases. The r ate at which error increases are also depends on the order of
differentiation. The error rate for algorithms based on first and second derivative is
greater than that of first derivative for different noise level. It is due to the fact that the
amplitude of the differentiated signal depends on the frequency of the signal.
d .
- sm cot = co cos cot
dt
The frequency response of the differentiator (figure 4.7) shows that it amplify signals
as the frequency increases. The digital filter use band pass step that attenuates power
frequency signal. Since different decomposition level of wavelet transformed signal
consist different frequency b and, level t hat contain p ower I ine signal discard from
analysis. The error curves of the algorithms against power line noise corrupted ECG
signal is shown in figure 4.33.
82

Table 4.3 Performance (% Error Rate) ofDifJerent Algorithmsfor Power Line Noise
Corrupted ECG signal

Algorithms
"E
o
'""
. '0
u 0 Z AFD FD FSD DF FIR DF IIR NN WT
~Z '-0
~
25 0.4 0.31 0.53 0.4 0.35 0.35 0.35
0 50 0.35 0.22 0.53 0.44 0.35 0.35 0.35

-
0
75
100
0'.31
0,04
3.03
308.6
0.53
0.3 I
0.48
0.53
0.35
0.35
0.35
0.35
0.35
0.35
25 1.98 2.26 13.8 0.58 1.13 1.01 0,078
50 4.28 3.58 65.1 0.31 1.13 1.09 0.19
'"
0
11.04 5.48 352.1 0,51 1.13 0.78
75 0.15
100 19.48 10.26 398.3 0.7 1.13 0.82 0.11

25 0,)6 0.36 0.41 0.46 0.36 0.36 0.36


0.05
--
'" 50
75 2.41
0.36
0.36
0.41
0.41
0.46
0.46
0.36,
0.36
0.36
0.36
0.36
0.36
100 4.3 0.25 0.41 0.41 0.36 0.36 0.36
25 0.33 1.66 0.93 1.16 2.56 5.72 4:56
50 0.7 3.36 0.1 1.33 2.56 5.72 4.53
""0
N 75 3.4 12.85 1.16 1.63 2.56 5.72 4.96
100 8.45 133.5 2.1 1.5 2.56 5.72 . 4.43

25 0.11 1.31 0,07 0.76 0.29 0.8 0.29

-
N
N
50
75
2.07
9.02
19.57
5.09
19.8
3.75
0.44
I,) I
88.17
0.76
0.91
1.02
0.29
0.29
0..8
0.8
,0.29
0.25
100 0.29 0.8 0.25
25 0.54 1.01 2.39 0.86 0.94 1.64 1.13

c :t :t :t :t :t :t :t
0
.~ 0.55 0.69 4.37 0.59 0.92 2.17 1.84
.;; 0.86 1.51 6.03 0.79 0.94 1.64 1.14
"
0 50 :t :t :t :t :t :t :t
"'~
" 1.13 1.47 16.73 0.53 0.9 2.13 1.77
"t:J
c
-
V'"l
:t
75 1.95
:t
3.21
:t
4.94
:t
0.79
:t
0.94
:t
1.63
:t
1.16
:t
3.02 4.89 14.92 0.51 0.89 2.11 1.81
c
'"
" 100 3.63 20.82 8.04 0.8 0.94 1.63 1.16
:::E :t :t :t :t :t :t :t
5.67 65.51 22.12 0.49 0.89 2.1 I.78
83

Error Curves of Different Algorithms


for Power Line Noise Corrupted Signal
20
•••
~ 15
•••
w 10
'0
';ft. 5
o
1 6 11 16 21

Fig. 4.33: Comparison of the percentage error rate of different QRS Detection
Algorithms for Power Line Noise Corrupted ECG Signal. The marker of
X-axis corresponds clean signal while successive four points corresponds
25% noise increments with this signal. Error rates greater than 20% are
not shown.

4.7.3 Analysis for Base Line Drift Corrupted ECG Signal


Baseline drift due to respiration presents a lesser challenge to all of the algorithms.
The result is for this noise type is listed in Table 4.4. All of the algorithms give good
performance. Low-frequency noise ( <0.5 Hz ) of this type is apparently ignored by
all algorithms. Derivative based algorithms attenuate this low frequency signal. The
band-pass step of the digital filter rejects base line wander. The output of the TLFN
predictor gives less error for low frequency variation of the input signal. During
detection process of wavelet transformed signal, low passed approximate signal
discarded. The error curves of the algorithms against base line drift noise corrupted
ECG signal is shown in figure 4.34.
84

Table 4.4 Performance (% Error Rate) of DifJerent Algorithms for Base Line Drij/
Noise Corrupted ECG Signal

Algorithms
"
'"
'0
"E
8 0 Z AFD FD FSD DF FIR DF_IIR NN WT
"Z .•..
e<: <:>
'$.
0.4 0,31 0.4 0.4 0,35 0.35 0,35
25
0.4 0,31 0,4 0.4 0.35 0.35 0.35
0 50
0
~ 75 0.4 0.31 0.4 0.4 0.35 0,4 0.44

0.4 0.31 0.4 0.4 0.35 0.44 0.4


100
,0.97 1.63 6,06 2,26 1.13 1.44 0,039
25
0.97 1.63 6.1 2.26 1.13 0.51 0,039
V'> 50
0
1.63 6.14 2.3 1.13 1.67 • 0.078
75 0.62

0,97 1.63 6,06 2.26 1.13 1.44 0,039


100
0,51 0.36 0.36 0.46 0.36 0.36 0.36
25
0.56 0,36 0,36 0.46 0.36 0.36 0.36
V'>
~ 50
~ 75 0.56 0,36 0,36 0.46 0.36 0.36 0.36

0.51 0,36 0.36 0.46 0.36 0.36 0.36


100
0.37 1.11 1.26 1.33 2.56 5.22 4.69
25
0,57 1.11 1.2 1.33 2.56 5.62 4.66
50
'"
0
N 75 0.6 1.11 1.2 1.33 2.56 4.76 4.63
0,23 1.11 1.23 1.33 2.56 6.76 4.66
100
0.36 0.8 0,15 0.76 0.29 0.83 0.29
25
0.36 0,84 0.15 0.76 0.29 0.87 0.29
N
~ 50
0.36 0,87 0.15 0.76 0.29 0.95 ' 0.29
N 75
0.62 0.87 0.11 0.76 0.29 I 0.29
100
25 0.48 0.85 1.64 1.04 0.94 1.63 1.14

c:: :!: :!: :!: :!: :!: :!: :!:


0
.~ 0.26 0.51 2.36 0.73 0.92 2.06 1.87
.;; 50 0,51 0.85 1.64 1.04 0.94 1.6 1.14

"
0 :!: :!: :!: :!: :!: :!: :I:
"E 0.25 0.5 2.32 0.72 0.9 2.05 1.83
'"
"0
c:: 0,51 0.85 1.64 1.04 0.94 1.61 1.16
;S 75
Vl
:t: :t: :I: :I: :I: :I: :I:
:I:
0,22 0,5' 2.31 0.71 0.89 1.95 1.81
c::
'" 100 0.5 0.85 1.64 1.04 0.94 1.69 1.15
::s" :I: :I: :I: :I: :I: :I: :I:
0,23 0.5 2.3 0,71 0.89 2,06 1.8
85

Error Curves of Different Algorithms for Base Line Drift


Noise Corrupted Signal
8
•..
......0 6 ", .. "'-
.•. 4
w
0
~ 2 -
0
-

0-
6 II 16 21
~!J:>.~~FD-~:-;~~-FSD::;:-DF-=-FIR~DFJiR::::e::NN-=+W1J
Fig. 4.34: Comparison of the percentage error rate of different QRS detection
algorithms for base line drift noise corrupted ECG. The marker of X-axis
corresponds clean signal while successive four points corresponds 25%
noise increments with this signal.

4.7.4 Analysis for Abrupt Base Line Shift Corrupted ECG Signal
Abrupt base line shift (motion artifacts) is a slightly greater challenge than the base
line drift due to respiration. The results for this noise type are listed in table 4.5.
Algorithms based on first and second derivative gives the worst result as the noise
level increase (for 100% noise). Abrupt shifts produce spikes in the derivative; in case
of FSD these spikes are almost like QRS complex with small width and may be
detected as QRS. In the first derivative signal the QRS complex gives both negative
and positive slope but the spikes for abrupt shifts have only positive slope. Algorithm
based on first derivative did not used this concept shows a reasonable error rate. AFD
used this concept and shows relatively small increase of error as the noise level
increase. Though algorithms based on digital filter used differentiator in their
intermediate step for signal processing they show better performance than derivative
based algorithms FD and FSD, because they used isolated peak pruning techniques.
For this step DF_FIR consider elements of QRS complex (i.e. Q wave, R wave and S
wave) are each symmetric on the time axis whereas the waveform the spikes due to
abrupt shift are not and DF_IIR consider the width of the QRS complex. DF_IIR
shows slightly better performance than DF]IR. Algorithm based on wavelet
transform gives the best performance against this noise among the algorithms. QRS
complex represents maxima-minima pair in the transformed signal whereas shift in
baseline represent only one maxima. Considering this phenomenon the isolated peaks
- are ignored during QRS detection stage. Algorithm based on neural network also
86

performs well but exhibits slightly low performance than wavelet transform. The error
curves of the algorithms against abrupt base line shift noise corrupted ECG signal are

shown in figure 4.35.


Table 4.5 Performance (% Error Rate) of Different Algorithms for Abrupt Base Line

Shift Corrupted ECG


Algorithms
"E
0
u
"-o "
.~
" ci ~
o
0
:z; AFD FD FSD DF]IR DF_I1R . NN WT
e<::z;
0.4 3.78 0.4 0.4 0.35 0.35 0.35
25
0.62 11.3 2.42 0.44 0.31 0.75 0.35
50
0
0 1.28 0.4
5.2 15.57 82.27 2.07 1.75
75
15.92 17.16 80 2.38 2.64 2.95 0.4
100
,
25 1.27 1.51 1.56 0.93 1.46 1.42 1.42

50 1.27 8.54 1.32 0.88 3.03 1.37 1,46


'"0
75 1.07 11.18 0.2 0.93 6.98 1.32 1.66

100 0.1 14.94 49.61 0.44 8.54 1.27 1.81

0.89 1.13 2.41 1.13 0.97 0.039


25 10.2
0.039 1.36 2.33 1.36 1.98 0.039
.,., 50 56.0

-
0
75 7.07

15.42
1.71

1.93
68.9
2.6

7.35
1.71

1.94
0.93

1.75
0.19

1.83
100 90.2

25 0.98 49.74 3.42 3.56 36.92 1.68 0.51

50 1.22 51.33 3.04 3.74 39.59 1.92 0.51


t-
o
75 1.17 18.53 7.3 3.88 43.71 1.4 0.05

100 0.84 32.57 3.51 3.51 46.05 1.64 0.51

25 3.12 3.36 6.52 0.24 0.32 0.32 0.32

50 3.28 9.24 2.61 12.99 0.12 0.32 0.32


""
0
75 4.19 6.48 82.9 24.45 0.39 0.95 . 0.43

100 8.89 14.02 89.57 30.17 0.83 2.53 0.51

0.36 0.15 0.36 0.36 0.36 0.36


25 0.36
0.51 6.96 0.5 I 1.95 1.95 0.36
.,., 50
- 75 0.72 13.15 1.33 6.3 6.3 0.41
0.05

0.56

100 0.72 16.39 6.14 11.37 11.37 0.41


1.54

. {;
\
87

Algorithms
"E '-o .~
"
80 ~ 0 AFD FD FSD DF FIR DF IIR NN WT
~Z o Z

25 26.57 0.44 0.)1 4.6) 0.52 0.61 0.74

50 29.9

-
4.63 1.92 4.81 1.05 0.7 0.74
00

75 )).78 11.1 1).72 5.2 4.46 0.44 0.61

100 )9.)4 11.41 86.93 14.42 6.47 1.01 0.48

25 4.82 0.62 6.7) 4.26 0.)7 1.7) 0.4)

50 5.) I 10.62 59.) 5.99 4.6) 1.79 4.14


'<t
N
75 6.61 21.74 94.19 12.79 15.19 1.05 9.64

100 7.6 1754 95.18 82.77 22.24 1.67 1).71

25 1.8) 6.9) 5.)8 ).)7 0.8 7.16 5.57

N
50 2.29 14.61 55.1 4.6) 1.97 11.24 1.64
0
N 75 2.11 14.98 97.14 65.45 6.51 ).)2 0.42

100 5.9 25.05 97.14 6).25 9.55 16.9 0.09

0.)7 2.7) 1.16 1.)) 1.56 5.92


25 4.96

50 0.2 6.42 ).79 2.12 1.56 5.02 4.6)


0-
0
1.8) 9.42 20 2.6) 1.53 4.6)
N 75 5.76

100 25.56 8.82 92.41 24.6 1.4 9.72 4.8

0.)) 2.22
25 0.07 0.76 0.29 0.87 0.25

0.7) 8.81 0.58 0.8


50 0.29 1.24 0.25

-
N
N 75 4.44 11 5.09 0.95 0.29 2.95 0.25

lOa 8.04 11.02 64.1 1.5) 0.15 4.08 0.25

25 0.34 0.29 0.)9 0.44 0.)4 1.07 1.07

0
50 0.)4 7.)7 0.6) 0.6) ).1) 1.0) 0.8)
N
N 75 0.24 11.96 0.)9 0.49 6.64 1.12 0

100 0.)9 15.14 2.1 1.07 9.lJ 0.88 0.49

25 4).) 1.61 17.05 8.72 1.51 6.)) 1.46

00
50 44.76 9.79 74.4) 24.55 1.)6 12.52 ).6
N
N 75 48.51 5.55 8.82 )3.9 4.82 0.88 4.6)

100 42.52 25.47 25.4) )5.12 18.66 21.5) 10.96


88

"t:l
~
o 0
.,
"""'o .~
Algorithms
.,;Z:
" 0 ::f
o ;z:0 AFD FD FSD DF]IR DF_IIR NN WT
e>::

25 0.57 0.45 0.95 1.02 0.45 0.83 0.57

50 0.64 9.47 1.08 1.02 4.9 0.89 2.86


M
N 75 0.64 16.21 9.73 1.02 14.56 0.83 8.14

100 1.27 20.41 19.52 1.14 21.74 0.83 10.49

25 0.87 2.25 0.91 0.91 0.29 1.02 0.84

50 0.87 6.14 26.44 0.98 0.29 1.2 0.76


"""
M
N 75 1.24 8.83 92.63 1.16 0.29 0.94 .0.87

100 5.41 8.72 97.57 15.69 0.29 1.38 1.24


5.51 4.6 2.86 3.1 2.92 1.9 1.28
25
:!: :!: :!: :!: :!: :!: :t
'"
.~
0 11.84 12.32 4.12 6.38 8.27 2.09 1.73
5.72 6.77 8.33 3.58 3.43 2.21 1.34
50
.,
0;:
Cl
:t :t :t :t :t :t :t
"t:l 12.11 12.33 12.57 6.35 8.74 2.79 1.66
~
co
"t:l

-co
'"
en
:t
75 6.27
:!:
8.03
:t
15.1
:t
5.41
:t
4.51
:!:
2.05
:t
1.55
:t
12.51 11.16 27.74 10.81 9.44 2.52 2.12
.,
co
'" 100 7.39 9.64 23.29 8.26 5.77 2.55 1.89
::E :t :t :t :t :t :t :t
12.87 11.16 34.29 15.51 10.3 3.73 2.83


89

Error Curves of Different Algorithms for Abrupt Shift Noise


Corrupted ECG Signal

" 21 26
" "
6.
., '=6
411 51
"
=UU~
. .. ..'

LUI "
- - ..' - - . . -

"
- - '. - . -

"
.-

11 16 21 26 31 35 41 46 51 66 61 66 71

6 11 16 21 26 31 36 41 46 51 56 61. 66 71

~ 60IU .....•.......k8\TT
' .; .. ; .
1
u.1 40, ..
Cl
o ..., -6 I) /\
~
..

,.: I

1 6 11 16 21 26 31 36 41 46 51 56 61 66 71

~ 40
U.120
Cl
o
I uu=u
.
A
............
.
c>
.

:
.

.
: cs'A...;\I\' ul
1 6 11 16 21 26 31 36 41 46 51 66 61 66 71

6 11
,
,
.

c1Yi\.
.
.
.

16
...

.
.

21
.
.
,

:
.
.
.
26
,
'

.:
.
31 36 41 46
.c
61 66
Rei
61 66 71

: : : : :

': I 6
&
11
£J 1\'
16 21 26 31
~
....

36
"

. -....,
.

" 46
LLL1LL1
.~

51 66 61 66 71

Fig. 4.35: Comparison of the % error rate of different QRS Detection algorithms for
Abrupt Base Line Shift Corrupted ECG Signal. Y-axis shows % error rate
and the marker of X-axis corresponds clean signal while successive four
points corresponds 25% noise increments with this signal. .
90

4.7.5 Analysis for Electromyographic Noise Corrupted ECG Signal


This type noise was greatest noise for all the algorithms. Table 4.6 gives the results
for the effects of electromyographic noise. This noise type has broadband frequency'
characteristics, which overlaps the frequency spectrum QRS complex. The amplitude
of the QRS complex is, however, considerably greater than the noise. Algorithms
based on derivatives have the worst performance of all. FD and FSD give false
positives about four times the QRS complex. Electromyographic noise has first and
second derivative characteristics that are similar to those of QRS complex. Though
threshold of AFD was calculated from the raw signal, this algorithm did not perform
satisfactory for EMG noise because differentiator amplifies this type of noise. Since
frequency spectrum of EMG noise overlaps that of QRS, algorithms based on digital
filter which use band pass filtering step, fails to attenuate EMG noise. As a result as
the noise level increase the error rates of the filter increase. Neural network and
wavelet transform based algorithms show somewhat better performance a mong a 11
algorithms. However NN exhibits slightly better performance than WT. Variation <if
performances in different noise level is due to the random behavior of the noise. The
TLFN was act as an adaptive predictor, which gives relatively small error in its output
than QRS complex because the amplitude of the QRS complex is still considerably
greater than the noise. Algorithm based on wavelet transform use wavelet based
denoising approach to remove random EMG noise. But denoising causes loss of low
amplitude QRS complex because this technique uses thresholding concept where
signal less than the threshold discarded.
91
92

...o
'"0
. 4-<
"
o .~
Algorithms
u 0

~
"Z ~
o
0
Z AFD FD FSD DF FIR DF_IIR NN WT

25 7.91 354.0 610.5 11.3 0.19 2.16 1.42

50 15.87 580.5 637.1 49.35


.". 132.49 0.86 3.34

-
N
75 15.75 6[0.6 635.7 224.9 164.18 37.31 5.68

100 5.06 624.7 642.8 359.2 159.98 100.2 . 34.47

25 15.96 389.6 430.9 18.73 0.42 5.34 8.IS

N
50 19.71 446.4 462.7 12.64 65.17 4.03 20.41
0
N 75 165.1 458.6 463.5 204.1 97.47 58.29 59.78

100 356.6 460.5 464.1 268.7 100.23 69.94 91.76

25 4.56 13.8 13.8 11.33 1.43 4.5 6.95

50 4.56 65.1 65.1 11.33 1.43 5.76 6.92


a-,
0
N 75 59.17 10.25 36.37 8.72 11.85
276.9 282.2

100 154.1 15.24 41.03 3.96 12.08


287.8 292.5

25 13.8 13.8 13.8 1.89 0.29 0.83 0.25

50 65.1 65.1 65.1 21.43 37.1 3.06 1.64

-
N
N 75 144.7 324.9 320.8
24.1 46.5 0.73 3.35

100 283.3 328.8 J33.7


11.8 56.1 1.89 4.8

25 0.34 1.27 0.63 0.49 0.34 1.12 1.12

0
50 4.39 298.7 314.6 0.63 4.35 1.12 1.76
N
N 75 13.33 424.9 423.5 1.66 102.39 0.98 11.72

100 10.45 450.7 446.3 6.93 102.39 15.09 50.59

25 47.64 388.4 473.7 85.87 6.87 12.23 0.34 ..


00
50 6.33 473.6 481.4 21.82 92.55 43.01 53.73
N
N 75 215.7 483.9 484.3 263.8 99.07 74.67 46.03

100 391.9 486.3 487.1 263.6 110.23 77.64 59.23

25 92.42 19.01 331.9 1.02 0.51 0.83 0.57

50 66.04 474.8 571.2 2.42 85.44 0.83 9.98


M
N 75 38.69 586.4 627.2 8.01 149.4 23.2 55.5

100 19.39 631.4 653.8 6.74 161.41 112.6 34.84


93

"0
~ Algorithms
o . "
""a .~
" 0 ~ 0
"Z
0:: o Z AFO FO FSO OF FIR OF IIR NN WT

25 99.42 231.4 296.8 2.58 52.42 0.76 2.58

50 97.45 304,7 332.9 1.6 45.7 0.94 40.43


""M
N 75 97.45 322.3 336.2 27.82 55.03 20.74 83.04

100 82.45 331.3 337.9 49.29 55.98 27.82 94.33

25 92.07 91.59 139.7 8.66 6.9 2.01 1.51

:t :t :t :t :t :t :t
c:

-
.8
oj
.;: 50
12.13
89.32

:t
131.6
183.8

:t
188.8
215.3

:t
7.02
22.34

:t
20.31
38.77

:t
2.55
6.85

:t
2.14
11.03

" :t

'"
"0
~
oj
"0
14.22 168.1 223.4 12.65 25.32 3.53 5.09

-c:
oj

C/l

:t
75 81.56

:t
21.13
228.3

:t
203.4
272.9

:t
219.9
25.64

:t
53.73
41.52

:t
47.46
9.3

:t
17.67
10.43

:t

c: 19.21
oj
74.5 269.6
::E" 100 304.6 38.25 51.93 17.53 16.06
:t :t :t :t :t :t :t
'27.04 208.3 218.1 74.05 49.48 26.76 19.21

....
94

Error Curves of Different Algorithms for Electromyographic


Noise Corrupted ECG Signal

400

300
o
~ 200

100

o
6 11 16 21 26 31 36 41 46 51 56 61 66 71

~l 200
, =1.
o 100

o
1
JI\
. .
..•.
~!\
=-JJM
•.•..•..
•jj. ."..••......•
~•.................•..•.
.:._~.~~~

66
IilliJ
.....'....
61 66 71
6 11 16 21 26 31 36 41 46 61

6 11 10 21 26 31 36 41 46 51 56 61 66 T1

z
z

6 11 16 21 26 31 36 41 46 51 56 61 66 71

120

60

40

o
6 11 16 21 26 31 36 41 46 51 66 61 66 71

Fig. 4.36: Comparison of the percentage error rate of different QRS detection
algorithms for Electromyographic Noise Corrupted ECG Signal. Y-axis
shows % error rate and the marker of X-axis corresponds clean signal
while successive four points corresponds 25% noise increments with this
signal.
95

4.7.6 Analysis for Composite Noise Corrupted ECG Signal


Composite noise was as great challenge as electromyographic noise. Table 4.7 gives
the results for the effects of electromyographic noise. Although individual noise types
are scaled down before they are combined to form composite noise,' the results are
generally worse than that of the individual noise except EMG noise. The
performances 0 f t he algorithms for individual noise reflect in the composite noise.
The derivative based algorithms exhibited very poor performance for abrupt shift and
EMG noise. As a consequence these algorithms shows poor performance for
composite noise also. Algorithms based on amplitude and first derivative and digital
filter show better performance than derivative based algorithms but these results also
unsatisfactory. The neural network and wavelet transform based algorithm show
reasonable results. WT perform better than NN at 25% noise level but as the noise

increase NN shows better result than WT with small increase of error rate. The error
curves of the algorithms against composite noise corrupted ECG signal are shown in
figure 4.37.
96
97

Algorithms
"0
•• 0 •....
o .~ "
o
Uz ~
o
0
Z
AFD FD FSD DF FIR DF_IIR NN WI
~

25 4.82 1.61 448.2 4.94 0.56 2.22 1.42

..•. 50 5.44 370.4 595.6 6.61 0.37 0.37 3.34


N
75 8.65 537.5 614.5 7.78 17.79 0.99 5.68

100 13.03 579.4 627.4 100.9 83.2 0.19 34.47

25 5.66 221.0 369.9 11.1 0.42 9.27 8.15

N
50 21.68 388.4 442.3 22.85 40.45 11.14 20.41
0
N 75 16.57 431.8 452.1 43.02 17.88 6.09 59.78

100 7.44 450.9 458.9 88.67 101.26 4.87 91.76

25 0.5 2.3 1.86 1.6 2.56 5.92 6.95

0'.
50 3.29 118.8 131.3 1.9 2.53 6.32 6.92
0
N 75 12.21 210.1 212.2 6.96 2.43 7.85 11.85

100 24.03 250.1 256.2 17.74 1.3 6.12 12.08

25 0.51 14.59 14.99 0.76 0.29 0.76 0.25

50 6.4 182.6 249.1 3.24 0.25 1.46 1.64


N
N 75 24.34 270.5 296.9 13.83 4.51 0.76 3.35

100 65.32 297.7 313.4 21.32 22.74 1.02 4.8

25 0.34 0.34 0.49 0.49 0.34 1.07 1.12

0
50 0.34 6.84 0.2 0.59 0.2 1.07 1.76
N
N 75 0.93 159.9 191.1 0.68 17.58 1.03 11.72

100 3.71 352.7 292.4 0.88 98.68 1.22 50.59

25 48.76 46.08 151.9 59.23 2.34 9.79 0.34

00
50 42.38 355.6 452.0 52.22 1.66 5.55 53.73
N
N 75 12.66 455.8 473.6 14.32 17.97 5.8 46.03

100 32.83 469.7 480.4 90.75 76.91 50.51 59.23

25 0.25 0.51 0.7 1.02 0.51 0.83 0.57

-
M
N
50
75
9.09

54.74
92.43

309.3
365.9

517.4
1.14

1.53
0.32

4.13
0.83

0.64
9.98

55.5

100 120.8 480.1 581.3 3.12 32.61 0.32 34.84


98

<l)

"0
•...
o .
'"
'0 Algorithms
u 0 Z
<l)Z ••... FSD DF FIR DF_IIR NN WT
~ 0 AFD FD
'$.

25 0.58 11.48 167.7 0.91 0.29 1.13 2.58

50 2.62 211.5 299.3 2.18 0.25 1.31 40.43


,...,
'<t
N 75 2.62 292.8 317.5 13.33 1.16 1.85 83.04

lOa 21.29 325.1 325.6 113 28.37 3.6 94.33

7.32 17.98 53.27 5.63 . 4.66 2.08 1.53


25
:l: :l: :l: :l: :l: :l: :l:
c 13.93 45.77 123.9 12.12 16.5 2.6 2.07
0
'ia
.;; 50 10.57 70.98 136.1 8.26 7.88 2.37 3.23
<l) :l: :l: :l: :l: :l: :l: :l:
0
18.62 110.6 176.7 15.57 21.2 3.1 6.37
"Eoj
"0

-c
oj

VJ
:l:
75 14.23

:l:
24.66
132.3

:l:
152.1
195

:l:
192.1
10.98

:l:
19.62
13.11

:l:
26.52
2.58

:l:
3.23
4.27

:l:
7.34
c
oj
<l)
100 18.78 182.2 237.1 16.47 21.35 4.28 5.74
:::2
:l: :l: :l: :l: :l: :l: :l:
31.36 173.3 196.7 27.27 32.6 7.78 9.6
99

Error Curves of Different Algorithms for Composite Noise


Corrupted ECG Signal

o
LL
«
:Im
100 - ...

50.
........ __ . -,-

0; /)
o
1 6 11 16 21 26 31 36 41 46 51 66 61 66

6 11 16 21 26 31 36 41 ~ 51 66 61 M 71

6 11 16 21 26 31 36 41 46 51 56 61 66 71

z
z"

o.
26 31 36 41 46 51 66 61 66 71

Fig. 4.37: Comparison of the percentage error rate of different QRS detection
algorithms for Composite Noise Corrupted ECG Signal. Y-axis shows %
error rate and the marker of X-axis corresponds clean signal while
successive four points corresponds 25% noise increments with this signal.
100

From the aforementioned nOise sensitivity analysis of different QRS detection


algorithm, it is clear that algorithms based on derivative are not suitable for noisy
signal. Even algorithm based on amplitude and first derivative and digital filter show
unsatisfactory results as the noise level increase. Algorithms based on neural network
and wavelet transform give reasonable results and in most cases show similar
performance, which demands fOr separate comparison between these two algorithms.
Table 4.8 shows the mean value with standard deviation of percentage of error for all
the datasets (noisy and noiseless) that were tested in this study for NN and WT. Up to
100% of all noise, total 235 datasets (5,37,070 beats) are used to evaluate the
performance. Considering all these datasets Wavelet Transform based algorithm gives
mean percentage error rate 7.76% with standard deviation 16.75 while Neural
Network based algorithm gives mean percentage error rate 7.84% with standard
deviation 17.15. Figure 4.38 shows the performance ofNN and WT. Table shows up
. to 75% and 50% noise level NN exhibits better performance than WT. To facilitate
the comparison, the datasets were sorted such that the NN's error rate appears in non-
descending order, along with the associated error rate of WT. Error rate greater than
40% were not displayed.

Table 4.8 Comparison of Performance (% Error Rate) of Neural Network and


Wavelet Based Algoritillil.

% of Noise Algorithms
Level (Up to) Neural Network Based Wavelet transform Based
o 1.77:1:1.88 1.29:1:1.74
25 2.05:t 2.55 1.45:t 2.02
50 2.75:!:4.80 3.35:!: 7.79
75 4.83:t 11.03 5.33:t 12.14
100 7.84:t 17.16 7.76:t 16.75
101

Error Curve for NN and WT


40

35 ----- ° 0 0 ---# .._---


_._._---
30 ------ -- - ------- 0
10
~ --------------------- --------------- ---- ---- --- ----------- •
~ 25
~ • 0

-
w 20
0
~ 15
-
--- -----.
°
--- ---0- -------
Q __ 0----«l) .
,
,, __ :=~=
10
___ __-00--- ° __
0_--0-- -0-----
0 Q) ~
----0---------0-----0

5 -----00-0-
___
0
--CfT~---O--
"",,0_ ,....n-.- ..J:'O£)Or.
-----or---=-_..
Mo
0

0 ;;"1 ••,,.

~ 0> •.... •.... •....


0> •....
'"
N
M
..,.~ ••• •.... '"
0>
<0
M
•.... ~
co
0>
co
•....
0> ~ N N M '"
M
'" ~
0
M ~ 0> •....
..,.
<0
'" ~ ~ ~ '"~ ~ N
<0
M ~
co 0> 0
0>
0 ~ '"
N
M
M
M
'" ~ ~ ~ ~ ~ ~ N N N N

° wrl
, •
I
NN
I

Fig. 4.38: Comparison of the percentage error rate of Neural Network and Wavelet Transform based QRS Detection Algorithms
for all the datasets tested in this experiment. The tested datasets are sorted in order of ascending error rate for the Neural
Network based algorithm. Error rates greater than 40% are not shown.

c
Chapter 5

CONCLUSION

5.1 Discussions
Ambulatory ECG recording IS exposed to many technical and physiological
disturbances, which are not easily prevented or controlled, and consequently the
accuracy of automatic ECG detection can be affected, the detector can miss normal
QRS complexes or detect QRS complex, which are not actual. The purpose of this
study was to assess the accuracy of different QRS detection algorithms with different'
types of noise simulated ECG signal with different morphology. The noise
sensitivities for seven different QRS detection algorithms were measured for ECG
signal corrupted with five different types of synthesized noise. The noise types were
. electromyographic noise, power line interference, baseline drift due to' respiration,
abrupt base line shift, and a composite noise constructed from all of the other noise
types. Among individual noise EMG and abrupt base line shift noises are the most
difficult to suppressed because their frequency spectrum overlaps the spectrum of the
desired ECG signal.

No one algorithm exhibited superior performance in all situations. Algorithms based


on amplitude and derivatives perform well for noiseless and low frequency base line
drifted ECG signal but shows decreasing performance as the power line noise
increase. Differentiation worsens the effects of higher frequency noise because the
amplitude of the derivative of a signal is proportional to the frequency. Therefore the
effects of high frequency noise are increased and this can obscure the important
features. Transient shifts produce spikes in the derivative, which are detected as
candidate QRS complexes. Algorithm based on amplitude and derivative shows
overall better performance than derivate based, because it select threshold from raw
signal and use the positive and negative slope of QRS complex to prune isolated
peaks for abrupt shifted signal, where algorithm based on first and second derivative
exhibits worst performance. The result suggested that despite its simplicity,
differentiation should be avoided with noisy data.
103

Although digital filters use derivative in their intermediate step, they perform better
than derivative based algorithms because ultimately they form band p ass filter for
QRS complex. For band pass filtering fixed 50 Hz power signal and low frequency
base line drift noise are effectively removed. As a result both digital filter (FIR and
IIR) perfonn well for noiselcss, power line noisy and baseline drifted ECG signal,
while DF_IIR shows slightly better performance than DF_FIR. Although both
algorithms use pruning techniques of isolated peaks due to abrupt base line shift, their
performance decrease as the noise level increase with small rate. Since the Frequency
spectrum of EMG noise overlaps the spectrum of ECG signal, the band pass filter
cannot filter this type of noise effectively. The percentage error rate for both digital
filters increase significantly as noise level increase and give unsatisfactory results.

Performance comparison of the algorithms based on neural network and wavelet


transform outperforms the 0 thers clearly f or a brupt base line shift and E MG noise
simulated ECG signal. Algorithm based on neural network use a post-processing step
to minimize the effect of abrupt shift. Abrupt shift causes single peak that ignored
because QRS complex gives modulus maxima pair. Both algorithms show very
similar performance for abrupt shift noise corrupted signal with small increment of
percentage error rate as noise level increase. The TLFN with sigmoid activation
functions in the hidden layer and a linear output use as a non-linear prediction filter
and trained to remove background random noise. The joint time-frequency analysis
effect of the WT provides natural settings for statistical application like recover
signals from noisy data, use for denoising of noisy signal in this study. Although noise
removing capability the performance of neural network and wavelet decreases as the
EMG noise level increase which indicate that EMG noise is the greatest challenge for
the QRS detection algorithms. Up to 75% EMG level neural network base algorithm
perform better than wavelet transform because as the noise level increase number of
false positive increase for NN but number of false negative increase for WT. In case
of WT, QRS complex may clip after thresholding. Though individual noises are
scaled down to form composite noise, it also a great challenge for QRS detection
algorithms.
104

Neural network based algorithm show slightly better performance than WT.
Considering all the noiseless and up to 100% of all noisy data sets (235 data sets,
5,37,070 beats) it was observed that Wavelet Transform based algorithm gives mean
percentage error rate 7.76% while Neural Network based algorithm gives mean
percentage error rate 7.84%. But Up to 75% noise level NN perform better than WT.

Algorithms based on neural network and wavelet transform shows relatively robust
noise performance. Despite its simplicity, differentiation should be avoided with noisy
data. Digital filters are not suitable for noise whose' frequency band overlaps the
spectrum 0f Q RS complex. Despite its computational burden t he use 0 f a Neural
Network for QRS detection (Nonlinear Prediction) is an interesting academic
exerCIse. Wavelet transforms are fairly novel approaches for processing of non-
stationary signals. As a single detection criterion always has its particular weaknesses,
a combination of algorithms might perform better extracting the strength from each
algorithm.

The use of the composite data in the tuning procedure requires a compromise in the
selection of constants for all of the algorithms. The best choice of parameters for the
composite noise may not yields the best results for other types of noise. The result for
a given noise type can often be improved if the algorithm parameters a re selected
specifically for that noise type. The use of adaptive' thresholding and adaptive peaks
pruning improvc the performance.

5.2 Future Perspective

In this study ability of different algorithms to detect QRS complex whether it is


normal or abnormal.against different noise simulated ECG signal were tested. The
. result will help in the development of a more robust ECG detector by IJ:lakingsignal
processing more effective. This work can be extend to analyze the effect of noise on
different abnormal beats and for noise sensitivity analysis of different
electrocardiogrphic pattern classifiers to distinguish between normal and abnormal
beat patterns as well a s classify different abnormal beat morphologies under noisy
environment.
APPENDIX

FLOW CHART FOR FIRST DERIVATIVE BASED ALGORITHM.

( START )

Read the signal


x(n)

Compute derivative y(n)

Select Threshold
Slope threshold ~ O.25max[y(n)]

~/
~/"~ :---...
N Next I
<____
If!(i):>
~ slope threshold./' / j=i+1
~----
Iv_ /~

Search adjacent
maximum
and count as QRS

Nexti
y
i=i+1

N
STOP
106

FLOW CHART FOR AMPLITUDE AND FIRST DERIVATIVE BASED ALGORITHM

START

Read the Signal x(n)

Select Threshold = 0.3max [x(n)]

Compute First Derivative y(n)

N
Nen~
~ y(i), y(H'l), y(I+2) > 0.1
I=i~

y N

----1- J=i+1 If j> .•j+25

N
Nextj
~l}<-o.l j=j+l

Next I

------------ ----
~X(i+l), ,.,XO+l) >= Threshold ~
i=i+1
--------.
-------
.__
._--_._----.------_._--
. _..=-=r:=
__._-~+----
y
Search adjacent (25 sample) maximum
and count a. QRS oomplex

y
..•.•..
N
\
107

FLOW CHART FOR FIRST AND SECOND DERIVATIVE BASED ALGORITHM

START

Read the Signal x(n)

Compute rectified first derivative yo(n)

,.---~l ,
Smooth rectified first derivative Yin)

Compute rectified second derivative


Y2(n)
--~------

-
---~~~~---~~---~_._~~~---~----~--
Add smoothed first derivative to rectified
second derivative
n

Select threshold
Primary threshold ~ O.4max[Y,(n)]
Secondary threshold = 0.05max(Y3(n)]

N Next i
i=i+1

Search adjacent maximum


and count as QRS
108

FLOW CHART FOR DIGITAL FILTER (FIR) BASED ALGORITHM

START

Read the Signal x(n)

Moving average filter Yin)

1
Low pass filter Yl(n)

Squared 110 difference of low pass filter Y2(n)

Filter squared difference Y2(n)

, .

Select threshold
Threshold ~ 0.1 25max[Y4(n)]

~>
--------th~~--- N JI Next sample
y
I Search adjacent maximum
and count as QRS .

I Next sample J.> ...<~


y ~ore data
C ,-
I

C~)
109

FLOW CHART FOR DIGITAL FILTER (IIR) BASED ALGORITHM

START

Read the Signal x(n)

_=1
Low. pass filter

High pass filter

--*-- ] differentiator

Squaring operation

Moving average

Select threshold

N Next
~th"'h~ sample

[Y
Search adjacent maXimu:J
[ and count as QRS
~-~~

Next /~~~
sample
Y N
CSTOP~
110

FLOW CHART FOR NEURAL NETWORK BASED ALGORITHM

C START)
i
Read the Signal x(n)

Create a network Object


and initialize it

To compare results compute


. the output of the network
with training data and
. validation data

Moving average

Match filtering

[--- Select threshold ~

--------- -----~

N
Next
~ y(n) > threshold
sample

JY
Search valley point between
maxima pair and count as QRS

1__ I.
s~~~le.
y
~
~More data?

N
C-~!O~_~
ill

FLOW CHART FOR WAVELET TRNASFORM BASED ALGORITHM

START

Read the Signal x(n)

Compute DWT up to level 5


using coif2

Denoise DWT signal using soft


thresholding (FIXTHRES) technique

Compute DWT up to level 2


using bior6.8

Select threshold for both level

Locate the number of local maxima pair


for both level and store as QRS1 and QRS2

N
~RS1>=QRS2 Exact QRS = QRS2
------
y
ExactQRS = QRS1

CSTOP~
.,
REFERENCES

[I] 1. K. Daskalov, 1. A. Dotsinsky, and 1. 1. Christov, "Developments in ECG


acquisition, preprocessing, parameter measurement and recording," IEEE Eng.
Med. BioI. Mag., vol. 38, pp. 50-58, 1998.
[2] J. G. Webster (Ed.), Medical Instrumentation, Application and Design, John
Wiley & Sons, 200 I.
[3] L. Cromwell, Biomedical Instrumentation and Measurements, Prentice-Hall
Inc., 1980.
[4] J. J. Carr, Introduction to Biomedical Equipment Technology, Pearson
Education Inc., 200 I.
[5] B. Klhler, C. Hennig, and R. Orglmeister, "The principles of software QRS
detection: reviewing and comparing algorithms for detecting this important
ECG waveform," IEEE Eng. Med. BioI. Mag., vol. 42, pp. 42-57, 2002,
[6] P. M. Mahoudeaux, C. Moreau, D: Moreau, and J. J. Quaratne, "Simple
microprocessor based system for on-line ECG analysis," Med. Bio. Eng.
Comput., vol. 19, pp. 497-500,1981.
[7] 1. Fraden and M. R. Neumann, "QRS wave detection," Med. Bioi. Eng.
Comput., vol. 18, pp.l25-132, 1980.
[8] W. P. Holsinger, K. M. Kempner, and M. H. Miller, " A Q RS preprocessor
based on digital differentiation," IEEE Trans. Biomed. Eng., vol. 18, pp. 121-
217, 1971.
[9] A. Menrad, " Dual microprocessor system for cardiovascular data acquisition, '
processing and recording," in Proc. IEEE Int, Conf Industrial Electrical
Control Instrument, pp. 64-69. 1981.
[10] M. L. Ahlstrom and W, J. Tompkins, "Automated high-speed analysis for
holter tapes with microcomputers," IEEE Trans. Biomed. Eng., vol. 30, pp.
651-657,1983.
[II] M. A. Haque, M. E. Rahman, C. A. Al Sayeed, and B. M. Z. Uddin, "Afasl.
.algorithm in detecting ECG characteristics points," in the Proc, Second
International Conference on Electrical and Computer Engg, (ICECE 2002).
Dhaka, Bangladesh, pp 160-163, Dec, 2002,
113

[12] R. A. Balda, J. H. Yen Bemne1, and J. L. Willems, "The HP ECG analysis


program," Trellds ill Computer Processed Electrocardiogram. Amsterdam:
North Holland, pp. '197-205,1977.
[13] M. Okada, "A digital filter for the QRS complex detection," IEEE Trails.
Biomed. EIlg., vol. 26, pp. 700-703,1979.
[14] W. A. H. Engelse and C. Zeclenberg, "A single scan algorithm for QRS-
detection and feature extraction," IEEE. Compflt. Card., Long Beach: IEEE
. Computer Society, pp.37-42, 1979.
[15] J. Pan and W. J. Tompkins, "A real-time QRS detection algorithm," IEEE
Trails. Biomed. Ellg. vol. 32, pp. 230-236, 1985.
[16] P. S. Hamilton and W. J. Tompkins, '~Adaptive matched filtering for QRS
detection" in Proc. Allllu. Illti. COil! IEEE Ellgineerillg in Medicille alld
Biology Society. New Orleans, LA, pp.147-148, 1988.
[17] V. X. Afonso, W. J. Tompkins, T. Q. Nguyen, S. Luo, "ECG beat detection
using filter banks," IEEE Trans Biomed. Eng. vol. 42, pp 192-201, 1999.
[18] y, H, Hu, W. J. Tompkins, J. L. Urrusti, and V. X. Afonso, "Applications of
artificial neural networks for ECG signal detection and classification," J.
Electrocardiology, vol.26 (Suppl.), pp.66-73, 1993.
[19] Q. Xue, Y. H. Hu, and W. J. Tompkins, "Neural-network-based adaptive
matched tiltering for QRS detection," IEEE Trails. Biomed. Eng.. vol. 39, pp.
317-329,1992.
[20] Y. Suzuki, "Self-organizing QRS-wave recognition in ECG usmg neural
networks," IEEE Trails. Neural Networks, vol. 6, pp. 1469-1477, 1995.
[21] L. Gang, F. Jing, L. Ling, Y. Qillian, and Y. Xuemin, "An artificial-
intelligence approach to ECG analysis: A new algorithm based on linear
approximation distance thresholding compression with a backpropagation
neural network," IEEE Ellg. Med. BioI. Mag., pp. 95-100, 2000.
[22] M. G. Strintzis, G. Slalidis, X. Magnisalis, and N. Maglaveras, "Use of neural
networks for electrocardiogram (ECG) feature extraction, recognition and
classification," Neural Network World, vol. 3, pp. 313-327,1992.
[23] S. Osowski and T. H. Linh, " EeG beat recognition using Fuzzy hybrid Neural
Network," IEEE Trails. Biomed. Eng.. vol. 48, pp. 1265-1271, 2001.
114

[24] S. Kadambe, R. Murray, and G. F. Boudreaux-Bartels, " Wavelet transform-


based QRS complex detector," IEEE Trans. Siomed. Eng., vol. 46, pp. 838-
848, 1999,
[25] C. Li, C. Zheng and C. Tai, "Dctection of E CG characteristic points using'
wavelet transforms," IEEE Trans. lJiomed. Eng., vol. 42, pp. 21-28, 1995.
[26] J. S. Sahambi, S. N. Tandon, and R. K. P. Bhatt, "Using wavelet transforms
for ECG characteriiation: An on-line digital signal processing system, " IEEE
Eng. Med. BioI. Mag., vol. 16. pp. 77-83,1997.
[27] J. P. Martinez, R. Almeida, S. Olmos, A. P. Rocha, and P. Laguna "A wavelet
. based ECG delineator: evaluation on standard databases," IEEE Trans..
Biomed. Eng.. vol. 51, pp. 570-581, 2004.
[28] Z. Nenadic and 1. W. Burdick, " Spike detection USIng the contineous
wavelaet transform," IEEETrans. Biomed. Eng., vol. 52, pp. 74-87,2005.
[29] M. A. Haque and M. A. Khayer, " ECG peak detection usi.ng wavelet
transform," in the Proc. Third International Conference on Electrical and
Computer Engg, ICECE 2004, Dhaka, Bangladesh, pp. 518-521.
[30] K. P. Lin and W. H. Chang, "QRS feature extraction using linear prediction,"
IEEE Trans. Biomed. Eng., vol. 36, pp. 1050-1055, 1989.
[31] D. A. Coast, R .M. Stem, G. G. Cano, and S. A. Briller, "An approach to
cardiac arrhythmia analysis using hidden Markov models," IEEE Trans.
Biomed. Eng. vol. 37, pp. 826-836, 1990.
[32] R. Poli, S. Cagnoni, and G. Valli, "Genetic design of optimum linear and
nonlinear QRS detectors," IEEE Trans. Biomed. Eng., vol. 42, pp. 1137-1141,
1995.
[33] Y. H. Hu, S.Palreddy, and W. J. Tompkins, " A patient adaptable ECG beat
classifier using a Mixture of Experts approach," IEEE Trans. Biomed. Eng.,
vol. 44, pp. 891-900, 1997.
[34] G. M. Friesen, T. C. Jannett, M, A. JadaIlah, S. 1. Yates, S. R. Quint, and H,
T. Nagle, "A Comparison of the Noise Sensitivity of Nine QRS Detection
Algorithms," IEEE Transactions on Biomedical Engineering, vol. 37, pp. 85-
98,1990.
115

.[35] D. Kilpatrick and P. R. Johnston, "Origin of the Electrocardiogram," IEEE


Ellg. Med. Bio!. Mag.. pp. 479-486, 1994.
[36] D. B. Gcsel1owitz, " On thc thcory of Elcctrocardiogram," Proceedillgs of/he
IEEE. vol. 77, pp. 857,876,1989.
[37] P. S. Hamilton and W. J. Tompkins, "Quantitativc investigation of QRS
detection rules using the MIT/BIB arrhythmia database," IEEE Trans.
Biomed. Eng., vol. 33, pp. 1157-1165, 1986.
[38] P. O. Borjesson, O. Pahim, L. Sommo, and M. E. Nygards, "Adaptive QRS
detection based on maximum a posteriori estimation,". IEEE Trails. Biomed.
Ellg. vol 29, pp. 341-351,1982.
[39] S. Suppappola and Y. Sun, "Nonlinear transforms of ECG signals for digital
QRS detection: A quantitative analysis," IEEE Trans. Biomed. Engg., vol. 41,
pp.397-400,1994.
[40] S. G. Mallat and W. L. Hwang, "Singularity detection and processing with
wavelets," IEEE Transactions on Information Theory, vol. 38, pp. 617-643,
1992.
[41] S. Dandapat and G. C. Roy, "Spike detection in biomedical signals using
midprediction filter," IEEE Med. Bioi. Eng. Comput., vol. 35, pp. 354~360,
1997.
[42] A. Ruha, S. Sallinen, and S. Nissila, "A real-time mIcroprocessor QRS
detector system with a I-ms timing accuracy for the measurement of
ambulatory HRV, "IEEE Trans. Biomed. Eng., vol. 44, pp, 159-167, 1997.
[43] S. K. Zhou, J. T. Wang and J. R. Xu, "The real-time detection of QRS-
complex using the envelop of E CG," in P roc. 10th A nnul. Int. C Oil/. IEEE
Ellgineering ill Medicine alld Biology Society, NeW Orleans, LA, pp, 38, 1988.
[44] M.-E. Nygards and L. Sornino, " Delineation of the QRS complex using the
envelope of the ECG," Med. Bioi. Eng. Compu/. vol. 21,1983.
[45] F. Gritzali, G. Frangakis and G. Papakonstantinou, "A comparison of the
length and energy transformations for the QRS detection," in Proc. 9/hAllllul.
Con! IEEE Engineering in Medicine and Biology Society. Boston, MA, pp,
549-550, 1987.
116

[46] Cambridge: Massachusetts Institute of Technology, MIT-BIH ECG dalabase.


,
Available: ecg.mit.edu/ and physionet.org/physiobank/database/mitdb/
[47] R. Mark and G. Moody, "The impact of the MIT-BIH arrhythmia database:
history, lessons I earned, and its influence 0n current a nd future databases,"
IEEE Eng. Med. BioI. Mag., vol. 41, pp. 45-50, 2001.
[48] The MathWorks, Inc., mathworks.com
[49] W. 1. Tompkins (Ed.), Biomedical digital signal processing: C-language
examples and laboratory experiments for IBM PC, Prentice-hall,Inc.,1995.
[50] S. Haykin, Neural Networks, a comprehensive foundation, Prentice Hall,

1999.
[51] I. Daubechies, Ten lectures on wavelets, SIAM, 1992.
[52] S. G. Mallat, "A Theory for Multiresolution Signal Decomposition: The
Wavelet Representation," IEEE Transaction on PatternAnalysis and Machine,
Intelligence. vol. 11, pp. 674-692, 1989.
[53] M. Akay, Detection and Estimation Methods for Biomedical Signals,
Academic Press.
[54] D. L. Donoho, "De-Noising by soft-thresholding," IEEE Trans. 011 Inf.
Theory, vol. 41, pp. 613-627,1995.
[55] M. Misiti, Y. Misiti, G. Oppenheim, and J. M. Poggi, Wavelet Toolboxfor use
with MATLAB. Wavelet Toolbox User's Guide. The MathWorks, Inc., Natick,
1996.
[56] AAMI, Association for the advancement of medical instrumentation,
"Recommended practice for testing alld reporting performance results of
velltricular arrhythmia detection algorithms,"1998.

You might also like