Wavelet Transform-Based ECG Baseline Drift Removal ... - IEEE Xplore

2 downloads 0 Views 325KB Size Report
Wavelet Transform-Based ECG Baseline Drift Removal for Body Surface Potential Mapping. R. F. von Borries, J. H. Pierluissi and H. Nazeran. Department of ...
Proceedings of the 2005 IEEE Engineering in Medicine and Biology 27th Annual Conference Shanghai, China, September 1-4, 2005

Wavelet Transform-Based ECG Baseline Drift Removal for Body Surface Potential Mapping R. F. von Borries, J. H. Pierluissi and H. Nazeran Department of Electrical & Computer Engineering The University of Texas at El Paso, El Paso, Texas 79968, USA [email protected]

Abstract— This paper gives a new approach for the removal of slow baseline drift components of electrocardiographic (ECG) signals based on the discrete wavelet transform. The baseline drift is efficiently removed by zeroing the scaling coefficients of the discrete wavelet transform. Such approach can easily be combined with other wavelet based approaches for random noise reduction or power line interference reduction. The new pre-processing approach can remove the lowfrequency components without introducing distortions in the ECG waveform.

I. I NTRODUCTION This paper introduces a technique based on the discrete wavelet transform to remove baseline drift of electrocardiographic (ECG) signals for use in body surface potential mapping [1], [2]. The baseline drift is easily removed by zeroing the scaling coefficients of the discrete wavelet transform which is implemented with a two-channel filter bank. The use of the wavelet transform is advantageous because it can easily be combined with other techniques based on wavelet decomposition for removing noise and power line interference. Heart disease is the most common cause of death in several countries, and the electrocardiogram is a standard tool in identifying cardiac abnormalities. Generally, detection difficulties in ECG analysis may be caused by baseline drift, power line interference and noise [3], [4]. The presence of baseline drift in ECG signals influences the visual interpretation of the ECG, as well as the results obtained from computer-based off-line ECG analysis. In electrocardiographic signals, baseline drift is a problem that can influence the accurate diagnosis of heart diseases, such as ischemia and arrhythmia. Detection of ischemia can be achieved by analyzing the ST segment of the ECG and, in some cases, the analysis can be influenced by slow baseline drift and noise [5]. Additionally, the determination of an accurate ECG baseline is generally needed for the localization of ventricular arrhythmias with body surface potential mapping [6]. The solution of inverse problems or comparison of isopotential maps from different beats requires reliable determination of the baseline to achieve reproducible and consistent results. The importance of baseline correction

0-7803-8740-6/05/$20.00 ©2005 IEEE.

for the reconstruction of activation time imaging from electrocardiographic mapping is also indicated in [7]. Respiration, muscle contraction, and electrode impedance changes due to perspiration or movement of the body are the important sources of baseline drift in most types of ECG recordings [4]. A common approach to remove baseline drift is the use of high-pass linear phase filtering, implemented with a high-pass non-linear phase filter and bidirectional filtering [8], [9]. Non-linear phase filters are usually avoided because they can introduce significant distortions to the ECG waveform and, consequently, increase the chance of heart disease misdiagnosis. In many cases, the filtering operation is combined with other signal processing techniques. Shusterman et al. [10], for example, use bidirectional filtering, frequency estimation, and least-squares line fitting for each twenty seconds of ECG signal, in an approach that is computationally intensive. Although, the discrete wavelet transform has been used in analysis and classification of ECG signals, it has not been used to remove baseline drift. Chazal et al. [11] use wavelet coefficients of ECG signals into the classification of six pathophysiological disease conditions. The ECG signals are decomposed using six levels of discrete wavelet decomposition with a Daubechies wavelet [12]. However, the preprocessing of the ECG signals is not implemented in the wavelet decomposition. Chazal uses a 0.5 − 40Hz linear phase digital bandpass filter to remove unwanted baseline drift and power line interference. Mart´ınez et al. [13] also use the wavelet transform, but in QRS detection and wave delineation. Other discrete time-frequency transforms have also been used to estimate baseline drift. Pandit [14] suggests the use of short-time Fourier transform (STFT) to estimate the presence of baseline drift in ECG signals, which can then be removed using a time varying filter. Two problems may be identified by using this approach. First, the STFT uses a window of constant length which needs to be properly chosen and which fixes the resolution both in time and in frequency. Second, the redundant STFT is used only for estimation of the baseline drift. The baseline drift must be removed by another method such as time-varying filtering. Our approach based on the discrete wavelet transform, on the other hand, uses only the

3891

