ISSN ONLINE(2319-8753)PRINT(2347-6710)

All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

Identification of Cardiac Arrhythmia with respect to ECG Signal by Neural Networks and Genetic Programming

Nalla.Srinivas1, A.Vinay Babu2, M.D.Rajak3, Syed Musthak Ahmed4
1Research Scholar, Department of Computer Science, Acharya Nagarjuna University, Guntur, AP, India
2Director of JNTUH, Hyderabad, AP, India
3Assistant Professor, Dept. of CSE, Acharya Nagarjuna University, Guntur, AP, India
4 Professor and HOD, Dept. of ECE, S.R.Engineering College, Warangal, AP,India
Related article at Pubmed, Scholar Google

Visit for more related articles at International Journal of Innovative Research in Science, Engineering and Technology


In this paper analysis of „Electrocardiogram (ECG) PQRSTU-waveforms and prediction of particular decease infection or state of a patient is done using Genetic Algorithm and Artificial Neural Network (ANN), precise Electrocardiogram (ECG) classification to diagnose patient‟s condition is essential. For classification of such difficult-to-diagnose-signals, i.e. ECG signal, classification is performed using various pulses, like v1, v2, v3, v4, v5, v6 etc corresponding hidden layer in ANN i.e., P-Wave, PR-Interval, QRS-Interval, ST-Interval, T-Wave etc analysis of each Input pulse used to train the neural network. Output of the neural network gives weight factors of each signal to create a data set. Corresponding output-datasets indicates related disease and predict the causes. And results are analyzed by Genetic Algorithm.


Electrocardiogram, Fuzzy logic and Artificial Neural Network(ANN), Premature Ventricular contraction, sinus tachycardia, sinus bradycardia, Genetic Algorithm (GA).


Heart disease has become the most common disease that affects human beings worldwide. Each year millions of people die from heart attacks and an equal number undergo coronary artery bypass surgery or balloon angioplasty for advanced heart disease .Early detection and timely treatment can prevent such events. This would improve the quality of life and slow the progression of heart failure [1]. The first step in the diagnosis is to record the ECG of the patient. An ECG record is a non-invasive diagnostic tool used for the assessment of a patient?s heart condition[2]. The features of the ECG, when recognized by simple observations, and combined with heart rate, can lead to a fairly accurate and fast diagnosis.
ANN has a significant advantage to solve problems that either do not have an algorithmic solution or solution that is too complex. These networks have been applied effectively with in medical domain for clinical diagnosis, image and signal analysis and interpretation of these signals .The conventional (Heart Attack perdition system) has been identified as one of the ANN structures that can accurately perform classification tasks. Neural Network is one of the most used methods of ECG beat classification, Multi-Layer Perception (MLP) based on the Neural Networks has been chosen to be able to classify the ECG signals. they are trained with Supervision, using Back- Propagation which minimize the squared error between the actual outputs of the network and the desired outputs. Neural network structure consists of four layers (an input layer, two hidden layers, and output layer) using Feed-Forward, Back-propagation, the input is mapped onto each node like P,QRS,ST,T Intervals in the hidden layer weight factors of Sinus tachycardia,Sinus Bradycardia,Atrial tachycardia and a trial fluter, Atrial fibrillation, Atriventricular block and output layer is a linear combination of hidden layer outputs multiplied by their weights.


Numerous works in literature related with heart disease diagnosis using fuzzy and artificial intelligence techniques were demonstrated in [1],[2].In their work three classes of ECG signals selected viz, the normal sinus rhythm, malignant ventricular ectopic and atrial fibrillation were selected and the shape of the PQRST waveforms was demonstrated.Different classes of ECG signals were also reported in [3].
Nikon E.mastorakis have developed [4] an Expert system for ECG Analysis that works by hierarchically organizing the knowledge in a context free Environment. They have used Turbo C for analysis and Turbo prolog for diagnosis. Hamiltonp[5] has developed a software for ECG beat detection and classification and made available as an open source system for use by researchers. silipo R and marchesis[6] used neural networks for automatic ECG analysis for the classification of different cardiac abnormalities.The premature ventricular contraction (PVC) and the premature atrial contraction (PAC) are cardiac arrhythmias which are widely encountered in the cardiologic field they can be detected using electrocardiogram signal parameter. Implemented Neuro-fuzzy approach to identify these abnormal beats. Classifier was also reported in [8],[9].


