ECG Enhancement and R-Peak Detection Based on Window Variability

Wu Lu, Xiaoyun Xie, Yinglong WangHealthcare 2021 · DOI

TL;DR

This paper introduces SQRS, a novel method for enhancing ECG signals and accurately detecting R-peaks, crucial for diagnosing heart conditions. By employing a unique window variance transform and adaptive thresholds, SQRS effectively suppresses noise and other ECG waveforms, achieving a remarkable 99.6% sensitivity on the MIT-BIH arrhythmia database.

What Problem Does This Paper Address?

The electrocardiogram (ECG) is a vital tool for monitoring heart health, but the signals it produces are often noisy and complex. Accurately identifying the R-peak within the QRS complex is paramount for detecting various cardiac abnormalities like arrhythmias and hypertrophy. However, this task is challenging due to the inherent variability of ECG signals, superimposed noise, and interference from other ECG waves (P and T waves). Existing methods often struggle with these issues, leading to missed detections (false negatives) or incorrect identifications (false positives). This paper aims to address this by proposing a robust and efficient method for both enhancing the ECG signal to better highlight R-peaks and accurately detecting them.

Methods

The proposed SQRS method operates in three main stages:

  1. Noise Removal: The initial step involves denoising the raw ECG signal using a simple moving-average filter. This helps to smooth out high-frequency noise and baseline wander, preserving the essential morphological features of the ECG.
  2. ECG Enhancement: This is the core innovation of the paper. A novel window variance transform (WVT) is introduced. This technique measures the signal's variability within specific time windows. By applying this transform, the QRS complex, which exhibits high variability, is highlighted, while other components like P and T waves, which are generally smoother, are suppressed. To further enhance the QRS complex and improve robustness, a squared window variance transform (SWVT) is proposed. This squaring operation amplifies the variance signal, making R-peaks even more prominent and also helps in detecting inverted R-peaks.
  3. R-Peak Detection: After enhancement, R-peak candidates are generated. The detection process then employs adaptive thresholds based on both the amplitude and kurtosis of the signal. This is a key advantage, as it leverages the distinct statistical properties of R-peaks compared to other waveforms. The thresholds are dynamically adjusted, making the method more resilient to variations in signal morphology and amplitude. Decision rules, incorporating the adjusted RR interval, are then applied to refine the candidate set and confirm the final R-peaks.

Datasets

The primary dataset used for evaluation is the MIT-BIH Arrhythmia Database. This is a widely recognized and standard benchmark for evaluating ECG analysis algorithms. The paper utilized 30 ECG records from this database, each containing 30 minutes of data sampled at 360 Hz. The R-peak locations in this dataset are annotated by multiple cardiologists, providing a reliable ground truth. No new benchmarks were introduced.

Key Insights and Ideas

  • Window Variance as a QRS Detector: The core idea that signal variability within a window can effectively highlight QRS complexes while suppressing other waveforms is a significant insight. This is particularly useful for enhancing the signal before peak detection.
  • Squared Window Variance Transform (SWVT): The squaring operation on the WVT is a clever enhancement that amplifies the signal's discriminative power, making R-peaks more pronounced and improving detection of inverted R-peaks.
  • Dual Adaptive Thresholding (Amplitude and Kurtosis): Moving beyond simple amplitude thresholds, the use of both amplitude and kurtosis for adaptive thresholding is crucial. Kurtosis captures the "tailedness" of the distribution, which can differentiate sharp R-peaks from smoother P/T waves, leading to more accurate detection.
  • Robustness to Noise and Waveform Variations: The combination of denoising, the SWVT enhancement, and adaptive dual thresholds makes the method remarkably robust to various types of noise and unusual R-peak morphologies.

Key Results

The proposed SQRS method demonstrated excellent performance on the MIT-BIH Arrhythmia Database:

  • Sensitivity: Achieved a high sensitivity of 99.65%.
  • Positive Predictive Value (PPV): Reached 99.39%.
  • Cumulative Statistical Index (CSI): Obtained a CSI of 99.04%.
  • Comparison: The method outperformed classic algorithms like PT, XQRS, and RSlope in terms of SEN, PPV, and CSI, particularly in challenging scenarios like signals with large baseline wander or unusual morphologies.
  • Error Rate: The proposed method achieved the minimum detection error rate of 0.92%.

Limitations and Future Work

The authors acknowledge a few limitations:

  • Unusual Morphologies: Signals with highly unusual R-peak morphologies might still pose challenges, as adaptive thresholds are sensitive to the statistical properties of these peaks.
  • Window Size Selection: The fixed window size used in the variance transform might not be optimal for all signal variations, and selecting the appropriate window size remains a challenge.
  • Future Work: The authors suggest exploring other non-curated datasets (e.g., NST, ambulatory ECG datasets from wearable devices) to further validate the method's performance on noisy signals. They also plan to investigate the impact of different window sizes and potentially explore more advanced adaptive thresholding techniques.

Summary updated

Abstract

In ECG applications, the correct recognition of R-peaks is extremely important for detecting abnormalities, such as arrhythmia and ventricular hypertrophy. In this work, a novel ECG enhancement and R-peak detection method based on window variability is presented, and abbreviated as SQRS. Firstly, the ECG signal corrupted by various high or low-frequency noises is denoised by moving-average filtering. Secondly, the window variance transform technique is used to enhance the QRS complex and suppress the other components in the ECG, such as P/T waves and noise. Finally, the signal, converted by window variance transform, is applied to generate the R-peaks candidates, and the decision rules, including amplitude and kurtosis adaptive thresholds, are applied to determine the R-peaks. A special squared window variance transform (SWVT) is proposed to measure the signal variability in a certain time window, and this technique reduces false detection rate caused by the various types of interference presented in ECG signals. For the MIT-BIH arrhythmia database, the sensitivity of R-peak detection can reach 99.6% using the proposed method.
BibTeX
@inproceedings{lu2021ecg,
  author = {Wu Lu and Xiaoyun Xie and Yinglong Wang},
  title = {{ECG Enhancement and R-Peak Detection Based on Window Variability}},
  booktitle = {Healthcare},
  year = {2021},
  doi = {10.3390/healthcare9020227},
}
Figure