Research Letter | Open Access
Using Multiscale Product for ECG Characterization
This paper introduces a new method for R wave's locations using the multiscale wavelet analysis, that is based on Mallat's and Hwang's approach for singularity detection via local maxima of the wavelet coefficients signals. Using a first derivative Gaussian function as prototype wavelet, we apply the pointwise product of the wavelet coefficients (PWCs) over some successive scales, in order to enhance the peak amplitude of the modulus maxima line and to reduce noise. The R wave corresponds to two modulus maximum lines with opposite signs (min-max) of multi-scale product. The proposed algorithm does not include regularity analysis but only amplitude-based criteria. We evaluated the algorithm on two manually annotated databases, such as MIT-BIH Arrhythmia and QT.
QRS complex detectors are extremely useful tools for the analysis of ECG signals. They are used for finding the fiducial points for averaging methods and to calculate the RR time series in Heart Rate Variability techniques. There are currently a number of QRS detection algorithms available which use a variety of signal analysis methods. The most common of these are based on signal matched filters or time-frequency decomposition methods. In contrast to conventional techniques, the wavelet transform provides a new dimension to signal processing and event detection. The ability of wavelet transform to extract electrocardiogram (ECG) features has been demonstrated by several researchers. The majority of them are based on singularity detection via local maxima of the wavelet coefficients signal; therein the correspondence between singularities of a function and local maxima in its wavelet transform is investigated. It is shown that singularities correspond to pairs of modulus maxima across several scales .
The QRS detection technique proposed by Li et al.  based on finding the modulus maxima larger than a threshold obtained with the preprocessing of some initial beats, using quadratic spline wavelet. Martinez et al.  apply a Dyadic Wavelet Transform to a robust ECG delineation system which identifies the peaks, onsets, and offsets of the QRS complexes, P and T waves. The algorithm presented by Josko  is based on Discrete Wavelet Transform (DWT), computed at selected characteristic scales, where QRS complex spectrum energy is the largest. For each transient present in the input signal coefficients of DWT produce localized extremes at several consecutive scales. This property is used in detection process. As characteristic scales are analyzed, the QRS waves can be found. Aligned positions of local extremes at characteristic scales determine the instant of QRS complex in the input signal. Zhang and Yong  present a novel algorithm based on continuous wavelet transform (CWT) to accurately detect QRS. It employs a first-order derivative-based differentiator to suppress noise and baseline drift and uses high-scale continuous wavelet transform to peak the zero crossing R point produced by differentiator to ease the task of QRS detection. The goal of Arzeno et al.  study was to determine the ideal algorithm for distinguishing different classes of ECG anomalies by quantitatively comparing the various QRS detection methods and delineating their failure instances. Huabin and Jiankang  propose a novel QRS detector, which uses the Discrete Wavelet Transform (DWT) and Cubic Spline Interpolation as preprocessor, together with an improved dynamic weights adjusting strategy to enhance the detection robustness in noise condition.
We present here a new method for R wave’s locations using the multiscale wavelet analysis, that is based on Mallat’s and Hwang’s approach for singularity detection via local maxima of the wavelet coefficients signals. Using a first derivative Gaussian function as prototype wavelet, we apply the pointwise product of the wavelet coefficients (hereafter PWC) over some successive scales. That allows us to enhance the peak amplitude of the modulus maxima line and to reduce noise.
This paper is organized as follows. In Section 2, we present the method of local regularity characterization with wavelet transforms. Section 3 introduces the multiscale product method for R wave detection. In Section 4, we introduce the detection method, and in Section 5, we interpret the results of R wave’s detection. Finally, in Section 6 we give the conclusion.
2. Characterization of Local Regularity with Wavelets
Wavelet Transform  was introduced as an alternative technique for analyzing nonstationary signal. It provides a new way for representing signal into well-behaved expression that yields useful properties. The wavelet is a square integrable function well localized in time and frequency, from which we can extract all basis functions by using variations of the basic wavelet obtained by time shifting and scaling.
The continuous wavelet transform of signal relative to the basic wavelet is given by
where are, respectively, the translation and scale parameters. Furthermore, if the basic wavelets satisfy the admissibility condition, then, the wavelet reconstruction formula is To measure the local regularity of a signal vanishing moments characterising the wavelet is crucial. A wavelet is said to have vanishing moments if and only if for all positive integer , it satisfies
A wavelet with fast decay has vanishing moments if and only if it exists a function with a fast decay such that
This theorem proves that when wavelet has vanishing moments, wavelet transform can be interpreted as a multiscale differential operator of order . As
then wavelet transform can be written as
Modulus maxima describe any point () such that is locally maximum at . This implies that
When the wavelet has only one vanishing moment, modulus maxima are the maxima of the first derivative of a smoothed function corresponding to discontinuities on the signal. For wavelet having two vanishing moments, the modulus maxima correspond to discontinuities on signal derivative. If the wavelet transform of has no modulus maxima at fine scales then is locally regular. Hence singularities are detected by finding abscissa, where the wavelet modulus maxima converge at fine scales, and in this case, wavelet vanishing moments characterise the type of singularity.
3. Multiscale Products
The idea of this study is to detect singularity not via local maxima of the wavelet coefficients signals but via the product of the wavelet coefficients. Rosenfeld and coworkers suggested forming multiscale pointwise products [9, 10]. This is intended to enhance multiscale peaks due to edges, while suppressing noise, by exploiting the multiscale correlation due to the presence of the desired signal. The multiscale product of the first K scales is given by
The maxima in due to edges in will tend to propagate across scales; so that will tend to reinforce the signal response and not the noise.
4. Detection Method
In this section, we introduce a new method of QRS detection based on multiscale product.
Step 1. We decompose the ECG signal into five scales, labelled Scale1, Scale2, Scale3, Scale4, and Scale5. We specify that none pretreatment is applied to the origin signal.
Step 2. Then, the product of wavelet coefficients over three categories of successive scales, say P123, P234, and P345, is calculated for all time samples. The choice of an odd levels number preserves the sign of the singularity, that is, couples of maximum modules (minimum/maximum) characterizing one QRS complex. The ECG signal plotted in Figures 1 and 2 is extracted from the MIT 106 (). Figure 1 represents ECG signal followed by its wavelet transform using the first derivative of Gaussian; whereas Figure 2 illustrates the multiscales product. We notice that small fluctuations, present in the original signal, were propagated in coefficients of wavelet transform represented by peaks having amplitudes of more in more marked. On the other hand, these fluctuations are completely removed where we calculate the coefficient product. This strong point of the approach enables us to detect singularities without any pretreatment on original ECG signal.
Step 3. We apply a threshold rule to select the modulus maxima from large to small PWC product scales. The R wave corresponds to two modulus maximum lines with opposite signs (min-max) of multiscale product. Firstly, find all of the modulus maxima larger than a threshold TH3 from multiscale products P345 to obtain the location set of modulus maxima . Secondly find a modulus maximum larger than the threshold TH2 on the neighborhood of at scale 2, 3, and 4. If several modulus maxima exist, then the largest one is selected. So the location set can be found. Finally, the locations of the modulus maxima from multiscale products P123 are found. Then, the location sets will be obtained.
Step 4. We eliminate the redundant modulus maxima lines, for some dual R waves or noise in the neighborhood of a modulus maxima lines. Suppose is the first location of a positive maximum or negative minimum of p123() and is the location of a negative minimum or positive maximum. If the interval between and is larger than an interval threshold, the maximum or minimum at is considered the isolated maximum or isolated minimum. The corresponding modulus maximum line is an isolation line and should be eliminated from the set of modulus maximum lines. The interval threshold is empirically defined as 120?milliseconds.
Next, we eliminate the redundant modulus maximum lines. Usually, a given R wave corresponds to a modulus maxima pair with opposite signs (minima and maxima) of wavelet transforms. But in some ectopic beats or in the presence of noise, two or more modulus maxima can occur, of which only one is useful.
If two negative minima Min1 and Min2 are near a positive maximum, with and as their absolute values, and and as their respective distances from the maxima, then the rule for judging which minima is extraneous:
A similar procedure is implemented for the case of one negative minimum and two positive maxima, and the redundant modulus maximum lines can also be eliminated. After rejecting all isolated and redundant maxima lines, R wave position is defined as the zero crossing of the multiscale product P123 between negative minima and positive maxima. Our algorithm does not include regularity analysis, but only amplitude-based criteria. Moreover, the threshold is not updated for each beat, but for each excerpt of time samples. The thresholds (TH3, TH2, and TH1) are proportional to the RMS value of the WT coefficients at the corresponding scale.
5. Results and Interpretations
We used the MIT-BIH Arrhythmia  and QT Databases  to evaluate our algorithm. On the R wave correspond of the amplitude singularity, we use the first derivative of a Gaussian smoothing function
We have tested several values of , and the best results have obtained with .
To assess the R detector, we calculated the sensitivity
the positive predictivity
and the error
where is the number of true positive detections, stands for the number of false negative detections, and stands for the number of false positive misdetections.
The detection results on the MITDB and QTDB obtained by our PWC-based R detection and other published detectors are given in Table 1. Our algorithm does not need any learning period. The proposed PWC-based detection algorithm achieves very good detection performance on the two studied databases. This algorithm attains and for the MITDB. The number of false detection of the signal MIT 105 is equal to 15, this record is more noisy than the others; a sensitivity is about 99.42%. The signal MIT 108 presents various forms of V wave, and it is characterized by P waves having amplitude and a rather particular form. This signal presents 12 false detection and 15 no detected beats, it is a sensitivity and a positive predictivity of the order, respectively, 99.32% and 99.14%. The signal MIT 203 contains a significant number of QRS complex with multiform PVC and a significant noise, is recording enough private individual, and is a sensitivity equal to 99.33% and one positive predictivity of about 99.83%. These three signals ECG present in fact the greatest number of false detections, but a significant improvement of detection rates was carried out with our method. On QTDB, our algorithm presents a positive predictivity () about 99.99% and sensitivity () about 99.98%.
We have presented in this paper a new method for R wave’s locations using the multiscale wavelet analysis and the pointwise product of the wavelet coefficients (PWCs) over some successive scales, in order to enhance the peak amplitude of the modulus maxima line and to reduce noise. The algorithm has been validated using two standard databases, MIT and QT, with different sampling rates and a wide diversity for QRS forms.
Our method achieves very good detection performance on the two studied databases. This algorithm attains and for the MITDB. On QTDB, it presents a positive predictivity () about 99.99% and sensitivity () about 99.98%.
- S. Mallat and W. L. Hwang, “Singularity detection and processing with wavelets,” IEEE Transactions on Information Theory, vol. 38, no. 2, pp. 617–643, 1992.
- C. Li, C. Zheng, and C. Tai, “Detection of ECG characteristic points using wavelet transforms,” IEEE Transactions on Biomedical Engineering, vol. 42, no. 1, pp. 21–28, 1995.
- J. P. Martinez, R. Almeida, S. Olmos, A. P. Rocha, and P. Laguna, “A wavelet-based ECG delineator: evaluation on standard databases,” IEEE Transactions on Biomedical Engineering, vol. 51, no. 4, pp. 570–581, 2004.
- A. Josko, “Discrete wavelet transform in automatic ECG signal analysis,” in IEEE Instrumentation and Measurement Technology Conference, Warsaw, Poland, 2007.
- F. Zhang and L. Yong, “Novel QRS detection by CWT for ECG sensor,” in Proceedings of the Biomedical Circuits and Systems Conference, Montreal, Canada, 2007.
- N. M. Arzeno, Z.-D. Deng, and C.-S. Poon, “Analysis of first-derivative based QRS detection algorithms,” IEEE Transactions on Biomedical Engineering, vol. 55, no. 2, pp. 478–484, 2008.
- Z. Huabin and W. Jiankang, “Real-time QRS detection method,” in Proceedings of the 10th International Conference on E-Health Networking, Applications and Services, pp. 169–170, Singapore, July 2008.
- S. Mallat, A Wavelet Tour of Signal Processing, Academic Press, New York, NY, USA, 2nd edition, 1999.
- A. Rosenfeld, “A nonlinear edge detection techniques,” Processing of the IEEE, pp. 814–816, 1970.
- B. M. Sadler and A. Swami, “Analysis of multiscale products for step detection and estimation,” IEEE Transactions on Information Theory, vol. 45, no. 3, pp. 1043–1051, 1999.
- Massachusetts Institute of Technology, MIT-BIH ECG database, http://www.physionet.org/physiobank/database/mitdb.
- QT ECG database, http://www.physionet.org/physiobank/database/qtdb.
- P. J. M. Fard, M. H. Moradi, and M. R. Tajvidi, “A novel approach in R peak detection using Hybrid Complex Wavelet (HCW),” International Journal of Cardiology, vol. 124, no. 2, pp. 250–253, 2008.
- S. Z. Mahmoodabadi, A. Ahmadian, and M. D. Abolhasani, “ECG feature extraction using daubechies wavelets,” in Proceedings of the 5th IASTED International Conference on Visualization, Imaging and Image Processing (VIIP '05), pp. 343–348, Benidorm, Spain, September 2005.
Copyright © 2009 Rym Besrour et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.