Sei sulla pagina 1di 28

Classification ofECC signals chapter 4

Chapter 4: Classification of ECG Signals

4.1 Introduction
Automatic ECG analysis is basically aiming towards automatic classification of different cardiac events or
in other words the occurrence of pathological conditions in heart. Research on techniques to recognize and
classify the ECG on a stored database like Holter ECG analysis or detection on real-time basis are
accelerated with the development of modem high-end computers and different software tools.
Classification depends on a basic fact that ECG pattern takes different morphology in different cardiac
disorder. Hence there is a change in the time or amplitude features in ECG waveform. For this reason
almost all kinds of classifiers are based on the features. The general scheme for automatic classification is
represented by block diagram in figure 4.1.

Raw ECG Signal

Figure 4.1: Block schematic of a typical classifier

85
Classification ofECG signals chapter 4

Though the block diagram is self explanatory, still it is worthwhile to mention that computerized ECG
classification is an algorithmic procedure where feature set selection and extraction is of immense
importance as classifier solely depends on the accuracy of the features.
It is worthwhile to mention that there is definitely a change of ECG pattern in most of cardiac abnormalities
with respect to the normal beats. This variation in ECG rhythm can be divided into two categories -
variation that does not change periodicity of ECG and variations that alters the signal by making it non­
periodic. Myocardial Infarction is one of the examples of diseases of first kind and Cardiac Arrhythmia,
Arterial Fibrillation, Ventricular Fibrillation etc. are the examples of second type.
It is not possible to work with all possible kinds of cardiac abnormalities in the scope of this thesis, but one
is each category of ECG pattern is considered here for generality. In this chapter three different
classification techniques are discussed for the two different types of cardiac abnormalities. Section 4.2
presents the method of detection of Myocardial Infarction (MI) using supervised classification technique, in
section 4.3 the method of binary coding based logical classifier for arrhythmic beats detection is discussed
and the classification technique for Premature Ventricular Contraction (a special pattern generated by
ventricular arrhythmia) using Artificial Neural Network is elaborated in section 4.4.

4.2 Supervised Classification Technique for MI Detection


Myocardial Infarction is a disease that results from lack of sufficient blood supply in the myocardium. In
this chapter the method of detection of MI is described using supervised classification technique. This is
basically a pattern recognition problem which categorises the input data into identifiable classes via the
extraction of significant attributes of the data from the background of irrelevant details [130] - [131]. In
biomedical engineering domain, the signal may be represented by the feature vector or measurement vector
constructed with the quantitative features as,

X =(*,, x2,x3,....,xn)' (4.1)

Vectors constructed from similar objects are expected to form a cluster. For efficient pattern classification,
accurate pre-processing of the signal and feature extraction is very essential. The following sections explain
the supervised classification method and its application for MI detection.

86
Classification ofECG signals chapter 4

4.2.1 Importance of MI Detection and pathological features


Myocardial Infarction is a coronary artery disease mainly results from shortage of adequate supply of blood
towards the myocardial regions. Because of deposition of fatty acids, lipid etc., the coronary artery
becomes partially blocked which results in insufficient blood supply to heart cells. If this condition is left
untreated for a long period of time, it can cause damage or death of heart muscle tissues leading to heart
attack. Apart from other physiological diagnosis, it is possible to detect MI from the changes of patterns in
ECG. The prominent variations in ECG due to MI are as follows:
• ST segment elevation or depression is noticed
• Large and/or inverted T wave
• A pathological Q wave is developed
• Q to R amplitude ratio change occurs

Figure 4.2 shows the possible pathological changes in ECG pattern due to MI. Any one of these or more
may occur during MI. Thus a MI classifier based on features requires the following parameters to be
detected:
• Q onset
• Q peak
• R onset
• R peak
• ST segment onset
• ST segment end
• T wave onset
• T wave end
• T wave direction
• T wave shape
The required features are pictorially depicted in figure 4.3.

87
Classification of ECG signals chapter 4

Figure 4.3: Conventionally required features for MI detection

4.2.2 Feature Reduction

Figure 4.4: Reduced features required for MI detection

88
Classification ofECG signals chapter 4

Any error in extraction of these features may misclassify the ECG pattern and more number of features
leads to rather complicated classifier which involves more computational cost and time. In view of this
intuitive feature minimization is made. It is noticed that all the irregularities noticed in MI are confined in
the Q onset to T end section of ECG. So signal complexity of this section can be treated like a figure of
merit of the condition of heart. In other words ‘form factor’ of QT segment is calculated along with the
same of a complete wave between two consecutive R peaks. Thus the numbers of required features are
reduced as mentioned below:

• Two consecutive R peak points


• Q onset point
• T end point
Thus required numbers of detectable parameters are reduced. The required points are indicated in figure
4.4.

4.2.3 Form Factor (FF) [132], [133]


Form factor is a measure of complexity of a signal. It increases with the increase of variance present in the

