P-Wave Detection Using DWT

DOI : 10.17577/IJERTCONV5IS21004

Download Full-Text PDF Cite this Publication

Text Only Version

P-Wave Detection Using DWT

Syeda Adiba Rehaman Final year M.Tech (BMSP&I),

Dept. of Instrumentation Technology, SJCE Mysuru, India

P. Rajeswari Assistant Professor,

Dept. of Instrumentation Technology, SJCE Mysuru, India

Abstract This paper focuses on detection of the P-wave, based on 12 lead standard ECG, which will be applied to the detection of patients prone to diseases. The ECG signal contains noise and that noise is removed using Bandpass filter. After elimination of noise, we detect QRS complex which help in detecting the P- Wave. P-wave morphology can be determined in leads II as monophasic and V1 as biphasic during sinus rhythm. DWT provides a value that helps in estimating features of the P-Wave. This detects the diseases that occur when the P-wave is abnormal. The method has been validated using ECG recordings of 250 patients with a wide variety of P-wave morphologies from Database.

Keywords: Electrocardiogram, P wave, Wavelet Transform, Discrete Wavelet Transform

  1. INTRODUCTION

    The Electrocardiogram is the contraction and relaxation of heart muscles generated when the atria and ventricles are repolarized and depolarized. It varies from person to person depending on the age, body weight position and various other factors that gives us information about persons heart rate, rhythm etc. ECG is important since heart diseases constitute one of the major causes of mortality in the world. The ECG is characterized by a sequence of P, QRS and T wave associated with each beat as shown in Fig.1. The P wave is always before QRS complex and is separated by PQ interval. It is caused by atrial depolarization. The duration of P-wave is 110ms and the positive wave always is at the lead II whereas negative is always at VR lead. The wavelet transform based technique can be used to identify the characteristic features of the ECG signal to obtain reasonably good accuracy with the presence of high frequency and low frequency noises. A number of techniques have been used by researchers to detect the characteristics in ECG [1]. We use dyadic wavelet transform approach because of its localization properties and fast calculations.

    Fig.1. An ECG waveform

    The Wavelet Transform decomposes signal into family of wavelets.Wavelets can be symmetric or asymmetric in shape. Recently, wavelets have been applied to numerous problems in Electrocardiology, including data compression, analysis of ventricular late potentials, and the detection of ECG characteristic points. The WT for evaluating higher frequencies and for lower frequencies uses a short and long time interval respectively .

    Discrete Wavelet Transform (DWT) can be used as a good tool for analyzing non-stationary ECG signal as wavelet transform has been proven to be useful tool for non-stationary signal analysis.

  2. METHODOLOGY

    In order to extract information from the ECG signal, the raw ECG signal should be processed. ECG signal processing can be roughly divided into preprocessing, detection of P-wave and feature extraction as shown in Fig.2.

    Fig.2. Structure of ECG Signal Processing

    The ECG signal is collected from JSS Hospital, Mysuru. The signal is read using EDFbrower software. The data is preprocessed and features are extracted. A Feature Extraction method using Discrete Wavelet Transform (DWT) was proposed by Emran et al [2]. DWT is applied on the features extracted and we obtain wavelet co-efficients. There are four wavelet co-efficients and we select the co-efficient that gives values related to Pan-Tompkins algorithm. From the co- efficients we get maximum and minimum values which are used to locate P-wave. Once we achieve P-wave, we check for the diseases involved that is if the P-wave is abnormal.

    1. Pre-processing

      ECG signal mainly contains noise.The purpose of preprocessing is to remove artifacts from raw signal. Artifacts are the electrical interference by outside sources, electrical noise,baseline wandering muscle interference etc. The two main problems in ECG signal processing is baseline wander removal and suppression of noise.Baseline wandering is one of the noise artifacts that affect ECG signals. We use the median filters[3] to eliminate baseline drift of ECG signal. To remove the noise, we use Discrete Wavelet Transform.

    2. Detection of QRS Complex

      QRS detection is difficult, because of the various types of noise that can be present in the ECG signal. Noise sources include muscle noise, artifacts due to electrode motion, power-line interference, baseline wander, and T waves with high-frequency characteristics similar to QRS complexes. Here the filters reduce noise and thereby increase signal to noise ratio[4]. Software QRS detectors typically include three different types of processing steps: linear digital filtering, nonlinear transformation, and decision rule algorithms. We used linear digital filtering which uses bandpass filter for elimination of noise.

    3. Detection of P-Wave

      The ECG signal obtained is contaminated generally by different sources of noises that can disrupt the phase and the amplitude characteristics of the useful signal, where there is necessity of a good filtering [5]. We apply a band pass filter

      [6] to eliminate the noises caused by the breathing, the movements of muscles and the baseline[7].

      In general, the normal ECG means that there is a regular normal rhythm and waveform. However, the ECG rhythm of the patient with arrhythmia will not be regular in certain QRS complexes. Therefore, we find the characteristics that help us to obtain a perfect ECG waveform. We first need to find the location of every QRS complex. The locations of QRS complex have the maximum variation in the slopes. The method of Pan-Tompkins was adopted to detect the QRS complex [8].

      The Pan and Tompkins QRS detection algorithm identifies the QRS complexes based upon digital analysis of slope, amplitude, and width of the ECG data.

      The algorithm implements a special digital band pass filter. It can reduce false detection caused by the various types of interference present in the ECG signal. Once we get the location of QRS complex, P-wave can be located easily by getting the maximum and minimum values which denote a P- wave. After obtaining a noise free P-wave, we check for its normality. In some cases, the P-wave is absent. Hence, we detect the diseases that occur when there is abnormal P-wave. The diseases being detected are atrial fibrillation, atrial flutter etc.

    4. Feature Extraction and DWT

      The Feature Extraction stage extracts diagnostic information from the ECG signal. It provides us the features extracted using DWT such as the co-efficient obtained after passing through filters and being downsampled produce approximate, horizontal, diagonal and vertical co-efficients respectively.

    5. Discrete Wavelet Transform (DWT)

      The Discrete Wavelet Transform (DWT) has become a powerful technique in biomedical signal processing. The DWT uses scale and position values based on powers of two. The values of s and are: s = 2j , = k*2j, the mother wavelet s,(t) is shifted and scaled by powers of two where j is the scale parameter and k is the shift parameter, both which are integers (j, k)Z 2 as shown in Eq.1.

      (1)

      The key issue behind DWT is signal decomposition. The idea of decomposition is low-pass and highpass filtering with the use of down sampling. The result of wavelet decomposition is hierarchically organized decompositions. One can choose the level of decomposition j based on a desired cutoff frequency[9].

      Fig.3. An implementaion of a three-level DWT

      Fig.3 shows an implementation of a three-level forward DWT based on a two-channel recursive filter bank, where h0(n) (Eq.2)and p(n) (Eq.3) are low-pass and high-pass analysis filters, respectively with L levels of decomposition and the block 2 represents the down sampling operator by a factor of 2.

      The input signal x(n) is recursively decomposed into a total of four subband signals: a coarse signal C3(n) , and three detail signals, d3(n), d2(n), and d1(n), of three resolutions.

      (2)

      (3)

      The output gives wavelet coefficient values such as coarse signal representing approximate and detailed signal representing diagonal, vertical and horizontal respectively.

      The coefficient values listed in Table I are obtained after applying DWT to the P-wave that was detected after elimination of noise.

      Table I. Co-efficient Values

      Co-efficients

      Co-efficients value

      Approximate

      157

      178

      197

      213

      162

      236

      Horizontal

      0.0

      0.0

      0.0

      0.0

      0.0

      0.0

      Diagonal

      -9

      -12

      3

      19

      -70

      4

      Vertical

      0.0

      0.0

      0.0

      0.0

      0.0

      0.0

      amplitude

      Fig.4. P-wave detection after applying DWT

      The approximate co-efficient value obtained from the DWT is plotted and shown in fig.4. The approximate value is obtained from high pass filter with high energy co-efficients and hence it is considered in comparison with the other 3 co-efficients.

    6. NORMAL OR ABNORMAL DISEASE

      Every originating P-wave is either a normal or an abnormal wave. So here are few listed abnormal p-wave which can lead to health disorders.

      i. Normal P-Wave

      The P wave indicates atrial depolarization. The P wave occurs when the sinus node, also known as the sinoatrial node, creates an action potential that depolarizes the atria.The P wave should be upright in lead II if the action potential is originating from the SA node. Fig. 5 shows ECG that demonstrates a normal sinus rhythm, or NSR.

      Fig.5. Sinus Rhythm

      1. Atrial Fibrillation

        Atrial fibrillation occurs when there are irregularly irregular rhythm as in fig.6. There are no P waves in patients with this disease, also there is absence of an isoelectric baseline and has variable ventricular rate. Fibrillatory waves may be present and can be either fine (amplitude < 0.5mm) or coarse (amplitude >0.5mm).Fibrillatory waves may mimic P waves leading to misdiagnosis.

        Fig.6. Atrial Fibrillation

      2. Atrial Flutter

        Atrial flutter is a type of supraventricular tachycardia caused by a re-entry circuit within the right atrium.This produces a characteristic sawtooth pattern of the P waves as shown in fig. 7. It produces regular atrial activity at ~300 bpm. Flutter waves (saw-tooth pattern) best seen in leads II, III, aVF

        may be more easily spotted by turning the ECG upside down.

        Fig.7. Atrial Flutter

      3. Sinus Arrhythmia

    Sinus arrhythmia refers to a changing sinus node rate with the respiratory cycle, on inspiration and expiration. The ECG criteria to diagnose sinus arrhythmia is a variation of the P-P interval, from one beat to the next, of at least 0.12 seconds, or 120 milliseconds.

    Fig.8. Sinus Arrhythmia

    Fig.8 shows ECG of a patients suffering from Sinus Arrhythmia.

  3. RESULT

    ECG signals required for analysis are collected from JSS Hospital, Mysuru. The database contains 250 records. The methods were developed under Matlab software.

    A total of 40 data sets where collected out of which 30 were diseased which had atrial fibrillation, atrial flutter , sinus rhythm and 10 were normal ECG. The algorithm has correctly classified sinus rhythm and normal set whereas the atrial fibrillation and atrial flutter have false estimation as shown in Table II.

    The P-wave detected checks the range of the disease and converts into frequency value and gives a normal signal or diseased name as an output.

    Table II. Displaying disease

    Disease

    Number of

    samples

    True Estimation

    False Estimation

    Atrial Fibrillation

    10

    07

    03

    Atrial Flutter

    10

    09

    01

    Sinus Arrhythmia

    10

    10

    00

    Normal

    10

    10

    00

  4. CONCLUSION

