SCIENCE CHINA Information Sciences, Volume 64 , Issue 8 : 182401(2021) https://doi.org/10.1007/s11432-020-3150-2

A robust QRS detection and accurate R-peak identification algorithm for wearable ECG sensors

More info
  • ReceivedAug 9, 2020
  • AcceptedDec 7, 2020
  • PublishedMay 8, 2021



This work was supported in part by National Key Research and Development Program of China (Grant No. 2019YFB2204500), in part by National Natural Science Foundation of China (Grant No. 61874171), in part by Science, Technology and Innovation Action Plan of Shanghai Municipality, China (Grant No. 1914220370), and Alibaba Group through Alibaba Innovative Research (AIR) Program.


[1] accessed 9-August-2020]. Google Scholar

[2] Ravanshad N, Rezaee-Dehsorkh H, Lotfi R, et al. A level-crossing based QRS-detection algorithm for wearable ECG sensors. IEEE Journal of Biomedical and Health Informatics, 2014, 18(1):183--192. Google Scholar

[3] Wong D L T, Wu J, Li Y, et al. An Integrated Wearable Wireless Vital Signs Biosensor for Continuous Inpatient Monitoring. IEEE Sensors Journal, 2020, 20(1):448--462. Google Scholar

[4] Luo Y, Teng K H, Li Y. IEEE Trans Biomed Circuits Syst, 2019, 13: 907-917 CrossRef Google Scholar

[5] Zhang X, Zhang Z, Li Y, et al. A 2.89 uW Dry-Electrode Enabled Clockless Wireless ECG SoC for Wearable Applications. IEEE Journal Solid-State Circuits (JSSC), 2016, 51(10):2287--2298. Google Scholar

[6] Zhang Q, Xie Q, Duan K, et al. A digital signal processor (dsp)-based system for embedded continuous-time cuffless blood pressure monitoring using single-channel ppg signal. Science China Information Sciences, 2020, 63(4):1--3. Google Scholar

[7] Dong X, Zhang M, Lei Y. Parylene-MEMS technique-based flexible electronics. Sci China Inf Sci, 2018, 61: 060419 CrossRef Google Scholar

[8] Zou X, Xu X, Tan J, et al. A 1-v 1.1-$\mu$w sensor interface ic for wearable biomedical devices. In: Proceedings of 2008 IEEE International Symposium on Circuits and Systems. IEEE, 2008. 2725--2728. Google Scholar

[9] Liu L, Liu Y, and Duan X. Graphene-based vertical thin film transistors. Science China Information Sciences, 2020, 63(10):201401:1--201401:12. Google Scholar

[10] Khan M G. Rapid ECG interpretation. Springer Science & Business Media, 2008. Google Scholar

[11] Xie Q, Li Y, Wang G. An Unobtrusive System for Heart Rate Monitoring Based on Ballistocardiogram Using Hilbert Transform and Viterbi Decoding. IEEE J Emerg Sel Top Circuits Syst, 2019, 9: 635-644 CrossRef Google Scholar

[12] Xhyheri B, Manfrini O, Mazzolini M. Heart Rate Variability Today. Prog Cardiovascular Dis, 2012, 55: 321-331 CrossRef Google Scholar

[13] Zhang F and Lian Y. Novel qrs detection by cwt for ecg sensor. In: Proceedings of 2007 IEEE Biomedical Circuits and Systems Conference. IEEE, 2007. 211--214. Google Scholar

[14] Zhang F and Lian Y. Electrocardiogram qrs detection using multiscale filtering based on mathematical morphology. In: Proceedings of 2007 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society. IEEE, 2007. 3196--3199. Google Scholar

[15] Zhang F, Tan J, and Lian Y. An effective qrs detection algorithm for wearable ecg in body area network. In: Proceedings of 2007 IEEE Biomedical Circuits and Systems Conference. IEEE, 2007. 195--198. Google Scholar