signal. It is an indication of the variance of signal activity. Activity of a signal x(n) is calculated as the
variance ax2 of the stipulated segment of the signal. From the activity of the signal, mobility Mx is
calculated as the ratio of square root of the activity of the first derivative of the signal and Square root of
the original signal. Thus

Mv=(-i)1/2
(4.2)
<T <7

where x’ stands for the first derivative of x.


Complexity or the Form Factor is defined as ratio of the mobility of the first derivative of the signal to the
mobility of the signal itself. That is,

FF = (4.3)
CTr. / Cx

89
Classification ofECG signals chapter 4

As indicated earlier FF is a treated as an indicative parameter of prospective change in QT and RR section


of ECG in MI with respect to normal beats. This feature is also used in arrhythmic beats classification as a
key parameter, which is described in next sections.

4.2.4 Method of Supervised Classification [133], [134]


In this method a number of feature vectors with known class are provided, which are called training data
set. This training sat is used to develop mathematical functions that characterize the separation between the
classes. Then the mathematical functions can be applied to new feature vector of unknown classes to
recognize them. This new feature vectors are called test set. The technique to find out the linear decision
function or discrimination function is explained below.
A general linear discrimination function is of the form,

d (X ) = w, x, + w2x2 +..............+ w„ x„ + wll+1 = WT X (4.4)

where X = (x,, x2, x3xn, 1)T is the feature vector which is augmented by an additional entry equal

to unity and W = (w,, vv2, w,wn, vv’)Hl)' is the augmented weight vector corresponding to the

feature vector.
For a general M class pattern classification M number of decision functions are required such that,

> 0 if X £ C,.
dj(X) = W‘X (4.5)
< 0 otherwise