zeroing of the scaling coefficients to remove the baseline drift, and is computationally less intensive than the approach based on the STFT described in [14]. Additionally, because the wavelet transform decomposes the signal at different scales, the size of the window can be easily adapted to the signal by simply changing the number of levels in the decomposition. This flexibility of the wavelet decomposition makes the approach introduced in this paper more convenient to remove baseline drift than the STFT approach. The approach to remove baseline drift based on the discrete wavelet transform introduced in this paper assumes that the optimal correction must satisfy the following two requirements. First, it must remove the low-frequency elements that are not related to the cardiac electrical activity; and second, it must preserve the shape and amplitude of the PQRST complexes [10]. The wavelet transform is particularly appropriate for analyzing transient, non-stationary signals containing features that themselves have high-frequency components. As the analyzing wavelet, by definition, has zero mean, the wavelet transform intrinsically removes the signal mean from the transform space. The low frequency components associated with baseline drift do not appear, therefore, on the space of the wavelet coefficients, but on the scaling coefficients. By setting the scaling coefficients of the low frequency components to zero, we are then able to remove the baseline drift. An additional benefit of using the wavelet transform is that it can be applied to remove noise and power line interference from the ECG signal. II. M ETHOD The algorithm for baseline drift removal is based on the discrete wavelet transform, implemented with two-channel filter banks. The analysis filter bank used in the decomposition is represented in Fig. 1(a) and the synthesis filter bank used in the reconstruction in Fig. 1(b). The scaling coefficients ck [n] correspond to the discrete ECG signal in a space Vk . The analysis filter bank then decomposes the space Vk into two orthogonal subspaces. The low-pass filter hlow [n] gives the new scaling coefficients ck+1 [m] in the subspace Vk+1 , and the high-pass filter hhigh [n] gives the wavelet coefficients dk+1 [m] in subspace Wk+1 . The downsamplers ↓ 2 indicated in Fig. 1 divide the sampling rate of each output by two. Because the input and output sampling rates are different, two letters n and m are used to index the input and output sequences of the filter banks. The downsamplers at the output of the low-pass and high-pass analysis filters make the wavelets and scaling functions at level k+1 to have twice the length of the wavelets and scaling functions at level k. The scaling and wavelet coefficients correspond, respectively, to the low- and high-frequency components of the input. The scaling coefficients ck [n] can then be reconstructed from the lower resolution scaling coefficients ck+1 [m] and the wavelet coefficients dk+1 [m] using the synthesis reconstruction filter

ck [n] ∈ Vk

hlow [n]

↓2

hhigh [n]

↓2

ck+1 [m] ∈ Vk+1 dk+1 [m] ∈ Wk+1

(a) ck+1 [m] ∈ Vk+1 dk+1 [m] ∈ Wk+1

↑2

flow [n]

↑2

fhigh [n]

ck [n] ∈ Vk

(b) Fig. 1. Filter bank for discrete wavelet transform. (a) Analysis filter bank to decompose space Vk into orthogonal subspaces Vk+1 and Wk+1 . (b) Synthesis filter bank to reconstruct back space Vk from subspaces Vk+1 and Wk+1 .

bank represented in Fig. 1(b). The upsamplers ↑ 2 at the input of each channel of the synthesis filter bank bring back the sampling rate at the input of the analysis filter bank. The ECG signal sampled at a fast rate is then used as the initial scaling coefficients of the discrete wavelet transform, and the decomposition with the analysis filter bank is then repeated over the scaling coefficients. Each new iteration of the filter bank then divides the bandwidth of the scaling coefficients by two. After a few iterations the resulting scaling coefficients correspond to the low frequency baseline drift of the ECG signal. Now, if these coefficients are set equal to zero and the ECG signal is reconstructed, then the reconstructed ECG will have all the details of the original ECG, but with low frequency baseline drift removed. The zeroing of the scaling coefficients is then equivalent to filtering the ECG signal with a long impulse response lowpass filter. The example illustrated in Fig. 2 represents the division of the frequency spectrum of the ECG signal by the discrete wavelet transform implemented with a two-channel filter bank. The spectrum division of Fig. 2 is obtained by repeating successively the filtering operation of the scaling coefficients with the analysis filter bank. The frequency responses of the low-pass and high-pass filters correspond to rectangular pulses or to sinc functions, in the time domain. Because the wavelets, scaling functions, and input signal are all assumed to be real-valued, only the positive side of the frequency spectrum in the interval [0, π] is represented in Fig. 2. The frequency spectrum in the interval [−π, 0] is a mirror image of the frequency spectrum in the interval [0, π]. The division of the frequency spectrum in Fig. 2 starts at the level k. The scaling subspace Vk is divided into the new scaling subspace Vk+1 which is a low-pass band, and the wavelet subspace Wk+1 which is a high-pass band. The number of iterations of the filter bank depends on both the sampling frequency and the bandwidth of the baseline

