Anda di halaman 1dari 4

Application of Crosswavelet Transform and Wavelet Coherence for classification of ECG patterns

2012 Third International Conference on Emerging Applications of Information Technology (EAIT)

Swati Banerjee1, M. Mitra1


Department of Applied Physics, Faculty of Technology, University of Calcutta 92, APC Road, Kolkata-700009, India

swatibanerjee@ieee.org, mmitra@ieee.org
Abstract This paper presents a method for classification of ECG patterns using Cross Wavelet Transform (XWT) and Wavelet Coherence (WC) techniques. The cross-correlation is the measure of similarity between two waveforms. The application of the Continuous Wavelet Transform to two time series and the cross examination of the two decomposition reveals localized similarities in time and scale. A pathologically varying pattern in QT zone of inferior lead III, shows the presence of Inferior Myocardial Infarction (IMI). In this work classification of normal and IMI is studied. The Cross Wavelet Transform and Wavelet Coherence is used for the cross examination of a single normal and abnormal (IMI) beats. A normal beat template is selected as the absolute normal pattern and the coherence between various other normal and abnormal is computed. A parameter pa, equal to the summation of the coherence values over the QT zone distinguishes normal and abnormal clusters. From this cluster a threshold value is determined, which is used for classification of the subjects. All data for the purpose of analysis is considered from PTB diagnostic ECG database. The classification accuracy and sensitivity is obtained as 90% respectively. Keywords- Cross wavelet transform, Wavelet Coherence, Myocardial Infarction, interpolation, Fiducial points.

1. INTRODUCTION Biomedical signals are intrinsically nonstationary because their underlying statistical properties change with time. This source of nonstationarity is intrinsic in the sense that the origins are physiological in nature. Coronary heart disease (CHD), also called coronary artery disease, is a condition in which plaque (plak) builds up inside the coronary arteries. These arteries supply oxygen-rich blood to the heart muscle. A heart attack occurs if the flow of oxygen-rich blood to a section of heart muscle suddenly becomes blocked. If blood flow isnt restored quickly, the section of heart muscle begins to die. The CHD remains the main cause of mortality in many region of the world, and several studies reveals the importance of reducing the time delay for treatment to improve the clinical outcome of the patients in case of acute coronary syndromes[1] . Good performance of an automatic ECG analysing system depends upon the reliable and accurate detection of the basic features. QRS detection is necessary to determine the heart rate and is used as reference for beat alignment. The automatic delineation of the ECG is widely studied and algorithms are developed for QRS detection and wave detection [2]-[4]. Wavelet transforms have been applied to ECG signals for enhancing late potentials [5], reducing noise [6], QRS detection [7], normal and abnormal beat recognition [8] and delineation of

ECG characteristic features [11]. The methods used in these studies were conducted through continuous wavelet transform [9], multiresolution analysis [8, 9] and dyadic wavelet transform [10]. After the delineation of the characteristic features automatic classification of the ECG signal helps as a diagnostic tool for quicker treatment. Consequently many classification methods have been developed each with distinguishing characteristics. An ECG beat classification method by neuro-fuzzy networks and hybrid fuzzy neural network consisting of a fuzzy selforganizing sub-network connected in a cascade with a multi-layer perceptron is depicted in [12, 13]. Linear discriminant based classifiers and Hermite functions and self-organizing maps for clustering of ECG signals are explored in [14, 15, 16]. A rule mining based method is developed [17], where ischemic beats are identified by extraction of features followed by feature discretization and rule mining. ECG features, was also extracted using linear predictive coding in [18]. In addition, the wavelet analysis has been used with success on many types of signals such as EEG signals [21] and geophysical time series [22]. In this work a method for analysis of ECG data by the method of cross-wavelet transform (XWT) is proposed. Before any form of analysis the signal is denoised and R peaks are registered. The heart rate is computed and then beats are segmented for analysis. Each of the segmented beats is time normalized before analysis because the heart rate varies from subject to subject. For this study only Inferior MI (IMI) and normal class is considered. IMI is identifiable from the inferior leads II, III, aVF, of which lead III is selected for analysis. All the input data for this method has been selected from Physikalisch-Technische Bundesanstalt diagnostic ECG database (ptb-db) [24]. A pathologically normal patient is selected as standard normal and an extracted beat is labeled, as the standard normal template beat. Other normal and abnormal ECG patterns are analyzed by subjecting them to XWT. Because of the morphological similarity with that of the QRS complex, db4 is selected as the mother wavelet. The application of CWT to two time series and the cross examination of the two decompositions reveals localized similarities in time and scale. The XWT and WC are used for cross examination of a single normal and abnormal (I MI) beat with that of a standard normal template beat. The summation of the coherence value over the QT zone is the distinguishing parameter established for classification. In this method we have used wavelet coherence because of its ability of good

