A Comparison of Adaptive Filter and Artificial Neural

2 downloads 0 Views 1MB Size Report
surfice electrodes from trunk muscles is ECG interference. ECG signals have large .... The mechanism of the adaptive cancellation of the ECG contamination can ...

20th Iranian Conference on Electrical Engineering, (lCEE20 12),May 15-17,2012, Tehran,Iran

A Comparison of Adaptive Filter and Artificial Neural Network Results in Removing Electrocardiogram Contamination from Surface EMGs

Sara Abbaspour*,Ali Fallah**,Ali Maleki*** *Biomedical Engineering Faculty,Amirkabir University of Technology,Tehran, Iran,[email protected] **Biomedical Engineering Faculty,Amirkabir University of Technology,Tehran,Iran, [email protected] ***Electrical and Computer Engineering Faculty, Semnan University,Semnan, Iran,[email protected]

Abstract: Suiface electromyograms (EMGs) are valuable in the

pathophysiological study and clinical treatment. These recordings are critically often contaminated by cardiac artifoct. The purpose of this article was to evaluate the performance of an adaptive jilter and artificial neural network (ANN) in removing electrocardiogram (ECG) contamination from surfoce EMGs recorded from the pectoralismajor muscles. Peiformance of these methods was quantified by power spectral density, coherence, signal to noise ratio, relative error and cross correlation in simulated noisy EMG signals. In between these two methods the ANN has better results. Keywords:

contamination, removal.

electromyogram, electrocardiogram adaptive filter, neural network, noise

1.

sophisticated signal processing algorithms, including the Independent Components Analysis (lCA) has been used for artifact suppression in surface EMGs. To obtain better performance, the characteristics of ECG and EMG signals should be taken into consideration [1]. In this paper, the adaptive filtering technique and ANN have been studied to remove ECG interference from the surfice EMG signal of the upper trunk muscles. In this study, these methods are applied to a collection of EMG data set contaminated by ECG artifacts and then would be eliminated. Finally, the performance of these algorithms is evaluated. To evaluate the obtained results, some of the simulated signals and the signal to noise ratio (SNR) cross correlation and relative error criteria are used.

INTRODUCTION

2.

The surface electromyogram (EMG) represents a superposition of electrical activity from motor unit action potentials located subcutaneous to the detecting. EMG provides valuable information relating to peripheral and central motor function and has been widely adopted in the study of motor function and movement disorders including [1]. The major problem with EMG signals recorded by surfice electrodes from trunk muscles is ECG interference. ECG signals have large amplitudes and EMG surface electrodes are positioned adjacent to the heart, EMG recordings include a large ECG component [2]. Early techniques employed to reduce the level of contamination include amplitude clipping, gating technique and high pass filtering, neither of which have proved effective [3]. Investigations of ECG contamination in EMG signals have employed techniques such as spike clipping, real time filtering, independent component analysis, wavelet, artificial neural network, adaptive paper and subtraction [3]. Simple elimination of the ECG signal disturbance by filtering the EMG signals fails because the spectra of EMG and ECG signals overlap in some frequency range [2]. The gating method provides a simplistic yet potentially effective method of ECG artifact removal. The method does suffer however from losing the portions of the EMG which overlap with QRS complexes in amplitude. Recently, more

978-1-4673-1148-9/12/$31.00©2012IEEE

MATERIALS AND METHODS

Five 19-24 year old male (height= 173-180cm, mass= 7085kg) was recruited from the university population. The surfice EMG, ECG artifact and ECG signals used in the study were collected from leg muscles, the pectoralis major muscle of the left side and V4 respectively, in a laboratory. When EMG signal was recorded, the subjects were seated in a chair and during the experiment, the subjects were asked to activate their leg muscles. Between each activation a rest time was intended. When ECG and ECG artifact signals were recorded, the subjects were asked to lie completely relaxed. The signals recorded using electrodes placed on the skin. The skin was first prepared by shaving, light abrasion and cleaning alcohol. The EMG signal from these electrodes was fed into a biological amplifier (Dual Bio Amp/simulator). After the pre- amplification and before sampling, the raw EMG signals were band pass filtered from 0.3 to 500Hz with an analogue filter. The signals were recorded with a sampling frequency of 2000Hz. To removing undesirable motion artifacts, clean EMG signal was high pass filtered with cut off frequency 10Hz, ECG and ECG artifact were high pass filtered with cut off frequency 1 Hz. For simulating the contaminated EMG signal, ECG artifact was added to the clean EMG signal. Signal to noise

1554

ratio for contaminated EMG signal was considered zero. ECG, ECG artifact, clean EMG and contaminated EMG are presented in fig. 1 respectively.

