You are on page 1of 5

2020 International Conference on Computational Performance Evaluation (ComPE),

North-Eastern Hill University, Shillong, Meghalaya, India. July 2–4, 2020

An Automatic Detection of Arrhythmia Disease


Diagnosis System based on Artificial Neural
Network and Support Vector Machine
Deepjyoti Kalita
Department of Electronics and Communication Engineering
Indian Institute of Information Technology
Guwahati, India
deepjyotikalitatihu@gmail.com

Abstract—Early detection of the heart disease by using Com-


puter Aided Diagnosis system (CAD) which can decrease the
mortality rate among the cardiac patients. Arrhythmia is also
a heart disease when the uniform pumping mechanism of heart
becomes non-uniform and this will make very small change in the
Electro Cardiogram (ECG) signal. But with the help of normal
eyesight it is very difficult to detect the irregular heart function
from the ECG signal early stage. In this paper work we have
presented an highly efficient method for detection of Arrhythmia
disease based on ECG signal. For our work we have taken
the ECG signal data from MIT-BIH. Then we have use pre-
processing method to remove the noise from the signal. Then we
have detect the peaks from the ECG signal and QRS Complex.
After that feature extraction method and process normalization
done using the wavelet transform technique. After that use
Artificial neural network to find out the input data is normal
or abnormal. Our system gives 99.5% accuracy rate in Support
Vector Machine (SVM) base and 99% accuracy rate in Artificial
Neural Network (ANN) based system to detect the Arrhythmia Fig. 1: ECG Signal with its all components
disease from the given ECG signal. All the experiments are
simulated in MATLab Software.
Index Terms—Computer Aided Diagnosis (CAD), Electro Car- But with the help of normal eye sight it may be difficult to
diogram (ECG), Arrhythmia, pre-processing, peak detection,
normalization, Support Vector Machine (SVM), Artificial Neural determine the disorder when it is very efficient to detect the
Network (ANN) non-uniform heart rate from the ECG signal with the aid of
computer aided system.
I. I NTRODUCTION The main steps of arrhythmia detection system are consist
In the current scenario cardio vascular disease (CVD) are of five stages [16]. Pre-processing, peak detection, feature
the primary source of death in the world due to the unhealthy extraction, normalization and neural network. ECG signal pre-
lifestyle such as smoking and drinking habits, diabetes mel- processing method include de-noising of the input signal and
litus, obesity etc [1-2]. The major cause of cardiac rhythm baseline correction methods. All the noise are removed in this
disorder abnormalities are atrial disorder and ventricular ar- steps to achieve the clear and sound input signal[17]. There
rhythmias defect. Cardiac arrhythmia is occur due to the non- are four peaks are present in one ECG signal P, Q, R, S and T.
uniform heartbeat. The heartbeat may be fast or slow compare QRS is called as and complex and it is the most important part
to the normal heart beat or may be sometimes fluctuating. The to detect any disease with the help of computer aided system
main symptoms of arrhythmia are weakness and pain in the [17]. For the details understanding of the process we have to
chest region [3]. So, to determine the disorder of the heart know the details about the ECG signal and its details.
rate we have need ECG signal. Electrocardiogram is a non- Now we will discuss how the ECG signal is generated from
invasive system i.e it will not affect the human body [13] and the heart. ECG is an electric signal which indicate the electric
it is very efficient. Heart signal are the bio-signal and which is activity of the heart [4-9]. This electric activity is performed in
non-stationary in nature. The ECG signal gives the graphical a specific graph. The one complete waveform of ECG signal
representation of the heart activity including all details like means the one time full cycle of the blood pump of the heart
heart rate, rhythm morphology etc [14-15]. With the help of chamber. So lots of information can be found from an ECG
ECG signal the doctors can determine the disorder of the heart. signal. The ECG signal is consist of P, QRS complex and T.

978-1-7281-6644-5/20/$31.00 © 2020 IEEE


728

Authorized licensed use limited to: UNIVERSITY OF ROCHESTER. Downloaded on September 20,2020 at 19:23:00 UTC from IEEE Xplore. Restrictions apply.
Fig. 3: Block diagram of Arrhythmia Detection System