3892

0

π 4

0.50

π 2

Amplitude

Spectrum

Vk+2

Vk

Vk+1

π

−0.50

Spectrum

(a)

0

π 4

0.00

−0.25

Frequency (rad/s)

Wk+2

0.25

0

2

4 Time (s)

6

8

Wk+1 π 2

Fig. 3. Comparison of an ECG signal without baseline drift (light line) and the ECG signal recovered after the baseline drift is removed (dark line). The large amplitude signal corresponds to the ECG signal added to a simulated baseline drift.

π

Frequency (rad/s)

(b) Fig. 2. Frequency spectrum of an input signal is divided into scaling and wavelet components. The scaling space Vk is divided into the scaling subspace Vk+1 (low-pass band) and the wavelet subspace Wk+1 (high-pass band). (a) Scaling subspaces. (b) Wavelet subspaces.

Amplitude

1.00

drift [15], [16].

0.75 0.50 0.25

III. R ESULTS Four examples that illustrate the effectiveness of the proposed approach for baseline drift removal are presented. To implement the wavelet decomposition we used the linear phase filter bank for the biorthogonal 9/7 wavelet. We observed that non-linear phase filter banks can introduce error artifacts in the reconstructed signal after the low-pass scaling coefficients are zeroed. The first three examples are used to illustrate the effectiveness of the wavelet based algorithm for removing drift of ECG signals. The first example uses a simulated baseline drift to allow the comparison of the ECG signal without drift with the ECG signal reconstructed with our algorithm. Other two examples use measured ECG signals that were recorded with large baseline drift. We first constructed an eight seconds ECG signal with baseline at zero level by concatenating one second segments of the PQRST complex and a short zero interval between the P and T waves. The resulting eight seconds ECG signal corresponds to a 64bpm heart rate. The ECG signal without baseline drift and with a flat interval between the P and T waves is shown in Fig. 3. A simulated drift with three components was then added to the clean ECG signal. The first component was a sine wave with frequency 0.2Hz and amplitude −3dB (relative to the clean ECG amplitude); and the second component was a cosine wave with frequency 0.45Hz and amplitude −5dB. These two components result in a baseline drift that corresponds to typical respiratory frequencies [10]. Finally, the third component was a low frequency component with amplitude 2dB, generated by filtering white Gaussian noise with a bidirectional low-pass Butterworth fourth-order

0.00 0

2

4 Time (s)

6

8

Fig. 4. Measured ECG signal with baseline drift (top) and the ECG signal after the baseline drift is removed (bottom).

IIR filter with cutoff frequency 0.3Hz. A typical ECG signal obtained by adding the three drift components is illustrated in Fig. 3. The ECG signal processed by our algorithm to remove baseline drift is also superimposed to the clean ECG shown in Fig. 3. This illustrative example indicates that our wavelet transform based algorithm can effectively remove large amplitude baseline drifts, without introducing significant distortion to the PQRST complex. The two examples illustrated in Figs. 4 and 5 correspond to measured ECGs that have large baseline drift. For these practical examples, the baseline drift is not as large as the baseline drift simulated in the first example, and we are then able to remove the low frequency components without introducing any noticeable distortion to the higher frequency components of the ECG signal. An additional advantage of using wavelet decomposition for ECG pre-processing is that it can also be used to remove noise. The example in Fig. 6 shows the measured ECG signal of Fig. 5 with both the low frequency drift and the high frequency noise components removed.

3893

Amplitude

0.25 0.00

−0.25 −0.50 −0.75 0

2

4 Time (s)

6

8

Fig. 5. Measured ECG signal with baseline drift (bottom) and the ECG signal after the baseline drift is removed (top).

Amplitude

0.25 0.00

−0.25 −0.50 −0.75 0

2

4 Time (s)

6

8

Fig. 6. The ECG signal with baseline drift and noise from Fig. 5 (bottom) and the ECG signal after baseline drift and noise are removed (top).

IV. C ONCLUSION This paper introduces an approach for removing baseline drift of electrocardiographic signals using the discrete wavelet transform. The approach can easily be combined with other wavelet-based ECG pre-processing techniques such as noise reduction and power line interference reduction. The paper illustrates the effectiveness of the approach by using examples with both simulated and measured ECG data. The current algorithm uses biorthogonal wavelet transform but on going research is being conducted on redundant wavelet transforms which show better results for noise reduction. The target application of our algorithm is pre-processing of ECG signals for body surface potential mapping.

