J. Biomedical Science and Engineering, 2011, 4, 699-706
doi:10.4236/jbise.2011.411087 Published Online November 2011 (http://www.SciRP.org/journal/jbise/
JBiSE
).
Published Online November 2011 in SciRes. http://www.scirp.org/journal/JBiSE
Early detection of sudden cardiac death by using classical
linear techniques and time-frequency methods on
electrocardiogram signals
Elias Ebrahimzadeh, Mohammad Pooyan
Department of Biomedical Engineering, Shahed University, Tehran, Iran.
Email: ebrahimzadeh@shahed.ac.ir
Received 27 July 2011; revised 9 October, 2011; accepted 24 October 2011.
ABSTRACT
Early detection of sudden cardiac death may be used
for surviving the life of cardiac patients. In this paper
we have investigated an algorithm to detect and pre-
dict sudden cardiac death, by processing of heart rate
variability signal through the classical and time-fre-
quency methods. At first, one minute of ECG signals,
just before the cardiac death event are extracted and
used to compute heart rate variability (HRV) signal.
Five features in time domain and four features in
frequency domain are extracted from the HRV signal
and used as classical linear features. Then the Wigner
Ville transform is applied to the HRV signal, and 11
extra features in the time-frequency (TF) domain are
obtained. In order to improve the performance of
classification, the principal component analysis (PCA)
is applied to the obtained features vector. Finally a
neural network classifier is applied to the reduced
features. The obtained results show that the TF me-
thod can classify normal and SCD subjects, more
efficiently than the classical methods. A MIT-BIH
ECG database was used to evaluate the proposed
method. The proposed method was implemented us-
ing MLP classifier and had 74.36% and 99.16% cor-
rect detection rate (accuracy) for classical features
and TF method, respectively. Also, the accuracy of
the KNN classifier were 73.87% and 96.04%.
Keywords: Sudden Cardiac Death; Heart Rate Variabil-
ity; Time-Frequency Transform; Electrocardiogram Sig-
nal; Linear Processing
1. INTRODUCTION
Sudden Cardiac Death (SCD), which is a result of a pre-
cipitous loss of heart function, is leading cause of car-
diovascular mortality in modern socialites. This is a very
serious cardiac event that it will deprive patient’s life
within several minutes [1,2]. When this occurs, no blood
can be pumped to the rest of the body within minutes in
a person with known or unknown cardiac disease. It is
responsible for an estimation of 400,000 deaths per year
in the United States and millions of deaths worldwide.
Only 1% - 2% of patients can survive when SCD occurs
outside of a hospital [3]. Astonishingly, the victim may
not even have been diagnosed with heart disease. Also,
the time and mode of death happen unexpectedly [4].
These life threatening arrhythmias that indicate SCD are
most often initiated with a sustained ventricular tach-
yarrhythmia, including ventricular tachycardia (VT), ven-
tricular flutter (VFL), or ventricular fibrillation (VFib). A
smaller percentage of SCD events are related to a pri-
mary brady arrhythmia [5]. SCD may abruptly strike any
person if he or she possesses of high risk heart disease,
even young person, and athlete. Besides utilizing public
access defibrillation (PAD) procedure to recue impend-
ing death patient while fell down, the better way is to
prevent onset SCD by adopting medical aid prior to fell
down. Thus, is it possible to make an early warning,
even before crisis presenting half an hour [6].
Ichimaru et al. found that the respiratory peak of the
heart rate variability (HRV) in SCD patient was disap-
peared during the night time one-week before death [7].
Van Hoogenhuyze, D., Martin, et al. observed two HRV
measurements, standard deviation of mean of sinus R-R
intervals (SDANN) and mean of SD (SD), from 24 hrs
HRV. They have evidences to show that HRV is low in
patients who experience SCD, and is high in young
healthy subjects [8]. However, the relationship between
short-term HRV and SCD is unknown. In addition, re-
polarization alternans phenomena provides a safe, non-
invasive maker for the risk of SCD, and has proven
equally effective to an invasive and more expensive
procedure—invasive electrophysiological study (EPS),
which is commonly used by cardiac electrophysiologies
[9,10].
E. Ebrahimzadeh et al. / J. Biomedical Science and Engineering 4 (2011) 699-706
700
Analysis of heart rate variability (HRV) has provided
a non invasive method for assessing cardiac autonomic
control [11]. In this article an algorithm was presented to
predicting SCD by using heart rate variability signal. In
this algorithm, after preprocessing of ECG signal and
HRV extraction, some common features on time domain
and frequency domain are extracted. After that, time-
frequency transformation is done on the HRV signal and
some other features are produced and then PCA is done
on features to reduce the features dimension. Multilayer
perceptron (MLP) neural network and K-Nearest Nei-
ghbor (KNN) neural network are used to classify healthy
person and the person who susceptible to heart death. In
Figure 1 Summary of the algorithm is shown.
2. MATERIAL AND METHODS
The proposed method is evaluated on a database con-
taining 35 patients with sudden cardiac death (including
16 female and 19 male, and with a sampling rate of 256
Hz) and 35 normal people (including 17 female and 18
male, and with a sampling rate of 128 Hz). This open
access database is prepared by MIT-BIH database with
the title of Sudden Cardiac Death Holter database &
Normal Sinus Rhythm database.
In cases that for each observation (patient), two chan-
nels were in access, each channel is used as a observa-
tion (patient).
Preprocessing
The dataset consists of 24-hour ECG recordings (Holter)
before event of hearth death and several seconds after
that. Patients who show signs of a previous heart attack
or having the hard tachyarrhythmia are susceptible for
SCD, and finally they catch SCD. One-minute and two-
minute of ECG recordings just before SCD are used and
named First minute and Second minute, respectively.
Figure 2 shows an Electrocardiogram signal of a 34
years old patient that can lead to sudden cardiac death.
Before occurring of SCD, there is no difference be-
tween the ECG signal for person who is susceptible of
heart death and the ECG signal of normal persons. In
Figure 3, a sample of ECG signal of a person with SCD,
several seconds before occurrence of SCD and a few
seconds after it, is shown.
One minute before the occurrence of the sudden car-
diac death was selected as ECG recordings for patients.
For normal subjects one minute of the ECG signal was
selected at random. Then, the Pan-Tompkins [12] algo-
rithm was used to detect the QRS-complexes in the
ECG-signal from which we could determine the RR-
intervals and HRV signal. So the preprocessed HRV
signal is ready to extract features from it. In the Figures
4 and 5 HRV and ECG signal of a healthy subject and a
SCD one are shown.
3. CLASSICAL FEATURE ANALYSIS
In this step some usual linear features in time domain
and frequency domain are extracted. These features, in-
clude 5 features in the time domain and 4 features in the
frequency domain.
3.1. T ime-D omain Feature
Statistical time-domain measures were divided into two
classes:
Direct measurements of NN intervals;
Measurements from the differences between NN in-
tervals.
3.1.1. Direct Measurements of NN Intervals
These features include two simple time domain variables
that can be calculated by:
1) Mean of all NN intervals (MNN).

