Вы находитесь на странице: 1из 6

The Combination of Kaiser Window and Moving Average for the

Low-Pass Filtering of the Remote ECG Signals

Ying-Wen Bai, Wen-Yang Chu, Chien-Yu Chen, Yi-Ting Lee, Yi -Ching Tsai and
Cheng-Hung Tsai
Department of Electronic Engineering, Fu Jen Catholic University
Taipei, Taiwan, 242, R.O.C., bai@ee.fiu.edu.tw

Abstract
After an analog ECG signal is transferred into digital format, a suitable digital
filter can be used to suppress the high-frequency embedded noise. In this paper, we use
the equiripple FIR low-pass filter by superimposing of the optimal method, the
Butterworth IIR low-pass filter, the 8-point moving-average filter, and the FIR filter
designed by using a Kaiser window. Furthermore, we combine the 8-point
moving-average filter with the FIR filter designed by using a Kaiser window. In addition,
we use the mean square error (M. S. E.) to estimate the effect of the digital filters in order
to compare the reduction of the embedded high-frequency noise. Hence, we compute the
mean square error with respect to the order, N, of these filters and plot the relationship
between M. S. E. and N. Finally, we find the relationship between the CPU time and N.

1. Introduction

An electrocardiogram is generated by a nerve impulse stimulus to a heart. The current


at the body surface will build on the voltage drop, which is a couple of uV to mV with an
impulse variation. Usually, this is a very small amplitude of impulse, which requires a
couple of thousand times of amplification. Simultaneously, the noise embedded in the
measured electrocardiograph of the remote electrocardiogram system is as shown in Fig.
1. On the one hand, in the ECG circuit board of the client site, we usually need a
differential amplifier with a high common-mode rejection ratio that can suppress
common-mode noise. In addition, we also need a low-pass filter to eliminate the
accumulated high-frequency noise [1-3]. However, on the server PC site as shown in Fig.
1, we can only use digital filters, which are implemented by programmable techniques to
suppress the embedded noise of ECG signals.

Proceedings of the 17th IEEE Symposium on Computer-Based Medical Systems (CBMS’04)


1063-7125/04 $ 20.00 © 2004 IEEE
Internet
E thernet
H ub
N etw orks
C lient P C
S erver P C
E C G C ircuit B oard
W ireless N etw ork
M ouse
S ervice
˧ ˼̀ ˸ˀ˗ ̂̀ ˴˼́

˛ ˼˺˻ˀˣ ˴̆̆ ˡ ̂̇˶˻ ˟ ̂̊ ˀˣ ˴̆̆


ˢ ̈̇̃̈̇
˙ ˼˿̇˸̅ ˙ ˼˿̇˸̅ ˙ ˼˿̇˸̅
˗ ˼˺˼̇˴˿ʳ
˘ ˖ ˚ ʳ˦ ˼˺́˴˿

Fig. 1 Hardware block diagram of the remote electrocardiogram system


In this paper, we focus on the reduction of the high-frequency noise by using digital
signal processing (DSP) methods. The typical DSP methods include z-transform, Fourier
transform, convolution, correlation, and filtering, etc. The advantages of DSP methods are
that they are programmable, reliable, high precision and maintainable, as well as easy to
design and obtain a linear phase from which can ascertain that the filters won’t distort the
ECG signal. In this paper, we implement several low-pass filters that have a linear phase
or a near linear phase. These filters are the FIR filter using the window method and the
Kaiser window, the equiripple FIR filter using the optimal method, the Butterworth IIR
filter using the Bilinear Z-transform method, the 8-point moving-average FIR filter, and
combinations of some of the previously mentioned filters [6-8].
To evaluate the performances of different filters, we construct the ECG signal model
and add noise to it. Then we can obtain the M.S.E. comparison for each filter.
Because the FIR filter using the Kaiser window and the 8-point moving-average FIR
filter have advantages of better performances at the low and high frequency parts
respectively, thus, we use them in combination to reduce noise. We also calculate the
M.S.E. and use these filters to process the ECG signals. At last, we consider the
relationship between the M.S.E. and N, as well as CPU time with respect to N.
This paper is organized as follows. In Section 2, the related DSP mathematical
formulas are presented. In Section 3, the processing results of the related DSP filters are
described. In the final Section, our conclusions are presented.

