You are on page 1of 54

Detection of ECG – R Peaks and

Heart Rate Variability

Abstract

The objective is to implement the Pan-Tompkins algorithm for detection of R-peaks in


ECG recordings in MIT-BIH database and computation of the parameters of heart rate
variability. The study includes implementation of the algorithm on the ECG recordings for
detection of ECG R peaks in 333 cardiac cycles recorded in from 12 patients. The results of
ECG R peak detection were evaluated using positive productivity, false positivity, false
negativity, % sensitivity, and & detection error. The values of positive productivity, false
positivity, false negativity was 99.81, 109, and 0 respectively. The % sensitivity and %
detection error were 100, and 0.176. The variations of RR intervals and hence in hear rate is
the heart rate variability. Using automatically detected the ECG R peaks, the time domain
parameters SDNN, SDNN Index, SDANN and the RMSSD were calculated as a measure of
heart rete variability. The average values of SDNN, and the RMSSD, pNN50 were 98.76,
140.28,35.44 respectively.

Keywords-component; HRV, ECG, Pan-Tompkins’s algorithm, QRS, band-pass filter.


Contents
Chapter No Title Page No.

Abstract
List of Figures
List of Tables
List of Abbreviations

1. Introduction 1
1.1 The Cardiovascular System 1
1.2 The Anatomy of the Human Heart 1
1.3 Human Heart 2
2. ECG Signal 5
2.1 ECG Signal 5
2.2 ECG Signal Characteristic 7
3. Literature Review 12
3.1 Literature review 12
4. Methodology 15
4.1 Objective 15
4.2 The QRS detection based on Pan Tompkins Algorithm 16
4.3 Heart Rate Variability Analysis (HRV) 20
4.4 Approach of Heart Rate Variability Analysis (HRV) 21
4.5 Linear Analysis 21
4.6 Non-Linear Analysis 27
5. Result 31
6. Conclusion 38
7. References 39
Acknowledgement
List of Figures

Figure No. Title Page No.

1.1 The Heart conduction system 3


1.2 Sympathetic and Parasympathetic Nervous System 4
2.1 Basic Electrophysiology of the Heart 6
2.2 A typical ECG waveform with significant waves and features 6
2.3 Line of site of the bipolar - Einthoven’s triangle 9
2.4 Relative power spectra of the ECG components as well as noise artefacts 10
4.1 Pan Tompkins QRS detection Algorithm block diagram 16
4.2 Relationship of QRS complex to moving integration waveform 19
4.3 HRV evaluation process block diagram 21
4.4 A typical Poincaré Plot of RR intervals 28
4.6 The Poincaré plot of ECG recording 29
5.1 Pan Tompkins algorithm steps – MAT file 101 33
5.2 R Peak detection using Pan Tompkins – MAT file 101 33
5.3 Non-Linear Heart Rate Variability – Poincare plot – MAT file 101 34
5.4 Pan Tompkins algorithm steps – MAT file 106 34
5.5 R peak detection using Pan Tompkins – MAT file 106 35
5.6 Non-Linear Heart Rate Variability – Poincare plot – MAT file 106 35
5.7 Pan Tompkins algorithm steps – MAT file 119 36
5.8 R peak detection using Pan Tompkins – MAT file 119 36
5.9 Non-Linear Heart Rate Variability – Poincare plot – MAT file 119 37
List of Table

Table No. Title Page No.

2.1 Details of Amplitude and duration of waves, intervals, and segments 8


4.5 Frequency Domain Parameters Table 26
5.1 Result of evaluating the Pan Tompkins using MIT-BIH database 32
5.2 Heart rate variability parameters 32
List of Abbreviations

ANS Autonomic Nervous System


HRV Heart Rate Variability
HR Heart Rate
SA Sinoatrial node
ECG Electrocardiogram
WTMM Wavelet Transform Modulus Maxima
TP Total Power
LF Low Frequency
VLF Very Low Frequency
HF High Frequency
DFA Detrended Fluctuation Analysis
CWT Continuous Wavelet Transform
Cycles/s Cycles per second
ms Milliseconds
Hz Hertz
Chapter 1

Introduction

Heart rate variability is the results from the rhythmic activity of the heart. To understand HRV
and its interpretations, knowledge of the cardiovascular system and the autonomic nervous
system is fundamental

1.1 The Cardiovascular System

The cardiovascular system is made up of the heart and its associated vasculature, they
form a network carrying blood to every cell of the body and the flow of blood is controlled by
the heart and its pumping action. The cardiovascular system is controlled by the autonomic
nervous system and regulated by the need of the body [17].

1.2 The Anatomy of the Human Heart

The main organ of the cardiovascular system is the heart and is responsible for the
circulation of the blood according to the need of the body. It is in the thoracic cavity
approximately midline between the sternum (breastbone) anteriorly and the vertebrae
posteriorly. The heart has a broad base at the top and tapers to a pointed tip known as the apex
at the bottom. It is placed at an angle under the sternum so such that the base lies to the right
and the apex to the left of the sternum. The size of the heart is no larger than one's own fist. It

1
is a hollow organ composed of cardiac muscular tissue. The beating action maintains the flow
of blood through the entire body and from the heart numerous blood vessels branch out and

2
spread to every corner of the body and they form vasculature of the cardiovascular system.
There are three main types of blood vessels, namely, arteries which carries oxygenated blood
from the heart to the various systems of the body, the veins which carry deoxygenated blood
from the various parts of the body back to the heart, and capillaries which join the arteries and
veins and are the site for gaseous and chemical exchange between the various cells and the
blood [17].

1.3 Human Heart

Heart is a hollow muscular chamber which acts as a pump, continuously beating and
maintaining the homeostasis of the body. This hollow pump functions as a dual pump. The
right and left sides of the heart function as two separate pumps and the heart is divided into
right and left halves and has four chambers, an upper and a lower chamber within each half.
The upper chambers called the atria receive the blood returning to the heart and transfer it to
the lower chambers, the ventricles, which pump blood from the heart. The vessels that return
blood from the tissues to the atria are veins and those that carry blood away from the
ventricles to the tissues are the arteries. The two halves of the heart are separated by the
septum, a continuous partition that prevents the mixture of blood from the two sides of the
heart. This separation is important because the right half of the heart is receiving and pumping
oxygen poor blood while the left side of the heart receives and pumps oxygen rich blood [16].
The blood travels continuously through the circulatory system to and from the heart
through two separate vascular (blood vessel) loops, both originating and terminating at the
heart. The pulmonary circulation consists of a closed loop of vessels carrying blood between
the heart and lungs, whereas the systemic circulation consists of a closed loop of vessels

3
Figure 1.3 The Heart conduction system, adapted from [17]
carry
ing blood between heart and other organ systems. Blood returning from the systemic
circulation consists of a closed loop of vessels carrying blood between heart and other organ
systems. Blood returning from the systemic circulation enters the right atrium via large veins
known as vena Java. The deoxygenated blood from the body tissues enters the right atrium. In
the lungs, the blood loses the extra carbon dioxide and picks up the oxygenated blood and
returns to the left atrium. The blood from the left atrium flows into the left ventricle and
eventually into the aorta that supplies the oxygenated blood to all parts of the body. This is
called the systemic circulation. Figure 1.3 showing the systemic and pulmonary circulation
[17].

4
1. Sympathetic Regulation of Heart Rate

