EUROPEAN JOURNAL FOR BIOMEDICAL INFORMATICS   in English in English |  Česky Česky 
     
 
 
English   Česky  

Wavelet Contour Based Detector for Arrhythmia Analysis

Dina Kičmerová1, Ivo Provazník1
1. Department of Biomedical Engineering, Brno University of Technology, Czech Republic

Summary

This paper deals with design of an automatic detector for classification of selected cardiac arrhythmias. The proposed algorithms employ the continuous wavelet transform (CWT) combined with an analysis of its contour envelopes. The CWT was used in a detector of R-waves, to distinguish between normal and abnormal beats, and for detection of atrial premature contractions (APCs) and premature ventricular contractions (PVCs). The algorithm was validated by extensive testing on the MIT/BIH database. Searching for a local maximum in wavelet contour envelopes efficiently detects R-peaks. The overall accuracy of its detection tested on 48 half-hour signals is 99.5%. Two types of classifications were tested: 1. classification based on the contour envelope and the detection of significant points with overall accuracy 94.6%, 96.1% for the sinus rhythm (SR), 30.4% APCs, 71.2% PVCs and 2. the localization of maximum of square modulus of CWT coefficients in the area of QRS complex for the determination of PVCs between SR, right bundle branch block (RBBB), APC and other narrow complex arrhythmias with the accuracy 96.8%.

Keywords: arrhythmias, ECG signal, wavelet transform, contours

Introduction

Automatic processing systems are frequently used in medical data analyses. Modern medicine generates huge amounts of data giving an opportunity to search for explicit understanding of physiology. New methods can help in dealing with this problem, they can simplify and usually speed up the processing of large volumes of data. The physician's work is a typical example. The physician has to decide very frequently upon a patient‘s diagnosis on the basis of a number of numerical values measured during an examination. Orientation in this amount of data is not always easy and unambiguous. Therefore there are many consultation systems that help minimise human errors.

The modern analysis of the electrical activity of the heart uses simple and sophisticated algorithms of digital processing signals implemented in electrocardiographs [1,2,4-6,8-18]. We can sort these algorithms into three groups: working in time [8], frequency [5] and time-frequency domain [10-18]. First two classes belong to classical methods, which are successful in many clinical tested applications and analysis of ECG, detection of the QRS complex [4], its beginning and end, analysis of deviation of the ST segment, analysis of variability of heart rate, etc. New algorithms work in the time-frequency domain [10-18] and combine some advantageous characteristics known from classical methods – mainly they allow the frequency analysis with time information about analyzed features. Using the simple time analysis does not provide high quality results because of low sensitivity. It is caused by a small amplitude of the changes. The frequency analysis increases sensitivity, but it cannot tell in which phase of the heart cycle these changes originated.

At present, the wavelet transform (WT) is the most used method of the time-frequency analysis [10-18]. WT is popular, because it is implemented simply and its results are very well interpreted like the Fourier transform, using the frequency analysis. Many variants of WT provide large possibilities in selection, from a redundant detailed analysis to a fast analysis with minimum output data. Selection of a particular variant of the WT is based on the specific application (suppression of the noise, marking time and frequency components of useful signal, detection of important points, detection and observing important changes in waves in time, etc.).

In this paper we explore the use of the continuous wavelet transform in the analysis of beat morphologies and for ECG classification. The aim of this work was to distinguish different ECG arrhythmic patterns and enable an abnormality diagnosis. An arrhythmia classifier based on the continuous wavelet transform has been presented to identify normal beats, abnormal premature ventricular contraction (PVC) and atrial premature contraction in ECG. The occurrence of an arrhythmia is unpredictable. The purpose of this study is to develop a method using the CWT coefficients of ECG waveforms. Two kinds of cardiac arrhythmia, PVC (premature ventricular contractions) and APC (atrial premature contractions), which are the most common types of cardiac arrhythmias in ECG monitoring, will be discussed.

