Application of Variable Step LMS Algorithm Based on

0 downloads 0 Views 225KB Size Report
Keywords- ECG signal; Industrial frequency interference;. Adaptive noise canceling system; Variable step LMS Algorithm. I. INTRODUCTION. Electrocardiogram ...
Application of 9ariable 6tep LMS $lgorithm %ased on ,terative 7ime in ECG 6ignal $bstraction Zhao Jiyin

Li Jianpo*, Zheng Ruirui, Sun Junxiang

College of Electromechanical & Information Engineering Dalian Nationalities University Dalian, China [email protected]

College of Communication Engineering Jilin University Changchun, China [email protected]

Abstract— The existence of industrial frequency interference brings serious influence to electrocardiogram (ECG) signal diagnosis and analysis. The industrial frequency interference should be restrained. Adaptive filter is a primary method to filter ECG signal, because it does not need the signal statistical characteristic. LMS algorithm is one of the most universal adaptive arithmetic. The step value should be selected suitably in order to achieve fast convergence. The paper introduces a variable step LMS algorithm based on iterative time. It restrains the industrial frequency interference of electrocardiogram signal through adaptive noise canceling system. The experimental results demonstrate the variable step LMS algorithm based on iterative time has better filter effect. The signal to noise ratio improves 46.0149dB. At the same time, it has fast convergence speed. The validity and advantage in restraining industrial frequency interference are validated. It has important academic meaning and applied value. Keywords- ECG signal; Industrial frequency interference; Adaptive noise canceling system; Variable step LMS Algorithm

I.

INTRODUCTION Electrocardiogram (ECG) signal is the body exterior represent of heart electrical activity. It belongs to weak signal model. Some kinds of interference will be introduced inevitably during the ECG signal detection. Especially the introduced industrial frequency interference covers the exiguous turning point of electrocardiogram signal, which brings serious influence to ECG signal diagnosis and analysis. It is the key of ECG signal pretreatment [1]. At present, there are some methods to design the ECG signal filter, such as adaptive filter. Because adaptive filter does not need the signal statistical characteristic, it is applied abroad to biomedicine information processing [2]. Fixed step LMS (FLMS) algorithm and variable step LMS algorithm are the two main methods in adaptive filter design. The fixed step LMS algorithm has slow convergence speed. The variable step LMS algorithm has big calculation quantity. So the step value optimization and choice determine filter precision and convergence speed [3]. The introduced variable step LMS algorithm based on iterative time (VILMS) has high signal to noise ratio (SNR), small calculation quantity, and fast convergence speed.

II.

ADAPTIVE NOISE CANCELING SYSTEM OF ECG SIGNAL

The character of adaptive filter is that it can adjust its parameter automatically in order to satisfy the demand of a certain rule and achieve optimization filter when the signal statistical characteristic is unbeknown or the statistical characteristic of input process has changed [3]. Adopting adaptive processing, especially adaptive noise canceling system is a universal method to restrain industrial frequency interference of ECG signal. The structure figure of adaptive noise canceling system is listed as Fig.1 Fig.1 shows the system uses the relativity of input noise and the independence between signal and noise. Adaptive filter achieves error signal by subtracting the main input noise from the reference input. The output of adaptive filter (y) is the optimal estimation of n0. The system output (z) is the optimal estimation of ideal signal (s) [4-5]. The adaptive filter algorithm is the kernel to restrain noise. The different adaptive filter algorithm has different convergence speed and algorithm complexity. A. Fixed step LMS (FLMS) algorithm LMS algorithm is a method to estimate grads vector with instantaneous value [6]. In fact system, it does not need calculate the correlation function of input signal and the inverse matrix, which indicates the facility and high efficiency.

Figure 1. Adaptive noise canceling system of ECG signal This work is supported by Science and Technology Foundation Project in Introducing Specialist of Dalian Nationalities University (Project Number: 20086201) *Corresponding Author

978-1-4244-1748-3/08/$25.00 © 2008 IEEE

Error estimation e(n) is T

e ( n) = d ( n) − W ( n ) X ( n )

(1)

Coefficient updating formula is W (n + 1) = W (n) + µ e(n) X (n)

(2)

Here step µ is a convergence factor to control adaptive speed and stability. To ensure algorithm convergence, the step value range is 0 < µ < 2 tr[ R ]

(3)