[16] Zhang F, Lian Y. QRS Detection Based on Multiscale Mathematical Morphology for Wearable ECG Devices in Body Area Networks. IEEE Trans Biomed Circuits Syst, 2009, 3: 220-228 CrossRef Google Scholar

[17] Zhang F, Lian Y. QRS Detection Based on Morphological Filter and Energy Envelope for Applications in Body Sensor Networks. J Sign Process Syst, 2011, 64: 187-194 CrossRef Google Scholar

[18] Thong T, McNames J, Aboy M. Prediction of Paroxysmal Atrial Fibrillation by Analysis of Atrial Premature Complexes. IEEE Trans Biomed Eng, 2004, 51: 561-569 CrossRef Google Scholar

[19] Jun T J, Park H J, Minh N H, et al. Premature ventricular contraction beat detection with deep neural networks. In: Proceedings of 15th IEEE International Conference on Machine Learning and Applications (ICMLA), 2016. 859--864. Google Scholar

[20] deChazal P, O'Dwyer M, Reilly R B. Automatic Classification of Heartbeats Using ECG Morphology and Heartbeat Interval Features. IEEE Trans Biomed Eng, 2004, 51: 1196-1206 CrossRef Google Scholar

[21] Can Ye , Kumar B V K V, Coimbra M T. Heartbeat Classification Using Morphological and Dynamic Features of ECG Signals. IEEE Trans Biomed Eng, 2012, 59: 2930-2941 CrossRef Google Scholar

[22] Llamedo M, Martínez J P. Heartbeat Classification Using Feature Selection Driven by Database Generalization Criteria. IEEE Trans Biomed Eng, 2011, 58: 616-625 CrossRef Google Scholar

[23] Wang J, She M, Nahavandi S. Human Identification From ECG Signals Via Sparse Representation of Local Segments. IEEE Signal Process Lett, 2013, 20: 937-940 CrossRef Google Scholar

[24] He C, Li W, and Chik D. Waveform Compensation of ECG Data Using Segment Fitting Functions for Individual Identification. In: Proceedings of 13th International Conference on Computational Intelligence and Security (CIS), 2017. 475--479. Google Scholar

[25] Safie S I, Soraghan J J, and Petropoulakis L. ECG biometric authentication using Pulse Active Width (PAW). In: Proceedings of IEEE Workshop on Biometric Measurements and Systems for Security and Medical Applications (BIOMS), 2011. 1--6. Google Scholar

[26] Kaveh A and Chung W. Temporal and spectral features of single lead ECG for human identification. In: Proceedings of IEEE Workshop on Biometric Measurements and Systems for Security and Medical Applications (BIOMS), 2013. 17--21. Google Scholar

[27] Yu S N, Lee M Y. Bispectral analysis and genetic algorithm for congestive heart failure recognition based on heart rate variability. Comput Biol Med, 2012, 42: 816-825 CrossRef Google Scholar

[28] Yu S N, Lee M Y. Conditional mutual information-based feature selection for congestive heart failure recognition using heart rate variability. Comput Methods Programs Biomed, 2012, 108: 299-309 CrossRef Google Scholar

[29] Babaeizadeh S, White D P, Pittman S D. Automatic detection and quantification of sleep apnea using heart rate variability. J Electrocardiology, 2010, 43: 535-541 CrossRef Google Scholar

[30] Yildiz A, Ak?n M, Poyraz M. An expert system for automated recognition of patients with obstructive sleep apnea using electrocardiogram recordings. Expert Syst Appl, 2011, 38: 12880-12890 CrossRef Google Scholar

[31] Pan J and Tompkins W J. A real-time QRS detection algorithm. IEEE Trans on Biomedical Engineering, 1985, 32(3):230--236. Google Scholar

[32] Fast QRS Detection with an Optimized Knowledge-Based Method: Evaluation on 11 Standard ECG Databases. PLoS ONE, 2013, 8: e73557 CrossRef Google Scholar

[33] Lee J, Jeong K, Yoon J, et al. A simple real-time QRS detection algorithm. In: Proceedings of Proceedings of 18th Annual International Conference of the IEEE Engineering in Medicine and Biology Society, 1996. 1396--1398. Google Scholar