The sympathetic nervous system innervates the AV node, the SA node and the atria and
the ventricles of the heart and its regulation of heart rate is bought about by the combination
of neural and hormonal pathways. Sympathetic efferent impulses travel from the brain via
pre-ganglionic and postganglionic neurons to their target organs. At their terminus these
postganglionic fibres release norepinephrine or at the adrenal gland epinephrine. This
catecholamine exerts both a chronotropic (increased heart rate) and inotropic effect (increased
contractility) on the heart [16].

2. Parasympathetic Regulation of Heart Rate

Parasympathetic nerve impulses reach the heart via the right and left vagus nerves,
innervating the SA and AV nodes but only the atrial myocardium. Vagal efferent impulses
trigger the release of a neurotransmitter, acetylcholine (ACh) at their synapses. ACh combines
with myocardial muscarinic receptors which are the membrane-bound proteins that contains a
recognition site for acetylcholine (ACh) and the combination of Ach with the receptor
initiates a physiologic change of slowing the heart rate, which results in increased efflux of
K+ ions and a reduced influx of Ca++ ions, the net result of which is to hyperpolarize the cell
which slow
down the rate of depolarization and Heart rate [16].

5
Figure 1.4 Sympathetic and Parasympathetic Nervous System, adapted from [16]

6
Chapter 2

ECG Signal

2.1 ECG Signal

The heart generates an electric signal which can be used as a diagnostic tool for
examining some of the functions of the heart. Its smooth, rhythmic contraction has an
underlying electrical precursor in the form of a well-coordinated series of electrical events
that takes place within the heart. These events are coordinated by a specialized conduction
system within the heart. Cardiac impulses originate in the pace making cells of the heart
called the sinoatrial (SA) node which is located at the junction of the superior vena cava and
the right atrium. From the SA nodes three specialized branches or pathways emerge and
terminate at the atrioventricular (AV) nodes. These nodes are named the anterior, middle, and
posterior internodal tracts. Another tract also emerges from the SA node and leads into the left
atrium. This tract is called the Bachman's bundle and forms an intraarterial passage [16].
An impulse pass from the SA node through the specialized tracts in the atria to activate
first the right atrium and then the left. Passage of the impulse is delayed once it has reached
the AV node and continues into the various tracts emerging out of the AV node. The right
bundle branch lies along the right side of the interventricular septum to the apex of the right
ventricle before it gives off significant branches. The left common bundle block crosses to the
left side of the septum and splits into the anterior division and the posterior division. Each
branch of this conduction system of the heart contributes its own signal to the overall ECG
signal that is normally seen [16].

7
An

Figure 2.1 Basic Electrophysiology of the Heart, adapted from [17]

electrocardiogram (ECG) is a record of an electrical activity of cardiac muscles.


A typical ECG waveform with significant waves and features are shown in Figure 2.2.

Figure 2.2 A typical ECG waveform with waves and features, adapted from [16]

8
2.2 ECG Signal Characteristic

There are significant waves and features of ECG as, P-wave: It is associated with the
depolarization of atria; A small downward deflection associated with the depolarization of the
inter-ventricular septum is called as Q-Wave. An upward deflection followed by an S-wave is
R-wave. Large amplitudes of R and S wave indicate left ventricular hypertrophy: R wave is
followed by a downward deflection, represented by S. QRS complex joins the ST segment at
a point which is termed as J point. It is the first point of inflection of the stroke to S wave
[17].
The repolarization of ventricles and the end of the systole, followed by the QRS
complex, is represented by T-wave. The repolarization of the Purkinje fibres is represented by
U wave [1]. The R peak has larger amplitude, and it represents the electrical stimulus as it
passes through the main portion of ventricular walls. Heart rate in beats per minute can be
calculated using number of R peaks in a minute. The R-R interval starts at the peak of one R
wave and ends at next peak of R wave. For a normal heart a typical duration of the QRS
complex is 80ms to 120ms [1].
60
Heart rate ( beats / min)= (1)
R−R(second)

The ECG is characterized by a recurring wave sequence of P, QRS, T and U. The features and
description are as below [17].

1. P-wave - It represents the depolarization of atria and represents atrial contraction. It


precedes the QRS complex.

2. Q-Wave- Q wave represents the depolarization of the


interventricular septum and It is

represented by a small downward deflection. The P-wave is instantly followed by a Q-


wave. Abnormality in Q-wave indicates that here is presence of infraction.

9
3. R-wave - The Q is followed by R-wave. This wave follows as an
upward deflection. The

R-wave is then followed by an S-wave and large amplitudes of R and S wave indicates
left ventricular hypertrophy.

4. S -wave - R wave is followed by a deflection downwards,


represented by S. The point

where the QRS complex meets the ST segment is called as J-point. The J-point is also
defined as the first point of inflection of the upstroke of the S-wave.

5. T- wave - It represents the repolarization of ventricles and the end


of the systole. It follows

the QRS complex.

6. U- wave - U waves represent re-polarization of the Purkinje fibers


that indicates the last

remnants of the ventricular repolarization.

The R peak is the most important point in the signal due to its
larger amplitude. It represents the electrical stimulus as it passes
through the main section of the ventricular walls. The detection of the
R-peak contributes to determine the fundamental called as the inter-
beat interval (IBI) or the beat-to-beat interval. The count of R peaks in

10
a specific time interval translates to the heart rate (in beats per minute).
The R-R interval commences at the peak of one R wave and stops at
the peak of the next R wave and it represents the time between two
QRS complexes [1].

Table 2.1 Details of Amplitude and duration of waves, intervals, and segments [17]
Features Amplitude (mV) Duration (ms)
P wave 0.1-0.2 60-80
PR segment - 50-120
PR interval - 120-200
QRS complex <3 60-100
ST segment - 100-120
T Wave 0.1-0.3 120-160
ST interval - 320
RR interval - (0.4-1.2) sec

ECG signals are typically measured using 12 leads system


including 3 bipolar leads, 3 augmented unipolar leads and chest
(precordial) leads. A lead is a pair of electrodes

11
(+ve and – ve) which is placed in some selected anatomical locations in our body and
connected to an ECG recorder. Bipolar leads are used to record the potential difference

Figure 2.3 Line of site of the bipolar, Einthoven’s triangle, adapted from [17]

between two points (+ve & -ve poles) whereas the electrical potential at a particular point by
means of a single exploring electrode is measured by unipolar leads. Leads I, II and III are
commonly referred to bipolar lead where one electrode acts as the positive electrode and other
as the negative electrode (hence bipolar). Einthoven's triangle is an imaginary triangle formed
by the two shoulders and the pubis using three limb leads [17]. This forms an inverted
equilateral triangle shape with the heart at the center that produces zero potential when the
voltages are summed. Here, Lead I records potentials between the left and right arm, between
the right arm and left leg. The QRS complex is usually positive in leads I, aVL, V5, V6 and
II, III, and aVF. The QRS complex is usually negative in leads aVR, V1, and V2[17].

A normal ECG tracing is usually corrupted with noise in some of the following three main
ways.

1. Baseline wander (BW) is a low-frequency noise artefact which is a result of movement or


respiration of the patient.
2. Power line interference is a high-frequency contamination due to electromagnetic fields
from power lines or nearby equipment. The noise depends on the locality - the lines or
mains frequency is 50Hz in Europe and 60Hz in the USA and parts of Asia.
3. Electromyography (EMG) or muscle noise is caused by the contractions of other muscles
near the heart, which is picked up by the electrodes of the ECG sensor [16].

