Next Article in Journal
A Graph-Attention-Based Method for Single-Resident Daily Activity Recognition in Smart Homes
Next Article in Special Issue
Signal Quality Analysis for Long-Term ECG Monitoring Using a Health Patch in Cardiac Patients
Previous Article in Journal
Data-Driven Supply Chain Operations—The Pilot Case of Postal Logistics and the Cross-Border Optimization Potential
Previous Article in Special Issue
Rate-Responsive Cardiac Pacing: Technological Solutions and Their Applications
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Algorithm for Mobile Platform-Based Real-Time QRS Detection

1
Department of Medicine, Division of Cardiology, Johns Hopkins University, Baltimore, MD 21218, USA
2
Department of Medical and Surgical Sciences, University of Bologna, 40138 Bologna, Italy
3
AccYouRate Group S.p.A., 67100 L’Aquila, Italy
4
Department of Biomedical Engineering, Johns Hopkins University, Baltimore, MD 21218, USA
5
Department of Radiology, Johns Hopkins University, Baltimore, MD 21205, USA
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Sensors 2023, 23(3), 1625; https://doi.org/10.3390/s23031625
Submission received: 10 November 2022 / Revised: 17 January 2023 / Accepted: 25 January 2023 / Published: 2 February 2023
(This article belongs to the Special Issue ECG Signal Processing Techniques and Applications)

Abstract

:
Recent advancements in smart, wearable technologies have allowed the detection of various medical conditions. In particular, continuous collection and real-time analysis of electrocardiogram data have enabled the early identification of pathologic cardiac rhythms. Various algorithms to assess cardiac rhythms have been developed, but these utilize excessive computational power. Therefore, adoption to mobile platforms requires more computationally efficient algorithms that do not sacrifice correctness. This study presents a modified QRS detection algorithm, the AccYouRate Modified Pan–Tompkins (AMPT), which is a simplified version of the well-established Pan–Tompkins algorithm. Using archived ECG data from a variety of publicly available datasets, relative to the Pan–Tompkins, the AMPT algorithm demonstrated improved computational efficiency by 5–20×, while also universally enhancing correctness, both of which favor translation to a mobile platform for continuous, real-time QRS detection.

Graphical Abstract

1. Introduction

Continuous collection and real-time analysis of physiologic data are increasingly common due to advances in wearable technologies [1,2]. The electrocardiogram (ECG) is a signal acquisition technology that monitors the electrical activity of the heart and is common for routine cardiac evaluation because it is inexpensive, noninvasive, and provides continuous real-time data. The ECG is particularly valuable for detecting cardiac anomalies such as arrythmias [3,4,5].
Many algorithms have been developed to recognize characteristics of the ECG, and the detection of the QRS complex is fundamental for analysis [6,7,8,9,10,11,12,13,14,15,16,17] because it is the major landmark that allows the waveform to be segmented into heartbeats for determining the heart rate and its variability [18]. The accurate detection of the QRS signal is also fundamental to more detailed ECG processing [19].
One common method for QRS detection is the Pan–Tompkins algorithm, which was developed prior to the advent of wearable technologies [20]. In our experience, the Pan–Tompkins algorithm caused real-time processing delays and was suboptimally correct when evaluating publicly available data that simulated signals that would be acquired from mobile platforms and wearable technologies.
Therefore, to better enable real-time QRS detection via mobile platform-based ECG devices, such as wearable technologies with smartphone interfaces, more computationally efficient algorithms are necessary that do not sacrifice (and may even improve) correctness [21,22,23,24]. We hypothesized that our modified QRS detection algorithm is more computationally efficient and at least as correct as the established method on which it is based.

2. Methods

The Pan–Tompkins algorithm was modified (known here as the AccYouRate Modified Pan–Tompkins (AMPT)) to be more computationally efficient and, thus, more amenable to application on a mobile platform. Using archived ECG data from a variety of publicly available ECG datasets, both algorithms were evaluated for computational efficiency and correctness as compared to manually and independently annotated QRS complexes.

2.1. Algorithms

