the elimination of 50 hz power line interference from … elimination of 50 hz power line...

4
Life ScienceJournal, 3 (4), 2006, Wan, et al, The Elimination of 50 Hz Pawer Line Interferencefrom EGG The Elimination of 50 Hz Power Line Interference from ECG Using a Variable Step Size LMS Adaptive Filtering Algorithm Hong Wanl,2, RongshenFul, Li Shil 1. College of ELectric Engineering, Zhengzhou University, Zhengzhou, Henan 450052, China 2. The Information Engineering University of PLA, Zhengzhou, Henan 450052, China Abstract: This article demonstrates" a new variable step size LMS adaptive filtering algorithm" to eliminate 50 Hz power line interference. This approach can provide faster convergencerate and smaller mean square error (MSE). [LifeScienceJournal.2006;3(4) :90 - 93] (ISSN: 1097 - 8135). Keywords:adaptive filter; LMS algorithm; 50 Hz power line interference Abbreviations:ECG: electrocardiogram; LMS: least mean square; MSE: mean square error; SNR: signal to noise ratio; NLMS: normalized least mean square;SVSLMS: S-function variable step least mean square 1 Introduction ECG signal is always interrupted by mixed in- terferences, such as 50 Hz power line interference, respiratory and muscle electric interference etc. Specifically, since signal to noise ratio (SNR) of electrocardiogram (ECG) signal is very low, the interfering frequency at 50 Hz may overwhelm the source signal. Methodologically, elimination of 50 Hz interference hqs been discussed a lot[1,2]. Ma- jorityof the approaches suppose the 50 Hz power line interference frequency not to fluctuate. In this short report, we use a variable step size least mean square (LMS) adaptive filtering algorithm to elimi- nate the 50 Hz power line interference whose fre- quency has small fluctuation from ECG signal. The LMS algorithm and stochastic gradient algo- rithm[3,4], introduced by Widrow and Hoff in 1960, is widely used in practice because of its sim- plicity, computational efficiency, and good perfor- mance under a variety of operating conditions. LMS algorithm is based on mathematical method of the steepest decline, which is to define a perfor- mance function along the vector in the direction to- ward negative gradient of the steepest value to get itself recovery. Figure 1 shows the basic of LMS algorithm. The LMS algorithm can be summarized as L Y ( n ) = L: W;x ( n -1) = WT X (1) ;=0 where X (k) = [x (k ), x (k - 1) , ... , x (k ~L+ 1) ]T and filtering coefficient W is defined as W (k) =[wo(k), wl(k),"',WL-l(k)]T, Lis the number of filtering order; Wi is the filtering co- efficient. The optimization can be determined by using LMS algorithm as OP procedures: j y(n)=wT(n)*x(n) OP = e(n)=d(n)-y(n) wen) = wen -1) +2 * u * e(n) * x(n) J where u is the step-size control parameter. The adaptation parameter, step size u select- ed, must be small enough to ensure fhat the algo- rithm converges to the optimum point. However, this small step size causes slow convergence. As a matter of fact, the convergence condition can be satisfied by choosing the range 0 < u < TiR]' Where T r [R] denotes the trace of R and R is the ~ (FiLtering) (Error formation) ( Confficient updation) auto-correlation of X. The convergence rate is pro- portional to the variation of parameter u [5]. If u increases, the y will converge faster but increases mean square error (MSE) and decreases the stabili- ty margin. In order to resolve this contradiction, we proposed a new algorithm to modify the variable step size LMS adaptive algorithms. . 90 . r ~ ~ I ~ 1, ~ JI ~ JI t .. .. ~ JI I ) J f - ~ ~ J , ~ --'

Upload: doanbao

Post on 23-Apr-2018

215 views

Category:

Documents


1 download

TRANSCRIPT

Life ScienceJournal, 3 (4), 2006, Wan, et al, The Elimination of 50 Hz Pawer Line Interferencefrom EGG

The Elimination of 50 Hz Power Line Interference

from ECG Using a Variable Step Size LMSAdaptive Filtering Algorithm

Hong Wanl,2, RongshenFul, Li Shil

1 . College of ELectric Engineering, Zhengzhou University, Zhengzhou, Henan 450052, China

2. The Information Engineering University of PLA, Zhengzhou, Henan 450052, China

Abstract: This article demonstrates" a new variable step size LMS adaptive filtering algorithm" to eliminate 50 Hzpower line interference. This approach can provide faster convergencerate and smaller mean square error (MSE).[LifeScienceJournal.2006;3(4) :90- 93] (ISSN: 1097- 8135).

Keywords:adaptive filter; LMS algorithm; 50 Hz power line interference

Abbreviations:ECG: electrocardiogram; LMS: least mean square; MSE: mean square error; SNR: signal to noiseratio; NLMS: normalized least mean square;SVSLMS: S-function variable step least mean square

1 Introduction

ECG signal is always interrupted by mixed in-terferences, such as 50 Hz power line interference,respiratory and muscle electric interference etc.Specifically, since signal to noise ratio (SNR) ofelectrocardiogram (ECG) signal is very low, theinterfering frequency at 50 Hz may overwhelm thesource signal. Methodologically, elimination of 50Hz interference hqs been discussed a lot[1,2]. Ma-jorityof the approaches suppose the 50 Hz powerline interference frequency not to fluctuate. In thisshort report, we use a variable step size least meansquare (LMS) adaptive filtering algorithm to elimi-nate the 50 Hz power line interference whose fre-quency has small fluctuation from ECG signal. TheLMS algorithm and stochastic gradient algo-rithm[3,4], introduced by Widrow and Hoff in

1960, is widely used in practice because of its sim-plicity, computational efficiency, and good perfor-mance under a variety of operating conditions.LMS algorithm is based on mathematical method ofthe steepest decline, which is to define a perfor-mance function along the vector in the direction to-ward negative gradient of the steepest value to getitself recovery. Figure 1 shows the basic of LMSalgorithm. The LMS algorithm can be summarizedas

L

Y ( n ) = L: W;x ( n -1) = WT X (1);=0

where X (k) = [x (k ), x (k - 1) , ... , x (k ~ L +

1) ]T and filtering coefficient W is defined asW (k) =[wo(k), wl(k),"',WL-l(k)]T, Listhe number of filtering order; Wi is the filtering co-efficient. The optimization can be determined byusing LMS algorithm as OP procedures:

j

y(n)=wT(n)*x(n)OP = e(n)=d(n)-y(n)

wen) = wen -1) +2 * u * e(n) * x(n)