1
m
RRRR i
N
(1)
F
igure 1. Flowchart of proposed algorithm.
C
opyright © 2011 SciRes. JBiSE
E. Ebrahimzadeh et al. / J. Biomedical Science and Engineering 4 (2011) 699-706
Copyright © 2011 SciRes.
701
Figure 2. The ECG signal of SCD patient, from 2 minute before SCD event and several seconds after that.
Figure 3. ECG signal of person on the moment of hearth death.
2) Standard deviation of all NN intervals (SDNN).
 

2
1
RMSSD 1RR iRR i
N

(3)


2
1
SDNN m
RR iRR
N

(2) 2) The standard deviation of differences between ad-
jacent NN intervals (SDSD).
which reflects all the cyclic components responsible for
variability in the period.
 

2
1
1
SDSD n
dif dif
iRR RR
N

(4)


3.1.2. Measurements from the Differences between
NN Intervals
1
dif
RRRR iRRi (5)
The most commonly used measures derived from inter-
val differences include:

 

11
dif
RRRR iRRi
N

(6)
1) The square root of the mean of the sum of the
squares of differences between adjacent NN Intervals
(RMSSD).
3) The proportion derived by dividing the number of
interval differences of NN intervals greater than 50 ms
JBiSE
E. Ebrahimzadeh et al. / J. Biomedical Science and Engineering 4 (2011) 699-706
702
(a)
(b)
Figure 4. (a) One minute of the ECG signal of a healthy per-
son; (b) The HRV signal which was extracted from (a).
by the total number of NN intervals (PNN50) [13].
 



