Next Article in Journal
Association between Leisure Screen Time and Junk Food Intake in a Nationwide Representative Sample of Spanish Children (1–14 Years): A Cross-Sectional Study
Next Article in Special Issue
Automatic Evaluation of Heart Condition According to the Sounds Emitted and Implementing Six Classification Methods
Previous Article in Journal
Impact of Sensitization of Family Caregivers upon Treatment Compliance among Geriatric Patients Suffering from Elder Abuse and Neglect
Previous Article in Special Issue
A Framework for AI-Assisted Detection of Patent Ductus Arteriosus from Neonatal Phonocardiogram
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

ECG Enhancement and R-Peak Detection Based on Window Variability

1
College of Computer Science and Engineering, Shandong University of Science and Technology, Qingdao 266590, China
2
Shandong Artificial Intelligence Institute, Qilu University of Technology (Shandong Academy of Sciences), Jinan 250014, China
*
Author to whom correspondence should be addressed.
Healthcare 2021, 9(2), 227; https://doi.org/10.3390/healthcare9020227
Submission received: 7 December 2020 / Revised: 1 February 2021 / Accepted: 10 February 2021 / Published: 18 February 2021

Abstract

:
In ECG applications, the correct recognition of R-peaks is extremely important for detecting abnormalities, such as arrhythmia and ventricular hypertrophy. In this work, a novel ECG enhancement and R-peak detection method based on window variability is presented, and abbreviated as SQRS. Firstly, the ECG signal corrupted by various high or low-frequency noises is denoised by moving-average filtering. Secondly, the window variance transform technique is used to enhance the QRS complex and suppress the other components in the ECG, such as P/T waves and noise. Finally, the signal, converted by window variance transform, is applied to generate the R-peaks candidates, and the decision rules, including amplitude and kurtosis adaptive thresholds, are applied to determine the R-peaks. A special squared window variance transform (SWVT) is proposed to measure the signal variability in a certain time window, and this technique reduces false detection rate caused by the various types of interference presented in ECG signals. For the MIT-BIH arrhythmia database, the sensitivity of R-peak detection can reach 99.6% using the proposed method.

1. Introduction

The electrocardiogram (ECG) is a random and unstable signal that records the electrical activity of the heart, and the ECG signals obtained in different environments and from individuals are significantly different. The P wave, QRS complex and T wave are the main components in the ECG waveform (see Figure 1) [1], and the accurate detection of them is important to ECG signal analysis. The QRS complex is the dominant feature of the ECG signal and its accurate detection is an important issue in many clinical conditions [2]; for example, the RR interval is used for heart rate measurement and diagnosis of several abnormalities—ventricular hypertrophy [3], conduction abnormalities [4], etc.
The detection of the QRS complex is the first step in all kinds of automatic feature extractions for ECG signals [5]. Unluckily, there are great challenges for automated detection because the morphologies and amplitudes of many normal QRS complexes are like the abnormal QRS complexes. The superimposed noise in the ECG signal makes this problem more severe. Furthermore, the P/T waves with higher amplitude can interfere with the detection of the QRS complex. Therefore, the first step of R-peak detection is signal denoising, and then the QRS complexes are enhanced and detected.
Many denoising methods [6,7,8,9,10,11,12,13] for ECG signals have been proposed, including digital filtering [14], morphological filtering [15,16] and decomposition-based denoising methods [13,17,18]. Among them, the digital filters are widely used to remove the noise of a certain frequency range because of their simplicity and efficiency; morphological filters [16] are often used to smooth the ECG signal, but the size and shape is hard to determine; decomposition-based denoising methods such as wavelet transform [16] and empirical mode decomposition (EMD) [17] methods decompose the signal into a series of modes and set some modes to 0 to remove noise. Thus, most of the noises can be well addressed by the methods mentioned above.
For QRS detection, most QRS detection methods [19,20,21,22,23] are researched based on the three steps—denoising, QRS complex enhancement and decision rule creation. The stages of QRS complex enhancement and decision rule creation are different and result better or worse results. In [24], the Pan-Tompkins algorithm was proposed for R-peak detection, which includes five steps, namely, band-pass filtering, derivation, squaring, moving-window integration and adjustment of thresholds. In [25], the wavelet transforms (WT) for detecting QRS complexes is proposed, in which the multiscale feature of WT is used to distinguish QRS complexs from P/T waves or noise. In [26], an EMD-based method for QRS detection was proposed; unlike the wavelet methods, the EMD methods have overcome their mode-mixing problem, having emerged as powerful time-frequency decomposition tools. However, the preprocesses of the above methods need to be carefully designed, and multiple nonlinear transform techniques are necessary to enhance the QRS complex.
In the proposed method, the noisy signal is first denoised by moving-average filtering, and it can be easily replaced by other denoising methods. In the stage of ECG enhancement, multiple methods were usually employed at the same time for the most studies; however, the proposed window variance transform technique is very effective for highlighting R-peaks and suppressing P/T waves and noise in the ECG signal, and all R-peaks candidates can be well identified. Even if additional techniques are added, the candidates will not be greatly improved. Hence, it is sufficient to use only window variance transform for signal enhancement. Furthermore, two adaptive thresholds related to amplitude and kurtosis are computed for recognizing the locations of R-waves. The experimental results demonstrate that the proposed QRS detection method can accurately locate the R-wave positions. The main contributions of this paper are as follows: (1) A novel QRS detection method is proposed to accurately locate the positions of the R-waves. (2) An efficient QRS-enhancement technique is designed.
This paper is organized as follows. In Section 2, we give a brief introduction of the proposed method. In Section 3, we show and discuss the experimental results of the proposed algorithm, in which the evaluation of algorithm is accomplished with the ECG data from the MIT/BIH arrhythmia database. Concluding remarks are given in Section 4.