The AMPT algorithm differs from the original Pan–Tompkins method in two major ways:
(1)
The Pan–Tompkins algorithm performs an analysis on two simultaneous signals: the bandpassed signal and the resulting filtered signal. The peaks from each signal are compared on a time basis for correspondence. However, with the AMPT algorithm, the signal peaks and the noise peaks from the bandpassed signal are not calculated and only the final filtered signal is analyzed.
(2)
The Pan–Tompkins algorithm uses two average RR intervals for search back (one for sinus rhythm and one for arrhythmias), which entails defining the signal and noise peaks, thresholds, and a series of RR limits. The AMPT does not differentiate based on regular or irregular rhythms, and therefore requires fewer computational steps because search back is calculated from a single averaged RR interval.
The AMPT algorithm utilizes the same low- and high-pass filters, derivative, squaring function, and moving window integration as the original Pan–Tompkins method. However, only the filtered signal is used for the AMPT. Thus, for the AMPT algorithm, the set of filtered ECG thresholds is redefined as (corresponding to Equations (17)–(20) of the original Pan-Tompkins manuscript [20]):
S P K F = 0.125   P E A K F + 0.875   S P K F
N P K F = 0.125   P E A K F + 0.875   N P K F
T H R E S H O L D   F 1 = N P K F + 0.25   ( S P K F N P K F )
T H R E S H O L D   F 2 = 0.25   T H R E S H O L D   F 1
where PEAKF is the overall peak, SPKF is the running estimate of the signal peak, NPKF is the running estimate of the noise peak, THRESHOLD F1 is the first threshold, and THRESHOLD F2 is the second threshold, consistent with nomenclature from the original Pan–Tompkins paper.
Next, when the QRS complex is identified using THRSHOLD F2, the signal peak is redefined as (corresponding to Equation (21) of the original Pan-Tompkins manuscript [20]):
S P K F = 0.125   P E A K F + 0.875   S P K F
Further, the average of the eight most recent sequential RR intervals is redefined as (corresponding to Equation (24) of the original Pan-Tompkins manuscript [20]):
R R   A V E R A G E 1 = 0.125   ( R R n 7 + R R n 6 + + R R n )
where RRn is the most recent RR interval. Then, an RR limit is redefined as (corresponding to Equation (28) of the original Pan-Tompkins manuscript [20]):
R R   M I S S E D   L I M I T = 1.66   R R   A V E R A G E 1
The AMPT algorithm also uses the same T-wave identification as the original Pan–Tompkins method.
In summary, from the original Pan–Tompkins manuscript [20], the fiducial mark and Equations (12)–(16), (22), (23), (25)–(27) and (29) were not used, the coefficients of Equations (20) and (21) were modified, and RR Average 1 (rather than RR Average 2) was used in Equation (28) for the AMPT algorithm.
The Pan–Tompkins algorithm was obtained as an intact Python code by Pickus from a public software repository and forum [25]. Via line-by-line inspection, this code was confirmed to exactly implement all steps reported in the original Pan–Tompkins manuscript. The first steps of the algorithm, which include the application of a set of filters, are suitable for the specific, previously used sampling rate of 200 Hz.
The AMPT algorithm was custom written in Python, independent of publicly available Pan–Tompkins codes. The AMPT code is available at https://github.com/Accyourate-Group-S-p-A/acy_ampt (accessed on 25 January 2023).
Both the Pan–Tompkins and AMPT codes were executed in Python 3.7 using IDE PyCharm 2019.2.6 Professional Edition and public Python libraries (NumPy, SciPy, Pandas, WFDB, and time). For comparison purposes, all processing took place on the same desktop computer (HP Z840 Workstation (Hewlett Packard, Palo Alto, CA, USA), Processor: Intel Xeon CPU E5-2620 v3–2.40 GHz, 64 GB RAM (Intel, Santa Clara, CA, USA)) which was only running those background programs (in addition to Python and PyCharm) that loaded upon booting into 64-bit Windows 10 Pro (Microsoft, Redmond, WA, USA).

2.2. ECG Datasets