150msRRiRR itotalRR dif

 

(7)
3.2. Frequency Domain Features
Although the time domain parameters are computation-
ally effective but they lack the ability to discriminate
between the sympathetic and parasympathetic contents
of the RR intervals. It is generally accepted that the
spectral power in the high frequency (HF) band (0.15 -
0.4 Hz) of the RR intervals reflects the respiratory sinus
arrhythmia (RSA) and thus cardiac vagal activity. On the
other hand, the low frequency (LF) band (0.04 - 0.15
Hz), is related to the baroreceptor control and is medi-
ated by both vagal and sympathetic systems [14]. In this
work, the LF, HF, VLF and ratio of the LF and HF
bands power (LF/HF) is used as the frequency domain
features of the RR interval signal [15].
The power spectral density (PSD) which is shown in
Figure 6, was computed with Burg parametric method.
(a)
(b)
Figure 5. (a) One minute the ECG signal of a patient just be-
fore occurrence of SCD; (b) The HRV signal which was ex-
tracted from part (a).
Spatial scattering of two of these features is shown in
Figure 7. As seen in this figure, theses features are suit-
able for discriminating between the two groups; healthy
and SCD.
4. TIME-FREQUENCY DOMAIN
ANALYSIS
An approach to analyze non stationary HRV signal, is
time-frequency (TF) methods. This can be divided into
three main categories: nonparametric linear TF methods
based on linear filtering, including the short-time Fourier
transform [16,17] and the wavelet transform [18,19],
nonparametric quadratic TF representations, including
the Wigner-Ville distribution and its filtered versions
[20-23], and parametric time-varying methods based on
autoregressive models with time-varying coefficients
[24-26]. In this paper the Smoothed Pseudo Wigner-
Ville distribution (SPWVD) is preferred since it pro-
vides better time frequency resolution than nonparametric
C
opyright © 2011 SciRes. JBiSE
E. Ebrahimzadeh et al. / J. Biomedical Science and Engineering 4 (2011) 699-706 703
(a)
(b)
Figure 6. (a) Extracted HRV signal; (b) PSD of HRV signal,
power in each frequency band was indicated.
Figure 7. Spatial distribution of mean (in horizontal axis) and
LF/HF (in vertical axis).
linear methods, an independent control of time and fre-
quency filtering, and power estimates with lower vari-
ance than parametric methods when rapid changes occur
[21]. The main drawback of the SPWVD is the presence
of cross-terms, which should be suppressed by the time
and frequency filtering. The SPWVD of the discrete
signal x(n) is defined by [22].
 
 
2
1
1
12π/
1
2, 2
,e
N
kN
M
j
km N
x
pM
Xnm hk
gprn pk
 
 
(8)
where n and m are the discrete time and frequency in-
dexes, respectively, h(k) is the frequency smoothing
symmetric normed window of length 2N 1, g(p) is the
time smoothing symmetric normed window of length
2M 1 and rx (n, k) is the instantaneous autocorrelation
function, defined as

,
x
rnk xnkxnk
 (9)