2. Materials and Methods

2.1. Data

The MIT-BIH database [27] contains 48 ECG records; each record contains 30 min and was sampled at 360 Hz. There are two leads in each record and the first lead was used in the experiment. Locations of R-peaks have been annotated by two or more cardiologists independently for all records.

2.2. Overview of the Algorithms

The proposed method for R-peak detection is divided into three stages, including noise removal, ECG enhancement and decision rules. Those stages are illustrated in Figure 2. In the proposed method, the ECG enhancement stage plays the most critical role; it highlights the QRS complex and suppresses the other components in the ECG signal. A brief description of each stage in Figure 2 is presented in the following subsections.

2.2.1. Noise Removal

Since the signal is often corrupted by various noise—such as the high-frequency noise, baseline wander noise and artifacts—in this section, to maintain the original morphological features of the ECG signal, the moving average filtering is applied to smooth noise, and the formula of moving average filters can be described as follows:
y n = 1 M m = 1 M ( y n m )
where y i and y i represent the amplitudes of the ith sample in the original ECG signal and denoised signal, respectively; M represents the filter length, which is set to 5 samples.

2.2.2. ECG Enhancement

In this section, a novel ECG enhancement technique called window variance transform is proposed. The variance of an signal segment is used to highlight all R-peaks and suppress the other components. The proposed squared window variance transform (SWVT) is summarized as follows:
1.
Non-overlapping window
Local peaks P = [ p 1 , p 2 , , p N ] are first detected using the denoised signal. Then, P is applied to generate an non-overlapping window N, W P = [ w p 1 , w p 2 , , w p N ] , and the ith window is determined by using w p i = [ p i w / 2 , p i + w / 2 ] , where w is the window size. To avoid including multiple waveforms in one window, the minimum width of wave T is used as a reference to set the range of w from 40 to 60 ms. Next, for the non-peak samples between two peaks, they are divided into M non-overlapping windows: W N P = [ w n p 1 , w n p 2 , , w n p M ] ; the window size is 2 w . Finally, the W P and W N P are merged to generate the N + M non-overlapping windows W = [ w 1 , w 2 , , w N + M ] .
2.
Window variance transform
To detect the R-peaks, the window variance transform is used to enhance the QRS complexes; that is, the denoised signal is transformed to the W V T = [ v i , v 2 , , v N + M ] , in which
v j = 1 l j t = 0 l j ( y t μ j ) 2
where j = [ 1 , 2 , , N + M ] are the indexes of windows; l j is the number of samples in jth window; μ j is the amplitude mean of the jth window samples.
3.
Squaring
To further enhance the QRS complexes, the squaring operator is applied in the W V T , that is, the squared window variance transform (SWVT) is described as follows:
S W V T = [ v 1 2 , v 2 2 , , v N + M 2 ]
As shown in Figure 3 and Figure 4, the result of SWVT significantly suppressed the effect of the P/T wave and enhanced the QRS complex. From Figure 4, it can be seen that SWVT is also beneficial for the an ECG signal with inverse R peaks. Thus, the proposed QRS complex enhancement technique is reasonable for R-peak detection.

2.2.3. R-Peak Detection

