Computational and Mathematical Methods in Medicine

Volume 2019, Article ID 7196156, 7 pages

https://doi.org/10.1155/2019/7196156

## Electrocardiogram Baseline Wander Suppression Based on the Combination of Morphological and Wavelet Transformation Based Filtering

^{1}Hubei Key Laboratory for High-efficiency Utilization of Solar Energy and Operation Control of Energy Storage System, Hubei University of Technology, Wuhan 430068, China^{2}Hubei Collaborative Innovation Center for High-efficiency Utilization of Solar Energy, Hubei University of Technology, Wuhan 430068, China^{3}Hubei Power Grid Intelligent Control and Equipment Engineering Technology Research Center, Wuhan 430068, China^{4}Faculty of Health, Engineering and Sciences, University of Southern Queensland, Toowoomba, QLD 4350, Australia

Correspondence should be addressed to Feng-cong Li; moc.qq@757301104

Received 13 August 2018; Revised 14 January 2019; Accepted 7 February 2019; Published 3 March 2019

Academic Editor: Maria E. Fantacci

Copyright © 2019 Xiang-kui Wan 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.

#### Abstract

One of the major noise components in electrocardiogram (ECG) is the baseline wander (BW). Effective methods for suppressing BW include the wavelet-based (WT) and the mathematical morphological filtering-based (MMF) algorithms. However, the *T* waveform distortions introduced by the WT and the rectangular/trapezoidal distortions introduced by MMF degrade the quality of the output signal. Hence, in this study, we introduce a method by combining the MMF and WT to overcome the shortcomings of both existing methods. To demonstrate the effectiveness of the proposed method, artificial ECG signals containing a clinical BW are used for numerical simulation, and we also create a realistic model of baseline wander to compare the proposed method with other state-of-the-art methods commonly used in the literature. The results show that the BW suppression effect of the proposed method is better than that of the others. Also, the new method is capable of preserving the outline of the BW and avoiding waveform distortions caused by the morphology filter, thereby obtaining an enhanced quality of ECG.

#### 1. Introduction

Electrocardiogram (ECG) is an important clinical tool for heart disease diagnosis; hence, precision of ECG is a matter of life and death. However, the quality of the ECG signal is degraded during acquisition due to the interferences including power line harmonics, motion artifact, and baseline wander (BW), which makes it difficult to identify the factors which reflect the characteristics of physiological activity. As a consequence, interference suppression should be applied before the analysis of ECG [1]. Notably, the most important step is BW suppression which produces a stable signal for subsequent processing and for reliable visual interpretation.

BW embedded in ECG is mainly caused by the movement and respiration of the patient; consequently, it appears as low-frequency artifacts [2]. Unfortunately, although the high-pass filter is capable of suppressing BW, the ECG waveform distortion is inevitable because of the frequency variations of the ECG signal. Hence, a number of advanced BW suppression algorithms including linear low-pass filters, nonlinear filters, polynomial interpolation, wavelet filters, and mathematical morphological filters (MMF) are proposed [3–9].

Linear filters can effectively filter the high-frequency signals but cannot remove the additive noise, which has a frequency band similar to that of ECG signals. Polynomial interpolation depends on the accurate determination of knots and may be unreliable during knot separation [10]. As a nonlinear filtering technique, MMF can obtain local shape features in signals by structuring the element sequences [11, 12]. However, its applications may result in “step-like” waveform distortions. Wavelet transform (WT) has also been used in BW removal. In [3], BW is estimated from the discrete WT coefficients at level *j* and is subtracted from the original ECG signals. WT method exhibits relatively good effects for BW suppression. However, this method causes *T* waveform distortions due to the frequency overlaps between the high-scale approximate coefficients and *T* wave. The ECG signal is reconstructed by an inverse WT, and the high-scale approximate coefficients are set to zero, thereby causing the *T* wave distortion [13].

This study introduces a combined algorithm (CA) of MMF- and WT-based filtering for BW suppression. The CA can effectively preserve the outline of the BW and avoid waveform distortions caused by morphology filters, thereby obtaining an enhanced ECG quality.

The study is organized as follows. Section 2 describes the combined filtering method, while the simulation results are provided and quantitatively analyzed in Section 3. Finally, summary and conclusions are drawn in Section 4.

#### 2. The Combined Method

Considering that the main focus of this study is BW suppression, we model the contaminated ECG as the superposition of the real ECG and the BW and ignoring other types of interferences, as follows:where , , and are the contaminated ECG-, real ECG-, and BW-function with respect to time index , respectively. All of the time functions in this study are discrete because the implementation of filtering is focused on digital processing. The BW suppression is commonly implemented by cancellation, i.e.,where the hat symbol denotes the estimation of the underneath term. The output error of this cancellation procedure is given bywhich indicates that the performance of BW suppression is determined by the estimator of , i.e., . To refine the estimator , we provide a staged framework which combines different filtering technology. The expression of this framework is shown as follows:where is the filter and operator denotes function composition, defined as follows:

By choosing filters carefully, the framework is capable of combining advantages of different filter implementations, and in this study, we combine the MMF-based filter and WT-based filter.

##### 2.1. The Morphological Filtering

The shortcomings of the linear BW suppression methods are caused by the nonlinear nature of the contaminated ECG. Hence, nonlinear processing methods are preferred, and the MMF belongs to this category, which is capable of maintaining the shape of the input signal. The objects of the morphological operations are sets and vectors; for the clarity of descriptions, hereafter vectors are denoted by lower case boldface letters, and denotes the real coordinate space of dimensions. The reflection of a set comprised of vectors is defined aswhile the translation is given byand hence the dilation and erosion can be expressed as follows:

The morphological filter is comprised of opening and closing operators, which can be expressed by dilation and erosion, as follows:

We can apply these morphological operators to a time function by treating the plane as a binary image, and the value of the pixels underneath the curve equals one. The geometric interpretation of opening in equation (9) and closing in equation (10) is sliding a given structuring element along with the signal from beneath and above, respectively. Specifically, the result of opening comprises the highest points reached by any part of the structuring element, while closing is comprised of the lowest ones. Consequently, the semantic meaning of opening/closing is peak-suppression/pit-filling. According to the model shown in equation (1), the spiky can be seen as the noise for estimation, and intuitively the combination of opening and closing is capable of smoothing the fluctuation introduced by the . The expression of the estimator has the following form:where is the structuring element. Let the output of the filter be the estimation of , i.e.,the estimation of can be obtained by cancellation:where denotes the identity operator, i.e.,

We test the estimator and the cancellation procedure using Massachusetts Institute of Technology-Boston’s Beth Israel Hospital (MIT-BIH) arrhythmia database [14] (record number 109). Shape and size of the chosen structuring element are very important. The shape of structuring element should be as similar as the filtered signal waveform needed. The ECG baseline wander is a low-frequency signal, and its shape is more approximate to the line segment. So the morphological filters are with line segments as structuring elements. And the height of linear structuring element has little effect on the results of mathematical morphological filtering. The size of structuring element directly determines whether the noise can be better removed and whether the required signal can be better retained. The width of structural element should be wider than the noise waveform removed and narrower than the signal waveform needed to be retained. If the width of the structural element is too small, the noise component cannot be eliminated well; if the width of the structural element is too large, some signals that need to be retained will be filtered. The time duration of characteristic waves of ECG is listed in Table 1.