ECG Arrhythmia Classification Using
Simple Reconstructed Phase Space Approach
AS Al-Fahoum1, AM Qasaimeh2
1
Biomedical Centre of Excellence, Yarmouk University, Irbid 21163, Jordan
2
Jordan University of Science and Technology, Irbid, Jordan
important tool in ICU and CCU that enables online
Abstract monitoring of the cardiac activities that require special
ECG arrhythmias such as ventricular and atrial algorithms for detection and prediction [2]. There are
arrhythmias are one of the common causes of death. several methods used to detect cardiac arrhythmia
These abnormalities of the heart activity may cause an depending on heart rate variability [3], spectral analysis,
immediate death or cause a damage of the heart. In this time-frequency distribution [2], [4-6], and nonlinear
paper, an arrhythmia classification algorithm is signal processing techniques [3], [7-11]
presented. The proposed method uses the nonlinear R Acharya, et al. [3] presents a classification algorithm
dynamical signal processing techniques to analyze the of heart arrhythmias depending on the heart rate
ECG signal in time domain. The classification algorithm variability (HRV) signals. Linear and nonlinear
is based upon the distribution of the attractor in the parameters are calculated to differentiate the different
reconstructed phase space (RPS). The behavior of the types of arrhythmias; the linear parameters are estimated
ECG signal in the reconstructed phase space is used to in the time domain and frequency domain; the nonlinear
determine the classification features of the whole parameters also are calculated to specify correlation
classifier. To evaluate the performance of the presented dimension (CD), largest Lyapunov exponent (LLE) and
classification algorithm, data sets are selected from the approximation entropy (ApEn). Also the phase space
MIT database. Two groups of data, learning and testing plots are obtained to differentiate the different types of
datasets, are used to design and test the proposed arrhythmias from the shape (behavior) of the phase space.
algorithm. A classification sensitivity and specificity of L. Khadra, et al.[2] present a high order spectral analysis
100% are used to fine tune the parameters of the selected algorithm to classify different types of heart arrhythmias
features using the learning dataset. Forty five signals are such as AF, VT and VF. The method used was bispectral
used to test the proposed approach resulting in 85.7- analysis technique. F.M.Roberts, et al. [7] obtain the
100% sensitivity and 86.7-100% specificity are obtained reconstructed phase space for using the ECG leads II and
respectively. VI by plotting them against each other for four different
types of arrhythmias using 100 features extracted from
1. Introduction the RPS and used as input to artificial neural network
THE ELECTROCARDIOGRAM (ECG) is the graphical (ANN) classifiers. R.J.Povinelli, et al.[8] use the
representation of the electrical activity generated by the reconstructed phase space for different types of
heart [1]. The first stage of the heart beat begins when the arrhythmias by using ECG leads II and VI for different
sino-atrial node (SA) depolarizes. SA node, located in the segment time intervals from 0.5 -3.0 seconds using 101
right atrium, is the pacemaker of the heart, depolarizing in features (attractors) extracted from the reconstructed
regular time interval to ensure proper pacing. Then the phase space. R.J.Povinelli, et al. [9] use distribution
electrical signal moves rapidly through the heart muscle models as statistical representations over multi-
with normal rhythmicity. If the electrical system of the dimensional reconstructed phase space both
heart does not properly function, the hart's rhythm nonparametric distributions based on binning and
becomes abnormal due to the firing in the SA node or the occurrence counts and parametric distributions based on
transmission of the signal throughout the heart muscle. Gaussian Mixture Model (GMM) are used. F. M. Roberts,
These abnormalities can be monitored using changes in et al. [10] filter different types of heart arrhythmias into
the ECG recording whether in its behavior or rate. four sub-bands: 0.5-5, 5-10, 10-20 and 20-32 Hz. A phase
Reconstructed phase space can easily differentiate these space is constructed with embedding dimension of three
behavior differences depending on the signal distribution. and a time lag of 20. R. J. Povinelli , et al. [11] use the
Quantitative classification of cardiac arrhythmia is an phase space to classify four different ECG rhythms by
ISSN 0276−6547 757 Computers in Cardiology 2006;33:757−760.
using the global false nearest-neighbor technique to available at PhysioNet website [12]. Different datasets are
calculate RPS dimension and build Gaussian Mixture selected, each dataset represents different type of heart
Models (GMM) for each signal class from the arrhythmia; MIT-BIH Normal Sinus Rhythm Database
reconstructed phase spaceType the introduction here. (NSRDB) for normal sinus rhythm, CU Ventricular
Tachyarrhythmia Database (CUDB) for ventricular
2. Methods tachycardia, AF Termination Challenge Database
This work is dealing with classification problem of (AFTDB) and MIT-BIH Atrial Fibrillation Database
four different types of heart arrhythmias; normal sinus (AFDB) for atrial fibrillation, and MIT-BIH Malignant
rhythm (NSR), atrial fibrillation (AF), ventricular Ventricular Ectopy Database (VFDB) for ventricular
fibrillation (VF) and ventricular tachycardia (VT), fibrillation arrhythmia. In order to create a database for
depending on their distribution in the reconstructed phase the classifier implemented in this research, the records are
space. In previous work [7]-[11], as mentioned above, the divides into two groups:
RPS was used in cardiac arrhythmias classification, at Group I (learning set) contains 40 records, these
least 100 features were extracted from the RPS to records are divided into four categories, each category has
distingue each rhythm, while only three classification 10 records which represents one type of heart arrhythmia.
parameters are used in this proposed classification Each record has 5 seconds time duration. This group of
algorithm. data is used for building the classifier.
A two–dimensional phase space plot may explain the Group II (test set) contains 45 records; 14 records for
structure which is hidden in the dynamics. In such a plot normal sinus rhythm (NSR), 15 records for atrial
each data point is plotted versus the value sampled at a fibrillation (AF), 8 records for ventricular tachycardia
chosen fixed time delay earlier. The formal basis of this (VT) and 8 records for ventricular fibrillation (VF). This
simple tool lies in the concept of phase space dataset is used for testing the classification process.
reconstruction. Each point in the RPS is calculated as
follows The proposed algorithm uses small segments of
waveform, each waveform consists of 5 seconds tracing.
xn =[xn−(d−1)τ ..... xn−τ xn ] A 250 Hz sampling frequency is used for all the datasets,
so the data is re-sampled to 250 Hz. From the nature of
For n = (1 + ( d − 1)τ ).....N the ECG signals coming from different individuals and
Where N is the dimension of the time series, τ is the different recording periods for the same individuals, it is
delay time and d is the embedding dimension. Then the obvious that these signals have different amplitudes and
entire phase space is generated by base lines. These variations are due to the muscle artifacts
x1 ⋯ x1+( d −1)τ
and the power line interferences. In order to correct these
x ⋯ x2+(d −1)τ
effects, the data must be adjusted to have standard
x1+τ statistical parameters. The mean of the signal is calculated
X=
and subtracted so that the signal is zero meaned. Next, the
x2+τ
⋮ ⋮
2 signal is divided by the standard deviation to give a unit
⋱ variance.
xN −(d −1)τ xN 2.1.2. Phase space reconstruction
xN −(d −2)τ ⋯
To reconstruct the phase space for the data, the time
lag and the embedding dimension should be determined.
In phase space reconstruction, different time The time lag can be determined by using the first
series fill different subset in the phase space; this subset is minimum of the automutual information function method,
called an attractor. In other words, there are different the first zero crossing of the autocorrelation [13], or
patterns or trajectories in the RPS that are produced by empirically to obtain maximum classification accuracy.
the trajectory matrix, these different geometrical The dimension can be selected using the false nearest
distributions are used to characterize different time series neighbors, Cao’s method [14], or empirically. To
in the RPS. reconstruct the phase space for the ECG signals the
2.1. Analysis of ECG signal following steps are performed
The first minimum of the automutual information
function is calculated for each time series.
2.1.1. Data and pre-processing A histogram of the calculated time lags is drawn, and
The datasets are chosen from MIT-database which is the peak value is chosen as the time lag.
An embedding dimension of 2 is chosen empirically to
758
achieve maximum classification accuracy. The classification algorithm is tested using different
A two-dimensional RPS is plotted for all arrhythmias embedding dimension, lag time and different signal
using the obtained time lag. duration. For different time lag it concludes that the over
The set shows three peaks at 19, 21 and 22. Therefore, all accuracy of the classification algorithm remains
a time lag of 19 is chosen. approximately constant over the region with time lag of
9-19 units, which is 91.1%. This behavior is obtained
2.1.3. Features extraction because the attractors in the reconstructed phase space
Features extracted from the reconstructed phase space reserve there dynamical behavior in this region, while the
are depending on the distribution of the data in the phase overall accuracy below and above this range is
space to follow the transmission of the ECG signal in the decreasing.
heart muscle, in other words, these features are depending The results for time duration less than and equal to 5
on the geometric structure of the attractor in the seconds show that the sensitivity and specificity increase
reconstructed phase space. Three boxes are chosen in the while increasing the signal duration, however, in some
RPS to extract such features as follows: types of arrhythmias sensitivity and specificity remain
Three distinguished boxes (a, b and c) are determined constant regardless of the time duration which indicates
depending on data density distribution in the phase space, that the classification process do not completely depend
where on the time duration of the classified signal. This result
a is the box in the RPS centered at zero with –0.5 and indicates that the nonlinear dynamical characteristics of
0.5 edges, the ECG signal do not completely lost when reducing the
b is the box in the RPS bounded by time duration. This conclusion goes in line with what was
{ X ≤ −1.2,−0.5 ≤ X + τ ≤ 0 } obtained in [8]. Table 2 shows the sensitivity and
specificity for the test dataset versus different signal
and duration. The results of the classification accuracy for test
c is the box bounded by { X + τ ≤ −0.2 } data versus the embedding dimension show that the
The percentages of the number of points bounded by overall accuracy remains constant for embedding
the three areas (P(a),P(b), and P(c)) are calculated with dimension of 2 to 6 which is 91.1%. Using other values
respect to the whole number of points in the RPS. will decrease the obtained accuracy. It can be concluded
A classification rules are generated depending upon that the reconstructed phase space is to be topologically
the distribution of the arrhythmias bounded by these equivalent to the original state space of the system when
boxes. the embedding dimension is suitable, in our experiments
The reconstructed phase spaces were initially dimension of 2-6 seems suitable.
created for the learning dataset. Each type of ECG
arrhythmia is found to occupy a distinguished geometrical 4. Discussion and conclusions
distribution in the RPSDescribe your methods here. The method presented in this paper deals with the
3. Results nonlinear dynamical behavior of the ECG arrhythmias,
which is used to identify the cardiac arrhythmias. The
Figure 1 shows the overall classification algorithm method used here is different from the previous
based on the selected threshold values of the predefined approaches that used the reconstructed phase space in
classification parameters. The threshold values of arrhythmias classification which used many classification
31.27%, 0.63% and 54.22% for P(a), P(b) and P(c) parameters [7-11]. Since heartbeats depend on other
respectively are chosen for the whole classification bodily events such as hormone and chemical levels, it can
process. The false positive (FP) is defined as the number be modeled as a nonlinear system. The nonlinearity in the
of misclassified signals, and the false negative (FN) is the behavior of such a system can be captured by the RPS
number of signals that are classified as a part of group that contains state variables and relationships between
when they are not. Sensitivity is defined as the ability of state variables that provide greater differentiability across
the classifier to classify a certain signal as being a part of classes than the original state variable by itself [2, 9].
the group it actually belongs to. Specificity refers to the Comparison between different methods that were used
ability of the classifier to correctly rule out signals that do in cardiac arrhythmia classifications and the proposed
not belong to the group [2]. Table 1 shows the results of approach shows that the sensitivity and specificity for the
the sensitivity and specificity of the classification proposed algorithm are within the range of 85.7-100%
algorithm using data in group II which contains 45 and 86.7-100% respectively. These results outperform
waveforms. While for the learning data the sensitivity and those results that are provided in [7-8]. The classification
specificity were 100%. accuracy is 100% for VF arrhythmia which is the most
dangerous type among other arrhythmias. Other research
759
groups achieved a 100% accuracy only for the normal reconstructed phase spaces. IEEE Transactions On
case, and the classification accuracy provided by other Knowledge And Data Engineering 2004; 16: 779-783.
researchers for classifying VF arrhythmia were 91.7% [12] The research resource for complex physiologic signals,
[2], 96.5% [9], 88% [8] and 95.1% [7]. PhysioNet. From the Web site www.physionet.org
[13] Kantz H. and Schrreiber T., Non Linear time series
The simplicity of the algorithm can be helpful for the analysis. Cambridge: Cambridge University Press 1997.
real time implementation of the classification algorithm to [14] Cao L., Practical method for determining the minimum
decrease the time needed both in classification itself and embedding dimension of a scalar time series. Physica D
in providing the suitable therapy to the patients. Future 1997; 110: 43-50
work is needed to increase the classification accuracy of [15] Frye S. J., Cardiac Rhythm Disorders: An introduction
the proposed algorithm; this may be done by combining using the nursing process. Williams & Wilkins 1988,
this method with other classification methods. Baltimore, MD, USA
Acknowledgements
Authors would like to thank Yarmouk University for
its continuous support.
References
[1] Grauer K. and Curry R., clinical Electrocardiography: A
primary care approach. Blackwell Scientific
Publication,1992, Boston, USA
[2] Khadra L., Al-Fahoum A., and Binajjaj S., A Quantitative
Analysis Approach for Cardiac Arrhythmia Classification
Using Higher Order Spectral Techniques. IEEE
Transactions on Biomedical Engineering 2005; 45: 1878-
1885.
[3] Acharya R.U., Kannathal N. and Krishnan S.M.,
Comprehensive analysis of cardiac health using heart rate
signals. Physiol.Meas.2004;25: 1139-1151
[4] Addison P.S., Watson J.N., Clegg G.R., Holzer M., Sterz
Fig. 1 The overall classification algorithm
F., Robertson C.E. , Evaluating arrhythmias in ECG signals
using wavelet transforms. IEEE Engineering In Medicine
And Biology September/October 2000: 104-109.
[5] Sun Y., Chan K. and Krishnan S., Life-threatening
ventricular arrhythmia recognition by nonlinear descriptor. Table 1: Sensitivity and specificity of the classification
BioMedical Engineering OnLine 2005; 4:1-11. algorithm for the test group
[6] Afonso V. and Tompkins W., Detecting Ventricular
Fibrillation. IEEE Engineering In Medicine And Biology Sensitivity
1995; 14: 152-159. FP FN % Specificity %
[7] Roberts F., Povinelli R. and Ropella K., Identification of NSR 2 1 85.7 92.9
ECG Arrhythmias using phase space reconstruction.
AF 1 2 93.3 86.7
Proceedings of principles and practice of knowledge
discovery in database (PKDD'01) 2001; Freibureg , VT 1 0 87.5 100
Germany, 411-423.
[8] Povinelli R., Roberts F., Johnson M., and Ropella K, Are VF 0 1 100 87.5
nonlinear ventricular arrhythmia characteristics lost as Table 2: Sensitivity and specificity of the classification
signal duration decreases? Computers in Cardiology 2002
algorithm versus signal duration (test dataset)
;29: 221-224
[9] Povinelli R., Johnson M., Lindgren A., Roberts F. and Ye Duration (s) Sensitivity % Specificity %
J., Statistical Models of Reconstructed Phase Space for
signal classification. IEEE Transactions on Signal 1 57.1-100 73.3-100
processing 2006; 54:2178-2186. 2 50-100 66.7-92.9
[10] Roberts F., Povinelli R. and Ropella K., Rhythm 3 64.3-100 75-92.9
classification using reconstructed phase space of signal
4 71.4-100 75-92.9
frequency sub-bands. Computers in Cardiology 2003; 30:
61-64
[11] Povinelli R., Johnson M., Lindgren A. and Ye J., Time
Amjed Al-Fahoum, Hijjawi Faculty for Eng. Technol., Yarmouk
series classification using Gaussian mixture models of
University, Irbid 21163, Jordan. (afahoum@yu.edu.jo)
760