You are on page 1of 10

Biomed Eng Lett (2015) 5:271-280

DOI 10.1007/s13534-015-0196-9

ORIGINAL ARTICLE

A Knowledge-based Real Time Embedded Platform for Arrhythmia


Beat Classification
Sandeep Raj, Kshitij Maurya and Kailash Chandra Ray

Received: 17 March 2015 / Revised: 14 August 2015 / Accepted: 20 August 2015


The Korean Society of Medical & Biological Engineering and Springer 2015

Abstract INTRODUCTION
Purpose This paper aims for accurate classification of ECG
beats in real-time. Cardiovascular disease (CVD) is the leading cause of deaths
Methods The design, implementation and results of FPGA in the developed and developing countries. An estimated
oriented SOC based embedded platform in laboratory 17.3 million people died from CVDs in 2008, representing
experimental setup is presented. The platform is designed 30% of all deaths globally and it is expected that the number
using high-level systematic approach having the capability of of mortalities will reach 23.3 million by 2030. Moreover, in
real-time classification of ECG beats at the place of patients many cases patients suffering from heart attack die just
with high accuracy which will be helpful to enhance the because they are unable to reach the hospital in time.
healthcare for cardiovascular diseases. The algorithm involves Since decades, ECG has been used as a non-invasive
the integration of the R-peak detection algorithm and Rule- clinical tool in the cardiology which shows the graphical
based approach to classify four generic heartbeat classes recordings of heart electrical activities. These recordings
namely Normal, PVC, Ventricular Fibrillation/Ventricular determine the state of heart of a person whether the heart is
Flutter, 2 heart block beat. The aforesaid algorithms are behaving normal or suffering from some abnormalities.
performed in software on an integrated TSK3000A processor These electrical activities of heart are due to depolarization
core (IP cores used) and implemented in hardware targeting and repolarization of the heart which results in the generation
FPGA (Xilinx Spartan 3AN). The developed platform is of the three wave i.e P-wave, QRS wave and the T-wave.
validated by generating real-time ECG beats using MIT-BIH The morphology, duration and height of these waves
arrhythmia database. provides sufficient information about the state of heart. The
Results The performance of the proposed implementation is graphical recordings i.e ECG is further analyzed by the
evaluated in terms of sensitivity, specificity, positive predictivity cardiologist from which the patient can be diagnosed.
and accuracy which is 97.72%, 99.09%, 96.46% and 97.96% These recordings vary greatly for different persons and
respectively. patient groups. Even for the same individual these recordings
Conclusions The proposed hardware/software implementation vary with time under different physical conditions and
has yielded improved results in comparison to the existing therefore are non-stationary in nature [1]. The abnormalities
methodologies implemented on the FPGA platforms. are often termed as arrhythmias and they may occur regularly
or during a day or week. It may also be possible that the
Keywords Electrocardiography, Arrhythmia beat, FPGA, same arrhythmia can also reveal different morphology at
Real Time, QRS peak, RR-interval different time. Moreover, these ECG signals are contaminated
with various kind of noise and artifacts during their acquisition
which makes the analysis more difficult. Thus, automatic
detection and classification of arrhythmias remains a challenge
Sandeep Raj ( ), Kshitij Maurya, Kailash Chandra Ray as it may lead to sudden cardiac death also. In this context,
Department of Electrical Engineering, Indian Institute of Technology it is very critical to analyze these recordings more accurately
Patna, Patna 800013, India and precisely when performed in real time.
Tel : +91-6122552085 / Fax : +123-45-678910
E-mail : srp@iitp.ac.in The standard resting ECG machines lacks the capability of
272 Biomed Eng Lett (2015) 5:271-280