To compare algorithms, multiple datasets were downloaded from the PhysioBank ATM [26] and Harvard Dataverse [27] repositories. Records included annotations of QRS complexes that were manually identified throughout all data and adjudicated independently of this project. The datasets were those curated to specifically feature high and low signal qualities [28], normal sinus rhythms [29], arrhythmias [30], paced rhythms (subset of arrhythmias dataset), and telehealth-acquired signals [27]. The sampling attributes of these datasets are shown in Table 1.
All the data from the High and Low Quality, Arrhythmias, and Paced Rhythm datasets were utilized. However, only the first thirty minutes of each Normal Sinus Rhythm sample were used because when longer periods were considered, hardware resources became a limiting factor and, thus, computational time did not exclusively reflect algorithm efficiency. In addition, from the TeleHealth dataset, 116 samples were excluded because there was a prohibitively small number of reliable ECG waveforms.
Additionally, across datasets and across patients within datasets, there was not a consistent lead configuration. Therefore, in cases where multiple ECG recordings were present, those listed first were utilized.

2.3. Analysis

Both algorithms were executed with all samples (except the Normal Sinus Rhythm dataset, from which only the first thirty minutes of each tracing were used), and their outputs were compared to the annotations for each dataset. Accurate detection was indicated if the annotated R peak fell within 150 milliseconds of the algorithm-detected R peak, which is consistent with the ANSI/AAMI guidelines [31]. Other classification possibilities were false positive, false negative, and failed detection. These findings were summarized by calculations for correctness including total error rate, sensitivity, positive predictive value, accuracy, and F1, which were mathematically defined as:
T o t a l   E r r o r   R a t e = F N + F P T B
S e n s i t i v i t y = T P T P + F N
P o s i t i v e   P r e d i c t i v e   V a l u e = T P T P + F P
A c c u r a c y = T P T P + F P + F N
F 1 = ( 2 T P ) 2 T P + F P + F N
where FN is False Negatives (annotated beats that are not detected); FP is False Positives (beats detected not corresponding to an annotated beat); TB is Total Beats (sum of annotated beats); and TP is True Positives (annotated beats that are correctly detected). True negatives are not typically used to calculate the accuracy of QRS detection [7,32]. The processing time of each ECG sample was measured and expressed on the basis of ten seconds of ECG data. A computational efficiency factor was defined as the ratio of times to execute each sample (Pan–Tompkins to AMPT).
For a fair comparison across datasets, the analysis was repeated by resampling all data to 200 Hz. In this way, all ECGs were filtered using the same cut-off frequencies.

3. Results

As compared to the Pan–Tompkins algorithm, the AMPT algorithm was computationally more efficient across all datasets (Figure 1). For the Pan–Tompkins algorithm, processing times varied from a low of 12.38 milliseconds per ten seconds of ECG data for the TeleHealth dataset to a high of 50.24 milliseconds for the Paced Rhythms dataset, whereas for the AMPT algorithm, the shortest processing time was 1.09 milliseconds per ten seconds of ECG data for the Normal Sinus Rhythm dataset and the longest was 4.56 milliseconds for the Low Quality dataset. As indicated by the efficiency factor and relative to the Pan–Tompkins, the AMPT algorithm improved computational efficiency by a minimum factor of 4.0 for the Low Quality dataset and a maximum of 21.2 for the Paced Rhythms dataset. Intermediate efficiency factors were 8.3, 4.7, 16.4, and 15.8 for the High Quality, TeleHealth, Normal Sinus Rhythms, and Arrhythmias’ datasets, respectively.
The AMPT algorithm was also more correct than the Pan–Tompkins algorithm according to F1 (Figure 2). For the Pan–Tompkins algorithm, the F1 had a low of 75.45 for the Paced Rhythms dataset and a high of 99.63 for the High Quality dataset, whereas for the AMPT algorithm, the F1 low was 83.28 for the TeleHealth dataset and the high was 99.81 for the High Quality dataset. From the Pan–Tompkins to the AMPT algorithms, the F1 improvement was highest for the Paced Rhythm dataset with a difference of 20.52%. F1 improvements of 3–5% were also demonstrated with the Low Quality and TeleHealth datasets. Across all other measures including error rate, sensitivity, positive predictive value, and accuracy, and for all datasets, the AMPT algorithm was correct more often than the Pan–Tompkins (Table 2).
Within the Arrhythmia dataset, processing times per ten seconds of ECG data and all measures of correctness varied by sample for the Pan–Tompkins and AMPT algorithms (Tables S1 and S2, respectively (Supplementary Materials)). The efficiency gain was less for samples with high amplitude variability or a large number of arrhythmias, and this was determined qualitatively (Figure S1).
After resampling and reprocessing all data at 200 Hz, the relative performance of each algorithm did not change across datasets. The AMPT algorithm was still computationally more efficient and more correct than the original Pan–Tompkins algorithm (Figures S2 and S3). However, the processing times of the resampled data were less than those prior to resampling because there were fewer data points to process.