Due to R-peaks being different from other waveforms in terms of morphology and amplitude, most existing detection methods use amplitude thresholds for R-peak detection, which is less robust to noisy signals. However, QRS complexes usually have significant differences in amplitude and kurtosis compared with those of the other waveforms in ECG signals; thus, the amplitude and kurtosis thresholds are applied for R-peak detection. The detailed achievement is described as follows:
1.
Generation of the R-peaks candidate set
The transformed signal S W V T not only highlights the R-waves but also suppresses the P/T waves, and the screening of the R-peaks candidate set can be completed by setting the amplitude threshold. Considering that the R-peaks which are disturbed by noise may have lower amplitudes during the transformation, the 90th percentile of S W V T and the mean of S W V T are applied to balance the amplitude threshold T c ; that is,
T c = 0.5 ( 0.75 p e r ( S W V T , 90 ) + 0.25 μ S W V T )
where p e r ( S W V T , 90 ) and μ S W V T = 1 N + M t = 0 N + M S W V T t are the 90th percentile value and the mean value of S W V T , respectively; T c denotes the positive threshold determining the transformed amplitude of candidate selection.
Then the amplitude threshold T c is used for the extraction of R-peak candidates set S c :
S c = { w j | v j > T c , j = 1 , 2 , 3 , , N + M }
2.
Generation of the R-peaks with decision rules
(1) Adjusting the RR interval: the RR interval is another important feature of R-peaks. In this study, the RR interval is determined by two RR interval averages. One is the average of the eight most-recent beats R R r e c e n t ; the other is the average of the detected R-peaks, R R a l l —that is,
R R = 0.75 R R r e c e n t + 0.25 R R a l l
For the first RR interval, the lower limit of the RR interval and the higher limit of the RR interval are set to 200 and 360 ms, respectively. However, for irregular heart rates, if an R peak is not found during the interval specified by the 1.66 R R , a search-back technique is necessary to look back in time for the R peak.
(2) Adjusting the thresholds: To better detect the R-peaks, the amplitude and kurtosis thresholds T a and T k are automatically adjusted to float over R-peak candidate points and detected R-peaks.
T a = 0.75 ( α P E R A c + ( 1 α ) M E A N A R )
T k = 0.75 ( α P E R K c + ( 1 α ) M E A N K R )
where P E R A c and P E R K c are the 90th percentile values of the amplitude and kurtosis in the candidate set S c , respectively. Similarly, M E A N A R and M E A N K R are mean values of the amplitude and kurtosis in the peak set S R , respectively. α is a hyperparameter, and it is used to control the weight of R-wave amplitude and kurtosis for adjusting thresholds.
For irregular heart rates, the lower T a and T k are needed for back searching for missing R-peaks; hence, two thresholds are reduced by half to avoid missing beats:
T a 0.5 T a
T k 0.5 T k
(3) Generation of the R-peaks: according to the thresholds aforementioned, we designed some decision rules to generate the R peaks S R . For each of the peak in S c , if an RR interval is between 0.92 R R and 1.16 R R , a judgment is made to determine whether the current peak is the R peak; the decision rules can be described as follows:
S R = { S C l | y C l > T a and k C l > T k l = 1 , 2 , , L }
0.92 R R < S C l S R l a s t < 1.16 R R
where C l and y C l represent the l t h candidate peak and the amplitude of the l t h candidate peak; k C l is the kurtosis of the l t h candidate peak; S R l a s t refers to the position of the last R-peak in the current R-peaks set.

3. Results

3.1. Metrics for Performance Evaluation

In this study, three metrics were used to evaluate the performance of R-peak detection in the simulation experiment, sensitivity (SEN), positive predicative value (PPV) and cumulative statistical index (CSI) [28], which are described as follows.
SEN = TP TP + FN 100
PPV = TP TP + FP 100
CSI = 1 2 ( SEN + PPV FPR FNR ) 100
F d = FP + FN TP + FN + FP
where T P , F N and F P represent true positive (correctly identified R peak), false negative (missing R peak) and false positive (wrongly identified R peak), respectively. FPR is the false positive rate F P / ( F P + T P ) and FNR is the false negative rate F N / ( F N + T P ) . F d was employed to measure the detection error rate. Larger SEN, PPV and CSI values mean better detection performance; meanwhile, a lower F d is expected.

3.2. Experimental Data and Environment

In the experiment, 30 ECG records from the MIT-BIH arrhythmia database were adopted to evaluate the effectiveness of the proposed R-peak detection method. The length of all signals was 30 min. The classic PT [24], XQRS [29] and RSlope [30] methods are introduced for comparison. These methods were implemented with Python and Matlab, and the parameters were set according to the original papers. All experimental results were performed on Linux x86_64, Matlab: version R2018b and Python: version 3.7.6.

3.3. Detailed Accuracy of the MIT-BIH Database

In the first experiment, the R-peak detection results were derived with the proposed method when applied to all 30 ECG signals from MIT-BIH dataset. In Table 1, the TP, FP, FN, SEN, PPV and CSI of each record are listed. From Table 1, we find that both SEN and PPV still show very high accuracy for most of the records. The proposed method did not perform well in several records (114, 207, 208, 214, 228, 232), for which the SEN or PPV were lower than 99%. In addition, the CSI values for most records were lower than 98%, because some records showed higher FP and FN.

3.4. Accuracy Evaluation and Comparison

