Early Cardiovascular Disease Detection: An Improved Pan-Tompkins Algorithm for QRS Detection in Electrocardiogram
Main Article Content
Abstract
Cardiovascular diseases (CVDs) are the leading cause of death globally, with low- and middle-income countries (LMICs) bearing the greatest burden. Electrocardiograms (ECGs), which reflect the heart's electrical activity, are an essential tool in diagnosing CVD. The QRS complex is the most prominent wave in an ECG signal and is used for evaluating the overall heart function of an individual. The Pan-Tompkins algorithm is widely used for the detection of QRS complexes. It is, however, susceptible to baseline wander noise, has decreased sensitivity for diverse ECG morphologies, and exhibits real-time delay, leading to its suboptimal performance in QRS complex detection. This study presents an improved PanTompkins approach that combines the strengths of the Pan-Tompkins algorithm with a Recurrent Neural Network (RNN) to deliver more accurate and efficient QRS detection. The proposed algorithm achieved precision, recall, and F1-scores above 96% on Lead II of the MIT-BIH Arrhythmia Database. Overall, false positive and false negative rates were below 0.05%, calculated across the selected segments from all patient records. Execution time was reduced by 4% relative to the original Pan–Tompkins algorithm on identical ECG segments, directly lowering latency and improving real-time performance. A band-pass filter of 6–16 Hz was used, which improved robustness against baseline wander, effectively reducing noise. The algorithm demonstrated enhanced resilience to morphological variability in ECG signals, ensuring more reliable detection across diverse patterns. By integrating this AI-driven algorithm into low-cost, portable ECG devices, there is strong potential to support early detection of CVDs, particularly in underserved areas. This work contributes to a practical, scalable solution that can help strengthen digital health infrastructure and improve clinical outcomes in LMICs.
Article Details

This work is licensed under a Creative Commons Attribution 4.0 International License.