Heart Rate Variability (HRV) analysis is the
ability to assess overall cardiac health and the state of the
autonomic nervous system (ANS), responsible for regulating
cardiac activity. ST-change due to ischemia and their HRV
analysis have not been well discussed in the previous works.
The proposed simple and time efficient TBC algorithm has
been tested in four sets of standard databases with selected
patient’s data having ischemic conditions (i.e.MIT-BIH
Normal-Sinus Rhythm Database (NSRDB), European ST-T
Database (EDB), MIT-BIH ST Change Database (STDB) &
Long-Term ST Database (LTSTDB))for the detection of R-peak
& HRV analysis. The pre-processing is done by MAF and DWT
to remove the baseline drift and noise induced in the ECG
signal. The mean/average of HR is calculated for each set of
databases and in case of EDB it is of 57 BPM (subjected to
bradycardia). The Probability with normal distribution is
analyzed by comparing the NSRDB data with the ischemic data sets. The performance of this algorithm is found to be 98.5%.
Introduction to Machine Learning Unit-3 for II MECH
TBC Algorithm to Detect R-Peak and HRV Analysis for Ischemia Heart Disease
1. TBC Algorithm to Detect R-Peak and HRV
Analysis for Ischemia Heart Disease
Akash Kumar Bhoi, Karma Sonam Sherpa, Sushant Konar
Abstract- Heart Rate Variability (HRV) analysis is the
ability to assess overall cardiac health and the state of the
autonomic nervous system (ANS), responsible for regulating
cardiac activity. ST-change due to ischemia and their HRV
analysis have not been well discussed in the previous works.
The proposed simple and time efficient TBC algorithm has
been tested in four sets of standard databases with selected
patient’s data having ischemic conditions (i.e.MIT-BIH
Normal-Sinus Rhythm Database (NSRDB), European ST-T
Database (EDB), MIT-BIH ST Change Database (STDB) &
Long-Term ST Database (LTSTDB))for the detection of R-peak
& HRV analysis. The pre-processing is done by MAF and DWT
to remove the baseline drift and noise induced in the ECG
signal. The mean/average of HR is calculated for each set of
databases and in case of EDB it is of 57 BPM (subjected to
bradycardia). The Probability with normal distribution is
analyzed by comparing the NSRDB data with the ischemic data
sets. The performance of this algorithm is found to be 98.5%.
Index Terms- Biomedical signal processing, Medical signal
detection, Electrocardiography, Diseases, Databases.
I. INTRODUCTION
Heart Rate Variability (HRV) is the physiological
phenomenon of variation in the time interval between
heartbeats. It is measured by the variation in the beat-to-beat
interval i.e. "cycle length variability", "RR variability" and
"heart period variability".
Akash Kumar Bhoi is with the Applied Electronics & Instrumentation
Engineering Department, Sikkim Manipal Institute of Technology (SMIT),
India (email: akash730@gmail.com)
Karma Sonam Sherpa is with the Electrical &Electronics Engineering
Department, Sikkim Manipal Institute of Technology (SMIT), India (email:
karmasherpa23@gmail.com)
Sushant Konar is with the Applied Electronics & Instrumentation
Engineering Department, Sikkim Manipal Institute of Technology (SMIT),
India (email: sushantkonar91@gmail.com)
The association between mortality and total, ULF, and
VLF power remained significant and strong, whereas, LF
and HF power were only moderately strongly associated
with mortality. The tendency for VLF power to be more
strongly associated with arrhythmic death than with all-cause
or cardiac death was still evident after adjusting for the five
covariates. Adding measures of HRV to previously known
predictors of risk after myocardial infarction identifies small
subgroups with a 2.5-year mortality risk of approximately
50% (Circulation 1992;85:164-171) [12].Heart rate
variability (HRV) is widely used for quantifying neural
cardiac control, [1] and low variability is particularly
predictive of death in patients after myocardial infarction
[10]. Reduced short-term LFP during controlled breathing is
a powerful predictor of sudden death in patients with CHF
that is independent of many other variables [11].
Reduced HRV has been shown to be a predictor of
mortality after myocardial infarction [3, 4] although others
have shown that the information in HRV relevant to acute
myocardial infarction survival is fully contained in the mean
heart rate[5]. Heart rate variability analysis has become
an important tool in cardiology, because its measurements
are non-invasive and easy to perform, have relatively good
reproducibility and provide prognostic information on
patients with heart disease. HRV has proved to be a valuable
tool to investigate the sympathetic and parasympathetic
function of the ANS, especially in diabetic and
postinfarction patients[13].In the field of psycho-physiology,
HRV is related to emotional arousal and high-frequency
(HF) activity has been found to decrease under conditions of
acute time pressure and emotional strain[6] and elevated
state anxiety[7], presumably related to focused attention and
motor inhibition. HRV has been shown to be reduced in
individuals reporting a greater frequency and duration of
daily worry[8]. In individuals with post-traumatic stress
disorder (PTSD), HRV and its HF component is reduced
compared to controls whilst the low-frequency (LF)
component is elevated. Furthermore, unlike controls, PTSD
patients demonstrated no LF or HF reactivity to recalling a
traumatic event[9]. Both HR and ischemia at higher HRs
contribute to VCG ST elevation. Established ST ischemia
detection concerning HR levels is suboptimal, and further
attention to the effects of HR on ST segments is needed
toimprove electrocardiographic ischemia criteria [14]. Time-
Frequency Method based Heart Rate Variability Analysis of
Ischemic and Heart Rate Related ST-segment Deviation was
described by Wang Xing et al. [15]. The variability of the
International Conference on Communication and Signal Processing, April 3-5, 2014, India
978-1-4799-3357-0
Adhiparasakthi Engineering College, Melmaruvathur
917
2. heart beat measured from RR intervals during the exercise
stress test [16]. Andreas Voss et al. in [17]; long-and short
term HRV indices from frequency domain and particularly
from nonlinear dynamics revealed high univariate
significances (p<0.01) discriminating between IHFLR and
IHFHR.The heart rate is calculated using the extracted features
of the ECG signal and calculated HR value can be analysed for
the detection of various cardiovascular abnormalities [26].
In this paper a simple Threshold Beat Counting (TBC)
algorithm is proposed for the analysis of HRV for different
sets of ischemic Patient’s signals. The presented work
mostly focused on the efficient way of detection of R-peak
by this method and the HR calculation for ischemic signals.
This algorithm is performed on the selected signals from
standard databases (i.e.MIT-BIH NSRDB, MIT-BIH STDB,
EDBand LTSTDB). The MAA and DWT achieved good
results for baseline wanders & noise removal during pre-
processing of signals.
II. METHODOLOGY
This is really a challenging move to implement this
method for calculating heart rate from Ischemic Patient’s
databases.The proposed work is basically divided into three
parts; generating an ischemic database, Pre-processing i.e.
baseline drift & noise removal and HR calculation by
detecting R-peak (Fig.1.).
Fig.1. Block diagram of the proposed methodology.
A. Formation of Database
Data were taken from Physiobank [18], which maintains a
large online repository of various physiological signals,
including ECG signals. The databases used from Physiobank
were the European ST-T Database (EDB) [19]; MIT-BIH ST
Change Database, Long-Term ST Database and MIT-BIH
Normal-Sinus Rhythm Database were taken for comparison
&evaluation purpose [20]. Bipolar leads &signals with
positive polarity of QRS complex are selected. Total 67 data
were collected and implemented with the proposed
algorithm.
B. Baseline Drift Removal by Moving Average Filter
It can be used as a low-pass filter to attenuate the noise
inherent in many types of waveforms, or as a high-pass filter
to eliminate a drifting baseline from a higher frequency
signal. The procedure used by the algorithm to determine the
amount of filtering involves the use of a smoothing factor.
The algorithm accomplishes a moving average by taking
two or more of these data points from the acquired
waveform, adding them, dividing their sum by the total
number of data points added, replacing the first data point of
the waveform with the average just computed, and repeating
the steps with the second, third, and so on data points until
the end of the data is reached. The result (Fig.2.) is a second
or generated waveform consisting of the averaged data and
having the same number of points as the original waveform
[21].
This equation can be further generalized. The moving
average of a waveform can be calculated as:
( ) = 1/s y(n) (1)
( )
where, a = averaged value n = data point position,s =
smoothing factor and y = actual data point value.
The span must be odd.
The data point to be smoothed must be at the center
of the span.
The span is adjusted for data points that cannot
accommodate the specified number of neighbors on
either side.
The end points are not smoothed because a span
cannot be defined[22].
C. Noise Cancellation by Discrete wavelet transform
The discrete wavelet transform (DWT) uses filter banks
for the construction of the multi-resolution time-frequency
plane.
Filter banks
A filter bank consists of filters which separate a signal into
frequency bands [24]. A discrete time signal x(k) enters the
analysis bank and is filtered by the filters L(z) and H(z)
which separate the frequency content of the input signal in
frequency bands of equal width. The filters L (z) and H (z)
are therefore respectively a low-pass and a high-pass filter.
The output of the filters each contains half the frequency
content, but an equal amount of samples as the input signal.
The two outputs together contain the same frequency content
as the input signal; however the amount of data is doubled.
Therefore, down sampling by a factor two, denoted by ↓ 2, is
applied to the outputs of the filters in the analysis bank [23].
Reconstruction of the original signal is possible using the
synthesis filter bank [24]. In the synthesis bank the signals
are up sampled (↑2) and passed through the filters L'(z) and
H'(z) [2]. The implemented soft & hard
thresholdingisperformed using “ddencmp” & “wdencmp”
function for 1D ECG signal using ‘db4’ wavelet. The
918
3. performance is evaluated in the following section (i.e. result
& analysis).
D. Threshold Beat Counting (TBC) Algorithm
The proposed thresholding based beat counting is simple
and efficient algorithm which is briefly described below;
Step 1: Determining the threshold value (T) of the ECG
signal:
of the ECG Signal.
Step2: R-Peak detection of ECG signal:
(Let, x= sample value of R-peak)
Then, detect x, if
x − 1 < > + 1 &x >
Step 3: Heart Rate Calculation:
(a)Duration = Length ofECG signal/Sampling Rate
(b) HR or BPM= No. of R-Peaks Detected/
Duration
The sampling rates of MIT-BIH Normal-sinus rhythm
database (MIT-BIH NRSDB) ECG signals are of 128HZ, for
European ST-T Database (EDB) is of 250 Hz, for MIT-BIH
ST Change Database (STDB) is of 360Hz and 250Hz for
Long-term ST database (LTSTDB).
III. RESULTS & ANALYSIS
The baseline wanders and noise are significantly removed
during the pre-processing steps. The developed TBC
algorithm has been showing promising results in detecting
R-peak & calculating the Heart rate from normal and
ischemic patient’s data (Fig.2.).
Fig.2. Results for data ‘s20101m’ of LTSTDB showing HR=66.
TABLE I describes the HR which are calculated by TBC
algorithm for the standard databases.
TABLE I
CALCULATED HR OF SELECTED SUBJECTS FROM NRSDB AND
STDB
NRSDB age/
sex
HR STDB lead HR lead HR
16265m 32 M 96 301m ECG1 60 ECG2 60
16272m 20 F 60 302m ECG1 60 ECG2 60
16273m 28 F 96 303m ECG1 114 ECG2 96
16420m 38 F 90 304m ECG1 54 ECG2 60
16483m 42 M 96 307m ECG1 54 ECG2 72
16539m 35 F 78 309m ECG1 84 ECG2 84
16773m 26 M 72 310m ECG1 90 ECG2 90
16786m 32 F 72 311m ECG1 78 ECG2 96
16795m 20 F 66 313m ECG1 78 ECG2 78
17052m 45 F 66 314m ECG1 60
17453m 32 F 78 316m ECG1 114
18177m 26 F 108 317m ECG1 66
18184m 34 F 72 324m ECG1 66 ECG2 66
Mean= 80.7 325m ECG1 72
Mean= 74 BPM
TABLE II
CALCULATED HR OF SELECTED SUBJECTS FROM EDB
The NSRDB database includes 13 ECG recording ranging
from 20 to 42 age groups and the mean/average heart rate
calculated is 80 BPM (TABLE I). The STDB database
includes 24 ECG recordings of varying lengths; most of the
recorded signals were during exercise which exhibit transient
ST depression. The last two records i.e.324 & 325exhibit ST
elevation. NRSDB presented in Table. I show mean HR of
74 BPM.
EDB clinical note :
diagnoses
lead HR lead HR
e0103 #Mixed angina V4 60
e0104 myocardial
nfarction
MLIII 72 V4 72
e0105 myocardial
infarction
MLIII 54 V4 54
e0106 #Mixed angina
#2-vessel
disease (LAD,
LCX)
V4 54
e0107 #Mixed angina
#1-vessel
disease (LCX)
V4 54
e0108 myocardial
infarction
V4 54 MLIII 54
e0111 #Mixed angina
#1-vessel disease
(LAD)
MLIII 60 V4 60
e0112 #Mixed angina MLIII 36
e0113 #Mixed angina
#3-vessel disease
MLIII 60 V4 60
Mean = 57 BPM
919
4. TABLE III
CALCULATED HR OF SELECTED SUBJECTS FROM LTSTDB
LTSTDB clinical note :
diagnoses
lead HR lead HR
s20011m No coronary
artery disease
ML2 66 MV2 66
s20021m Prinzmetal's
angina
MLIII
66
V4
66
s20031m Coronary
artery disease,
Previous
myocardial
infarction
ECG 66 ECG 66
s20041m Coronary
artery disease
ECG 60 ECG 54
s20061m Syncope ML2 84
s20071m Syncope
Pregnant
ML2 84
s20081m Palpitations ML2 72
s20091m Palpitations
Pregnant
ML2 102
s20101m Coronary
artery disease,
Angina,
Hypertension
ML2 66 MV2 102
s20111m Coronary
artery disease
ML2 84
s20121m 3-vessel
coronary
artery disease
ML2 54
Mean= 72 BPM
24 ECG recordings with the clinical notes are listed from
EDB (TABLE II) to evaluate TBC algorithm where,bipolar
& chest leads ECG signals are selected.The mean HR found
to be 57 BPM which is subjected to bradycardia.16 ECG
data from LTSTDB is derived, most of which belong to
cardiac dysfunctions and the mean HR is calculated as 72
BPM (Table III).
Fig.3. Probalility plot with normal distribution of four databases
The HR of all databases is included in the probability plot
with normal distribution, where the MIT-BIH NRSDB is
considered as standard for comparing the HR with others.
This method of computing probability plots (Fig.3.) is that
the intercept and slope estimates of the fitted line are in fact
estimates for the location and scale parameters of the
distribution of normal sinus data vs. the patient’s (ischemic
conditions) data.
To analyze and discuss the detection performance of this
algorithm, four sets of ECG data coming from LTSTDB,
EDB, MIT-BIH NRSDB &MIT-BIH STDB are calculated
by means of the performance formula defined in [25],
modified in this paper as:
P =
∑ S − (∑ M + ∑F)
∑S
× 100% (2)
where, ΣS is the total number of HR detect (i.e. 67), ΣM is
the number of missing HR detection (i.e. 0), and ΣF is the
number of false detection of HR (i.e. 1, for ‘e0112’). The
Performance value ‘P’ is found to be of 98.5%.
IV. CONCLUSION
This analysis can help to identify patients at increased risk
for sudden death who could benefit from more aggressive
anti-ischemic therapy. The applied algorithm is tested with
MIT-BIH NSRDB, EDB, MIT-BIH STDBand LTSTDB.
This method is independent of the ST-change effect on the
ECG signal which results in accurate R-peaks detection and
HR calculation. The performance of this algorithm is
calculated as 98.5%. Probability with normal distribution of
NRSDB is compared with the other four ischemic databases.
The further research involves in real-time based beat
detection for all kinds of ischemic and arrhythmic patient’s
signals.
REFERENCES
[1] Task Force of the European Society of Cardiology and the North
American Society of Pacing and Electrophysiology. Heart rate
variability: standards of measurement, physiological
interpretation and clinical use. Circulation. 1996;93:1043–1065.
[2] M.G.E. Schneiders. Wavelets in control engineering.Master’s
thesis, Eindhoven University of Technology, August
2001.DCT nr. 2001.38.
[3] Bigger JT Jr, Fleiss JL, Steinman RC, Rolnitzky LM, Kleiger
RE, Rottman JN. (1992). "Frequency domain measures of heart
period variability and mortality after myocardial
infarction".Circulation.85 (1):164–171.doi:10.1161/01.CIR.85.1.164.
PMID 1728446.
[4] Kleiger RE, Miller JP, Bigger JT Jr, Moss AJ. (1987).
"Decreased heart rate variability and its association with
increased mortality after acute myocardial infarction".Am J Cardiol.
59 (4): 256–262. doi:10.1016/0002-9149(87)90795-8.PMID 3812275.
[5] Abildstrom SZ, Jensen BT, Agner E et al. (2003). "Heart rate
versus heart rate variability in risk prediction after myocardial
infarction".Journal of Cardiovascular Electrophysiology 14 (2):
168–73. doi:10.1046/j.1540-8167.2003.02367.x. PMID 12693499.
[6] Nickel, P.; F. Nachreiner (2003). "Sensitivity and Diagnosticity of
the 0.1-Hz Component of Heart Rate Variability as an Indicator of
Mental Workload".Human Factors 45 (4): 575–590.
doi:10.1518/hfes.45.4.575.27094. PMID 15055455.
[7] A b Jönsson, P. (2007). "Respiratory sinus arrhythmia as a function
of state anxiety in healthy individuals". International Journal of
Psychophysiology 63(1):48–54. doi:10.1016/j.ijpsycho.2006.08.002.
PMID 16989914.
[8] Brosschot, J.F.; E. Van Dijk, J.F. Thayer (2007). "Daily worry is
related to low heart rate variability during waking and the
920
5. subsequent nocturnal sleep period". International Journal of
Psychophysiology 63(1):39–47.doi:10.1016/j.ijpsycho.2006.07.016.
PMID 17020787.
[9] Hagit, C.; et al. (1998). "Analysis of heart rate variability in
posttraumatic stress disorder patients in response to a trauma-related
reminder".Biological Psychiatry 44 (10): 1054–1059.
doi:10.1016/S0006-3223(97)00475-7. PMID 9821570.
[10] La Rovere MT, Bigger JT, Marcus FI, et al. Baroreflex sensitivity
andheart rate variability in prediction of total cardiac mortality
after myocardialinfarction. Lancet. 1998;351:478–484.
[11] Maria Teresa La Rovere et al. Short-Term Heart Rate Variability
Strongly Predicts Sudden Cardiac Death in Chronic Heart Failure
Patients, Circulation. 2003;107:565-570; originally published
online January 13, 2003.
[12] J. Thomas Bigger Jr. et al. Frequency Domain Measures of Heart
Period Variability and Mortality After Myocardial Infarction,
Circulation. 1992;85:164-171, doi: 10.1161/01.CIR.85.1.164
[13] U.RajendraAcharya et al. Heart rate variability: a review,
Published online: 17 November 2006_ International Federation
for Medical and Biological Engineering 2006
[14] S. HAGGMARK et al. Contributions of myocardial ischemia and
heart rate to STsegment changes in patients with or without coronary
artery disease, ActaAnaesthesiolScand 2008; 52: 219–228.
[15] Wang Xing et al. Heart Rate Variability Analysis of Ischemic and
Heart Rate Related ST-segment Deviation Episodes Based on
Time-frequency Method published in Noninvasive Functional
Source Imaging of the Brain and Heart and the International
Conference on Functional Biomedical Imaging, 2007. NFSI-ICFBI
2007
[16] Camillo Cammarota et al. Trend and variability of the heart beat
RR intervals during the exercise stress test. Proceedings of the 6th
Esgco 2010, April 12-14, 2010, Berlin, Germany
[17] Andreas Voss et al. Short-term vs .long-term heart rate variability
in ischemic cardio myopathy risk stratification, published: 13
December2013 doi: 10.3389/fphys.2013.00364
[18] A. L. Goldberger, L. A. N. Amaral, L. Glass, J. M. Hausdorff,P. C.
Ivanov, R. G. Mark, J. E. Mietus, G. B. Moody, C.-K. Peng, and H.
E. Stanley, “Physiobank, physiotoolkit, and physionet :Components of
a new research resource for complex physiologic signals,”
Circulation, vol. 101, no. 23, pp. e215–e220, 2000.
[19] A. Taddei, G. Distante, M. Emdin, P. Pisani, G. B. Moody, C.
Zeelenberg, and C. Marchesi, “The europeanst-t database:standard
for evaluating systems for the analysis of st-t changes in
ambulatory electrocardiography,”European Heart Journal, vol. 13,
no. 9, pp. 1164–1172, 1992.
[20] Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, IvanovPCh,
Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE.
PhysioBank, PhysioToolkit, and PhysioNet: Components of a New
Research Resource for Complex Physiologic Signals. Circulati
101(23):e215-e22, 2000 (June 13).
[21] Akash Kumar Bhoi et al. A Significant Approach to Detect Heart
Rate in ECG Signal, International Journal of Advanced Electrical
and Electronics Engineering, (IJAEEE), ISSN (Print): 2278-8948,
Volume-1, Issue-1, 2012
[22] Manpreet Kaur et al. Comparison of Different Approaches for
Removal of Baseline Wander from ECG Signal, 2nd International
Conference and workshop on Emerging Trends in Technology
(ICWET) 2011 Proceedings published by International Journal of
Computer Applications® (IJCA)
[23] R.J.E. Merry Wavelet Theory and Applications A literature study,
Eindhoven, June 7, 2005.
[24] G.Strang and T. Nguyen. Wavelets and Filter Banks.Wellesley-
Cambridge Press, secondedition, 1997. ISBN 0-9614088-7-1.
[25] S.Azevedo, and R.L. Longini, “Abdominal-lead fetal
electrocardiographic R-wave enhancement for heartrate
determination”, IEEE Trans. Biomedical Engineering, Vol. 27, No. 5,
255-260, 1980.
[26] Goutam Kumar Sahoo et al. ECG signal analysis for detection of
Heart Rate and Ischemic Episodes. International Journal of Advanced
Computer Research (ISSN (print): 2249-7277 ISSN (online): 2277-
7970) Volume-3 Number-1 Issue-8 March-2013
921