[34] Martinez J P, Almeida R, Olmos S. A Wavelet-Based ECG Delineator: Evaluation on Standard Databases. IEEE Trans Biomed Eng, 2004, 51: 570-581 CrossRef Google Scholar

[35] Arzeno N M, Deng Z D, Poon C S. Analysis of First-Derivative Based QRS Detection Algorithms. IEEE Trans Biomed Eng, 2008, 55: 478-484 CrossRef Google Scholar

[36] Sahoo S, Biswal P, Das T. De-noising of ECG Signal and QRS Detection Using Hilbert Transform and Adaptive Thresholding. Procedia Tech, 2016, 25: 68-75 CrossRef Google Scholar

[37] Pandit D, Zhang L, Liu C. A lightweight QRS detector for single lead ECG signals using a max-min difference algorithm. Comput Methods Programs Biomed, 2017, 144: 61-75 CrossRef Google Scholar

[38] Wang S, Pang B, Liu M, et al. A novel compression framework using energy-sensitive QRS complex detection method for a mobile ECG. Science China Information Sciences, 2019, 62. Google Scholar

[39] Chen H, Maharatna K. An Automatic R and T Peak Detection Method Based on the Combination of Hierarchical Clustering and Discrete Wavelet Transform. IEEE J Biomed Health Inform, 2020, 24: 2825-2832 CrossRef Google Scholar

[40] Moody G B, Mark R G. The impact of the MIT-BIH Arrhythmia Database. IEEE Eng Med Biol Mag, 2001, 20: 45-50 CrossRef Google Scholar

[41] Laguna P, Mark R G, Goldberg A, et al. A database for evaluation of algorithms for measurement of QT and other waveform intervals in the ECG. In: Proceedings of Computers in Cardiology, 1997. 673--676. Google Scholar

[42] Moody G B, Muldrow W, and Mark R G. A noise stress test for arrhythmia detectors. Computers in Cardiology, 1984, 11(3):381--384. Google Scholar

[43] Moody G. The physionet/computers in cardiology challenge 2008: T-wave alternans. In: Proceedings of Computers in Cardiology, 2008. 505--508. Google Scholar

[44] Albrecht P, ST segment characterization for long term automated ECG analysis. Massachusetts Institute of Technology, Department of Electrical Engineering, 1983. Google Scholar

[45] Greenwald S D, Patil R S, and Mark R G. Improved detection and classification of arrhythmias in noise-corrupted electrocardiograms using contextual information. In: Proceedings of Computers in Cardiology, 1990. 461--464. Google Scholar

[46] Moody G. Spontaneous termination of atrial fibrillation: a challenge from Physionet and computers in cardiology 2004. In: Proceedings of Computers in Cardiology, 2004. 101--104. Google Scholar

[47] Iyengar N, Peng C K, Morin R. Age-related alterations in the fractal scaling of cardiac interbeat interval dynamics. Am J Physiol-Regulatory Integrative Comp Physiol, 1996, 271: R1078-R1084 CrossRef Google Scholar

[48] Mann D L, Zipes D P, Libby P, et al. Braunwald's Heart Disease E-Book: A Textbook of Cardiovascular Medicine. Elsevier Health Sciences, 2014. Google Scholar

[49] Goldberger A L, Amaral L A N, Glass L, et al. PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals. Circulation, 2000, 101(23):e215--e220. Google Scholar

[50] Lian Y and Yu J H. The reduction of noises in ecg signal using a frequency response masking based fir filter. In: Proceedings of IEEE International Workshop on Biomedical Circuits and Systems, 2004. IEEE, 2004. S2/4--17. Google Scholar

[51] De Luna A B, Batchvarov V N, and Malik M. The morphology of the electrocardiogram. The ESC Textbook of Cardiovascular Medicine Blackwell Publishing, 2006, pages 1--35. Google Scholar