Laboratory. The 48 half-hour excerpts were sliced into two


Fig. 2: The Anatomical structure of heart different groups-
• 23 (the 100 series) were taken at random from the
collection of over 4000 Holter tapes.
Before going to the peaks we have to understand the electrical
• 25 (the 200 series) were selected to insert examples
activity of the heart. There are four chamber in our heart. Two
of abnormal but clinically and physiologically prime
chamber are in upper side and two chamber are in lower side as
arrhythmias which will not be a good source of small
shown in the figure 2. Upper chamber are called as right atrium
random sample.
and left atrium and lower chamber is called as right ventricle
and left ventricle. The electric activity starts at SA (Sinoatrial) All the ECG signal which are used in our paperwork are
Node which is located at the top right atrium region. And this collected from MIT-BIH database. Those ECG signals were
electric activity spread to the all chamber through the purkinje consist of a binary file (.dat), text header file (.hea) and a
fibers and thus all the normal heart functions performs. So binary annotation file (.atr). The header file is consist of short
this all activities are shown with the help of ECG graphs. type of text file which describe the contents of the ECG signal
When the depolarization or contraction of the upper chamber including all clinical information. All the records are included
happens then the P wave is generated. After that the blood in binary file and some records are stored in annotation file.
goes to the ventricle or lower chamber with the help of the Annotation file signifies the labels, record timing of the signal
valve. In this case the upper chamber is in contraction mode etc.
and lower chamber is in normal mode. Then coming to the III. M ETHODOLOGY
QRS complex of the ECG signal. This QRS complex is one
of the most informative parts of the ECG signal. This gives The arrhythmia detection is very difficult tasks in some
the information about depolarization of the lower chamber and cases because sometimes it needs to check every heartbeat or
repolarization of the upper chamber. That means the chamber every ECG wave to detect the disease efficiently and accurate-
is in contraction mode and the upper chamber is in normal ly. It is very time consuming process for the physician [17].
condition mode. The T waveform of the ECG signal means So with the help of artificial intelligence we can design one
repolarization of the lower chamber. These all the cycle take smart computer aided system which can detect the arrhythmia
1000 m sec to complete the process. With the help of timing disease very accurately and efficiently for the ECG signal.
analysis a physician can easily detect the disorder of heart or From the block diagram we can easily understand the working
any functional effect in the regular heart cycle. In our design procedure of the whole mechanism.
system also can detect any abnormality of the heart with the In the block diagram we have seen that after taking the input
help of neural network on the ECG signal. data from MIT-BIH dataset we have use pre-processing block.
In the pre-processing stage the main target is to remove the
noise from the input signal. There are three types of noise in
II. MIT-BIH DATASET one ECG Signal-
The MIT-BIH dataset was the earliest high grade experi- • Electro-Myographic contamination noise (EMG noise)

mental dataset which is generally available and easy to use • Baseline wandering noise (BW noise)

in arrhythmia detection disease [7-10]. This dataset is used • Power line interface noise (A/C interface)

widely in lots of experimental research from the year of 1980 To reduce all the noise from the signal we have use discrete
and it is widely available at almost 500 various website. This wavelet transform (DWT) algorithm which is very strong
ECG dataset contain 48 half-hour exempts of the two channel for non-stationary biomedical signal. It is very effective and
also the ECG recordings gathered from 47 different subjects efficient signal processing tools for noise removal from the
almost for 24 hours which is studied by the BIH Arrhythmia input signal. In this process we have used Daubechies (db6)

729

