# Using Multiscale Product for ECG Characterization

Authors: Rym Besrour; Zied Lachiri; Noureddine Ellouze
Journal: Research Letters in Signal Processing
 (2009)

---

## Abstract

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.


---

## Body

## 1. Introduction

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 [1].The QRS detection technique proposed by Li et al. [2] 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. [3] 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 [4] 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 [5] 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. [6] 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 [7] 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 Section2, 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 [8] 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 signalx(t) relative to the basic wavelet is given by(1)Wψx(a,b)=1|a|∫-∞+∞x(t)·ψ*(t-ba),
where a,b are, respectively, the translation and scale parameters. Furthermore, if the basic wavelets satisfy the admissibility condition, then, the wavelet reconstruction formula is
(2)x(t)=∫∫ℛWψx(a,b)ψa,b(t)dadba2.
To measure the local regularity of a signal vanishing moments characterising the wavelet is crucial. A wavelet ψ(t) is said to have n vanishing moments if and only if for all positive integer k<n, it satisfies(3)∫-∞+∞tkψ(t)·dt=0.
A wavelet with fast decay has n vanishing moments if and only if it exists a function θ  with a fast decay such that(4)ψ(t)=(-1)ndnθdtn.
This theorem proves that when wavelet has n vanishing moments, wavelet transform can be interpreted as a multiscale differential operator of order n. As(5)wx(a,b)=x*ψb¯(a)
with(6)ψb̅(t)=1bψ(-tb),
then wavelet transform can be written as(7)wx(a,b)=bndndun(x*θb̅)(a)
with(8)θb̅=1bθ(-tb).
Modulus maxima describe any point (a0,b0) such that |wx(a,b)| is locally maximum at a=a0. This implies that(9)∂Wx(a0,b0)∂a=0.
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 x has no modulus maxima at fine scales then x 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(10)pk(n)=∏j=1kWw2jx(n)=∏j=1kyj(n).
The maxima in Ww2jx(n) due to edges in x(n) will tend to propagate across scales; so that p(n) 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 (29300→29812). 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.ECG signal followed by its wavelet transforms for different values of scale.
(a)(b)(c)(d)(e)(f)ECG signal followed by its multiscale products.
(a)(b)(c)(d)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 {n345k∣k=1⋯N}. Secondly find a modulus maximum larger than the threshold TH2 on the neighborhood of n345k at scale 2, 3, and 4. If several modulus maxima exist, then the largest one is selected. So the location set {n234k∣k=1⋯N} can be found. Finally, the locations of the modulus maxima from multiscale products P123 are found. Then, the location sets {n123k∣k=1⋯N} 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. Supposen1231 is the first location of a positive maximum or negative minimum of p123(n) and n123k(k=1⋯N) is the location of a negative minimum or positive maximum. If the interval between n1231 and n123k is larger than an interval threshold, the maximum or minimum at n1231 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, withA1 and A2 as their absolute values, and L1 and L2 as their respective distances from the maxima, then the rule for judging which minima is extraneous:(11)ifA1L1>1.2*A2L2,thenMin2isredundant,ifA2L2>1.2*A1L1,thenMin1isredundant.
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 213 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 [11] and QT Databases [12] to evaluate our algorithm. On the R wave correspond of the amplitude singularity, we use the first derivative of a Gaussian smoothing function(12)ψ(t)=-2σ3/2π1/4·t·exp(-t22σ2).
We have tested several values of σ, and the best results have obtained with σ=0.25.To assess the R detector, we calculated the sensitivity(13)Se=TPTP+FN,
the positive predictivity(14)P+=TPTP+FP,
and the error(15)%error=FP+FNtotalbeats,
where TP is the number of true positive detections, FN stands for the number of false negative detections, and FP 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 Table1. 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 Se=99.92% and P+=99.88% 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 (P+) about 99.99% and sensitivity (Se) about 99.98%.Table 1
R wave’s detection results on MITDB and QTDB.
DatabaseQRS detectorSe%P+%% errorMITDBArzeno et al. [6]99.2999.24—99.5799.59—98.0799.18—Huabin and Jiankang [7]99.6899.59—Fard et al. [13]——0.3Josko [4]99.8699.910.23Zhang and Yong [5]99.8799.82—Thiswork99.9299.880.19Mahmoodabadi et al. [14]99.1898—Martinez et al. [3]99.8099.860.34Li et al. [2]99.8999.940.17QTDBThiswork99.9899.990.02Martinez et al. [3]99.9299.880.20


## 6. Conclusion

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 attainsSe=99.92% and P+=99.88% for the MITDB. On QTDB, it presents a positive predictivity (P+) about 99.99% and sensitivity (Se) about 99.98%.



---

*Source: 209395-2009-08-30.xml*