12
Analyzing the ECG signal can reveal a lot about a patient’s health.
ECG analysis can uncover abnormal heart rhythms, previous heart
attacks, indications of cholesterol and more. The power spectrum of the
ECG signal can provide useful information about the QRS complex.
This section reiterates the notion of the power spectrum presented
earlier, but also gives an interpretation of the power spectrum of the
QRS complex. The power spectrum (based on the FFT) of a set of
sample points that contain approximately two heartbeats results in a
series of coefficients with a maximal value near a frequency
corresponding to the heart rate. The heart rate can be determined by
multiplying together the normalized frequency and the sampling
frequency. We can also get useful information about the frequency
spectrum of the QRS complex. To obtain this information, the QRS
complex of the ECThe power spectrum of the ECG signal provides
information about the QRS complex. This section repeats the notion of
the power spectrum presented earlier, but also gives an interpretation of
the power spectrum of the QRS complex [16].
The power spectrum (based on the FFT) of a set of 512 sample
points that contain approximately two heartbeats results in a series of
coefficients with a maximal value near a frequency corresponding to
the heart rate. The heart rate can be defined by multiplying the
normalized frequency and the sampling frequency. The QRS complex
of the ECG signal to be chosen as a template and zero-padded prior to
the power spectrum analysis. The peak of the frequency spectrum
acquired relates to the peak energy of the QRS complex. In addition to
the QRS complex, P and T waves, the ECG wave contains 60-Hz noise
from powerline interference, EMG from muscles, motion artifact from
the electrode and skin interface. Many clinical instruments such as a

13
cardiotachometer and an arrhythmia monitor require accurate real-time
QRS detection, hence it is necessary to extract the signal of interest, the
QRS complex [20].
Heart rate variability is an indicator of autonomic regulation of circulatory function, and
it is significant methods of analysing the activity of the autonomic nervous system (ANS).
The fast acting parasympathetic (vagal) activity may affect the heart rate. Spectral analysis of
the heartrate variability may be useful to estimate the effect of the sympathetic and
parasympathetic modulation of the RR intervals. There are two branches of the autonomic
nervous system sympathetic and parasympathetic (vagal) nervous systems that always work
as antagonists in their effect on target organs [8].
Error-free detection of the ECG R peaks is needed for calculation of the parameters of
HRV. Several algorithms, based on wavelet transform, derivative, and thresholding have been
reported for automatic detection of R-peak in ECG. Pan Tompkins QRS detection algorithm
is one of the routinely used algorithms for detection of R-peaks in ECG. The algorithm
includes low pass and high pass filters, derivative, squaring, integration, and threshold as a
signal processing steps [3]. Power line interference is suppressed by a low pass filter. The
high-pass filter has a cut off frequency of 5 Hz. The combination of low pass and high pass
filter can pass the QRS complex in ECG of frequency 5-15 Hz[12]. A band pass filter for a
pass band of 5-15 Hz can be directly designed using specialized design techniques. As
compared to R wave, P-wave and T-waves are of low frequency. The derivative introduces
provides the large gain to high frequency [6].

14
Chapter 3

3 Literature Review

3.1 List of Literature review

Jiapu Pan et al, proposes a real-time algorithm for detection of the QRS complexes of
ECG signals based on slope, amplitude, and width. With increased detection sensitivity, the
algorithm automatically adjusted thresholds and parameters periodically to adapt the changes
in QRS morphology with heart rate.
Tanushree Sharma et al, proposed a method in which QRS complex was detected using
the synchro squeezed wavelet transform.
Swetha Bellari et al compared methods based on Wavelet transform, Hilbert transform,
Pan Tompkins, combination of Wavelet and Hilbert transform for detecting R peaks. The Pan
-Tompkins proposed an accurate real time ECG detector in 1985 that has been successfully
used in many commercial devices. It is tested and analysed using a noisy ECG signal with
different signal-to-noise ratios (SNRs). The performance of the algorithm in QRS complex
detection using noisy data is evaluated and discussed to further the main research objective of
this study in the future, which is to develop an arrhythmia detection method in a noisy ECG.
Vijaya et al, proposed a method based on artificial neural networks using back
propagation algorithm for detection of QRS complex or R. Awadhesh et al. used Daubechies
and symmetric wavelets for detection of R wave. The ECG signal is decomposed to the
required level using the selected wavelet. The detail coefficient is selected based on energy,
frequency, and cross-correlation analysis of ECG signal.

15
A. Peterkova et al, detected the QRS Complex using averaging and adaptive thresholds
which are fluctuating in respect to the noise and the signal. Kritika Bawa et al, used modified
Pan Tompkins Algorithm for R peak detection followed by calculation of R-R interval and
hear rate. Total error, detection rate and sensitivity for different ECG signals are calculated as
performance indices.
In 1965, Hon & Lee noticed that the beat-to-beat interval changes are the first variation
before fetal distress occurs. In 1971, Sayers and others focused on rhythm imbedded in beat-
to-beat heart rate. In 1972, Ewing et al., devised several tests of short-term RR differences to
detect autonomic neuropathy in diabetic patients. In 1977, Wolf et al., showed association of
heart rate to sudden death post myocardial infraction. In 1981, Akselrod introduced power
spectral analysis (PSD). Late 1980’s it was confirmed that, HRV is strong predictor of
mortality after an acute myocardial infraction. In 1996, standard of measurement for HRV
was published.George et al. and Acharya et al used time domain, frequency domain, and non-
linear dynamic analysis techniques to analyse HRV for various applications. Time-dependent
spectral analysis of HRV using the wavelet transform is valuable for explaining the patterns
of cardiac rate control during reperfusion. Marek et al., measured HRV using time domain
methods, statistical methods, geometrical methods, frequency domain methods using spectral
components and non-linear methods. Results reported by Mohamed et. al, confirmed that
degree of asthma control influenced pattern of autonomic modulation. Frequency domain
analysis and statistical methods were used to determine HRV [9].

Klaudia PalaK et al, proposes that the influence of Deep


Breathing on ANS activity in professional swimmers and nontrained
persons was evaluated based upon the changes in Heart rate, or so to
say the HRV. Since R-R interval is required to calculate the HRV, here
the IBI interval was detected using HRV indices like the Mean
arithmetic mean, SD standard deviation, average R-R interval of the
sinus rhythm, SDNN standard deviation of the average R-R intervals of
the sinus rhythm, rMSSD square root of the mean squared difference of
successive R-R intervals, pNN50 proportion of successive RR intervals
that differ by more than 50 ms [14].

16
In a paper proposed by George E. Billman et al similar
methodological considerations like time domain, frequency domain,
and non-linear dynamic analysis techniques were used to Analysis
HRV [15]. U. Rajendra Acharya et al proposed a paper wherein they
have discussed the various applications of HRV and different linear,
frequency domain, wavelet domain, nonlinear techniques used for the
analysis of the HRV. Time-dependent spectral analysis of HRV using
the wavelet transform is valuable for explaining the patterns of cardiac
rate control during reperfusion [13].

Jos´e Fernandez, et al. employed the mixed approach of Pan-