[2] D. Sevilla, E. Morales, J. H. Pierluissi, H. Nazeran, and Z. Abedin, “Digital processing of recorded electrocardiograms,” in The 22nd Annual Houston Conference on Biomedical Engineering Research, Houston, TX, Feb. 2005. [3] B.-U. K¨ohler, C. Hennig, and R. Orglmeister, “The principles of software QRS detection,” IEEE Engineering in Medicine and Biology Magazine, vol. 21, no. 1, pp. 42–57, Jan.-Feb. 2002. [4] G. M. Friesen, T. C. Jannett, M. A. Jadallah, S. L. Yates, S. R. Quint, and H. T. Nagle, “A comparison of the noise sensitivity of nine QRS detection algorithms,” IEEE Transactions on Biomedical Engineering, vol. 32, no. 1, pp. 85–98, Jan. 1990. [5] T. Stamkopoulos, K. Diamantaras, N. Maglaveras, and M. Strintzis, “ECG analysis using nonlinear PCA neural networks for ischemia detection,” IEEE Transactions on Signal Processing, vol. 46, no. 11, pp. 3058–3067, Nov. 1998. [6] T. Jokiniemi, K. Simelius, J. Nenonen, I. Tierala, L. Toivonen, and T. Katila, “Baseline reconstruction for localization of rapid ventricular tachycardia from body surface potential maps,” Physiological Measurement, vol. 24, no. 3, pp. 641–651, Aug. 2003. [7] B. Tilg, G. Fischer, R. Modre, F. Hanser, B. Messnarz, M. Schocke, C. Kremser, T. Berger, F. Hintringer, and F. X. Roithinger, “Modelbased imaging of cardiac electrical excitation in humans,” vol. 21, no. 9, pp. 1031–1039, Sept. 2002. [8] R. L. Longini, J. P. Giolma, C. W. III, and R. F. Quick, “Filtering without phase shift,” IEEE Transactions on Biomedical Engineering, vol. BME-22, no. 5, pp. 432–433, Sept. 1975. [9] P. P. Kanjilal and S. Palit, “On multiple pattern extraction using singular value decomposition,” IEEE Transactions on Signal Processing, vol. 43, no. 6, pp. 1536–1540, June 1995. [10] V. Shusterman, S. I. Shah, A. Beigel, and K. P. Anderson, “Enhancing the precision of ECG baseline correction: Selective filtering and removal of residual error,” Computers and Biomedical Research, vol. 33, no. 2, pp. 144–160, Apr. 2000. [11] P. de Chazal, R. B. Reilly, G. McDarby, and B. G. Celler, “Classification of the electrocardiogram using selected wavelet coefficients and linear discriminants,” in IEEE Proc. Int. Conf. Acoust., Speech and Signal Processing, vol. 6, Istanbul, Turkey, June 2000, pp. 3590– 3593. [12] I. Daubechies, Ten Lectures on Wavelets. Philadelphia, PA: SIAM, 1992, notes from the 1990 CBMS-NSF Conference on Wavelets and Applications at Lowell, MA. [13] J. P. Mart´ınez, R. Almeida, and S. Olmos, “A wavelet-based ECG delineator: Evaluation on standard databases,” IEEE Transactions on Biomedical Engineering, vol. 51, no. 4, pp. 570–581, Apr. 2004. [14] S. V. Pandit, “ECG baseline drift removal through STFT,” in Proc. 18th International Conference of the IEEE Engineering in Medicine and Biology Society, Amsterdam, Netherlands, Oct. 1996, pp. 1405– 1406. [15] M. Vetterli and J. Kovaˇcevi´c, Wavelets and Subband Coding. Upper Saddle River, NJ: Prentice Hall, 1995. [16] C. S. Burrus, R. A. Gopinath, and H. Guo, Introduction to Wavelets and the Wavelet Transforms. Upper Saddle River, NJ: Prentice Hall, 1998.

V. ACKNOWLEDGMENTS This research was funded in part by National Science Foundation Award #EIA-0325024 to Dr. J. H. Pierluissi. R EFERENCES [1] E. Morales, D. Sevilla, J. H. Pierluissi, and Z. Abedin, “Validated use of measured 12-lead EKGs in the simulation of body surface potentials,” in The 22nd Annual Houston Conference on Biomedical Engineering Research, Houston, TX, Feb. 2005.

3894