[52] Sedghamiz H. Matlab implementation of Pan Tompkins ECG QRS detector. Mathworks, 2014. Google Scholar

  • Figure 1

    (Color online) An example of ECG signal, marked with fiducial points “P”, “Q”, “R”, “S”, and “T”.

  • Figure 2

    (Color online) An example of ten different types of ECG beat from MITDB [40] (a) Normal (NOR); (b) atrial premature contraction (APC); (c) left bundle branch block (LBB); (d) ventricular escape beat (VEB); (e) NOR with noise; (f) paced beat (PAB); (g) premature ventricular contraction (PVC); (h) right bundle branch block (RBB), (i) ventricular flutter wave (VFW);protectłinebreak (j) aberrated atrial premature.

  • Figure 3

    (Color online) Flow chart of our proposed R-QRS algorithm.

  • Figure 4

    (Color online) An example of (a) the ECG signal, (b) its enhanced “QRS" complexes after pre-processing [31], andprotectłinebreak (c) its enhanced “QRS” complexes after pre-processing [32].

  • Figure 5

    (Color online) The relation among the original ECG, the filtered ECG, and the QRS-enhanced ECG.

  • Figure 6

    (Color online) ECG signals (solid blue lines) and our QRS-enhanced ECG (dotted red line) from MITDB recordprotect łinebreak (a) `101', (b) `102', (c) `104', (d) `105', and (e) `201'. The “R” peaks are denoted by red circles.

  • Figure 7

    (Color online) The different threshold setting strategies. (a) Record `205' in MITDB; (b) record `104' in MITDB;protectłinebreak (c) bilateral threshold.

  • Figure 8

    (Color online) Record `203' in MITDB.

  • Figure 9

    (Color online) “R” peaks of different widths lead to different numbers of high peaks in the enhanced ECG. (a) A narrow “R” peak in the original ECG leads to a unique high peak in the enhanced ECG. (b) A wide “R” peak in the original ECG leads to two high peaks (the “R” peak and the minor peak) in the enhanced ECG.

  • Figure 10

    (Color online) Examples of upward and downward “R” positions identified by the proposed “R-peak identifier” algorithm, denoted by red circles.

  • Figure 11

    (Color online) The representative original ECG signals (blue) and QRS-enhanced ECGs (red). The “R” peaks detected by R-QRS algorithm are marked by red circles. Record (a) `104', (b) `207', and (c) `201' from MITDB; (d) record `I29' from INCARTDB.


    Algorithm 1 Overall algorithm of dynamic “R” peak detection

    Require:$x$, $z$. //The raw ECG signal and the QRS-enhanced ECG.

    Output: The positions of the “R” peaks.

    Parameters setup.

    while New sample exists do

    $n~\Leftarrow~n+1$; //Increase time index.

    $(P_0,A_0)~\Leftarrow~\textbf{PPS}(z,n)$; //Peak pre-selection.

    if $P_0\neq0$ then

    //$P_0\neq0$ indicates that a “large peak” has been found.

    if $A_0>T_1(P_c,P_0)$ then

    Find an “R” on $x$ by R-peak identifier;

    if the last “R” peak $(P_c,A_c)$ was found by $T_1$ rather than $T_2$, and $A_c\leq~T_1(P_0,P_c)$ then

    Treat $(P_c,A_c)$ as an “noise” peak;

    end if


    Take $A_0$ as a “noise” peak;

    end if

    Update parameters;


    //“Large peak” not found;

    Update QRS watchdog

    if QRS watchdog find a missing peak on $z$ then

    Relocate missing “R” by QRS watchdog;

    Find an “R” on $x$ by R-peak identifier;

    end if

    end if

    end while

  • Table 11  

    Table 1Table 1

    Evaluation of our “QRS” algorithm and state-of-the-art algorithms on nine open-source databases

  • Table 2  

    Table 2Evaluation of the computational complexity of the proposed algorithm on MITDB

    Method Our work Pan and Tompkins[31] Elgendi et al.[32]
    Computation time (s) 8.57 8.35 4.62

Contact and support