Tompkins (PT) algorithm and the wavelet algorithm in QRS detection.
The QRS is identified using a filter threshold detection method. In
wavelet method the ECG signal is fragmented into components of
different discrete scales where primary scale is made of high frequency
noise and R peaks. The secondary scale contains low frequency
information along with the T-wave. The R peaks are identified by
matching the scale values and the PT algorithm follows a filter
threshold method of QRS detection. It includes a band pass filter, a
differentiator, a moving window integrator and a squaring operation.
Obvious QRS complex is detected best using PT algorithm. Unusual
and wider QRS complex are not detected best using PT algorithm [10].

Carsten Meyer, et al. used the mixed methodology in QRS


detection algorithm. The algorithm combines the advantages of PT and
wavelet method detection. QRS wave form is detected using a filter
threshold detection method. This method includes of a band pass filter,
differentiator, a moving window integrator and a squaring operator.
The squaring operator and differentiators accentuate steep prominent
feature. The smoothing effect is carried out by the integrator and band
pass filter removes excess noise [11].

17
Sathyapriya L, et al., detected R-peaks using modified Pan-
Tompkin’s algorithm. Series of low pass and high pass filter
arrangements are used for noise reduction. Derivative filter provides
slop. Filtered signal is processed for amplitude squaring and then
integrated. After moving window integration, thresholding is processed
to define the R-peak and maximum Level is set to determine the R-
peak. The heart rate is found using R-Peaks in fixed interval of time
[12].

In a paper by Marek Malik, HRV measurement were done by


using time domain methods, statistical methods, geometrical method,
and frequency domain methods using spectral components and non-
linear methods. The parameters which were used to measure non-linear
properties of HRV included 1/f scaling of Fourier spectra, H scaling
exponent, and Coarse Graining Spectral Analysis (CGSA). For data
representation, Poincarè sections, low-dimension attractor plots,
singular value decomposition, and attractor trajectories were used.

18
Chapter 4

4 Methodology

4.1 Objective

The objective is to implement the Pan-Tompkins algorithm for detection of QRS


complex in ECG recordings in MITBIH database and computation of the parameters of heart
rate variability. The study includes implementation of the algorithm on the ECG recordings
for detection of ECG R- peaks in 38,885 cardiac cycles recorded in from 12 patients.

4.1.1 Purpose of Study

The purpose of the study is to calculate the parameters of heart rate variability for the
ECG recordings in MIT-BIH database. For this Pan-Tompkins algorithm can be used for
automatic detection of R- peaks in ECG signals. The detected R peaks can be used to measure
the R-R intervals. The R-R intervals can be used to calculate the parameters of heart rate
variability for diagnosis of cardiovascular disorders.

19
4.1.2 Significance and Applications of ECG R-peaks detection and heart
rate variability

The beat-to-beat variation in the duration of R-R interval or the heart rate is called as
heart rate variability (HRV). The parameters of heart rate variability can be used to determine
the risk for the patients recovering from myocardial infraction. Analysis of HRV has been
used to assess autonomic function and to quantify risk in a wide variety of cardiovascular
disorders.
The Pan- & Tompkins QRS detection algorithm is the most widely used and the often-cited
algorithm for the extraction of QRS complexes from the ECG signal. The algorithm is based
on the application of several filters and an adaptative thresholding. This adaptative threshold
is due to baseline deviation, for that it must be adapted to every cardiac cycle. The
interference present in ECG signals can be reduced by digital bandpass filter, permits the use
of low threshold, and increase the detection sensitivity.

4.2 The QRS detection based on Pan Tompkins Algorithm:

Low Pass High Pass Derivative Squaring


Input ECG
Filter Filter Filter
Signal
Tompkins
QRS
detection
Algorithm

Moving Thresholding R- peak


Averaging
Window detection
Signals Input ECG
Peak
Signal
Pan detection
Tompkins esholding
Figure 4.1 Pan Tompkins QRS detection Algorithm block diagram.
QRS
detection
Algorithm

The proposed algorithm is to extract and analyse the QRS complex state along with
amplitudes and locations of Q, R, S and R-R intervals to evaluate an ECG signal accurately

20
[1]. The database used for the algorithm detection is MIT-BIH Arrhythmia having sampling
frequency of 360 HZ. This is good to detect QRS and RR interval series [11].
1. Read Input Signal:
Initially the ECG signals are taken from various databases like the MIT-BIH. The raw
ECG data is loaded in the variable named ECG for normalization. It is converted to Zero
mean and dividing it by maximum absolute value. Time index is prepared with sample
number [2].

2. Band Pass Filter:


In the algorithm, the low pass filter and high pass filter make bandpass filter. The band
pass filter minimizes the noise in ECG signal by matching the average QRS complex
spectrum. The pass band that maximizes the QRS energy is in the 5- 35Hz range [2].
a. Low Band Pass
Filter: In this we have use second order low-pass filer with transfer function.
1−2 z−6+ z−12
H(z)= (2)
1−2 z−1 + z−2
The Gain is 36 and cut off frequency is 11 Hz with the processing delay of 6 samples [2].

b. High Band Pass Filter:


The design of High Pass filter is done by subtracting the output of First order low pass
filter from an all-pass filter. The transfer function of such a high pass filter is,
−1+ 32 z−16 + z−32
H(z) = (3)
1+ z−1
Where gain is about 32 and the cut-off frequency is 5Hz with the processing delay of samples
[2].

3. Derivate Filter:
The next processing step is differentiation and is a standard technique to find the high
slopes that differs from the QRS complexes. The procedure helps to suppress the low
frequency components of P and T waves. It also provides high gains to the frequency
components arising due to high slopes of QRS complex. After filtering, the filtered signal is
derivative i.e., differentiated to get the slope information. The delay of 02 Samples is used. It
does non-linear amplification of the output of the derivative and makes the data points

21
positive [6]. In this we have used five-point derivative with the transfer function. The delay of
02 samples is used [2].
1
H(z) = ( – z−2−2 z−1 +2 z −1 + z 2 ) (4)
8T

4. Squaring Operation:
This is a nonlinear transformation consisting of point-by-point squaring of signals. The
small differences arising from P and T waves are suppressed due to squaring operations. The
high frequency components in the signal related to the QRS complex are further enhanced [6].
One completion of differentiation filter, point by point squaring is done on the signal. Non-
linear amplification of the output is done on the derivative which makes the data points
positive in nature [10].
2
Y(nT) = [ x ( nT ) ] (5)

5. Averaging:
The squared signal is then passed through an averaging function to achieve the
averaging single [6].

6. Moving Window Integration:


The squared waveform signal is passed through a moving window integrator. Here the
integrator sums the area under squared waveforms, advances to one sample interval and
integrates the new samples. Moving average filter extracts feature in addition to the slope of
the R wave [6].

[
Y ( nT )=( 1/ N ) ¿ x( nT −(N −1) T )+ x (nT −( N−2)T )
+… … … . x ( nT ) ] (6)

N is number of samples in the width of integration window. Important factor in the moving
Window is the number of samples N. In general, width of the window should be equal to the
widest possible QRS complex. Several peaks are generated in the integration waveform if
peaks
are too narrow. QRS and T complexes will merge if window is too wide. The window is 30
samples in width and delay are of 9 samples [6].

7. Thresholding:

22
After moving window integration, thresholding is done to find the peak. Maximum
level is set which helps in detecting R-peak [6].
Fiducial mark of the QRS complex relates to the rising edge of the integration waveform and
is equal to the width of the QRS complex. A fiducial mark for the temporal location of the