where Wi = (wn, wi2, Wriwjn, W(. n+I)' is the weight vector for class Ct.
Three cases may arises in solving this problem [16].
CASE 1:
Each class is separable from the rest by a single decision surface:

if d.t{X) > 0 then X e Cf

90
Classification ofECG signals chapter 4

CASE 2:
Each class is separable from all other classes individually by a distinct decision surface, i.e., the classes are

M(M —1)
pair-wise separable. There are------ ------- decision surfaces given by,

dij(X) = W!'jX (4.6)

if d!f (X) > 0 V j ^ i then X e C; (4.7)

[dQ{X)=-d„{X)\
CASE 3:

There exists M decision function dk (X) = Wk X, k = 1,2,3,.... ,M , with the property that,
if d,(X) > d,(X) V j i, then X e Cf (4.8)
This is a special instance of case 2. It can be defined that,

dij(X)=di(x)-dJ(x)=(wi-wJ)r x=w;; x (4.9)

Figure 4.5: Two dimensional feature vectors of two classes Cl and C2 along with the
decision function d(x)

91
Classification ofECG signals chapter 4

If the classes are separable under case 3, they are separable under case 2 but the reverse is not true, in
general.
Patterns which are separable by linear decision functions as described above are called linearly separable.
But infinite numbers of complex decision functions may be formulated using generalized discrimination
function based on nonlinear functions of feature vectors.

In present case the disease MI is classified against the normal ECG beats, thus the classification is done
within two possibilities. A two-class pattern classification problem may be represented as,

> 0 if X e C,
d(X) = WrX (4.10)
<0ifXe C,

where C] and C2 represent the two classes. The discriminant function may be interpreted as the boundary

separating the classes C, and C2. This is shown in figure 4.5.

4.2.5 Detection of Myocardial Infarction


The proposed supervised classification technique is training and testing based method. For detection of MI
using the proposed method, first the feature vector is to be formed from the known or training dataset and
next the discrimination function is to be calculated by using these feature vectors. Finally the unknown
dataset is to be applied on the decision function to check the viability of the algorithm.

92
Classification of ECC signals chapter 4

4.2.5.1 Feature extraction

Figure 4.6: Sections of ECG wave required for MI detection


Features as indicated earlier are extracted from the ECG records taken from Physionet PTB diagnostic
database. For convenience V2 lead data is considered for classification.
1. The data is filtered by the method explained in chapter 2 or 3.
2. Then two consecutive R peaks are detected to capture a complete wave (as in chapter 2 or 3).
3. The Q onset and T offset points are also detected to select the QT section of each beat for the
calculation of form factor. Thus the form factor values of RR section and that of QT section generates the
feature vector for each ECG beat. Typical RR and QT segments are shown in figure 4.6.

4.2.5.2 Training
To make the detection convenient and less time consuming two features are detected-form factor of RR
section and form factor of QT section of an ECG wave. The steps of computation of decision function are
given below:
1. The prototype feature vectors or the mean feature vectors are calculated from the normal and MI data
from training set. It is the mean value of the feature vectors of each class. For the training data set
considered here, the prototype vectors are (1.505, 1.064) and (1.305, 1.088) for Myocardial Infarction
group and normal group respectively.
2. The equation of the straight line joining the two prototype vectors is computed. The normal bisector of
this line is the optimal Mnear decision function.

93
Classification ofECG signals chapter 4

3. The equation of the linear decision function is given by,

FFRli - 0.91863 x FFQr - 0.45167 = 0 (4.11)

The decision rule is as follows:

< 0, beat under test is NORMAL


If FFrk - 0.91863 x FFqt - 0.45167 (4.12)
> 0, beat under test has MI
For the generation of prototype vector and linear decision function, 40 databases are chosen arbitrarily from
physionet ECG library as the training dataset.

4.2.5.2 Testing

Feature vector representation for test data

Figure 4.7: Feature vector space for test database [ ‘o’ stands for normal and **’ stands for MI]

The proposed classification rule for identification of myocardial infarction is tested and validated against
95 databases taken from same source, among which 50 are normal and 45 are infarcted. 175 beats are
considered from the databases for testing where 100 and 75 beats are from normal and MI categories
respectively. Feature vectors are calculated for all the samples using the form factor value of RR interval
and QT interval as mentioned in the earlier section. The decision rules as in equation 4.12 are applied to the

94
Classification ofECC signals chapter 4

feature vectors of unknown samples for testing and the beats in the signals are automatically classified as
normal or MI. The feature vector space and the decision boundary are shown in figure 4.7.

4.2.6 Experimental Results and Analysis


Experimentally it is seen that the form factor values of RR and QT intervals for normal and MI beats are a
good distinguishable parameter between them as indicated in the table 4.1. Thus it is clear that FF of QT
has lower values than that of MI. This is the basis of training and classification using this method.

TABLE 4.1: PARTIAL LIST OF FORM FACTOR VALUES FOR RR AND QT INTERVALS
Database and Form Factor Values
Serial No.
Patient id FF of RR FF of QT
1 Patientl22s312 1.3211 1.123
2 Patient 180s490 1.2736 1.2165
3 Patientl98s402 1.2921 1.1468
4
N Patient! 85s336 1.3056 1.1252
5 0 Patient 174s300 1.2924 1.1133
6 R
Patient236s462 1.3086 1.1.38
M
7
A Patient235s461 1.205 1.189
L
8 Patient276s504 1.1937 1.3058
9 Patient239s467 1.3549 1.1783
10 Patient237s465 1.285 1.1224
1 Patient35s 124 1.4679 1.0322
2 Patient36s 111 1.5115 1.0252
3 Patient41sl32 1.6501 1.0393
D
4 Patient46sl56 1.6812 1.0698
I
5 S Patient25s 150 1.6919 1.0447

95
Classification ofECG signals chapter 4

Database and Form Factor Values


Semi No.
Patient id FFofRR I FFofQT
6 E Patient48sl72 1.5979 1.0432
A
7 Patient 14s56 1.6877 1.0307
S
8 E Patient 141 s307 1.5676 1.007
D
9 Patientl52s004 1.5366 1.0697
(M.I)
10 Patient 163s034 1.5074 1.0967
N - Nornal; MI - Myocardial Infarction

.Figure 4.7 clearly depicts that the normal ECG and myocardial infarcted ECG are well separated by the
proposed classification method. It is noticeable that the classification accuracy solely depends on Form
Factor values which in turn depend on feature extraction accuracy. Figure 4.7 further shows that among all
95 databases under test only two normal beats and three MI beats are misclassified by the proposed
supervised learning based decision function. In view of this three performance indexes are used as
sensitivity, specificity and accuracy.

TP + TN
Accuracy (%) = ----------------------------- X100%
TP + FN + TN + FP
where TP stands for true positive, TN for true negative, FP stands for false positive and FN stands for false
negative. Definition of sensitivity and specificity are already given in section 3.4.5. Table 4.2 shows the
performance parameter values.

TABLE 4.2: PERFORMANCE PARAMETERS OF SUPERVISED LEARNING BASED CLASSIFIER


Sensitivity (%) Specificity (%) Accuracy (%)
96% 98% 97.14%

It is seen that the detection parameters are moderately good for the small group of training and testing
dataset. Table 4.1 indicates that the use of Form Factor of the stipulated segment of signal as a
classification parameter enables the classifier to handle less number of feature; thereby making it fast and
simple. Classification parameters as indicated in table 4.2 are found satisfactory for the two class
classification. It is expected to get better result with larger data set. As the periodicity of ECG signal is

96
Classification of ECC signals chapter 4

retained in MI, the beats from a particular subject within a specific interval are expected to be similar,
hence more beats from the same subject is not considered.

4.3 Classification of Arrhythmic Beats using Binary Logical Classifier


Classification of arrhythmia may be done in two ways - by identifying arrhythmic events like bradycardia
or tachycardia and by detecting the arrhythmic beats. In this section a novel binary coded classification
technique is presented for detection of some cardiac arrhythmic beats. Proposed algorithm first generates a
beat status word based on QRS temporal features and signal complexity of a complete wave and classifies
the beat by a bit status check procedure. Modified lead II files of MIT-BIH Arrhythmia database is used for
classification of normal (N), PVC (V), RBBB(R), LBBB (L) and Paced (P) beats. Apart from that the
databases have atrial premature beats, ventricular flutter and escape beats etc. which are not considered in
this work and marked as ‘other’.

4.3.1 Importance of Arrhythmic beats detection


Sino-atrial (SA) node is the natural pacemaker that generates the electrical impulse. This electrical impulse
is propagated throughout the heart muscle to produce the rhythmic beating of heart. The natural rhythm of
heart may be altered due to abnormalities in impulse formation or conduction. This disorder in heart rhythm
is called cardiac arrhythmias .Cardiac arrhythmias represent a problem with the change of rate of rhythm of
heart. It can make heart to beat too fast, too slow or with an irregular rhythm. At arrhythmic condition,
pumping of blood may not be sufficient and hence lack of blood flow can damage the brain, heart, or other
organs. Thus arrhythmia is a serious threat to the patient especially for those recovering from acute
myocardial infarction. Origin and importance of detection of the selected arrhythmic beats are briefed
below.
PVC beats generate when ventricles fire prematurely or prior to atria and are no way related to the
performance of SA node. It is reported that the occurrence of PVCs may lead to sudden cardiac death
especially in the presence of myocardial infarction. Occurrence of PVC with higher frequency indicates
greater intensity of cardiac abnormality. So immediate detection and treatment of PVC is very essential for
the patients with different heart diseases. An erratic beat morphology with a significant change in heart rate
indicates the presence of PVC beat.

97
Classification of ECG signals chapter 4

Normal and PVC (middle) beat Paced beat BBB beat

k i| fll n J
.
Figure 4.8: Normal, PVC, Paced and BBB beat morphology
k
The cardiac impulse propagates from the AV node to entire ventricular region through the Bundle of His. It
is divided into right and left bundle branches. The right and left ventricles contract almost simultaneously
when the right and left bundle branches function normally. When the bundle branch is camaged due to any
heart disease or cardiac surgery, it cannot carry the impulse properly resulting a slow rate of propagation
and/or a different pathway for the impulse. Thus bundle branch block (BBB) alters the normal and
directional propagation of electrical impulse in the two ventricles. Right bundle branch block (RBBB)
slows or ceases the conduction in right ventricle and LBBB does the same for left ventricle. Though RBBB
has no appreciable medical significance, LBBB can be treated as an indication of underlying cardiac
abnormalities like coronary artery disease, arterial valve disease, cardiomyopathy etc. So it is required to
detect the BBB as it originates. Longer QRS duration and prolonged ventricular activation time or QR
interval confirms the presence of BBB.
Paced beats are artificial beats generated by pacemaker. A pacemaker is an external pace setter for hearts
with extremely slow heart rate. Slow heart rate is mostly due to the blockage in arteries in cardiac
conduction system and it may lead to weakness, fainting, breathlessness and death. Typical morphology of
normal, PVC, Paced and BBB beats are shown in figure 4.8.

98
Classification ofECC signals chapter 4

4.3.2 Generation of features


Though the test signals are band pass filtered, still some high and low frequency noises may present in the
signals (as noticed in some files) and thus further filtering is required. Hence Wavelet or Empirical Mode
Decomposition based signal enhancement and feature extraction algorithm may be used as explained in
chapters 2 and 3 respectively. It is noticed from the study of different arrhythmic beats that the wave shape
changes are mostly confined in the QRS complex region. Hence QRS complex features are trapped used for
classification. But apart from that form factor of an entire wave is also considered to keep the wave shape
variation in other parts of the ECG, if any. Keeping all these in mind, the following features are
determined.

• Form Factor (FF)


Form Factor is used here to isolate the Premature Ventricular Construction beats from the other test beats.
It is noticed that the PVC beats have a nonconventional structure and sometimes it becomes totally erratic.
At that time it is very difficult to identify the characteristic points of ECG accurately. Being the sharpest
and most prominent one, only R peaks are distinguishable in most PVC beats. The form factor of each
wave between two consecutive R peaks is computed. The erratic nature of PVC beats increases the
complexity of the signal by increasing the variance, which is represented by its FF value. It shows great
variation between the FF values of PVC and non-PVC beats as shown in next section.

Heart Rate (HR)


Heart rate is one of the vital factors for arrhythmia classification. It is defined as number of beats occurring
per minute and calculated as,

60
HR = (4.15)
RtoR
where RtoR stands for the time interval between two consecutive R peaks.
PVC beats appear much earlier than the normal beats and thereby abruptly increases the heart rate. So heart
rate change is a measure of PVC beats.

99
Classification ofECG signals chapter 4

• Presence of R’Peak
R’ peak is a sharp notch near the R peak in the QRS complex. Presence of R’ peak is a definite indication
of BBB. It may appear in either QR or RS sector of QRS complex. As QR and RS sectors are more or less
constant slope regions, so any change in the direction of slope is predictive of the presence of R’ peak. As
the element by element difference is approximately the slope of an equi-sampled digitized data, change in
the sign in difference value and persistence of the same for a stipulated time intervals for 4 samples
indicates the occurrence of R’ peak.

• QR/RS Ratio and S peak length


In case of BBB, the QRS duration extends to a certain extent. For RBBB the later part of QRS section
extends more and it results in a longer S deflection. To classify the type of BBB these two features are

QR
measured. ----- ratio is the ratio between the OR duration and RS duration. S length is measured as the
RS
magnitude of the peak from the zero potential line.

4.3.2 Method of Binary Logical Classification


Binary logical classifier is an arrhythmic beat classifier which first codes the test beats to form a beat status
word and then the status is checked bit-by-bit to comment on the condition of the ECG beat. The method is
elaborated below in detail.

4.3.2.1 Coding
As normally the feature set is non-stationary and has a wide variation for same type beats and obviously
for different type beats also, it is very difficult to deal with the features directly. For example, PVC beats
have a completely different pattern and different PVC beats show different morphology too. But fortunately
there are some typical values for the features for different categories though they are not fixed. So here a
code is generated depending on the probable feature values. The code is formed by 5 binary bits and stands
for the signature of a beat. Each bit or a combination of two bits represents a feature as extracted earlier.

100
Classification ofECG signals chapter 4

Coding makes the classification easier. The method of assigning a code to a feature is explained below and
also pictorially represented in figure 4.9.
1) It is experimentally seen that as signal complexity is high for PVC beats, the value of FF for PVC
beats is completely different and larger from the other test beats. So it is a measure of the presence of PVC
beat. For confirmation the heart rate is calculated which is higher than the normal or any other beats. So if