Methods

The wavelet transform (WT) is based on the use of a set of mathematical analyzing functions called "wavelets". Wavelets provide decomposition of the ECG signal into a set of wavelet coefficients. The analyzing functions are generated from a generally complex-valued function ψ(t) by dilation and shift in time. Each analysing function ψa,b(t)=ψ((t-b)/a) has its own parameters – time localization defined by shift b and a frequency band defined by a dilation factor a. Each resulting wavelet coefficient corresponds to the measurement in the signal in a given time instant and a given frequency band. Wavelet coefficients can be easily calculated using the following definition equation of the continuous wavelet transform (CWT) 
 
                                                                                                                 (1)

where f(t) is an ECG signal to be analysed and * stands for complex conjugate. Further background information concerning continuous wavelets and their properties can be found in [3, 6] and [16].

ECG components delineation

The proposed method is composed of two main parts: 1. continuous wavelet transform with discretized output, and 2. classical time-domain processing algorithms.

WT (Eq. (1)) results in a two-dimensional function which represents the signal in the time-frequency domain. For an easier analysis of the resulting function WT(a,b), we may use its absolute value abs(WT(a,b)). Further, the function should be normalized for a later analysis. Thus, Eq. 1 can be rewritten as

                                                                                              (2).

An example of the ECG signal analysis using CWT with the Morlet wavelet is shown in Fig.1. Three main waves/peaks can be found in the signal (panel (a): small P-wave marked by (1), high QRS-complex marked by (2) and high T-wave marked by (3)). The time-frequency spectrum of the signal is shown as a shaded contour plot of WTabs(a,b) (minimum values in white, maximum values in black). One can easily find the three wave components mentioned above. However, WTabs(a,b) in Fig.1(b) is not suitable for simple and efficient detection of particular waves.

  

Figure1. (a) ECG signal and its (b) modulus of CWT. P-wave (1), QRS-complex (2), and T-wave (3) are marked. 

The image of WTabs(a,b) can be simplified by taking a z-axis slice for a chosen value LÎ<0;1>. Thus, contour image CL is

                                                                                                       (3),

where ε is a small value. An example of a contour image is shown in Fig.2(b). Only that part of the contour, which is the closest to the highest frequency, is considered (4). Such a contour is called a contour envelope EC and is defined as

                                                                                                                            (4)

for all b's. The contour envelope EC is a 1-D function. An example of the contour envelope is in Fig. 2(c).

Figure 2. Contour envelope generation: (a) ECG signal, (b) slice through time-frequency spectrum of the signal, (c) contour envelope. 

EC is further formed by classical signal processing algorithms. In the proposed method, EC is smoothed using a low-pass Lynn's filter defined as

                                                                                                                                            (5).

The filtered EC is used for delineation of signal components (Fig.2 EC with a cutting level for QRS detection, Fig. 3 EC with a cutting level for other components).

Simply, the EC is thresholded to remove any noise and suppress the widening effect due to the above described low-pass filtering (Fig. 3(c)). While all small value areas are zeroed, all values above the threshold are set to 1. Then, ascending and descending edges represent on-sets and off-sets of particular signal components – P-wave, QRS-complex, and T-wave (Fig.3(d)). The high cutting level L is used only for QRS complex detection to remove other components and avoid false detection (Fig.2) and the low level for other waves to make them visible in the contour envelope (Fig.3). Inner edges are removed and on-sets and off-sets determined.

Figure 3. Detection of P-wave, QRS-complex and T-wave using Haar wavelet. (a) ECG signal, (b) contour envelope, (c) filtered contour envelope, (d) detected edges.

APC/PVC classifier

APC/PVC classifier distinguishes between APC (atrial premature contraction) and PVC (premature ventricular contraction).

We analyze the area before the detected QRS complex for the detection of APC. The premature P-wave can be detected in the wavelet contour envelope using the simple wavelets. Fig.4 shows the application of the Haar wave, scale 1-32, and the cutting level:

                                                                                                                         (6).

