# Pan-Tompkins++: A Robust Approach to Detect R-peaks in ECG Signals

arXiv: https://arxiv.org/abs/2211.03171 · HTML: https://mlsanity.com/paper/2211.03171/

## Key facts

- Cited by 3 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 6 Nov 2022.

## Built on by (most cited first, 3 of 3)

- [Arrhythmia Classification from 12-Lead ECG Signals Using Convolutional and Transformer-Based Deep Learning Models](https://mlsanity.com/paper/2502.17887/) (2025)
- [An Attention-Augmented VAE-BiLSTM Framework for Anomaly Detection in 12-Lead ECG Signals](https://mlsanity.com/paper/2510.05919/) (2025)
- [HRVConformer: Neonatal Hypoxic-Ischemic Encephalopathy Classification from the Heart Rate signals](https://mlsanity.com/paper/2605.26190/) (2026)

## Abstract (arXiv)

R-peak detection is crucial in electrocardiogram (ECG) signal processing as it is the basis of heart rate variability analysis. The Pan-Tompkins algorithm is the most widely used QRS complex detector for the monitoring of many cardiac diseases including arrhythmia detection. However, the performance of the Pan-Tompkins algorithm in detecting the QRS complexes degrades in low-quality and noisy signals. This article introduces Pan-Tompkins++, an improved Pan-Tompkins algorithm. A bandpass filter with a passband of 5--18 Hz followed by an N-point moving average filter has been applied to remove the noise without discarding the significant signal components. Pan-Tompkins++ uses three thresholds to distinguish between R-peaks and noise peaks. Rather than using a generalized equation, different rules are applied to adjust the thresholds based on the pattern of the signal for the accurate detection of R-peaks under significant changes in signal pattern. The proposed algorithm reduces the False Positive and False Negative detections, and hence improves the robustness and performance of Pan-Tompkins algorithm. Pan-Tompkins++ has been tested on four open source datasets. The experimental results show noticeable improvement for both R-peak detection and execution time. We achieve 2.8% and 1.8% reduction in FP and FN, respectively, and 2.2% increase in F-score on average across four datasets, with 33% reduction in execution time. We show specific examples to demonstrate that in situations where the Pan-Tompkins algorithm fails to identify R-peaks, the proposed algorithm is found to be effective. The results have also been contrasted with other well-known R-peak detection algorithms. Code available at: https://github.com/Niaz-Imtiaz/Pan-Tompkins-Plus-Plus
