| Literature DB >> 31527502 |
Tam Nguyen1, Xiaoli Qin2, Anh Dinh3, Francis Bui4.
Abstract
A novel R-peak detection algorithm suitable for wearable electrocardiogram (ECG) devices is proposed with four objectives: robustness to noise, low latency processing, low resource complexity, and automatic tuning of parameters. The approach is a two-pronged algorithm comprising (1) triangle template matching to accentuate the slope information of the R-peaks and (2) a single moving average filter to define a dynamic threshold for peak detection. The proposed algorithm was validated on eight ECG public databases. The obtained results not only presented good accuracy, but also low resource complexity, all of which show great potential for detection R-peaks in ECG signals collected from wearable devices.Entities:
Keywords: R-peak detection; electrocardiogram (ECG); low resource complexity; moving average filter; triangle template matching
Year: 2019 PMID: 31527502 PMCID: PMC6767021 DOI: 10.3390/s19183997
Source DB: PubMed Journal: Sensors (Basel) ISSN: 1424-8220 Impact factor: 3.576
Figure 1The proposed algorithm structure, consisting of six steps.
Figure 2Signals at different steps in the algorithm.
Figure 3Influence of window length of the dynamic threshold on the overall error rate based on brute force optimization with fixed and .
Figure 4Multiple detected points in one QRS complex.
Computational resource cost of each step in the proposed algorithm.
| Step | Eq.No. | Register | Adder | Multiplier | Comparator |
|---|---|---|---|---|---|
| High pass filter | 6 | 1 | 4 | 1 | |
| Triangle Match Filter | 9 | 1 | 2 | 1 | |
| Low pass filter | 11 | 1 | 2 | 1 | |
| Threshold Calculation | 13 | 1 | 3 | 1 | |
| Threshold Cmp, R-peak search | 1 | ||||
| Total | 4 | 11 | 4 | 1 |
Computational resource cost of each step in Elgendi’s algorithm.
| Step | Eq.No. | Register | Adder | Multiplier | Comparator |
|---|---|---|---|---|---|
| Band pass filter | 1 | 7 | 8 | ||
| Squaring | 1 | 1 | |||
| Averaging filter | 2&3 | 2 | 6 | 2 | |
| Interested block | 4 | 2 | 1 | ||
| Threshold | 3 | 2 | |||
| R-peak detection | 1 | ||||
| Total | 6 | 15 | 11 | 4 |
Computational resource cost of each step in Hu’s algorithm [41].
| Step | Eq.No. | Register | Adder | Multiplier | Comparator |
|---|---|---|---|---|---|
| Local normalization | 1 | 1 | 1 | 2 | |
| Straight line fitting | 2 | 62 | 32 | ||
| Angle calculation | 4 | 2 | 3 | ||
| R-peak detection | 1 | 2 | 2 | ||
| Total | 4 | 67 | 33 | 4 |
Performance Evaluation of the proposed algorithm for the MIT-BIH Arrhythmia Database.
| Record | Total | TP | FN | FP | S(%) | P(%) | DER(%) |
|---|---|---|---|---|---|---|---|
| 100 | 2273 | 2273 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 101 | 1865 | 1864 | 1 | 4 | 99.95 | 99.79 | 0.27 |
| 102 | 2187 | 2186 | 1 | 0 | 99.95 | 100.00 | 0.05 |
| 103 | 2084 | 2084 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 104 | 2229 | 2227 | 2 | 13 | 99.91 | 99.42 | 0.67 |
| 105 | 2572 | 2563 | 9 | 22 | 99.65 | 99.15 | 1.21 |
| 106 | 2027 | 2027 | 0 | 3 | 100.00 | 99.85 | 0.15 |
| 107 | 2137 | 2136 | 1 | 0 | 99.95 | 100.00 | 0.05 |
| 108 | 1763 | 1750 | 13 | 14 | 99.26 | 99.21 | 1.53 |
| 109 | 2532 | 2530 | 2 | 1 | 99.92 | 99.96 | 0.12 |
| 111 | 2124 | 2123 | 1 | 1 | 99.95 | 99.95 | 0.09 |
| 112 | 2539 | 2539 | 0 | 1 | 100.00 | 99.96 | 0.04 |
| 113 | 1795 | 1795 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 114 | 1879 | 1875 | 4 | 5 | 99.79 | 99.73 | 0.48 |
| 115 | 1953 | 1953 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 116 | 2412 | 2396 | 16 | 2 | 99.34 | 99.92 | 0.75 |
| 117 | 1535 | 1535 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 118 | 2278 | 2278 | 0 | 1 | 100.00 | 99.73 | 0.48 |
| 119 | 1987 | 1987 | 0 | 1 | 100.00 | 99.95 | 0.05 |
| 121 | 1863 | 1861 | 2 | 1 | 99.89 | 99.95 | 0.16 |
| 122 | 2476 | 2475 | 1 | 1 | 99.96 | 99.96 | 0.08 |
| 123 | 1518 | 1518 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 124 | 1619 | 1619 | 0 | 2 | 100.00 | 99.98 | 0.12 |
| 200 | 2601 | 2600 | 1 | 6 | 99.96 | 99.77 | 0.27 |
| 201 | 1963 | 1954 | 9 | 0 | 99.54 | 100.00 | 0.46 |
| 202 | 2136 | 2134 | 2 | 0 | 99.91 | 100.00 | 0.09 |
| 203 | 2980 | 2924 | 56 | 28 | 98.12 | 98.12 | 2.82 |
| 205 | 2656 | 2650 | 6 | 0 | 99.77 | 100.00 | 0.23 |
| 207 | 1862 | 1857 | 5 | 172 | 99.73 | 91.51 | 9.52 |
| 208 | 2955 | 2944 | 11 | 2 | 99.63 | 99.63 | 0.44 |
| 209 | 3005 | 3005 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 210 | 2651 | 2581 | 70 | 1 | 97.36 | 99.96 | 2.68 |
| 212 | 2748 | 2748 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 213 | 3251 | 3251 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 214 | 2263 | 2261 | 2 | 1 | 99.91 | 99.96 | 0.13 |
| 215 | 3365 | 3363 | 2 | 0 | 99.94 | 100.00 | 0.06 |
| 217 | 2208 | 2208 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 219 | 2158 | 2154 | 0 | 1 | 100.00 | 99.95 | 0.05 |
| 220 | 2048 | 2048 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 221 | 2427 | 2427 | 0 | 1 | 100.00 | 99.96 | 0.04 |
| 222 | 2483 | 2480 | 3 | 2 | 99.88 | 99.92 | 0.20 |
| 223 | 2605 | 2605 | 0 | 1 | 100.00 | 99.96 | 0.04 |
| 228 | 2056 | 2054 | 2 | 19 | 99.90 | 99.08 | 1.02 |
| 230 | 2256 | 2256 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 231 | 1571 | 1571 | 0 | 0 | 100.00 | 98.99 | 1.02 |
| 232 | 1780 | 1780 | 0 | 5 | 100.00 | 99.72 | 0.28 |
| 233 | 3079 | 3079 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| 234 | 2753 | 2753 | 0 | 0 | 100.00 | 100.00 | 0.00 |
| Total | 109494 | 109270 | 224 | 314 | 99.80 | 99.71 | 0.49 |
Performance comparison between the proposed method and other state-of-art methods.(*) The results from our implementation and beat-by-beat comparison using AAMI standard [26].
| Database | Method | Year | Total Beats | S(%) | P(%) | DER(%) |
|---|---|---|---|---|---|---|
|
| This work | 109494 | 99.80 | 99.71 | 0.49 | |
| Elgendi’s algorithm (*) | 2013 | 109494 | 99.89 | 99.48 | 0.63 | |
| Elgendi’s algorithm [ | 109985 | 99.78 | 99.87 | |||
| Pan-Tompkins’s algorithm [ | 1986 | 109494 | 99.20 | 99.08 | 1.72 | |
| This work | 25590 | 97.12 | 95.03 | 7.95 | ||
| Elgendi’s algorithm (*) | 2013 | 25590 | 98.80 | 89.54 | 12.73 | |
| Elgendi’s algorithm [ | 26370 | 95.39 | 90.25 | |||
| Pan-Tompkins’s algorithm [ | 1986 | 25590 | 99.06 | 87.95 | 14.51 | |
| This work | 85353 | 99.94 | 99.78 | 0.29 | ||
| Elgendi’s algorithm (*) | 2013 | 85353 | 99.76 | 99.42 | 0.82 | |
| Elgendi’s algorithm [ | 111201 | 99.99 | 99.67 | |||
| Pan-Tompkins’s algorithm [ | 1986 | 85353 | 99.60 | 98.35 | 2.07 | |
| This work | 76181 | 99.92 | 99.70 | 0.98 | ||
| Elgendi’s algorithm (*) | 2013 | 76181 | 99.42 | 99.70 | 1.27 | |
| Pan-Tompkins’s algorithm [ | 1986 | 76181 | 91.78 | 98.95 | 3.3 | |
| This work | 19003 | 99.01 | 99.14 | 1.10 | ||
| Xiao Hu’s algorithm [ | 2014 | 79681 | 100 | 100 | 0 | |
| Elgendi’s algorithm (*) | 2013 | 19003 | 97.21 | 99.54 | 1.31 | |
| Elgendi’s algorithm [ | 19003 | 98.88 | 99.12 | |||
| Pan-Tompkins’s algorithm [ | 1986 | 19003 | 88.32 | 94.04 | 18.23 | |
| This work | 182499 | 99.90 | 99.8 | 0.6 | ||
| Elgendi’s algorithm (*) | 2013 | 182499 | 99.85 | 99.70 | 0.8 | |
| Elgendi’s algorithm [ | 184744 | 99.96 | 99.80 | |||
| Pan-Tompkins’s algorithm [ | 1986 | 182499 | 99.86 | 99.56 | 0.57 | |
| This work | 183092 | 100.00 | 99.96 | 0.5 | ||
| Elgendi’s algorithm (*) | 2013 | 183092 | 99.82 | 99.60 | 0.7 | |
| Elgendi’s algorithm [ | 183092 | 99.99 | 99.96 | |||
| Pan-Tompkins’s algorithm [ | 1986 | 183092 | 99.91 | 99.97 | 0.60 | |
| This work | 6705 | 99.59 | 96.11 | 8.5 | ||
| Elgendi’s algorithm (*) | 2013 | 6705 | 99.49 | 93.11 | 9.6 | |
| Elgendi’s algorithm [ | 7618 | 99.59 | 94.11 | |||
| Pan-Tompkins’s algorithm [ | 1986 | 6705 | 64.21 | 99.01 | 14.56 |
Comparisons of the DER from the proposed method with other studies for ECG records 121, 200, 202, 217, 105, and 108.
| Methods | Year | Record | |||||
|---|---|---|---|---|---|---|---|
| 121 | 202 | 200 | 217 | 105 | 108 | ||
| This work | 0.16 | 0.09 | 0.35 | 0.09 | 1.21 | 1.53 | |
| Quadratic filtering [ | 2015 | 0.00 | 0.00 | 0.19 | 0.27 | 1.59 | 4.08 |
| Wavelet transform [ | 2014 | 0.10 | 0.09 | 0.30 | 0.23 | 0.81 |
|
| Elgendi’s algorithm [ | 2013 | 0.11 | 0.19 | 0.23 | 0.18 |
| 1.59 |
| Linear filtering [ | 2013 | 0.11 | 0.09 | 0.15 | 0.09 | 1.25 | 0.57 |
| S-transform [ | 2010 | 0.16 | 0.09 | 0.23 | 0.23 | 1.24 | 2.44 |
| Artificial neural network [ | 2014 | 0.16 | 0.33 | 0.31 |
| 0.23 | 0.51 |
| Mathematical morphology [ | 2009 |
|
| 0.50 | 0.23 | 1.01 | 0.68 |
| Adaptive Mathematical morphology [ | 2016 | 0.11 | 0.09 | 0.19 | 0.45 | 1.44 | 1.13 |
| Four QRS waveform templates [ | 2017 | 0.11 | 0.19 |
| 0.14 | 1.61 | 2.4 |
Figure 5Results of the proposed algorithm and Elgendi’s algorithm on record 109 and 113.
Comparison of processing time for NSRDB of Elgendi’s Algorithm and the proposed work running on MATLAB.
| Methods | Error Rate (%) | Processing Time(Second) |
|---|---|---|
| Pan-Tompkin’s algorithm | 1.72 | 101.54 |
| Elgendi’s algorithm | 0.69 | 40.99 |
| Proposed algorithm | 0.49 | 7.62 |