PMCCPMCCPMCC

Search tips
Search criteria 

Advanced

 
Logo of nihpaAbout Author manuscriptsSubmit a manuscriptHHS Public Access; Author Manuscript; Accepted for publication in peer reviewed journal;
 
Comput Cardiol (2010). Author manuscript; available in PMC 2011 July 19.
Published in final edited form as:
Comput Cardiol (2010). 2010; 37(5738139): 979–982.
PMCID: PMC3139228
NIHMSID: NIHMS302606

A Wavelet-Based Algorithm for Delineation and Classification of Wave Patterns in Continuous Holter ECG Recordings

Abstract

Quantitative analysis of the electrocardiogram (ECG) requires delineation and classification of the individual ECG wave patterns. We propose a wavelet-based waveform classifier that uses the fiducial points identified by a delineation algorithm. For validation of the algorithm, manually annotated ECG records from the QT database (Physionet) were used. ECG waveform classification accuracies were: 85.6% (P-wave), 89.7% (QRS complex), 92.8% (T-wave) and 76.9% (U-wave). The proposed classification method shows that it is possible to classify waveforms based on the points obtained during delineation. This approach can be used to automatically classify wave patterns in long-term ECG recordings such as 24-hour Holter recordings.

1. Introduction

The electrocardiogram (ECG) is an important clinical tool for diagnosing heart disease. The ECG may reveal unusual patterns or abnormal configurations of the individual waves and complexes which can provide the clinician with clues to the underlying etiology of disease. In many cases the diagnosis may also rely importantly on the measurement of specific intervals on the ECG which are defined by the location of the so-called fiducial points (peaks, onsets and offsets of P, QRS, T and U-waves).

Annotating fiducial points on the ECG and revealing specific wave configurations can be performed manually by a cardiologist or these tasks can rely on computer-based methods.

The accuracy of manual delineation depends on the training of the individual and there can be significant inter-observer variability [1,2]. Long-term ECG recordings such as 24-hour Holter contain on average 100,000 beats and with such data, manual annotation and classification of wave configurations is a daunting task. Commercial products are limited to automatic detection of fiducial points and the reporting of static measurements which summarize long term recordings, but there is an increasing interest in extracting more information on a beat to-beat basis from Holter ECGs. For example, it would be valuable to identify subtle ECG manifestations of cardiac disease such as altered waveform configurations and information about beat-to-beat changes in intervals which are not usually measured, and thus not commonly accessible to the clinician.

In this paper we therefore present a computerized procedure for automatic delineation and classification of wave configurations in continuous Holter. We modified existing wavelet-based delineation methods proposed by Martinéz et al. [3] and Boichat et al. [4] and we used our algorithm to identify the following fiducial points: Ponset, Ppeak, Poffset, QRSonset, Rpeak, QRSoffset, Tpeak, Toffset, Upeak and Uoffset. We further expanded the ability of the algorithm to determine predefined configurations of all QRS-, P-, T-. and U-waves.

2. Methods

2.1. ECG recordings

The QT database (QTDB) from PhysioNet [5] was used to assess delineation performance and the classification accuracy of automatically identified wave configurations. The QTDB contains ECG recordings of 15-minute duration and was designed to include various pathophysiological morphologies. Data was digitally recorded at 200 samples per second and contained two leads.

The database is suitable for testing delineation algorithms against human annotators because all records have been manually annotated for Ponset, Ppeak, Poffset, QRSonset, QRSoffset, Tpeak, Toffset, Upeak and Uoffset. Only sinus beats were included in this study. Furthermore, waveforms that could not be manually classified were excluded from further analysis.

2.2. Waveform categories

Nineteen different categories of wave configurations were defined for P, QRS, T and U after manual inspection of healthy and pathological wave shapes in the QTDB dataset. These wave patterns and polarities (+, -) were then used to assess how accurately the algorithm classified wave configurations into the predefined categories.

2.3. Wavelet basis for the algorithm

The delineation algorithm is based on work by Martinéz al. [3] and Boichat et al. [4]. The ECG signal was decomposed into 5 scales using a quadratic spline wavelet, which is equivalent to differentiating the signal in different frequency bands. In each wavelet scale, maxima and minima pairs were located (maxima-moduli) including the zero-crossing between the pairs, which corresponds to peaks in the ECG, e.g. to a peak in the T-wave. The polarity of a peak in the ECG depends on the sign of the first extremum in the maxima-moduli pair. If the first extremum is positive, the peak is positive and vice versa.

The scale which were used to locate the different waves varied depending on the estimated frequency range of the waveform. Scale 2 was used for the Q, R and S and scale 4/5 was used for the P-, T- and U-waves.

