Fast T Wave Detection Calibrated by Clinical Knowledge with Annotation of P and T Waves

Mohamed Elgendi, Bjoern M. Eskofier, Derek Abbott

TL;DR

This paper introduces a novel, computationally efficient algorithm for detecting T waves in ECG signals, leveraging clinical knowledge to improve accuracy. By annotating previously unannotated T waves in a standard database and developing a robust detection method, the authors pave the way for more accessible and reliable cardiac monitoring, especially on battery-powered devices.

What Problem Does This Paper Address?

Accurate detection of T waves in electrocardiogram (ECG) signals is crucial for diagnosing various cardiac conditions, including arrhythmias, acute coronary syndrome, and myocardial infarction. However, T wave detection is significantly more challenging than QRS complex detection due to their lower amplitudes, lower signal-to-noise ratio (SNR), variability in morphology, and potential overlap with P waves. While QRS detection has been extensively studied, T wave detection remains an open problem. Furthermore, the increasing trend towards portable, battery-driven ECG devices necessitates computationally efficient algorithms that can operate in real-time. A key bottleneck has been the lack of comprehensive ECG databases with annotated T waves, making robust algorithm development and evaluation difficult.

Methods

The proposed algorithm employs a three-stage approach:

  • Pre-processing: This stage involves applying clinical knowledge, bandpass filtering (0.5-10 Hz Butterworth filter) to remove baseline wander and high frequencies, squaring the signal to emphasize larger amplitude components, and crucially, QRS removal. QRS removal is achieved by setting the signal to zero for the duration of the QRS complex, which helps to isolate the T wave as the dominant feature. The QRS removal duration is guided by clinical knowledge of RR intervals and four phases of sinus node response to atrial premature depolarization (compensation, reset, interpolation, and reentry), as described by Roskamm and Csapo.
  • Feature Extraction: This stage utilizes two event-related moving averages to demarcate potential T wave areas. The first moving average (MApeak) emphasizes the peak of the T wave, while the second (MATwave) is used as a threshold for the first, highlighting the T wave area. The window sizes for these moving averages are dynamically calculated based on the most frequent RR intervals within different ECG categories.
  • Classification (Thresholding): Blocks of interest identified in the previous stage are compared. A durational threshold (THR1) is applied to reject blocks that are unlikely to be T waves (e.g., containing P waves, U waves, or noise). Additionally, relative-position thresholds are used to distinguish T waves from P waves and noise, considering the timing relative to the R peaks. Finally, the maximum absolute value within the accepted blocks is identified as the T wave peak.

Datasets

The study utilizes two primary datasets:

  • MIT-BIH Arrhythmia Database: This database was manually annotated for P and T peaks by the authors. This was necessary because the original MIT-BIH database only provides R peak annotations. The authors chose this database due to its long recording durations (30 minutes per patient) and its inclusion of diverse ECG signals with various non-stationary effects, low SNR, and different arrhythmias, making it a robust testbed.
  • QT Database: This database, which is standard for evaluating ECG waveform interval measurements, was used for validation. It contains manually annotated beats by cardiologists, including various morphologies and conditions. The authors focused on the T peaks of Lead I for validation, as they are generally more salient.

Key Insights and Ideas

  • Clinical Knowledge as a Foundation: The core innovation is the integration of clinical knowledge about heart rhythms and wave morphology directly into the algorithm's design, particularly for QRS removal and thresholding. This moves beyond purely signal-processing-based approaches.
  • Annotating the Unannotated: The authors' manual annotation of T waves in the MIT-BIH database is a significant contribution, creating a valuable resource for future research in T wave detection.
  • Simplicity and Efficiency: The algorithm's design prioritizes simplicity and computational efficiency, making it suitable for implementation on resource-constrained devices like mobile phones.
  • Robustness to Noise and Artifacts: The algorithm demonstrates resilience to common ECG signal issues like high-frequency noise and baseline wander, attributed to the bandpass filtering and moving average techniques.

Key Results

  • MIT-BIH Database Performance: The algorithm achieved a sensitivity of 99.86% and a positive predictivity of 99.65% on the MIT-BIH database, handling various challenging conditions including low SNR, baseline wander, PACs, PVCs, LBBBs, and RBBBs.
  • QT Database Performance: On the manually annotated QT database (3542 heart beats), the algorithm achieved an overall accuracy of 98.84%. On the automatically annotated QT database (111,201 heart beats), it achieved 96.7% accuracy.
  • Processing Speed: The algorithm is computationally efficient, handling 15-minute recordings in approximately 0.52 ± 0.14 seconds and 30-minute recordings in 1.98 ± 0.32 seconds on a standard Intel i5 CPU.

Limitations and Future Work

  • R Peak Dependency: The method assumes that R peaks are correctly detected. Misclassification of R peaks would lead to failure in T wave detection.
  • Limited RR Interval Window: The rule-based system for QRS removal is based on a three RR interval window. Future work could explore using more RR intervals to potentially improve accuracy.
  • Threshold Optimization: While thresholds were calibrated using clinical knowledge, further optimization could enhance performance.
  • Broader Arrhythmia Coverage: The study suggests a need for more focused investigation into specific arrhythmias like atrial fibrillation, atrial flutter, and various tachycardias, as T wave morphology can differ significantly.
  • P Wave Detection: The authors propose exploring P wave detection based on accurate T wave peak detection.
  • Clinical Parameter Optimization: Optimizing clinical parameters after splitting databases into training and testing sets could improve detection rates.
  • Biphasic T Waves: Investigating T waves with different morphologies, such as biphasic T waves, is suggested.
  • Advanced Signal Processing: Further exploration of event-related moving averages, different bandpass filters, and fast-moving average/median techniques for real-time applications is recommended.

Summary updated

Abstract

Background: There are limited studies on the automatic detection of T waves in arrhythmic electrocardiogram (ECG) signals. This is perhaps because there is no available arrhythmia dataset with annotated T waves. There is a growing need to develop numerically-efficient algorithms that can accommodate the new trend of battery-driven ECG devices. Moreover, there is also a need to analyze long-term recorded signals in a reliable and time-efficient manner, therefore improving the diagnostic ability of mobile devices and point-of-care technologies. Methods: Here, the T wave annotation of the well-known MIT-BIH arrhythmia database is discussed and provided. Moreover, a simple fast method for detecting T waves is introduced. A typical T wave detection method has been reduced to a basic approach consisting of two moving averages and dynamic thresholds. The dynamic thresholds were calibrated using four clinically known types of sinus node response to atrial premature depolarization (compensation, reset, interpolation, and reentry). Results: The determination of T wave peaks is performed and the proposed algorithm is evaluated on two well-known databases, the QT and MIT-BIH Arrhythmia databases. The detector obtained a sensitivity of 97.14% and a positive predictivity of 99.29% over the first lead of the validation databases (total of 221,186 beats). Conclusions: We present a simple yet very reliable T wave detection algorithm that can be potentially implemented on mobile battery-driven devices. In contrast to complex methods, it can be easily implemented in a digital filter design.
BibTeX
@inproceedings{elgendi2015fast,
  author = {Mohamed Elgendi and Bjoern M. Eskofier and Derek Abbott},
  title = {{Fast T Wave Detection Calibrated by Clinical Knowledge with Annotation of P and T Waves}},
  booktitle = {Sensors},
  year = {2015},
  url = {https://openreview.net/forum?id=wfCpQmLTVeF},
}
Figure