Heart is divided into right and left parts. Each part has two chambers called atrium and ventricle. The heart has four valves as shown in Fig 1,2,3.It is produced by an electrocardiograph(ECG), which records the electrical activity of the heart over time.
A. Reading / Interpreting the ECG
The ECG signals must be interpreted and examined systematically. A convenient method is :
? Determine the cardiac rate and rhythm.
? Assess the P-R interval and the width of the QRS complex.
? Examine the P wave the QRS complex
? Examine the S-T segment and T wave.
B. ECG Signal
ECG signal is generated by rhythmic contractions of the heart measured by electrodes .This signal can be effectively used for heart disease diagnosis. The analysis problem can be divided into two parts, the feature extraction and classification. The feature extraction procedure is necessary to detect abnormality of the signal, while the classification procedure is used to distinguish disease type.
There are four major ECG intervals RR,QRS,QT,ST,T segments. The heart rate (beats per minute) can be readily computed from the inter beat(R-R) interval by dividing the number of large(0.20s ) time units between consecutive R waves into 300 or the number of small (0.04s) time units between consecutive R waves into 300 or the number of small(0.04s)units into 1500.The PR interval measures the time(normally 120 to 200 ms) between atrial and ventricular depolarization.
Which includes the physiologic delay imposed by stimulation of cells in the AV junction area? The QRS interval normally 100ms or less) reflects the duration of ventricular depolarization .The QT interval includes both ventricular depolarization and repolariation times and A rate related QT interval, QTc can be calculated as QT/R-R and normally is <= 0.44 s.
The QRS complex is subdivided into specific deflections or waves if the initial QRS deflection in a given lead is negative it is termed as Q wave [6]. The first positive deflection is termed an R wave, A negative deflection after an R wave is an S wave subsequent positive or negative wave are labeled R and s respectively .Lowercase letter(qrs)are used for waves of relatively small amplitude. An entirely negative QRS complex is termed a QS wave.The ECG signal is made up of a group of repetitive PQRST signals. The normal class of PQRSTU is shown in fig.4