:� : [ n� r11�T1 t1J ECG

m"

o

5

10

15

20

15

20

2.2 Artifical neural network

The concept of linear adaptive interference canceller can be extended to nonlinear realms by using nonlinear adaptive system. Thus back propagation network (BPN) which belongs to the category of nonlinear adaptive systems is used in this paper to estimate an unknown interference present in the EMG [5]. BPN is feed forward, multilayer network that uses the supervised mode of learning. It makes use of gradient decent algorithm to minimize the nonlinear and non-stationary interferences. To remove noise using the ANN, the known ECG signal and the nine samples delayed ECG signal are given as two inputs. The contaminated EMG signal is the target in the training process (fig. 3).

ECG artifact

m"

nr n I

1

o

5

10

clean EMG

:1 �����I �, ��. :11 -1 . "'ili'll I��'r II

� -1

10

0

15

20

contaminated EMG

� -1

0

5

10 time(sec)

15

technique used in this paper is QR-decomposition-based recursive least square. The algorithm is initialized with w(O)=O, RLS forgetting factor=O.999 and filter length=32.

Contaminated EMG

20

Fig. 1: from up to down: ECG, ECG artifact, clean EMG and contaminated EMG.

2.1 Adaptive filter

The adaptive filter differs from the conventional band pass filter in two aspects: (a) the adaptive filter has two input signals. The primary signal is one to be processed and the reference signal is the one that needs to be eliminated from the primary signal; (b) unlike the conventional band pass filter which has fixed filter weights, the adaptive filter has adjustable weights which are iteratively updated based on the characteristics of the two input signals [4]. The structure of the adaptive filter is presented in fig. 2. + y( k ) --------+{ +

s(k)

Fig. 3: Flowchart for stages of ANN.

The parameters adjusted for training ANN are epochs=200, goal=O.65, momentum=O.9. The ANN structure has two neurons in the input layer, 35 neurons in the only hidden layer and one neuron in the output layer. 2.3 Evaluation criteria

In this paper, Quantitative criteria including signal to noise ratio, relative error and cross correlation are used. Since average of EMG signal is zero, so "Equation (1)" is used to calculate signal to noise ratio. Fig. 2: The structure of adaptive filter [4].

SNR

The mechanism of the adaptive cancellation of the ECG contamination can be explained as follows: The ECG signal has similar characteristics to the ECG artifact in the EMG signal. An adaptive filter is used to adjust the amplitude and phase of the reference ECG signal to produce a replica of the ECG artifact and then to subtract it form the primary EMG signal [4]. Adaptive filtering

= 1010g

var (s (k) ) 10

var ( s(k) - s(k) )

(1)

Where var , s (k) and s(k) are the variance operator, clean EMG and cleaned EMG signals respectively [1]. Increase of signal to noise ratio represent better performance of approach. "Equation (2)" is used to calculate relative error.

1555

clean EMG

I (S(t)-S(t)r RE I (S(t))2 Where set) and set)

(2)

-

-'-----"---

=

5l a.

1

were spectral density of clean EMG and cleaned EMG respectively [6, 4, 2]. Decrease of relative error is representing better performance of approach. "Equation (3)" is used to calculate cross correlation.

CC

=

100X

[

Is(k)s(k) JI (s(k»)2 I (s(k»)2

1 (4)

Pxx

if) and

Pyy

if)

were power spectral

density of clean EMG and cleaned EMG respectively and Pxy if) is the cross power spectral density of these two signals. 3.

RESULTS

50

�1' � +���I :� � .:1' l � r ,: :h' : 10

5

o

'"

i

.c o u

1-1'

0

10

10

5 1

cleaned EMG

> E

'

5

10

'

100

150

250 300 frequency(Hz)

350

400

450

500

06 . 04 .

frequency(Hz)

Fig. 6: coherence of clean EMG and cleaned EMG.

The result of signal to noise ratio, relative error (RE) and cross correlation (CC) is equal to 8.42, 0.11 and %93 respectively. The results of artificial neural network were shown in fig. 7.

�"ltIII�""

__

0

500

° 0�� --�00- ----2 - � 00----�30- �00 ----�00 0 ----4 5 1

5 1

1 "i ---j "i "i ---j"-l 5

450

0.2

5 1

noise estimated

> E

400

08 .

Real ECG



350

In the fig. 4, the top trace is an example of the raw simulated noisy EMG signal. The ECG contamination in the signal is obvious. The real ECG and noise estimated are shown in second and third traces of fig. 4. When noise estimated will be subtracted from the contaminated signal, clean signal is obtained. This signal can be seen in the last trace of fig. 4. The ECG artifact removal algorithm was implemented using Matlab 8.0. To qualitative validation of the proposed ECG artifact removal method, power spectrum density and coherence in fig. 5 and fig. 6 were compared before and after noise removal.

I' r r i"'I''I'I'' I' I 5

300

Fig. 5: PSD of clean EMG and cleaned EMG.

Contaminated EMG

o

250

cleaned EMG

Adaptive filtering method for substantial removal of the ECG contamination in the surfice EMG signal was used. An example of the performance for this method is presented in fig. 4.



200

(3)

The coherence is a function of the power spectral density of clean EMG and cleaned EMG and the cross power spectral density of these two signals. "Equation (4)" is used to calculate coherence.

Where

150

5 1

time(sec)

Fig. 4: From up to down: contaminated EMG, recorded ECG, noise estimated and cleaned EMG with adaptive filter.

1556

:�I'I I: '�'I"I Contaminated E MG

> E

r-���1

"

-1

0

5

10

0.8

15

0.6

Real ECG

> E

:� :11 :��,

-1

0

5

10

0.4

0.2

15

O ��--�------�----��----�------J o 100 200 300 400 500

noise estimated

> E

I" I I I

I

-1

0

frequency(Hz)

Fig. 9: coherence of clean EMG and cleaned EMG.

5

10

4. DISCUSSION

15

cleaned EMG

> E

-1

�'""I�M

,' �.'

0

5

10

15

time(sec)

Fig. 7: From up to down: contaminated EMG, recorded ECG, noise estimated and cleaned EMG with ANN .

In this figure, from up to down, contaminated EMG signal, input to the ANN noise estimated with BPN and cleaned signal are seen. These methods were applied to the five signals recorded from five subjects. For removing noise from contaminated EMG signal with ANN, 60 second from data was selected that from this data, 45 second for training ANN and 15 second for testing network was used. It is clear from fig. 7 that the ECG artifacts were substantially reduced. Power spectrum density and coherence in fig. 8 and fig. 9 were compared clean EMG and cleaned EMG. ,

In this paper we have compared an adaptive filtering technique and artificial neural network for the elimination of ECG contamination. The performance of these algorithms was evaluated on computer simulation. Applications of these methods to simulated EMG signals obtained from five healthy subjects. The results of this method were expressed with quantitative criteria. The SNR, error and cross correlation was used as performance indicator to assess the proposed method. These criteria for the best results (ANN technique) respectively is equal to; 13.46, 0.03 and %97. The power spectral analysis and coherence has been used for qualitative evaluation. It was found that ECG artifacts could be successfully removed from EMG signal. The ANN was capable of eliminating the ECG artifacts, which is a promising result. The ANN technique shown in this study is general scheme to elimination the ECG contamination. The effectiveness of this method is evident in the results section. In both methods, it is necessary that the ECG signals and ECG artifact to be recorded simultaneously.

clean EMG

REFERENCES

50

100

150

200

250

300

350

400

450

[I]

G. Lu, J. S Brittain, P. Holland. And J. Yianni, " Removing ECG noise from surface EMG signals using adaptive filtering," Neuroscience Letters, pp. 1-6, 2009.

[2]

Y. Deng. and W. Woll; "New Aspects to Event-Synchronous Cancellation of ECG Interference: An Application of the Method in Diaphragmatic EMG Signals," IEEE Transactions on Biomedical Engineering, Vol. 47, No. 9, pp. 1177-1184, 2000.

[3]

P. Zhou, T. A. Kuiken, "Eliminating cardiac contamination from Myoelectric Control Signals Developed by Targeted Muscle " Reinnervation, Inslilule of Physics Publishing, Physiological Measurement, No. 27, pp. 1311-1327, 2006.

[4]

J. Chen. and Z. Lin, "Adaptive cancellation of ECG artifacts in the diaphragm electromyographic signals obtained through intraoesophageal electrodes during swallowing and inspiration," Neurogastroenterology and Motility, pp. 279-288, 1994.

[5]

C. E.S. Kumar, C. K.S. Vijila, "Cancellation of ECG in electromyogram using back Propagation network", Inlernalional

500

cleaned EMG 200 150 0 (fJ 100 a.

50

100

150

200 250 300 frequency(Hz)

350

400

450

500

Fig. 8: PSD of clean EMG and cleaned EMG.

Signal to noise ratio, relative error (RE) and cross correlation (CC) IS equal to 13.46, 0.03 and %97 respectively.

1557

conference on advances in recent lechnologies in communicalion and compuling, IEEE, pp. 630-634, 2009. [6]

H. Liang. and Z. Lin, "removal of ECG contamination from diaphragmatic EMG by nonlinear filtering," sNoniinear Analysis, No. 63, pp. 745-753, 2005.

Suggest Documents