- Journal List
- J Med Signals Sens
- v.1(2); May-Aug 2011
- PMC3342622
As a library, NLM provides access to scientific literature. Inclusion in an NLM database does not imply endorsement of, or agreement with, the contents by NLM or the National Institutes of Health.
Learn more: PMC Disclaimer | PMC Copyright Notice
J Med Signals Sens. 2011 May-Aug; 1(2): 91–98.
PMCID: PMC3342622
PMID: 22606663
Hossein Rabbani, M. Parsa Mahjoob,1 E. Farahabadi, and A. Farahabadi
Author information Copyright and License information PMC Disclaimer
Abstract
Electrocardiogram (ECG) is one of the most common biological signals which play a significant role in the diagnosis of heart diseases. One of the most important parts of ECG signal processing is interpretation of QRS complex and obtaining its characteristics. R wave is one of the most important sections of this complex, which has an essential role in diagnosis of heart rhythm irregularities and also in determining heart rate variability (HRV). This paper employs Hilbert and wavelet transforms as well as adaptive thresholding method to investigate an optimal combination of these signal processing techniques for the detection of R peak. In the experimental sections of this paper, the proposed algorithms are evaluated using both ECG signals from MIT-BIH database and synthetic data simulated in MATLAB environment with different arrhythmias, artifacts, and noise levels. Finally, by using wavelet and Hilbert transforms as well as by employing adaptive thresholding technique, an optimal combinational method for R peak detection namely WHAT is obtained that outperforms other techniques quantitatively and qualitatively.
Keywords: Adaptive thresholding, electrocardiogram, Hilbert transform, QRS complex, R peak, wavelet transform
INTRODUCTION
The electrocardiogram (ECG) signal is one of the most important and well known biological signals used for diagnosing people's health. Detection of QRS complex is one of the most important parts carried out in the ECG signal analysis. QRS detection, especially detection of R wave in heart signal, is easier than other portions of ECG signal due to its structural form and high amplitude.
Till now, various methods have been reported by researchers for detection of QRS complex[1–4] such as differentiation methods,[5] digital filters,[6–10] neural networks,[11–13] filter banks,[14,15] hidden Markov models,[16,17] genetic algorithm,[18] and maximum a posterior (MAP) estimator.[19,20] Balda[21,22] used differentiator operator for detection of QRS complex; later this method was developed by Ahlstrom and Tompkins.[23] Friesen[24] and Tompkins[25] also investigated similar methods based on the sensitivity of QRS complex to noise. Using ordinary filters is another class of methods used for this purpose, but its high sensitivity to noise and its incompatibility with frequency of input disorders cause errors in the output of relative function.[21] In fact, most of the presented methods have a fundamental problem known as sensitivity to noise. Although, wavelet filters[26] can be proposed for solving this problem, however, the problem of sensitivity to noise doesn’t solve in these systems completely.[15] In this paper, we try to decrease the sensitivity to noise by selecting an optimal combination among offered techniques.
In addition to the proposed methods, experimental techniques and averaging in signal decomposition[27,28] using partial derivatives and wavelet transforms[29,30] and also methods based on neural networks[2,31] have been proposed for the detection of QRS complex and R wave. Methods based on experimental techniques or differentiation usually have high sensitivity to noise and methods based on neural networks are less used because of complication of their designing and learning.
In another group of methods, Hilbert transform,[32–34] which has the ability to distinguish between dominant peaks in signal among other peaks, is able to improve the results of detection of R wave. However, these methods may be failed in ischemic cases and low-amplitude R wave diseases.
Generally, for detection of R wave in ECG signal, a thresholding method is needed. In[35] Xu and Li have shown that using adaptive thresholding for automatic determining of threshold provides suitable results for the detection of R wave peak. After detection of R wave, the Q and S waves can be found (for this work after detection of R wave, 160 msec before and 240 msec after this wave called Q and S waves).
This paper tries to benefit from the advantages of Hilbert and wavelet transforms as well as adaptive thresholding technique in order to approach an optimum combinational method for R peak detection.
The paper is organized as four sections. In section two, after a brief review on application of Hilbert transform, wavelet transform, and adaptive thresholding for QRS complex and R wave detection, the proposed methods in this paper based on various combination of wavelet transform, Hilbert transform, and adaptive thresholding are presented. On this base, after presenting two initial algorithms by using adaptive threshold in Hilbert domain (HAT method), and wavelet domain (WAT method), we introduce two new methods namely WHAT and HWAT algorithms. In section three, by using various signals from MIT-BIH database as well as simulated ECG signal in MATLAB environment, the presented algorithms in this paper are analyzed in the light of sensitivity to noise. The main purpose of this section is evaluating the presented algorithms quantitatively and qualitatively by obtaining the robustness of each algorithm against noise and introducing the optimal method based on obtained results. Section four is dedicated for conclusion based on obtained results in previous sections and making some suggestions for future works.
PROPOSED METHOD
In this section, several methods obtained from various combinations of Hilbert transform, wavelet transform, and adaptive thresholding for R wave detection are presented. For better evaluation of the introduced algorithms, they are tested on three ECG signals selected from MIT-BIH database (which have three different noise levels) and results relative to each algorithm have been shown separately. Figure 1 shows general plot of three selected signals from mentioned database. It should be noted that in all sections of the paper (except in signal modeling section), these three signals are used as reference signals.
Figure 1
Selected signals from MIT-BIH database
Preprocessing: QRS Complex Detection by using Differentiator Operator
In this section, we are going to make transiting points of zero more evident by using differentiation technique, which has been used as pre-processing part in the next sections. The reason is distinguishing QRS complex pattern in order to simplify next stages of processing. Functions employed in the first and second order derivatives method in this section are as follows.[21] In this stage, place of QRS complex is identified by using the first and second order derivatives and then windowing technique have been used in order to smooth signal.
Y0 (n) = [x(n) – x(n – 2)] (1a)
y1(n) = [x(n) – 2x(n – 2) + x(n – 4)] (1b)
Y2 (n) = 1.3Y0 (n) +1.1Y1(n) (1c)
Initial Method 1: Combination of Hilbert Transform and Adaptive Threshold
After pre-processing operation by using differentiator operator, we employ Hilbert transformation and then adaptive thresholding technique for the detection of R wave. According to the block diagram shown in Figure 2, the method introduced in this section is based on using three general stages including: the first and second order derivatives, Hilbert transform, and adaptive thresholding.
Figure 2
The block diagram used in HAT method
Hilbert Transform
Hilbert transform is one of the most important and common transforms used for detection of QRS complex and R wave. The usage of this transform has been discussed in many papers.[36,37] Hilbert transform of real function f(t) is defined as:
Hilbert transformation also can be defined as convolution between functions and –1/πt. Thus, by using definition of Fourier transformation, we have:
F{H{f (t)}} = jsgn(w)F(jw) (3)
where sgn is a sign function. In fact, because this transform is odd, zero-cross points in ECG signal are formed as dominant peaks in output of this transform. This transform also for a real sequence, extract a complex sequence with the same length. After pre-processing operation described in section 2.1, Hilbert transform is used for detection of dominant peak points in signal. Figure 3 shows the results of using Hilbert transform in introduced signals at the outset of this section.
Figure 3
The reference signals used in this experiment (a) and their Hilbert transform (b)
Adaptive Thresholding Technique
Adaptive threshold technique is one of the significant parts carried out for the detection of R wave peak. Various methods have been used for this purpose including works by Shubsa[38] and Li.[39] Using experimental algorithms, it is observed that defining high values for threshold leads to lack of proper detection and defining low values causes incorrect detection of the peaks. In adaptive threshold structure, detection is done by using a pair of threshold limits named Up Limited Threshold (ULT) (eq. 4) and Down Limited Threshold (DLT) (eq. 5). The proposed algorithm works as follows:[35] If in each stage of threshold, the number of detected peak by up and down limits is not equal, then error component is defined and subtracted from the limits. The mentioned threshold calculation procedure continues till the two limits become equal and at the end the final threshold limit is obtained.
THm+1=THm–WmΔ (4)
THf+1=THf–WfΔ (5)
where THf+1 and THm+1 are values of generalized threshold limit, and THf and THm are initial values of threshold limit; Δ=|THm -THf| is the difference between the two defined limits. The parameters Wf and Wm are factors of error weight which in each stage has a different value with regard to the number of incorrect detected peaks. The results of dominant peak detection using mentioned adaptive thresholding method can be seen in Figure 4. As it can be seen due to the suitable ability of Hilbert transform in distinguishing dominant peak, acceptable results are achieved.
Figure 4
Hilbert transformation and adaptive thresholding of three reference signals
Initial Method 2: Wavelet Transform and Adaptive Threshold
General structure for this section is similar to the previous section; main difference is using the wavelet transform instead of Hilbert transform. In this section, after performing pre-processing operation by differentiator operator, the main signal is decomposed to several subbands by applying wavelet transform (in this paper db4 is used) and then adaptive thresholding is done on the reconstructed signal from appropriate subbands. The main reason for using db4 wavelet is similarity of its wavelet function to ECG signal. It should be noted that based on intuitional results, ‘approximate 2’ [Figure 5] is used as a reference signal and threshold operation is performed on this signal. The block diagram of operation carried out in this section is illustrated in Figure 6.
Figure 5
The results of applying wavelet transform (db4) on one of the reference ECG signals
Figure 6
The block diagram of WAT method
Figure 5 shows the results of applying wavelet transform to one of the reference ECG signals. After signal decomposition by wavelet transform, R wave detection operation is performed by applying adaptive threshold algorithm (described in section 2.2.2) to ‘approximate 2’. Figure 7 shows the results of applying WAT for R peak detection. We can observe that the results are similar to HAT method, but these methods have some differences that are discussed in ECG signal modeling section (section 3).
Figure 7
The results of applying adaptive thresholding on ‘approximate 2’.
Main Method 1: Combination of Hilbert Transform, Wavelet Transform and Adaptive Thresholding
In this method, similar to previous methods, differentiation technique is used as a pre-processing stage and then Hilbert transform, wavelet transform, and adaptive thresholding methods are employed as main stages of processing. In this section, at first, the Hilbert transform of signal is calculated, then by using wavelet transform, the produced signal is divided to several subbands and ‘approximate 2’ is reconstructed, and finally the adaptive thresholding is applied on this signal. The block diagram of Hilbert Transform, Wavelet Transform and Adaptive Thresholding (HWAT) method is illustrated in Figure 8.
Figure 8
The block diagram of HWAT method
The ability of Hilbert transform in distinguishing zero-cross points in the form of positive peaks and also wavelet transform in dividing signal components to appropriate time-frequency components can provide suitable information for R wave detection. Figure 9 shows the results of applying HWAT method for R peak detection.
Figure 9
The results of using HWAT method for R peak detection
Main Method 2: Combination of Wavelet Transform, Hilbert Transform and Adaptive Thresholding
In this method, differentiation technique is used as a pre-processing step and then wavelet transform, Hilbert transform, and adaptive thresholding methods are employed as main stages of processing. In this section, at first, the wavelet transform divides the input signal to several subbands and ‘approximate 2’ is reconstructed, then Hilbert transform of ‘approximate 2’ is calculated and finally R peak is detected by applying adaptive thresholding method. The block diagram of Wavelet Transform, Hilbert Transform and Adaptive Thresholding (WHAT) method is shown in Figure 10.
Figure 10
The block diagram of WHAT method
This combination also has many similarities with combination introduced in the previous section; however, as we will show in the next section, the performance of these two combinations against the noise is not identical. Figure 11 shows the results of WHAT method for R peak detection.
Figure 11
The results of using WHAT method for R peak detection
SIMULATION RESULTS USING SYNTHESIZED ECG SIGNAL
In section 2, the initial methods and main methods proposed in this paper were introduced and applied on several ECG signals from MIT-BIH database. In this section, modeling of ECG signal is proposed in order to better determine the sensitivity level of each method against the noise. For this reason, ECG signal is modeled using Matlab software, then by adding Gaussian noise with different levels of SNR (+5,0,-5 db), the proposed methods in this paper are carried out and compared together for R peak detection. The proposed procedure in this section is similar to the previous section and the only difference is the kind of proposed signal. Figure 12 shows the simulated ECG signal used in this section and Figure 13 illustrates noisy signals contaminated with additive Gaussian noise with +5,0,–5 db SNR.
Figure 12
ECG signal modeling by Matlab software (700 samples and 1 V amplitude)
Figure 13
Simulated ECG signal with three different levels of noise. Top to down +5, 0,
Figures Figures1414–17 shows, respectively, the results of applying HAT, WAT, HWAT and WHAT methods on simulated ECG signal for the R peak detection in various levels of noise. As it can be observed in figures, all algorithms have acceptable performance for +5 and 0 db noises, but results related to –5 db noises is different for each method. In this level of noise, HAT is not able to detect some R peak and several superfluous peaks are observed in the output of WAT and HWAT and only WHAT is able to detect R peak correctly. These results are concluded in Table 1. The last column in this Table shows the noise level of noise that proposed algorithm is able to detect R peaks properly and the algorithm will be failed in the case of adding noise higher than this threshold. From these results, it's clear that WHAT algorithm outperforms the others and WAT and HWAT methods are in the next.
Figure 14
The results of employing HAT method on simulated ECG signal
Figure 17
The results of employing WHAT method on simulated ECG signal
Table 1
A comparison between the abilities of proposed methods, in this paper, for R peak detection
Open in a separate window
Figure 15
The results of employing WAT method on simulated ECG signal
Figure 16
The results of employing HWAT method on simulated ECG signal
CONCLUSION
The purpose of this paper was finding an optimal combination of several introduced algorithms for R peak detection in order to achieve better results, especially in noisy environments. In this paper, we tried to introduce a combinational method to decrease the sensitivity of R peak detection procedure to noise. According to our results, combination of wavelet transform, Hilbert transform, and adaptive thresholding has a significant effect in the detection of R wave and outperforms the others. In this method, after using differentiator operator as preprocessor, ‘approximate 2’ is reconstructed from the wavelet coefficients (that causes to preserve the appropriate time-frequency components and discard the others) and then the signal is transformed to Hilbert domain (in order to form zero-cross points to dominant peaks). Meanwhile, in the final stage, using adaptive thresholding technique leads to decreasing error of determining dominant peak for R peak detection.
Note that using wavelet transform (and producing ‘approximate 2’) before Hilbert transform results in that algorithm remove a portion of noise before forming zero-cross points to dominant peaks. This procedure can be improved using transforms with better energy compactness property such as complex wavelet transform.
In this paper, we only detect R peak and further processing procedures can be done for the extraction of QRS complex that is more informative in investigation of ECG signals. In addition, the proposed methods in this study have been transacted on just three samples. More real data in various cases are needed for justifying the conclusion and generalization of the results. Developing the proposed methods in order to be successful in the presence of more types of artifacts, such as base line drift, motion artifacts, and switching artifacts, is suggested for future works.
Footnotes
Source of Support: Nil
Conflict of Interest: None declared
REFERENCES
1. Benmalek M, Charef A. Digital fractional order operators for R-wave detection in electrocardiogram signal. IET Signal Processing. 2009;3:381–91. [Google Scholar]
2. Xue Q, Hu YH, Tompkins WJ. Neural-network based adaptive matched filtering of QRS detection. IEEE Trans Biomed Eng. 1992;39:317–29. [PubMed] [Google Scholar]
3. Pan J, Tompkins WJ. A real-time QRS detection algorithm. IEEE Trans Biomed Eng. 1985;32:230–6. [PubMed] [Google Scholar]
4. Zhang F, Lian Y. QRS Detection based on multiscale mathematical morphology for wearable ECG devices in body area networks. IEEE Trans Biomed Circuits Syst. 2009;3:220–8. [PubMed] [Google Scholar]
5. Fraden J, Neumann MR. QRS wave detection. Med Biol Eng Comput. 1980;18:125–32. [PubMed] [Google Scholar]
6. Okada M. A digital filter for the QRS complex detection. IEEE Trans Biomed Eng. 1979;26:700–3. [PubMed] [Google Scholar]
7. Engelse WA, Zeelenberg C. IEEE Comput Cardiology. Long Beach, CA: IEEE Computer Society; 1979. A single scan algorithm for QRS detection and feature extraction; pp. 37–42. [Google Scholar]
8. Hamilton PS, Tompkins WJ. Quantitative investigation of QRS detection rules using the MIT/BIH arrhythmic database. IEEE Trans Biomed Eng. 1986;33:1157–65. [PubMed] [Google Scholar]
9. Keselbrener L, Keselbrener M, Akselrod S. Nonlinear high pass filter for R-wave detection in ECG signal. Med Eng Phys. 1997;19:481–4. [PubMed] [Google Scholar]
10. Suppappola S, Sun Y. Nonlinear transforms of ECG signals for digital QRS detection: A quantitative analysis. IEEE Trans Biomed Eng. 1994;41:397–400. [PubMed] [Google Scholar]
11. Dokur Z, Olmez T, Yazgan E, Ersoy OK. Detection of ECG waveforms by neural networks. Med Eng Phys. 1997;19:738–41. [PubMed] [Google Scholar]
12. Barro S, Fernandez-Delgado M, Vila-Sobrino JA, Regueiro CV, Sanchez E. Classifiying multichannel ECG patterns with an adaptive neural network. IEEE Eng Med Biol Mag. 1998;17:45–55. [PubMed] [Google Scholar]
13. Fernandez-Delgado M, Barro Ameneiro S. MART: A multichannel ART-based neural network. IEEE Trans Neural Netw. 1998;9:139–50. [PubMed] [Google Scholar]
14. Afonso VX, Tompkins WJ, Nguyen TQ, Luo S. ECG beat detection using filter banks. IEEE Trans Biomed Eng. 1999;46:192–202. [PubMed] [Google Scholar]
15. Stéphane Mallat. A Wavelet Tour of Signal Processing. 3rd ed. United States: Academic Press; 2008. [Google Scholar]
16. Coast DA, Stern RM, Cano GG, Briller SA. An approach to cardiac arrhythmia analysis using hidden Markov models. IEEE Trans Biomed Eng. 1990;37:826–36. [PubMed] [Google Scholar]
17. Rabiner LR. A tutorial on hidden Markov models and selected applications in speech recognition. Proc IEEE. 1989;77:257–86. [Google Scholar]
18. Poli R, Cagnoni S, Valli G. Genetic design of optimum linear and nonlinear QRS detectors. IEEE Trans Biomed Eng. 1995;42:1137–41. [PubMed] [Google Scholar]
19. Börjesson PO, Pahlm O, Sörnmo L, Nygårds ME. Adaptive QRS detection based on maximum a posteriori estimation. IEEE Trans Biomed Eng. 1982;29:341–51. [PubMed] [Google Scholar]
20. Sörnmo L, Pahlm O, Nygards M.-E. Adaptive QRS detection: A study of performance. IEEE Trans Biomed Eng. 1985;32:392–401. [PubMed] [Google Scholar]
21. Rangayyan RM. Biomedical signal analysis: A case-study approach. United States: IEEE Press; 2001. [Google Scholar]
22. Balda RA, Diller G, Deardorff E, Doue J, Hsieh P. The HP ECG analysis program. In: van Bemmel JH, Willems JL, editors. Trends in Computer processed Electrocardiograms. North Holland, Amsterdam, The Netherlands: 1977. pp. 197–205. [Google Scholar]
23. Ahlstrom ML, Tompkins WJ. Digital filter for real-time ECG signal processing using microprocessors. IEEE Trans Biomed Eng. 1985;32:708–13. [PubMed] [Google Scholar]
24. Friesen GM, Jannett TC, Jadallah MA, Yates SL, Quint SR, Nagle HT. A comparison of the noise sensitivity of nine QRS detection algorithms. IEEE Trans Biomed Eng. 1990;37:85–97. [PubMed] [Google Scholar]
25. Tompkins WJ. Biomedical digital signal processing. Upper Saddle River, NJ: Prentice-Hall; 1995. [Google Scholar]
26. Alexandridi A, Panagopoulos I, Manis G, Papakonstantinou G. R-Peak detection with alternative Haar wavelet filter. IEEE Trans Biomed Eng. 2003;10:219–22. [Google Scholar]
27. Nimunkar AJ, Tompkins WJ. R-Peak detection and signal averaging for simulated stress ECG using EMD. 29th Annual International Conference of the IEEE Engineering in Medicine and Biology Society. 2007;1:1261–4. [PubMed] [Google Scholar]
28. Tang JT, Yang XL, Xu JC, Zhang XK. The algorithm of R peak detection in ECG based on empirical mode decomposition. Natural Comput. ICNC ‘08. 4th International Conference. 2008 Oct 18-20;5:624–7. [Google Scholar]
29. Arzeno NM, Poon CS, Deng ZD. Quantitative analysis of QRS detection algorithms based on the first derivative of the ECG. Conf Proc IEEE Eng Med Biol Soc. 2006;1:1788–91. [PubMed] [Google Scholar]
30. Natalia K, Arzeno M, De Deng Z, Poon CS. Analysis of first-derivative based QRS detection algorithm. IEEE Trans Biomed Eng. 2008;55:478–84. [PMC free article] [PubMed] [Google Scholar]
31. Rangayyan RM. NN-Based R-peak detection in QRS complex of ECG signal biomedical signal analysis. 4th Kuala Lumpur Int Conf Biomed Eng. 2008 Jul 30;21:217–20. [Google Scholar]
32. Benitez DS, Gaydecki PA, Zaidi A, Fitzpatrick AP. A new QRS detection algorithm based on the Hilbert transform. Comput Card. 2000;1:379–82. [Google Scholar]
33. Chang WH, Lin KP, Tseng SY. ECG analysis based on Hilbert transform descriptor. IEEE Eng Med Biol Soc. 1988;1:36–7. [Google Scholar]
34. Chang AA, Chang WH. Hilbert transform and Fourier descriptors to ECG signal analysis. Proc IEEE Conf Eng Med Biol Soc. 1988;1:512–3. [Google Scholar]
35. Xu X, Liu Y. Adaptive threshold for QRS complex detection based on wavelet transform. 27th Annual Int. Conf Proc IEEE Eng Med Biol Soc. 2005;7:7281–4. [PubMed] [Google Scholar]
36. Nygards ME, Sörnmo L. Delineation of the QRS complex using the envelope of the ECG. Med Biol Eng Comput. 1983;21:538–47. [PubMed] [Google Scholar]
37. Zhou S.-K, Wang J.-T, Xu J.-R. 10th Annu Int IEEE Conf Eng Med and Biol. New Orleans, LA: 1988. The real-time detection of QRS-complex using the envelop of ECG. Proc; p. 38. [Google Scholar]
38. Kadambe S, Murray R, Boudreaux-Bartels GF. Wavelet transform based QRS complex detector. IEEE Trans Biomed Eng. 1999;46:838–48. [PubMed] [Google Scholar]
39. Li C, Zheng C, Tai C. Detection of ECG characteristic points using wavelet transform. IEEE Trans Biomed Eng. 1995;42:21–8. [PubMed] [Google Scholar]
Articles from Journal of Medical Signals and Sensors are provided here courtesy of Wolters Kluwer -- Medknow Publications