978-1-4673-1827-3/12/$31.00 2012 IEEE

89

time resolution analysis and it uses a variable window length depending on the analyzed frequency band. 2. WAVELET TRANSFORM Wavelet transform is a linear transform, which decomposes a signal into components that appears at different scales (or resolution).Time localization of spectral components can be obtained by multiresolution wavelet analysis, as this provides the time-frequency representation of the signal. 2.1 Continuous wavelet transform(CWT) The continuous wavelet transform involves decomposing a signal f(t), into a number of translated and dilated wavelets. The main idea behind this is to take a mother wavelet (t ) , translate and dilate it, convolve it with the function of interest, and map out the coefficients in wavelet space, spanned by translation and dilation. Periodic behavior, then shows up as a pattern spanning all translations at a given dilation, and this redundancy in the wavelet space makes detection of periodic behavior rather easy. The wavelet transform preserves temporal locality, which is an advantage over Fourier analysis. For instance, power associated with irregular sampling does not contribute to the coefficients as in Fourier analysis, which is extremely helpful when using poorly sampled data. 2.2 Cross Wavelet transform (XWT) The cross wavelet transform (XWT) of two time series xn (1) and yn , is defined as W XY =W X W Y * Where * denotes complex conjugation. We further define the cross wavelet power as W XY . The complex argument

cross wavelet analysis of the ECG beats reveals many significant characteristics. The following subsections illustrate the proposed technique. The block schematic in Fig. 1 shows the stepwise procedure.
3.1 Denoising and R Peak Registration Denoising of ECG data is an essential step before any form of analysis as this increases the efficiency of the algorithm. Present work uses DWT based decomposition and selective reconstructions of wavelet coefficients for denoising and QRS detection. Noises are eliminated by selective decomposition and identification of the noisy frequency band and hence rejecting the corresponding coefficients. For, identification of the QRS frequency band, the detail coefficients D4 and D5 are selected, as together they contain most of the QRS information. A detailed description of this method can be found in [11], which is used as the basic feature extraction technique for this work. Some other old technique like that of Pan and Tomkins method [3] could have been used for basic denoising and fiducial point detection. 3.2 Time normalization of cardiac cycles Once the R peaks are registered, the R-R interval is computed and divided into 1:2 ratios (Say, x: 2x points).
Input ECG (ptb-db single

lead data file) Denoising and Beat Segmentation Time normalization of Cardiac beats.

can be interpreted as the local relative phase between xn and yn in time frequency space. The theoretical distribution of the cross wavelet power of two time series with background powerspectra P X and P Y is given by
k k

arg(W XY )