Figure 4.2 Relationship of QRS complex to moving integration waveform,


Adapted from [18].
QRS complex can be determined from this rising edge according to the desired waveform
feature to be marked such as the maximal slope or the peak of the wave. Adjusting the
thresholds, the thresholds are automatically adjusted to float over the noise. Low thresholds
are likely because of the improvement of the signal-to-noise ratio by the bandpass filter [18].

The highest of the two thresholds in each of the two sets is used for the first analysis of
the signal. The lower threshold is used if QRS is not detected in a certain time interval. The
set of thresholds is initially applied to the integration waveform and is computed from [18].
 SPKI = 0.125 PEAKI + 0.875 SPKI (if PEAKI is the signal peak)
 NPKI = 0.125 PEAKI + 0.875 NPKI (if PEAKI is the noise peak)
 THRESHOLD Il = NPKI + 0.25 (SPKI - NPKI)
 THRESHOLD I2 = 0.5 THRESHOLD Il
where all the variables refer to the integration waveform:
 PEAKI is the overall peak,
 SPKI estimate the signal peak,
 NPKI estimate the noise peak,
THRESHOLD Il is the first threshold used, and
THRESHOLD 12 is the second threshold used.

23
A peak is determined by observing when the signal changes direction within a
predefined time interval. The signal peak SPKI is a peak that the algorithm has already
established to be a QRS complex. The noise peak NPKI is any peak that is not related to the
QRS (e.g., the T wave). The thresholds are created upon running estimates of SPKI and
NPKI. The new values of these variables are computed in part from their prior values. When a
new peak is detected, it must first be classified as a noise peak or a signal peak. To be a signal
peak, the peak must exceed THRESHOLD I1 as the signal is first analysed or THRESHOLD
12 if search back is required to find the QRS. The value of SPKI is when the QRS complex is
found using the second threshold, SPKI = 0.25 PEAKI + 0.75 SPKI [18].
The set of thresholds applied to the filtered ECG is determined from
 SPKF = 0.125 PEAKF + 0.875 SPKF (if PEAKF is the signal peak)
 NPKF = 0.125 PEAKF + 0.875 NPKF (if PEAKF is the noise peak)
 THRESHOLD F1 = NPKF + 0.25 (SPKF - NPKF)
THRESHOLD F2 = 0.5 THRESHOLD Fl where all the variables refer to the filtered ECG:
SPKF estimate the signal peak, NPKF estimate the noise peak, THRESHOLD Fl is first
threshold used, and THRESHOLD F2 is second threshold used. QRS complex is found using
the second threshold, SPKF = 0.25 PEAKF + 0.75 SPKF
For irregular heart rates, the first threshold of each set is reduced by half to increase the
detection sensitivity and to avoid missing beats:
THRESHOLDII v- 0.5 THRESHOLD II
THRESHOLD Fl 0.5 THRESHOLD Fl
To be identified as a QRS complex, a peak must be recognized as such a complex in both the
integration and bandpass-filtered waveforms [18].

4.3 Heart Rate Variability Analysis (HRV)

This is simple and non-invasive measurement technique of autonomic impulses. The


HRV measures the oscillations between consecutive heart beats (RR intervals) and with the
oscillations between instantaneous heart beats [14]. ANS modulation under physiological
conditions, such as wakefulness and sleep conditions, different body positions, physical
training, and pathological conditions can be assessed with the help of HRV [13]. The change
in HRV patterns help to detect advance issues of health. Higher HRV signifies good health of
a person. Lower HRV indicates abnormal and insufficient adaptions of the ANS [4].

24
The steps to implement the analysis of heart rate variability are namely pre-processing,
R-peak detection, and HRV analysis in time-domain and frequency-domain method. Raw
ECG is taken from database, each data contains different ECG wave shape; each portion of
the ECG waveform carries information that about the cardiac conditions. Pre-processing
means the de-noising of raw ECG signal. Various types of noise from different sources can be
superimposed to original signal. On detection of R points, RR interval analyses are done and
the HRV metrics can be calculated from the analysis of the RR tachogram, the time series of
RR intervals [4].

Input ECG Pre-processing Pan Tompkins QRS Complex


Signal Signals QRS detection detection / R
algorithm Peak detection

R-R intervals Heart Rate


Heart Rate (HR)
Variability
evaluation

Figure 4.3 HRV evaluation process block diagram

4.4 Approach of Heart Rate Variability Analysis (HRV)

There are several approaches for HRV analysis, which can be subdivided into following:
1. Linear Analysis:
a. Time-domain Analysis
b. Frequency-domain – Power Spectral Density Analysis.

2. Non-linear Analysis: All HRV parameters are calculated on ‘normal-to-normal’ (NN)


inter-beat intervals or RR intervals caused by normal heart contractions paced by sinus node
depolarization [7].

c. Detrended Fluctuation Analysis (DFA)


d. Rescaled adjusted range
e. Wavelet Transform Modulus Maxima
f. Poincare plot

25
4.5 Linear Analysis

Linear parameters were computed both in time and frequency domain. Time domain
parameters were the standard deviation (SD) of the beat-to beat RRI signal, which describes
the overall HRV, and RMSSD, which is mostly related to the respiratory sinus arrhythmia
(RSA). Frequency domain analysis was based on power spectral estimation, which was
carried out by Welch method with FIT length of 512 points. Linear frequency domain analysis
included quantification of the spectral power in the LF and HF hands, and their ratio, LF and
HF ratio [5].

4.5.1 Time Domain Analysis Parameters

Time domain methods are the simplest, the heart rate at any point in time or the
intervals between successive normal complexes are determined by this method. The Normal
to Normal (NN) intervals between the adjacent QRS-complexes is due to the sinus node
depolarizations or the instantaneous heart rate. NN interval is the simplest Time domain
variables. The important time domain measures are SDNN. SDNN Index, SDANN and the
RMSSD. These methods are further divided into (1) Statistical measures (2) Geometrical
measures. The Geometrical measures are derived from RR intervals and insensitive to
analytical quality of the RR series [5].

1. SDNN:
This parameter of time domain analysis is the simplest and most used variable today. It
is defined as the standard deviation of the RR intervals or the square root of variance over the
entire recording of inter-beat intervals. Mathematically, variance is the total power of spectral
analysis and SDNN reflects all the cyclic components responsible for variability in the period
of recording. When SDNN is calculated over 24-hour periods, it encompasses short-term HF
variations as well as the lowest frequency components seen in a 24-hour period. SDNN has a
high dependency on the time of the recordings used. The shorter recording, measures shorter
cycle length. Thus, when comparing SDNN measures, durations of the recordings should be

26
standardized. Generally short-term recordings are standardized to 5 minutes and long-term
recordings to 24-hours and unit of SDNN is milliseconds (ms).


N
1
N∑
SDNN= ¿¿¿ (7)
i=1

N
1
RR =
N
∑ R Ri
i=1


N
1
SDNN= ∑ (RRi −RR)
N I =1

2. SDANN:
This parameter may be defined as the standard deviation of the averages of NN intervals
in all 5-minute segments of the entire recording [2]. It is an estimate of the changes in heart
rate due to cycles longer than 5 minutes. SDANN corresponds to the ultra-low frequency
(ULF) region of frequency domain methods. SDANN estimates the long-term components of
HRV and measured in milliseconds [16].