providing any real time feedback for thousands of heartbeats approach [23]. The first algorithm contributes for the detection
they record. Hence, the arrhythmias may not be detected due of the R-peak and the later presents the detection of
to the condition may not be present at that time while patient arrhythmic beats based on clinical procedures [23] provided
visiting the hospitals. This makes a tedious job when analyzed by medical experts. The only feature extracted is the RR-
offline by a cardiologist. Various monitoring devices are interval between the consecutive ECG beats that are
available for cardiac event recording and monitoring like classified using a set of rules with sliding window approach
holter devices and event monitors to realize the underlying which is computationally inexpensive in comparison to the
heart condition and lacks real time classification rather various existing methodologies. This kind of implementation
classification is performed offline. Some device facilitates on FPGA platforms can provide real-time diagnosis to the
remote real-time monitoring system [2-4] where the recorded patients.
ECG data is transferred to remote monitoring center where A FPGA-based embedded platform is developed and
the analysis and classification is performed, thus depriving customized by incorporating commercially available Intellectual
the user of real time feedback. A few of devices based on Property (IP) cores of Reduced Instruction Set Computing
Personal Digital Assistant (PDA) [5-8] has provided some (RISC) processor (TSK3000), Analog to Digital Converter
intermediate level of local real time classification but lacks (ADC) controller and display controller (TFT). Further the
in giving a complete solution to CVD diagnosis. While proposed algorithm is performed in software on an integrated
using these systems it is also important that they should be TSK3000A processor core and implemented in hardware
flexible, upgradeable, have enough processing power and are FPGA (Xilinx Spartan 3AN). A real time experiment is
inexpensive. All these features can be integrated in Field performed by generating ECG signals on Arbitrary Function
Programmable Gate Array (FPGA) based systems and can Generator (AFG3252) using the available MIT-BIH database
be finally fabricated on single System-On-Programmable [24]. The embedded platform aims for accurate detection and
chip (SoPC) for cardiac event monitoring. classification of four classes of ECG beats (one normal beat
In recent years, numerous research work have been carried and three arrhythmia beats i.e PVC, V.Fib./Fl., 2o heart block
out for analysis, detection and classification of the ECG beat) in real time at the place of patients for monitoring
signals. Various researcher have presented several algorithms, (displayed on TFT screen in our experimental setup) the state
which include ECG morphology [9-11], heartbeat interval of heart during their normal lifestyle. In this paper, we seek
techniques [1, 9, 10], frequency-based analysis [12], Principal to unite the portability of Holter monitors with real-time
Component Analysis methods [13], higher order cumulant processing capability of state-of-the-art resting ECG machines
features [15], hermite polynomials [16] for feature extraction to provide an assistive diagnosis solution using FPGA devices
and linear discriminants [9, 17], fuzzy hybrid neural network embedded with soft-core microprocessors in systems.
[15], neuro-fuzzy approach [18], self organizing maps with The rest of this paper is organized as follows: The
learning vector quantization [1], self organizing networks algorithms for RR-interval computation and arrhythmia beat
[16] and support vector machines [13, 14] for classification classification are presented in section II. Section III describes
purposes. These algorithms are combined together to perform the system design of the developed platform for cardiac
real-time classification on a suitable hardware platforms like beat monitoring whereas section IV describes experiments
microcontrollers and FPGA [19-22] and involves high performed. Section V presents the results and discussion and
computational complexity. However, the performance of the finally section VI concludes the paper.
methodologies implemented on these hardware platforms are
not satisfactory either in terms of classification accuracy or
number of beats classified. RR-INTERVAL COMPUTATION AND BEAT
This work presents an efficient FPGA oriented System- CLASSIFICATION RULES
On-Chip (SOC) based embedded platform implementing the
proposed approach to perform real-time classification of This section presents methods to compute the RR-interval of
ECG beats. The proposed approach integrates two algorithms the consecutive ECG signals and their classification. In the
i.e R-peak detection algorithm and the knowleged-based beginning, R-peak detection algorithm is focussed to detect

Fig. 1. Block diagram representation.


Biomed Eng Lett (2015) 5:271-280 273