2.4. Identification of fiducial points

Identification of the fiducial points was done in four parts: Finding QRS locations and identifying the largest deflection within the complexes, detection and delineation of individual QRS components, identification of QRSonset and QRSoffset and identification of the peaks, onsets and offsets of the P-, T- and U-waves.

QRS complex

A location in the vicinity of each QRS was initially detected using a beat detection algorithm proposed by Afonso et al. [6]. The largest deflection within a 280 ms window centered on the QRS locations was identified as the zero-crossing between the largest maxima-moduli pair in the second scale. Depending on the polarity, all these extrema on the ECG represented a Q, R, R' or S wave.

A search for additional components of the QRS complex within this window was performed in the second wavelet scale. If additional maxima-moduli pairs of substantial amplitudes were identified within this window, the total number of maxima-moduli pairs in the vicinity of the largest QRS deflections and their polarities, determined the configuration of the QRS complex, i.e. QRS, RSR', QR, RS, QS or R.

The locations of QRSonset and QRSoffset were identified in the fourth wavelet scale using the method described by Boichat et al. [4]. However, if an onset or offset was not found, we applied the onset/offset method described by Martinéz et al. [3].

P-wave

From QRSonset, a search for the P-wave was performed towards the left in the fourth wavelet scale using the following search window:

equation M1

Maxima-moduli pairs in each window exceeding 0.25max(|SWp|) were then identified. If one pair was found in a search window, the peak of the P-wave was defined as the zero-crossing between the extremum in the maxima-modulus pair. If two or more pairs were found, the first and second maxima-moduli pairs determined a biphasic P-wave. Ponsets were located in the fourth wavelet scale as the first point where the value was below a threshold based on the leftmost extremum value (ExV alPleft) in the maxima-moduli pair (threshold = 0.5|ExV alpPleft|). A fraction of the rightmost extremum value (ExV alPright) in the maxima-moduli pair was used as the threshold (0.9|ExV alPright|) to identify Poffset.

T-wave

A search was performed to the right of each QRSoffset for the T-wave using a search window (SWT) inspired by Boichat et al. [4]:

equation M2

The procedure for identifying a single peak in the T-wave or for biphasic T-waves - two peaks, was similar to the procedure which was used to find peaks in the P-wave. T-wave peak(s) were located at points in the fourth wavelet scale where the maxima-moduli pairs exceeded 0.125max(|SWT|). A fraction of the rightmost extremum value in a maxima-moduli pair (ExV alTright) was used as the threshold (0.4|ExV alTright|) to identify Toffset similar to the way it was done for Poffset.

U-wave

For positive and negative T-waves, a search window for the U-wave (SWU) inspired by [7] was extended to the right in the fourth wavelet scale from the rightmost extremum value in a maxima-moduli pair (Ex ValTright):

equation M3

A U-wave was present only if a maxima-moduli pair in the search window exceeded a threshold given by:

equation M4

The locations for U-wave offsets were found using the method described by Boichat et al. [4] for QRSoffset with the same threshold they used for QRSonset.

2.5. Precision of fiducial point detection

For both ECG leads, the manually annotated fiducial points were compared with the automatically detected points. The lead with the smallest difference between manual and automatic methods was used for a given fiducial point to calculate the overall mean difference and standard deviation between the manual and automatically annotated fiducial points.

If the difference between manual and automatic locations for a fiducial point was below 40ms a true positive (TP) was registered and otherwise a false positive (FP) was registered. These indicators were subsequently used to estimate the positive predictive value (PPV) for the delineation algorithm.

2.6. Classification of wave configurations

The configuration associated with each of the automatically detected waves (QRS, T, P and U) was compared with the manually predefined configurations and to assess classification accuracy. For example, a set of two peaks in the order: negative and positive, within the QRS complex would suggest that the QRS configuration is a QR complex.

The classification accuracy was obtained by evaluating each class separately, i.e. if the manual annotated class was a positive T-wave and the algorithm classified it as a positive T-wave a true positive was registered for “positive T-wave” and a true negative was registered for all other T-wave classes. If instead, the positive T-wave was classified by the algorithm as a negative T-wave, then the following was registered: False negative for the “positive T-wave”, false positive for the “negative T-wave” and true negative for the remaining classes.

3. Results

The precision for the identification of fiducial points on the ECG is shown in table 1.

Table 1
Waveform delineation results.

Automatic detection of the U-wave, and the peak of the P-wave, were the most difficult. All other fiducial points were automatically identified within 5 ms of manual annotations. This discrepancy between the manual and automatic annotation methods corresponded to one sampled point on the ECG.