FF value is greater by a predetermined value iVl than that of its earlier beat and if heart rate change is

more than a predetermined value N2 for the same pair of beats, than D4 is set to 1, or it is 0.

2) D3 beat stands for the R’ feature. The presence of R’ peak corresponds to D3 = 1, otherwise it
is 0.
3) D2 and D\ are collective bits. It is related to QRS duration as follows:
4) If QRS _ duration <= H1 then D\ = 0, D2 = 0

5) If H2 =< QRS _ duration < H1 then D\ = 1,D2 = 0

6) If QRS _duration >H2 then D1 = 0, D2 = 1

It is noticed that the QRS duration for BBB beats and that for paced beats are more than the normal QRS
duration. Hence this coding will be helpful for classification of the test beats other than PVC beats. H1 and

101
Classification ofECG signals chapter 4

H2 are experimentally determined constants based on QRS complex duration and their values are shown in
figure 4.10.

QRS DURATION

NORMAL BBB PACED

4—-------------------------- ► ■#------------------*■ ---------------- ►


0.077 sec 0.114 sec

Figure 4.10: Segmentation of QRS duration

QR
7) If ratio is greater than a certain value M or if S wave height is more than L then DO = 1,
RS
otherwise it is 0. This bit is related to BBB beats.

4.3.22 Classification
The technique for classification of different arrhythmic beats is illustrated in figure 4.11. Intuitively the
arrhythmias are classified based on the values of the features, in turn, depending upon the status of the code
bits. The PVC beat is identified first. As mentioned earlier, PVC beat is classified based on FF value and
heart rate. Both of these parameter abruptly changes at the onset of PVC beats and thus it is detected by a