We can see structures in the wavelet contour envelope before detected QRS, these structures detect the P-wave, which has an irregular P-P interval or an abnormal shape. This contour is also filtered for better performance. Detection edges are processed by a decision algorithm.

Figure 4. Atrial premature beat: (a) ECG signal, (b) contour envelope. 


The detected QRS complex has a normal width and it can distinguish APC between PVCs. The width analysis of QRS in the contour envelope of square modulus of coefficients was done for the level L=8*mean(WTabs(a,b)), scale 1-32 and Mexican hat wave. The width analysis is documented in Fig. 5. Wide QRS complexes of PVCs has also wide response in contour envelope (Fig. 5(a) versus Fig. 5(b)). EC is filtered, thresholded and further processed by classical algorithms.

Figure 5. Width analysis: (a) signal No. 119, (b) contour envelope, (c) filtered contour envelope, (d) edges image. 


The next analyzed feature is the R-R interval. A three RR interval sliding window [RR1, RR2, RR3] and an averaged RR interval is used to classify a middle RR2 interval (Fig. 4). The R-R interval surrounding the premature ventricular beat is usually equal to double of the basic R-R interval (Fig. 6) and longer than double for APC (Fig. 4). Different criteria for the RR interval, P-P interval, P wave shape and QRS width are combined together.

Figure 6. Discrimination of normal and ventricular premature contractions
(a) Square modulus of CWT coefficients – Mexican hat wave,
(b) ECG signal No. 119.

 

Normal rhythm/ Abnormal rhythm classifier

This method shows that we can find differences between abnormal beats and normal beats in the matrix of wavelet coefficients. The Mexican hat wave and scale 1-64 were used. The maximum of square modulus of CWT coefficients of SR (sinus rhythm) in the area around QRS (QRS including) is usually for a between a=1 and a=10 and it does not change too much from one another. The square modulus of CWT coefficients of premature ventricular contractions has a bigger amplitude, the maximum of coefficients in the QRS area is in a higher scale than for normal beats and width of its shape is higher. It can be compared in Fig.6, where narrow QRS complexes of normal beats have a narrower response and a lower amplitude in the matrix of CWT coefficients than premature ventricular contractions. The position of maximum of CWT coefficients for PVC's in the area of QRS complex on a scale axis is more than 18. Each change in the size of maximum, position of maximum on a scale axis and width between beats can signalize some abnormality or noise.

RBBB (right bundle branch block) has maximum of coefficients in low scales, usually the same as SR, but it can be distinguished by virtue of QRS-width.

Results

Algorithms have been developed in the MATLAB environment with a Wavelet Toolbox. Signals were tested on selected recordings from the MIT-BIH arrhythmia database created by the Massachusetts Institute of Technology (MIT) and Boston's Beth Israel Hospital (BIH). All analysed recordings contained description of each heart beat used for evaluation of detection accuracy. A single lead MLII (modified limb lead II) was chosen for an analysis. The used sampling frequency was 360 Hz.

DETECTION OF QRS-COMPLEXES

The algorithm was tested on 48 signals (no. 100-234) from the MIT-DB library in full length (each approximately of 30 minutes, 650 000 samples). In total, more than 24 hours of signals containing 99555 QRS-complexes were analyzed .

The average detection rate was 99.45%, the lowest result was found for the signal no. 207 (88.63%). The signal No. 207 contained large periods of ventricular fibrillation, where it was difficult to recognize particular QRS-complexes. The detector had the detection rate above 99.9% in 23 signals, and 99% in 43 of signals.

Fig.7 documents robustness of the algorithm. The upper panel shows an original signal with detected heart beats (N under the signal curve). The lower panel shows the same signal with the original description from the MIT-BIH database. In this example, no QRS complex was missed or false detected.

  

Figure 7. Detection of QRS-complexes – signal No. 105: (a) results, (b) database.