Jwhere u is the step-size control parameter.

The adaptation parameter, step size u select-ed, must be small enough to ensure fhat the algo-rithm converges to the optimum point. However,this small step size causes slow convergence. As amatter of fact, the convergence condition can be

satisfied by choosing the range 0 < u < TiR]'Where T r [R] denotes the trace of R and R is the

~

(FiLtering)(Error formation)( Confficient updation)

auto-correlation of X. The convergence rate is pro-portional to the variation of parameter u [5]. If uincreases, the y will converge faster but increasesmean square error (MSE) and decreases the stabili-ty margin. In order to resolve this contradiction,we proposed a new algorithm to modify the variablestep size LMS adaptive algorithms.

. 90 .

r

~

~

I

~

1,

~JI

~

JI

t

..

..~JI

I

)

Jf-

~~

J,~

--'

I ...

~

Life ScienceJournal, 3 (4), 2006, Wan, et al , The Elimination of 50 Hz Power Line Interferencefrom ECG

M - d (n) = s (n) + N (n)81n

cru..:nne I

Rererence x(n) = N ten)channel

...

+L

yen)Adaptive

filter

...

Figure 1. The structure of LMS algorithm

I...

lllstead of using numbers, normalized leastmean square (NLMS) algorithm[6] modify u bydefining variables a and (3

u(n)=(3 aT =(3+ a( ) (2)+ x nxn r n

where r ( n ) = x '!:xn is defined as the interior prod-uct of the input vector x ( n ) .

The value of u ( n) has to be put small value toavoid the decreasing stability, therefore, a must bepositive number in 0 < a < 1 and ~~ O. 0001.NLMS algorithm can effectively reduce amplifyinggradient noise in the process of convergence, andkeep the good convergence rate eventually.

In order to improve the performance of the fil-ter, Tan et al[7] proposed a new variable step sizeLMS adaptive algorithm, S-function variable stepleast mean square (SVSLMS) algorithm, whichdefine u ( n) as a Sigmoid function of e ( n ) ,

1u(n) = (3(1+ E( - a IIe(n)x(n)ll) -0.5) (3)

The advantage of this algorithm is that thestep size is bigger in preliminary stage of unkJlnwn

...

~

~

O"'! rI

a: ""5, ,6 '7{ I

,ft:,,:,.In,,)j

/1 0.'=4.,0=(1.

I

0:6,

% 0.""

015

0 I.!!>

-;; Ii ~-

~(a)

e(n)

system, so having faster convergence rate. Whenthe algorithm has already converged, no matterhow big the input interference was, it can keepvery small step size to obtain very small MSE.

2 Experiment and Method

To overcome the imperfection of SVSLMS al-gorithm[8], we use a new variable step size LMSadaptive filtering algoJ;:ithm.

2

u(n)=(3(1-e(lIe(n)x(n)ll » (4)Figure 2 (a) shows the result of using

SVSLMS algorithm for analysis. The error func-tion e ( n) alternated near zero where the algorithmhas steadied or will steady. But u ( n) changes toofast. The step size of SVSLMS algorithm varies inphase at adaptive steady state. This is our majorconcern. When (3 is in the rang of 0< (3< 2IAmax,in contrary, the proposed algorithm controls theshape of the function, further more (3> 0 controlsthe value range of the function of u ( n) if a :;>O.Obviously, we should conclude 0< f1.< 1~ and0< (3< llAmax'

91 .

ll~/1#..iI §

tl..KI~,

.' , '~,

'.,

- -,..iHfn}f:j.

~~;,~..~J~

I....

...Figure 2. (a)The graph of u (n) and IIe( n) II (SVSLMS algorithm) (b)The graph of u (n) and II e (n)x (n) II (pro-posed algorithm)

~I

I\-I

~

.'

(I I

q

.'

,.~ .

o~; ~~ ~

(b)

,.

very small. When the input signal is non-stationaryrandom signals, the instantaneous change of inputsignal causes II e ( n ) X ( n) II' to change verymuch. It causes the algorithm automatically in fastconvergence condition. The relational graph of u(n) and II e ( n ) X ( n) II is shown in Figure 2(b). From the Figure 2, in order to accelerate con-vergence rate, a and fJ should be big. In contrary,make the MSE smaller, a and fJ should be smaller.

J)I})

~J,\/~

I~

Life ScienceJournal, 3 (4), 2006, Wan, et al , The Elimination of 50 Hz Power Line Interference from ECG

3 Result and Discussion

In equation (1), II e ( n ) X ( n) II is very bigand f1 ( n ) ~ fJ initially as well as obtained thebiggest convergence rate. Being close to steadystate, II e(n)X(n) IIwill reduce. When it reach-es the steady state, both II e ( n ) X ( n) II andu ( n) becomes very small, and the MSE is also

0.9

0.8

0.7 ,.LMS

D.6 NLMS

/"' SVLMS~ D.5

D.4

D.3

D.2

D.l

°D

J

JI

JI

J

)

THE NEW ALGORITHM

JI

I)~

!JJtJJ

JJ

Itt),

Figure 3. The convergencerate

16DO

Figure 3 is the result of examining the conver-gence performance of algorithms through the com-puter simulation. It shows the performance ofSVSLMS and LMS as well as NLMS. Comparingwith the SVSLMS, the convergence rate of theproposed algorithm is faster, and makes the MSEsmaller enough.

This report presents new variable step sizeLMS adaptive filtering algorithm to eliminate the

50 Hz interference from the ECG. The block dia-gram is shown in Figure 1. Performance of thenoise cancellation was tested by using stationary in-put signal ECG with 50 Hz sine wave added butfrequency is undulating between 50 + 1 Hz and 50- 1 Hz that models the input of main channel. Sinewave whose frequency fluctuates between 50 - 1 Hzand 50 + 1 Hz models the input of reference chan-nel. The result of simulation is shown in Figure 4.

J

f

I

I;I

I

,~:~:3~-~ "~~0. ..~~Ja0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

1

0.5

WNNNAWAlh~~~~~\~_NN_'M~IfN~MWfN~NNlI'h.I'NNN'~;b

J0

j

JI

-0.50 1000 2000 3000 4000 5000 6000 1'000 8000 9000 10000

:~b:~~ ~..:=~~~ 'lc0 1000 2000 3000 4000 5000 6000 7000 8000 9000 10000

.J

I

I

~'!-

Figure 4. The result of simulation

(a): The ECG signal; (b): The ECG signal with 50 Hz interference; (c) The result of proposed elimination processing ..t

~

. 92 .

}1J.~

j

l

,~:l

Life ScienceJour=l, 3 (4), 2006, Wan, et aI, The Elimination of 50 Hz Poz.verLine Interference from ECG

0.6

::~~~ -0.20 2000 3000 40001000

0.6

a

5000 8000 9000 100006000 7000

0.41-

~ ~ JQ21- . ~b

0 ~--j\.J /\\ /\\--. r~\ j //~ J'\

L

-0.20 2000 3000 40001000~

--'--5000 7000 9000 100006000 8000

..

Figure S. The real ECG signal(a): The real ECG signal with 50 Hz interference; (b): The result of processing

'r. In practice, we choose the reference channelwhich contains the 50 Hz interference and its har-monic- The common-mode signal recorded at theright leg reference electrode[9] which is truly corre-lated with the noise in ECG recording. The resultof processing is shown in Figure 5. We see that 50Hz interference to ECG is violent before processingand restrained after processing-l

4 Conclusionl

\

\ The approach proposed improves the conver-gence rate to enhance the calculation speed, causethe algorithms being more advantageous to apply inthe real-time processing and reduce the MSE so asto improve the quality of eliminating interference.The result obtained by theory and simulation showsthat this algorithm, compared with traditionalLMS algorithm and other improved LMS algo-rithm, is much more effective to eliminate the 50Hz interference from ECG signal.

II;

..

.. Correspondence to:Hong WanSchool of Electric EngineeringZhengzhou UniversityZhengzho~, Henan 450002, China

~

-~"

t

Telephone : 86-138-3858-0642Email: [email protected]

References1. Levkov C, Michov G, Ivanov R, Daskalov IK. Subtrac-

tion of 50 Hz interference from the electrocardiogram.Med & Bioi, Eng & Comput 1984; 22: 371- 3.

2.Christov II, llitsinsky IA. New approach to the digitalelimination of 50 Hz interference from the electrocardio-gram. Med & BioI, Eng & Comput 1988; 26: 431-4.

3. Widrow B, Stearns SD. AdaptiveSignal Processing. NJ:EnglewoodCliffs, Prentice Hall, 1985.

4. Haykin S. AdaptiveFilter Theory. Prentice Hall, Engle-wood Cliffs, NJ 1996.

5. Widrow B, Stearns SD. Adaptive Signal Processing.New York: Prentice-Hall 1985.

6. Haykin S. Adaptive Filter Theory. 3rd Edition. PrenticeHall 2002.

7. Qin JF, Ouyang JZ. A new variablestep sizeadaptive fil-tering algorithm. Data Gathering and Processing 1997;12(3): 171-4.

8. Karni S, Zeng G. A new convergencefactor for adaptivefilters. IEEE Trans. Circuits Syst 1989; 36: 1011- 2.

9. Thakor NY, Sheng ZY. Applicationof adaptive filteringto ECG analysis: noise cancellationand arrhythmia detec-tion. IEEE Trans on BiomedicalEngineering 1991; 38(8): 785-94.

ReceivedJune 17, 2006

..

. 93 .