N
1
SDANN = ∑ ( R Ri −RR ¿ ¿)2 ¿ ¿
N i=1
(8)

RR = mean of RR intervals in 5 Minutes segment.


M
´ = 1 ∑ R Ri
RR
M i=1

3. RMS-SD:
This measure of time domain HRV analysis may be defined as the square root of the
mean of the sum of the squares of differences between adjacent RR intervals [2]. This is
another measure of short-term variations of HRV and estimates high frequency variations in
heart rate. It highly correlates to pNN50 and corresponds to the HF measure in the frequency
domain. The unit of RMSSD is millisecond (ms)[5]. The RMSSD indicates the beat-to-beat
variance in HR and the primary time domain measure is used to estimate the vagally mediated
changes shown in HRV [16].


N−1
1
N −1 ∑
RMS-SD = ( R Ri+1 −R R i) 2 (9)
i =1

27
4. SDNN index:
SDNN index is defined as the mean of the standard deviations of all NN intervals for all
5-minute segments of the entire recording [2]. This correlates to the mean of 5-minute total
power in the frequency domain. SDNN index takes the SDNN values of all 5-minute intervals
in the recording and averages it to come out with one number called the SDNN index. The
parameter measures the variability due to cycles shorter than 5 minutes. The unit of SDNN
index is milliseconds (ms)[16].
N
1
SDNN index =
N
∑ SDN N i (10)
i=1

5. NN50:
Number of successive RR interval pairs that differ more than 50 milliseconds [5].
6. pNN50:

This measure of the time domain analysis of HRV studies is an interval difference
parameter. It is defined as the percentage of interval differences of successive RR intervals
greater than 50ms. This measure estimates high frequency variations in heart rate and
correlates to HF measures of the frequency domain [2]. pNN50 is a percentage and hence has
no unit[16].

4.5.2 Geometrical Methods of Heart Rate Variability Analysis

The series of RR intervals also can be converted into a geometric pattern such as the
sample density distribution of RR interval durations, sample density distribution of
differences between adjacent RR intervals, Lorenz plot of RR intervals, and so forth.
Common examples of Geometrical Methods include [16].

1. HRV triangular index: Total number of all RR intervals divided by the height of the
histogram of all RR intervals measured on a discrete scale with bins of 7.8125.
2. TINN: Baseline width of the minimum square difference triangular interpolation of the
highest peak of the histogram of all RR intervals.

28
3. Differential index: Difference between the widths of the histogram of differences
between
adjacent RR intervals measured at selected heights.

4.5.3 Frequency domain / Power spectral density (PSD) Analysis


Parameters

Power spectral density (PSD) gives information on how the power is distributed (the
variance) as frequency, by providing a means to quantify autonomic balance. The Frequency
domain parameters used for analysis are as follows [5].
1. Total Power (TP): It is a short term of the total power of Spectral density.
2. The Frequency range is in between 0 and 0.4 Hz.
3. The Total Power is calculated in milliseconds squared (ms2).

1. Very Low Frequency power (VLF):


The power spectrum of very low frequency range between very low frequency 0.0033
and 0.04 Hz. The parameter gives the overall activity status of various slow mechanisms of
sympathetic function. Very low frequency band is calculated in milliseconds squared (ms2)
[5].

2. Low Frequency power (LF):


Low Frequency is band of power spectrum range between 0.04 and 0.15 Hz. It measures
both sympathetic and Parasympathetic activity. Low frequency band is calculated in
milliseconds squared (ms2) [5].

3. High Frequency power (HF):


The power spectrum range is between 0.15 Hz and 0.4 Hz. This measure reflects
parasympathetic (vagal) activity. High frequency band is calculated in milliseconds squared
(ms2) [5].

4. LF/HF Ratio:

29
It is the ratio calculated between low and high frequency bands. It indicates overall
balance between sympathetic and parasympathetic systems. Higher value represents
sympathetic system and lower values represents parasympathetic system. This ratio can be
used to help quantify the overall balance between the sympathetic and parasympathetic
systems [5].

5. Normalized Low Frequency (LF Norm)


It is the ratio between absolute value of the Low Frequency and difference between
Total Power and Very Low Frequency. The measures minimize an effect of changes in Very
Low Frequency power and emphasizes the changes in sympathetic regulation. Normalized LF
is calculated in terms of percentile units [5].

6. Normalized High Frequency (HF Norm)


It is the ratio between absolute value of the High Frequency and difference between
Total Power and Very Low Frequency. The measure minimizes an effect of changes in Very
Low Frequency power and emphasizes changes in parasympathetic regulation. Normalized
HF is calculated in terms of percentile units [5].

Table 4.1 Frequency Domain Parameters Table

Frequency Range Frequency (HZ) Description

Total Power, ms2 0-0.4 The variance of all the normal intervals.
Reflects all cyclic components of HRV

Power in ultra-low frequency 0-0.003 It reflects the influence of the day / night
range (ULF), ms2 cycle.

Power in very low frequency 0.003-0.04 It reflects the sympathetic activity of the
range (VLF), ms2 nervous system.

Power in very low frequency 0.04-0.15 It reflects the sympathetic activity of the
range (LF), ms2 nervous system.

Power in high frequency 0.15-0.4 It reflects the respiratory and


range (HF), ms2 parasympathetic activity of the nervous
system

LF/HF ratio - This determines the balance between the


sympathetic and parasympathetic systems.

30
Different methods are used to extract LF, HF and LF/HF ratio and some of the methods
among these are as below:

1. Fast Fourier Transform (FFT): FFT is the conventional method used by researchers for
spectral analysis, because of its high accuracy in break down the complex signal into simpler
components. Recent studies show FFT technique is not suitable for processing nonlinear and
non-stationary signals.

2. Auto regression technique: Auto regression is well suited for linear feature extraction of
ECG signals. This technique has better resolution of sharp peak and makes a smoother and
elucidate curve. Even though it has significance accuracy in classification purposes, its
linearity may not represent ECG nonstationary nature.
3. Wavelet transform: Different time-frequency analysis techniques are present example:
short time Fourier transform (STFT), Hilbert Huang transform (HHT), Modified Wigner
distribution function, bilinear time-frequency distribution and wavelet transform. In that
wavelet transform has greater accuracy among other technique and perform greatly for the
analysis of nonstationary signal [15].

4.6 Non-Linear Analysis

Although time and frequency domain measures of HRV quantify HRV on various time
scales, nonlinear HRV measures attempt to quantify the structure or complexity of the R-R
interval time series. Nonlinear analysis of cardiology data is a relatively new scientific
approach to assess the dynamics of heart activity.

4.6.1 Detrended Fluctuation Analysis (DFA)

DFA is a technique for detection of correlations in time series. These functions can
estimate several scaling exponents from the RR time series being analysed. The scaling
exponents describe short or long-term fluctuations. DFA algorithm steps are as follows[17]:

Step 1: The RR interval time series is integrated using

31
k
y(k) = ∑ (R R j ¿−RR), k=1 , … … .. , N ¿ (1)
j=1

Where:

1. y(k) is the kth value of the integrated series


2. RRj is the jth inter beat interval of the series
3. RR is the average inter beat interval over the entire series