simple if —elsebased rule. For two consecutive PVC beats, this change is not possible to occur. In that

case individual FF value for each beat should exceed a certain predetermined value. Experimentally it is
seen that this value should be 1.2. If any of these conditions occur, D4 is set at 1 which indicates the test
beat to be a PVC type irrespective of other bits.
If D4bit status is 0 then bit D3 is checked. A complete BBB generates a sharp notch like R’ peak in the

QRS section. As D3 bit is assigned with this feature, a 1 in D3 bit indicates the presence of complete
BBB. But the presence of R’ peak is not mandatory in BBB. So further inspection is required for detection
incomplete BBB or BBB without R’ peak as discussed later in this section.

102
Classification ofECC signals chapter 4

Next the status of bits D2 and D\ are checked collectively. It deals with the QRS duration feature.
Normal beats have the minimum value of QRS duration among all the test beats considered here. It is
followed by BBB with paced beat having the largest duration of QRS complex. Depending upon this
feature normal and paced beats are separated with lower and higher range of QRS duration for normal and
paced beats respectively and middle one is for BBB as shown in the figure 4.10. The values of HI and H2
are also indicated in the figure.

Figure 4.11: Binary logic classifier flowchart

103
Classification ofECG signals chapter 4

Some BBB beats may not have R’ peak but there QRS duration is longer than the normal along with a