2. The related mathematical formula

The typical operation of an FIR digital filtering is defined as Eq. (1).


N
y ( n) ¦ h(k ) x(n  k ),
k 0
(1)

Where h( k ), Γk 0, 1Γ

 , N are the coefficients of a filter.
Then we define the Mean Square Error (M. S. E.) as shown in Eq. (2) as a criterion
of evaluating the ability of reducing the noise of the various filters. In other words, we put

Proceedings of the 17th IEEE Symposium on Computer-Based Medical Systems (CBMS’04)


1063-7125/04 $ 20.00 © 2004 IEEE
the ideal signal with the embedded noise into the digital FIR filters, and show the
difference between the output signal and the ideal signal.
NP
1
M .S . E .
NP
¦ y[ n ]  x
n 1
ideal [n ] ,
2
(2)

N P represents the sampling points, and comes from the ideal resolution of the ECG
signal we constructed. xideal [n ] is a sequence of the ideal waveform, and y[n ] is a
output signal of digital filters where the input signal is x[n ] which the noise is
embedded in.
To evaluate the performance of the filters, we need to construct an ECG signal model.
The standard 745-point ECG signal model is shown in the left side of Fig. 3 [3-7].
When we design the filter, generally, we will make our decisions on the bound of the
filter order first because of the upper limit of the system performance. Then we can obtain
the best frequency response by specifying a specific set of parameters. However, there
must be a trade-off between the performance and the order of the corresponding filters.
Here, the filter order is limited at an upper limit of 41 as shown at the right side of Fig. 2.

1
R W in d o w M e th o d (K ais e r )b e ta =3 .4
0.55 B u tte r wo rth
0 .8
QRS wave E q u irip p le
0 .5