Step 2: The integrated time series is further divided into equal length n.
Step 3: In each box of length n, a least square line is fitted to the RR interval data and yn (k)
denote these regression lines.
Step 4: The integrated series y(k) is detrended by subtracting the local trend in each box. The
root-mean-square fluctuation is calculated using:


N
1
F(n) = ∑ (k ( k )− y n ¿(k ))2 ¿
N k=1
Where: F (n) is a fluctuation function of box size n.

4.6.2 Rescaled adjusted range Statistics plot (R/S)

The rescaled range is a statistical measure of the variability of a time series as


introduced by British hydrologist Harold Hurst. The Hurst exponent is one closely related
method with the R/S. This exponent is a measure is widely used to evaluate the self-similarity
and correlation properties of fractional Brownian noise; the time series produced by a
fractional Gaussian process [17].

1. Wavelet Transform Modulus Maxima

Popular tools in wavelet-based multifractal analysis is the Wavelet Transform Modulus


Maxima (WTMM) method. This method is based on wavelet analysis that is called
mathematical microscope‖ due to its ability to maintain good resolution at different scales[17].

32
4.6.3 Poincare plot:

It is a nonlinear method to assess the dynamic of HRV. It provides summary and


detailed beat-to-beat information on the behaviour of the heart. The Poincare plot is known as
a return maps or scatter plots, where each RR interval from time series.
RR = {RR1, RR2...RRn, RRn+1} is plotted against next RR interval. The duration of the

Figure 4.4 A typical Poincaré Plot of RR intervals, adapted from [19]

current cardiac beat (RRn) is shown on the x axis and the duration of the

following beat (RRn+1) on the y axis. The Poincaré plot is described in the (RRn, RRn+1)
space. All points described by successive cardiac beats of equal duration (RRn = RRn+1) are
located on the identity line. The points above the identity line correspond to all prolongations
(RRn < RRn+1), and the points below this line represent all shortenings of the interval
between 2 consecutive beats (RRn > RRn+1).

33
Parameter SD1 measures the dispersion of points across the identity line, and SD2 measures
the dispersion of points along the line of the Poincare plot. Both parameters SD1 and SD2 are
axes of an imaginary ellipse. used are SD1, SD2 and SD1/SD2 ratio. SD2 is standard
deviation of Poincare plot on the line of identity (y=x). SD1 is standard deviation of Poincare
plot on line perpendicular to the line of identify [7].
x= {x1, x2, …, xn}

= {RR1, RR2, …, RRn} (11)

y= {y1, y2, …, yn}

= {RR2, RR3, …, RRn+1} (12)

x− y x+ y
d 1= ¿ d2 =
√2 √2

SD1 = √ var ( d1 ) ;

SD2 = √ var ( d2 ) ;

Where, i = 1, 2, 3, …, n and n are the number of points in the Poincaré plot.

var(d) is the variance of d.


Parameter SD1 is correlated with high frequency power, while SD2 is correlated with
both low and high frequency powers. The ratio SD1/SD2 is related with the HRV signal. It
has been suggested that the ratio SD1/SD2, which is a measure of the randomness in HRV
time series, has the strongest association with mortality in adults. SD2/SD1 ratio correlates

34
with LF/HF ratio. The ratio was positively correlated with Low Frequency (LF) and
negatively correlated with High Frequency (HF). This method has also been used in other
clinical settings, such as stroke, diabetes, chronic renal failure, in patients after coronary
artery bypass grafting or with sleep apnea syndrome [17].
The Poincaré plot method also provides prognostic information about mortality in post
myocardial infarction, chronic heart failure, and sudden infant death syndrome and about the
risk of life-threatening ventricular arrhythmias in patients subjected to cardiac surgery.
Poincare plot analysis helps to visualize and quantify the heart rate asymmetry i.e. The
different contributions of decelerations and accelerations of RR intervals to short-term HRV
[19].

35
Chapter 5

5Result

5.1 Result

The database used for the algorithm detection is MIT-BIH Arrhythmia having sampling
frequency of 360 HZ. The merits of evaluation used to estimate the overall performance of the
proposed method, are sensitivity (%𝑆𝑒), positive predictivity (%𝑃𝑃+), actual beats (TB), total
number of true positives (TP), total number of false positives (FP), total number of false
negatives (FN) and detection error rate (𝐷𝐸). These merits are represented by,

TP
% Sensitivity( S )= ×100
TP+FN

TP
% Positive predictivity (PP)= ×100
TP+FP

FP+FN
% Detection Error (DE)= ×100
TB

36
37
Table 5.1 Result of evaluating the Pan Tompkins Algorithm using MIT-BIH database
Rec.No TB TP FP FN %PP %S % DE
100 2272 2271 1 0 99.95 100 0.04
101 1870 1869 3 0 99.83 100 0.16
111 2129 2128 5 0 99.76 100 0.23
200 2664 2663 60 0 99.79 100 0.22
205 2656 2655 4 0 99.84 100 0.15
208 2961 2960 0 0 100 100 0.0
210 2662 2661 17 0 99.36 100 0.63
213 3254 3253 4 0 99.87 100 0.12
214 2271 2270 4 0 99.82 100 0.17
215 3367 3366 0 0 100 100 0.0
223 2609 2608 9 0 99.65 100 0.34
233 3081 3080 2 0 99.93 100 0.06
Total 31796 31784 109 0 99.81 100 0.176

Table 5.2 Heart rate variability parameters


Rec.No Time Domain Parameters Poincare Plot
SDNN SDSD RMSSSD NN50 pNN50 SD1 SD2
100 48.05 61.58 61.56 224 9.86 27.21 49.4
101 76.39 59.18 59.16 376 20.11 27.33 89.07
111 57 66.45 66.44 308 14.49 26.00 47.59
200 143 199 199.10 1682 63.16 72.09 76.70
205 69.40 71.87 71.86 109 4.10 20.88 28.28
208 163.93 245.21 245.17 2207 74.5 66.63 81.51
210 118.23 155.72 155.69 1765 66.32 69.55 69.01
213 33.55 46.24 46.23 333 10.23 42.45 40.03
214 183.59 290.50 290.43 1085 47.79 63.53 79.16
215 54.97 79.43 79.42 482 14.31 89.93 81.75
223 111.34 190.71 190.67 996 38.19 42.50 95.65
233 125.71 217.72 217.68 1881 61.07 49.24 52.90
Total 98.76 140.03 140.28 934 35.44 49.77 69.92

38
Figure 5.1 Pan Tompkins algorithm steps – (MAT file- 101)

Figure 5.2 R Peak detection using Pan Tompkins – (MAT file -101)

39
Figure 5.3 Non-Linear Heart Rate Variability – Poincare plot (MAT file -101)

Figure 5.4 Pan Tompkins algorithm steps – (MAT file -106)

40
Figure 5.5 R peak detection using Pan Tompkins – (MAT file -106)

Figure 5.6 Non-Linear Heart Rate Variability – Poincare plot (MAT file- 106)

41
Figure 5.7 Pan Tompkins algorithm steps (MAT file -119)

Figure 5.8 R peak detection using Pan Tompkins (MAT file -119)

42
Figure 5.9 Non-Linear Heart Rate Variability – Poincare plot – MAT file -119

43
Chapter 6

Conclusion

6.1 Conclusion

The proposed algorithm of QRS detection method is based on adaptive threshold. It is