larger RS section and S height. If any of these features is present, DO bit status is high indicating a BBB
beat without R’ peak. For longer S wave, obviously the RS section will be longer than QR section and

QR
hence----- ratio should be less than unity for BBB beats.
RS

4.3.4 Experimental Results


The proposed method is tested against 35 files of MIT-BIH Arrhythmia database with s-.gnals of 5 minutes
duration. For each beat the main distinguishing features are extracted as explainec earlier for better
classification. To eliminate the complexity of classification some binary bits are set or reset depending
upon the range of the value of features. Thus five bits are used to form a beat status word. Each bit has a
higher weight than che bits of its right. So a bit by bit scan accurately classifies the test beats.
The performance of the algorithm is checked with some performance parameters like Accuracy, Sensitivity
and Positive Predictivity and the values of these parameters are tabulated in table 4.3. Positive predictivity
is defined as,

TP
Positive Predictivitv (Pp%)=-------------Xl00%
‘ TP + FP
Other performance parameters are already defined in sections 3.4.5 and 4.2.6.

TABLE 4.3: PERFORMANCE PARAMETERS OF BINARY LOGICAL CLASSIFIER


Beat type No. of beats TP FN FP Acc (%) Se (%) Pp (%)
Normal 9596 9589 7 9 99.93 99.92 99.90
PVC 992 966 26 12 97.38 97.1-7 98.77
BBB 2488 2367 121 59 95.14 95.13 97.56
Paced 992 985 7 18 99.29 99.29 98.21

The efficiency of the proposed method depends on the accuracy of feature extraction as the features form
the status word. Verification of five bit status word is made bit by bit starting from the ltft side. As each bit
is set to 1 depending upon a specific feature condition, there is no scope of overlappirg of decision. For

104
Classification ofECG signals chapter 4

example, when heart rate and form factor value abruptly changes, D4 bit is set which specifically indicates
the occurrence of PVC beat. Thus when the next bit is checked for a 0 in D4 bit, there is no possibility of
having any PVC beat. In this way, the proposed algorithm reduces the probability of misclassification.
An artificial neural network based approach can also be proposed using the feature values. In that case the
input is to be made with the extracted feature set and a training and testing based algorithm can be proposed
with four standard output neuron for four kinds of arrhythmic beats. Two output neuron can also be
proposed. But the application of neural network may make the classification a time consuming one because
of its complicated mathematical approach. For clinical purposes the response time of the method should be
such that the arrhythmic beats can be classified as early as possible.
Moreover, table 4.4 shows the comparison of proposed method with some standard method for PVC
detection based on the proposed performance parameters. In the PVC beats the wave shape is modified to
an unknown manner. So a form factor based approach is proved to be promising since it deals with signal
complexity.

TABLE 4.4: COMPARISON OF PROPOSED PVC BEAT DETECTION METHOD WITH SOME
STANDARD TECHNIQUES
Detection Technique Method Performance Parameter

Acc (%) Se (%) Pp (%)

ANN Inceel.al. [135] __ 93.12 94.76


ANN Shyu et. al. [136] 97.04 96.67 97.04
Gaussian Process Melgani and Bazi [137] 97.10 97.60 97.00
Bayesian Filtering Sayadi et. al. [138] 99.10 98.77 91 Al
Binary coding Proposed 97.38 97.37 98.77

It shows that the proposed method is comparable to the other reported works.
Instead of if —else based rules formation, ANN based classification method can also be used. In this case
as the inputs are in binary mode, the neural network should be a fixed weighted ANN.

105
Classification ofECG signals chapter 4

4.4 Detection of Premature Ventricular Contraction beats (PVC) using


Artificial Neural Network (ANN)
In this section a two class classifier is designed for PVC beat detection using two input Artificial Neural
Network. PVC beats are isolated from normal beats considering the wave shape of ECG which is distorted
along with an abrupt change in R wave height. Because of the fact that the wave shape is modified in an
unknown manner, it is difficult to address the problem by identifying the fiducial points. It is noticed that
the distortion does not alter the shape of R peak. So segmentation of a complete wave is possible by
identifying two consecutive R peaks. The FF value of this segment is considered as a major classification
parameter along wi:h the R height which is abruptly modified in PVC beats.

4.4.1 Brief introduction to ANN


In this work ANN is used as a tool of classification and nothing in the domain of ANN was developed.
Hence a brief introduction on basic ANN is given here and detail description of the varieties of the same is
omitted. For this work, Artificial Neural Network toolbox in Matlab is used and a GUI based approach is
followed using the command nntool.

106
Classification ofECG signals chapter 4