In the second experiment, the overall performance of the proposed method on MIT-BIH database is shown in Table 2, which also contains three comparison results. In this paper, the detected locations of R-peaks are very close to the reference locations, and some R-peaks were shifted by less than 75 ms compared with the reference R peaks. It can be seen from Table 2 that 99.03% of total beats can be detected correctly by the proposed method; SEN and PPV were 99.65% and 99.39%, respectively. Moreover, the CSI of the proposed method was higher than 99%—better than those of the methods used for comparison.
Table 3 was drawn based on Table 2, which shows the FP and FN comparison results among the four methods. In Table 3, the proposed method shows the least detection errors among the four methods. It is worth noticing that there is a discrepancy between the accuracy reported here and those reported in other methods [5,31]. This is possibly because the different tolerances for counting a detection as a TP are set. In this study, the tolerance is set to ±75 ms of the annotation. In a total of 88,699 beats, there were 482 and 335 beats detected as FP and FN, respectively. Furthermore, the proposed method achieved the minimum detection error of 0.92%. As the proposed method effectively suppressed the P/T wave and noise in the stage of R-peak enhancement, the proposed method significantly reduced the number of FN. Therefore, it is seen that the proposed method has better detection than the other methods.

3.5. Visual Display of R-Peak Detection Results

Figure 5 presents an ECG segment with an obvious waveform distortion caused by large baseline wander, and the R-peak detection results produced by different methods. Compared with the reference labels, there are several obvious errors for PT, XQRS and Rslope methods, which are marked by red rectangles and Xs. However, our method can deal with this case very well. In other words, the proposed method effectively suppressed the noise. Then, R-peak detection results were more carefully analyzed using record 208. Figure 6 shows the original ECG signal from 15 to 30 s and the R-peaks locations detected by different detectors. The proposed method can accurately detect the locations of all R-peaks; however, the XQRS and R slope showed some missing R-peaks. This phenomenon may be caused by irregular beats. Furthermore, XQRS demonstrates the worst performance for the wide ectopic beats.

4. Discussion

In this study, the performance of the proposed R-peak detection method was tested on MIT-BIH database. Based on the results presented in Table 2, all these methods have excellent R-peak detection capacity with sensitivity rates higher than 99%. That is, most existing methods for R-peak detection have shown excellent performance. However, the three stages for R-peak detection, including preprocessing, enhancement and decision rules, are very different. This paper provided a novel QRS-enhancement R-peak detection method. Next, we analyzed the impacts of key steps and parameters on the experimental results.

4.1. ECG Enhancement

As shown in Table 4, the proposed method is easy to perform and does not need complex mathematical calculations compared with the other methods, especially for the stage of enhancement of QRS complexes. For instance, the proposed work only needs one to perform a simple window variance transform to achieve QRS complex enhancement and obtain better detection performance.

4.2. The Effect of Using a Kurtosis Threshold

Figure 7 illustrates the distribution comparison between the QRS complexes and other ECG waveforms, in which QRS, P and T waves were extracted from the QT Database [32], and the number of each wave is 100. In Figure 7, the amplitude and kurtosis distributions of the main waveforms in ECG signal are plotted; it can be seen that there is are significant differences between the QRS complex and P/T wave in amplitude and kurtosis values. In statistics, a higher kurtosis means that the increase in variance is caused by extreme differences in low frequencies that are greater or less than the average.
Next, we analyzed the impacts of key steps and parameters on the experimental results. It is well known that most of R-peak detection methods only depend on amplitude thresholds to identify R-peaks, and some mistakes may occur for unobvious R-waves shape. Thus, in this study, two statistical thresholds were used for R-peak identification. In Table 5, we list the performance of using kurtosis threshold on detection results. As shown in Table 5, compared with the performance without using a kurtosis threshold, the proposed method can get fewer FN and more TP, and the improvements to SEN and CSI are 1.21% and 1.08%, respectively. Hence, the kurtosis threshold plays a vital role in R-peak identification, and there is a significant decrease in FN because R-peak features were deeply extracted. As a result, higher CSI and SEN were obtained.
Some of the signals are affected by stretches of noise, baseline wander and artifacts. For example, 222 has some non-QRS waves with highly unusual morphologies (may lead to false positives); 208 has an irregular RR interval (may lead to missing R-peaks). In Figure 5 and Figure 6, the R-peak detection results are shown; the proposed method can achieve annotations the same as the references. However, for the comparison methods, obvious FP and FN occurred. This was due to improper threshold setting or improper noise processing during QRS complex enhancement. However, the proposed method can deal with this case by introducing the simple window variance transform and decision rules. That is, the two thresholds, including amplitude and kurtosis, can distinguish between R-peaks and non-R peaks which are similar to the R-peaks in morphology and amplitude.

4.3. Selection of the Weight

