Mathematical Biosciences and Engineering (Oct 2023)

Precise detection and localization of R-peaks from ECG signals

  • Diguo Zhai,
  • Xinqi Bao,
  • Xi Long,
  • Taotao Ru ,
  • Guofu Zhou

DOI
https://doi.org/10.3934/mbe.2023848
Journal volume & issue
Vol. 20, no. 11
pp. 19191 – 19208

Abstract

Read online

Heart rate variability (HRV) is derived from the R-R interval, which depends on the precise localization of R-peaks within an electrocardiogram (ECG) signal. However, current algorithm assessment methods prioritize the R-peak detection's sensitivity rather than the precision of pinpointing the exact R-peak positions. As a result, it is of great value to develop an R-peak detection algorithm with high-precision R-peak localization. This paper introduces a novel R-peak localization algorithm that involves modifications to the well-established Pan-Tompkins (PT) algorithm. The algorithm was implemented as follows. First, the raw ECG signal $ X\left(i\right) $ was band-pass filtered (5–35 Hz) to obtain a preprocessed signal $ Y\left(i\right) $. Second, $ Y\left(i\right) $ was squared to enhance the QRS complex, followed by a 5 Hz low-pass filter to obtain the QRS envelope, which was transformed into a window signal $ W\left(i\right) $ by dynamic threshold with a minimum width of 200 ms to mark the QRS complex. Third, $ Y\left(i\right) $ was used to generate QRS template $ T\left(n\right) $ automatically, and then the R-peak was identified by a template matching process to find the maximum absolute value of all cross-correlation values between $ T\left(n\right) $ and $ Y\left(i\right) $. The proposed algorithm achieved a sensitivity (SE) of 99.78%, a positive prediction value (PPV) of 99.78% and data error rate (DER) of 0.44% in R-peak localization for the MIT-BIH Arrhythmia database. The annotated-detected error (ADE), which represents the error between the annotated R-peak location and the detected R-peak location, was 8.35 ms for the MIT-BIH Arrhythmia database. These results outperformed the results obtained using the classical Pan-Tompkins algorithm which yielded an SE of 98.87%, a PPV of 99.14%, a DER of 1.98% and an ADE of 21.65 ms for the MIT-BIH Arrhythmia database. It can be concluded that the algorithm can precisely detect the location of R-peaks and may have the potential to enhance clinical applications of HRV analysis.

Keywords