4. Discussion

In evaluating archived and independently annotated ECG data, the AMPT algorithm was both computationally more efficient and more correct than the Pan–Tompkins method. These differences are attributed to the removal of unnecessary, parallel computations, including the double signal analysis for peak detection and one of the two average RR intervals.
Efficiency improvements are dramatic enough to potentially enable the translation of the AMPT algorithm to a mobile platform. However, the AMPT algorithm is relatively less advantageous for processing samples with high amplitude variability or a large number of arrhythmias, as observed by comparing samples with extreme values.
The AMPT algorithm improved F1 correctness by 3–5% for the Low Quality and TeleHealth datasets compared to the Pan–Tompkins, which is significant because these data are most similar to those signals that would be recorded and processed from mobile platforms and wearable technologies. Additionally, with the exception of the sensitivities determined from the Normal Sinus Rhythm dataset, across all dimensions of correctness including total error rate, sensitivity, positive predictive value, accuracy, and F1, the AMPT algorithm outperformed the Pan–Tompkins algorithm for all datasets. Some of the correctness improvements are modest, but they demonstrate that algorithm changes to enhance computational efficiency did not sacrifice accuracy.
AMPT performance was compared to that of Pan–Tompkins; however, it is not possible to directly compare the performance of the AMPT algorithm to other QRS detection algorithms reported in the literature. Inconsistencies in hardware prevent comparison of computational efficiency [7,12,13,14,15,16,17,23], while non-uniform, and unexplained or selective exclusion of data, variations in the temporal width of the detection window, and discrepancies among sampling rates make the direct comparison of accuracies not practical [7,8,9,10,11,17,20,23]. Nonetheless, other studies compare their results to those of Pan–Tompkins [7,8,9,10,11,12,13,14,15,16,17,20,23], and most are faster and more accurate across publicly available datasets, which is consistent with our findings. Therefore, the AMPT would likely be competitive with the computational efficiency and accuracy of other algorithms.
In this analysis, all samples and beats from the High Quality, Low Quality, Arrhythmias, and Paced Rhythms datasets were included because complete sets are most representative of patient or consumer data that would be evaluated in real-time (i.e., continuous analysis of data on a beat-to-beat basis without accumulating a backlog of unanalyzed beats). However, only the first thirty minutes of data from the Normal Sinus Rhythm dataset were studied here because longer periods had excessive computational demands, while thirty minutes per sample was still deemed long enough to determine the relative performance of each algorithm. The exclusion of the TeleHealth samples also does not affect the findings of this study because in most cases, neither algorithm was able to detect the few annotated beats available for analysis in the excluded samples.
The AMPT algorithm was motivated by development of a smart t-shirt that monitors and analyzes a single-lead ECG recording in real-time [33,34]. Initially, the Pan–Tompkins method was utilized with a prototype device; however, there were substantial computational delays and consequent data loss. Therefore, the AMPT algorithm was written to be more computationally efficient, while having improved QRS detection capabilities. In conjunction with the smart t-shirt and on a mobile platform, the AMPT algorithm eliminated the prior delays and data loss and processed the data in real-time without lagging (data not presented).
While demand for computationally efficient ECG analysis algorithms will remain strong due to the need to conserve the energy of battery-powered devices [23], continued advances in mobile device processing speed will diminish the dependency on efficient algorithms to deliver a single ECG analysis outcome. Instead, an efficient QRS detection algorithm will allow for greater complexity of other aspects of parallel ECG analysis such as P- and T-wave analyses [21,22].
This study is limited in that it is a retrospective analysis, and the corresponding patients and pathologies may not represent those of the general population. A more comprehensive future study is necessary to assess the AMPT algorithm’s performance in real-time and with a larger, more diverse patient population. Another limitation is that this study was performed via a desktop computer (rather than on a mobile device) because a consistent platform was necessary to standardize conditions and enable direct comparison of the algorithms’ computational efficiency. Nonetheless, real world application and evaluation will need to feature mobile devices running different operating systems and a variety of other simultaneous applications.