In this paper, we present an algorithm based on Wavelet Transform for the detection of P waves of ECG. ECG characteristic points based on WT shows the potential of the WT especially for processing time-varying biomedical signals. The power of WT lies in its multiscale information analysis which can characterize a signal very well. It is clear that the WT method will lead to a new way of biomedical signal processing.

Furthermore, ECG signal is a life indicator, and can also be used as a tool for liveness detection. People have similar but different ECG. The physiological and geometrical differences of the heart in different individuals display certain uniqueness in their ECG signals. Hence ECG will be used as a Biometric tool for Identification and Verification of Individuals.

ACKNOWLEDGEMENT

It gives great pleasure in presenting the paper on P-Wave Detection Using DWT. We would like to take this opportunity to thank JSS Hospital, Mysuru for providing ECG data of the patients. We are also grateful to our Department of Instrumentation, SJCE, Mysuru.

REFERENCES

  1. J. Pan and W. J. Tompkins, A real-time QRS detection algorithm, IEEE Trans. Biomed. Eng., vol. 32, pp. 230236, 1985.http://dx.doi.org/10.1109/TBME.1985.325532

  2. E. M. Tamil, N. H. Kamarudin, R. Salleh, M. Yamani Idna Idris, M. N. Noorzaily, and A. M. Tamil, (2008) Heartbeat electrocardiogram

  3. (ECG) signal feature extraction using discrete wavelet transforms (DWT), in Proceedings of CSPA, 11121117.

  4. Saritha, V. Sukanya, and Y. Narasimha Murthy, ECG Signal Analysis Using Wavelet Transforms, Bulgarian Journal of Physics, vol. 35, pp. 68-77, 2008.

  5. 0. Pahlm and L. Sornmo, "Software QRS detection in ambulatory monitoring-A review," Med. Biol. Eng. Comput., vol. 22, pp. 289-297, 1984.

  6. S. Z. Mahmoodabadi, A. Ahmadian, and M. D. Abolhasani, ECG Feature Extraction using Daubechies Wavelets, Proceedings of the fifth IASTED International conference on Visualization, Imaging and Image Processing, pp. 343-348, 2005.

  7. McNames, J. (2005) Optimal Rate Filters for Biomedical Point Processes. 27th Annual International Conference of the Engineering in Medicine and Biology Society, Shanghai, 17-18 January 2006, 145-148.

    http://dx.doi.org/10.1109/iembs.2005.1616363.

  8. Li, C., Zheng, C. and Tai, C. (1995) Detection of ECG Characteristic Points Using Wavelet Transform. IEEE Transactions on Biomedical Engineering, 42, 21-28.

    http://dx.doi.org/10.1109/10.362922

  9. Lee, J., Jeong, K., Yoon, J. and Lee, M., A Simple Real-Time QRS Detection Algorithm, 18th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, Amsterdam 1996.

  10. Z.Zidelmal, A.Amirou, M.Adnaneb, A.Belouchranib QRS detection based on wavelet coefficients, ELSEVIER, Computer Methods and Programs in Biomedicine 107(2012),pp. 490-496.

Leave a Reply