Authorized licensed use limited to: UNIVERSITY OF ROCHESTER. Downloaded on September 20,2020 at 19:23:00 UTC from IEEE Xplore. Restrictions apply.
wavelet basis function to remove the noise and the ECG data
is splitted upto nine levels. The wavelet based transformation
gives more advantages include co-efficient compaction, dilu-
tion of noise and removal of redundancy. Baseline wander is
formed due to effects of electrodes impedance, respiration and
body movements. To remove the baseline wander removal we
have use FIR low pass filter, 200ms median filter for QRS
complex and 300ms median filter for T wave accordingly.
After the pre-processing process the input signal is goes for
feature extraction and peak detection methods.
There are almost 13 characteristic features are available in
an ECG signal. We have to detect all the feature for increasing
the efficiency of the system. The feature can be explained as- Fig. 4: Support Vector Machine
• Heart rate which can be detected the successive interval
between two QRS complex
• Change of the heart rate are two types of classification methods are used and in
• Width of the QRS Complex Region every case we have calculated the accuracy rate and compare
• Normalized fount entropy for the QRS complex region all the accuracy rate with all the existing techniques. The
• Normalized fount entropy for ST wave region neural network classification are used in various field like as
• Complexity framework of the QRS complex region aerospace, finance, healthcare, communication etc. For pattern
• Complexity framework of the ST wave classification process feed forward network has been used. The
• Spectral entropy detection feed forward neural network is very efficient due to the several
• R-T time interval number of hidden layers and lots of hidden neurons present
• Length between S-T segment region there. To upgrade the learning technique back propagation
• ST segment region divergence methodology has been used. With the assist of mean square
• ST segment region angle divergence error we have updated the weights in the network. After that
• ST segment region the classifier can be able to detect the normal and abnormal
All these feature should be detected to design highly ef- signal comparing with the training signal.
ficient system. We have used entropy based feature selection We have also used support vector machine algorithm (SVM)
methods in our design system. Entropy based measures can be for detection of normal or abnormal ECG signal classification
applied for measuring the correlations between uninterrupted technique and compare with neural network based classifica-
features as well, if the values are discretized properly in tion and all other existing one techniques. It is basically a
advance. Entropy based method is used to select the feature supervised learning algorithm. This technique is used because
and for extraction of the feature from the input linear DWT- it gives relatively very good well margin or separation between
depended technique and non-linear HOS-depended feature ex- the two classes and also it is very efficient for inflated
traction technique have been used. As the electrocardiography dimensional spaces. It is also very effective even the number of
signal are non-stationary in nature linear DWT-based give dimensions is significantly larger than the number of samples
the best and efficient performance in the feature extraction and it memory efficient also. SVM creates the optimized hyper
method. Nonlinear HOS-based feature extraction techniques plane which can minimize all the errors. The prime idea behind
is used to extract the features from non-stationary biomedical SVM is to identify the best marginal hyper plane (MMH). This
signal, non-linear and non-Gaussian signals. This methods is hyper plane divide the given dataset into different classes and
more efficient than liner DWT based methods thats why we the support vector point is located near to the MMH. All those
have used this methods in our designed system. The first and points are very important to form the classifier. The main aim
second order statistics takes part as utmost important role in is to differentiate the input dataset with best way. The distance
the processing technique of non-stationary biomedical signal. between two nearest point is named as the border of the
After completing the feature extraction block we have classifier. So, identify the hyper plane is the main target with
design one normalization process to normalize the different largest possible boundary in between the given dataset and the
feature which is got from the ECG signal. Because the support vectors. After set up the model we have experimented
quantities of the feature vector are different from each other. our dataset and all the results are shown and discussed in the
We have use a function called mapstd to normalize the input following section.
signal which is passed through he feature selection and feature
extraction block. They have zero mean value and also contain IV. R ESULTS AND A NALYSIS
unity standard deviation value. From MIT-BIH dataset we have simulate the input images
After the normalization process we have use classification with the help of our designed system and after the classifi-
methods for detection of abnormal or normal ECG signals cation technique we have calculated the sensitivity, specificity
comparing with the standard and normal ECG signals. There and accuracy. The expression for all these terms are-

730

Authorized licensed use limited to: UNIVERSITY OF ROCHESTER. Downloaded on September 20,2020 at 19:23:00 UTC from IEEE Xplore. Restrictions apply.
TABLE II: Comparison of the classification efficiency of the
proposed method and some other existing works on MIT-BIT
dataset

