Keywords
|
Electrocardiogram (ECG), Matlab GUI, wavelet transform, heart disorders, Features |
INTRODUCTION
|
An Electrocardiogram (ECG or EKG) is a register of the heart’s electrical activity. The frequency range of ECG is from (0.1-150) Hz. It is widely used routine for cardiac diagnostic tool. A typical ECG tracing of normal heart beat consists of a P wave, a QRS complex, a T wave and a U wave which is shown in fig1. Successive repetition of these “PQRST” in monotony forms ECG. The characteristics of normal heart rhythm also called Normal Sinus Rhythm (NSR) are listed in table1, any disorder in these parameters results in a pathological condition called Arrhythmia or dysrhythmia Three common types of arrhythmias are supraventricular arrhythmia, ventricular arrhythmia and Bradyarrhythmias. Supraventricular arrhythmia are tachycardia (fast heart rates) types include atrial fibrillation, atrial flutter, paroxysmal supraventricular tachycardia (PSVT) and Wolff-Parkinson-white (WPW) syndrome. Ventricular arrhythmia include ventricular tachycardia and ventricular fibrillation .Bradyarrhythmia occurs because of slower heart rate. ECG signal being non-stationary it’s difficult to visually analyse and may take lot of time, hence we need computer based methods for its analysis. |
ECG features extraction play vital in disease identification, many methods are developed for this in both time domain and frequency domain. Time domain approaches [2] are not always adequate to study all the features of ECG signal, therefore frequency representation of signal is needed. Recently proposed methods for arrhythmia detection in ECG include Discrete Wavelet transform (DWT), Principal component analysis, fast Fourier transform, KL transform and complex techniques like artificial neural networks, Support Vector Machine, Hidden Markova models. In this paper we’ll develop simple and accurate algorithm using Discrete Wavelet transform (DWT).Wavelets can provide a time versus frequency representation of the signal and work well on non-stationary data. |
LITERATURE SURVEY
|
Recently several research algorithms have been developed for arrhythmia detection in ECG signals some of them are using wavelet transform, Fuzzy logic Methods, Support Vector Machines with approach exhibiting its own advantages and disadvantages. S.Z Mohmoodabadi[3] used db4,db6 daubechies wavelet for extracting features from ECG signal this algorithm achieves positive predictivity of 98% and sensitivity of 99% . But this method can detect only peaks of ECG, failed to classify diseases in it. Jayalaxmi C M [6] developed Graphical User Interface that it can detect heart rate and various intervals of ECG signal. This algorithm can detect only what ECG parameters have abnormality but not classify them accordingly. Mujeeb Rahman [2] implemented traditional approach for extracting QRS complex in ECG which has differential filter followed by squaring filter. Disadvantage is that we need to have separate analog, digital denoising filters, lack of which causes severe reduction in accuracy of algorithm. |
MATERIALS AND METHODOLOGY
|
A). Data acquisition: ECG samples are taken not only from MIT-BIH but also from Creighton University arrhythmia databases. MIT-BIH signals have sampling frequency of 360hz.All ECG samples are of standard Lead II. Matlab software is used for computer programming |
(B). Algorithm Description: Figure 2 shows the block diagram of our algorithm. Our algorithm mainly involves 3 steps .those are Pre-processing, feature extraction and classification. |
(i)Pre-processing: ECG data was first normalized to unit maximum amplitude and DC offset is removed. Figure 3 shows normal ECG, this signal is normalized and dc removed. After that wavelet transform is applied |
Wavelet transform: For extracting parameters of ECG we use wavelet transform, wavelet analysis breaks a signal down into its constituent parts for analysis. Mother wavelet transform we use here is Daubechies of D6 family if a signal is not well represented by one member of the Db family, it may still be efficiently represented by another. Daubechies wavelet family has similar shape to QRS complex and their energy spectrum is concentrated around low frequencies The wavelet transform is a convolution of the wavelet function ψ (t) with the signal x (t). Orthonormal dyadic discrete wavelets are associated with scaling functions ÃÂÃ⢠(t). |
The scaling function can be convolved with the signal to produce approximation coefficients. The discrete wavelet transform (DWT) can be written as: |
|
|
This is referred to as multi resolution analysis of a signal using wavelet transform, and is used in our procedure 0<m<M A discrete approximation of the signal can be shown as |
Input ECG signal is decomposed in to approximate and detailed coefficients. Figure (4), (5) gives all detailed and needed approximate coefficients of input ECG signal. Of all those only d3, d4, d5, a6 coefficients are used to reconstruct ECG signal. Now reconstructed signal is used for further processing .ECG signal was de-noised by removing wavelet coefficients at higher scales. |
(ii)Feature Extraction: Detection of P wave, QRS complex wave is difficult as ECG signal varies with time due to psychological conditions and presence of noise. Two Thresholds, one considering amplitude and other interval between samples are applied to reconstructed signal. Samples greater than threshold are considered remaining are ignored. Find maximum peaks in signal which are nothing but R-peaks. Four timing windows are created to detect remaining peaks (P, Q, S, and T) in signal.From the detected peaks we calculate parameters like RR, PR interval and QRS width for each beat. |
(iii) Classification: Based on features extracted (RR, PR intervals and QRS duration) decision rules were formed. In our algorithm we take average of 8 RR, PR interval and QRS width.so intervals considered are averaged ones. Total of 6 decision rules are formed after profoundly studying many arrhythmias. Some of the arrhythmia classifying decision rules are |
For Bradycardia If (QRS == 0.11&&PR>0.2 && abnormalbeats==0&&PR<0.2) ----------------------- (8) For Tachycardia If (QRS == 0.11&&PR<0.2 && RR<0.85 && (abnormalbeats==0)) ------------------- (9) Using this decision rules we can detect totally six Arrhythmias those are Bradycardia, Tachycardia, Ventricular Tachycardia, Asystole (Complete Heart Block), First Degree AV block, Second Degree AV block |
C. Performance Measure: We have used three parameters for evaluating performance of our algorithm. Those are accuracy, sensitivity, positive predictive. These parameters are defined using 4 measures True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN) |
True Positive: arrhythmia detection coincides with decision of physician |
True Negative: both classifier and physician suggested absence of arrhythmia |
False Positive: system labels a healthy case as an arrhythmia one |
False Negative: system labels an arrhythmia as healthy |
Accuracy: Accuracy is the ratio of number of correctly classified cases, and is given by |
Accuracy= (TP+TN) / N----------------------- (10) |
Total number of cases are N |
Sensitivity: Sensitivity refers to the rate of correctly classified positive. Sensitivity may be referred as a True Positive Rate. Sensitivity should be high for a classifier |
Sensitivity = TP / (TP+FN) -------------------- (11) |
Positive predictive: Positive predictive is probability that disease is present when test is positive, which is by how much amount disease is correctly predicted. |
Positive predictive = TP/ (TP+FP) ------------ (12) |
RESULTS AND DISCUSSION
|
Matlab-based GUI-driven tool is developed for effective detection and classification of arrhythmia using ECG signals. Totally 19 ECG samples are tested, table (1) shows results of our proposed method for some ECG samples. Algorithm works fine for noise contaminated signals also. We consider the entire duration ECG recordings since the proposed method does not require any learning phase. |
Cu01, cu03 signals are from Creighton University arrhythmia databases .The proposed algorithm tested on multiple databases and works fine. Some MIT-BIH records exhibits high graded noise and artifacts like records 108,228 contain several baseline drifts and abrupt changes, record 113 has tall sharp T waves and record 223 exhibits sudden changes in QRS amplitudes, still our algorithm effectively detected heart disorder. Record 232 include long pauses up to 6 s in duration with high muscle noise, here our algorithm fails to correctly classify type of arrhythmia but still correctly predicts patient’s abnormal heart condition. Obtained features for some records with corresponding disease detected is tabulated in table (2) |
The proposed algorithm implemented on a 1.8 GHz Intel core i3 CPU using MATLAB version 13a, the average processing time required for performing our method on each 30 min ECG data in the MIT-BIH database is approximately 2.24 s |
(A.)GUI building: GUI for this software is divided into number of subgroups according to their functionality. Our software module not only detects arrhythmia but also helpful in analysing ECG signal. |
Signal loading: ECG signals in database are listed in list box. We can select whatever signal we want and load it with push button “load” |
Plotting panel: In this we have plotting toolbox with start and stop point for plotting ECG signal in axes plane, this is provided for user’s flexibility in selecting signal segment they want and analyse it. |
Signal information panel: This panel displays signal sampling frequency and its duration. Annotations: Peaks of ECG signal can be detected and facility is there to choose peaks users want to see(R or P or T or all peaks) by choosing radio buttons |
Parameters Calculation: parameters from our algorithm PR, RR interval and QRS width can be find by clicking push buttons in this panel. |
Disease detection panel: if the patient is suffering with disease or not, if yes then what type of arrhythmia he’s suffering with, can be found by “Diagnoise” push button then arrhythmia is displayed in box. |
Figure (8) shows graphical user interface(GUI) developed for proposed algorithm before execution .As described above figure shows GUI having all sub groups in it."CLOSE" button is used to exit application any time. |
Figure (9) shows graphical user interface (GUI) after execution execution of algorithmn.Here input sample taken is "611" dat file from MIT-BIH database.Proposed algorithmn sucessfully detected arrhythmia as "Tachycardia" as shown in text box with red color.ECG peaks "PQRST" detected are highlighted with different colors each. |
CONCLUSION AND FUTURE SCOPE
|
In this paper we have developed and tested effective and flexible software tool using Matlab for ECG arrhythmia detection. The proposed algorithm achieved sensitivity of 94.12%, positive predictively of 88.9% and disease detection accuracy of 86.1% but accuracy dropped to 77.3% for highly muscle artifact signals. Our software tool can be extended to detect more arrhythmia and by implementing de-noising filters we can increase accuracy for our algorithm.As far as our knowledge concerned no software tool based on Matlab GUI can detect these many arrhythmias and at same time analyse ECG signal in detail. Obtained results indicate that proposed algorithm can support various types of arrhythmia detection in clinical tests |
Tables at a glance
|
|
|
Table 1 |
Table 2 |
|
Figures at a glance
|
|
|
|
|
Figure 1 |
Figure 2 |
Figure 3 |
Figure 4 |
|
|
|
Figure 5 |
Figure 6 |
Figure 7 |
|
References
|
- SayantanMukhopadhyay, ShouvikBiswas, “Wavelet Based QRS Complex Detection of ECG Signal”, International Journal of EngineeringResearch and Applications,Vol.2, Issue3, pp.2361-2365, May-Jun 2012,
- MujeebRahman, Mohamed Nasor,”An Algorithm for Detection of Arrhythmia”, International Journal of Biological Engineering, Volume 2Issue 5,pp.44-47, 2012
- S. Z. Mahmoodabadi, A. Ahmadian,” ECG Feature Extraction Using Daubechies” fifth iasted international conference visualization, imagingand image processing, september Issue , pp.7-9, 2005
- Introduction to graphical user interface (GUI),”The Mathworks”The wavelet tutorial, second edition part 1, Robipolikar
- Jaylaxmi C Mannurmath , Prof. Raveendra M, ”MATLAB Based ECG Signal Classification”, International Journal of Science, Engineering andTechnology Research ,Vol 3, Issue 7, July 2014
- M.SabarimalaiManikandana, K.P. Soman,” A novel method for detecting R-peaks in electrocardiogram(ECG) signal”, Elsevier, BiomedicalSignal Processing and Control , Issue 7 , pp.118– 128 , 2012
- C. Saritha, V. Sukanya,” ECG Signal Analysis Using Wavelet Transform”, Bulg. J. Phys. Issue 35, pp.68 –77, 2008Gordancornelia, reizromulus,” ECG signals processing using wavelets”,
- Anujasas, Shreetambehera, “Identification of Tachycardia and Bradycardia Heart Disorders using Wavelet Transform based QRS Detection” ,International Journal of Image Processing and Vision Sciences,Volume-2 Issue-1, pp.2278–1110 , 2013
|