A neural network is a parallel-distributed processor with a natural tendency and ability for storing
experimental knowledge and to make it available for use. It is similar to the brain in two respects:
(i) Knowledge is acquired by the network through a learning process.
(ii) Inter-neuron connection strengths known as synaptic weights are used to store the knowledge.
A neural network can be trained to perform on a particular leading to a specific target output as shown in
figure 4.12. Here the network is adjusted based on the comparison of the output and the target until the
network output matches the target. Typically many such input/target pairs are used to train a network in this
supervised learning process.
The simplest Neural Network is a single layer perceptron which can decide whether an input belongs to one
of two possible classes. The model of simple neuron is shown in figure 4.13.
Alike the biological phenomena, neuron processes the inputs which arrives at the dendrites and transmits
the resulting output to other connected neurons using its axons. The classical biological explanation of this
processing is that the cell carries out the summation of the incoming signals on its dendrites. If this
summation exceeds a certain threshold the neuron responds by issuing a new pulse which is propagated
along the axon. If the summation is less than the threshold, the neuron remains inactive. This output passes
through a nonlinearly called a transfer function.

Figure 4.13: Model of a typical neuron

For the basic neuron in figure 4.4, the output is as follows:

107
Classification ofECG signals chapter 4

(4.13)
i=l

and

°j=f(Uj-Tj) (4.14)

Here the signal X at the input of synapse i connected to the neuron j is multiplied by the synaptic

weight Wy.

The activation function or the transfer function modifies the output as per the type of the function used.
Linear, Log-sigmoid, Tan-sigmoid etc. are the most popular transfer functions.
Development of a classifier involves first the choice of an appropriate classifier model and then the use of a
suitable training algorithm to train the network for the specific patterns of data. Finally the test data set can
be used to check the performance of the network for the specified classes.
Table 4.5: SPECIFICATION OF USED ANN
Network Information Command Description
Network type —
Feed-forward back propagation
Training function trainlm Levenberg-Marquardt back-propagation rule
Adaptation learning function learngdm gradient descent with momentum weight and bias
learning function
Transfer function purelin Linear transfer function
Performance function —
Mean square error

4.4.2 Classification of PVC


Conventional steps for classification of PVC beats are detailed the following subsections.

4.4.2.1 Feature extraction


In this case a complete wave is considered as RR section since the R peak is still easily detectable. Thus
each wave is represented by a feature vector comprising of form factor of RR wave and R peak height. R
points can be identified using wavelet based method as explained in chapters 2 and R height is calculated
from the wavelet zero reference. If the R peak is detected by EMD based method (chapter 3), then the zero

108
Classification of ECG signals chapter 4

crossing point of the denoised wave after or before the R peak can be treated as the measurement reference.
Thus the required features are,
• Form factor of RR segment
• R peak height from zero reference

4.4.2.2 Training
More than 350 beats of both classes are used to train the network. For two input features, the ANN should
have two input neurons. First the input and outputs are normalized with respect to their maximum values as
it is observed that the neural networks work better if the input and outputs lie between 0 and 1. The weights
connecting the input neurons and hidden neurons and the weights connecting the hidden neurons and output
neurons are initialized between 0 and 1. One set of inputs and outputs are used as training data. By using
linear activation function, the output of the input layer may be evaluated. The inputs to the hidden layer are
calculated by multiplying corresponding weights of synapses. Then the inputs to the output layer by
multiplying corresponding weights of synapses. Output layer units evaluate the output using linear
activation function. The error as the difference between the network output and the desired output is
calculated. Lastly adjustments in the weights are made until the error (MSE) reaches the desired level with
allowable tolerance value.

4.4.2.3 Testing
Once the network is trained, it is ready for classification of unknown beats. 136 beats are used for testing in
which 86 are normal and 50 are PVC beats. The results are shown in the next section.

4.4.3 Experimental Results and Analysis


Table 4.6 shows a partial list (15 no.s) of FF values of RR intervals and R wave amplitude for some normal
and PVC beats. It is evident from the analysis that there is an abrupt rise in R wave amplitude of PVC
beats and a noticeable amount of change in FF value of the PVC beats. This forms the foundation of the
ANN based classification technique.

109
Classification ofECG signals chapter 4

Experimental study further shows that only two (one normal and one PVC) are misclassified among all 136
test beats as shown in figure 4.14. Here the occurrence of two M’s represents the misclassification in terms
of normalized mean square error and all other positions indicate accurate classification. In view of this,
performance parameters are calculated as in table 4.7.

Figure 4.14: Classification error for PVC detection by ANN


TABLE 4.6: VALUE OF THE FEATURE VECTOR ELEMENTS AND CORRESPONDING BEAT
STATUS

SI. No. Database no. Features Remarks