the R-peak in QRS complex signal of the ECG which is used the following stages are summarized in Table 1. The output
to compute RR-intervals of the ECG signals in our approach. of MWI stage determines the size of QRS complex with the
Further, a knowleged-based classifier algorithm is presented varying nature of QRS complexes. This approach increases
to identify arrhythmia beats using these RR-intervals as the overall detection sensitivity and reduces the number of
features. The major building blocks for the computation of false positives. Since the algorithm is performed in real time,
RR-interval with beat classifier algorithm is presented in so no search-back is done and it is based on an amplitude
Fig. 1 and discussed in the following subsections. comparison to an adaptive threshold. QRS detection from the
filtered signal is subsequently performed by an adaptive
RR-interval computation threshold detector which uses a set of thresholds.
A QRS complex detection algorithm i.e Pan-Tompkins [25] The QRS detection algorithm in this study is based on
is implemented due to its proven sensitivity of 99.69% optimized filtering and on a simple decision algorithm as the
and positive prediction of 99.77% when evaluated with the optimized filtering is considered to be the key to achieve
MIT-BIH arrhythmia database. This algorithm is based on good timing accuracy.
morphological properties of ECG signals on which the The output of the decision stage determines the R-peak in
preprocessing and decision stage is applied. The stages involved the ECG signal where the signal has maximum absolute value.
in the RR-interval signal computation is summarized in In Table 1, q(m) is the time-averaged signal, g(m) is the
Table 1. band-passed ECG and h(m) is the differentiated ECG. N is
The recorded ECG signals taken from the MIT-BIH the number of samples in the width of the moving window.
database are contaminated with various kinds of noise during After the peaks are detected, the main wave of the QRS
their acquisition, so preprocessing is required in order to complex (R wave) is identified in the window length of
remove them for analysis. The preprocessing stage performs -280 ms to +120 ms. The RR-interval signal is constructed
linear and non-linear filtering of the ECG signal and by measuring the time interval between successive R peaks
produces a set of periodic vectors that describe the events. In of the ECG signals. These RR-intervals are used to classify
the linear filtering stage, a cascaded low-pass and high-pass four ECG beats namely Normal beat, Preventricular Contraction
filters is employed to achieve a 3 dB passband from about beat, Ventricular Fibrillation/ Flutter beats and 2o heart block
5-12 Hz. This digital bandpass filter improves the signal-to- beat. The classification rules used to classify these generic
noise ratio and permits the use of lower thresholds than heartbeat classes is discussed in next subsection. Since, the
would be possible on the unfiltered ECG. Secondly, the only feature extracted to classify the desired ECG signals is
filtered ECG is passed through a five-point derivative to the RR-interval signal offers less computation complexity for
obtain the slope of R wave. The squaring stage identifies the further classification and implementation.
slope of the frequency response curve of the derivative and
restricts false positives caused by T waves with higher spectral Beat classification rules
energy. Thenafter, a Moving Window Intergrator (MWI) is This work focusses to classify four ECG beats including normal
applied to obtain waveform feature information in addition beat. A knowledge-based approach is adopted using a set of
to the slope of the R wave. The implemented equations of rules, Arrhythmia beat-by-beat classification is performed on

Table 1. QRS peak detection and RR-interval computation algorithm.


Stages Process stage Implementation Remarks
Stage 1 Select the signal for Analysis ECG Raw Data from MIT-BIH database -
Stage 2 Cascaded low pass and high pass q(m) = 2g[m-1]-q[m-2]+h[m]-2h[m-6]+h[m-12] To attenuate Noise
filter q(m) = 32h[m-16]-g[m-1]+h[n]-h[m-32] Cutoff freq: 11 Hz(LP), 5 Hz(HP)
Stage 3 Apply a derivative operator q(m) = 1/8(-h[m-2]-2h[m-1]+2h[m+1]+h[m+2]) Provides Information about the
slope
Stage 4 Square and Integrate the signal g[m] = h[m]2 Makes data points positive
and amplifies the output
Stage 5 Moving Window Integrator q(m) = 1/N(h[m-(N-1)]+h[m-(N-2)]+.....+h[m]) To ensure the width of QRS
(MWI) complex
Stage 6 Placing a threshold; under this Adjusting two thresholds (THR_SIG and To Identify R peaks
value the signal will be zero THR_NOISE) to adapt continuously with
change in ECG Signal
Stage 7 Computation of RR-interval Computed as successive R-intervals For beat classification
274 Biomed Eng Lett (2015) 5:271-280

Table 2. Knowledge (rule) based beat classification [23].


