Abstract
We have developed a novel method to accurately detect QRS complex peaks using the variable frequency complex demodulation (VFCDM) method. The approach’s novelty stems from reconstructing an ECG signal using only the frequency components associated with the QRS waveforms by VFCDM decomposition. After signal reconstruction, both top and bottom sides of the signal are used for peak detection, after which we compare locations of the peaks detected from both sides to ensure false peaks are minimized. Finally, we impose position-dependent adaptive thresholds to remove any remaining false peaks from the prior step. We applied the proposed method to the widely benchmarked MIT-BIH arrhythmia dataset, and obtained among the best results compared to many of the recently published methods. Our approach resulted in 99.94% sensitivity, 99.95% positive predictive value and a 0.11% detection error rate. Three other datasets—the MIMIC III database, University of Massachusetts atrial fibrillation data, and SCUBA diving in salt water ECG data—were used to further test the robustness of our proposed algorithm. For all these three datasets, our method retained consistently higher accuracy when compared to the BioSig Matlab toolbox, which is publicly available and known to be reliable for ECG peak detection.
Keywords: Electrocardiogram, peak detection, QRS complex, signal reconstruction, T-wave, variable frequency complex demodulation
I. Introduction
The electrocardiogram (ECG) is one of the most vital physiological signals [1]. The ECG waveform is characterized by major waves including P, QRS, and T, where QRS represents the depolarization of the ventricles [1]. By analyzing QRS complexes, much important information such as the heart rate (HR), heart rhythms (normal sinus and abnormal), and ectopic beat information can be obtained. As a result, QRS complex detection, also known as R-peak detection or simply peak detection, has significant importance in both clinical and research applications. For example, HR is often monitored for physical wellbeing as well as for chronic conditions such as hypertension, and others, in both adults and children.
Many attempts have been made to accurately detect QRS complexes, including the seminal work by Pan and Tompkins [2], which is based on analysis of slope, width, and amplitude of the QRS complexes, and has been used extensively in the literature as one of the gold standard algorithms. Other ECG peak detection methods include the first order derivative [3] and second order derivative [4]. Digital filters and a strategy based on looking for irregular R-R intervals are described in [5]. In [6], a QRS detection algorithm is presented which includes polynomial filters, and their associated parameters are selected by a genetic algorithm. In [7], the ECG signal has been decomposed with filter banks and then several parameters are combined with a heuristic decision rule to detect heartbeats. An adaptive-matched filter technique with artificial neural networks is used in [8].
Several works have been published with wavelet transforms to detect ECG beats. A wavelet transform-based single-lead delineation system is described in [9], while a hidden Markov model along with wavelets are used in [10]. In [11], multiscale features of wavelet transforms are used to distinguish QRS complexes. In [12], a stationary wavelet transform is described, which uses local maxima, minima, and zero-crossing information. In [13], higher-order statistical moments derived from the discrete wavelet transform are used for QRS complex peak detection. In [14], a QRS detection algorithm is presented using quadratic filters capable of enhancing QRS signal-to-noise ratios.
Other than wavelets, some recent methods include empirical mode decomposition with peak correction and detection [15], and a Shannon energy envelope-based method [16]. In [17], sparse derivative-based ECG enhancement and a Hilbert transform approach are implemented to detect ECG peaks. An optimized nonlinear adaptive whitening filter based on sigmoidal radial basis functions is used in [18] to detect QRS complexes.
However, as mentioned in [15], wavelet-based methods are non-adaptive and may not be generally applicable for most ECG signals. For empirical mode decomposition (EMD)-based approaches, although EMD is data-driven, it can be sensitive to noise and mode mixing is an important issue. Moreover, the commonly used derivative filters can amplify the high frequency noise components [1]. Neural network and iteration-based methods can suffer from computational complexity and convergence issues, respectively. Apart from these issues, several types of noise can be present in ECG signals including muscle noise, electrode motion artifacts, power-line interference, baseline drift, and others [2]. Some of these methods have been compared to our proposed method in the Results section.
To better combat these issues, we propose the variable frequency complex decomposition method (VFCDM) for ECG reconstruction and beat detection, which we name henceforth VERB. VERB reconstructs the ECG signal among various VFCDM sub-bands, to remove components associated with noise so that better peak detection can be achieved. Since most of the QRS beat detection methods are evaluated and compared to the MIT-BIH arrhythmia database, the performance of the proposed VERB algorithm has also been evaluated using the same database. Moreover, to show the robustness of the proposed method, we used two other ECG datasets along with data from a SCUBA diver riding an autonomous vehicle in salt water.
The rest of the paper is organized as follows: we briefly describe the datasets in section II, we develop the proposed VERB algorithm in section III, we present the results from different datasets in section IV, and we discuss the results in section V. Finally, we conclude with section VI.
II. Description of the Datasets
Four different datasets have been used in this study to develop and evaluate the proposed beat detection algorithm.
A. MIT BIH Arrhythmia Database
The MIT-BIH Arrhythmia Database (MITDB) contains 48 half-hour datasets from two-channel ambulatory ECG recordings, obtained from 47 subjects [19]. Twenty three recordings were chosen at random from a set of 4,000 24-h ambulatory ECG recordings collected from a mixed population of inpatients (about 60%) and outpatients (about 40%) at Boston Hospital; the remaining 25 recordings were selected from the same set to include less common but clinically significant arrhythmias that are not well-represented in a small random sample. The recordings were digitized at 360 samples per second per channel with 11-bit resolution over a 10 mV range. Each recording includes two leads: the modified limb lead II and one of V1, V2, V4 or V5 leads. Two or more cardiologists independently annotated each record; disagreements were resolved to obtain the computer-readable reference annotations for each beat (approximately 110,000 annotations in all) included with the database [20].
B. UMASS Database
Data collection was approved by the University of Massachusetts Institutional Review Board (IRB). The UMass database contains data from 22 subjects, consisting of 10 normal sinus rhythm (NSR) subjects, 10 subjects with atrial fibrillation (AF) and 2 subjects with premature atrial contractions (PAC). Subjects were instructed to perform different body movements, as noted below. Participants were approached following their ambulatory clinic appointment and taken to a free exam room where they gave their informed consent to participate in the study and received a detailed outline of the study procedure. A 7-lead Holter monitor (Rozinn RZ153+ Series, Rozinn Electronics Inc., USA) was used to record the ECG data. Participants were taken through a standardized protocol consisting of the following activities: 2 minutes of completely sitting still, 2 minutes of slow walking (approximately 2 mph), 30 seconds of rest while standing still, 2 minutes of fast walking (approximately 4 mph), 1 minute of rest, 1 minute of up and down arm movement, 1 minute of random wrist movement, 30 seconds of rest while standing, 1 minute of alternating sitting and standing, 2 minutes of going up and down a set of stairs, and 1 minute of deep breathing. The sampling frequency was 180 Hz which was down-sampled to 128 Hz.
C. MIMIC III Database
MIMIC-III is a large and publicly-available database comprising de-identified health-related data associated with approximately sixty thousand patients who stayed in critical care units of the Beth Israel Deaconess Medical Center between 2001 and 2012 [21]. MIMIC stands for “Medical Information Mart for Intensive Care” and the database includes a wealth of different information such as demographics, vital sign measurements, laboratory test results, medications, nurse and physician notes, imaging reports, out-of-hospital mortality, and other patient data. MIMIC III links continuous ECG and pulse plethysmographic waveforms to a wealth of time-varying clinical and hemodynamic data. For this peak detection study, ECG waveforms from N=20 subjects (10 NSR and 10 AF subjects) were used. ECG signals from AF subjects were annotated by the University of Massachusetts cardiologist (DM). From each subject, 10 minutes of ECG signal have been analyzed to evaluate the peak detection performance. For AF subjects, clean ECG signals were taken from the AF-annotated part. The sampling frequency of the ECG signals was 125 Hz.
D. Salt-Water ECG Data
This data is unique, as we obtained ECG data from a Navy SCUBA diver who wore our previously developed chest worn device using our previously developed hydrophobic electrodes [22], [23]. The SCUBA dive was performed in salt water in Key West, Florida and the diver rode an autonomous vehicle which dove to a depth of 20 ft. and then surfaced; this procedure was repeated throughout the data collection. During this procedure, the diver was also experimenting with new flippers, which may have introduced additional motion artifacts in the ECG recordings. Data were collected for 40 minutes but we only show the peak detection algorithm results on a relatively clean portion consisting of 19 minutes.
III. Methods
The proposed method consists of two major steps: (a) reconstruction of the ECG signal and (b) beat detection from the reconstructed ECG. However, before any of these steps, preprocessing of the ECG signal is performed. Preprocessing includes taking an ECG segment (30-second ECG segments have been used here), then filtering that segment with a 3rd order Butterworth bandpass filter having cutoff frequencies of 0.5 and 20 Hz. After filtering the ECG segment, it is normalized to zero mean and unity variance.
A. VFCDM-Based Reconstruction of ECG
While most ECG waveforms have the textbook-described morphology, which leads to accurate peak detection, in some cases the ECG data are noisy, with unclear QRS complexes, some with T-wave amplitudes that are equal to or greater than R waves, deep S waves, and the signal affected by low frequency trends. All these distortions can hinder accurate detection of the QRS peaks (or R peaks) (heart beats) from the time domain ECG signal. To overcome these problems, we have implemented a VFCDM-based ECG reconstruction approach. The signal reconstruction is performed with only the frequency components of interest, and the other non-ECG related dynamics are removed.
VFDCM is a time-frequency analysis technique that has been used for a variety of physiological signal processing [24], [25]. It is designed to estimate the time-frequency spectrum (TFS) of a given signal. VFCDM not only provides high time and frequency resolution, but also retains the accurate amplitude distribution of the signal [26].
The first step of VFCDM uses complex demodulation (CDM) to obtain an estimate of the TFS. Let x (t) be a narrow band sinusoidal signal with a center frequency f0, instantaneous amplitude A (t), phase ∅ (t), and the direct current component dc (t).
(1) |
For a given center frequency, the instantaneous amplitude A (t) and phase ∅ (t) can be extracted by multiplying (1) by e−j2π f0t.
Now, if the modulating frequency is not fixed but varies with time, then the signal x (t) can be written as:
(2) |
Multiplying (2) by yields both instantaneous amplitude, A(t), and ∅ (t) :
(3) |
If z (t) is filtered with an ideal low-pass filter (LPF) with a cutoff frequency fc < f 0, then the filtered signal will be obtained which has the same instantaneous amplitude A (t) and phase ∅(t).
This instantaneous frequency is given by:
(4) |
In the case of variable frequency, the center frequency, f0, is replaced with a variable frequency. By changing the center frequency followed by using the variable frequency approach and the low pass filtering, the signal, x(t), can be decomposed into the sinusoid modulations by the complex demodulation technique, as follows:
(5) |
The instantaneous frequency and amplitude of di can be calculated using the Hilbert transform. As a result, with the combination of the CDM and Hilbert transform, a high time-frequency resolution spectrum and accurate amplitude information can be obtained [27].
The di in Eq. (5) represents the number of frequency components. Once VFCDM has been applied to a 30-sec ECG segment, we obtain 12 di components, which represent the ECG signal at different frequency bands. Thus, by simply adding these components in the time domain, the original ECG signal can be reconstructed as noted in Eq. (5). Fig. 1 shows a sample ECG segment and the associated first 9 VFCDM components of increasing frequencies.
Fig. 1.
(a) Representative 10-sec ECG segment from MITDB (record #209); (b)-(j) First 9 VFCDM decomposition components of (a).
The purpose of the VFCDM reconstruction stage is to combine only those components that represent the dynamics of the ECG. To this end, we only added components 2 to 4 to form the reconstructed representation of the ECG segment. For example, the component 1 is associated with very low frequency dynamics and are not related to ECG waveforms. By doing reconstruction with high frequency components, we induce sharp spikes on both the top and bottom sides of the reconstructed ECG segments, particularly at the location of the QRS complex waves. Moreover, this reconstruction approach leads to elimination of ripples from the middle part (P-R and S-T segment) of the ECG waveforms. Fig. 2 shows a sample ECG segment and the VFCDM reconstruction based on two different compositions of VFCDM components. Fig. 2(b) shows the VFCDM reconstruction using the first 4 components while Fig. 2(c) presents the results of adding components 2 to 4. Fig. 2 (b) shows that the reconstructed ECG resembles the original ECG segment which is fine in most cases, but, for those ECG with large T-waves (see Fig. 3), they would cause difficulty in detecting accurate QRS complexes. However, in Fig. 2(c), the low frequency noise and non-QRS waves are suppressed, especially between two consecutive QRS waves. Not only is there less noise around the middle portion, but also the QRS waves are prominent. We made use of this property in the proposed beat detection algorithm.
Fig. 2.
(a): Representative preprocessed ECG segment; (b) ECG reconstruction using VFCDM components 1 to 4; (c) reconstruction with components 2 to 4 (used in VERB).
Fig. 3.
VCFDM reconstruction of ECG segments with long T or deep S waves: (a-b) sample ECG and reconstructed signal from MITDB record # 113 (long T); (c-d) sample ECG and reconstructed signal from MITDB record # 117 (long T); (e-f) sample ECG and reconstructed signal from MITDB record # 200 (deep S).
Another major advantage of the proposed VFCDM reconstruction is that, after combining components 2, 3, and 4 in the reconstruction stage, the long T waves are suppressed, as they belong to the first component. Moreover, when there is a deep S wave, the reconstruction also creates sharp spike shapes but significantly lower amplitudes compared to the QRS complexes in place of the S waves. By suppressing the long T waves and the deep S waves, we thereby reduce the number of false beats detected.
Figs. 3 (a-d) represent sample ECG segments with long T waves and the corresponding VFCDM-reconstructed ECG segments. It is evident that the T waves are suppressed to a great extent for all cases. Figs. 3 (e-f) show the effect of the VFCDM ECG reconstruction on the deep S waves. They show that by adding only the components of interest, sharp spikes associated with R peaks can be accentuated. These spikes are suitable for the proposed QRS peak detection step.
B. Beat Detection Strategy in the Verb Algorithm
As shown in the previous section (see Figs. 3d & 3f), the VERB reconstruction method accentuates sharp spike shapes in the QRS waves (both top and bottom sides of the ECG segment). The proposed VERB algorithm was developed based on this property. First, local peak detection is performed on the top side of the reconstructed ECG segment. A local peak is defined as a data point that is larger than its two neighboring points [28]. Although the spike peaks from the top side are easily detectable, to reduce false peak detection, two conditions have been imposed on the local peak detection: (a) the minimum peak-to-peak distance cannot result in an instantaneous heart rate greater than 250 bpm, and (b) a variable peak amplitude threshold is calculated as 15% of the maximum value found in the reconstructed ECG segment.
Since there are also spike shapes on the bottom side of the reconstructed ECG waves, we also perform peak detection for the bottom side. By comparing both top and bottom peaks location by location, we expect to have more robust peak detection and elimination of false peaks. For the bottom peak detection, a similar local peak detection approach was applied after inverting the reconstructed ECG signal and setting the previous threshold condition (amplitude threshold is reduced to 10% for this case). The reason for the lower threshold value is that the bottom part of the QRS wave generally tends to have lower amplitude than the top portion of the reconstructed waveforms.
After detection of both the top and bottom peaks, they are compared location by location. During this step, when a peak is found on the top side of the reconstructed ECG segment, another peak also has to be located within a certain time range on the bottom side for the top peak to be considered a peak; similarly, a peak on the bottom has to have a neighboring top peak. Prior to comparing the peak locations, upper and lower value clipping is performed to adjust any unwanted change in the amplitude.
Fig. 4 (a) shows the top peak detection from the reconstructed ECG segment while Fig. 4 (b) shows the same for the bottom side. The black circles indicate the detected peaks. Note that Fig. 4 (b) does not show the two small peaks seen in the Fig. 4 (a) around 1 and 4 sec, respectively, based on the beat detection strategy described above. Fig. 4 (c) shows the results after the peak-to-peak comparison from both sides. It is clear from Fig. 4 (c) that with the peak-to-peak comparison for each location, we have removed two false peaks seen around 1 sec and 4 sec in Fig. 4 (a).
Fig. 4.
(a) Local peak detection from the top side; (b) local peak detection from the bottom side; (c) detected peaks after comparing both top and bottom sides (record # 200 from MITDB).
On some occasions, many false peaks (false positives) can still be present even after the above-described local peak-to-peak comparison approach. Hence, to eliminate these false peaks, threshold conditions based on the peak positions have been imposed. These thresholds are not fixed but are automatically varying with peak locations and from segment to segment. The underlying idea is that in a reconstructed ECG segment of shorter length (30-sec segment), the true QRS peaks are more or less of similar amplitude unless the ECG is corrupted with some sudden spike induced noise artifacts, which can lead to additional spurious peaks. To counter this, after the initial peak detection step, if the previous peak and the next peak are detected at a close range, it has to be of a minimum height/amplitude to be considered as a true peak. To determine the minimum peak height, the following steps have been considered:
Step 1: If two consecutive peaks are in such close range that the instantaneous HR becomes 170 to 250 bpm, then the current (ith) peak has to be at least 60% of the mean of its surrounding two ((i−1)th and (i+1)th) peaks. If ‘A’ denotes the peak amplitude, then A (i) has to be at least . This is possible for AF subjects with very fast HR, albeit a rare occurrence. For this reason, the threshold is strictly set to 60% of the mean of its two surrounding peaks.
Step 2: If the peaks are located further apart than noted in Step 1, so that the instantaneous HR is in the 120 to 170 bpm range, the ith peak has to be at least 40% of the mean of the surrounding two peaks. Since this can happen for AF subjects or someone with fast HR, the threshold is lowered to 40%.
Step 3: For the peaks which are located even further apart (i.e., the instantaneous HR becomes lower than 120 bpm, which is the most common scenario), we do not impose any kind of amplitude-based thresholds.
At any stage of the algorithm, if two consecutive peaks are found in such close range that the instantaneous HR becomes excessively high (more than 250 bpm), the peak with the highest amplitude is retained. The other one is discarded, as it is not physiologically possible to have a HR higher than 250 bpm.
Fig. 5 shows two examples of removing false positive beats with the abovementioned steps for two representative samples of reconstructed ECG segments. Figs. 5 (a) and 5 (c) show that there are several erroneously detected peaks after peak-to-peak comparison from both sides. However, in Figs. 5 (b) and 5 (d), incorrectly detected peaks are removed with the proposed false peaks removal criteria. It is clear from the plots that these location-based criteria are effective in removing the false beats. Fig. 6 gives the complete step-by-step outputs of the proposed VERB algorithm for a representative sample ECG segment. Fig. 6 (a) shows the preprocessed ECG signal and Fig. 6 (b) shows the reconstructed ECG segment from VFCDM components 2 to 4. Figs. 6 (c) and 6 (d) show the peak detection from both the top side and bottom side of the ECG segment, respectively. The detected peaks after side-by-side comparison are shown in Fig. 6 (e) and finally, in Fig. 6 (f), the detected peaks after the location based false peak removal criteria is employed are shown with the original ECG data.
Fig. 5.
Examples showing the effectiveness of the false peak removal criteria: (a) and (c) before false peak removal; (b) and (d) VERB output after false peak removal (peak locations shown with ECG signal).
Fig. 6.
Different steps of the VERB algorithm: (a) input preprocessed ECG signal; (b) VFCDM-reconstructed ECG segment; (c) local peak detection from the top side; (d) local peak detection from the bottom side; (e) peaks after comparing both sides; (f) final peak detection output with the VERB algorithm (peak locations shown with ECG signal).
IV. Results
In this section, we evaluate the performance of the proposed VERB algorithm using four different datasets—MITDB, UMass DB, MIMIC III and salt-water ECG datasets.
A. Results on MIT-BIH Arrhythmia Databasess
The MIT-BIH arrhythmia database has been widely used as the standard benchmark to evaluate the performance of ECG beat detection algorithms. Hence, we compare our VERB algorithm to other methods that have been already published. Detected beats were compared with the reference annotated beats. For the sake of fair comparison with other published methods, the first channel (i.e., modified limb lead II) was chosen for all recordings. To calculate the evaluation matrices, several quantities were calculated from each of the 48 available subjects in the database. These were:
Where:
TP is the true positive (a QRS peak is detected correctly).
FN is the false negative (a QRS peak is missed by the detection).
FP is the false positive (false detection of a QRS peak where there is no QRS peak).
TB is the total number of beats.
Table I represents the experimental results for all the recordings of the MITDB. For record # 207, ventricular flutter beats are excluded, as reported in [9], [13]. From the table, it can be seen that our proposed method achieves accurate peak detection performance for all subjects. The lowest sensitivity obtained is 99.09% for record #203 while we obtain 100% sensitivity for 28 other subjects. The lowest P+ value is 99.54% (for record #105) whereas 100% P+ value was achieved for 29 subjects. For all subjects, the VERB algorithm detected 66 FN and 55 FP from 109,457 true beats.
TABLE I.
Experimental results for all recordings of MITDB
Record | TB | TP | FP | FN | Se (%) |
P+ (%) |
Er (%) |
---|---|---|---|---|---|---|---|
100 | 2273 | 2273 | 0 | 0 | 100 | 100 | 0 |
101 | 1868 | 1867 | 1 | 1 | 99.95 | 99.95 | 0.11 |
102 | 2187 | 2187 | 0 | 0 | 100 | 100 | 0 |
103 | 2084 | 2084 | 0 | 0 | 100 | 100 | 0 |
104 | 2230 | 2230 | 1 | 0 | 100 | 99.96 | 0.04 |
105 | 2585 | 2585 | 12 | 0 | 100 | 99.54 | 0.46 |
106 | 2027 | 2026 | 0 | 1 | 99.95 | 100 | 0.04 |
107 | 2136 | 2135 | 0 | 1 | 99.95 | 100 | 0.05 |
108 | 1764 | 1763 | 2 | 1 | 99.94 | 99.89 | 0.17 |
109 | 2532 | 2532 | 0 | 0 | 100 | 100 | 0 |
111 | 2125 | 2125 | 3 | 0 | 100 | 99.86 | 0.14 |
112 | 2539 | 2539 | 0 | 0 | 100 | 100 | 0 |
113 | 1795 | 1795 | 0 | 0 | 100 | 100 | 0 |
114 | 1879 | 1879 | 0 | 0 | 100 | 100 | 0 |
115 | 1953 | 1953 | 0 | 0 | 100 | 100 | 0 |
116 | 2394 | 2394 | 0 | 0 | 100 | 100 | 0 |
117 | 1535 | 1535 | 1 | 0 | 100 | 99.93 | 0.07 |
118 | 2278 | 2278 | 1 | 0 | 100 | 99.96 | 0.04 |
119 | 1988 | 1988 | 0 | 0 | 100 | 100 | 0 |
121 | 1862 | 1862 | 0 | 0 | 100 | 100 | 0 |
122 | 2476 | 2476 | 0 | 0 | 100 | 100 | 0 |
123 | 1518 | 1518 | 2 | 0 | 100 | 99.87 | 0.13 |
124 | 1619 | 1619 | 1 | 0 | 100 | 99.94 | 0.06 |
200 | 2598 | 2598 | 1 | 0 | 100 | 99.96 | 0.04 |
201 | 1959 | 1956 | 2 | 3 | 99.85 | 99.90 | 0.26 |
202 | 2135 | 2134 | 0 | 1 | 99.95 | 100 | 0.05 |
203 | 2965 | 2938 | 1 | 27 | 99.09 | 99.97 | 0.94 |
205 | 2657 | 2656 | 0 | 1 | 99.96 | 100 | 0.04 |
207 | 1854 | 1854 | 3 | 0 | 100 | 99.84 | 0.16 |
208 | 2948 | 2943 | 1 | 5 | 99.83 | 99.97 | 0.20 |
209 | 3005 | 3002 | 3 | 3 | 99.90 | 99.90 | 0.20 |
210 | 2650 | 2641 | 0 | 9 | 99.66 | 100 | 0.34 |
212 | 2748 | 2748 | 0 | 0 | 100 | 100 | 0 |
213 | 3251 | 3250 | 0 | 1 | 99.97 | 100 | 0.03 |
214 | 2261 | 2259 | 0 | 2 | 99.91 | 100 | 0.09 |
215 | 3361 | 3360 | 0 | 1 | 99.97 | 100 | 0.03 |
217 | 2206 | 2204 | 0 | 2 | 99.91 | 100 | 0.09 |
219 | 2154 | 2154 | 0 | 0 | 100 | 100 | 0 |
220 | 2048 | 2048 | 0 | 0 | 100 | 100 | 0 |
221 | 2427 | 2426 | 0 | 1 | 99.96 | 100 | 0.04 |
222 | 2482 | 2479 | 11 | 3 | 99.88 | 99.56 | 0.56 |
223 | 2605 | 2604 | 0 | 1 | 99.96 | 100 | 0.04 |
228 | 2056 | 2055 | 4 | 1 | 99.95 | 99.81 | 0.24 |
230 | 2256 | 2256 | 1 | 0 | 100 | 99.96 | 0.04 |
231 | 1571 | 1571 | 0 | 0 | 100 | 100 | 0 |
232 | 1781 | 1781 | 4 | 0 | 100 | 99.78 | 0.22 |
233 | 3079 | 3078 | 0 | 1 | 99.97 | 100 | 0.03 |
234 | 2753 | 2753 | 0 | 0 | 100 | 100 | 0 |
Total | 109457 | 109391 | 55 | 66 | 99.94 | 99.95 | 0.11 |
Next, we present in detail some examples of the proposed VERB algorithm in use on several challenging recordings of the MIT-BIH arrhythmia database. Fig. 7(a) shows a sample ECG segment from recording #222 where a baseline drift is present (along with tall P-waves), but the VERB algorithm has successfully detected all of the R peaks. In Fig. 7(b), the ECG signal is from recording #228 and contains greatly varying R peak amplitudes. Despite this challenging scenario, the proposed method was able to accurately detect all R peaks.
Fig. 7.
R peak detection examples from ECG segments: (a) recording #222 and (b) recording #228 of MITDB.
Fig. 8 (a) shows a sample ECG segment obtained from MITDB record #117, which exhibits large-amplitude T waves. Fig. 8 (b) is recording # 210, in which the QRS morphology changes due to muscle artifacts, baseline drifts, and PVC beats [1]. Even in these difficult situations, our proposed VERB algorithm accurately detected the R peaks.
Fig. 8.
R peak detection examples from ECG segments: (a) recording #117 and (b) recording #210 of MITDB.
Finally, Table II compares the performance of the proposed beat detection algorithm with several other existing methods. The table shows that our proposed method achieves the best performance. The VERB algorithm achieves 99.94% sensitivity, 99.95% P+ and only 0.11% detection error rate on the MIT-BIH arrhythmia database.
TABLE II.
Comparison of ECG beat detection performance on MITDB
Method | TB | TP | FP | FN | Error (%) | Se (%) | P+ (%) |
---|---|---|---|---|---|---|---|
Ghaffari et al. [15] | 109428 | 109367 | 89 | 61 | 0.14 | 99.94 | 99.91 |
Martinez et al. [11] | 109428 | 109208 | 153 | 220 | 0.34 | 99.80 | 99.86 |
Li et al. [13] | 104182 | 104070 | 65 | 112 | 0.17 | 99.89 | 99.94 |
Hamilton et al. [28] | 109267 | 108927 | 248 | 340 | 0.54 | 99.69 | 99.77 |
Pan et al. [4] | 109809 | 109532 | 507 | 277 | 0.71 | 99.75 | 99.54 |
Afonso et al. [9] | 90909 | 90535 | 406 | 374 | 0.86 | 99.59 | 99.56 |
Poli et al. [8] | 109963 | 109522 | 545 | 441 | 0.90 | 99.60 | 99.50 |
Ning et al. [18] | 109452 | 109314 | 127 | 138 | 0.24 | 99.87 | 99.88 |
Merah et al. [14] | 109494 | 109316 | 126 | 178 | 0.28 | 99.84 | 99.88 |
Zidelmal et al. [3] | 109494 | 109101 | 193 | 393 | 0.54 | 99.64 | 99.82 |
Pal et al. [1] | 45936 | - | 17 | 54 | - | 99.88 | 99.96 |
Arbateni et al. [19] | 109483 | 109273 | 109 | 210 | 0.28 | 99.82 | 99.91 |
Zhu et al. [17] | 109494 | 109401 | 91 | 93 | 0.17 | 99.92 | 99.92 |
Phukpattaranont et al. [16] | 109483 | 109281 | 210 | 202 | 0.39 | 99.82 | 99.81 |
VERB (proposed here) | 109457 | 109391 | 55 | 66 | 0.11 | 99.94 | 99.95 |
B. Results on UMASS DB and MIMIC III Database
To further demonstrate the robustness of the proposed method on different ECG datasets, we present VERB peak detection results on UMass and MIMIC III datasets. The peak height thresholds and the false beat removal criteria are kept consistent throughout the whole study (they are the same for all three datasets, to have a fair comparison). Fig. 9 shows the peak detection performance of the VERB method on the UMass dataset for two representative NSR and AF ECG segments. The R peaks were accurately detected for both the AF and NSR recordings, as shown in the figure. Fig. 10 also shows the similarly accurate peak detection performance using a representative sample from the MIMIC III database.
Fig. 9.
Output of VERB algorithm on UMass dataset: (a) NSR ECG segment and (b) AF ECG segment.
Fig. 10.
VERB peak detection output on MIMIC III dataset: (a) NSR ECG segment and (b) AF ECG segment.
To quantify the R-peak detection performance on both UMass and MIMIC III datasets, similar performance metrics like TP, sensitivity, P+ etc. were calculated. To demonstrate the superiority of the proposed method, the “QRSdetect” function of the BioSig Toolbox was used for comparison of the two methods [29]. A filter bank-based ECG beat detection algorithm has been implemented in the “QRSdetect” function [7]. Table III shows the performance comparison of the VERB algorithm with the BioSig method for the UMass dataset while a similar comparison is reported in Table IV for the MIMIC III dataset.
TABLE III.
Beat Detection Performance on UMass Dataset
Beat types |
Method | TB | TP | FP | FN | Error (%) |
Se (%) |
P+ (%) |
---|---|---|---|---|---|---|---|---|
AF beats | BioSig | 5438 | 5306 | 40 | 129 | 3.11 | 97.63 | 99.25 |
VERB | 5438 | 5430 | 3 | 5 | 0.15 | 99.91 | 99.94 | |
Non-AF eats | BioSig | 4778 | 4753 | 51 | 25 | 1.59 | 99.48 | 98.94 |
VERB | 4778 | 4778 | 8 | 0 | 0.17 | 100 | 99.83 | |
Overall | BioSig | 10216 | 10059 | 91 | 154 | 2.40 | 98.49 | 99.10 |
VERB | 10216 | 10208 | 11 | 5 | 0.16 | 99.95 | 99.89 |
TABLE IV.
Beat Detection Performance on MIMIC III Dataset
Beat types |
Method | TB | TP | FP | FN | Error (%) |
Se (%) |
P+ (%) |
---|---|---|---|---|---|---|---|---|
AF beats | BioSig | 9248 | 9019 | 17 | 229 | 2.66 | 97.52 | 99.81 |
VERB | 9248 | 9248 | 5 | 0 | 0.05 | 100 | 99.95 | |
Non-AF beats | BioSig | 8561 | 8131 | 10 | 430 | 5.14 | 94.98 | 99.88 |
VERB | 8561 | 8561 | 3 | 0 | 0.04 | 100 | 99.97 | |
Overall | BioSig | 17809 | 17150 | 27 | 659 | 3.85 | 96.30 | 99.84 |
VERB | 17809 | 17809 | 8 | 0 | 0.04 | 100 | 99.96 |
For the UMass dataset, 6 minutes of ECG signals from each subject were analyzed for the performance comparison In total, there were 5,438 AF beats and 4,778 non-AF beats (including NSR and PAC beats) from 22 subjects. Among those beats, VERB detected 5,430 AF and 4,778 non-AF beats correctly, with only 11 false positives and 5 false negative beats. The overall sensitivity, P+, and error rate are 99.95%, 99.89%, and 0.16%, respectively, which are better than the BioSig results.
For the MIMIC III dataset, the total beat number is 17,809 including 8,561 NSR beats and 9,248 AF beats. VERB achieved an impressive 100% sensitivity and 99.95% P+ value for the AF beats, while the sensitivity and P+ are 100% and 99.97%, respectively, for the NSR beats. As a result, the overall sensitivity and P+ value are 100% and 99.96%, which is better than the 96.30% and 99.84% obtained by the BioSig method. Clearly, the proposed VERB algorithm consistently achieved accurate peak detection not only for the widely used benchmark MITDB dataset, but also for two other datasets (UMass dataset and MIMIC III).
C. Performance on Saltwater ECG Data
From the salt-water ECG data collected from a Navy diver, 19 minutes of clean ECG signal (a total of 1,258 beats) were used to compare with the BioSig implementation. BioSig had a detection error rate of 5.52% while VERB resulted in 99.75% sensitivity, 99.75% P+ value and only 0.50% error rate. This indicates that the proposed peak detection algorithm remains accurate even for dry hydrophobic ECG electrode data.
Fig. 11(a) shows a representative preprocessed saltwater ECG segment, and Fig. 11(b) shows the VFCDM-reconstructed ECG along with the detected beats. It is evident from the figure that although the salt-water ECG signal fidelity is not as good as the dry condition, our proposed method maintains its accuracy in peak detection.
Fig. 11.
(a) Representative 10-sec salt-water ECG data (after preprocessing); (b) VFCDM reconstruction and the detected peaks.
V. Discussion
The proposed VERB algorithm achieved consistently accurate performance on all four datasets. For the MIT-BIH database, it had equal sensitivity when compared to [13], but the number of false positives was much lower. As a result, VERB had the lowest detection error rate (0.11%) compared to other reported methods. For some recordings, the second lead contained better ECG signal quality although the first lead was used to be consistent with other published methods. Selecting the best ECG lead can further improve the detection results.
When our method was applied to the UMass DB and MIMIC III dataset, similarly accurate performance was achieved. The peak correction criteria are kept consistent across these datasets, thus showing the effectiveness of the proposed method. The filter bank-based method implemented in BioSig was compared on both datasets. BioSig resulted in 813 false negatives across two datasets while VERB had only 5 false negatives, thus providing significantly lower error rate. Moreover, the proposed method yielded highly accurate detection results for both NSR and AF subjects.
For the salt water ECG data, the signal is from dry hydrophobic carbon electrodes instead of the traditional wet Ag-AgCl electrodes. As a result, the salt-water ECG data show some different characteristics. For this reason, during the VERB reconstruction step, the second and third components were used along with different thresholds to remove false peaks. However, the main procedural steps of VFCDM reconstruction and the peak comparison from both top and bottom sides remained the same.
VI. Conclusion
In this paper we have presented a novel ECG R-peak detection method which relies on variable frequency complex demodulation-based ECG signal reconstruction along with peak location detection based on adaptive criteria. We have applied the algorithm on several different datasets including salt-water ECG data, to test the accuracy of the proposed method. For all the varying conditions displayed by the datasets, the algorithm provided consistently accurate peak detection results. The accuracy of the proposed peak detection algorithm will ultimately lead to better arrhythmia detection, heart rate determination, and heart rate variability analysis. Atrial fibrillation, which affects more than 5 million Americans, requires continuous monitoring. Hence, accurate detection of R-peaks is required for any atrial fibrillation detection algorithm as they are based on looking for signatures of R-R interval irregularity.
Acknowledgment
This work was partially supported by NIH R01 HL136660.
Biography
Syed K. Bashar: Syed received the B.S. degree in electrical and electronic engineering from the Bangladesh University of Engineering and Technology. Currently he is a PhD student at the University of Connecticut, Storrs, CT.
Allan J. Walkey: Allan is currently assistant professor of medicine at Boston University. His research interests involve cardiac complication of critical illness, critical care epidemiology and comparative effectiveness research methodology.
David D. McManus: David is currently associate professor of medicine at the University of Massachusetts in Worcester, MA. His clinical interests involve arrhythmia ablation, brady and tachyarrhythmias and cardiac devices. I.
Ki H. Chon: Ki received the B.S. degree in electrical engineering from the University of Connecticut, Storrs; the M.S. degree in biomedical engineering from the University of Iowa, Iowa City; and the M.S. degree in electrical engineering and the Ph.D. degree in biomedical engineering from the University of Southern California, Los Angeles. He is currently the John and Donna Krenicki Chair Professor and Head of Biomedical Engineering at University of Connecticut, Storrs, CT.
He was an Associate Editor of the IEEE Transactions on Biomedical Engineering from 2007-2013. He has chaired many international conferences including his role as the Program Co-Chair for the IEEE EMBS conference in NYC in 2006, and as the Conference Chair for the 6th International Workshop on Biosignal Interpretation in New Haven, CT in 2009. He is a fellow of the American Institute of Medical and Biological Engineering and of the International Academy of Medical and Biological Engineering. He is a cofounder of Mobile Sense Technologies which is located in the TIP center in Farmington, CT. The company has recently been granted both NIH and NSF SBIR grants.
References
- [1].Zidelmal Z, Amirou A, Adnane M, and Belouchrani A, “QRS detection based on wavelet coefficients,” Comput. Methods Programs Biomed, vol. 107, no. 3, pp. 490–496, September 2012. [DOI] [PubMed] [Google Scholar]
- [2].Pan J and Tompkins WJ, “A Real-Time QRS Detection Algorithm,” IEEE Trans. Biomed. Eng, vol. BME-32, no. 3, pp. 230–236, March 1985. [DOI] [PubMed] [Google Scholar]
- [3].Arzeno NM, Deng Z, and Poon C, “Analysis of First-Derivative Based QRS Detection Algorithms,” IEEE Trans. Biomed. Eng, vol. 55, no. 2, pp. 478–484, February 2008. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [4].Mitra M and Mitra S, “A Software Based Approach for Detection of QRS Vector of ECG Signal,” in 3rd Kuala Lumpur International Conference on Biomedical Engineering 2006, Springer, Berlin, Heidelberg, 2007, pp. 348–351. [Google Scholar]
- [5].Choi S, Adnane M, Lee G-J, Jang H, Jiang Z, and Park H-K, “Development of ECG beat segmentation method by combining lowpass filter and irregular R–R interval checkup strategy,” Expert Syst. Appl, vol. 37, no. 7, pp. 5208–5218, July 2010. [Google Scholar]
- [6].Poli R, Cagnoni S, and Valli G, “Genetic design of optimum linear and nonlinear QRS detectors,” IEEE Trans. Biomed. Eng, vol. 42, no. 11, pp. 1137–1141, November 1995. [DOI] [PubMed] [Google Scholar]
- [7].Afonso VX, Tompkins WJ, Nguyen TQ, and Luo S, “ECG beat detection using filter banks,” IEEE Trans. Biomed. Eng, vol. 46, no. 2, pp. 192–202, February 1999. [DOI] [PubMed] [Google Scholar]
- [8].Xue Q, Hu YH, and Tompkins WJ, “Neural-network-based adaptive matched filtering for QRS detection,” IEEE Trans. Biomed. Eng, vol. 39, no. 4, pp. 317–329, April 1992. [DOI] [PubMed] [Google Scholar]
- [9].Martinez JP, Almeida R, Olmos S, Rocha AP, and Laguna P, “A wavelet-based ECG delineator: evaluation on standard databases,” IEEE Trans. Biomed. Eng, vol. 51, no. 4, pp. 570–581, April 2004. [DOI] [PubMed] [Google Scholar]
- [10].de Lannoy G, Frenay B, Verleysen M, and Delbeke J, “Supervised ECG Delineation Using the Wavelet Transform and Hidden Markov Models,” in 4th European Conference of the International Federation for Medical and Biological Engineering, Springer, Berlin, Heidelberg, 2009, pp. 22–25. [Google Scholar]
- [11].Li C, Zheng C, and Tai C, “Detection of ECG characteristic points using wavelet transforms,” IEEE Trans. Biomed. Eng, vol. 42, no. 1, pp. 21–28, January 1995. [DOI] [PubMed] [Google Scholar]
- [12].Merah M, Abdelmalik TA, and Larbi BH, “R-peaks detection based on stationary wavelet transform,” Comput. Methods Programs Biomed, vol. 121, no. 3, pp. 149–160, October 2015. [DOI] [PubMed] [Google Scholar]
- [13].Ghaffari A, Homaeinezhad MR, Khazraee M, and Daevaeiha MM, “Segmentation of Holter ECG Waves Via Analysis of a Discrete Wavelet-Derived Multiple Skewness–Kurtosis Based Metric,” Ann. Biomed. Eng, vol. 38, no. 4, pp. 1497–1510, April 2010. [DOI] [PubMed] [Google Scholar]
- [14].Phukpattaranont P, “QRS detection algorithm based on the quadratic filter,” Expert Syst. Appl, vol. 42, no. 11, pp. 4867–4877, July 2015. [Google Scholar]
- [15].Pal S and Mitra M, “Empirical mode decomposition based ECG enhancement and QRS detection,” Comput. Biol. Med, vol. 42, no. 1, pp. 83–92, January 2012. [DOI] [PubMed] [Google Scholar]
- [16].Zhu H and Dong J, “An R-peak detection method based on peaks of Shannon energy envelope,” Biomed. Signal Process. Control, vol. 8, no. 5, pp. 466–474, September 2013. [Google Scholar]
- [17].Ning X and Selesnick IW, “ECG Enhancement and QRS Detection Based on Sparse Derivatives,” Biomed. Signal Process. Control, vol. 8, no. 6, pp. 713–723, November 2013. [Google Scholar]
- [18].Arbateni K and Bennia A, “Sigmoidal radial basis function ANN for QRS complex detection,” Neurocomputing, vol. 145, pp. 438–450, December 2014. [Google Scholar]
- [19].Moody GB and Mark RG, “The impact of the MIT-BIH Arrhythmia Database,” IEEE Eng. Med. Biol. Mag, vol. 20, no. 3, pp. 45–50, June 2001. [DOI] [PubMed] [Google Scholar]
- [20].Goldberger AL et al. , “PhysioBank, PhysioToolkit, and PhysioNet?: Components of a New Research Resource for Complex Physiologic Signals,” Circulation, vol. 101, no. 23, pp. e215–e220, June 2000. [DOI] [PubMed] [Google Scholar]
- [21].Johnson AEW et al. , “MIMIC-III, a freely accessible critical care database,” Sci. Data, vol. 3, p. 160035, May 2016. [DOI] [PMC free article] [PubMed] [Google Scholar]
- [22].Noh Y et al. , “Novel Conductive Carbon Black and Polydimethlysiloxane ECG Electrode: A Comparison with Commercial Electrodes in Fresh, Chlorinated, and Salt Water,” Ann. Biomed. Eng, vol. 44, no. 8, pp. 2464–2479, August 2016. [DOI] [PubMed] [Google Scholar]
- [23].Reyes BA et al. , “Novel Electrodes for Underwater ECG Monitoring,” IEEE Trans. Biomed. Eng, vol. 61, no. 6, pp. 1863–1876, June 2014. [DOI] [PubMed] [Google Scholar]
- [24].Chon KH, Dash S, and Ju K, “Estimation of Respiratory Rate From Photoplethysmogram Data Using Time–Frequency Spectral Estimation,” IEEE Trans. Biomed. Eng, vol. 56, no. 8, pp. 2054–2063, August 2009. [DOI] [PubMed] [Google Scholar]
- [25].Bashar SK, Han D, Soni A, McManus DD, and Chon KH, “Developing a novel noise artifact detection algorithm for smartphone PPG signals: Preliminary results,” in 2018 IEEE EMBS International Conference on Biomedical Health Informatics (BHI), 2018, pp. 79–82. [Google Scholar]
- [26].Wang H, Siu K, Ju K, and Chon KH, “A High Resolution Approach to Estimating Time-Frequency Spectra and Their Amplitudes,” Ann. Biomed. Eng, vol. 34, no. 2, pp. 326–338, February 2006. [DOI] [PubMed] [Google Scholar]
- [27].Posada-Quintero HF, Florian JP, Orjuela-Cañón ÁD, and Chon KH, “Highly sensitive index of sympathetic activity based on time-frequency spectral analysis of electrodermal activity,” Am. J. Physiol.-Regul. Integr. Comp. Physiol, vol. 311, no. 3, pp. R582–R591, July 2016. [DOI] [PubMed] [Google Scholar]
- [28].“MathWorks - Makers of MATLAB and Simulink.” [Online]. Available: https://www.mathworks.com/. [Accessed: 18-Aug-2018].
- [29].Vidaurre C, Sander TH, and Schlögl A, “BioSig: The Free and Open Source Software Library for Biomedical Signal Processing,” Computational Intelligence and Neuroscience, 2011. [Online]. Available: https://www.hindawi.com/journals/cin/2011/935364/abs/. [Accessed: 18-Aug-2018]. [DOI] [PMC free article] [PubMed] [Google Scholar]