SL Accuracy
Related Literature Year Classifier
No Rate (%)
Pranv Rajpurkar
1 2017 CNN 97%
et al. (3)
Maedeh Kiani DWT
2 2102 96.5%
Sarkalehm et al. (4) ANN
3 Sean Franklin et al. (5) 2013 ANN 95%
Fuzzy Logic
Mehmet Engin
4 2004 with 98%
et.al. (6)
NN
Yuksel Ozbay
5 2001 ANN 96%
et al. (7)
Fig. 5: Classification Results based on Neural Network Clas- DBSCAN
sifier Prathibhamol and
6 2017 80%
Cp et al. (8) Logistic
Regression
Vasu Gupta SVM and
7 77.4%
TP + TN et al. (9) Random Forest
Accuracy(Acc ) = (1) 8 Yang et al. (10) 2018 Liner SVM 97.94%
TP + TN + FP + FN SVM 98.91%
9 Elhaj et al. (11) 2016
TP NN 98.90%
Sensitivity(Sen ) = (2) SVM 96.92%
TP + FN 10 Martis et al. (12) 2013
NN 98.78%
TN SVM 99.50%
Specif icity(Spe ) = (3)
TN + FP 11 Proposed Methodology
NN 99.00%
In this equation TP signifies true positive, TN denotes true
negative, FP means falls positive and FN means false nega-
tive.True positive means correctly detected beats, true negative
means correctly undetected beats, false positive means falsely
detected beats and false negative means falsely undetected
beats. All the experiments are simulated in the MATLab
environment taking 200 samples for our experiment. After
simulating the results we have got 100 true positive value and
99 true negative value in case of SVM classifier and 1 false
negative value. Similarly we have got 100 true positive value,
98 true negative value and 2 false negative value in case of
neural network classifier. After getting all these value we can
easily calculated the accuracy, specificity and sensitivity value
and listed in the table 1.
TABLE I: Classification outcomes of the proposed methods Fig. 6: Classification Results based on Support Vector Machine
with the two different classifiers SVM and Neural Networks Classifier

Sensitivity Specificity Accuracy


Classifier
(%) (%) (%) rate. In the figure 5 and 6 we have showed the classification
Neural Network 98.03 100.00 99.00 results in the bar diagram.
Support Vector Machine
99.00 100.00 99.50
(SVM) V. C ONCLUSION
When any patient goes to the cardiac specialist physician
From the table 1 we have found that in Artificial Neural to check-up his or her heart then the physician first advised
Network based classifier technique the accuracy rate is almost him to do Echocardiogram always. So ECG is an important
99% and specificity is 100% and sensitivity is 98.03%. When diagnosis methodology which gives lots of details information
we have used support vector machine algorithm on the ECG to detect any disorder or diseases in heart. Arrhythmias is also
signal to detect Arrhythmias disease, we have found that a one kind of heart disorder which is cause of slow or fast
99.50% accuracy rate including 100% specificity and 99% heart rate. So it will be very helpful for our society if we
sensitivity. In the table 2 we have compared our proposed can detect cardiac disorder early and efficiently. Sometimes
methodology with various existing works in terms of accuracy doctors also may be take much longer time for diagnosis,

731

Authorized licensed use limited to: UNIVERSITY OF ROCHESTER. Downloaded on September 20,2020 at 19:23:00 UTC from IEEE Xplore. Restrictions apply.
but with the help of computer aided system using cutting [15] T. Thom, N. Haase, W. Rosamond, V. J. Howard, J. Rumsfeld, T.
edge technology it will make the process of diagnosis very Manolio, Z.-J. Zheng, K. Flegal, C. ODonnell, S. Kittner, D. Lloyd-
Jones, D. C. Goff, Y. Hong, R. Adams, G. Friday, K. Furie, P. Gorelick,
quick. In our proposed methodology also we have use two B. Kissela, J. Marler, J. Meigs, V. Roger, S. Sidney, P. Sorlie, J.
types of classification algorithms. One is neural network based Steinberger, S. Wasserthiel-Smoller, M. Wilson, and P. Wolf, Heart
algorithm and other one is support vector machine algorithm. Disease and Stroke Statistics2006 Update, Circulation, vol. 113, no. 6,
2006.
In artificial neural network based technique we have got 99% [16] M. A. Hadhoud, M. Eladawy, and A. Farag, Computer Aided Diagnosis
accuracy rate whether in case of support vector machine we of Cardiac Arrhythmias, 2006 International Conference on Computer
have got 99.5% accuracy rate. So with the help of our proposed Engineering and Systems, 2006.
[17] C. Li, C. Zheng, and C. Tai, Detection of ECG characteristic points using
technique we can easily detect the arrhythmia disease at early wavelet transforms, IEEE Transactions on Biomedical Engineering, vol.
stage with high accuracy rate which can reduce the mortality 42, no. 1, pp. 2128, 1995.
rate of the cardiac patient in our society.