Here R is self-correlation matrix of input signal. tr[ R] is the trace of matrix. B. Normalized LMS (NLMS) algorithm Normalized LMS algorithm [6] adopts variable step method to shorten adaptive convergence process. It bases on the basic idea of LMS algorithm. It estimates mean squared error (MSE) with instantaneous squared error. Considering the differential coefficient based on instantaneous squared error is not equal to the differential coefficient of MSE, modified weight coefficient iterative formula is w(n + 1) = w(n) + ª¬ µ ( γ + xT (n) x(n) ) º¼ e(n) x(n)

(4)

Here variable step can be shown µ (n)

µ ( n) = µ ( γ + x T ( n) x ( n) )

(5)

Here µ parameter is fixed convergence factor to control maladjustment. γ parameter is set to avoid xT (n) x(n) being too small and µ (n) step being too big, 0 ≤ γ ≤ 1 . To ensure that adaptive filter work stably, the range of fixed convergence factor should satisfy the following value. 0 µ (n) α ° µ (n + 1), ot her s ¯

(8)

In the adaptive process, iterative time (n) and the range of plus constant (c) become large gradually. Considering algorithm convergence, the minimum of constant (c) should be

cmin = ¬«tr[ R] 2¼» . In step expression, the smaller is c value, the longer is the step and quicker convergence speed. So the optimal c value should be c = «¬tr[ R] 2»¼

The calculation quantity comparing of fixed step LMS (FLMS) algorithm, normalized LMS (NLMS) algorithm, Error normalized variable step LMS (ENVLMS) algorithm, and variable step LMS algorithm based on iterative time (VILMS) is listed in table 1 (supposing the filter rank is M). In table 1, the calculation quantity of NLMS is the most. The others have almost same calculation quantity. ENVLMS need compare current step with the last time before choice. VILMS is relatively simple.

TABLE I.

CALCULATION QUANTITY COMPARING OF THE FOUR KINDS OF ALGORITHM IN EVERY COEFFICIENT UPDATING Algorithm FLMS NLMS ENVLMS VILMS

Multiplication Times M+1 2M+2 M+5 M+2

IV.

Addition Times M+1 2M+2 M+1 M+1

EXPERIMENT ANALYSIS AND RESULT

To prove the difference of SNR and convergence speed among VILMS algorithm, FLMS algorithm, and NLMS algorithm, according to Fig.1, the above algorithm is used to filter industrial frequency interference of ECG signal. In adaptive noise canceling system, the original input is ECG signal containing 50Hz industrial frequency interference. The reference input of adaptive filter is cosine signal with same frequency. The filter rank is two. Sampling frequency is 200Hz. The algorithm runs in Matlab6.5. The result is listed in Fig.2. 4

200

6

x 10

100 4

0 -100

2

-200 -300

0

200

6

0 100 200 300 400 500 ECG signal containing industrial frequency interference

0

20 40 60 80 Frequency spectrum of ECG signal

100

4

x 10

100 4

0 -100

2

-200 -300

0

100 200 300 400 Filter output of LMS algorithm

500

0

0 20 40 60 80 100 Frequency spectrum after LMS algorithm filter 4

200

6

x 10

100 4

0 -100

2

-200 -300

0

100 200 300 400 Filter output of NLMS algorithm

500

0

0 20 40 60 80 100 Frequency spectrum after NLMS algorithm filter 4

200

6

x 10

100 4

0 -100

2

-200 -300

0

100 200 300 400 Filter output of VILMS algorithm

500

0

0 20 40 60 80 100 Frequency spectrum after VILMS algorithm filter

Figure 2. Original signal and filter output

In the experiment, µ of FLMS algorithm is 0.001. µ of NLMS algorithm is 0.1, γ is 1. Constant c of VILMS is 13, original power coefficient is 0. Fig.2 shows that the three kinds of algorithm all can restrain industrial frequency interference of ECG signal. VILMS algorithm can filter industrial frequency interference effectively in the fastest and best way, whose filter effect is the best. NLMS algorithm takes second place. LMS algorithm is bad. Table 2 gives the contrast of the three kinds of algorithm in SNR and calculation time. VILMS algorithm gets the highest SNR, which improves 46.0149dB. NLMS algorithm takes second place, which improves 36.9235dB. Because VILMS algorithm adopts variable step, its operation time is not the shortest compared with LMS algorithm. It says the calculation quantity of LMS is the least and calculation quantity of NLMS algorithm is the most, which is consistent with the above theoretical discussion. TABLE II.

Fig.3 shows that the convergence speed of VILMS algorithm is the fastest. NLMS algorithm takes second place. Because the step is longer at the beginning of iterative process, the corresponding error is bigger and becomes small gradually. V.