In this work, the performance of the proposed method was influenced by the amplitude and kurtosis thresholds; that is, the superparameter α in Equations (7) and (8) had a large effect on experimental results. The α is a superparameter which represents the weight of R-peaks amplitude or kurtosis. In Figure 8, we plot the R-peak detection performance of the proposed method with different α values. In Equations (7) and (8), larger α means lower thresholds and more FP, which results in lower PPV. On the contrary, smaller α means higher thresholds and can lead to more FN and lower SEN. From 8, we can see that α = 0.5 achieved the best CSI; meanwhile, better SEN and PPV were obtained.
However, there are still some limitations to the present study. A signal with unusual morphologies may cause bad performance by the proposed method. The reason is that the R-peak detection result is more relative to the approativate adaptive thresholds, but the amplitude and kurtosis values of the unusual R-peaks are irregular. In addition, the adaptive thresholds depend on the window size, and the selection of window size is another challenge. However, the fixed window may not include all samples in a wave with severe waveform variations, and the results of R-peaks based on window variance transform may not be satisfying. Those limitations have to be solved for future research. Furthermore, we will also consider using other non-curated datasets, such as the NST dataset, and ambulatory ECG dataset obtained by wearable devices, to observe and analyze the preprocessing performance of the proposed method for noisy signals.

5. Conclusions

In this paper, a simple and reliable ECG enhancement and R-peaks detection method was proposed, which is easy to perform and does not need complex mathematical calculations. The proposed method for R-peak determination is very robust for signals with larger amplitudes or P/T waves. The sensitivity of detecting R-peaks in the MIT-BIH database using the proposed method can reach 99.65%, which is much better than the most of the existing R-peak detection methods. The experimental results and analysis demonstrate that the proposed R-wave enhancement technique and the decision rules, including amplitude and kurtosis factors, are useful for the recognition of R-peaks. It can be conclude that the proposed method is suitable and reliable for ECG R-peak detection.

Author Contributions

Conceptualization, L.W. and X.X.; methodology, L.W.; validation, L.W. and X.X.; formal analysis, Y.W., X.X. and L.W.; investigation, L.W.; resources, Y.W. and L.W.; writing—original draft preparation, L.W.; writing—review and editing, X.X. and Y.W.; supervision, Y.W. and X.X.; project administration, Y.W.; funding acquisition, Y.W. and X.X. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

All investigations were conducted according to the principles outlined in the Declaration of Helsinki.

Informed Consent Statement

Written informed consent was obtained from all participants before inclusion in the study.

Data Availability Statement