Rule No. Rules Beat classification
Rule 1 Initialization: RR2i from window i is classified as NORMAL (Category 1) Normal Beat
Rule 2 a. If RR2i < 0.6 sec and 1.8 * RR1i then i. RR2i is classified in Category 3. V. Fl./Fib. Beat
ii. The RR2k of all the windows k = i+1, i+2,..., i+n with (RR1k < 0.7 and RR2k < 0.7 and
RR3k < 0.7) or (RR1k + RR2k + RR3k < 1.7) are classified in category 3.
b. If the number of intervals that are sequentially classified in category 3 is less than 4 then
they all are classified in Category 1 and the algorithm returns to window i.
Rule 3 If ((1.15 * RR2i < RR1i and (1.15 * RR2i < RR3i)) or ((|RR1i - RR2i | < 0.3 and ((RR1i < PVC Beat
0.8) and (RR2i < 0.8)) and (RR3i > 1.2 * mean(RR1i, RR2i)) ((|RR2i - RR3i | < 0.3) and
((RR2i < 0.8 and (RR3i < 0.8)) and (RR1i < 1.2 * mean(RR2i, RR3i)), then RR2i is
classified in Category 2.
Rule 4 If (2.2 < RR2i < 3.0) and (|RR1i - RR2i | < 0.2) or (|RR2i - RR3i | < 0.2) then RR2i is 2o Heart Block Beat
classified in Category 4.

the RR-interval signal. These rules [23] are provided by the integrated algorithms are first implemented in software
medical experts and are used to detect arrhythmic events on a standard processor and then incrementally optimized by
from the RR-intervals based on clinical procedures. The hardware coprocessors. Finally, system implementation
rules are used for the classification of the middle RR-interval ranging from board-level systems to SOCs and configurable
of a three RR-interval sliding window. The classification SOCs (CSOCs) can also facilitated.
concerns the second beat of the middle RR-interval. The A prototype of the system is designed with the TSK3000
beats are classified in four categories: (1) normal sinus beats processor to which various peripherals are connected. The
(N) and three arrhythmic ones: (2) premature ventricular TSK3000A is a Wishbone compatible and offers five stage
contractions (PVC), (3) ventricular flutter/fibrillation (VF) pipelining. Wishbone is mainly used as a master/slave memory
and (4) 2o heart block (BII). bus, but also supports multi-master systems and is useful for
It is therefore assumed that beat not belonging to one of process to process communication, regardless of whether the
the above arrhythmic categories is classified as normal beat processes are implemented as softwares or as hardware
i.e all other beats except PVC beat, V. Fib/Fl. beat and 2o processors. In addition to fast register access, the TSK3000A
heart block (BII) beat will be classified as Normal irrespective features a user definable (from 1K Bytes up to 1M Bytes)
of their own identity. amount of zerowait state block Random-Access Memory
The rules summarized in [23] in Table 2. This algorithm (RAM), with true dual port access. The memory bus excel
starts with a window I, which consist of the three windows themselves in fast memory excess are novelty in design.
i.e RR1i, RR2i and RR3i intervals. The middle of the RR- Because of their fast access, the XRAM connected to the bus
interval i.e RR2i is considered as normal and classified in interfaces is used as stack and heap segment storage which
Category 1. After the beats have passed through the rules for help them to decrease the data flow through the On chip
the first window, the algorithm continues with the next window Peripheral (OPB) interface. Data and instruction caches of
i.e I = I + 1. The rules are applied sequentially and if beat is the same size are also added to the TSK and used for caching
classified to a category by one rule then this classification the OPB. All the above mentioned features make our system
cannot be changed by a following rule. best suited platform for the development of diagnosis system
for automatic detection and classification cardiac diseases in
System design real time.
A development system with FPGA (Xilinx Spartan 3AN) is Commercially available IP cores for the TSK-3000A
used for the system implementation. A TSK3000A soft microprocessors and other controllers like Serial Peripheral
processor, a 32-bit MIPS-based RISC core is chosen for Interface (SPI) protocols for ADC and TFT controller are
suitable mixed hardware/software implementation. Hardware/ customized to develop an embedded platform as explained in
Software tradeoffs are easily analyzed. The system was built the following steps.
using the Xilinx platform Embedded Development Kit Step 1: Building Open Bus System
(EDK) which is a collection of tools for building embedded The Embedded System is designed using the Altiums
systems on FPGAs. EDK also contains a large number of IP Open Bus Flow. The building of the Open Bus System
cores that makes the design relatively easy. The C to hardware (Embedded Hardware) mainly involves three steps.
compiler chc implements a complete co-design system and 1. The required IP core components has been placed on
thus enables quick hardware protyping. Using this approach, the Open Bus System.
Biomed Eng Lett (2015) 5:271-280 275

Fig. 2. Connection with the physical devices.

Fig. 3. Software platform.

2. Interconnecting the Open Bus Components. The physical ports which is implemented on the FPGA
3. Configuring the Open Bus System. board have to be configured and this step automatically
The computation is performed in 32-bit RISC processor generates the software platform in Graphic User Interface
(TSK 3000A). As, the computation of real time signal is (GUI) to configure the ports which is presented in Fig. 3.
performed in digital domain and interfaced with the analog The devices like ADC and TFT controller based on SPI have
domain using SPI controller for ADC and TFT. been selected for software platform modules and configured
Step 2: Building Top Level Schematic in high level C++ language.
After the Open Bus System designed and configured, the
microcontroller needs to be interfaced with the top-level
Schematic in the FPGA design which is done through a sheet EXPERIMENTS PERFORMED
symbol placed on the schematic sheet. The last stage in
designing is to connect the Open Bus System into the FPGA ECG signal database
design to connect the microcontroller with the hardware (like The experiments are evaluated with MIT-BIH Arrhythmia
ADC, TFT and Memory) on the top-level schematic as database [24]. The database contains 48 half hour excerpts of
shown in Fig. 2. two channel ambulatory ECG recordings of 47 different
Step 3: Creating the Software Platform patients. Each record of the database contains two leads with
276 Biomed Eng Lett (2015) 5:271-280

V1 into 40 files, modified lead II in 45 files and II, V2, V4 Generator (AFG 3252) using Arb Express Application
and V5 distributed among 11 files [26]. The recordings are Software and corresponding real time ECG signals (in this
digitized with a sampling frequency of 360 Hz and acquired case arrhythmia beats) are generated. In the AFG3252 the
with 11-bit resolution over 10 mV range. Only 28 records ECG signal is amplified and sent to embedded computing
from the database are used for validation and analyzed using system for its direct processing by the ADC. The ADC
modified lead-II signals for the classification of four classes samples the input signals at a rate of 500 samples/s. The
of heartbeats namely normal (N), premature ventricular laboratory experiments as in Fig. 4 are performed for ECG
contraction (PVC), Ventricular Fibrillation/Flutter, 2o heart signals (Arrhythmia Beats) taken from database and the
block beat. This study uses the annotation to locate ECG corresponding class of output beats are monitored on TFT of
beats for their classification ans yielding the results. the Altium Board as shown in Fig. 4. This figure shows the
A total of 10800 beats (i.e 6000 for Normal, 4000 for classification of the PVC beat and similarly the other beats
PVC, 400 for V.Fib/Fl and 400 for 2o heart block beat) has are also being monitored.
been selected and tested from the different files of MIT-BIH In the beginning, R-peak is detected from the Pan-Tompkins
Arrhythmia database [24] to evaluate the performance of the algorithm [25] while processing the ECG data. QRS peak
developed classifier platform. It is worth to mention that only detection correctness is also cross-verified in a digital signal
the beats of desired class have been taken and tested while oscilloscope (DSO). For this purpose, ECG sample values as
the remaining class of beats from the database is ignored to captured by ADC is converted to analog using digital-to-
validate the performance of developed platform. analog converter (on-board DAC) and is fed as channel-1
input of DSO. QRS peak indicator signal is fed to a channel-2
Implementation input for display which is shown in Fig. 5. After the QRS
The embedded platform (TSK-3000A and I/O Controllers) is peaks are detected at maximum absolute value, the time
developed using Altium Designer environment and implemented interval of the successive ECG beats are computed and
on hardware targeting a FPGA device i.e Xilinx Spartan passed through a set of rules. The beat classified into a
XC3S1400AN chip which is shown in laboratory experimental particular class is determined by the beat falling in the
setup in Fig. 4. Although, the TSK3000A software processor window of the three RR-interval sliding window followed by
core can operate at frequencies upto 200 MHz rather only the set of rules discussed in the earlier section. The rules are
processing speed of 100 MHz base frequency is presented. applied sequentially using for, if and else conditions in C++
The algorithms for computing RR-interval and beat classification programming language. After the detection of beat to a
are developed in C++ language and implemented on aforesaid
FPGA-based embedded platform. This embedded platform
is interfaced with on board Analog to Digital Converter (4-
channel, 8-bit from National Semiconductor) to digitize the
real time ECG signals generated which is used for further
processing and a TFT Terminal is used to monitor the class
of outputs (classified beats) from this embedded computing
system.
As mentioned earlier, MIT-db data files contain ECG data
recorded at 360 Hz sampling frequency. It is observed that
the ECG data recorded are having maximum variation of
5 mV. This signal is converted in 0-5 V range so as to be
accepted by a typical ADC. At first, a series of arrhythmia
beats (Normal, PVC, V. Fib./Fl., 2o heart block beat) are Fig. 4. Laboratory setup for development of ECG beat monitoring
generated in text file and loaded in Arbitrary Function systems.

Table 3. ECG beats taken from MIT-BIH database.


Beat type Beat annotations Record number Total samples
N N 100, 101, 103, 105, 106, 121, 122, 123, 200, 201, 202, 208 6000
PVC V 106, 119, 200, 203, 208, 210, 213, 214, 215, 217, 221, 223, 228, 233 4000
V.Fib/V. Fl VFL 207 400
2o H.B BII 231 400
Total 10800
Biomed Eng Lett (2015) 5:271-280 277

determining these parameters True Positive (TP), True


Negative (TN), False Positive (FP), False Negative (FN) are
calculated from Table 4 where TP and TN represents the
correct classification of the normal and abnormal ECG
patterns. FN represents the misclassifications of normal as
abnormal beats while FP represents the misclassification of
the abnormal beats into normal beats. Sensitivity is the
correctly detected events among total no. of events. Specificity
refers to the rate of correctly classified non-events whereas
positive predictivity refers to the rate of correctly classified
events in all detected events. Using these definitions, sensitivity
and specificity can be defined as:
TP
- 100
Sensitivity (Se) = ------------------- (1a)
TP + FN
Fig. 5. R-peak detection from MIT-BIH data. TN
Specificity (Sp) = -------------------- 100 (1b)
TN + FP
TP
particular class the window is updated consequently to Positive Predictivity (Pp) = -------------------- 100 (1c)
TP + FP
identify the next beat and the cycle continues. If any class of
beat other than the desired class is given as input to the The accuracy of the classification system is given as:
developed platform then it will be classified as normal.
Correctly classified beats
The classification results of the proposed algorithm Classifier Accuracy = ------------------------------------------------------------- (2)
Total number of beats
implemented on the developed platform is presented in terms
of confusion matrix and discussed in the next section. This The performance evaluation of each beat is summarized in
matrix maps the classification of classified and misclassified Table 5.
heartbeats into their subsequent classes which is further used
in their performance evaluation.
RESULTS AND DISCUSSION
Performance evaluation
The testing of the hardware platform is evaluated using the In this study, real-time verification of beat classification
performance metrics parameters namely Sensitivity, Specificity performance achieved, with the developed platform carried
and Positive Predictivity. For the sake of validation and out by the algorithms using MIT-BIH database is presented.

Table 4. Confusion matrix.


Correctly classified instances 10580 Accuracy : 97.98%
Incorrectly classified instances 220 Error rate : 2.02%
Predicted/Output Normal PVC VF 2 H.B Total
Normal 5921 61 13 5 6000
PVC 97 3878 17 8 4000
VF 1 9 389 1 400
2 H.B 7 0 1 392 400
Total 6026 3949 419 406 10800

Table 5. Performance evaluation for each class of ECG beat


Class of beats TP TN FP FN Se (%) Sp (%) Pp (%)
Normal 5921 4695 105 79 98.68 97.81 98.26
PVC 3878 6730 70 122 96.95 98.97 98.20
V.Fib./Fl 389 10369 31 11 97.25 99.70 92.84
2o H. B 392 10386 14 8 98 99.86 96.55
278 Biomed Eng Lett (2015) 5:271-280

In particular, this platform allows to verify the detection of the TP, TN, FP, FN which are presented in Table 5. The
arrhythmias which could be difficult using heart monitors. results clearly shows that the overall accuracy of this aforesaid
Furthermore, the platform is investigated on a total of 10,800 platform is as high as 97.96% with overall sensitivity (Se),
ECG beats which includes the normal beats and three specificity (Sp) and positive predicivity of 97.72%, 99.09%
arrhythmia beats taken from the database. The resource and 96.46% respectively. It is worth to mention that the
utilization summary of implemented system achieved by proposed classifier system will work only for the beats of
Xilinx tool is as follows: BUFGMUX's used is 1, I/O Pins desired class. The minimum classification accuracy reported
used are 99, Slice Flip Flops used are 1755 and the 4-Input is more than 96% in case of PVC beat while 98.68%,
LUT's Logic used are 4224. 97.25%, and 98% in case of normal, VF and 2o heart block
The snapshots of the classified beats displayed on TFT are beats.
taken at the instant of time of their occurrence as shown in The comparison between the various methodologies
right side of Fig. 6 for corresponding raw ECG beats as depends on several factors like the database utilized, type
shown in left side of the same figure. and number of records considered and several other factors.
The confusion matrix in Table 4 validates the performance Some of the researchers have also presented their study on
of developed hardware platform by classifying the beats into the data taken from the hospitals. In account of these factors,
their subsequent classes. Each row of the matrix in Table 4 a comparison between the proposed methodology with the
represents the number of beats in the actual class taken from various methodologies implemented on the FPGA platform
MIT-BIH database i.e for example in case of total 6000 evaluated on the benchmark of MIT-BIH arrhythmia database
normal beats (first row) taken for testing, out of which 5921 is presented in Table 6 and discussed here.
are correctly classified into normal whereas 61, 13 and 5 are In [19], only two classes of ECG beats (i.e Normal and
misclassified into PVC, VF and 2o heart block beats PVC) are classified on FPGA platform using the block
respectively. Similarly each column represents the number of partitioning and Open Source ECG Analysis Software (OSEA)
beats in the predicted class i.e for example, in case of normal methodology achieving a overall sensitivity and specificity
class in first column, 5921 are correctly classified into of 92.36% 95.54% respectively. In [20], three classes of
normal whereas 97, 1, and 7 of PVC, VF, and 2o heart block arrhythmias (i.e premature ventricular contraction (PVC),
beats are misclassified into normal class. Thus total number fusion (F), and normal (N)) beats are classified using the
of 6026 beats out of 10800 beats are predicted in normal principal component analysis (PCA) and neural network
class. Hence, it can be concluded from the matrix that the approach implemented on FPGA achieving an overall
developed hardware platform yields an overall accuracy of accuracy of 97.66%. In [21], M. Cvikl et al. used the
97.96%. geometrical and OSEA algorithms for classifying two classes
On the basis of Table 4 and Eqs. (1) and (2), the performance of ECG beats achieving an overall accuracy of 92.59%. In
evaluation for each beat of a particular class is computed in [22], three classes of arrhythmia are classified on the FPGA
terms of sensitivity specificity and positive predictivity from core using the wavelet-fuzzy approach achieving an average
accuracy of 85%. In [19-22], the results are presented only
for few specific recording taken from the MIT-BIH database
which is unfair due to the fact that variation in number of
records of different patients shall lead to degraded classification
performance. It is implicit from the table that implementation
of proposed methodology performs better by achieving an
overall accuracy of 97.98% and classifying four classes of
beats which is more in comparison with the various existing
methodologies provided in Table 6. While in the proposed
work, most of the records containing these three arrhythmia
(i.e PVC, V.Fib/V. Fl., 2o heart block) classes have been
considered which makes the proposed platform more adaptive
to the patients.
This work provides an efficient FPGA oriented SOC
based embedded platform for the accurate classification of
four class of heartbeats. Since the classification algorithm is
based on medical knowledge no training of the heartbeats is
Fig. 6. Embedded hardware with inputs and outputs based on required, rather only testing is performed for detection of
experimental development in Fig. 4. ECG beats in real time. While the methods presented in
Biomed Eng Lett (2015) 5:271-280 279

Table 6. Comparison of various methodologies implemented on FPGA.


Literature Method Number of classes Accuracy (%)
Cvikl et al. [19] Block + OSEA 2 92.36 (SE)
Ozdemir et al. [20] PCA + Neural Network 3 97.66
M. Cvikl et al. [21] Geometrical + OSEA 2 92.59 (SE)
Nambakhsh et al. [22] Wavelet + Fuzzy 3 85 (Avg.)
Proposed Thresholds + Rules 4 97.96

literature are supervised algorithms i.e they require training Ray KC declares that s/he has no conflict of interest in
and hence increases the computational complexity and time relation to the work in this article.
required for classification. The platforms allow users to
perform assistive diagnosis solutions, such as establishing a
baseline level of abnormal beats. They can further utilize the REFERENCES
system to monitor their daily number of abnormal beats and
investigate on their own if lifestyle changes which can [1] Hu YH, Palreddy S, Tompkins WJ. A patient-adaptable ECG
enhance the health care for potentially dangerous arrhythmic beat classifier using a mixture of experts approach. IEEE T
Biomed Eng. 1997; 44(9):891-900.
beats. [2] Cano-Garcia JM, Gonzalez-Parada E, Alarcon-Collantes V,
Since the platform is not specially designed for the Casilari-Perez E. A PDA-based portable wireless ECG monitor
TSK3000A processor, it can be suggested that the processing for medical personal area networks. Conf Proc IEEE Mediterr
speed can be further increased. The greatest benefit from the Electrotech Conf. 2006; 713-6.
[3] Chung WY, Yau CL, Shin KS, Myllyla R. A cell phone based
FPGA-based signal processing designs is the possibility of health monitoring system with self analysis processor using
multiplying the hardware cores. Namely, when the FPGA wireless sensor network technology. Conf Proc IEEE Eng Med
device and the algorithm for a multi-channel ECG analysis Biol Soc. 2007; 3705-8.
[4] Lee TS, Hong JH, Cho MC. Biomedical digital assistant for
are carefully selected, the number of ECG channels for QRS ubiquitous healthcare. Conf Proc IEEE Eng Med Biol Soc.
complex detection can be simply increased by multiplying 2007; 1790-3.
the hardware cores (detection logic) with no significant [5] Chen X, Ho CT, Lim ET, Kyaw TZ. Cellular phone based online
degradation of the overall processing speed. ECG processing for ambulatory and continuous detection.
Comput Cardiol. 2007; 34(2):653-6.
[6] Goh KW, Lavanya J, Kim Y, Tan EK, Soh CB. A PDA-based
ecg beat detection for home cardiac care. Conf Proc IEEE Eng
CONCLUSION Med Biol Soc. 2005(1); 375-8.
[7] Rodriguez J, Goi A, Illarramendi A. Real-time classification of
ecgs on a PDA. IEEE Trans Inf Tech Biomed. 2005; 9(1):23-34.
This study provides an enriched interface of hardware/ [8] Jin Z, Sun Y, Cheng AC. Predicting cardiovascular disease from
software implementation for real-time CVD monitoring. In real-time electrocardiographic monitoring: An adaptive machine
this paper, a FPGA oriented SOC based embedded platform learning approach on a cell phone. Conf Proc IEEE Eng Med
Biol Soc. 2009; 6889-92.
is developed and implemented for real time monitoring of
[9] Chazel PD, O'Dwyer M, Reilly RB. Automatic classification of
four ECG beats such as normal beat, PVC beat, V.Fib./Fl., 2o heartbeats using ECG morphology and heartbeat interval
heart block beat. The developed platform is evaluated in features. IEEE T Biomed Eng. 2004; 51(7):1196-206.
terms of specificity, sensitivity and accuracy of 97.72%, [10] Hu YH, Tomkins WJ, Urrusti JL, Afonso VX. Application of
artificial neural networks for ECG signal detection and
99.09% and 97.96% respectively. The future scope of this classification. J Electrocardiol. 1993; 26:66-73.
work is to increase the number of detectable arrhythmias and [11] Chazal PD, Reilly RB. A patient adapting heart beat classifier
to fabricate a handheld and low cost diagnosis and monitoring using ECG morphology and heartbeat interval fatures. IEEE T
device which shall provide assistive diagnosis solution to Bio-med Eng. 2006; 53(12):2535-43.
[12] Minami K, Nakajima H, Toyoshima T. Real-time discrimination
patients anywhere and at anytime. of ventricular tachyarrhythmia with fourier-transform neural
network. IEEE T Biomed Eng. 1999; 46(2):179-85.
[13] Melgani F, Bazi Y. Classification of electrocardiogram signals
with support vector machines and particle swarm optimization.
CONFLICT OF INTEREST STATEMENTS IEEE Trans Inf Tech Biomed. 2008; 12(5):667-77.
[14] Osowski S, Linh TH, Markiewicz T. Support vector machine-
Raj S declares that s/he has no conflict of interest in relation based expert system for reliable heartbeat recognition. IEEE T
to the work in this article. Maurya K declares that s/he has Bio-med Eng. 2004; 51(4):582-9.
[15] Osowski S, Linh TL. ECG beat recognition using fuzzy hybrid
no conflict of interest in relation to the work in this article.
280 Biomed Eng Lett (2015) 5:271-280

neural network. IEEE T Biomed Eng. 2001; 48(11):1265-71. [21] Cvikl M, Zemva A. FPGA-based system for ECG beat detection
[16] Lagerholm M, Peterson G, Braccini C, Edenbrandt L, Sornmo and classification. Conf Proc IFMBE. 2007; 66-9.
L. Clustering ECG complexes using hermite functions and self- [22] Nambakhsh MS, Tavakoli V, Sahba N. FPGA-core defibrillator
organizing maps. IEEE T Biomed Eng. 2000; 47(7):838-48. using waveletfuzzy ECG arrhythmia classification. Conf Proc
[17] Senhadji L, Carrault G, Bellanger JJ, Passariello G. Comparing IEEE Eng Med Biol Soc. 2008; 2673-6.
wavelet transforms for recognizing cardiac patterns. IEEE Eng [23] Tsipouras MG, Fotiadis DI, Sideris D. An arrhythmia
Med Biol. 1995; 14(2):167-73. classification system based on the RR-interval signal. Artif
[18] Linh T, Osowski SL, Stodoloski M. On-line heart beat Intell Med. 2005; 33(3):237-50.
recognition using hermite polynomials and neuron-fuzzy [24] Moody GB, Mark RG. The impact of MIT-BIH arrhythmia
network. IEEE T Instrum Meas. 2003; 52(4):1224-31. database. IEEE T Biomed Eng. 2001; 20(3):45-50.
[19] Cvikl M, Zemva A. FPGA-oriented HW/SW implementation of [25] Pan J, Tompkins WJ. A real-time QRS detection algorithm.
ECG beat detection and classification algorithm. Dig Sig Proc. IEEE T Biomed Eng. 1985; 32(3):230-6.
2010; 20(1):238-48. [26] Inan OT, Giovangrandi L, Kovacs GT. Robust neural-network-
[20] Ozdemir AT, Danisman K. Fully parallel ANN-based arrhythmia based classification of premature ventricular contractions using
classifier on a single-chip FPGA. Turk J Elec Eng Comp Sci. wavelet transform and timing interval features. IEEE T Biomed
2011; 19(4):667-87. Eng. 2006; 53(12):2507-15.

You might also like