5. Conclusions

As compared to the Pan–Tompkins algorithm, the AMPT algorithm demonstrated improved computational efficiency of QRS detection while also enhancing correctness. When applied on a mobile platform, the AMPT algorithm was observed to eliminate processing delays and data loss, which may enable continuous, real-time, single-lead QRS detection on a variety of mobile devices. However, these data were not representative of a clinical trial or field test. Additional studies are necessary to move this technology towards continuous, real-time monitoring of patients and recreational users.

Supplementary Materials

The following supporting information can be downloaded at: https://www.mdpi.com/article/10.3390/s23031625/s1, Figure S1. Representative raw ECG signals for samples 101 (top) and 232 (bottom) of the Arrythmias dataset (B2) visually demonstrating differences in amplitude variability and the number of arrythmias; Figure S2. Processing time per ten seconds of ECG data for the Pan-Tompkins (red) and AMPT (blue) algorithms with their efficiency factors (green) by dataset. A1 = High-Quality, A2 = Low-Quality, B2 = Arrhythmias, C = Paced Rhythm, and D = Telehealth datasets after resampling to 200 Hz; Figure S3. F1 correctness for the Pan-Tompkins (red) and AMPT (blue) algorithms by dataset. A1 = High-Quality, A2 = Low-Quality, B2 = Arrhythmias, C = Paced Rhythm, and D = Telehealth datasets after resampling to 200 Hz; Table S1. Processing time per ten seconds of ECG data and correctness of the Pan-Tompkins algorithm for the Arrhythmias dataset (B2) by sample; Table S2. Processing time per ten seconds of ECG data and correctness of the AMPT algorithm for the Arrhythmias dataset (B2) by sample.

Author Contributions

Conceptualization, L.N., M.T.O. and A.A.; methodology, L.N., M.T.O. and A.A.; software, A.A. and L.N.; validation, L.N., S.J. and A.A.; formal analysis, L.N., A.A., M.T.O. and S.J.; investigation, L.N. and M.T.O.; resources, L.N., A.A. and G.A.G.; data curation, L.N., M.T.O. and A.A.; writing—original draft preparation, L.N., M.T.O., A.A., E.T. and S.J.; writing—review and editing, L.N., M.T.O., H.R.H., A.A., M.S., E.T. and S.J.; visualization, L.N., M.T.O., A.A. and S.J.; supervision, H.R.H., C.B. and M.T.O.; project administration, L.N., M.T.O. and C.B.; funding acquisition, C.B.; L.N. and M.T.O. were co-first authors. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data used in this study are openly available in PhysioNet at https://doi.org/10.13026/C2F305 and https://doi.org/10.13026/C2NK5R (accessed on 25 January 2023) for the MIT-BIH arrhythmia and normal sinus rhythm databases, respectively.

Conflicts of Interest

A.A. and G.A.G. are employed by AccYouRate Group, which is a company that produces mobile platform-based ECG analysis wearable technology.