All of the relevant data are presented within the manuscript. All data is public.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Prasad, A.K.; Mishra, V.; Garg, R.K. Electrocardiogram-QRS Point Detection Using Discrete Wavelet Transform. J. Med. Imaging Health Inform. 2012, 2, 206–210. [Google Scholar] [CrossRef]
  2. Xiang, Y.; Lin, Z.; Meng, J. Automatic QRS Complex Detection Using Two-Level Convolutional Neural Network. Biomed. Eng. 2018, 17, 13. [Google Scholar] [CrossRef] [Green Version]
  3. Bacharova, L.; Szathmary, V.; Svehlikova, J.; Mateasik, A.; Tysler, M. QRS Complex Waveform Indicators of Ventricular Activation Slowing: Simulation Studies. J. Electrocardiol. 2016, 49, 790–793. [Google Scholar] [CrossRef]
  4. Wieslander, B.; Nijveldt, R.; Klem, I.; Lokhnygina, Y.; Pura, J.; Wagner, G.S.; Ugander, M.; Atwater, B.D. Evaluation of Selvester QRS Score for Use in Presence of Conduction Abnormalities in a Broad Population. Am. Heart J. 2015, 170, 346–352. [Google Scholar] [CrossRef] [PubMed]
  5. Zidelmal, Z.; Amirou, A.; Adnane, M.; Belouchrani, A. QRS Detection Based on Wavelet Coefficients. Comput. Methods Programs Biomed. 2012, 107, 490–496. [Google Scholar] [CrossRef]
  6. Hong, Y.; Lian, Y. A Memristor-Based Continuous-Time Digital FIR Filter for Biomedical Signal Processing. IEEE Trans. Circuits Syst. I Regul. Pap. 2015, 62, 1392–1401. [Google Scholar] [CrossRef]
  7. Ott, G.; Costa, E.A.C.; Almeida, S.J.M.; Fonseca, M.B. IIR Filter Architectures with Truncation Error Feedback for ECG Signal Processing. Circuits Syst. Signal Process. 2019, 38, 329–355. [Google Scholar] [CrossRef]
  8. Blanco-Velasco, M.; Weng, B.; Barner, K.E. ECG Signal Denoising and Baseline Wander Correction Based on the Empirical Mode Decomposition. Comput. Biol. Med. 2008, 38, 1–13. [Google Scholar] [CrossRef] [PubMed]
  9. Hu, X.; Xiao, Z.; Zhang, N. Removal of Baseline Wander from ECG Signal Based on a Statistical Weighted Moving Average Filter. J. Zhejiang Univ. Sci. C 2011, 12, 397–403. [Google Scholar] [CrossRef]
  10. Salih, S.K.; Aljunid, S.A.; Aljunid, S.M.; Maskon, O. Adaptive Filtering Approach for Denoising Electrocardiogram Signal Using Moving Average Filter. J. Med. Imaging Health Inform. 2015, 5, 1065–1069. [Google Scholar] [CrossRef]
  11. Lynn, P.A. Online Digital Filters for Biological Signals: Some Fast Designs for a Small Computer. Med. Biol. Eng. Comput. 1977, 15, 534–540. [Google Scholar] [CrossRef]
  12. Xin, Y.; Chen, Y.; Hao, W.T. Ecg Baseline Wander Correction Based on Mean-Median Filter and Empirical Mode Decomposition. Biomed. Mater. Eng. 2014, 24, 365–371. [Google Scholar] [CrossRef]
  13. Awal, M.A.; Mostafa, S.S.; Ahmad, M.; Rashid, M.A. An Adaptive Level Dependent Wavelet Thresholding for ECG Denoising. Biocybern. Biomed. Eng. 2014, 34, 238–249. [Google Scholar] [CrossRef]
  14. Lu, G.; Brittain, J.S.; Holland, P.; Yianni, J.; Green, A.L.; Stein, J.F.; Aziz, T.Z.; Wang, S. Removing ECG Noise from Surface EMG Signals Using Adaptive Filtering. Neurosci. Lett. 2009, 462, 14–19. [Google Scholar] [CrossRef] [PubMed]
  15. An-dong, W.; Lan, L.; Qin, W. An Adaptive Morphologic Filter Applied to ECG De-Noising and Extraction of R Peak at Real-Time. AASRI Procedia 2012, 1, 474–479. [Google Scholar] [CrossRef]
  16. Wan, X.; Wu, H.; Qiao, F.; Li, F.; Li, Y.; Yan, Y.; Wei, J. Electrocardiogram Baseline Wander Suppression Based on the Combination of Morphological and Wavelet Transformation Based Filtering. Comput. Math. Methods Med. 2019, 2019, 1–7. [Google Scholar] [CrossRef] [PubMed]
  17. Boudraa, A.O.; Cexus, J.C.; Saidi, Z. EMD-Based Signal Noise Reduction. Signal Process. 2005, 1. Available online: https://www.researchgate.net/publication/228999069_EMD-Based_Signal_Noise_Reduction (accessed on 17 February 2021).
  18. Kabir, M.A.; Shahnaz, C. Denoising of ECG Signals Based on Noise Reduction Algorithms in EMD and Wavelet Domains. Biomed. Signal Process. Control 2012, 7, 481–489. [Google Scholar] [CrossRef]
  19. Hashim, F.; Adnan, J.; Daud, N.G.N.; Mokhtar, A.; Rashidi, A.; Rizman, Z. Electrocardiogram Noise Cancellation Using Wavelet Transform. J. Fundam. Appl. Sci. 2017, 9, 131. [Google Scholar] [CrossRef] [Green Version]
  20. Arrais Junior, E.; de Medeiros Valentim, R.A.; Bezerra Brandao, G. Real Time QRS Detection Based on Redundant Discrete Wavelet Transform. IEEE Lat. Am. Trans. 2016, 14, 1662–1668. [Google Scholar] [CrossRef]
  21. Chen, H.; Chen, S. A Moving Average Based Filtering System with Its Application to Real-Time QRS Detection. In Computers in Cardiology; IEEE: Piscataway, NJ, USA, 2003; pp. 585–588. [Google Scholar]
  22. Burguera, A. Fast QRS Detection and ECG Compression Based on Signal Structural Analysis. IEEE J. Biomed. Health Inform. 2018, 23, 123–131. [Google Scholar] [CrossRef] [PubMed]
  23. Mehta, S.S.; Lingyat, N.S. SVM-Based Algorithm for Recognition of QRS Complexes in Electrocardiogram. Irbm 2008, 29, 310–317. [Google Scholar] [CrossRef]
  24. Pan, J.; Tompkins, W.J. A Real-Time QRS Detection Algorithm. IEEE Trans. Biomed. Eng. 1985, BME-32, 230–236. [Google Scholar] [CrossRef] [PubMed]
  25. Li, C.; Zheng, C.; Tai, C. Detection of ECG Characteristic Points Using Wavelet Transforms. IEEE Trans. Biomed. Eng. 1995, 42, 21–28. [Google Scholar] [PubMed]
  26. Pal, S.; Mitra, M. Empirical Mode Decomposition Based ECG Enhancement and QRS Detection. Comput. Biol. Med. 2012, 42, 83–92. [Google Scholar] [CrossRef] [PubMed]
  27. Moody, G.; Mark, R. The Impact of the MIT-BIH Arrhythmia Database. IEEE Eng. Med. Biol. Mag. 2001, 20, 45–50. [Google Scholar] [CrossRef]
  28. Romagnoli, S.; Sbrollini, A.; Burattini, L.; Marcantoni, I.; Morettini, M.; Burattini, L. Digital Cardiotocography: What Is the Optimal Sampling Frequency? Biomed. Signal Process. Control 2019, 51, 210–215. [Google Scholar] [CrossRef]
  29. Moody, G.B. WFDB Applications Guide. Available online: https://www.physionet.org/physiotools/wag/ (accessed on 8 March 2019).
  30. Gieraltowski, J.; Ciuchcinski, K.; Grzegorczyk, I.; Kosna, K.; Solinski, M.; Podziemski, P. RS Slope Detection Algorithm for Extraction of Heart Rate from Noisy, Multimodal Recordings. Physiol. Meas. 2015, 36, 1743–1761. [Google Scholar] [CrossRef] [PubMed]
  31. Yeh, Y.C.; Wang, W.J. QRS Complexes Detection for ECG Signal: The Difference Operation Method. Comput. Methods Programs Biomed. 2008, 9, 245–254. [Google Scholar] [CrossRef]
  32. Laguna, P.; Mark, R.; Goldberg, A.; Moody, G. A Database for Evaluation of Algorithms for Measurement of QT and Other Waveform Intervals in the ECG. In Computers in Cardiology; IEEE: Piscataway, NJ, USA, 1997; pp. 673–676. [Google Scholar]