Figure 8 shows the result of applying Wigner Ville
transform to the HRV signal.
TF Features Extraction
Each HRV signal is divided into 5 segments of equal
length, each segment is approximately 15 seconds in time
domain. The average energy of each segment was com-
puted. The features are:
MAX w: maximum amount of energy in each win-
dow.
MIN w: minimum amount of energy in each window.
DIF w: difference between maximum and minimum
amount of energy between windows.
STD w: standard deviation between energy of time
windows.
The obtained signal in TF domain is also divided into
three frequency segments.
Figure 8. Wigner Ville transform of the HRV signal of a SCD
person.
C
opyright © 2011 SciRes. JBiSE
E. Ebrahimzadeh et al. / J. Biomedical Science and Engineering 4 (2011) 699-706
704
Evlf: the complex of energy signal in very low fre-
quency band (0.003 - 0.04) Hz, divided by length of
band (0.037)
Elf: the complex of energy signal in low frequency
band (0.04 - 0.15) Hz, divided by length of band (0.11)
Ehf: the complex of energy signal on high frequency
band (0.15 - 0.4) Hz, divided by length of band (0.25).
Fvlf: the average of energy signal in very low fre-
quency band (0.04 - 0.003) Hz.
Flf: the average of energy signal in low frequency
band (0.04 - 0.15) Hz.
Fhf: the average of energy signal in high frequency
band (0.15 - 0.4) Hz.
Also, we have defined the first order derivative as a
feature to show the difference between adjacent win-
dows. This derivative is the difference between the av-
erage energy in subsequent windows. This derivative for
the first window (first 15 S) was computed by the dif-
ference between this window and the last 15 seconds in
the second minute. So the first order derivative feature is
computed as below
1difn n
WWW
 (10)
