Professional Documents
Culture Documents
Abstract—Cardiac arrhythmia indicates abnormal electrical R intervals, Heart rate and Heart condition. The purpose of
activity of heart that can be a great threat to human. So it needs classification is to identify various heart conditions with
to be identified for clinical diagnosis and treatment. Analysis of patients age/gender, R-R intervals and Heart Rate which helps
ECG signal plays an important role in diagnosing cardiac diseases. clinical cardiac diagnostic system. For this reason, artificial
An efficient method of analysing ECG signal and predicting heart neural network has chosen for classification because of its vast
abnormalities have been proposed in this paper. In the proposed use in machine learning areas and biomedical fields. For the
scheme, at first the QRS components have been extracted from the classification purposes Back propagation has chosen which is
noisy ECG signal by rejecting the background noise. This is done easy to utilize for proper classification. It is a feed forward
by using the Pan Tompkins algorithm. The second task involves
neural network which is used by training and testing data. Back
calculation of heart rate and detection of tachycardia,
bradycardia, asystole and second degree AV block from detected
propagation refers to backward propagation of errors so that
QRS peaks using MATLAB. The results show that from detected there is a minimum difference between estimated data and
QRS peaks, arrhythmias which are based on increase or decrease output data. In back propagation, an iterative way is used
in the number of QRS peak, absence of QRS peak can be mainly for this purpose so that all the weight can be updated to
diagnosed. The final task is to classify the heart abnormalities a new value after each iteration and a feed forward network is
according to previous extracted features. The back propagation chosen because here all the input, weight and hidden neuron are
(BP) trained feed-forward neural network has been selected for interconnected to each other.
this research. Here, data used for the analysis of ECG signal are
from MIT database II. PROPOSED METHODOLOGY
The Methodology of this proposed work can be predicted from
Index Terms— ECG; Tachycardia; Bradycardia; Asystole; figure (1) in Block Diagram.
Second degree AV block; Backpropagation.
ECG signal from
I. INTRODUCTION MIT – BIH database
Electrocardiogram (ECG) is the graph of voltage versus
time which is produced due to electrical activities of human
heart. An ECG signal consists of various parts such as P wave, Preprocessing and
QRS complex and T wave which are the waveform of removing Artifacts
corresponding electrical activities of various parts of the human
heart. During the analysis of ECG signal, data including the
positions or magnitudes of the QRS, PR, QT and ST intervals, QRS Detection by Pan
the PR and ST segments etc. are considered for accurately –Tompkins algorithm
diagnosing the heart diseases [1]. With the features present in
the ECG signal, it is possible to predict various cardiac
arrhythmias. There are many established algorithms for
Feature Extraction
extracting features from ECG signal to predict heart
abnormalities, for example, algorithms from the field of
artificial neural network [2], genetic algorithm [3], Wavelet
Transform [4] etc. Training
Sample
For analyzing the ECG signal and before the steps of feature Training Data tested Data
extraction, preprocessing of ECG signal is necessary because
signal is noisy and so many artifacts. For the analysis of ECG
signal MIT-BIH Arrhythmia Database [5] with patients
Information has been used. This database is a large collection Classification
of recorded physiologic signals and it has free web access for
researchers for their experimental purpose. For the
preprocessing purpose a widely popular technique called Pan-
Tompkins Algorithm has been adapted. This is for QRS
complex detection for the measurement of Heart beat (BPM) Normal Tachycardia Bradycardia Block
[6]. The proposed algorithm automatically calculate heart rate
and finds the Heart condition according to the measured Heart Figure 1. Block Diagram of Proposed Methodology
Beat (BPM). Extracted features are based on patient’s age, R-
Firstly ECG signals are collected from database and [8]. Initially the contaminated signal is processed by filtering,
preprocessed for removing artifacts and using Pan – Tompkins derivation, squaring, thresholds detecting and finally detecting
algorithm Q,R,S are identified for the heart rate calculation. the QRS complex [9].
This deflection of ECG signal is very important features for
identify various hearts conditions. A neural network is trained 1) Band Pass Flitering
with 26 datasets containing features of QRS complex with Signal passes through a band pass filter which is a cascaded low
patients age/gender, R-R intervals and Heart Rate with pass filter and high pass filter. This filtering process reduces
condition of hearts. After the training, the network is tested with noise in the ECG signal and an average QRS complex is found
12 more datasets. Tested results have gone through the same as by matching the spectrum of the signal. Noises like Muscle
by training datasets. noise, power line interference, baseline wander, T wave
interference are attenuated by band pass filtering. Pass band
III. METHODOLOGY WORK
maximizes the energy of QRS complex in the range of 5 Hz- 15
A. Preprocessing of ECG signal Hz. The cascaded low pass filter and high pass filter are
ECG signal collected from database is recorded signal that is described by the formula. For low-pass filter,
often contaminated with electrical interference or noise that is y(n)= 2y(n-1)-y(n-2)-x(n)-2x(n-6)-x(n-12)………………(1)
recorded from sources other than the electronic signals of the
heart. In order to eradicate noisy ECG signal we have to For High –pass filter,
preprocess the basic ECG signal. This preprocessing can be
done by two ways. y(n)= y(n-1)- 1/32x(n)-x(n-16)-x(n-17)+1/32x(n-32)……(2)
1) Preprocessing and 2) Derivation
2) Feature Extraction.
Preprocessing step eliminates electrical interference of ECG Signal then processed with derivative operator which is a
signal like power line artifacts, Electromyographic (EMG) standard technique to identify a peak in the signal. Derivative
noise, baseline wandering which are more significant among filter finds out the high slopes. It identifies the direction in the
artifacts and they can impact on ECG signal analysis. Feature slope of the signal and distinguishes the QRS complexes from
extraction step refers to obtain the most relevant information other ECG waves. It suppresses the low frequency components
from the original ECG signal. For this preprocessing and and a large gain to the high frequency components arises. The
feature extraction stage Pan – Tompkins algorithm has been signal is differentiated to find out QRS slope using the
applied. following formula:
maximum and minimum amplitude is also found by analyzing overfitting [11]. The back propagation algorithm can be divided
the ECG signal. Below are several steps for real time ECG into two phases:1) Propagation of errors and 2) Weight update.
signal processing and QRS detection. When the errors propagate in the backward direction, the
weight in the layers will change. It is an iterative algorithm to
• Data Acquisition from MIT-BIH database. minimize the mean square error between the desired output and
• Filtering the signal by using low pass filter and high the actual network output. This algorithm has limitation like it
pass filter. always changes weights in such a way to cause the error to fall.
• Differentiation of the signal that’s passes through TABLE I. CONDITIONS FOR HEART ABNORMALITIES
band pass filter.
• Squaring the differentiated signal for getting all Serial Heart Abnormalities Conditions
positive value. No
1 Tachycardia Heart
• Averaging, Threshold and integrating the squared Rate>100BPM
signal and clear R peak detection.
• Determination of R-R interval. 2 Bradycardia Heart
Rate<60BPM
• Calculation of heart rate by R-R interval.
3 Second Degree AV Block QRS dropped
For Heart Rate calculation,
4 First Degree AV Block Long PR
Heart Rate = 60/ R-R interval (m sec). interval
Complete Heart Complete drop
C. Feature Extraction 5 Block(Asystole) out of cardiac
cycle
By using the Pan–Tompkins algorithm, ECG signal is
preprocessed and we obtained peak values. Now for the
classification purposes, features are selected by four ways.
Age/gender (from MIT database), R-R intervals, Heart Rate are Table 1 shows the conditions for the different heart conditions.
chosen for the features for classification for different heart For the classification purposes second degree heart block, first
conditions. Firstly age is considered as 95 is the highest age, degree heart block and complete heart block are considered as
secondly gender is chosen as male= 1; Female= 0; other= 0.5, block condition. For scarcity of above mentioned conditions
thirdly R-R interval/max. of R-R inerval value is chosen and data we considered these for block.
finally heart rate is guessed (160 is the maximum value).
D. Classification IV. RESULT ANALYSIS AND DISCUSSION
In biomedical engineering and machine learning, Artificial Table 2 shows the extracted features for the sample signals
Neural Network (ANNs) are a family of statistical learning for different heart conditions and features are divided by four
algorithm inspired by biological neural network ( the central ways. Table 3 shows the confusion matrix for heart
system of animals) that are utilized to estimate or approximate abnormalities classification performance that shows the correct
functions that depend on a large number of inputs that are and incorrect predictions made by BPNN. Firstly 26 datasets
usually unknown [10]. For classification for different heart are trained and tested with 12 data. Three conditions for heart
conditions the ANN used in this work is based on back such as normal, bradycardia, tachycardia are classified
propagation (BP). perfectly but block condition is not correctly identified. Fig. 5
shows the iteration number to train error graph for training the
data set where mean square error decreases in the increasing of
iteration. It will be tends to zero of the higher value of iteration
number. The mean square error will not decrease sharply for a
value of iteration number. An approximate value of 0.056 after
which the value of mean square have not decreased sharply.
TABLE II. EXTRACTED FEATURES FOR SAMPLE SIGNALS Chf15 53/M 1.2 48.2 HEART BLOCK