The cardiac impulse arises normally from the sinus node in sinus tachycardia and the ECG is Normal Form .The pulse rate increases above 100 beats/min (in adults).Sinus tachycardia may result from emotion, exercise, fever, hyperthyroidism and anemia.
A. Sinus bradycardia
The heart rate is less than 60 beats/min. Sinus bradycardia occurs in trained athletes and in patients with increased intracranial pressure,myxoedema and jaundice are presented in fig 5.
B. Atrial Tachycardia And Atrial Flutter
Atrial tachycardia and atrial flutter are due to the presence of an ectopic focus in the atrium which beats regularly at a rapid rate .The p waves are abnormal in shape, but the QRS complexes are usually normal as presented in fig 6.
C. Atrail Fibrillation
There is no co-ordinate atrial activety (either electrical or mechanical in atrail fibrillation. The ECG (fig.7) illustrates f (fibrillation) waves representing the atrial activity instead of P waves especially in lead V1, The QRS complexes are normal but occur irregularly.
D. Atrioventricular Block(Heart Block)
In first degree atrioventricular block The P-R interval exceeds 0.2 second and all atrial impulses reach the ventricles .When some impulses fail to reach the ventricles but others do reach it, then there is second-degree atrioventricular block. In third degree atrioventricular block(complete)the atria and ventricles beat independently,i.e,they are dissociated the ventricular rate is usually slow,20-40 beats for min, and often erratic and may fail completely ventricular stands stills as presented in fig 8.


Five classes of ECG signals have been selected for the classification tasks. The normal sinus tachycardia, sinus bradycardia, Atrial tachycardia and a trial flutter, Atrail fibrillation, Atrioventricular Block(heart block).From the web site of physionet the database provides 22 sinus rhythm type,23 atrial fibrillation type,20 Atrioventricular Block.The signals from the five classes are sampled at the rate of 128 samples for second. All signal input to neural network .These feature representations involve one set of PQRST-wave from a series of PQRST-waves in a period of one second. To extract accurate information from each set of ECG data, five sets of PQRST-wave from different locations in one ECG signal input to neural networks. For every ECG data .Five sets of PQRST-wave were extracted using wavelet decomposition technique. This technique would detect the location of maximum P-wave and P-R interval, QRS, S-T segment and T wave. Detection by MATLAB provides valuable information found in the interval and amplitude of ECG signals. Input to train the neural network. Output of the neural network gives weight factors of each signal. Each weight factors input to a software program is written in visual basic result to be displays risk factors.
An ANN classifier is presented as a diagnostic tool to aid physicians in the classification of heart diseases [5]. For the classification of the cardiac beats a Multi-Layer Feed-forward Neural Network (MLFN) is used to analyze the PQRST, referenced as NN in this paper. NN was constructed using the neural network software packages in MATLAB. Fig.10 illustrates the architecture of NN. which includes an input layer, a hidden layer and an output layer .Neurons in the input layer act only as buffers for distributing the input signals .Input signals are P-Wave, PRInterval, QRS-Interval, ST-Interval, T-Wave in the hidden layer sums up its input signals xi after weighting them with the strengths of the respective connection wij form the input layer and computes its output as an activation function f of the sum. Where f is hyperbolic tangent function. The back propagation (BP) algorithm was chosen as the training algorithm for NN.
Sparsly Connected YNN when
yNN = f ( wi1 x1 + wi2 x2 + wi3 x3 + + wim xm )
YNN = f (Σ wi x j )
when xi=input, and wIJ=weight


The complete set of rules initially input to the system has been checked with MATLAB finding different intervals like P-Wave, PR-Interval, QRS-Interval, ST-Interval, T-Wave etc analysis of each Input pulse is Input to train the neural network. Output of the neural network gives weight factors of each signal to create a data set. Corresponding output-datasets indicates related disease and predict the causes .The validation result obtained from a software program is written in MATLAB are presented in fig 11.


Genetic Algorithm (GA) is an efficient and effective technique to find the solution for optimization and search problems as illustrate in table 1. Genetic Algorithm is from the biological system where biological cell has set of chromosomes.
A. Population Each chromosome consists of genes and each gene encodes a trait. Set of chromosomes is called Genome and particular set of genes in genome is called genotype. Genetic algorithm starts with generating set of chromosomes called population.
B.Fitness Function Fitness values will be assigned to each chromosome. Better fitness will be the bigger chances of selection. Fitness function for each chromosome is evaluated according to the respective fitness value.
C.Selection According to fitness value, Chromosomes will be selected for further process of recombination.
D.Crossover After selection, Crossover process takes place in order to produce offspring (new population). Crossover will be done by the following suitable method. In case,if crossover does not take place, the same copy of original chromosome will enter into new population.
E.Mutation After crossover, newly created offspring can be mutated and placed in new population.
F.Elitism In order to prevent loosing the better chromosomes, Elitism process is used, in which the better chromosomes will be just copied into new population.
This process is repeated until a conclusion condition has been reached. There are many conditions for ending this algorithm such as when a solution is found that satisfies optimum value or pre-defined number of iterations reached. Finally the flowchart of GA is presented in Figure 12 [9].
initialize population;
evaluate population;
while TerminationCriteriaNotSatisfied
select parents for reproduction;
perform recombination and mutation;
evaluate population;


Based on the results obtained, it can be concluded that Yi can accurately classify ECG Signals into Sinus brady cardia,Atrial tachy cardia,Atrail fibrillation,Atrioventricular Block.The Wavelet decomposition technique used in feature extraction process has performed effectively to project P,Q,R,S and T Waves from original ECG signal. The ECG Signal obtained is verified by Genetic Agorithm.The results obtained indicate a high level of efficient proposed method which outperforms over the other methods with an impresive accuracy of 98%.The proposed method is suitable to arrythmic detection in clinical practice with efficiecy and simplicity

Tables at a glance

Table icon
Table 1

Figures at a glance

Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6
Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6

Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12
Figure 7 Figure 8 Figure 9 Figure 10 Figure 11 Figure 12


[1] Hafizah Husain,Lai Len, Fatt “Efficient ECG Signal Classification Using Sparsely Connected Radial basis Function Neural Network” 6th WSEAS International Conference on Circuits systems, Electorics,control & signal processing,cairo,Egypt, PP.,412-416. Dec29-31,2007.
[2]S.Ahuja,R.S.Bhatia,G.K.Ahuja,”Understanding ECG”, publishers and Distributors(p)Ltd,First Edition,NewDelhi,2007.
[3]L.S.Cohen,MD. “Heart Disease Symptoms”, Chapter 9,Yale University school of Medicine Heart Book,Willian Morrow &Co.,PP107- 114,1992.
[4]N.E.Mastorakis N.J.Theororous E.S.Rota,”EKG.PRO:an Expert system for ECG Analysis ”,Third IEEE Mediterranean Conference on Control and Automation,Limmassol,cypress,July 11-13,PP 457-459,1995.
[5]Nauck,D., Kruse, R.,Obtaining interpretable Fuzzy classification rules from medical data.Artificial Intelligence in Medicine ,PP 149-169.
[6]M.AChikh,F.Bereksi Reguig,”Application of artificial neural networks to identify the premature ventricular contraction(PVC) beats Electronic”, Journal “Technical Acoustics” 2004.
[7] R.Silipo,C.Marchesi “Artificial neural networks for automatic ECG analysis”,IEEE Transactions on signal processing Vol 46,Issue 5, [1417-1425],1995.
[8] M.A Chikh,F.Beereksi Regig, Application of Artificial neural networks to identify the premature Ventricular contraction (PVC) beats Electronic Journal “Technical Acoustics”,2004.
[9] S.M. Anisheh and H. Hassanpour, “Adaptive Segmentation with Optimal Window Length Scheme using Fractal Dimension and Wavelet Transform”,International Journal of Engineering, vol. 22, pp. 257- 268, 2009