FF of the wave R amplitude
1 105 1.301 1.4188 Normal
2 305 1.2625 1.4647 Normal
3 105 1.3319 1.4055 Normal
4 105 1.9085 1.357 PVC beat onset
5 105 1.2238 2.0234 PVC beat offset
6 105 1.3984 1.4149 Normal
7 105 1.2808 1.4634 Normal
8 105 1.5969 1.4037 PVC beat onset
9 105 1.1892 1.9959 PVC beat offset
10 105 4.6275 0.4621 PVC beat onset
11 228 1.0363 2.6851 PVC beat offset
12 228 5.3752 0.5466 PVC beat onset
13 228 1.0332 2.6128 PVC beat offset
14 228 1.4405 0.5317 Normal
15 228 1.378 0.6094 Normal

110
Classification ofECG signals chapter 4

TABLE 4.7: PERFORMANCE PARAMETERS OF ANN BASED CLASSIFIER


Sensitivity (%) Specificity (%) Accuracy (%)

98% 98.8% 98.52%

Thus it is seen that the proposed classification technique is efficient in terms of detection parameters. In
this case also the use of FF makes the classification work simpler.

4.5 Conclusion
In this chapter different solutions for ECG classification based on the application of preliminary supervised
learning method, neural networks and a novel binary logical classifier is discussed. The recognition and
classification of patterns require a set of well defined features which accurately characterize the patterns in
order to enable their class differentiation. The feature set is required to be accurate for proper classification,
which in turn requires efficient pre-processing of the signal. Here ECG enhancement is done using time-
frequency based approach as explained in chapter 2 and 3. This method can retain all the temporal and
spatial information intact as described in the respective chapters. Broadly two different types of cardiac
abnormalities are considered for identification - myocardial infarction which retains the periodicity ofECG
signal and cardiac arrhythmia which makes ECG non-periodic. Both diseases are individually fatal to the
health of the person having the disease; moreover, situation worsens to a higher degree if one is
accompanied by the other.
In section 4.2 a feature index based Myocardial Infarction classification algorithm is presented. MI is a
coronary artery disease which is characterized by Q wave duration and amplitude, T wave direction and
amplitude, and ST segment morphology in ECG signal. It is not a very easy task to correctly extract all the
features for different leads and find a unique decision function based on a number of features. In this
proposed method, only R to R wave and QT wave segments are required which reduces the task of
extracting a number of features. Hence there is a less probability of errors that may occur in various
duration and amplitude measurements. Moreover, form each wave segment Form Factor is calculated
which generates a representative feature vector for each ECG pattern. So the ECG pattern is thus
represented by a specific vector in the vector space. This simplifies the decision making process.
Furthermore, the proposed algorithm could be expected to offer faster implementation than other feature set
based algorithm because of less complexity and less data involvement.

Ill
Classification ofECG signals chapter 4

Premature ventricular contraction (PVC) is a special type of ventricular arrhythmia (VA) in which the wave
shape alters abruptly. In section 4.3 a specialized ANN based approach is proposed for PVC detection. VA
evolve from premature ventricular contractions which are in most situations leads to ventricular tachycardia
(VT) and finally to critical ventricular fibrillation episode. It is potentially fatal and the main cause of
sudden cardiac death. PVC beats are morphologically different from the normal one in terms of different
temporal and spatial features. In this case also the calculation of form factor gives the complexity variation
of the entire wave due to PVC. Moreover, R wave amplitude also gets a remarkable change in PVC. So
these two features can be identified as two inputs in an ANN based classification method. This approach
also reduces the need of features and thus error and complexity in classification due to error in feature
extraction, if any.
A simpler technique for arrhythmic beat classification is proposed in section 4.4. As arrhythmia may be
fatal to a person having some critical cardiac condition, the detection of arrhythmic beats at the instant of
its occurrence is very important. Here the proposed method addresses a technique of classification of PVC,
BBB, Paced beats along with normal beats. Almost all beat or disease classification works are feature
extraction based. Extracted features are fed to a pre-developed classifier which may be based on ANN,
SVM or other. In this work an intermediate step for coding is proposed. Actually arrhythmic beats have
different textures with respect to the normal and different kind of arrhythmia causes different morphology
of beats. A specific feature or a set of features are combined together to generate a specific bit representing
a particular morphology of beat. Thus a sequential beat identification results in arrhythmic beat
classification. As the method does not require any complicated classifier, it can identify the presence of an
arrhythmic beat at the time of its onset. This method is highly applicable in case of quick reference of
arrhythmic beats in standalone cardiac monitoring systems. A fixed weight ANN can also provide fast
response with the proposed binary beat status word as input. Since the binary coding depends upon the
value of the features, the performance of the proposed method depends upon the accuracy of the feature
extraction. Comparison of the present method with some reported works (table 2) for PVC detection shows
the effectiveness of the proposed algorithm. Comparison of this method for detection of other arrhythmic
beats considered here is not made due to lack of reported works. Anyway, it shows appreciable result for
other arrhythmic beats as per the performance parameters are concerned. Moreover, being driven by binary
logic, the proposed algorithm has the potential to be implemented in hardware by simple digital logic.

112

Potrebbero piacerti anche