Automated Detection of Depolarization and Repolarization of Cardiac Signal for Arrhythmia Classification

ushakumari.c@gmail.com Abstract —Irregular heartbeat results in heart diseases. Cardiac deaths are most seen across the globe. Detecting the heart problems in early stage can reduce the death rate. Electrocardiogram (ECG) is one of the most popular method for diagnosing different arrhythmias. Arrhythmia means irregular activity of heart or abnormal heart rhythm. In this paper, cardiac signal peaks P-wave, QRS complex and T-wave are detected for classifying the type of arrhythmia. These are the main components of ECG signal. P-wave is of very small duration, it is ex- plains about the atrial depolarization. The QRS complex may include combination of Q-wave, R-wave, and S-wave. But every QRS complex may not contain Q-R-S waves. It explains about ventricular depolarization. Whereas T wave is about ventricular re-polarization. S-Golay filter is used for denoising. This is used for smoothing the data which thereby, increases the precision of data without distor-tion of signal tendency. The patient data is collected from MIT-BIH Arrhythmia database for analysis. The simulation is done in Matlab


Introduction
ECG stands for Electrocardiogram, also known as EKG. It is a painless way to help diagnose many heart problems. Heart's rhythm is recorded on the ECG i.e., it can detect irregularities in the heart rhythm. It is used to identify a usually fast heart rate and slow heart rate. In ECG signal the amplitudes and time duration's correspond to peaks of P-QRS-T wave. From these peaks analysis is done for detecting different cardiac arrhythmia's The ECG signal gives the below information of heart activity: • Heart rate • Chamber size • Heart Rhythm • Enlargement in Heart and propagation • Myocardial infarction or previous heart attack history • Conduction disturbances.
• Drug effects on the heart.
The interpretation of ECG starts with P-wave. That is, it indicates initiation of heart beat in the upper chamber of heart. The P-wave on the ECG. The interpretation of ECG starts with P-wave. That is, it indicates initiation of heartbeat in the upper chamber of heart. The P-wave on the ECG indicates atrial depolarization i.e., contraction of arteries. P wave with increased amplitude indicates hypokalemia and with decreased amplitude indicates hyperkalemia. The QRS complex represents the period of ventricular contraction or de-polarization. This indicates movement of electrical activity through the lower chambers of ventricles. The T-wave indicates ventricular re-polarization and du-ration is longer when compared to QRS-complex. Ventricular re-polarization is a complex electrical phenomenon that indicates an important stage in electrical cardiac activity. The research is carried out in Matlab simulation tool.  Literature Survey ECG samples were collected from MIT-BIH database, Denoising and lossy compression schemes of ECG signals is done by extended Kalman filter (EKF). This EKF algorithm is used for de-noising as well as compression. Here for de-noising, the SNR improvement is considered. For compression CR, PAD and WDD are taken into consideration.
In [1], nonlinear Bayesian filtering is used for noisy electrocardiogram (ECG) signal to remove ECG artifacts. This filtering approach is used for many ECG signals by adding colored and white Gaussian noises for ECGs and observing the SNR and design of outputs obtained from filters. This approach explains good results comparing with adaptive filtering, wavelet thresholding and bandpass filtering over an immense range of ECG SNRs [2].
An ASIC design is presented for recording of ECG and in detecting peaks [3]. The energy consumption is reduced by using DPPM architecture. The signal is also decomposed for improving the quality of recon-structed signal. To evaluate the single-lead ECG delineation system using Wavelet Transform (WT) the QRS-complex is found and each of them is delineated by identifying the individual wave peaks. Finally, the determination of P and T wave peaks are also performed.
The R-peak detection algorithm for processing ECG is introduced [4]. This detection algorithm uses the envelope acquired from Hilbert Trans-form for detecting R-peaks in ECG and determines the peak determination threshold. It reduced the unnecessary large peaked P and T waves. The quantitative effects of QRS detection are done from the MIT-BIH database. Linear and Non-linear filtering schemes are used to input QRS detector and filtering is done on the databases to pre-process. This gives a set of vectors produced from noise and complexes [5].