0.45
Bandwidth ( 'Z/S )

0 .6
Amplitude in volts

T wave 0 .4

0 .4
0.35
P wave
0 .3
0 .2

0.25
0
0 .2

-0 .2 0.15
Q T h e 8- p oin t M ovin g Averag e
S 0 .1
-0 .4
is h ard to d efin e.
0 0.1 0.2 0. 3 0. 4 0 .5 0.6 0.7 0.8
0.05
Time in secon ds 5 10 15 20 25 30 35 40 45
F ilter or de r ( N )

Fig. 2 The standard 745-point ECG signal model and the transition bandwidth vs.
the order of the low-pass filters
From the right side of Fig. 2, we find the transition bandwidths of all the designs are
shorter as the filter order N increases. Although we can obtain the shorter transition
bandwidth with the same filter order by the Butterworth IIR filter here, its phase is not
entirely linear in the passband and thereby its performance should be evaluated more
carefully with M.S.E. Besides, we can find that the filter, by using a Kaiser window has a
shorter transition bandwidth than the equiripple FIR filter under the same filter order.

3. The processing results by the related DSP filters

We synthesized both the ECG model established previously and the 100Hz and 200Hz
noise. Furthermore, we filtered these mixed signals through the filters. The waveforms

Proceedings of the 17th IEEE Symposium on Computer-Based Medical Systems (CBMS’04)


1063-7125/04 $ 20.00 © 2004 IEEE
embedded in 100Hz or 200Hz noise are respectively filtered by the FIR low-pass filter by
the window method using a Kaiser window with N=41 Overall, we can observe that the
performance of the 8-point moving-average FIR filter is the best among these filters when
the noise frequency is near 100Hz. Besides the 8-point moving-average FIR filter, the
FIR filter using a Kaiser window not only has a great performance when the noise
frequency is 200Hz but also is better than the others when the noise frequency is 100Hz.
In addition to the previous observation with the naked eyes, we use M.S.E. as the
evaluating index of the performances. To figure out the performances of the previous
filters under different noise frequencies, we add these noises to the ECG model and
process them with the filters. Here, we can summarize that the moving-average filter and
the FIR filter made by a Kaiser window have good performances respectively at the lower
and the higher frequency. Thus, we have an ideal of creating a filter by combining an
8-point moving-average filter with the FIR low-pass filter using the window method with
a Kaiser window to include both of their advantages as shown at the left bottom of Fig. 3
and Fig. 4 respectively.

E C G m o d el 4 1 th b e ta = 3 . 4 K a i s e r 4 1 th E q u i r ip p le
1 1 .5 1 .5

0 .8

0 .6 1 1

0 .4
0 .5 0 .5
0 .2

0
0 0
- 0 .2

- 0 .4 - 0 .5 - 0 .5
0 0.5 1 0 0.5 1 0 0.5 1

2 1 th B u t te rw o r th MA8 M A 8 + k A IS E R
1 .5 1 1

0 .8 0 .8
Amplitude in Volts

1
0 .6 0 .6

0 .4 0 .4
0 .5
0 .2 0 .2

0 0
0
- 0 .2 - 0 .2

- 0 .5 - 0 .4 - 0 .4
0 0.5 1 0 0.5 1 0 0.5 1
T im e in s e c o n ds

Fig. 4 The 100Hz noise filtering

Proceedings of the 17th IEEE Symposium on Computer-Based Medical Systems (CBMS’04)


1063-7125/04 $ 20.00 © 2004 IEEE
E C G m o d el 4 1 th b e ta = 3 . 4 K a i s e r 4 1 th E q u i r ip p le
1 1 1

0 .8 0 .8 0 .8

0 .6 0 .6 0 .6

0 .4 0 .4 0 .4

0 .2 0 .2 0 .2

0 0 0

Amplitude in Volts
- 0 .2 - 0 .2 - 0 .2

- 0 .4 - 0 .4 - 0 .4
0 0.5 1 0 0.5 1 0 0.5 1

2 1 th B u t te r w o r th MA8 M A 8 + k A IS E R
1 1 1

0 .8 0 .8 0 .8

0 .6 0 .6 0 .6

0 .4 0 .4 0 .4

0 .2 0 .2 0 .2

0 0 0

- 0 .2 - 0 .2 - 0 .2

- 0 .4 - 0 .4 - 0 .4
0 0.5 1 0 0.5 1 0 0.5 1
T im e i n s e c o n d s

Fig. 5 The 200Hz noise filtering


After comparing of M.S.E., we need to consider the other important factors of ECG
signal processing. Fig. 6 is the diagram for the CPU time with respect to the filter order N.
From Fig. 6, we can find that the 8-point moving-average filter has the lowest CPU time
level due to solely to the average computation of the eight points of the ECG signals. We
concentrate on the remaining two filters. The combination of the 8-point moving-average
filter and the FIR filter designed by using a Kaiser window has a reasonable CPU time
which is slightly longer than the filter that only uses the Kaiser window.
x 10
-3 10 0 H z x 10
-3 120H z
5 3
0.24 Window Method(Kaiser)
4 2 .5 Kaiser
Butterworth But ter
2
0.22 Equiripple Equirip ple
MSE

3
MSE
Average CPUTIME in secs

Combination of M A8 and Kaise r


Window Method(Kaiser) + Moving Average 1 .5
2
0.2 1
1 0 .5
0.18
0 0
0 20 40 60 0 20 40 60
Or d er(N ) O rd er(N )
0.16 -4 -4

4
x 10 14 0H z 4
x 10 1 6 0H z
0.14
MSE

MSE

0.12 2
2

0.088077 (8-point Moving Average)


0.1

0 0
0.08 0 20 40 60 0 20 40 60
5 10 15 20 25 30 35 40 45
Or d er(N ) O rd er(N )
Filter order (N)

Fig. 6 CPU time with respect to the filter order N of the filters and M.S.E. with
respect to the filter order N of the filters for the different noise frequencies

4. Conclusions

According to our experimental results, we found that the high-frequency noises


embedded in the remote ECG signal can be suppressed, by using the digital signal
processing methods. With these methods, we implemented several filters and one
combination of them. These filters are the FIR filter using a Kaiser window, the

Proceedings of the 17th IEEE Symposium on Computer-Based Medical Systems (CBMS’04)


1063-7125/04 $ 20.00 © 2004 IEEE
equiripple FIR filter using the optimal method, the Butterworth IIR filter using the
Bilinear Z-transform method, the 8-point moving-average FIR filter, and combinations of
some of the previous filters. Then we observe the frequency response of the 8-point
moving-average FIR filter and use these filters to filter waveforms which contain 100Hz
and 200Hz noise separately. We find that the 8-point moving-average FIR filter has a
good performance at the lower frequency band and the FIR filter by using a Kaiser
window has a good performance at the higher frequency band. Furthermore, we compare
the performances by using M.S.E. as an index. The smaller M.S.E. represents the better
performance of filters and is close to the ideal waveforms. In order to implement the filter
which includes these two filters’ advantages, we combine the 8-point moving-average
FIR filter with the FIR filter by using a Kaiser window. We can easily find that the
performance of this combined filter is better than that of the other filters at not only the
higher frequency band but also the lower frequency band. In addition, among these filters,
as the higher filter order uses more CPU time, we show the diagram of CPU time vs. N to
observe and compare. Eventually, the M.S.E. with respect to the filter order N of the
filters in the different noise frequency bands is shown. The new combinative filter has the
best performance in reduce the high-frequency noise and M. S. E. with less CPU time.

References:

[1] Hamid Gholam-Hosseini, Homer Nazeran, Karen J. Reynolds, “ECG Noise Cancellation Using Digital
Filters,” Proceedings of the 2nd International Conference on Bioelectromagnetism, 15-18 Feb. 1998, pp.
151 – 152.
[2] Ronald E. Barr and Mohammed Ferdjallah, “Frequency-Domain Digital Filtering Techniques for
Selective Noise Elimination in Biomedical Signal Processing,” 1990. Proceedings of the Twelfth Annual
International Conference of the IEEE, 1-4 Nov. 1990, pp. 813 – 814.
[3] C. Weaver, J. Von Der Groeben, P. Mantey, J. Toole, C. Jr. Cole, J. Fitzgerald, and R. Lawrence, “Digital
Filtering with Applications to Electrocardiogram Processing,” IEEE Transactions on Audio and
Electroacoustics, Volume: 16, Issue: 3, Sep 1968, pp. 350 – 391.
[4] A. Link, P. Endt, M. Oeff and L. Trahms, “Variability of the QRS Signal in High-resolution
Electrocardiograms and Magnetocardiograms,” IEEE Transactions on Biomedical Engineering, Feb
2001, Vol.48, Issue.2, pp.133-142.
[5] S. O. Aase, T. Eftestol, J. H. Husoy, K. Sunde and P. A. Steen, “CPR Artifact Removal from Human
ECG using Optional Multichannel Filtering,” IEEE Transaction on Biomedical Engineering, Nov. 2000,
Vol. 49, Issue II, pp.1440-1449.
[6] L. Gyongy and L. Jobbagy, “Weighted Averaging of ECG Signal Based on the Number of Turning
Points,” Proceedings of the First Joint Conference on Engineering in Medicine and Biology Engineering
Society, 1999, Vol. 1, pp. 295.
[7] Rangaraj M. Rangayyan, Biomedical Signal Analysis, John-Wiley, 2002.
[8] Emmanuel C. Ifeachor and Barrie W. Jervis, Digital Signal Processing, Prentice Hall, 2002.
[9] Sanjit K. Mitra, Digital Signal Processing: A Computer-Based Approach, McGraw-Hall, 2001.
[10] Ying-Wen Bai and Jer-I Chu. “Noise Reduction in a Remote Measurement System by Using DSP
Software Methods,” Accepted by IASTED International Conference on Networks, parallel and
Distributed Processing, and Applications (NPDPA 2002).
[11] T. W. Parks, J. H. McClellan, “Chebyshev Approximation for Nonrecursive digital Filters with Linear
Phase,” IEEE Trans. on Circuit Theory, CT-19: 189-194, 1972.
[12] O. Herrmann, “Design of Nonrecursive Digital Filters with Linear Phase,” Electron. Lett., Vol. 6, No. 11,
pp. 189-194, Mar. 1972.

Proceedings of the 17th IEEE Symposium on Computer-Based Medical Systems (CBMS’04)


1063-7125/04 $ 20.00 © 2004 IEEE

Вам также может понравиться