References

  1. Kumari, P.; Mathew, L.; Syal, P. Increasing trend of wearables and multimodal interface for human activity monitoring: A review. Biosens. Bioelectron. 2017, 90, 298–307. [Google Scholar] [CrossRef] [PubMed]
  2. Mück, J.E.; Ünal, B.; Butt, H.; Yetisen, A.K. Market and Patent Analyses of Wearables in Medicine. Trends Biotechnol. 2019, 37, 563–566. [Google Scholar] [CrossRef] [PubMed]
  3. Dagher, L.; Shi, H.; Zhao, Y.; Marrouche, N.F. Wearables in cardiology: Here to stay. Heart Rhythm. 2020, 17, 889–895. [Google Scholar] [CrossRef] [PubMed]
  4. Hong, Y.J.; Jeong, H.; Cho, K.W.; Lu, N.; Kim, D.-H. Wearable and Implantable Devices for Cardiovascular Healthcare: From Monitoring to Therapy Based on Flexible and Stretchable Electronics. Adv. Funct. Mater. 2019, 29, 1808247. [Google Scholar] [CrossRef]
  5. Stehlik, J.; Schmalfuss, C.; Bozkurt, B.; Nativi-Nicolau, J.; Wohlfahrt, P.; Wegerich, S.; Rose, K.; Ray, R.; Schofield, R.; Deswal, A.; et al. Continuous Wearable Monitoring Analytics Predict Heart Failure Hospitalization. Circ. Heart Fail. 2020, 13, e006513. [Google Scholar] [CrossRef] [PubMed]
  6. Elgendi, M. Fast QRS Detection with an Optimized Knowledge-Based Method: Evaluation on 11 Standard ECG Databases. PLoS ONE 2013, 8, e73557. [Google Scholar] [CrossRef] [PubMed]
  7. Manikandan, M.; Soman, K. A novel method for detecting R-peaks in electrocardiogram (ECG) signal. Biomed. Signal Process. Control. 2012, 7, 118–128. [Google Scholar] [CrossRef]
  8. Kim, J.; Shin, H. Simple and Robust Realtime QRS Detection Algorithm Based on Spatiotemporal Characteristic of the QRS Complex. PLoS ONE 2016, 11, e0150144. [Google Scholar] [CrossRef] [PubMed]
  9. Zalabarria, U.; Irigoyen, E.; Martinez, R.; Lowe, A. Online robust R-peaks detection in noisy electrocardiograms using a novel iterative smart processing algorithm. Appl. Math. Comput. 2020, 369, 124839. [Google Scholar] [CrossRef]
  10. El Bouny, L.; Khalil, M.; Adib, A. A Wavelet Denoising and Teager Energy Operator-Based Method for Automatic QRS Complex Detection in ECG Signal. Circuits Syst. Signal Process. 2020, 39, 4943–4979. [Google Scholar] [CrossRef]
  11. Farashi, S. A multiresolution time-dependent entropy method for QRS complex detection. Biomed. Signal Process. Control. 2016, 24, 63–71. [Google Scholar] [CrossRef]
  12. Li, C.; Zheng, C.; Tai, C. Detection of ECG characteristic points using wavelet transforms. IEEE Trans. Biomed. Eng. 1995, 42, 21–28. [Google Scholar] [CrossRef] [PubMed]
  13. Legarreta, I.R.; Addison, P.; Grubb, N.; Clegg, G.; Robertson, C.; Fox, K.; Watson, J. R-Wave Detection Using Continuous Wavelet Modulus Maxima in Computers in Cardiology; IEEE: New York, NY, USA, 2003; pp. 565–568. [Google Scholar] [CrossRef]
  14. Yeh, Y.-C.; Wang, W.-J. QRS complexes detection for ECG signal: The Difference Operation Method. Comput. Methods Programs Biomed. 2008, 91, 245–254. [Google Scholar] [CrossRef] [PubMed]
  15. Madeiro, J.P.; Cortez, P.C.; Marques, J.A.; Seisdedos, C.R.; Sobrinho, C.R. An innovative approach of QRS segmentation based on first-derivative, Hilbert and Wavelet Transforms. Med. Eng. Phys. 2012, 34, 1236–1246. [Google Scholar] [CrossRef]
  16. Poli, R.; Cagnoni, S.; Valli, G. Genetic design of optimum linear and nonlinear QRS detectors. IEEE Trans. Biomed. Eng. 1995, 42, 1137–1141. [Google Scholar] [CrossRef] [PubMed]
  17. Chen, A.; Zhang, Y.; Zhang, M.; Liu, W.; Chang, S.; Wang, H.; He, J.; Huang, Q. A Real Time QRS Detection Algorithm Based on ET and PD Controlled Threshold Strategy. Sensors 2020, 20, 4003. [Google Scholar] [CrossRef]
  18. Raj, S.; Ray, K.C.; Shankar, O. Development of robust, fast and efficient QRS complex detector: A methodological review. Australas. Phys. Eng. Sci. Med. 2018, 41, 581–600. [Google Scholar] [CrossRef]
  19. Kumar, A.; Komaragiri, R.; Kumar, M. From Pacemaker to Wearable: Techniques for ECG Detection Systems. J. Med. Syst. 2018, 42, 34. [Google Scholar] [CrossRef] [PubMed]
  20. Pan, J.; Tompkins, W.J. A Real-Time QRS Detection Algorithm. IEEE Trans. Biomed. Eng. 1985, 32, 230–236. [Google Scholar] [CrossRef] [PubMed]
  21. Shabaan, M.; Arshid, K.; Yaqub, M.; Jinchao, F.; Zia, M.S.; Bojja, G.R.; Iftikhar, M.; Ghani, U.; Ambati, L.S.; Munir, R. Survey: Smartphone-based assessment of cardiovascular diseases using ECG and PPG analysis. BMC Med. Inform. Decis. Mak. 2020, 20, 177. [Google Scholar] [CrossRef] [PubMed]
  22. Elgendi, M.; Eskofier, B.; Dokos, S.; Abbott, D. Revisiting QRS Detection Methodologies for Portable, Wearable, Battery-Operated, and Wireless ECG Systems. PLoS ONE 2014, 9, e84018. [Google Scholar] [CrossRef] [PubMed]
  23. Liu, F.; Liu, C.; Jiang, X.; Zhang, Z.; Zhang, Y.; Li, J.; Wei, S. Performance Analysis of Ten Common QRS Detectors on Different ECG Application Cases. J. Health Eng. 2018, 2018, 9050812. [Google Scholar] [CrossRef] [PubMed]
  24. Kim, H.; Yazicioglu, R.F.; Merken, P.; Van Hoof, C.; Yoo, H.-J. ECG Signal Compression and Classification Algorithm with Quad Level Vector for ECG Holter System. IEEE Trans. Inf. Technol. Biomed. 2010, 14, 93–100. [Google Scholar] [CrossRef] [PubMed]
  25. Pickus, S. Pan-Tompkins. Available online: https://github.com/pickus91/HRV (accessed on 25 January 2023).
  26. Goldberger, A.L.; Amaral, L.A.N.; Glass, L.; Hausdorff, J.M.; Ivanov, P.C.; Mark, R.G.; Mietus, J.E.; Moody, G.B.; Peng, C.-K.; Stanley, H.E. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 2000, 101, E215–E220. [Google Scholar] [CrossRef] [PubMed]
  27. TELE ECG Database: 250 telehealth ECG records (collected using dry metal electrodes) with annotated QRS and artifact masks, and MATLAB code for the UNSW artifact detection and UNSW QRS detection algorithms. Harv. Dataverse 2016. [CrossRef]
  28. Robust Detection of Heart Beats in Multimodal Data: The PhysioNet/Computing in Cardiology Challenge. 2014. Available online: https://archive.physionet.org/challenge/2014/ (accessed on 3 May 2022).
  29. T.A.L. The Beth Israel Deaconess Medical Center. The MIT-BIH Normal Sinus Rhythm Database. 1990. Available online: Physionet.org (accessed on 25 January 2023). [CrossRef]
  30. Moody, G.B.; Mark, R.G. MIT-BIH Arrhythmia Database. 1992. Available online: Physionet.org (accessed on 25 January 2023). [CrossRef]
  31. Association for the Advancement of Medical Instrumentation: Testing and Reporting Performance Results of Cardiac Rhythm and ST Segment Measurement Algorithms. ANSI/AAMI EC57. 2012. Available online: https://webstore.ansi.org/standards/aami/ansiaamiec572012ec57 (accessed on 25 January 2023).
  32. Hossain, B.; Bashar, S.K.; Walkey, A.J.; McManus, D.D.; Chon, K.H. An Accurate QRS Complex and P Wave Detection in ECG Signals Using Complete Ensemble Empirical Mode Decomposition with Adaptive Noise Approach. IEEE Access 2019, 7, 128869–128880. [Google Scholar] [CrossRef]
  33. Khundaqji, H.; Hing, W.; Furness, J.; Climstein, M. Smart Shirts for Monitoring Physiological Parameters: Scoping Review. JMIR mHealth uHealth 2020, 8, e18092. [Google Scholar] [CrossRef]
  34. Gualandi, I.; Marzocchi, M.; Achilli, A.; Cavedale, D.; Bonfiglio, A.; Fraboni, B. Textile Organic Electrochemical Transistors as a Platform for Wearable Biosensors. Sci. Rep. 2016, 6, 33637. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Processing times per ten seconds of ECG data for the Pan–Tompkins (red) and AMPT (blue) algorithms with their efficiency factors (green) by dataset. A1 = High Quality, A2 = Low Quality, B1 = Normal Sinus Rhythm, B2 = Arrhythmias, C = Paced Rhythm, and D = TeleHealth datasets.