The accuracies for classification of QRS, P and T-wave configurations are given in tables 2, ,33 and and4.4. Compared to all other waveforms in the ECG, the highest agreements between manual and automatic classification were observed for these waveforms. The U-wave on the other hand, was the most difficult electrocardiographic wave to classify, table 5.

Table 2
Results for P-wave classification.
Table 3
Results for QRS classification.
Table 4
Results for T-wave classification.
Table 5
Results for U-wave classification.

4. Discussion and conclusions

The delineation and classification of the ECG waveform patterns are relevant to diagnostic decisions, and enabling the automatic delineation and classification of all waves in 24-hour Holter ECG recordings is of a growing interest since continuous hospital [8] and home monitoring devices [9] are likely to be increasingly present in our daily life.

We have developed a new ECG delineation method inspired by the work of Martinéz et al. [3] and Boichat et al. [4] and we have expanded their approaches to also include a delineation of the U-wave. The fiducial points from the delineation process have further been used to add information about the individual ECG wave configurations.

Our results indicate that the delineation algorithm provides a level of accuracy similar to the algorithms developed by Martinéz et al. [3] and Boichat et al. [4], suggesting that wavelets can provide robust method for ECG delineation. However, the wavelet technique suffers from the inherent problems with thresholding, i.e. for some signals the QRS complexes were classified as R-waves instead of a QRS, due to low amplitude Q and S wave.

The U-wave remains an under-evaluated wave of the surface electrocardiogram. Its genesis and clinical significance is still debated [7], yet it is usually reported in clinical trials investigating the safety of new pharmacological compounds.

In our work, we suggested an approach for U-wave delineation. The method provided a limited accuracy and thus needs to be improved. The mean error and standard deviation on U-wave related points was higher than those of the other complexes in the ECG. This is most likely caused by problems related to ECGs with high heart rates in which the P-wave moves closer to the end of the T-wave and thus may be wrongly identified as a U-wave. Additional work is needed to strengthen the algorithm in order to differentiate between the P-wave and the U-wave.

Despite such shortcomings, our findings indicate that it is possible to classify some wave configurations on the ECG with fair success based solely on the points obtained during delineation. Higher classification accuracy might be obtained by including more than just the fiducial points in the classification process, e.g. by placing a window on the main wave and classifying the complex using machine learning, e.g. a support vector machine. Further studies are needed to investigate such opportunities.

There are many challenges ahead, but it is possible that we will see manual ECG processing being replaced either fully or partially by automatic methods in the future as the development of simple computerized procedures for delineation and classification of wave configurations improve.

Acknowledgments

The authors would like to thank Juan Pablo Martinéz for his support during the development of the code.

References

1. Viskin S, Rosovski U, Sands AJ, et al. Inaccurate electrocardiographic interpretation of long QT: The majority of physicians cannot recognize a long QT when they see one. Heart Rhythm. 2005;2:569–574. [PubMed]
2. Montgomery H, Hunter S, Morris S, et al. Interpretation of electrocardiograms by doctors. Br Med J. 1994;309:1551–1552. [PMC free article] [PubMed]
3. Martinéz JP, Almeida R, Olmos S, et al. A Wavelet-Based ECG Delineator Evaluation on Standard Databases. IEEE Trans Biomed Eng. 2004;51(4):570–581. [PubMed]
4. Boichat N, Khaled N, Roicon F, et al. Wavelet-Based ECG Delineation on a Wearable Embedded Sensor Platform. 6th Int Workshop on Wearable and Implantable BSN; 2009. pp. 256–261.
5. Laguna P, Mark RG, Goldberger A, et al. A Database for Evaluation of Algorithms for Measurement of QT and Other Waveform Intervals in the ECG. Comput Cardiol. 1997;24:673–676.
6. Afonso VX, J TW, Nguyen TQ. et al. ECG Beat Detection Using Filter Banks. IEEE Trans Biomed Eng. 1999;46:192–202. [PubMed]
7. Ricardo A, Riera P, Ferrira C, et al. The enigmatic sixth wave of the electrocardiogram: The U wave. Cardiol J. 2008;15(5):408–421. [PubMed]
8. Drew B, Ackerman M, Funk M, et al. Prevention of torsade de pointes in hospital settings: A scientific statement from the American Heart Association and the American College of Cardiology Foundation. Circulation. 2010;121(8):1047–1060. [PMC free article] [PubMed]
9. Lai L, Peng Y, Zhou J, et al. Research of Personalized Medical Testing Technology for Healthy Smart Home. Bioinformatics and Biomedical Engineering iCBBE. 2010:1–4.