The result of features survey in time span of 15 sec-
onds illustrate that in SCD person the features changes
from one window to next window is much more promi-
nent so we define the first order derivative.
5. FEATURE DIMENSION REDUCTION
In order to reduce the dimensionality of input features,
and to select the discriminating features, and to have
better classification performance, and reduce the learning
time, the principal components analysis (PCA) is used.
The goal of the use of PCA, is finding a transform matrix
to maximize the between class distribution and minimize
the interclass distribution [23].
The obtained features from classical method (9 fea-
tures) and TF domain (11 features) were reduced to 7
and 8 features, respectively, by using PCA technique.
6. NEURAL NETWORK CLASSIFIER
Multilayer perceptron (MLP) and K-Nearest Neighbor
(KNN) are employed to classify the one minute ECG
signals of Normal and sudden cardiac death patients.
The mentioned features of one minute ECG signals, just
before SCD, are extracted and compared to the normal
ones through the MLP and KNN methods.
The classifier is constructed using a three-layer MLP
consisting of an input layer, a hidden layer and an output
layer. The input layer has a number of nodes equal to the
input vector length. The output layer consists of one
node, accounting for a possibility of only 2 classes to be
classified. Also, the number of nodes in the hidden layer
is 2. Both input and output nodes use linear transfer
functions, and the hidden layer uses a sigmoid function.
The epochs in the data set were randomly divided into
two sets: a Training Set and a Testing Set. 70% of the
epochs are used to train the MLP while 30% were used
to test the performance of the classifier. This process was
done for 100 times to reach the average accuracy. The
same process was done for KNN classifier. The MLP
was trained using the Backpropagation strategy, and the
termination criteria are the completion of 2000 training
epochs or reaching a mean square error level of 0.01 for
the training data set.
7. RESULT
The performance of the proposed method is evaluated
with one minute ECG recordings just before SCD. The
obtained results are shown in Table 1. As it is seen in
Table 1, by using MLP classifier, the predictive accu-
racy is 99.16%. However, the predictive accuracy of
classical method is 74.36%. Also, the predictive accu-
racy of time-frequency method and classical method
using KNN classifier are reached 96.04% and 73.87%
respectively. The results of classification by means of
MLP and KNN, via classical and TF methods for Two-
minute analysis in Table 2 are shown. Wang et al. [5]
used 2-minute (just before SCD) of the same dataset to
predict SCD. Table 3 shows the results of our method
and Wang’s method. As it is seen, the predictive accu-
racy has been improved from 67.44% to 91.23%.
The results of this research illustrates that in the elec-
trocardiogram signal of a SCD patient, there are features
Table 1. The results of classification by means of MLP and
KNN, via classical and TF methods (one-minute analysis).
Average Classification Rate One minute
Classic Time-Frequency
Method
No PCA PCA No PCA PCA
MLP 72.83% 74.36% 95.74% 99.16%
KNN 71.47% 73.87% 92.76% 96.04%
Table 2. The results of classification by means of MLP and
KNN, via classical and TF methods (Two-minute analysis).
Average Classification Rate two minute
Classic Time-Frequency
Method
No PCA PCA No PCA PCA
MLP 68.54% 72.38% 86.16% 91.23%
KNN 67.82% 69.35% 84.56% 89.27%
C
opyright © 2011 SciRes. JBiSE
E. Ebrahimzadeh et al. / J. Biomedical Science and Engineering 4 (2011) 699-706 705
Table 3. Predictive accuracy for the proposed method and
Wang’s method [5] (2-minute analysis).
Comparison Methods (using MLP)
Ref [5] Our Methods
67.44% 91.23%
that have explicit difference with healthy person’s fea-
tures. Although these differences could not be detected by
means of simple methods, but the time-frequency (TF)
method has far more ability to detect these differences.
These results show that by TF method one can predict
the sudden cardiac death, even 2 minutes before SCD
occurrence.
REFERENCES
[1] Lin, J., et al. (2002) A few evidence in patient’s ECG
shown high risk existed inducing syncope or SCD.
Journal of Electrocardiolog, 21, 95-198.
[2] Chen, X. (2000) The patient with high risk of sudden
cardiac death, The Chinese Journal of Arrhythmia, 4,
307-308.
[3] Smith, W.M. (1997) Cardiac Defibrillation. IEEE-EMBC
and CMBEC, Montreal, 20-23 September 1997, 249-250.
[4] Jones, J.L. and Tovar, O.H. (1996) The Mechanism of
Defibrillation and Cardioversion. Proceedings of the
IEEE, 84, 392-403. doi:10.1109/5.486742
[5] Shen, T.W., Shen, H.P, Lin, C. and Ou, Y. (2007) Detec-
tion and prediction of Sudden Cardiac Death (SCD) for
personal healthcare. 29th Annual International Confer-
ence of the IEEE, Buenos Aires, 22-26 August 2007,
2575-2578.
[6] Fang, Z., Lai, D., Ge, X. and Wu, X. (2009) Successive
ECG telemetry monitoring for preventing sudden cardiac
death. IEEE Engineering in Medicine and Biology Soci-
ety, 1738-1741.
[7] Ichimaru, Y., et al, (1988) Circadian changes of heart rate
variability. Proceedings of Computers in Cardiology,
Washington, DC, 25-28 September 1988, 315-318.
[8] VanHoogenhuyze, D., Martin, G., et al., (1998) Spectrum
of heart rate variability. Proceedings of Computers in
Cardiology, Chigaco, 13-16 September 1998, 65.
[9] Mrowka, R., Theres, H., et al., (1998) Alternans-like
phenomena due to filtering of electrocardiographic data.
Proceedings of Computers in Cardiology, Chigaco, 13-16
September 1998, 725-727.
[10] Meeting Report, (2006) Non-invasive test to predict
sudden cardiac death proven effective. American Heart
Association (AHA).
http://www.heart.org/presenter,jhtml:identifier=3043452.
[11] Acharya, R., Kumar, A., Bhat, S., Lim, M., Lyengar, S.,
Kannathal, N. and Krishnan, S. M. (2004) Classification
of cardiac abnormalities using heart rate signals. IEEE
Engineering in Medicine and Biology Magazine, 42, 288-
293.
[12] Pan, J. and Tompkins, W.J. (1985) A real time QRS de-
tection algorithm. IEEE Transaction on Biomedical En-
gineering, 32, 230-236. doi:10.1109/TBME.1985.325532
[13] Obayya, M. and Chadi, F.A. (2008) Data fusion for heart
diseases classification using multi-layer feed forward
neural Network, ICCES 2008 International Conference
on Computer Engineering & Systems, Cairo, 25-27 No-
vember 2008, 67-70.
[14] Heart rate variability: Standards of measurements,
physiological interpretation, and clinical use. Task force
of the European society of cardiology and the North
American society of pacing and electrophysiology, Cir-
culation, 93, 354-381.
[15] Mohebbi, M. and Ghassemian, H. (2008) Detection of
atrial fibrillation episodes using SVM. Conference Pro-
ceedings of the International Conference of IEEE Engi-
neering in Medicine and Biology Society, 2008, 177-180.
[16] Martinmäki, K., Rusko, H., Saalasti, S. and Kettunen, J.
(2006) Ability of short-time Fourier transform method to
detect transient changes invagal effects on hearts: A
pharmacological blocking study. American Journal of
Physiology, Heart and Circulatory Physiology, 290,
H2582-H2589. doi:10.1152/ajpheart.00058.2005
[17] Keselbrener, L. and Akselrod, S. (1996) Selective dis-
crete Fourier transform algorithm for time-frequency
analysis: method and application on simulated and car-
diovascular signals. IEEE Transactions on Biomedical
Engineering, 43, 789-802. doi:10.1109/10.508542
[18] Toledo, E., Gurevitz, O., Hod, H., Eldar, M. and Ak-
selrod, S. (2003) Wavelet analysis of instantaneous heart
rate: A study of autonomic control during thrombolysis.
American Journal of Physiology: Regulatory, Integrative
and Comparative Physiology, 284, R1079-R1091.
[19] Clari, F. Vallverdd, M., Baranowski, R., Chonowska, L.,
Martinez, P. and Caminal, P. (2000) Time-frequency rep-
resentation of the HRV: A tool to characterize sudden
cardiac death in hypertrophy cardiomyopathy patients.
Proceedings of the 22nd Annual International Confer-
ence of the IEEE, 1, 71-73.
[20] Novak P. and Novak, V. (1993) Time/frequency mapping
of the heart rate, blood pressure and respiratory signals.
Medical and Biological Engineering and Computing, 31,
103-110. doi:10.1007/BF02446667
[21] Pola, S., Macerata, A., Emdin, M. and Marchesi, C.
(1996) Estimation of the power spectral density in
non-stationary cardiovascular time series: Assessing the
role of the time-frequency representations (TFR). IEEE
Transactions on Biomedical Engineering, 43, 46-59.
doi:10.1109/10.477700
[22] Mainardi, L.T., Montano, N. and Cerutti, S. (2004)
Automatic decomposition of Wigner distribution and its
application to heart rate variability. Methods of Informa-
tion in Medicine, 43, 17-21.
[23] Jasson, S., Medigue, C., Maison-Blanche, P., Montano,
N., Meyer, L., Vermeiren, C., Mansier, P., Coumel, P.,
Malliani, A. and Swynghedauw, B. (1997) Instant power
spectrum analysis of heart rate variability during or-
thostatic tilt using a time-frequency-domain method.
Circulation. 96, 3521-3526.
[24] Bianchi, A.M., Mainardi, L.T., Meloni, C., Chierchia, S.
and Cerutti, S. (1997) “Continuousmonitoring of the
sympathovagal balance through spectral analysis. Recur-
sive autoregressive techniques for tracking transient
events in heart rate signals. IEEE Engineering in Medi-
C
opyright © 2011 SciRes. JBiSE
E. Ebrahimzadeh et al. / J. Biomedical Science and Engineering 4 (2011) 699-706
Copyright © 2011 SciRes.
706
JBiSE
cine and Biology Magazine, 16, 64-73.
doi:10.1109/51.620497
[25] Martin, W. and Flandrin, P. (1985) Wigner-Ville spectral
analysis of nonstationary processes. IEEE Transactions
on Acoustics, Speech and Signal Processing, 33, 1461-
1470. doi:10.1109/TASSP.1985.1164760
[26] Baudat, G. and Anouar, F. (2000) Generalized discrimi-
nant analysis using a kernel approach. Neural Computa-
tion, 12, 2385-2404. doi:10.1162/089976600300014980