Figure 1. The main waveform in an ECG signal. P wave—Indicates atrial depolarization, or contraction of the atrium; QRS complex—Indicates ventricular depolarization, or contraction of the ventricles; T wave—Indicates ventricular repolarization.
Figure 1. The main waveform in an ECG signal. P wave—Indicates atrial depolarization, or contraction of the atrium; QRS complex—Indicates ventricular depolarization, or contraction of the ventricles; T wave—Indicates ventricular repolarization.
Healthcare 09 00227 g001
Figure 2. Flowchart of the proposed method. WVT—window variance transform signal.
Figure 2. Flowchart of the proposed method. WVT—window variance transform signal.
Healthcare 09 00227 g002
Figure 3. Comparison of original signal and the transformed signals, (a) Original signal of 104 from MIT-BIH database. (b) WVT—window variance transform signal. (c) SWVT—squared window variance transform signal.
Figure 3. Comparison of original signal and the transformed signals, (a) Original signal of 104 from MIT-BIH database. (b) WVT—window variance transform signal. (c) SWVT—squared window variance transform signal.
Healthcare 09 00227 g003
Figure 4. Comparison of original signal and the transformed signals, (a) Original signal of 207 from MIT-BIH database. (b) WVT—window variance transform signal. (c) SWVT—squared window variance transform signal.
Figure 4. Comparison of original signal and the transformed signals, (a) Original signal of 207 from MIT-BIH database. (b) WVT—window variance transform signal. (c) SWVT—squared window variance transform signal.
Healthcare 09 00227 g004
Figure 5. The R-peak detection results of 101 for different detectors on MIT-BIH database (a red X represents the wrongly identified R peak; a red rectangle is the missing R peak). TP—true positive (correctly identified R peak); FN—false negative (missing R peak); FP—false positive (wrongly identified R peak); SEN—sensitivity; PPV—positive predicative value; CSI—cumulative statistical index.
Figure 5. The R-peak detection results of 101 for different detectors on MIT-BIH database (a red X represents the wrongly identified R peak; a red rectangle is the missing R peak). TP—true positive (correctly identified R peak); FN—false negative (missing R peak); FP—false positive (wrongly identified R peak); SEN—sensitivity; PPV—positive predicative value; CSI—cumulative statistical index.
Healthcare 09 00227 g005
Figure 6. The R-peak detection results of 208 record for different detectors (a red rectangle is the missing R-peak). TP—true positive (correctly identified R peak); FN—false negative (missing R peak); FP—false positive (wrongly identified R peak); SEN—sensitivity; PPV—positive predicative value; CSI—cumulative statistical index.
Figure 6. The R-peak detection results of 208 record for different detectors (a red rectangle is the missing R-peak). TP—true positive (correctly identified R peak); FN—false negative (missing R peak); FP—false positive (wrongly identified R peak); SEN—sensitivity; PPV—positive predicative value; CSI—cumulative statistical index.
Healthcare 09 00227 g006
Figure 7. The comparison of QRS complexs distributions with P/T waves. All waves were extracted from the qtdb dataset: (a) amplitude; (b) kurtosis.
Figure 7. The comparison of QRS complexs distributions with P/T waves. All waves were extracted from the qtdb dataset: (a) amplitude; (b) kurtosis.
Healthcare 09 00227 g007
Figure 8. The performance with different α for SEN (sensitivity), PPV (positive predicative value) and CSI (cumulative statistical index). P wave—Indicates atrial depolarization, or contraction of the atrium; QRS complex—Indicates ventricular depolarization, or contraction of the ventricles; T wave—Indicates ventricular repolarization.
Figure 8. The performance with different α for SEN (sensitivity), PPV (positive predicative value) and CSI (cumulative statistical index). P wave—Indicates atrial depolarization, or contraction of the atrium; QRS complex—Indicates ventricular depolarization, or contraction of the ventricles; T wave—Indicates ventricular repolarization.
Healthcare 09 00227 g008
Table 1. Results of evaluation of proposed method on MIT-BIH database.
Table 1. Results of evaluation of proposed method on MIT-BIH database.
RecordTPFPFNSEN (%)PPV (%)CSI (%)
10022731010099.9699.96
10118633299.8999.8499.73
1022174131399.4199.4198.81
103208400100100100
10721285999.5899.7799.34
112253900100100100
113179500100100100
1141875118499.7994.0893.87
115195300100100100
116238512798.8899.9698.84
117153500100100100
118227800100100100
11919871010099.9599.95
12118594499.7999.7999.57
12224751199.9699.9699.92
123151800100100100
12416172299.8899.8899.75
20025981399.8899.9699.85
2022114182298.9799.1698.13
205263901799.3610099.36
20718421331899.0393.2792.30
208289356297.9099.8397.73
209300500100100100
210260724398.3899.9298.30
212274800100100100
21332435899.7599.8599.60
2142247371599.3498.3897.72
21533572699.8299.9499.76
2172190221899.1899.0198.19
21921481699.7299.9599.67
220204800100100100
22124194899.6799.8399.51
222246302099.19100.0099.19
2282034291999.0798.5997.67
230225600100100100
231157100100100100
232177969199.9496.2796.21
23330725799.7799.8499.61
234275300100100100
Total88,36448233599.6599.3999.03
TP—true positive (correctly identified R peak); FN—false negative (missing R peak); FP—false positive (wrongly identified R peak); SEN—sensitivity; PPV—positive predicative value; CSI—cumulative statistical index.
Table 2. Comparison of R-peak detection performance with some classic methods.
Table 2. Comparison of R-peak detection performance with some classic methods.
MethodSENPPVCSI
PT99.0499.3898.49
RSlope99.2398.5897.83
XQRS99.1999.2198.41
SQRS99.6599.3999.04
Note: SEN = Sensitivity, PPV = positive predicative value, CSI = cumulative statistical index.
Table 3. The detection error accuracy comparison results among the four methods.
Table 3. The detection error accuracy comparison results among the four methods.
MethodTotalFPFN F d
PT88,699512 (0.58%)754 (0.85%)1.43%
RSlope88,6991198 (1.35%)721 (0.81%)2.16%
XQRS88,699715 (0.81%)807 (0.91%)1.72%
SQRS88,699482 (0.54%)335 (0.38%)0.92%
Note: FP = correctly identified R-peaks, FN = missing R-peaks, Fd = error rate.
Table 4. The enhancement stages among the four methods.
Table 4. The enhancement stages among the four methods.
MethodPreprocessingEnhancement
PTbandpassDerivative Squaring Moving-window integration
XQRSbandpassMoving-window integration
RSlopedetrending lowpassSeparate heart beat detection Quality assessment
SQRSmoving-averagewindow variance transform
PT is a real-time QRS detection algorithm. XQRS is a QRS detection algorithm in WFDB application guide. Rslope is a QRS detection algorithm proposed by Gieraltowski et al. in 2015. SQRS is the proposed method.
Table 5. The performance of the proposed method using a kurtosis threshold.
Table 5. The performance of the proposed method using a kurtosis threshold.
Using KurtosisTPFPFNSENPPVCSI
No87,190374150998.4499.5297.96
Yes88,36448233599.6599.3999.04
TP is correctly identified R-peaks, FP is wrongly identified R-peaks and FN is missing R-peaks. SEN is sensitivity, PPV is positive predicative value and CSI is cumulative statistical index.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wu, L.; Xie, X.; Wang, Y. ECG Enhancement and R-Peak Detection Based on Window Variability. Healthcare 2021, 9, 227. https://doi.org/10.3390/healthcare9020227

AMA Style

Wu L, Xie X, Wang Y. ECG Enhancement and R-Peak Detection Based on Window Variability. Healthcare. 2021; 9(2):227. https://doi.org/10.3390/healthcare9020227

Chicago/Turabian Style

Wu, Lu, Xiaoyun Xie, and Yinglong Wang. 2021. "ECG Enhancement and R-Peak Detection Based on Window Variability" Healthcare 9, no. 2: 227. https://doi.org/10.3390/healthcare9020227

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