Figure 1. Processing times per ten seconds of ECG data for the Pan–Tompkins (red) and AMPT (blue) algorithms with their efficiency factors (green) by dataset. A1 = High Quality, A2 = Low Quality, B1 = Normal Sinus Rhythm, B2 = Arrhythmias, C = Paced Rhythm, and D = TeleHealth datasets.
Sensors 23 01625 g001
Figure 2. F1 correctness for the Pan–Tompkins (red) and AMPT (blue) algorithms by dataset. A1 = High Quality, A2 = Low Quality, B1 = Normal Sinus Rhythm, B2 = Arrhythmias, C = Paced Rhythm, and D = TeleHealth datasets.
Figure 2. F1 correctness for the Pan–Tompkins (red) and AMPT (blue) algorithms by dataset. A1 = High Quality, A2 = Low Quality, B1 = Normal Sinus Rhythm, B2 = Arrhythmias, C = Paced Rhythm, and D = TeleHealth datasets.
Sensors 23 01625 g002
Table 1. Number of beats, number of records, record length, total time, and sampling frequency by dataset.
Table 1. Number of beats, number of records, record length, total time, and sampling frequency by dataset.
DatasetDescriptionNumber of BeatsNumber of RecordsRecord Length (min)Total Time (min)Sample Frequency (Hz)
A1High Quality72,415100101000250
A2Low Quality78,618100101000360
B1Normal Sinus Rhythm48,4941830540128
B2Arrhythmias103,72444301320360
CPaced Rhythm8923430120360
DTeleHealth67081340.5125500
Table 2. Correctness of the Pan–Tompkins and AMPT algorithms by dataset. A1 = High Quality, A2 = Low Quality, B1 = Normal Sinus Rhythm, B2 = Arrhythmias, C = Paced Rhythm, and D = TeleHealth datasets.
Table 2. Correctness of the Pan–Tompkins and AMPT algorithms by dataset. A1 = High Quality, A2 = Low Quality, B1 = Normal Sinus Rhythm, B2 = Arrhythmias, C = Paced Rhythm, and D = TeleHealth datasets.
DatasetAnnotated PeaksAlgorithmTrue Positives (Beats)False Positives (Beats)False Negatives (Beats)Failed Detection (Beats)Error Rate (%)Sensitivity (%)Positive Predictive Value (%)Accuracy (%)
A172,415Pan–Tompkins72,0731913485390.7499.5199.7599.26
AMPT72,2671351482830.3999.8099.8299.62
A278,618Pan–Tompkins64,6531113714,06525,20232.0680.7585.1274.09
AMPT64,993867113,63922,31028.3882.0686.3778.54
B148,494Pan–Tompkins45,231134298831226.4495.0899.7494.85
AMPT45,3018308330916.3794.9799.9894.96
B2103,724Pan–Tompkins99,783349372040693.9296.3699.6696.09
AMPT100,135144338035243.4096.8099.8396.66
C8923Pan–Tompkins668421322238437048.9774.9375.9764.26
AMPT84682764547308.1896.9095.0792.81
D6708Pan–Tompkins3218972522149440.1084.9277.5668.91
AMPT3394707334104127.9490.0081.0476.29
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Neri, L.; Oberdier, M.T.; Augello, A.; Suzuki, M.; Tumarkin, E.; Jaipalli, S.; Geminiani, G.A.; Halperin, H.R.; Borghi, C. Algorithm for Mobile Platform-Based Real-Time QRS Detection. Sensors 2023, 23, 1625. https://doi.org/10.3390/s23031625

AMA Style

Neri L, Oberdier MT, Augello A, Suzuki M, Tumarkin E, Jaipalli S, Geminiani GA, Halperin HR, Borghi C. Algorithm for Mobile Platform-Based Real-Time QRS Detection. Sensors. 2023; 23(3):1625. https://doi.org/10.3390/s23031625

Chicago/Turabian Style

Neri, Luca, Matt T. Oberdier, Antonio Augello, Masahito Suzuki, Ethan Tumarkin, Sujai Jaipalli, Gian Angelo Geminiani, Henry R. Halperin, and Claudio Borghi. 2023. "Algorithm for Mobile Platform-Based Real-Time QRS Detection" Sensors 23, no. 3: 1625. https://doi.org/10.3390/s23031625

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop