Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
42 views

Robust Nonlinear Aggregation Operator For ECG Powerline Interference Reduction

Uploaded by

Sparsh Kachhadia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views

Robust Nonlinear Aggregation Operator For ECG Powerline Interference Reduction

Uploaded by

Sparsh Kachhadia
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Biomedical Signal Processing and Control 69 (2021) 102675

Contents lists available at ScienceDirect

Biomedical Signal Processing and Control


journal homepage: www.elsevier.com/locate/bspc

Robust nonlinear aggregation operator for ECG powerline


interference reduction
Jacek M. Leski
Department of Cybernetics, Nanotechnology and Data Processing, Silesian University of Technology, Akademicka 16, Gliwice, 44-100, Poland

A R T I C L E I N F O A B S T R A C T

Keywords: Objective: Nowadays, the most effective methods for ElectroCardioGraphic (ECG) PowerLine (PL) interference
Powerline interference suppression, based on the subtraction operation, require the determination of signal fragments with a low
Aggregation operator electrical activity of the heart. Any errors in searching for these fragments result in a loss of effectiveness of
Nonlinear filtering
interference suppression and an increase in signal distortion. This article proposes a method that does not need to
Robust estimator
ECG signal
determine such signal fragments.
Methods: The robust nonlinear aggregation operator is used for the PL disturbance estimation. This results in an
automatic reduction (or elimination) of the influence of the ECG signal fragments with an increased electrical
activity of the heart. In other words, the samples with the lowest electrical activity of the heart will be used for
the PL interference estimation.
Results: The method leads to a significant reduction of the ECG signal distortions, unattainable for other methods,
leaving the residual noise of the order of single micro-volts, regardless of the PL interference level tackled. The
method can be applied using an algorithm that is computationally very efficient, which can help to reduce the
total cost of ECG signal processing. The new method proposed is experimentally compared to the traditional ones
using signals from the Physikalisch-Technische Bundesanstalt (PTB) diagnostic ECG database.
Conclusion: The method proposed is an accurate, robust and computationally efficient algorithm for reduction of
PL interference disturbing ECG signals.
Significance: New prospects emerge for systems processing the ECG signal, it is possible to analyze traces with a
more unfavorable signal-to-noise ratio. This applies to monitoring and exercise systems as well as to a special
advanced analysis of e.g. cardiac micro-potentials.

1. Introduction analysis systems require that the distortion and residual PL disturbance
be much lower, e.g. of the order of single μV, for systems analyzing
The ElectroCardioGraphic (ECG) signal is always more or less cardiac micro-potentials (or the so-called late potentials). The PL
degraded by additive 50 or 60 Hz PowerLine (PL) interference. There­ interference can be modeled by a sinusoid with the proper amplitude,
fore, PL interference reduction is always one of the first steps in all ECG frequency and phase. Typically, for reduction of the PL interference, a
signal processing systems. The presence of this interference causes errors fixed [10,20] or adaptive [1,6,22,25] notch filter is used. Such filters
in determining the characteristic points and amplitude measurements, introduce unacceptable distortions of the ECG signal, caused by their
which in turn causes errors in interpretation (human and automatic) on so-called ringing around QRS (the combination of three deflections Q, R
the basis of this signal [11]. It can be claimed that the quality of the and S, seen on the ECG, which corresponds to the depolarization of
entire ECG signal analysis depends on the quality of the PL interference ventricles) complexes. This is because QRS complexes, which are
reduction. approximately pin-shaped, trigger a filter and make him respond with its
For most ECG processing systems it is required that the filtering impulse response. Therefore, the second group of methods was intro­
methods do not introduce into the original signal distortions greater duced, based on the estimation of the parameters of the sinusoidal
than 25 μV [26]. Of course, the residual PL interference should not disturbance, and its subtraction from the noisy signal [16,17]. This
exceed this level either. Some of the methods described in the literature method must estimate the parameters of the disturbance in the so-called
do not meet these requirements. It should be added that some ECG linear segments – that is, fragments with low electrical activity of the

E-mail address: jleski@polsl.pl.

https://doi.org/10.1016/j.bspc.2021.102675
Received 11 December 2020; Received in revised form 7 April 2021; Accepted 24 April 2021
Available online 6 July 2021
1746-8094/© 2021 Elsevier Ltd. All rights reserved.
J.M. Leski Biomedical Signal Processing and Control 69 (2021) 102675

heart. Such signal fragments are searched for by calculating the de­ 2. Methods for powerline interference reduction in ECG signals
rivatives of the signal in a window of a certain length and comparing
their range with a certain value. Estimates determined in this way are Typically, these methods exploit the fact that the sampling rate is a
also used in fragments with high electrical activity of the heart. This multiple of the PL frequency. Let us denote the number of ECG signal
ensures that the 50/60 Hz components are not removed from the QRS samples per PL inference period as b. For example, for the Massachusetts
complexes and there is no ringing effect. The method described in paper Institute of Technology – Boston’s Beth Israel Hospital (MIT-BIH)
[13] can be classified as a similar group of methods. However, in this database, the powerline interference frequency is 60 Hz, and the sam­
method the signal is not divided into linear and non-linear segments. A pling frequency is 360 Hz, which gives b = 6. For the European PTB
robust nonlinear aggregation operator is used for the estimation of the database, we have a 50 Hz powerline interference frequency and
ECG disturbance, instead. This way, samples with high electrical activity 1000 Hz sampling frequency, which leads to b = 20. In fragments of
of the heart are automatically eliminated from the estimate as outliers. isolines (baseline) it is enough to aggregate the information about the PL
To overcome the limitations of linear filters a variety of nonlinear interference level using every bth sample of the signal in a certain time
ones have been proposed. Particularly interesting among them are order window. Aggregation is needed to reduce the impact of random noises,
statistic filters, due to their robustness with respect to outliers and signal such as e.g. the muscular one. In every bth sample, the PL interference
preserving capability [3,7,24]. In work [5] a nonlinear filter for ECG level is the same, disregarding random noises. In the fragments outside
signal processing, based on morphological operators was introduced. A the isoline, the aggregation operator used should be robust (resistant) to
different approach to nonlinear filtering of ECG signal, based on a the occurrence of disturbances (outliers). From the point of view of PL
nonlinear aggregation operator is proposed in [13]. This method allows interference estimation, in the case of the ECG traces, all deviations of
the simultaneous reduction of baseline wander and powerline interfer­ the desired signal from the baseline, i.e. the P, Q, R, S and T waves must
ence thanks to the use of a filter bank. The suppression of both types of be regarded as disturbances. A sliding (or moving) observation window
interference is an advantage from the point of view of computational with 2a + 1 time samples, containing every bth sample and centered at
effort. But at the same time it can be a disadvantage because we are the nth one, creates the following set of samples
forced to choose the filter parameters for reduction of both types of
{x(n − ab), x(n − ab + b), …, x(n − b), x(n),
interference simultaneously. If the frequencies of the baseline wander (1)
x(n + b), …, x(n + ab − b), x(n + ab)},
fluctuations and of the changes in the amplitude of PL interference are
different, then we must choose a compromise. Therefore, it could be where a is the parameter determining the moving window length and b
beneficial to perform suppression of both types of interference using two is a natural number greater than 1. If we use the aggregation operator for
individual specialized filters. However, the filter proposed in [13] allows the above set of samples, e.g. the mean operator, we will obtain an es­
to suppress the baseline wander, only (see Section 2 in [13]) or baseline timate of a periodical disturbance with period bΔ (where Δ is the sam­
wander and powerline interference, simultaneously (see Section 3 in pling interval), for the central sample – with index n. However, using the
[13]). Therefore in this paper, we introduce the method(s) allowing for mean operator will result in errors due to the presence of the P, Q, R, S
suppression of powerline interference, only. and T waves. Hence, we should either detect these waves (as in other
The methods for powerline interference suppression methods pre­ known methods) or use the robust estimator – robust aggregation of the
sented in the paper can be applied to various biomedical and industrial values of the respective samples. A popular robust operator is the or­
signals. However, the operation of noise suppression is particularly dered generalized weighted mean [8]
difficult for ECG signals what results from the following reasons: (i) non-
( )α1
stationarity of this signal and primarily the presence of relatively narrow ∑
+a

and high QRS complexes, which make the filters produce a kind of im­ y(n) = ⊎+a
i=− a x(n + ib) = x(n + ib) )α
w(i) (̃ , (2)
pulse response, causing unacceptable (from a diagnostic point of view)
i=− a

distortions within and around these complexes, (ii) existence of strict


where y(n) is the aggregated value; a, b and α ∈ \{0} are parameters.
standards regarding the permissible distortions that filters can generate; ∑
The window function fulfills w(i) ≥ 0 and +a i=− a w(i) = 1. The ‘tilde’
the maximum distortion must be less than 25 μV [26] (larger changes in
decoration means a sort operation for a set of samples (1):
the ECG signal can be interpreted by physicians as signs of some disease
processes) (iii) QRS complexes (but also P and T waves) contain com­ {̃x(n − ab), ̃
x(n − ab + b), …, ̃x(n − b), ̃
x(n),
(3)
ponents with a frequency around 50/60 Hz, and suppression of these ̃x(n + b), …, ̃x(n + ab − b), ̃
x(n + ab)},
components causes unacceptable distortions of these waves (therefore
powerline interference should be suppressed, but not the 50/60 Hz where the following conditions are fulfilled
components of the waves processed – domain knowledge). Hence, the ̃x(n − ab) ≤ ̃
x(n − ab + b) ≤ ⋯ ≤ ̃x(n − b) ≤ ̃x(n) ≤
suppression of powerline interference for ECG signals has been for many (4)
≤̃ x(n + b) ≤ ⋯ ≤ ̃x(n + ab − b) ≤ ̃
x(n + ab).
years a testing ground for the design of this type of filters. In other
words, filters designed to process ECG can serve as the basis for After the sorting operation, it is easy to reduce (or eliminate) the in­
obtaining filters for other signals (usually after taking into account the fluence of samples with extreme values. It is easiest to assume zero
specificity of these signals). weights for these samples. However, in this way we have a step transi­
The goal of this study is to introduce a new method for powerline tion from inclusion to exclusion of samples from the analysis. Instead of
interference reduction in the ECG signals which is based on a robust using exclusion of samples with extreme values, a more sensible solution
nonlinear aggregation operator. The next goal is to compare this method is used with a window function characterized by soft transition between
to the other methods known from the literature with respect to the ef­ the inclusion and exclusion of samples. The Kaiser window function is
ficiency of this operation. used [19]
The rest of this paper is organized as follows: two new methods of ⎧ ⎛ √̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ ⎞
( )2 /
powerline reduction, based on robust nonlinear aggregation operator, ⎪

⎨ ξI0 ⎝β 1 − i ⎠ I0 (β), − a ≤ i ≤ +a,
are described in Section 2. Section 3 presents experimental investigation w(i) = a (5)
of the filter bank introduced, and a discussion of the results obtained. ⎪


Finally, conclusions are drawn in Section 4. Computationally effective 0, otherwise,
implementation of the proposed filter is presented in Appendix A.
where β is an adjustable parameter, ξ is a normalizing factor and I0 (⋅) is
the modified zeroth-order Bessel function of the first kind.

2
J.M. Leski Biomedical Signal Processing and Control 69 (2021) 102675

Finally, the estimate of PL interference is subtracted from the orig­ 2.2. The second method – FIL2
inal signal: x(n) − y(n). But here an important problem emerges. The
aggregation operator (2) estimates not only the PL interference but also In the previous subsection, the baseline wander and the periodical
the level of the isoline (baseline wander). If only PL interference is to be disturbance estimates are computed over the entire time window of
suppressed, only the PL interference level needs to be aggregated. Two 2ab + 1. Hence, their averaged/aggregated values in this window are
proposals for new methods will be given in subsequent subsections. subtracted from each other. This approach can be called global. A local
approach can also be used. In this case, we first determine the local PL
2.1. The first method – FIL1 disturbance values, and then average/aggregate them. The second
approach is to calculate the periodical disturbance estimate on a new
The first method proposed, uses operations on the baseline wander signal that has no baseline wander. The second method can be written
and the periodical disturbance estimates at the filter output, which can as:
be written as:
⎧ b− 1− ⌊b/2⌋
⎧ ⎪ 1 ∑
⎪ +a ⎪
⎪ r(n) = x(n) − x(n + i),
⎨ y1 (n) = ⊎i=− a x(n + ib),
⎪ ⎪
⎪ b i=− ⌊b/2⌋

y2 (n) = ⊎+ab
i=− ab x(n + i), (6) (7)

⎪ ⎪
⎩ z(n) = x(n) − (y1 (n) − y2 (n) ), ⎪

⎪ y(n) = ⊎+a
i=− a r(n + ib),


z(n) = x(n) − y(n),
where ⊎ denotes, as previously, the ordered generalized weighted mean,
described by (2) and a, b are the filter parameters. where ⊎ denotes, as previously, the ordered generalized weighted mean,
The first of Eq. (6) is an estimate of baseline wander and periodical described by (2) and a, b are the filter parameters. ⌊υ⌋ rounds υ to the
disturbance. The second equation is an estimate of baseline wander. The nearest integers less than or equal to υ.
third equation determines the periodical disturbance estimate as a dif­ The first of Eq. (7) is an local estimate of the periodical disturbance.
ference, and subtracts it from the disturbed signal. So this finally cor­ We subtract the local baseline wander estimate from the original signal.
responds to subtracting the periodical disturbance estimate from the This estimate is made using a moving average filter with a length of b,
original disturbed signal. Both estimators used are resistant to the which ensures that periodic interference is reset. The second equation is
occurrence of disturbances in the signal thanks to the use of the ordered an estimate of periodical disturbance, calculated by aggregating local r
generalized weighted mean. It should be noted that both estimators are (n) estimates. This is the bank from the first method FIL1, but working
determined in windows of the same length (2ab + 1), although the first on the signal r(n). The third equation subtracts estimate of periodical
estimate is calculated on every bth signal sample, and the second on each disturbance from the disturbed signal. It should be noted that estimator
signal sample. For both estimators, we use as weights the Kaiser window are determined in windows of length equal to 2ab + 1, although it is
with the β parameter. It is obvious that for an input signal decimated by calculated on every bth signal sample. We use as weights the Kaiser
factor b, we obtain the first equation of (6). It should also be noted that window with the β parameter. It is obvious that signal r(n) can be pos­
the output signal y1(n) is also decimated by the factor b. To obtain a itive or negative depending on the phase of the periodical disturbance.
signal with the original sampling frequency we use a bank of b filters, Therefore, for the ordered generalized weighted mean, α = 1 is used to
presented in Fig. 1. In this figure the following notations are used [23]: preserve the sign of the disturbance. The filter introduced in the second
↓b — b-fold decimator (downsampler), ↑b — b-fold expander (upsam­ method is presented in Fig. 2, where G stands for the moving average
pler, obtained by adding b − 1 zeros between every consecutive samples) described by the first of Eq. (7).
and z− 1 is a delay operator. All filters in this bank are the same one, i.e.
F1 = F2 = ⋯ = Fb = F0, where F0 stands for the filter described by the first 2.3. Computationally efficient implementation
equation of (6). The filter described by the second equation of (6) is
denoted as H. A direct implementation of the proposed nonlinear filter by means of
(6) or (7) results in a very intensive computation load due to the sorting
operation of 2a + 1 elements performed for each new sample. For many
ECG or other systems, and particularly for the on-line ones, such
computation load is unacceptable. However, we can observe that for the
next incoming sample, the observation window differs from the previous
one by two samples:

Fig. 1. Structure of the first nonlinear filter bank. Fig. 2. Structure of the second nonlinear filter bank.

3
J.M. Leski Biomedical Signal Processing and Control 69 (2021) 102675

• the oldest sample x(n − ab) is excluded from the observation win­
dow, and
• the new sample x(n + (a + 1)b) is inserted into this window.

Appendix A presents a new specialized structure based on an bi-


directional list of cells, that allows to sort in a new window by making
a few comparisons and modifying 4 cell indexes. The appendix also
shows a new computationally efficient implementation algorithm.

3. Experimental results and discussion

The proposed filter was investigated using the ECG test signals
included in the PTB Diagnostic ECG Database [4] from the PhysioNet [9] Fig. 3. Maximum distortion of ECG signals, obtained for the nonlinear filters
repository (https://physionet.org/content/ptbdb/1.0.0/, 12.03.20). FIL1 and FIL2 as a function of their length a and amplitude A of the powerline
The database contains 549 conventional 12-lead resting ECGs. The ECGs interference added. The results obtained for FIL1 are presented with solid lines
are digitized at a sampling rate of 1000 Hz and resolution 0.5 μV/LSB; and for FIL2 with a dashed one (here the same results were obtained for
16 Bit ADC. The diagnostic classes includes healthy control, as well as different values of A).
subjects with: myocardial infarction, cardiomyopathy/heart failure,
bundle branch block, arrhythmia, myocardial hypertrophy, valvular length, for zero interference. At higher amplitudes, FIL1 behaves
heart disease and myocarditis. strangely, at first look. As you can see from the graph for the 0.5 mV
Records with a low level of powerline and muscle disturbances were amplitude, the distortion is greater than for 5.0 mV. However, it is easy
selected for the study. The powerline interference level was estimated as to explain. This is due to the typical amplitude of QRS complexes, which
the RMS value at the output of the bandpass filter, measured outside the is closer to 0.5 mV. This results in an erroneous estimation of the level of
fragments corresponding to the QRS complexes (Butterworth, 49–51 Hz, interference, because the values of the amplitudes of the QRS complexes
transition band 4 Hz, − 90 dB). The presence of residual powerline are not sorted as extreme and rejected from the calculations. Interesting
disturbance would distort the research results. The tested filters would is the behavior of FIL2, where we get minimal distortion (order of single
suppress these disturbances, which would be read as generating dis­ μV) regardless of the amplitude of the interference, and the effect of
tortions. The record was rejected when the RMS value was greater than filter length a is also minimal. The main advantage of the proposed filter
2 μV. The level of muscle disturbance was estimated as the RMS value at (FIL2), if compared to FIL1, is a drastic reduction of the required filter
the output of the high-pass filter measured outside the fragments cor­ length.
responding to the QRS complexes (Butterworth, 40 Hz, transition band Fig. 4 presents the maximum distortion (error) for FIL1 and FIL2, as a
20 Hz, − 60 dB). The limit value of RMS was assumed as 15 μV. Thus, the function of the interference amplitude A ∈ {0.0, 0.5, 5.0} [mV] and the
best quality records for the control group were selected from the data­ Kaiser window (5) parameter β ∈ {10, 20, 50, 100, 200, 500}. The pa­
base: (104, s0306lre.dat, V3), (105, s0303lre.dat, V5), (116, s0302lre. rameters a = 100 and α = 1 were both fixed.
dat, V5), (117, s0291lre.dat, V1), (121, s0311lre.dat, V5), (122, As previously, the maximum error for FIL2 does not depend on the
s0312lre.dat, V3), (131, s0273lre.dat, V6), (150, s0287lre.dat, V2), amplitude of the added disturbance and the value of the β parameter.
(155, s0301lre.dat, V6), (156, s0299lre.dat, V2), (165, s0322lre.dat, The FIL1 filter, in the absence of interference, leads to slightly larger
V2), (166, s0275lre.dat, V1), (169, s0328lre.dat, V5), (170, s0274lre. distortions – however, dependent on β. Both filters meet the requirement
dat, V6), (174, s0324lre.dat, III), (180, s0490_re.dat, V4), (185, to produce distortions less than 25 μV. For FIL1 we also observe better
s0336lre.dat, V4), (234, s0460_re.dat, V3), (266, s0502_re.dat, V2), suppression of disturbances at large values of interference amplitudes
(279/s0534_re.dat, V5) and for patients with disease entities: (010, for higher values of the β parameter. However, for smaller amplitude,
s0036lre.dat, V2), (029, s0092lre.dat, avf), (038, s0162lre.dat, V4), better suppression is obtained for smaller values of the β parameter. It is
(046, s0156lre.dat, III), (052, s0190lre.dat, I), (093, s0367lre.dat, V3), reasonable to ask whether replacing the weighted mean operation by
(109, s0349lre.dat, V5), (163, s0034_re.dat, V3), (270, s0507_re.dat, determining the median will significantly change the results of PL sup­
V3). In parentheses we can see (patient id, file name, lead). pression. Of course, we can understand the median as the extreme case
The key issue concerning the performance of the proposed nonlinear when the w(i) is so narrow that it becomes a singleton: w(i) = 1 for i = 0
filter was to evaluate the distortion introduced into the processed signal. and w(i) = 0 for i ∕ = 0. The test results are presented in Table 1. The first
The first series of experiments addressed this problem. The simulation
was performed for both filters, i.e. FIL1 (see Section 2.1) and FIL2 (see
Section 2.2). The introduced distortion was measured as the maximum
difference between the filtered and the original signal for all signals
selected above (the maximum of all maximal distortions obtained for the
respective signals tested). In addition, powerline interference was added
to the signal, modeled as p(n) = A sin(2π n/20 + φ), where φ ∈ [− π , + π]
denotes a random phase. The amplitude of the interferences was of value
A ∈ {0.0, 0.5, 5.0} [mV]. Other parameters were set as: α = 1, b = 20 and
β = 500.
Fig. 3 presents the maximum distortion (error) for the FIL1 and FIL2
filters, as a function of the filter length, a ∈ {25, 50, 75, 100, 150}. The
results obtained for different amplitudes A when the FIL1 filter was
applied are presented with solid lines. Corresponding results for FIL2
filter are presented on the dashed line. In this case, regardless of the Fig. 4. Maximum distortion of ECG signals, obtained for the nonlinear filters
amplitude of the interference A, we get the same result! FIL1 and FIL2 as a function of the Kaiser window parameter β and amplitude A
As expected, the increase of parameter a results in decrease of the of the powerline interference added. The results obtained for FIL1 are presented
maximum error for both filters. The requirement that the distortion is with solid lines and for FIL2 with a dashed one (here the same results were
less than 25 μV is satisfied by both filters even for the shortest tested obtained for different values of A).

4
J.M. Leski Biomedical Signal Processing and Control 69 (2021) 102675

Table 1 FIL2 filter does not require selection of parameters, because for a wide
The maximum distortion [μV] of the PTB signals for median and weighted mean range of their values, the greatest distortion of the ECG signal is of the
used in FIL2. order of single μV. The situation is different for FIL1, where the
Method No noise WN (20 μV) WN (200 μV) B-G Muscle parameter values significantly affect the distortion of the ECG signals.
Kaiser window 1.25 3.88 32.09 42.59 49.31
The question here is whether the FIL1 filter parameters should be
Median 1.25 3.96 36.97 46.58 68.43 selected for a specific signal/lead. However, this is only an academic
question as there is no learning step for real ECG signals. This is due to
the lack of access to the undisturbed signals of a given patient in order to
column shows the case of signals not disturbed by broadband noise. The perform parameter selection. Hence, in practical applications, FIL2 is
results are identical. From the point of view of computational effort, preferred. The recommended values of its parameters are: a ∈ [50, 150]
calculating the median is more favorable: after the sorting operation, we (depending on the frequency of PL interference modulation), β ∈ [10,
select the middle element. However, when we look at the other columns 500] (depending on the level of broadband interference).
of Table 1, we see the advantage of using a weighted mean. Real ECG Figs. 6 and 7 present appearance of typical residual signals for FIL1,
signals are always accompanied by broadband interference. The influ­ FIL2 and moving aggregation [13] filters. Subplot (A) of Fig. 6 shows a
ence of Gaussian white noise with RMS of 20 and 200 μV, Bernoulli- fragment of the ECG signal (121, s0311lre.dat, V5) from the PTB Diag­
Gaussian noise [14,15] and real muscle noise [12] was investigated. nostic ECG Database, the signal after adding 0.5 mV interference and the
The use of a single-sample interference estimate (median) is less immune output signals for FIL1 and the original moving aggregation filter [13].
to broadband interference than the use of a weighted mean. For clarity of the subplot, a constant value of 0.0 mV, 1.0 mV, 2.0 mV,
Fig. 5 presents the maximum distortion (error) for the FIL1 filter, as a and 2.5 mV, was added to the signals, respectively. Subplot (B) of Fig. 6
function of the interference amplitude A ∈ {0.05, 0.5, 5.0} [mV] and the shows residual signals for FIL1 (normal line) and for the moving ag­
aggregation (2) parameter α ∈ { − 10, − 5, − 1, 1, 2, 10}. Parameters gregation filter (bold line) [13]. For clarity of the subplot, a constant
a = 50 and β = 500 were both fixed. Changing the value of the α value of − 60.0 μV, was added to the moving aggregation output signal.
parameter weakly affects the maximum signal distortion, for both small The parameters of the filters applied are: a = 50, b = 20, α = 1 and
and large amplitudes of the interference. However, for the amplitudes β = 500. Subplot (A) of Fig. 7 shows the same part of the ECG signal as in
comparable with the amplitude of QRS complexes, the value of α = 1 the previous figure, signal after adding 0.5 mV interference and output
leads to the largest distortions. For both larger and smaller α, distortions signal for the FIL2 filter. For clarity of the subplot, a constant value of
are smaller. It should also be noted that for FIL2 the above tests cannot 0.0 mV, 1.0 mV and 2.0 mV, was added to the signals, respectively.
be carried out because only α = 1 is used for this approach (see Section Subplot (B) of Fig. 7 shows residual signals for FIL2 applied with pa­
2.2). rameters: a = 50, b = 20 and β = 500. Comparing the effects of exem­
Table 2 presents the influence of the interference amplitude plary signals filtering, we can see that the amplitude of the distortions
A ∈ {0.005, 0.05, 0.5, 5.0, 50.0} [mV] on the maximum error evaluated for FIL1 and the moving aggregation filter is similar, but much larger if
for both filters, for the other parameters fixed: a = 100, α = 1 and compared to that of FIL2.
β = 500. Several issues are worth noting with respect to these results. The next two experiments are aimed to show the filters behavior for
First, for the FIL2 filter we get maximal and average (of the maximum powerline interference of a variable amplitude. Fig. 8 shows the effects
distortion for the database signals) residual distortions, which do not appearing for a step change of this amplitude. The figure shows a frag­
depend on the amplitude of the interference, and are in the order of ment of the ECG signal (234, s0460_re.dat, V3) from the PTB Diagnostic
single micro volts! The standard deviation of these maximal distortions ECG Database, the signal after adding interference with a step change in
from the signals from the database is small and independent of the noise amplitude (from 0.5 mV to 1.0 mV) and the output signals for FIL1 and
amplitude. Next, for the FIL1 filter, the greater the distortion (maximal FIL2. For clarity, a constant value of 0.0 mV, 1.0 mV, 2.5 mV, and
and average), the greater the interference amplitude – with increasing 3.0 mV, was added to these signals, respectively. The parameters applied
values for disturbances whose amplitudes are comparable to the am­ are: a = 100, b = 20, α = 1 and β = 500. Fig. 9 presents a similar
plitudes of QRS complexes. For FIL2, the standard deviation of the experiment as before, but with sinusoidally varying interference
maximal residual distortions is much larger if compared to FIL1, and amplitude, A(n) = 1.1 + sin((2π n/3000 + φ)), where φ denotes a
depends on the noise amplitude. random phase. For the sampling frequency used, the above amplitude
To sum up this series of experiments, it should be stated that FIL2 is a modulation has a period of 3 s. The filters parameters: a = 15, b = 20,
better solution for several reasons: first of all, changes in filter param­ α = 1 and β = 500. Analyzing the above drawings, it should be noted that
eters have little (or no) effect on the change of its efficiency; secondly, FIL2 significantly suppresses variable amplitude interference. For this
maybe the most important thing, changing the amplitude of the inter­ filter, transient states are 3–4 times shorter than for FIL1, while the
ference has little effect on the amplitude of the residual signal. Thus, distortion amplitude is 2–3 times smaller.
The last conducted experiment compares by the filters proposed in
the paper: FIL1 and FIL2, to the methods commonly known from the
literature. The distortions caused by the filters and the times of the
calculations were studied. The reference methods were: Ahlstrom-
Tompkins filter [1], Hamilton filter [10], Levkov filter [2],
Ziarani-Konrad adaptive filter [25], Suchetha-Kumaravel empirical
mode decomposition based filtering [21], Mateo et al radial basis
function Wiener hybrid filter [18] and Leski-Henzel moving aggregation
filter [13]. The maximum distortion for the previously selected signals
from the PTB Diagnostic ECG Database was assessed. Noise suppression
was investigated for the amplitudes of the powerline A ∈ {0.005, 0.05,
0.5, 5.0, 50.0} [mV]. The results of the experiments are presented in
Table 3. The table shows that the smallest distortions are caused by the
FIL2 method. This method has the highest noise suppression, regardless
Fig. 5. Maximum distortion of ECG signals obtained for the nonlinear filter of its amplitude. The Ahlstrom-Tompkins method also shows excellent
FIL1 as a function of parameter α and amplitude A of powerline interfer­ results. However, depending on the amplitude of the disturbances, for
ence added. this method, we obtain the steady state only after a few to several dozen

5
J.M. Leski Biomedical Signal Processing and Control 69 (2021) 102675

Table 2
Maximal, average and standard deviation [μV] of ECG signals distortions, obtained for the nonlinear filters FIL1 and FIL2 as a function of amplitude A of the powerline
interference added.
Filter Distortion A [mV]

0.005 0.05 0.5 5.0 50.0

FIL1 Maximal 3.39 10.34 35.52 25.76 26.64


Average ± SD 2.15 ± 0.67 6.27 ± 1.07 17.39 ± 6.27 11.15 ± 4.71 12.36 ± 3.22

FIL2 Maximal 1.25 1.25 1.25 1.25 1.25


Average ± SD 0.97 ± 0.09 0.97 ± 0.09 0.97 ± 0.09 0.97 ± 0.09 0.97 ± 0.09

Fig. 6. An example of powerline inference reduction. (A) A


high quality ECG signal (a), the signal after adding interference
with an amplitude of 0.5 mV (b), and the output signals for
FIL1 (c) and the moving aggregation filter (d). A constant value
of 0.0 mV, 1.0 mV, 2.0 mV, and 2.5 mV, was added to the
respective signals, for better presentation. (B) the error signal
for FIL1 (thin line (e)) and for the moving aggregation (bold
line (f)). The signals are shifted by 0.0 and − 60.0 μV,
respectively.

Fig. 7. An Example of powerline inference reduction. (A) A high quality ECG signal (a), the signal after adding interference with an amplitude of 0.5 mV (b), and the
output signal for FIL2 (c). A constant value of 0.0 mV, 1.0 mV, 2.0 mV, was added to the respective signals, for better presentation. (B) the error signal for the
FIL2 filter.

seconds. The table does not take into account the distortions for the the FIL2 method include also a difficult software implementation. Dis­
transitional states. Taking them into account, the method leads to un­ pite these disadvantages, FIL2 is proposed as the new most effective
acceptably large signal distortions. The Levkov filter method also leads method for powerline interference suppression in ECG signals.
to excellent results. For this method also the amplitude of the distortions
does not depend on the level of the disturbance. However, the noise 4. Conclusions
suppression efficiency is about 10 times lower, if compared to FIL2.
Other methods lead to even greater distortions of the signal. Due to the In this paper, two new types of nonlinear filters are proposed. These
execution time, the FIL2 method is one of the methods with average filters are designed to reduce the powerline interference of ECG signals.
computational effort. It is comparable to that of the Levkow filter The main advantage of the proposed methods is a substantial reduction
method, but several dozen times larger than those of the of the output signal distortion, crucial for ECG signal processing.
Ahlstrom-Tompkins and the Hamilton methods. The disadvantages of Moreover, the methods described in this paper can have a very efficient

6
J.M. Leski Biomedical Signal Processing and Control 69 (2021) 102675

Fig. 8. An example of powerline inference reduction for a step change in interference amplitude. An example ECG (a), signal after adding interference (b), output
signals for FIL1 (c) and FIL2 (d). A constant value of 0.0 mV, 1.0 mV, 2.5 mV, 3.0 mV was added to the respective signals, for better presentation.

Fig. 9. An example of powerline inference reduction for a sinusoidal change in interference amplitude. A high quality ECG signal (a), the signal after adding
interference (b), the output signals for FIL1 (c) and FIL2 (d). A constant value of − 0.1 mV, 1.0 mV, 2.5 mV, 3.0 mV, was added to the respective signals, for better
presentation.

Table 3
The maximum distortion [μV] of the PTB signals caused by the methods of powerline reduction, for interference with amplitude A. NT denotes the normalized time of
the calculations.
Method A [mV] NT

0.005 0.05 0.5 5.0 50.0

Ahlstrom-Tompkins [1] 4.538 4.357 4.260 4.490 1983.723 0.01


Hamilton filter [10] 34.163 34.163 34.163 34.163 34.163 0.01
Levkov filter [2] 13.462 13.462 13.462 13.462 13.462 0.26
Ziarani-Konrad [25] 468.601 527.993 619.068 3746.467 36,853.028 0.08
Leski-Henzel [13] 17.492 17.492 17.492 17.492 17.492 1.00
Suchetha-Kumaravel [21] 6.230 7.836 12.272 15.073 36.936 0.09
Mateo et al [18] 26.379 35.723 67.426 139.732 373.197 0.37
FIL1 3.391 10.342 35.536 25.763 26.645 0.76
FIL2 1.258 1.258 1.258 1.258 1.258 0.29

implementation reducing the total cost of ECG signal processing. The computational effort which, however, can be reduced significantly, at
research carried out using the PTB database shows the advantages of the expense of a complicated software implementation.
new most effective method proposed. These advantages involve: higher
efficiency of powerline interference suppression, lower sensitivity to the Credit author statement
values of filter parameters and the possibility to suppress disturbances of
a variable amplitude. The conducted comparison to the methods known Conceptualization: Jacek M. Leski
from the literature show the highest efficiency in noise suppression of Methodology: Jacek M. Leski
the method proposed, with the disadvantage of a significant Software: Jacek M. Leski

7
J.M. Leski Biomedical Signal Processing and Control 69 (2021) 102675

Validation: Jacek M. Leski [7] A. Flaig, G.R. Arce, K.E. Barner, Affine order-statistic filters: “Medianization” of
linear FIR filters, IEEE Trans. Signal Process. 46 (8) (1998) 2101–2112.
Formal analysis: Jacek M. Leski
[8] J. Fodor, M. Roubens, Fuzzy Preference Modelling and Multicriteria Decision
Investigation: Jacek M. Leski Support, Kluwer, Dordrecht, 1994.
Resources: Jacek M. Leski [9] A. Goldberger, L. Amaral, L. Glass, J. Hausdorff, P.C. Ivanov, R. Mark, J.E. Mietus,
Data Curation: Jacek M. Leski G.B. Moody, C.K. Peng, H.E, H.E. Stanley, PhysioBank, physioToolkit, and
physioNet: components of a new research resource for complex physiologic signals,
Writing – Original Draft: Jacek M. Leski Circulation 101 (23) (2000) e215–e220.
Writing – Review & Editing: Jacek M. Leski [10] P.S. Hamilton, A comparison Of adaptive and nonadaptive filters for reduction of
Visualization: Jacek M. Leski power line interference in the ECG, IEEE Trans. Biomed. Eng. 43 (1) (1996)
105–109.
Supervision: Jacek M. Leski [11] M. Kotas, A. Dyrek, M. Piela, J.M. Leski, Clustering based multiple state-space
projections, Signal Process. (2021) (in press).
Acknowledgments [12] J. Leski, Robust weighted averaging, IEEE Trans. Biomed. Eng. 49 (8) (2002)
796–804.
[13] J. Leski, N. Henzel, ECG baseline wander and powerline interference reduction
The author is grateful to anonymous referees for their constructive using nonlinear filter bank, Signal Process. 85 (2005) 781–793.
comments that have helped to improve the quality and presentation of [14] J. Leski, A. Owczarek, A time-domain-constrained fuzzy clustering method and its
application to signal analysis, Fuzzy Sets Syst. 155 (2) (2005) 165–190.
this manuscript. The publication is partially supported by the Rector’s [15] J. Leski, M. Kotas, On robust fuzzy C-regression models, Fuzzy Sets Syst. 279
research and development grant, Silesian University of Technology, (2015) 112–129.
grant no. 02/130/RGJ20/0001, by statutory funds of the Department of [16] C. Levkov, G. Michov, R. Ivanov, I.K. Daskalov, Subtraction of 50Hz interference
from the electrocardiogram, Med. Biol. Eng. Comput. 22 (1984) 371–373.
Cybernetics, Nanotechnology and Data Processing, Silesian University
[17] C. Levkov, G. Mihov, R. Ivanov, I.K. Daskalov, I. Christov, I. Dotsinsky, Removal of
of Technology: BK-2020, BK-2021. power-line interference from the ECG: a review of the subtraction procedure,
Conflict of interests: None declared. BioMed. Eng. OnLine 4 (50) (2005) 1–18.
[18] J. Mateo, E.M. Sanchez-Moria, J.L. Santos, A new method for removal of powerline
interference in ECG and EEG recordings, Comput. Electr. Eng. 45 (2015) 235–248.
Appendix A. Supplementary data [19] S.K. Mitra, J.F. Kaiser (Eds.), Handbook for Digital Signal Processing, John Wiley &
Sons, New York, 1993.
Supplementary data associated with this article can be found, in the [20] S.-C. Pei, C.-C. Tseng, Elimination of AC interference in electrocardiogram using
IIR notch filter with transient suppression, IEEE Trans. Biomed. Eng. 42 (7) (1995)
online version, at https://doi.org/10.1016/j.bspc.2021.102675. 1128–1132.
[21] M. Suchetha, N. Kumaravel, Empirical mode decomposition based filtering
References techniques for power line interference reduction in electrocardiogram using
various adaptive structures and subtraction methods, Biomed. Signal Process.
Control 8 (2013) 575–585.
[1] M.L. Ahlstrom, W.J. Tompkins, Digital filters for real-time ECG signal processing
[22] N.V. Thakor, Y.-S. Zhu, Application of adaptive filtering to ECG analysis: noise
using microprocessors, IEEE Trans. Biomed. Eng. 32 (9) (1985) 708–713.
cancellation and arrhythmia detection, IEEE Trans. Biomed. Eng. 38 (8) (1991)
[2] J.A. van Alste, W. van Eck, O.E. Herrmann, ECG baseline wander reduction using
785–794.
linear phase filters, Compt. Biomed. Res. 19 (1986) 417–427.
[23] P.P. Vaidyanathan, Multirate Systems and Filter Banks, Prentice Hall, New Jersey,
[3] G.R. Arce, A general weighted median filter structure admitting negative weights,
1993.
IEEE Trans. Signal Process. 46 (12) (1998) 3195–3205.
[24] L. Yin, R. Yang, M. Gabbouj, Y. Neuvo, Weighted median filters: a tutorial, IEEE
[4] R. Bousseljot, D. Kreiseler, A. Schnabel, Nutzung der EKG-Signaldatenbank
Trans. Circuits Syst. 43 (3) (1996) 157–192.
CARDIODAT der PTB über das internet, Biomed. Tech. 40 (1) (1995) 317.
[25] A.K. Ziarani, A. Konrad, A nonlinear adaptive method of elimination of power line
[5] C.-H.H. Chu, E.J. Delp, Impulsive noise suppression and background normalization
interference in ECG signals, IEEE Trans. Biomed. Eng. 49 (6) (2002) 540–547.
of electrocardiogram signals using morphological operators, IEEE Trans. Biomed.
[26] International Electrotechnical Commission Standard 60601-3-2, 1999, 15
Eng. 36 (2) (1989) 262–273.
December.
[6] M. Ferdjallah, R.E. Barr, Adaptive digital notch filter design on the unit circle for
the removal of powerline noise from biomedical signals, IEEE Trans. Biomed. Eng.
41 (4) (1994) 529–536.

You might also like