APC/PVC CLASSIFIER

Classification of ECG was carried out on 34 of MIT-DB recordings. The following beat types were selected for the study: sinus rhythm (SR), premature ventricular contraction (PVC), and premature atrial contraction (APC). Classification was not trivial due to the wide variations of the morphology of the SR, PVC, and APC beats as it can be shown on the recordings. The average accuracy of this method in classification of SR, PVC and APC beats was 94.6%. The accuracy is represented by a ratio of true positive detections to a number of all beats. Numbers of tested SR, PVC, and APC beats and accuracy of detection is summarized in the table below. The accuracy of detection of SR, PVC, or APC beats in the table is represented by a ratio of true positive detections to a number of corresponding beats.

Table 1. Classification accuracy for APC/PVC classifier.

 Rhythm

Database 

 Algorithm

 Accuracy (%)
 SR

 69264

 66821

 96.1

 PVC

 5383

 3807

 71.2

 APC

 917

 271

 30.4



We tested 34 signals from the MIT-DB library where PVC and APC appear more frequently.

The system described in this paper is patient-independent: an operator is not required to hand-segment samples of each new type of a beat before and during the analysis. The results obtained have shown that continuous wavelet transform enables an arrhythmia analysis and helped identify characteristics for arrhythmia classification.

NORMAL RHYTHM / ABNORMAL RHYTHM CLASSIFIER

The algorithm was tested only on 40 signals from the MIT-DB library with PVC's, APC, RBBB, LBBB (left bundle branch block), SR.

We can easily distinguish PVCs between RBBB, SR, APC and other narrow complex arrhythmias by searching for location of local maxima in matrix of CWT coefficients on a scale axis. This method has average accuracy 96.81% for detection of PVCs between APC, SR, RBBB. Signals with LBBBs were also tested, but there were not obtained reliable results. This algorithm is also independent, there is not necessary manual segmentation and manual classification of data.

Discussion and conclusion


These methods are found suitable for a continuing analysis. The cooperation with a cardiologist is necessary for further improvement. QRS complex detection accuracy is comparable to the recently published results. Classification algorithms can recognize clear examples of abnormality and typical progresses, but beats on the border of categories and atypical changes are not classified very successfully.

APC/PVC classifier promises good results with some limitations: classification based on the detection of waves and measuring important intervals in contour envelopes can decide about abnormal intervals and values but it cannot decide precisely about the type of arrhythmias. This information cannot be compared to the database. This decision is not possible without practical medical experience.

Finding of hidden differences between diseases and WT coefficients are promising techniques. The Normal rhythm/Abnormal rhythm classifier shows that differences can be discovered. We can see in the matrix of coefficients that RBBB has usually maximum of coefficients in the low part of the scale range (1:64), the same as SR (but we can separate them due to their width), LBBB in the middle part and PVC in the higher part. We can determine with high accuracy the PVCs in the matrix of coefficients. They have a maximum in the higher part of the scale range and a broad response in the wavelet image. Only this criterion gives good results for recognizing and distinguishing PVCs between SR, RBBB, APC, NPB (nodal premature beat), JEB (junctional escape beat) and other narrow complex arrhythmias. It can be used as feature for the automatic computing and training methods. The CWT transform offers a detailed analysis, although this comes at a significant expense in computational load and memory usage. The creation of a general algorithm successful on all ECG cycle variants is a difficult problem. Automatic computing and training methods based on artificial intelligence approaches, hidden Markov models or others could solve the described difficulties. We can detect successfully deviations from the sinus rhythm; broad, wide and deep PVCs, etc., but there are still variations, where human input is necessary.

Acknowledgement
The research was supported by the grants GACR No. 102/07/1473 and the Research Programme of Brno University of Technology MSM 0021630513.

References

[1] 

Nabney I. T., Evans D. J., Tenner J., Gamlyn L.: Benchmarking Beat Classification Algorithms. Computers in Cardiology, 2001, 529-532.  