torrence and compo in [23]. 2.2 Wavelet Coherence(WC) Another useful measure is how coherent the cross wavelet transform is in time frequence space. Following, Torrence and Webster [24] , the wavelet coherence of two time series is defined as:
2 Rn ( s ) = XY ( s ) S ( s 1Wn 2 X ( s ) 2 ). S ( s 1 W Y ( s ) 2 ) S ( s 1 Wn n

CWT

CWT

(2)

XWT

Where, S is a smoothing operator. And wavelet coherence can be thought of as a localized correlation coefficient in time frequency space.
3. PROPOSED METHODOLOGY

Wavelet Cross spectrum

Wavelet Coherence

Fig1: Schematic representation of the method.

The proposed methodology consists of denoising of ECG data followed by R peak registration and beat segmentation. R peak detection is essential for accurate time alignment of different segments. The heart rate is a variable quantity and accordingly the beat duration changes. So, a time normalization of each of the segmented beat is done. The

One cardiac cycle gives the details of the pathological condition of the patient and hence each beat needs to be segmented before subjecting it to cross-wavelet analysis. Considering x points to the left and 2x points to the right of R index one cardiac beat is extracted. FFT based interpolation technique [19] is used for time normalization

90

of each beat segment as the heart rate varies for each subjects. In this study all beats are normalized to 1000 samples. The time normalization is important for comparability of two different patterns and finding out notable differences and variations.
3.3 Selection of a standard Normal template For the analysis all the ECG data is taken from ptb-db diagnostic database. One cardiac beat from a 25 year old, pathologically normal, male subject with a heart rate of 72 beats/min, is considered as the standard normal template for analysis. In this present study only Inferior MI class is considered which is detectable from the inferior leads II, III, aVF. These three leads have prominent pathological features like that of elevated ST segment, elongated Q or presence of QS complex for abnormal and standard normal morphology for normal subjects. This leads to a distinguishably separable QT zone for normal and abnormal patterns. For the present study only Lead III is used. 3.4 Cross wavelet transform (XWT) and Wavelet Coherence (WC) analysis of ECG beats The cross correlation is the measure of similarity between two waveforms. The application of CWT to two time series and the cross examination of the two decompositions reveals localized similarities in time and scale (scale being inverse of frequency). The XWT and WC are used for cross examination of a single normal and abnormal (IMI) beat with that of a standard normal template beat. Because of the morphological similarity with that of the QRS complex db4 is selected as the mother wavelet for analysis. The XWT and WC give a relationship between the two signals in time scale space. The resultant Wavelet Cross spectrum (WCS) shows the spectral components of interest. In this analysis 512 scales are used and the Wavelet Coherence (WC) is used for the purpose of analysis. 3.5 Parameter Extraction for Classification The WC is a matrix containing the coherence between two signals. A classification parameter for grouping of normal and abnormal subjects is obtained from this matrix. The QT zone being the pathological region is selected for parameter extraction. A span of 80 points from the left of the R peak and 200 points right to the R peak is the QT zone. Let WCOH be the matrix containing the coherence and t1 to t2 is the start and end of QT zone respectively. It has been empirically determined that significant features, dominating the analysis is prominent in the scale range of s1=250 to s2=400. So the parameter pa is given by,

4. RESULTS

All the input data for this method has been selected from ptb-db of Physionet [23], which contains 549 records from 290 subjects with 52 healthy controls and 148 Myocardiac infarction patients. A normal non smoker male subject of 25 years old, is considered as the normal template for analysis, the patient id is: ptbdb/patient150/s0287lre. 4. 1 The CWT of Signals The cross wavelet spectrum of two signals is shown in figure 2. For concise presentation of the data and due to space constraint few analyses is shown.
Normal Template ECG Signal (Lead III)
0.8 0.6 0.4 0.2 0 100 200 300 400 500 600 700 800 0 -0.2 -0.4 -0.6 100 200 300 400 500 600 700 800

Abnormal Signal (Lead III)

Modulus 469 417 365 313 261 209 157 105 53 1 100 200 300 400 500 600 700 800 469 417 365 313 261 209 157 105 53 1 100 200 300

Modulus

400

500

600

700

800

Fig 2: C WT of Normal and abnormal ECG signal

4.2

Wavelet Cross spectrum and Wavelet Coherence of the signal As stated in section 3, from Fig3 and Fig 4, it is evident that the WCS and wavelet coherence vary significantly for normal selected template and abnormal.
Analyzed Signals
0.5 0 Normal Template Abnormal signal

V o ltag e

-0.5 100 200 300 400 500 600 700

Time
Modulus 469 417 365 313 261 209 157 105 53 1 100 200 300 400 500 600 700

S c ales

Wavelet Cross Coherence


469 417 365 313 261 209 157 105 53 1 100 200 300 400 500 600 700

S c ales

Time

Fig3: WCS and WC between the standard normal template and an abnormal ECG
Analyzed Signals
0.8

V o lta g e

0.6 0.4 0.2 0 100 200 300 400 500 600

Normal Template Normal2

700

Time
Modulus 469 417 365 313 261 209 157 105 53 1 100 200 300 400 500 600 700

pa =
s1

(3)

t2

The scatter plot for pa value of several samples gives a discriminating threshold value (TH), used for distinction between two classes. Any value of pa, greater than TH signifies normal else is classified as abnormal.

S ca les

s2

WCOH

t1

Wavelet Coherence
469 417 365 313 261 209 157 105 53 1 100 200 300 400 500 600 700

S ca les

Fig4: WCS and WC between the standard normal template and a normal ECG

Time

91

4.3

Plots for the clustering of the data for two classes using parameter (pm) According to eq. 3, the values are computed for normal and abnormal cases and the cluster plot is shown in Fig 5. A total of 20 normal and 20 abnormal (IMI) are analyzed. TH is estimated from the cluster plot and is equal to 15000. The classification result is stated in table 1.
80,000 70000 60000 50000 40000 30000 Normal Abnormal MI

[7]

[8]

[9]

[10]

wavelet transform, Proc. IEEE-Sig. Process. Int. Symp. on Time-F'requency Time-Scale Analysis, pp. 540-543, 1994. J L. Senhadji, J. J. Bellanger, G. Carrault, and J. L. Coatrieux, Wavelet analysis of ECG signals, Proc. IEEEEMBS, pp. 811-812, 1990. A. Grossmann and J. Morlet, Decomposition of hardy functions intosquare integrable waveiets of constant shape, SIAM J. Math. Anal., 15 (4),pp. 723-736, 1984. S. G. Mallat A theory of muitiresolution signal decomposition: the wavelet representation, IEEE Trans. PAMI, 11(7), pp. 674-693, 1989. I. Daubechies, Orthonormal basis of compactly supported wavelets., Commun. Pure Appl. Math.,Vol. 41, pp. 909996, 1988.

20000 10000 0 -10000 -20,000 -30000 -40,000 -50000 -60000 -70000 -80000 0 2 4 6 8 10 12 14 16 18 20

[11]

S.Banerjee, R.Gupta, M. Mitra, Delineation of ECG characteristic features using multiresolution wavelet analysis method, ELSEVIER, Measurement, Vol. 45,no. 3, pp. 474-487, April 2012.

P aram eter (pa )

No of data

Figure5: Cluster plot for normal and abnormal class for parameter (pa) Table 1: Classification sensitivity
Type Number of Subjects 20 20 40 TP FN Se (%) (TP/(TP+FN)) 85 95 90 Accuracy (1-( no. of misclassification/total samples)) 90%

IMI Normal Total

17 19 36

3 1 4

5. CONCLUSION In this paper, a method for classification of ECG pattern is proposed. The application of CWT to two time series and cross examination (XWT and WC) of two decompositions reveals localized similarities in time and scale. From, the analysis it was found that wavelet coherence reveals great insight into the dissimilarities of data, it is being presented with. The extracted parameter pa obtained from the summation of coherence over the significant scale range of 250 to 400 within the QT zone gives a distinguishing threshold value. This threshold value is used for classification of normal and MI subjects. The classification accuracy is obtained as 90%. References
[1] [2]

[3]

[4]

[5]

[6]

Leo. Schamroth, An introduction to Electro Cardiography, Wiley, 2009, 7th Edition. B.U Kohler, C. Hennig, and R. Orglmeister, The principles of software QRS detection, IEEE Eng. Med. Biol. Mag., vol. 21, no. 1, , pp. 4257, Jan.-Feb. , 2002. Pan Jiapu, Willis J. Tompkins, A real time QRS detection algorithm, IEEE Trans. On Biomedical Engg., March 1985, Vol -32, No. 3, pp. 230 236. O. Pahlm, and L. Srnmo, Software QRS detection in ambulatory monitoring A review, Med. Biol. Eng. Comp., 1984, vol. 22, pp. 289297.O. Meste, H. Rix, P. Caminal, and N. V. Thakor, Detection of late potentials by means of wavelet transform, IEEE Trans. BME 41(7), pp. 625-634, 1994. J R. Murray, S. Kadambe, and G. F. Boudreaux-Bartels, Extensive analysis of a QRS detector based on the dyadic

Mehmet. Engin, ECG beat classification using neuro-fuzzy network, Pattern Recognition Letters, Vol.25, no 15, pp. 17151722, November 2004. [13] S. Osowski, T.H. Linh, ECG beat recognition using fuzzy hybrid neural network, IEEE Trans. Biomed. Eng, Vol. 48, pp. 1265 - 1271, Nov 2001. [14] P. Chazal, M. ODwyer, R.B. Reilly, Automatic classification of heartbeats using ECG morphology and heartbeat interval features, IEEE Trans. Biomed. Eng, vol. 51, pp.11961206, 2004. [15] M. Lagerholm, C. Peterson, G. Braccini, L. Edenbrandt, L. Sornmo, Clustering ECG complexes using Hermite functions and self-organizing maps, IEEE Trans. Biomed. Eng, vol.47, pp. 839847, Jul 2000. [16]F. de. Chazal, R.B. Reilly, A patient adapting heart beat classifier using ECG morphology and heartbeat interval features, IEEE Trans. Biomed. Eng. Vol. 53, Dec. 2006, pp. 25352543. [17]T.P. Exarchos, C. Papaloukas, D.I. Fotiadis, L.K. Michalis, Association rule-mining based methodology for automated detection of Ischemic ECG beats, IEEE Trans. Of Biomedical Engineering, Vol 53, No 8, pp. 1531 1540, August 2006. [18] Lin Kang-Ping, Walter H. Chang, QRS feature extraction using linear prediction, IEEE Trans. Of Biomedical Engineering, No 10, Vol. 36, pp. 1531 1540, Oct. 1989. [19] J.G. Proakis, D.G. Manolakis, Digital Signal Processing, Prentice-Hall, Englewood Cliffs, New Jersey, April 2006. [20] PTB Diagnostic ECG database directory, Physiobank Archive Index, PTB Diagnostic ECG database <http://physionet.org/physiobank/database>. [21] Li X, Yao X, Fox J, Jefferys JG. Interaction dynamics of neuronal oscillations analysed using wavelet transforms. J Neuroscience Methods, Vol.160, pp.17885, 2007. [22] A Grinsted, JC. Moore, S. Jevrejeva, Application of the cross wavelet transform and wavelet coherence to geophysical time series. Nonlinear Process Geophysics. vol.11, pp. 561566, 2004. [23] C. Torrence, GP. Compo, A practical guide to wavelet analysis. Bull. Am. Meteorol. Soc., vol.79 pp.6178,1998. [24] C.Torrence, and P. Webster, Interdecadal Changes in the ESNOMonsoon System, J. Clim., vol.12, pp. 26792690, 1999.
[12]

92

Anda mungkin juga menyukai