Fig. 2. Proposed Method for Heart Rhythm Abnormality Classification
QRS detection properties are observed by varying the parameters that affect the performance. The performance of two detectors, SMAP and PMAP are compared and SMAP provides slightly better performance than PMAP [6]. In [7], an adaptive filter is used to minimize mean square error and to obtain the electrical impulse response of the Q-R-S wave. The noise is present in the primary input of the ECG signal and the reference input is noise correlated with impulse train that coincides with the QRS-complexes and applied for detecting arrhythmia problems i.e., P-waves, atrial fibrillation, ventricular premature complexes, conduction block recognition, and rhythms [8].
In [5], the R-peak detection algorithm is introduces based on the QRS spec-trum and tested to the MIT-BIH database. Detecting R positions for normal and abnormal QRS-complex is done and the advantage of DWT for normal and abnormal beats is pointed [1].
In [2], Difference Operation Method is applied for the extracting QRS wave of ECG. The DOM includes two steps: The initial step is to find R-wave by application of differential equations to ECG. Then Q and S points are observed by using point R for finding QRS-complex. From QRS-complex P and T-waves are obtained.

Methodology
The proposed methodology involves four steps:

Data collection
The ECG signals are extracted and collected from MIT-BIH Arrhythmia Database. It consists of ECG signals of different patients.

Detrend
Detrending is used to remove baseline wandering in ECG without disturbing morphological characteristics of the ECG signal. The collected samples are de-trended first.

Denoising
Denoising is used to filter out the noise from signals. In this work, denoising is done using Savitzky-Golay (S-Golay) filter as it performs better when compared to the other filters. This filter removes the noise by preserving the peaks. It tracks the signal more closely and to account for the transient effects, we can smooth our data using this filter. This filter performs polynomial fitting to segments of data.

Peaks detection
The P-wave represents atrial depolarization which is smooth, positive and small. Normally, the right atrium depolarizes faster than left atrium. Normal duration is at the range of 0.12 to 2.0 seconds. The QRS-complex is the most noticeable waveform in the ECG. It is larger than P-wave due to the volume of the ventricular tissue. Some signal cancellation takes place as the right side and left side of the heart moves in the opposite direction. The duration of the QRS-complex is 0.006 to 0.10 sec in adults and less than 0.08 in children. The T-wave on an electrocardiogram (ECG) represents typically a ventricular repolarization It should be consistent with the QRS-complex. The positive QRS-complex should be followed by positive T-wave and vice versa. It is showed on the surface of ECG by the interval between the start of the QRS-complex and the end of T-wave. The duration of the T-wave is 0.10 to 0.25 sec.

Results and Discussion
This paper gives a clear view for peak detection. The P-wave, QRS complex and Twave are detected in this research. Form these detected peaks the arrhythmia's can be classified. Testing and analysis of the algorithm were made using the MIT/BIH database. The samples collected were of normal ECG (100m) signal as shown in figure 3.
In this stage the baseline wandering is removed from ECG by detrending method and therefore the collected samples are detrended first. Figure 4 shows that the improved detrending method which effectively reduced baseline wandering without disturbing morphological features in the ECG signal. Figure 5 indicates the filtered signal. S-Golay performs better when compared to the other filters. This filter removes the noise by preserving the peaks and morphological features which are used for further classification.

Conclusion
The arrhythmia classification is done based on detection of depolarization and repolarization of cardiac signal which is represented by P-QRS-T wave. The detrends in the cardiac signal were removed with the help of detrend function. Denoising is done using Savitzky-Golay (S-Golay) filter as it removes the noise by preserving the peaks information. The advantage of this filter is it performs polynomial fitting to segment the data. Peak detection helped in classification of the ECG signals more accurately. Further effort of this work can move towards proposing feature extraction where the extracted features will be given to ANN or SVM classifier which can classify the abnormal or abnormal form.