[2] 

Sahambi J. S., Prasad G. K.: Classification Of ECG Arrhythmias Using Multi-Resolution Analysis And Neural Networks. In Proceedings of Convergent Technologies for the Asia-Pacific Region Conference, Bangalore, India, IEEE 2003, Vol. 1.

[3]

Strang G., Nguyen T.: Wavelets and filter banks. Wellesley-Cambridge Press, USA, 1996.

[4]

Kohler B., Hennig C., Orglmeister R.: The principles of software QRS detection. IEEE Eng. Med. Biol. Mag., 2002, pp. 42-54.

[5]

Small M., Yu D. J., Grubb N., Simonotto J., Fox K. A. A., Harrison R. G.: Automatic identification and recording of cardiac arrhythmia. Comp. Cardiol., 2000, vol. 27, pp. 355-358.

[6]

Unser M.: A Practical Guide to the Implementation of the Wavelet Transform. In: Aldroubi, A, Unser M. Wavelets in Medicine and Biology. CRC Press, New York, 1996.

[7]

Braunwald E., Zipes D. P., Libby P.: Heart disease. W. B. Saunders Company, 2001.

[8]

Chen S. W., Clarkson P. M., Fan Q.: A robust sequential detection algorithm for cardiac arrhythmia classification. IEEE Trans. Biomed. Eng., 1996, vol. 43, pp. 1120-1125.

[9]

Guvenir H. A., Acar B., Demiroz G., Cekin A.: A supervised learning algorithm for arrhythmia analysis. Comp. Cardiol., 1997, vol. 24, pp. 433-436.

[10]

Dickhaus H., Heinrich H.: Classifying biosignals with wavelet networks. IEEE Eng. Med. Biol. Mag., 1996, pp. 103-104.

[11]

Provaznik I., Bardonova J.: Delineation of ECG Waves Using Complex-Valued Continuous Wavelet Transform. Springer Berlin Heidelberg, 2008, vol. 18, pp. 158-161, ISSN 1680-0737.

[12]

Chesnokov Yu. V., Chizhikov V. I.: Continuous Wavelet Transformation in Processing Electrocardiograms in Ventricular Arrhythmia. Journal Measurement Techniques. Springer New York, 2004, no. 4, vol. 47, pp. 417-421, ISSN 0543-1972.

[13]

Shyu L. Y., Wu Y. H., Hu W.: Using wavelet transform and fuzzy neural network for VPC detection from the Holter ECG. IEEE Trans. Biomed. Eng., 2004, vol. 51, pp. 1269-73.

[14]

Romero Legaretta I., Addison P. S., Reed M. J., Grubb N. R., Clegg G. R., Robertson C. E., Watson J. N.: Continuous wavelet transform modulus maxima analysis of the electrocardiogram: Beat-to-beat characterisation and beat-to-beat measurement, Int. J. Wavelets, Multiresolution and Information Processing, 2005, vol.3(1), pp. 19-42.

[15]Addison P. S.: Wavelet transforms and the ECG: a review. Physiol. Meas., 2005, vol. 26.
[16]

Addison P. S.: The Illustrated Wavelet Transform Handbook: Applications in Science, Engineering, Medicine and Finance. Institute of Physics Publishing, Bristol, 2002.

[17]

Mahmoodabadi S. Z., Ahmadian A., Abolhasani M. D.: ECG Feature Extraction Using Daubechies Wavelets. Proceedings of the Fifth IASTED International Conference, Visualization, Imaging, and Image Processing, Benidorm, Spain. September 7-9, 2005.

[18]

Daqrouq K., Abu-Isbeih I. N.: Arrhythmia Detection using Wavelet Transform. EUROCON, 2007. The International Conference on Computer as a Tool, pp.122-126, 9-12 Sept. 2007.


 
PDF versions:
2009   2008  
 
Published by EuroMISE s.r.o.