validated using MIT-BIH arrhythmia database. QRS position of normal and abnormal QRS
complex with influence of many artifacts is studied. The proposed algorithm gives the
detection rate of 0.176%, sensitivity of 100%, on MIT-BIH Arrhythmia database. The values
of positive productivity, false positivity, false negativity was 99.81, 109, and 0 respectively.
The % sensitivity and % detection error were 100, and 0.176. ECG plays a major role to
detect cardiac abnormalities. Using automatically detected the ECG R peaks, the time domain
parameters SDNN, SDNN Index, SDANN and the RMSSD were calculated as a measure of
heart rete variability. The average values of SDNN and the RMSSD were 98.76,
140.28 ,35.44 respectively
Time domain, frequency domain and non-linear methods were used to determine the
HRV analysis Pan-Tompkins’s algorithm used in the detection of QRS complexes in noisy
ambulatory ECG signal-to-noise ratios and standard arrhythmia data. The algorithm presented
is a band-pass filter (LPF and HPF), derivatives, square, integral, and threshold process. The
Pan-Tompkins’s algorithm can perform the QRS detection process for noisy signal data.
The result confirms that the Pan-Tompkins’s algorithm is also suitable to use as a QRS
detection method to detect arrhythmia can be measured exactly and reproducibly by time
domain, frequency domain and non-linear method. The extensive association of the neural

44
work regulating heart rate allow the investigation of the action of several internal and external
factors.

45
Chapter 7

References

[1] P. Mayapur, “Detection and processing of the R peak”. Int. J. Innov. Res. in Electrical,
Electronics, Instru. and Con.l Engg., 2018, vol. 6, issue 11, pp. 38-44,
Doi:10.17148/IJIREEICE.2018.6116.
[2] J. Pan and W. J. Tompkins, “A real-time QRS detection algorithm”. IEEE Trans. Biomed.
Eng., March 1985,vol.32, pp. 230-236.
[3] K. Bawa and P. Sabherwal. “R-peak detection by modified Pan-Tompkins algorithm”.
Int. J.Adv. in Resear. & Tech., 2014, vol.3(5), pp. 30-33.
[4] H. M. Tun, Z. M. Naing, W. K. Moe et al, “Analysis of heart rate variability based on
quantitative approach”. MOJ Proteomics Bioinform., 2018, vol.7,(2), pp. 131-141,
Doi: 10.15406/mojpb.2018.07.00223.
[5] F. Shaffer and J. P. Ginsberg, “An overview of heart variability metrics and norms”.
Front. Public Health, 2017, vol.5(258) ,Doi: 10.3389/fpubh.2017.00258.
[6] Y. Palaniappan, V. A. Vishanth, N. Santhosh, R. Karthika and M. Ganesan, “R-Peak
detection using altered Pan-Tompkins algorithm”, Int. Conf. Commu. Signal Proc., India,
2020, pp. 1501-150.
[7] E. Gospodinova, M. Gospodinov, N. Dey, I. Domuschiev. “Analysis of heart rate
varability by applying nonlinear methods with different approaches for graphical
representation of results”. Int. J. Advanced Compu. Sci. App.,2015, vol. 6, No. 8, pp.38-
45.
[8] N. Singh, K. J. Moneghetti, J. W. Christle, D. Hadley, D. Plews and V. Froelicher,
Clinical Reviews: Clinical Arrhythmias, Arrhythmia & Electrophy. Rev., 2018, vol.7(3)

46
,pp.193-198, doi:10.15420/aer.2018.27.2.

47
[9] U. R. Acharya, K. P. Joseph, N. Kannathal, Choo Min Lim, J. S. Suri,
“Heart rate variability: a review”, Med Bio Eng Comput,2006, vol.44, issue 12,
pp.1031–1051, Doi:10.1007/s11517-006-0119-0.
[10] Fernandez, Jose, Matthew Harris, and M. Carsten."Combining algorithms in automatic
detection of R-peaks in ECG signals."IEEE Symposium on Computer-Based
Medical Systems (CBMS'05),2005, pp. 297-302.
[11] Meyer, Carsten, Jose Fernandez Gavela, and Matthew Harris."Combining algorithms in
automatic detection of QRS complexes in ECG signals." IEEE Transactions on
Information Technology in Biomedicine ,2006, Vol.10, no. 3 ,pp.468-475.
[12] Sathyapriya, L., L. Murali, and T. Manigandan. "Analysis and detection R-peak detection
using Modified Pan-Tompkins algorithm." IEEE International Conference on
Advanced Communications, Control and Computing Technologies, 2014, pp. 483- 487.
[13] Palak, Klaudia & Furgala, Agata & Ciesielczyk, Katarzyna & Szygula, Zbigniew &
Thor,
P.J. "The Changes Of Heart Rate Variability In Response To Deep Breathing In
Professional Swimmers." Folia medica Cracoviensia,2013, Vol. LIII,2, pp. 43–52.
[14] George E. Billman, Heikki V. Huikuri, Jerzy Sacha and Karin Trimmel, "An introduction
to heart rate variability: methodological considerations and clinical applications”,
frontiers
in Physiology, 2015.
[15] Marek Malik, "Heart rate variability, Standards of measurement, physiological
interpretation, and clinical use", European Heart Journal, 1996, 17, 354–381.
[16] Mathews, Binoy John, "Design and implementation of heart rate variability measures in
the time domain" 2004. Theses. 556.
[17] Arefin, M. Riadh Riadh, "Computationally Efficient QRS Detection Analysis In
Electrocardiogram Based On Dual-Slope Method" 2015. Theses and Dissertations. 1736.
[18] Lee, Jeong-Whan & Jeong, Keesam & Yoon, Jiyoung & Lee, Myoungho, "A simple
real-time QRS detection algorithm". Proc 18th Ann Int Conf IEEE Engineering in
Medicine
and Biology,Soc,1996, 1396 - 1398 vol.4. 10.1109/IEMBS.1996.647473.
[19] Guzik, Przemyslaw & Piskorski, Jarosław & Krauze, Tomasz & Schneider, Raphael &
Wesseling, Karel & Wykretowicz, Andrzej & Wysocki, Henryk, "Correlations
between the Poincaré Plot and Conventional Heart Rate Variability Parameters Assessed
during Paced Breathing", 2007, The journal of physiological sciences: JPS. 57. 63-71.
10.2170/physiolsci.RP005506.
[20] Thakor, N. V., Webster, J. G., and Tompkins, W. J. “Estimation of QRS complex
power spectra for design of a QRS filter”, 1984, IEEE Trans. Biomed. Eng., BME-31:
702–05.
[21] Gharaie, Saleh, “A Novel Design and Optimization of a Polymeric Aortic Valve
using Numerical and Experimental Techniques”,2016, 10.13140/RG.2.2.32929.66405.

48
Acknowledgment

I wish to express my heartfelt gratitude toward the MGM trust, Director, Principal
and Vice Principal and HOD, for giving me the chance to partake in dissertation report. I
have learned so much during report preparation, which will help me to sharpen my skills and
newfound knowledge for future. My sincere gratitude towards our HOD, Dr. G.D. Jindal.
I am also thankful to my guide Dr. U.R Bagal who supported me throughout this
dissertation report with utmost cooperation and patience and for helping me in completing this
dissertation report.

Rameshwari Abhane
(UID – 119BM6002B)
M.E. Biomedical

49

You might also like