ACKNOWLEDGMENT
We are so grateful to MIT-BIH dataset and the BIH
Arrhythmia Laboratory for providing the great and easily
understandable dataset for conducting our experiment.

R EFERENCES
[1] Mathers C, Lopez A, Stein C, Fat D, Rao C, Burden Of Disease In Rural
India: An Analysis Through Cause Of Death, The Internet Journal of
Third World Medicine, vol. 2, no. 2, 2005.
[2] D. Benitez, P. Gaydecki, A. Zaidi, and A. Fitzpatrick, The use of the
Hilbert transform in ECG signal analysis, Computers in Biology and
Medicine, vol. 31, no. 5, pp. 399406, 2001.
[3] A. Y. Hannun, P. Rajpurkar, M. Haghpanahi, G. H. Tison, C. Bourn,
M. P. Turakhia, and A. Y. Ng, Publisher Correction: Cardiologist-level
arrhythmia detection and classification in ambulatory electrocardiograms
using a deep neural network, Nature Medicine, vol. 25, no. 3, pp.
530530, 2019.
[4] M. K. Sarkaleh, Classification Of Ecg Arrhythmias Using Discrete
Wavelet Transform and Neural Networks, International Journal of Com-
puter Science, Engineering and Applications, vol. 2, no. 1, pp. 113,
2012.
[5] Franklin, Sean and Wallcave, Joseph, “Cardiac condition detection
using artificial neural networks,” Senior Project Electrical Engineering
Department, California Polytechnic State University, San Luis Obispo,
June 2013.
[6] M. Engin, ECG beat classification using neuro-fuzzy network, Pattern
Recognition Letters, vol. 25, no. 15, pp. 17151722, 2004.
[7] Y. Ozbay, Classification of Electrocardiogram Arrhythmias Using Neural
Networks, Intelligent Engineering Systems Through Artificial Neural
Networks, Volume 17, pp. 5762, 2001.
[8] P. Cp, A. Suresh, and G. Suresh, Prediction of cardiac arrhythmia type
using clustering and regression approach (P-CA-CRA), 2017 Interna-
tional Conference on Advances in Computing, Communications and
Informatics (ICACCI), 2017.
[9] V. Gupta, S. Srinivasan, and S. S. Kudli, Prediction and Classification
of Cardiac Arrhythmia.
[10] W. Yang, Y. Si, D. Wang, and B. Guo, Automatic recognition of
arrhythmia based on principal component analysis network and linear
support vector machine, Computers in Biology and Medicine, vol. 101,
pp. 2232, 2018.
[11] F. A. Elhaj, N. Salim, A. R. Harris, T. T. Swee, and T. Ahmed,
Arrhythmia recognition and classification using combined linear and
nonlinear features of ECG signals, Computer Methods and Programs in
Biomedicine, vol. 127, pp. 5263, 2016.
[12] R. J. Martis, U. R. Acharya, and L. C. Min, ECG beat classification
using PCA, LDA, ICA and Discrete Wavelet Transform, Biomedical
Signal Processing and Control, vol. 8, no. 5, pp. 437448, 2013.
[13] A. J. Chashmi and M. C. Amirani, An efficient and automatic ECG
arrhythmia diagnosis system using DWT and HOS features and entropy-
based feature selection procedure, Journal of Electrical Bioimpedance,
vol. 10, no. 1, pp. 4754, 2019.
[14] J. P.kelwade and S. S. Salankar, Prediction of Cardiac Arrhythmia
using Artificial Neural Network, International Journal of Computer
Applications, vol. 115, no. 20, pp. 3035, 2015.

732

Authorized licensed use limited to: UNIVERSITY OF ROCHESTER. Downloaded on September 20,2020 at 19:23:00 UTC from IEEE Xplore. Restrictions apply.

You might also like