Automated external defibrillators (AEDs) are
portable devices assigned to appropriate and real-time diagnosis
of two fatal dysrhythmias including, ventricular fibrillation and
rapid ventricular tachycardia; these are often associated with
sudden cardiac arrest. In this paper, a novel time-domain based
algorithm has been proposed for AEDs. The algorithm could
measure the heart rate and duration of the QRS Complex using
the critical points of electrocardiogram (ECG) to classify the
arrhythmias. This algorithm was tested with a large amount of
annotated data under equal conditions. The complete MIT-BIH
arrhythmia database, MIT-BIH normal sinus rhythm database,
MIT-BIH malignant database, and CU database were used as
the test data. The results obtained by the proposed algorithm
showed the sensitivity of 95.87%, the specificity of 99.00%, and
the accuracy of 98.78% in the single diagnose mode (SDM),
where the final decision was based on the last diagnose. On
the triple diagnose mode (TDM), where the final decision was
based on the last three consecutive diagnoses, the sensitivity of
94.50%, the specificity of 99.33%, and the accuracy of 99.07%
were obtained. In addition, the algorithm ensured the safety
of normal sinus rhythm cases with the specificity of 99.967%
and 99.997% in SDM and TDM, respectively. Furthermore, the
performance of the algorithm was calculated and plotted point
by point for different values. The proposed work was, therefore,
successfully implemented on ARM Cortex-M3 and evaluated
using test databases. Thus, this work could be well-suited for realtime
implementation in the AEDs and ECG monitoring devices
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Real-Time Detection of Fatal Ventricular Dysrhythmias for Automated External Defibrillators Using the Critical Point-Based Approach
1. 1
Real-Time Detection of Fatal Ventricular
Dysrhythmias for Automated External Defibrillators
Using the Critical Point-Based Approach
Ehsan Izadi, Rassoul Amirfattahi, Saeed Nasr, Omid Ahmadi
Abstract—Automated external defibrillators (AEDs) are
portable devices assigned to appropriate and real-time diagnosis
of two fatal dysrhythmias including, ventricular fibrillation and
rapid ventricular tachycardia; these are often associated with
sudden cardiac arrest. In this paper, a novel time-domain based
algorithm has been proposed for AEDs. The algorithm could
measure the heart rate and duration of the QRS Complex using
the critical points of electrocardiogram (ECG) to classify the
arrhythmias. This algorithm was tested with a large amount of
annotated data under equal conditions. The complete MIT-BIH
arrhythmia database, MIT-BIH normal sinus rhythm database,
MIT-BIH malignant database, and CU database were used as
the test data. The results obtained by the proposed algorithm
showed the sensitivity of 95.87%, the specificity of 99.00%, and
the accuracy of 98.78% in the single diagnose mode (SDM),
where the final decision was based on the last diagnose. On
the triple diagnose mode (TDM), where the final decision was
based on the last three consecutive diagnoses, the sensitivity of
94.50%, the specificity of 99.33%, and the accuracy of 99.07%
were obtained. In addition, the algorithm ensured the safety
of normal sinus rhythm cases with the specificity of 99.967%
and 99.997% in SDM and TDM, respectively. Furthermore, the
performance of the algorithm was calculated and plotted point
by point for different values. The proposed work was, therefore,
successfully implemented on ARM Cortex-M3 and evaluated
using test databases. Thus, this work could be well-suited for real-
time implementation in the AEDs and ECG monitoring devices.
Index Terms—electrocardiogram (ECG) database, ventricular
fibrillation (VF) detection, ventricular tachycardia (VT) detec-
tion, QRS complex detection and measurement, heart rate (HR)
measurement.
I. INTRODUCTION
IN recent years, considerable work has been focused on
surviving patients arrested by ventricular dysrhythmias.
Ventricular fibrillation (VF) and rapid ventricular tachycardia
(VT) are two fatal ventricular dysrhythmias which are the
main cause of sudden cardiac arrest (SCA) [1], [2]. According
to the 2010 American heart association's (AHA) guideline
for emergency cardiovascular care and automated external
defibrillator (AED) [3], the only in-execution way to save
life in patients with VT/VF arrhythmias is early defibrillation
Ehsan Izadi and Rassoul Amirfattahi are with the Department of Electrical
and Computer Engineering, Isfahan University of Technology, Isfahan 84156-
83111, Iran (e-mail: e.izadi@ec.iut.ac.ir & fattahi@cc.iut.ac.ir).
Saeed Nasr is with the Department of Electrical and Computer Engineering,
university of applied science (HTW) Berlin, Wilhelminenhof, NR. 75A,
12459, Berlin, Germany (e-mail: saeed.nasr@student.htw-berlin.de).
Omid Ahmadi is with the Department of Emergency Medicine, Isfahan Uni-
versity of Medical Sciences, Isfahan, Iran (e-mail: o ahmadi@med.mui.ac.ir).
through delivering the high amplitude/current impulse to the
heart immediately. Detection of fatal VT/VF arrhythmias and
shock delivery can be vital and must, in fact, take place rapidly
[3], [4].
Automated external defibrillators are portable devices which
analyze electrocardiograph (ECG) signals without the assess-
ment of the expert medical personnel; they are capable of
delivering shock to the patient's heart. Success of in-time
defibrillation depends mainly on the real-time response of the
AED algorithm. This real-time responding is authentic when
the accuracy of the algorithm is trustworthy too [5].
A wide variety of methods have been proposed for detecting
VT/VF; these include time-domain and frequency-domain
techniques. Time-domain analysis is such as Hilbert transform
[6], [7] and phase space reconstruction [8], which construct a
2D Phase-Space diagram and differentiate sinus rhythm from
VF, cross correlation analysis [4], [9] examining the similarity
of the ECG segment and templates, and also threshold crossing
sample count (TCSC) [10] which is based on an important fea-
ture of VF signal relying on the random behavior of the heart
vector. Time-frequency analysis such as wavelet transform
[11]-[13], shows good performance, however, leads to high
computational demands. Compared to the AHA performance
goal recommendation for AED arrhythmia analysis algorithms
[14], to specify sensitivity (Se) and specificity (Sp) for various
arrhythmias, all methods introduced above showed insufficient
performance in the application of AEDs.
Recently, the proposed machine learning approach presented
in [15] employed 14 VF metrics based on a review of the for-
mer published documents in feature extraction. Support vector
machine with a Gaussian radial basis function kernel was used
for classification. In [16], the same technique was used to
build a life threatening arrhythmias detector by combining 13
ECG parameters and using feature selection (FS) and SVM
learning algorithms. In [17], they decomposed the ECG signal
into 5 band-limited intrinsic modes (BLIMs) by using the
variational mode decomposition (VMD) algorithm. Then, the
random forest (RF) classifier was used for the classification
of VT/VF arrhythmias. In [18], to overcome the drawback
of VMD on parameter setting, an adaptive-VMD algorithm
was used to decompose the ECG signal into 5 BLIMs. Then,
a boosted classification and regression tree (Boosted-CART)
classifier that combined feature selection and recognition was
used to detect VT/VF arrhythmias.
In this paper, a new algorithm is proposed based on time-
domain analysis, which can distinguish VT/VF arrhythmias
2. 2
inevitably and guarantee the safety of the patient who is not the
victim of SCA. In the application of AEDs, the specificity is
more important than the sensitivity because if an unnecessary
shock is delivered to the patient due to an analysis error,
inevitable damages to the patient's heart can occur [19], [20].
This convinced us to pay more attention to specificity rather
than sensitivity.
The rest of the paper is organized as follows: section II
describes the dataset used to evaluate the performance of the
algorithm and the preprocessing stage used to eliminate noise.
Section III expands the new time-domain algorithm. In Section
IV, the performance of the proposed algorithm is evaluated and
compared with the exiting methods. Also, a brief explanation
of implementation procedure is presented. The discussion and
limitation are presented in section V. Finally, in Section VI,
the presented work is concluded.
II. DATA AND PREPROCESSING
A. Data Collection
We used the MIT-BIH arrhythmia database (MITDB)
[21], the MIT-BIH normal sinus rhythm database (NSRDB)
[22], the MIT-BIH malignant ventricular arrhythmia database
(VFDB) [23], and the creighton university ventricular tach-
yarrhythmia database (CUDB) [24] under equal conditions
with no significant arrhythmia in this study. The MITDB
included 48 records of 30 min two-channel ECG signals at
360 Hz. The NSRDB comprised 18 records of 24 hours two
channel ECG signals at 128 Hz. The VFDB contained 22
records of 35 min two-channel ECG signals at 250 Hz, and
the CUDB consisted of 35 Holter records of about 8 min
single channel ECG signals with the sampling rate of 250
Hz. Only the whole records of CUDB and the first channel of
MITDB, NSRDB and VFDB were used in this work to avoid
the redundancy of samples during the feature extraction [16].
The NSRDB was used only to evaluate the performance of
the algorithm in categorizing normal sinus rhythm (NSR) as
non-VF arrhythmias. Since there was no accurate annotation
for CUDB and also VT cases were not all fatal, the VT/VF
segments were annotated by an experienced cardiologist.
We categorized the whole dataset into the VF type, which
included ventricular flutter (VFL), ventricular fibrillation (VF),
and rapid ventricular tachycardia (VT); and the non-VF type
included the other possible dysrhythmias, which in case of oc-
currence, delivering electrical shock to the patient's heart is not
allowed. The quality parameters were obtained by comparing
the VF/non-VF decisions suggested by the algorithm with the
annotated decisions proposed by expert cardiologists.
Since AEDs must be real-time, the algorithm decision has
to be taken as soon as possible; however, the accuracy of the
algorithm has to be satisfactory. So we made the analysis based
on 5-second continuous intervals which is the least possible
interval for VT/VF detection [3], with 333 milliseconds steps
(93.3% overlap), leading to 440517 decisions. Therefore, our
new algorithm proved to be well-suited for real-time analysis,
reaching an appropriate balance between detection time and
accuracy.
B. Data Preprocessing
The MIT-BIH arrhythmia and NSR databases were resam-
pled to the sampling rate of 250Hz. Signal preprocessing was
accomplished in four successive stages. First, the mean value
of the signal was subtracted from the signal. Second, a high-
pass filter with 1-Hz cut off frequency was applied in order to
suppress the residual baseline wander. Then, a second-order
30 Hz Butterworth low-pass filter removed the high frequency
noises. At the last step, a notch filter eliminated power line
interferences. The filter selected could accurately reduce the
influence of noisy components without producing aliasing and
deforming the signal shape [25].
Fig. 1. Flowchart of the proposed algorithm.
III. THE PROPOSED METHOD
The flowchart of the method proposed for the real-time
detection of fatal ventricular dysrhythmias in an automated
external defibrillator is given in Fig. 1. At the feature extraction
stage, first, the heart rate (HR) is measured based on R-
R intervals (Fig. 2a). Then , all the QRS complexes are
located and measured. In the arrhythmia classification, an
arrhythmia is considered as VF type if it has some HR higher
than 150 bpm and a mean of pulse width (PW), i.e., the
pulse containing R wave (QRS complex) or fibrillatory wave
in ventricular fibrillation (Fig. 2c), greater than 120 ms. To
enhance the specificity of the algorithm , in addition to the
single diagnose mode (SDM), there is a triple diagnose mode
3. 3
(a) (b) (c)
Fig. 2. The red squares indicate the critical points of ECG episodes. (a) The R-R interval and duration of QRS complex are shown in NSR episode, (b) VT
episode and (c) VF episode.
(TDM) classifying an arrhythmia as VF type if at least three
consecutive diagnoses consider it as VF type. In this paper,
all the red squares shown in Fig. 2 are called the critical
points of the ECG signal. The heart rate and QRS complex
measurement techniques are represented in subsections A
and B , respectively. The classification procedure is briefly
described in the subsection C.
A. Heart Rate Measurement
As mentioned before, the critical points of ECGs are local
extrema. In order to locate the extremum points of ECGs,
the slope of signal was used based on the difference of two
consecutive samples. The change in the signal slope from
the positive one to the negative one provides a maximum
point; while from the negative one to the positive one yields
a minimum point.
Owing to the fact that there is only one maximum point be-
tween two consecutive minima, and only one minimum point
between two consecutive maxima, the peak of the downward
concavity waveform was located by means of the nearby local
minimum points, and the upward concavity waveform was
obtained by considering the nearby local maximum points.
Defining a specific threshold τ could help us to remove the
irrelevant extrema. As shown in Fig. 3, sample B is considered
as a maximum point if it satisfies the following conditions:
Fig. 3. Locating the maximum point B by using the two nearby minimum
points I and J, as well as using the two nearby maximum points B and D to
locate the minimum point J. Threshold τ is used in (1) to perform this task.
NSR episode.
1) It must fulfill (1), where VI, VB, and VJ refer to the
amplitude of the samples I, B, and J respectively.
2) It must have the largest amplitude in the I-J interval.
Min(|VB − VI|, |VB − VJ |) ≥ τ (1)
To consider the sample J as a minimum point, the same
conditions must be satisfied.
In order to locate the R wave peak, two nearby local minimum
points were used; in most cases, they are Q and S wave peaks.
To make the algorithm independent of the database, the least
distance of R wave peaks from the nearby minimum points
(LDP) was normalized by means of the maximum absolute
value of the signal episode (β). This dependency came out with
the quick detection of VF to non-VF arrhythmias transition,
due to the low amplitude of VF, as compared to non-VF
arrhythmias. The study of this normalized value for R and T
waveforms in a variety of ECG episodes resulted in a probabil-
ity density function leading us to nominate a proper threshold
τR for locating the R wave peaks (Fig. 4). Threshold τR was
defined, as brought below, to provide the best performance for
the algorithm (Table I):
τR = 0.40 × β (2)
The extremum points were located based on τR; then, the
Fig. 4. Probability histogram of LDP/β for R and T waves. gap gap gap gap
gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap
gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap gap
gap gap gap gap gap gap gap gap.
4. 4
(a) (b)
Fig. 5. The located critical points of the ECG episode using (1) with the thresholds τR (red squares) and τC (green triangles). (a) NSR episode, and (b) VF
episode.
maximum points could be stored in the array RP , where the
length was 1250, representing the value and location of R wave
peaks. The extremum locating procedure is presented in the
Algorithm 1.
Algorithm 1: Extrema Locating Procedure
1) Initialize: [Amin, Amax] = S(1), S is the ECG array, A
is the amplitude of extrema; [Maxfound, Minfound] = 0;
P = zeros(1, 1250), P is the array of located peaks;
L = 0, L is the ECG sample address;
2) Searching for the extrema satisfying the conditions
While L < 1250
a) Repeat
* L = L + 1;
* Calculating the signal slope;
Until signal slope is changed
b) determining that S(L) is maximum
(Maxfound = 1) or minimum (Minfound = 1)
c) If Maxfound == 1
* Amax = S(L);
* Store the previous located minimum in the array P;
Else if Minfound == 1
* Amin = S(L);
* Store the previous located maximum in the array P;
End if
End while
Fig. 5 illustrates the located extremum points of NSR
and VF episodes using (1) with the threshold τR. Different
techniques have been proposed for HR measurement [26]-[30],
however, in this work we measured HR based on the R wave
peaks located by using the introduced technique. Therefore,
since they were available in the array RP , the heart rate could
be calculated as follows:
HR(bpm) =
60 × Fs
RP
(3)
, where RP represents the mean value of R-R intervals in the
ECG episode and FS is the sampling frequency.
B. QRS Complex Detection
The QRS complex, which represents ventricular depolar-
ization, contains significant information of ECG; so analyzing
this complex is very essential in diagnosing ventricular dys-
rhythmias [31], [32]. In normal sinus rhythm, the location of
Q and S waves, which both contain local minimum points,
specifies the location of QRS complex. The nearby local
maximum points, usually R and T wave peaks, were deployed
to locate the Q and S wave peaks. The least distance of Q
wave peaks from the nearby minimum points was normalized
using β. Also, the study of this normalized value in a variety
of ECG episodes provided a probability density function to
help us to nominate a proper threshold τC for locating the
QRS complexes (Fig. 6). Threshold τC was defined as follows
which proved itself to be the most appropriate one after the
thorough study (Fig. 8a):
τC = 0.08 × β (4)
The extremum points which located based on threshold τC
will be placed into the array CQRS which is 1250 in length.
Since τR > τC , the array RP is a subset of the array CQRS.
So, the array CQRS consists of Q, S and also, R wave peaks.
Fig. 5 also illustrates the located extremum points of NSR and
VF episodes using (1) with the threshold τC.
Fig. 6. Probability histogram of LDP/β for Q wave.
5. 5
(a)
(b)
(c)
Fig. 7. The process of locating the QRS complex in NSR. (a) Location of non-zero samples in the array RP . (b) Location of non-zero samples in the array
CQRS. (c) Located QRS Complexes in the NSR episode. Red squares show the samples which had the same location and values in both arrays RP and
CQRS.
Duration of the QRS complex in NSR is measured from the
beginning of the Q wave to the end of the S wave [2]. However,
in this study, in order to minimize the error of fatal arrhythmia
detection, the duration was measured from the Q wave peak
to the S wave peak, as both are local minimum points.
Using threshold τC in (1) resulted in no local extremum points
in Q-R and R-S intervals. So the first local minimum point
before R wave peak was the Q wave peak, and the first local
minimum point after it was the S wave peak.
To locate these points, we compared the arrays RP (Fig. 7a)
and CQRS (Fig. 7b). The non-zero components which had the
same values and locations in both arrays showed the location
of R wave peaks in the ECG episode. Therefore, the first non-
zero component before each R wave peak in the array CQRS
showed the location of the Q wave peak and the first non-zero
component after each R wave peak represented the location of
the S wave peak. Fig. 7 illustrates the method of locating the
QRS complex by using arrays RP and CQRS.
Duration of each QRS complex (DC) in the ECG episode
could be calculated as follows; it is stored in the array PW:
DC =
N + M
Fs
(msec) (5)
, where N and M are Q-R and R-S intervals, respectively. Since
in some arrhythmias, such as junctional tachycardia, algorithm
may locate the Q wave peak wrongly, QRS Complex relative
symmetry and also, covariance of arrays RP and CQRS were
used as the features to reduce error.
C. Arrhythmia Classification
The heart rate in ventricular dysrhythmias is usually rapid,
being 100 to 250 beats per minute, and the QRS complex
is wide and bizarre, usually with an increased amplitude and
a duration longer than 120 milliseconds. Treatment for the
patient with a detectable pulse depends on whether his con-
dition is stable or unstable. Unstable patients generally have
heart rates greater than 150 beats per minute and are treated
immediately with direct-current synchronized cardioversion.
A patient with pulseless ventricular tachycardia receives the
same treatment as one with ventricular fibrillation and requires
immediate defibrillation and cardiopulmonary resuscitation
[2].
Ventricular fibrillation is a chaotic pattern of electrical activity
in ventricles in which electrical impulses arise from many
different foci. On the ECG strip, ventricular activity appears
as fast and wide fibrillatory waves with no recognizable
pattern [2]. So two features including heart rate and mean of
pulse width, i.e., the pulse containing R wave or fibrillatory
wave in ventricular fibrillation, were used for arrhythmia
classification. If HR gets bigger than 150±10 bpm and (PW)
exceeds 120±8 msec, then episode could be categorized as VF
6. 6
arrhythmias; otherwise, it would be categorized as non-VF ar-
rhythmias. Also, if the mean absolute value of minimum points
in the array RP gets 2 times greater than the mean absolute
value of the maximum points, then algorithm classifies the
ECG episodes as non-VF arrhythmia. This usually happens in
the occurrence of the accelerated junctional rhythm.
In order to enhance the performance of the algorithm, the
final decision is based on the last three consecutive diagnoses.
Analysis based on 5-second intervals with the overlapping of
93.3% (333 millisecond shifting) resulted in three decisions
in a second. So if three consecutive VF arrhythmias are di-
agnosed, then algorithm declares that a VF arrhythmia occurs
and shock delivery to the patient is vital.
IV. EVALUATION AND RESULTS
A. Quality parameters
The quality parameters we used in this study for the
algorithm assessment were Sp, Se, and AC, as calculated
below.
Sp =
TN
TN + FP
(6)
Se =
TP
TP + FN
(7)
Ac =
TN + TP
TN + TP + FN + FP
(8)
, where TN is the number of true-negative decisions, FP is
the number of false-positive decisions, TP is the number of
true-positive decisions, and FN is the number of false-negative
decisions [14].
Se is the proportion of VF-type arrhythmias which are
correctly identified by the algorithm. Similarly, Sp is the
proportion of correctly detected non VF-type arrhythmias,
and Ac is the algorithm's ability to differentiate the VF type
and non-VF type cases correctly. Clinically, these concepts
are important for confirming or excluding disease during
screening.
B. Threshold Validation
In order to specify the best values for the two thresholds
τR and τC, 200 non-overlapped 5-second interval episodes
were extracted from each database (MITDB, VFDB, CUDB),
which contained both non-VF/VF arrhythmias. The algorithm
was developed and optimized using the dataset. The results
are depicted in Fig. 8a. The best performance was achieved
for τC = 0.08β and τR = 0.40β, which were used to validate
the algorithm. The threshold validation results for τC = 0.08β
and different values of τR are presented in Table I.
TABLE I
THRESHOLD VALIDATION RESULTS FOR τC = 0.08β
τR
β
Sp(%) Se(%) τR
β
Sp(%) Se(%)
0.15 72.92 97.29 0.50 99.11 97.28
0.20 87.50 98.64 0.55 98.51 90.27
0.25 96.43 99.32 0.60 97.92 86.44
0.30 98.81 99.32 0.65 97.32 84.75
0.35 99.40 99.32 0.70 96.43 82.3
0.40 99.56 99.28 0.75 96.43 76.27
0.45 99.70 98.30 0.80 96.13 71.53
C. Algorithm Performance
The performance of the proposed algorithm was compared
with some of the most important algorithms in Table II. In the
single diagnose mode, decision was based on the last window,
(a) (b)
Fig. 8. The performance characteristics of the proposed algorithm, as plotted point by point, on the basis of varying values of τR, as decreased from 0.80β
to 0.15β with 0.05β steps, and different values of τC . The two thresholds τC and τR were validated using, (a) training dataset, and (b) MITDB, VFDB,
and CUDB.
7. 7
TABLE II
PERFORMANCE COMPARISON OF THE PROPOSED METHOD WITH THE EXITING METHODS
Algorithm Database Ac(%) Se(%) Sp(%)
Overall Result(%) Window
#Subject #Decision
Ac Se Sp Size(s)
PSR [8]
MIT DB 99.2 74.8 99.2
96.2 79.0 97.8 8 123 333583CU DB 85.1 70.2 89.3
AHA 94.0 80.4 96.8
TCSC [10]
MIT DB 99.33 97.48 99.33
98.14 80.97
98.51
8 83 333583
CU DB 86.32 79.74 88.14
MLA [15]
MIT DB
N/A 96.3 96.2 96.2 5 105 20478VF DB
CU DB
FS-SVM [16]
MIT DB
N/A N/A 92 97 8 105 N/AVF DB
CU DB
VMD-RF [17]
MIT DB
N/A 97.23 96.54 97.97 5 105 N/AVF DB
CU DB
A-VMD &
CART [18]
MIT DB
N/A 98.29 97.32 98.95 5
48 17280
VF DB 22 9240
CU DB 35 3360
Proposed MIT DB 99.35 97.32 99.35
98.78 95.87 99.00 5
48 253848
Algorithm VF DB 98.19 95.96 98.67 22 136072
(SDM)1
CU DB 97.24 96.02 97.63 35 50597
Proposed MIT DB 99.60 93.243
99.60
99.07 94.50 99.33 5
48 253848
Algorithm VF DB 97.28 94.51 99.08 22 136072
(TDM)2
CU DB 97.95 94.68 98.21 35 50597
1 single diagnose mode (SDM), decision based on the last diagnosis
2 triple diagnose mode (TDM), decision Based on the last three consecutive diagnoses
3 number of the 5-second continuous rapid VT/VF episodes in MITDB are less than 350 cases
where the corresponding Sp, Se and Ac were 99.00%, 95.87%,
and 98.78%, respectively. In the triple diagnose mode, the
final decision was not only based on the last window, but
also depended on the two previous windows. As a result of
this dependency, the specificity was increased and a slight
reduction in sensitivity was inevitable. However, due to the
importance of specificity, a slight reduction in Se was accept-
able. Accordingly, the Sp of the algorithm was raised as much
as (0.33%), Se was dropped by (1.37%), and Ac was as high
as (99.07%).
The performance of the proposed algorithm could be af-
fected by the two thresholds τR and τC. Accordingly, the
performance characteristics of the algorithm were calculated
on the basis of varying values of the thresholds τR and τC for
MITDB, VFDB, and CUDB, as depicted in Fig. 8b. For each
curve, 14 points were calculated, while each point was the
result of 449517 decisions. By testing the algorithm using a
large number of ECG episodes, the best performance obtained
with 99.18%, 96.01%, and 98.93% for Sp, Se, and Ac as
illustrated in Fig. 8b.
D. The effect of τR on performance
According to Fig. 8b, τC = 0.08β leads to the best
performance, as depicted by red color. By decreasing τR from
0.80β to 0.15β with 0.05β steps, Se was raised dramatically,
as far as 9 percent; however, Sp was dropped slightly. Then
a substantial reduction in both Sp and Se was observed.
Meanwhile, τR = 0.45β leading to the best performance in
both SDM and TDM. The performance of proposed algorithm
is presented in Table III for τC = 0.08β and different values
of τR.
E. Normal Sinus Rhythm Classification
Although Se, Sp, and Ac of an algorithms in the separation
of VF and Non-VF arrhythmias are the sufficient parameters
for evaluating its performance, the algorithm specificity in the
diagnose of NSR is essential indeed. Delivering an unneces-
sary shock to a patient with NSR can lead to some irreparable
damage which is not acceptable under any circumstances [33].
Therefore, the AHA performance goal recommendation [14]
for Sp in the diagnosis of NSR and the application of AED
for artifact free condition was considered higher than 99%.
Accordingly, MIT-BIH Sinus Rhythm database was used to
8. 8
TABLE III
BEST PERFORMANCE OF THRESHOLD τR (τC = 0.08 × β)
τR
β
SDM TDM
Sp(%) Se(%) Sp(%) Se(%)
0.15 92.77 88.41 95.24 82.64
0.20 94.60 91.07 96.65 86.59
0.25 95.47 93.43 97.18 90.59
0.30 97.50 94.73 98.56 92.83
0.35 98.66 95.59 99.14 94.05
0.40 99.02 95.97 99.36 94.55
0.45 99.18 96.01 99.44 94.65
0.50 99.25 95.68 99.46 94.21
0.55 99.29 95.45 99.51 93.82
0.60 99.43 94.48 99.58 92.57
0.65 99.50 93.18 99.63 90.74
0.70 99.54 91.22 99.66 88.34
0.75 99.54 89.07 99.66 85.84
0.80 99.56 86.21 99.67 82.08
assess the ability of the algorithm in NSR classification as
non-VF arrhythmia. Since NSRDB included 18 records of 24
hours, only the first three hours of six subjects were used to
avoid the redundancy of data processing, as represented in
Table IV. The results presented in Table IV confirmed that
the proposed algorithm classified NSR as non-VF arrhythmia
with the Sp of 99.967% and 99.997% for SDM and TDM,
respectively.
TABLE IV
ALGORITHM DECISION IN NORMAL SINUS RHYTHM CASES
Subject
SDM TDM
TN FP TN FP
16265 10700 0 10700 0
16272 10700 0 10700 0
16273 10700 0 10700 0
16420 10700 0 10700 0
16483 10684 16 10699 1
16539 10695 5 10698 2
Total 64179 21 64197 3
F. Implementation
The proposed algorithm was implemented successfully on
cortext - M3 module and it was capable of connecting to
any ECG monitoring and analyzing devices supporting data
transmission via the serial port. To assess the performance
of the module, the same databases (MITDB, VFDB, CUDB,
NSRDB) were transmitted to the module through serial port;
then, the ECG signal with the extracted features and algorithm
decision were presented successfully on LCD in the real-time
execution (Fig. 9). As a consequence, our proposed algorithm
satisfied the demands of being in line with the guidelines of
AEDs.
V. DISCUSSION AND LIMITATION
A. Discussion
The aim of this work was to develop a novel time-domain
based algorithm for distinguishing VF type arrhythmias; this
(a) (b)
Fig. 9. ARM LPC1768 Cortext-M3 board was used for the implementation and evaluation of the proposed algorithm. The detected QRS complex was depicted
in red color. (a) SR episode was classified as non-VF arrhythmia with HR=97 bpm and PW=99 ms. (b) VF episode was classified as VF arrhythmia with
HR=299 bpm and PW=187 ms.
9. 9
could be applied for the automated external defibrillator.
Although different algorithms have been proposed for AED,
highly accurate real-time recognition and easy implementation
on embedded systems are still challenging.
In addition to high accuracy, the presented algorithm can
distinguish the arrhythmias in 5-second intervals and provide
real-time execution. In order to enhance the specificity, there
is a triple diagnose mode in which the final decision is
based on the last three consecutive diagnoses. To assess the
performance of the algorithm, first, it was optimized using the
train-dataset and then validated using MITDB, VFDB, and
CUDB where the train-dataset was separated. Since VT cases
are not all fatal, there are some VT episodes in VFDB which
have the heart rate less than 150 bpm. As a result, although
the algorithm distinguished these episodes as non-VF type
arrhythmias correctly, it was considered as a wrong decision
leading to a decrease in the sensitivity. Therefore, a higher Se
is expected if the VT episodes are split into VT and rapid VT.
In this work, the algorithm reliability in dealing with normal
sinus rhythm cases was proved using NSRDB while previous
works had not presented any similar assessment. Since the
proposed method is based on time-domain, its capability for
implementation on embedded systems is obvious.
The proposed method was compared with some of the exiting
techniques in Table II. Li et al.[15], have used 14 ECG metrics
and SVM classifier. The combination of count2 and leakage
feature in the 5-second interval analysis showed the best
performance. In [16], the same technique was used with 13
ECG metrics. Since the performance of the learning algorithm
could be effected by the number of input variables, the filter-
based selection methodology has been used to find the best
subset. So real-time recognition and easy implementation on
embedded systems would be doubtful for these two methods.
In [17], [18], they have proposed methods based on variational
mode decomposition algorithm. The Hilbert transform and
frequency shifting are two signal processing tools constituting
the building blocks of VMD [34]. Therefore, it is expected
to require heavy processing for real-time execution, especially
when the sampling frequency rises.
B. Limitation
The proposed method is suffering from motion artifacts
(especially those with high amplitude); thus, there is the
possibility to improve the performance by adding a good
motion artifact cancelation algorithm in the preprocessing.
VI. CONCLUSION
In this study, a new fatal arrhythmia (VT/VF) detection
method was presented. The proposed method calculated only
two time-domain features including the heart rate and duration
of QRS complex on the least possible window length and
overcame the necessity for an additional algorithm to calculate
the heart rate. Thus, it provided the real-time detection of
ventricular fatal dysrhythmias. In addition to the high per-
formance, our algorithm decision was trustworthy and could
guarantee the safety of the normal sinus rhythm cases.
In the triple diagnose mode , one of the factors leading to
further decrease in sensitivity rather than increase in specificity
was the less number of VF, as compared to non-VF events.
Notice, by default, the first two windows in the occurrence
of any VF arrhythmias could not lead the algorithm to
consider arrhythmia as the VF type. So if the effect of this
predetermined decision is removed, a higher sensitivity will
be achieved.
REFERENCES
[1] L. Ilkhanoff and J. J. Goldberger, “Out-of-hospital cardiac arrest,”
Circulation, vol. 126, no. 7, pp. 793–796, 2012.
[2] Lippincott Williams & Wilkins, “Part II-Recognizing Arrhythmias,” in
ECG Interpretation Made Incredibly Easy!, 5th ed., T. S. Diehl, Ed.
Chris Burghardt, 2011, pp. 63 – 172.
[3] M. S. Link, D. L. Atkins, R. S. Passman, H. R. Halperin, R. A. Samson,
R. D. White, M. T. Cudnik, M. D. Berg, P. J. Kudenchuk, and R. E.
Kerber, “Part 6: Electrical therapies,” Circulation, vol. 122, no. 18 suppl
3, pp. S706–S719, 2010.
[4] P. Cheng and X. Dong, “Life-threatening ventricular arrhythmia detec-
tion with personalized features,” IEEE Access, vol. 5, pp. 14 195–14 203,
2017.
[5] J. Israelsson, B. von Wangenheim, K. ˚Arestedt, B. Semark, K. Schild-
meijer, and J. Carlsson, “Sensitivity and specificity of two different au-
tomated external defibrillators,” Resuscitation, vol. 120, no. Supplement
C, pp. 108 – 112, 2017.
[6] S.-H. Lee, K.-Y. Chung, and J. S. Lim, “Detection of ventricular
fibrillation using hilbert transforms, phase-space reconstruction, and
time-domain analysis,” Personal and Ubiquitous Computing, vol. 18,
no. 6, pp. 1315–1324, Aug 2014.
[7] A. Amann, R. Tratnig, and K. Unterkofler, “A new ventricular fibrillation
detection algorithm for automated external defibrillators,” in Computers
in Cardiology, Sept 2005, pp. 559–562.
[8] A. Amann, R. Tratnig, and K. Unterkofler, “Detecting ventricular
fibrillation by time-delay methods,” IEEE Transactions on Biomedical
Engineering, vol. 54, no. 1, pp. 174–177, Jan 2007.
[9] F. J. Chin, Q. Fang, T. Zhang, and I. Cosic, “A fast critical arrhythmic
ecg waveform identification method using cross-correlation and multiple
template matching,” in 2010 Annual International Conference of the
IEEE Engineering in Medicine and Biology, Aug 2010, pp. 1922–1925.
[10] M. A. Arafat, A. W. Chowdhury, and M. K. Hasan, “A simple time
domain algorithm for the detection of ventricular fibrillation in elec-
trocardiogram,” Signal, Image and Video Processing, vol. 5, no. 1, pp.
1–10, Mar 2011.
[11] K. Balasundaram, S. Masse, K. Nair, and K. Umapathy, “A classification
scheme for ventricular arrhythmias using wavelets analysis,” Medical &
Biological Engineering & Computing, vol. 51, no. 1, pp. 153–164, Feb
2013.
[12] S. Banerjee and M. Mitra, “Application of cross wavelet transform
for ecg pattern analysis and classification,” IEEE Transactions on
Instrumentation and Measurement, vol. 63, no. 2, pp. 326–333, Feb
2014.
[13] S. Raj and K. C. Ray, “Ecg signal analysis using dct-based dost
and pso optimized svm,” IEEE Transactions on Instrumentation and
Measurement, vol. 66, no. 3, pp. 470–478, March 2017.
[14] R. E. Kerber, L. B. Becker, J. D. Bourland, R. O. Cummins, A. P.
Hallstrom, M. B. Michos, G. Nichol, J. P. Ornato, W. H. Thies,
R. D. White, and B. D. Zuckerman, “Automatic external defibrillators
for public access defibrillation: Recommendations for specifying and
reporting arrhythmia analysis algorithm performance, incorporating new
waveforms, and enhancing safety,” Circulation, vol. 95, no. 6, pp. 1677–
1682, 1997.
[15] Q. Li, C. Rajagopalan, and G. D. Clifford, “Ventricular fibrillation and
tachycardia classification using a machine learning approach,” IEEE
Transactions on Biomedical Engineering, vol. 61, no. 6, pp. 1607–1613,
June 2014.
[16] F. Alonso-Atienza, E. Morgado, L. Fern´andez-Mart´ınez, A. Garc´ıa-
Alberola, and J. L. Rojo- ´Alvarez, “Detection of life-threatening ar-
rhythmias using feature selection and support vector machines,” IEEE
Transactions on Biomedical Engineering, vol. 61, no. 3, pp. 832–840,
March 2014.
[17] R. K. Tripathy, L. N. Sharma, and S. Dandapat, “Detection of shockable
ventricular arrhythmia using variational mode decomposition,” Journal
of Medical Systems, vol. 40, no. 4, p. 79, Jan 2016.
10. 10
[18] Y. Xu, D. Wang, W. Zhang, P. Ping, and L. Feng, “Detection of
ventricular tachycardia and fibrillation using adaptive variational mode
decomposition and boosted-cart classifier,” Biomedical Signal Process-
ing and Control, vol. 39, no. Supplement C, pp. 219 – 229, 2018.
[19] D. Markenson, L. Pyles, and S. Neish, “Ventricular fibrillation and the
use of automated external defibrillators on children,” Pediatrics, vol.
120, no. 5, pp. e1368–e1379, 2007.
[20] A. Li, A. Kaura, N. Sunderland, P. S. Dhillon, and P. A. Scott,
“The significance of shocks in implantable cardioverter defibrillator
recipients,” Arrhythmia & Electrophysiology Review, vol. 5, no. 2, pp.
110–116, 2016.
[21] G. B. Moody and R. G. Mark, “The impact of the MIT-BIH Arrhyth-
mia Database,” IEEE Engineering in Medicine and Biology Magazine,
vol. 20, no. 3, pp. 45–50, May 2001.
[22] Massachusetts Institute of Technology, “MIT-BIH Normal Sinus Rhythm
Database.” [Online]. Available: https://physionet.org/physiobank/
database/nsrdb/
[23] S. D. Greenwald, “The development and analysis of a ventricular
fibrillation detector,” Master’s thesis, MIT. Department of Electrical
Engineering and Computer Science, 1986.
[24] F. Nolle, F. Badura, J. Catlett, R. Bowser, and M. Sketch, “CREI-
GARD, a new concept in computerized arrhythmia monitoring systems,”
Computers in Cardiology, vol. 13, pp. 515–518, 1986.
[25] A. Amann, R. Tratnig, and K. Unterkofler, “Reliability of old and
new ventricular fibrillation detection algorithms for automated external
defibrillators,” BioMedical Engineering OnLine, vol. 4, no. 1, p. 60, Oct
2005.
[26] S. Ahmad, M. Bolic, H. Dajani, V. Groza, I. Batkin, and S. Rajan,
“Measurement of heart rate variability using an oscillometric blood pres-
sure monitor,” IEEE Transactions on Instrumentation and Measurement,
vol. 59, no. 10, pp. 2575–2590, Oct 2010.
[27] J. Pan, and W. J. Tompkins, “A Real-Time QRS Detection Algorithm,”
IEEE Transactions on Biomedical Engineering, vol. BME-32, no. 3, pp.
230–236, March 1985 2010.
[28] J. Kranjec, S. Beguˇs, J. Drnovˇsek, and G. Gerˇsak, “Novel methods for
noncontact heart rate measurement a feasibility study,” IEEE Transac-
tions on Instrumentation and Measurement, vol. 63, no. 4, pp. 838–847,
April 2014.
[29] E. T´oth-Laufer and A. R. V´arkonyi-K´oczy, “Personal-statistics-based
heart rate evaluation in anytime risk calculation model,” IEEE Transac-
tions on Instrumentation and Measurement, vol. 64, no. 8, pp. 2127–
2135, Aug 2015.
[30] A. Galli, C. Narduzzi, and G. Giorgi, “Measuring heart rate during
physical exercise by subspace decomposition and kalman smoothing,”
IEEE Transactions on Instrumentation and Measurement, vol. PP, no. 99,
pp. 1–9, 2017.
[31] T. H. Linh, S. Osowski, and M. Stodolski, “On-line heart beat recog-
nition using hermite polynomials and neuro-fuzzy network,” IEEE
Transactions on Instrumentation and Measurement, vol. 52, no. 4, pp.
1224–1231, Aug 2003.
[32] P. Przystup, A. Przystup, A. Bujnowski, and J. Wtorek, “Ecg-based
prediction of ventricular fibrillation by means of the pca,” in 2014 IEEE
International Symposium on Medical Measurements and Applications
(MeMeA), June 2014, pp. 1–5.
[33] M. A. Arafat, J. Sieed, and M. K. Hasan, “Detection of ventricular
fibrillation using empirical mode decomposition and bayes decision
theory,” Computers in Biology and Medicine, vol. 39, no. 11, pp. 1051
– 1057, 2009.
[34] K. Dragomiretskiy and D. Zosso, “Variational mode decomposition,”
IEEE Transactions on Signal Processing, vol. 62, no. 3, pp. 531–544,
Feb 2014.
Ehsan Izadi was born in 1989. He received the
B.Sc. degree in Electrical Engineering from Azad
University Najafabad Branch, Isfahan, Iran, in 2012,
and the M.Sc. degree in Communication System
Engineering from Isfahan University of technology
(IUT), Isfahan, Iran, in 2015.
In 2013, he joined the Incubator Entrepreneurship
Center of the University of Isfahan, where he fo-
cused on biomedical signal processing and electron-
ics systems designing. Since 2016, he has been an
R&D member at some industrial companies working
on instrumentation and Programmable Logic Controller (PLC) systems in
Iran. His main areas of research interest are signal processing and analysis,
Instrumentation engineering, and telecommunications engineering.
Rassoul Amirfattahi was born in 1969. He received
BS degree in Electrical Engineering from Isfahan
University of technology, Isfahan, Iran in 1993, MS
degree in Biomedical Engineering and Ph.D de-
gree in Electrical Engineering both from Amirkabir
University of technology (The Tehran Polytechnic),
Tehran, Iran in 1996 and 2002 respectively.
From 2003 he joined Isfahan University of Tech-
nology while he is currently an Associate Professor
and director of digital signal processing research
laboratory at the department of Electrical and Com-
puter Engineering. His research interests include Biomedical signal and image
processing, speech and audio analysis, Biological system modeling and DSP
algorithms. He is an author or coauthor of more than 200 technical papers,
one book and two book chapters.
Saeed Nasr was born in Isfahan, Iran, in 1988. He
received the B.Sc. degree in Electrical Engineering
from Azad University, Najafabad Branch, Isfahan,
Iran, in 2011.
In 2012, he joined the Incubator Entrepreneurship
Center of the University of Isfahan and worked as a
designer of electronics systems. He also conducted
some research on biomedical signal processing and
applied it to the embedded systems. Since 2016, he
has moved to Germany to pursue his graduate stud-
ies. Currently, he is with the department of Electrical
Engineering, University of applied science (HTW), Berlin, Germany, studying
Micro-Electro-Mechanical Systems (MEMS). His research interests include
biomedical signal processing, analog integrated circuit design, and MEMS
design.
Omid Ahmadi was born in 1974. He received his
MD degree in general medicine from Azad Univer-
sity, Najafabad Branch, Isfahan, Iran, in 2000, well
as a Medical specialty in Emergency Medicine from
Tehran University of Medical Sciences in 2008.
Since 2008, he has been one of the founders and
faculty members of the Emergency Department of
Isfahan University of Medical Sciences. At present,
he is an Assistant Professor in the Emergency
Medicine department and the program director of
the Emergency medical technician in the school of
allied medical sciences of Isfahan. His research interests include Trauma, Point
of care ultrasound (POCUS) and Pain management in Emergency medicine.
He is also the author or coauthor of 12 original articles and 3 books.