Variable step LMS algorithm based on iterative time can restrain effectively industrial frequency interference of ECG signal. In adaptive noise canceling system, fixed step LMS algorithm, normalized LMS algorithm, and Variable step LMS algorithm based on iterative time are used to restrain industrial frequency interference of ECG signal. The experiment results demonstrate the filter effect of variable step LMS algorithm based on iterative time is best. The Signal to Noise Ratio improves 46.0149dB. At the same time, it has fastest convergence speed. The algorithm has important applied value and academic meaning to adaptive filter design. It gives a new method to the choice of step.

PERFORMANCE CONTRAST OF THE THREE KINDS OF

REFERENCES

ALGORITHM

SNR Before Filter -0.0909 -0.0909 -0.0909

Algorithm LMS NLMS VILMS

SNR After Filter 25.1409 36.8326 45.9240

[1] SNR Improving

Calculation Time

25.2318 36.9235 46.0149

0.02s 0.51s 0.03s

The square error learning curve of LMS algorithm, NLMS algorithm, and VILMS algorithm is listed as Fig.3.

[2]

[3]

4

2

x 10

1.5

[4]

1 0.5 0

0 100 200 300 400 500 Mean square error learning curves of LMS algorithm

[5]

4

2

x 10

[6]

1.5 1

[7]

0.5 0

0 100 200 300 400 500 Mean square error learning curves of NLMS algorithm 4

2

x 10

1 1.5 1 0.5 0

0 100 200 300 400 500 Mean square error learning curves of VILMS algorithm

Figure 3. The square error learning curve of three kinds of algorithm

CONCLUSION

Zhuang Tiange, “Application of computer in biomedical engineering”, Beijing: Science Press, 2001 ᑘ໽ៜ,䅵ㅫᴎ೼⫳⠽एᄺЁⱘᑨ⫼,࣫Ҁ:⾥ᄺߎ⠜⼒,2001 Yang Hong, Li Shengming, “Adaptive filter and its application in noise canceller”, Journal of Changjiang Engineering Vocational College, vol. 22, Apr.2005, pp.55-56 ᴼ㑶,ᴢ⫳ᯢ,㞾䗖ᑨⒸ⊶఼೼ాໄᇍ⍜Ёⱘᑨ⫼,䭓∳Ꮉ⿟㘠Ϯᡔᴃ ᄺ䰶ᄺ᡹,2005,22(4):55-56 Shen Fenglin, Chen Heyan, “Biomedical random signal processing”, Hefei: China University of Science and Technology Press, 2002 ≜޸味,䰜੠ᰣ,⫳⠽एᄺ䱣ᴎֵো໘⧚,ড়㙹:Ё೑⾥ᄺᡔᴃ໻ᄺߎ⠜ ⼒,2002 Zhou Yongjun, Lu Zhiyuan, Niu Zhongqi, “Primary application of selfadaptive filter in detect of ECG”, Electronics Quality, Dec.2004, pp.2324 ਼∌‫ݯ‬,शᱎ䖰,⠯Ё༛,㞾䗖ᑨⒸ⊶఼೼ᖗ⬉ֵোẔ⌟Ёⱘᑨ⫼,⬉ᄤ 䋼䞣,2004,12:23-24 Liu Shijin, Zhang Yufeng, Wu Yaode, “A new method for abstracting fetal electrocardiogram based on adaptive noise cancelling system”, Chinese Journal of Medical Device, Jan. 2005, pp.1-3 ߬Ϫ䞥,ᓴ὚䫟,ਈ㗔ᖋ,ϔ⾡෎Ѣ RLS-ANC ㋏㒳ⱘ FECG ֵোᦤপᮄ ᮍ⊩,ए⭫㺙໛,2005,1:1-3 He Zhenya, “Adaptive Signal Processing”, Beijing: Science Press, 2002 ૗ᝄѮ,⥄ㅎᑨାภ໘ℂ,ർ੩:⑼ቇ಴ ␠,2002 Zhang Qin, Feng Cunqian, “Variable stepsize LMS algorithm and its application in adaptive noise cancellation”, Modern Electronic Technique, vol.14, 2003, pp.88-90 ᓴ⒌,‫ރ‬ሽ೨,বℹ䭓 LMS ▚ᴺ෸౔࿷⥄ㅎᑨᶖོਛ⊛ᑨ↪,⦄ઍ⬉ሶ ᛛᴃ,2003,14:88-90

Suggest Documents