A Combination Method for Electrocardiogram Rejection from Surface Electromyogram
Sara Abbaspour, Ali Fallah*
Identifiers and Pagination:Year: 2014
First Page: 13
Last Page: 19
Publisher Id: TOBEJ-8-13
Article History:Received Date: 17/12/2013
Revision Received Date: 24/1/2014
Acceptance Date: 27/1/2014
Electronic publication date: 7 /3/2014
Collection year: 2014
open-access license: This is an open access article licensed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/by-nc/3.0/) which permits unrestricted, non-commercial use, distribution and reproduction in any medium, provided the work is properly cited.
The electrocardiogram signal which represents the electrical activity of the heart provides interference in the recording of the electromyogram signal, when the electromyogram signal is recorded from muscles close to the heart. Therefore, due to impurities, electromyogram signals recorded from this area cannot be used. In this paper, a new method was developed using a combination of artificial neural network and wavelet transform approaches, to eliminate the electrocardiogram artifact from electromyogram signals and improve results. For this purpose, contaminated signal is initially cleaned using the neural network. With this process, a large amount of noise can be removed. However, low-frequency noise components remain in the signal that can be removed using wavelet. Finally, the result of the proposed method is compared with other methods that were used in different papers to remove electrocardiogram from electromyogram. In this paper in order to compare methods, qualitative and quantitative criteria such as signal to noise ratio, relative error, power spectrum density and coherence have been investigated for evaluation and comparison. The results of signal to noise ratio and relative error are equal to 15.6015 and 0.0139, respectively.
Recording and proper use of the electromyogram (EMG) signal requires knowledge of and many compliant considerations . This signal is very valuable in pathophysiologic studies and clinical treatments. EMG is used to diagnose some diseases such as low back pain, control of neural prostheses and feature extraction of hand motion and especially for our goal, hand motion prediction and after that hand motion control. But when the signal is recorded, noise is often caused from different sources such as inherent noise in the electronic components of detection and recording equipment, ambient noise, motion artifacts, inherent instability of signal and biological signals such as electrocardiogram (ECG) . Among the expressed noises, removal of the ECG artifact from EMG is very difficult because their frequency content greatly overlaps. The frequency content range of the surface EMG signal is between 10 Hz and 500 Hz and the highest frequency power is between 20 Hz and 150 Hz . The frequency content range of the ECG signal is between 0.1Hz and 100Hz  and highest frequency power is between 0.1 Hz and 45 Hz . Also, the ECG signal amplitude is in a range of millivolt and in some cases, is several times larger than the EMG signal amplitude . Investigations of ECG contamination in EMG signals have employed techniques such as high pass filtering (HPF) , subtraction technique , gating technique , non-linear filtering , independent component analysis [2,8-10], wavelet transform [11-13], artificial neural network (ANN) [14,15], adaptive filtering [14,16-18], Event-Synchronous Cancellation  and adaptive neuro fuzzy inference system (ANFIS) [20-23].
Conventional high pass filtering essentially fails since the ECG has a frequency spectrum that overlaps markedly with that of the surface EMG signal of the upper trunk muscles, this method is simple and fast, but it is not suitable for our aims . The efficacy of the subtraction procedure relies on the accuracy of QRS complex detection and the degree of stationarity of the ECG signals which are not always stereotypic and time-invariant  and requires the selection of the predefined QRS templates . Subtraction is not suitable for clinical application due to the long time delay caused by the algorithms and the heavy computation burden . The gating method, perhaps the most frequently used technique for the ECG removal, although simple, suffers from the loss of the portions of the EMG signal overlying QRS complexes . The adaptive filter has been recently used to reduce the ECG artifacts  but it is not suitable for clinical application due to the heavy computation burden .
With regard to the contents mentioned and methods used so far for this purpose, cancellation of ECG from the EMG signal has its difficulties. So the aim of this study is to find an appropriate method for separating ECG interference from the surface EMG signal of the upper trunk muscles. In this paper, the artificial neural network- wavelet has been studied to remove ECG interference from the surface EMG signal. For this purpose, after recording ECG and EMG signals and simulating the contaminated EMG signal, the artificial neural network- wavelet method is used to remove the ECG artifact. Finally, performance of this method is evaluated with quantitative and qualitative criteria. Because of our goal in this study, using an online method that is very fast and has a great result to remove ECG noise from EMG is very important.
2. MATERIALS AND METHODS
2.1. Signal Recording and Simulation
In this study, clean EMG signal, ECG and ECG artifact were recorded at Biological Systems Control Laboratory, Faculty of Biomedical Engineering, Amirkabir University of Technology. The clean EMG signal was collected from the biceps muscle of the right side; the ECG artifact was recorded from the pectoralis major muscle of the left side. To implement the artificial neural network, it is necessary that with the ECG artifact signal, the corresponding ECG signal also be recorded, so the ECG signal was recorded from the V5 area. Electrode placement on the pectoralis major and biceps muscles are selected based on the SENIAM standard . In order to record ECG and EMG signals, the Powerlab device was used. Five 21.4 (±1.94 standard deviation) year old males (height= 177± 3.67cm, mass= 72.6-85±13.37kg) were recruited from the university population. Selecting this group of people to record signals was because of next step in our study. The aim was to use signals that are related to young and health people to predict and control hand motion. When the EMG signal was recorded, the subjects were seated in a chair during the experiment, and were asked to activate their biceps muscles. A rest time was considered between each activation. When ECG and ECG artifact signals were recorded, the subjects were asked to lie in a completely relaxed position.
The signals were recorded using electrodes placed on the skin. The skin was first prepared by shaving, light abrasion and cleaning with 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 2000 Hz. To remove undesirable motion artifacts, the clean EMG signal was high pass filtered with a cutoff frequency of 10Hz, and the direct current (DC) value was also removed from the ECG and ECG artifact. In order to obtain a quantitative evaluation of the methods, it is necessary that the corresponding clean EMG signal be available with the contaminated EMG. Therefore, in this study, the contaminated EMG signal has been simulated in the most accurate way. For simulating the contaminated EMG signal, the ECG artifact was added to the clean EMG signal. Signal to noise ratio (SNR) for the contaminated EMG signal was considered zero. This simulation was performed for all signals recorded from five healthy subjects and their results were evaluated. In Fig. (1), samples of recorded and simulated signals are presented.
(a) ECG signal, (b) ECG artifact, (c) clean EMG and (d) contaminated EMG.
Flowchart for stages of AIC .
An example of wavelet electrocardiogram denoising of corrupted surface electromyogram. (a) Contaminated EMG, three levels of wavelet decomposition, (b) cleaned EMG.
Neural network-wavelet method flowchart.
(a) Contaminated EMG, (b) real ECG, (c) noise estimated, (d) cleaned EMG using ANN-wavelet, (e) PSD of clean EMG and PSD of cleaned EMG using ANN-wavelet and (f) coherence of clean EMG signal and cleaned EMG using ANN-wavelet.
Coherence of cleaned EMG using (a) ANN-wavelet, (b) ANN, (c) subtraction method, (d) adaptive filter, (e) wavelet transform, (f) HPF.
One of the strengths of this paper is the technique for simulating contaminated EMG and signal recordings in a way that is very similar to the real signal. This strength related to our way for signal recording, the positions that subject have had during the signal recording, the places that we have chosen to record signals, the amount of noise that added to clean signal for simulating contaminated EMG signal.
2.2. Artificial Neural Network
Adaptive interference cancellation (AIC) using linear filters have been used successfully in real world applications such as interference cancellation in ECG. However, the concept of linear AIC can be extended to nonlinear realms by using nonlinear adaptive systems. Thus, the back propagation network (BPN) which belongs to the category of nonlinear adaptive systems can be performed to estimate an unknown interference present in the EMG .
BPN is a feed forward, multilayer network that uses the supervised mode of learning. It makes use of a gradient descent algorithm to minimize the nonlinear interferences. The BPN architecture consists of input layer, hidden layer, and output layer. The number of inputs, hidden layers, neurons in each layer and outputs vary depending on the application . The stages of AIC in EMG are given in the form of a flowchart in (Fig. 2).
The software used for the implementation of BPN is MATLAB and the steps used are:
(1) Specifying the inputs and targets to the BPN. (2) Giving the minimum and maximum values of the input ranges. (3) Specifying the number of layers and the number of units in each layer. (4) Mentioning the activation functions for each layer: TANSIG is a transfer function, which is used as the activation function for the hidden layer to calculate a layer's output from its net input. PURELIN is a linear transfer function, which is used as the activation function for the output layer (5). Creating a feed forward back propagation network model by using the command called NEWFF. (6) Simulating the network for plotting the network output. (7) Specifying the training parameters like learning rate, momentum, performance goal, number of epochs, etc. (8) Training the network using the training function called TRAINLM. (9) Giving the conditions to stop training the network: The maximum number of EPOCHS (repetitions) is reached or the maximum amount of TIME has been exceeded, etc. . Using this method, especially the nonlinear adaptation properties help us to remove a large amount of ECG noise in the EMG signal. Also, neural network is fast and can be used online.
2.3. Wavelet Transform Based on Nonlinear Thresholding
In the wavelet transform instead of using a sine wave, which is the basic function for the Fourier transform, a basic waveform is used. This basic waveform (ψ) can be modified to basic functions (ψa,b) obtained from dilations and shifts of the basic waveform. The basic waveform is shown in equation (1), where “a” is the scaling parameter and “b” represents the translation parameter .
The continuous wavelet transform (CWT) of a given input signal x(t) is shown in equation (2) .
The representation of the CWT is redundant. The discrete wavelet transform (DWT) removes the redundancy of the CWT by using discrete steps for scale and translation. DWT can be used to remove artifacts. Its application is based on a good spectral separation between the original signal and the artifact . Fig. (3) shows an example of the wavelet ECG denoising, where an eight-level wavelet decomposition of the raw signal was implemented using symlet wavelet family, fourth order. In this figure, three levels of wavelet decomposition are presented.
After the wavelet coefficients have been achieved, nonlinear thresholding in the wavelet domain was used for ECG artifact removal. The signal corrupted by ECG artifacts was first decomposed by wavelet transform to sequences representing different frequency components of the signal. The wavelet coefficients in the low frequency scales then underwent a nonlinear thresholding process, where the coefficients greater than the threshold were set to zero. The inverse wavelet transform was then implemented using the new coefficients to obtain the clean EMG signal . Choosing wavelet transform is due to similarity of one wavelet functions to ECG noise that it helps to remove this noise from EMG signal successfully.
2.4. Artificial Neural Network- Wavelet Transform
In this paper, the first step involved removing the ECG artifact from the contaminated EMG signal using a nonlinear adaptive filter based on the neural network. With this method, most of the noise in the signal is removed because of the adaptation nature of this method, but there is still noise with low frequency components in the cleaned signal. Therefore, it is necessary that the signal be post processed. For this purpose, the wavelet method with nonlinear thresholding is used to remove the residual noise in the EMG signal. This method divided signals to different frequency components, so using this way, it is easy to find low frequency noise in the original signal and then to remove this noise with nonlinear thresholding. In this research, the back propagation network was used, which is a feed forward, multilayer network and uses the supervised mode of learning and is proper for nonlinear interferences. Wavelet transform that was used was discrete. Fig. (4) shows ECG extraction using the neural network-wavelet flowchart.
The inputs to the neural network are ECG and contaminated EMG signals as shown in (Fig. 4). The output of the neural network is input to the wavelet. In this section, the signal was decomposed by wavelet transform in eight-levels and achieved the wavelet coefficients. Then, using nonlinear thresholding, the ECG artifact was removed; finally the cleaned EMG signal was obtained by the inverse wavelet transform. The output of the wavelet is a post processed signal that is noise free. This noise removal method is very efficient because it decrease residual noise from signal.
2.5. Quantitative Evaluation Criteria
In this paper, quantitative criteria such as signal to noise ratio, relative error (RE) and cross correlation are calculated. An increase of signal to noise ratio represents better performance of the approach. The decrease of relative error represents better performance of the approach .
The parameters used for training BPN to cancel the ECG interference from EMG are epochs =1000, goal = 0.65, momentum =0.9, show = 5, learning rate = 0.5 and time = infinity. The network architecture has two neurons in the input layer, 35 neurons in the only hidden layer and one neuron in the output layer. The known ECG signal and the delayed ECG signal (9 samples) are given as two inputs. The measured EMG signal is the target in the training process. In this method, for removing noise from the contaminated EMG signal, 120,000 samples (60 seconds) were selected from this data. 90,000 samples (45 seconds) were used for training and 30,000 samples (15 seconds) were used for testing. This approach was used for all signals recorded from five healthy subjects.
The result of signal to noise ratio, relative error and cross correlation is equal to 13.4612, 0.0316 and 97.82%, respectively. According to the quantitative evaluation criteria, it can be seen that the performance of the neural network in the noise extraction of the EMG signal is relatively good, but the cleaned EMG contains little noise with low frequency components. Therefore, in order to improve the results and reduce error a new method was developed to remove noise. Therefore, the wavelet transform has been used with nonlinear thresholding in order to eliminate remained noise in the EMG signal that was cleaned using ANN. In this method, EMG was first decomposed by wavelet transform to sequences representing different frequency components of the signal. The wavelet coefficients in the low frequency scales then underwent a nonlinear thresholding process, where the coefficients greater than the threshold were set to zero. The inverse wavelet transform was then implemented using the new coefficients to obtain the cleaned EMG signal. In (Fig. 5), the results of ANN- wavelet transform for removing ECG from EMG are presented. The qualitative validation of the ANN- wavelet method, power spectrum density (PSD) and coherence in (Fig. 5) were compared before and after noise removal. The coherence curve being close to one, which indicates the cleaned signal and the clean signal, is very similar.
The result of signal to noise ratio, relative error and cross correlation for noise removal using ANN-wavelet is equal to 15.6015, 0.0139 and %98.65, respectively. In the power spectrum density of the cleaned EMG signal, it can be seen that low frequency components (noise) remaining in the output of the neural network have been deleted. A coherence of cleaned EMG using ANN-wavelet is presented in (Fig. 5). In this figure, it is also seen that the curve is smoother and closer to one.
Finally, to show that the proposed method was improved the results, some other methods such as HPF, wavelet transform, adaptive filter and subtraction were used to remove ECG from EMG. The result of these methods was presented in Table 1. In this table some quantitative criteria were used to show the results.
Calculating evaluation criteria (Signal to Noise Ratio (SNR), Relative Error (RE) and Cross Correlation (CC)) for ANN-wavelet, wavelet transform, adaptive filter, ANN, subtraction and HPF methods for the five simulated signals recorded from five subjects.
|Artificial neural network||11.90±1.53||0.05±0.02||0.96±0.01|
Calculating evaluation criteria (signal to noise ratio, relative error and cross correlation) for ANN method for the five simulated signals recorded from five subjects.
|13.4612||12.9710||10.3109||10.2152||12.5903||Signal to Noise Ratio|
Calculating evaluation criteria (signal to noise ratio, relative error and cross correlation) for ANN-Wavelet method for the five simulated signals recorded from five subjects.
|15.6015||14.2931||13.5498||17.6145||15.9940||Signal to Noise Ratio|
Advantages and disadvantages of ANN-wavelet, wavelet transform, adaptive filter, ANN, subtraction and HPF methods for our gold in this study.
|ANN-wavelet||Fast with a very good result (high SNR and low RE (Table 1), smooth coherence (Fig. 6) and PSD (Fig. 5))||Needs multiple input (based on ECG)|
|Wavelet transform||Needs single input, simple and fast||Remains noise in the output because of inconvenient thresholding (low SNR and high RE (Table 1))|
|Adaptive filter||Adaptation in removing ECG noise (fair SNR (Table 1))||Needs multiple input, time consuming, heavy computations with high RE (Table 1) and uneven coherence (Fig. 6)|
|ANN||Fast with an acceptable result ( high SNR and relatively low RE (Table 1))||Needs multiple input, remains noise in low frequencies (uneven coherence in low frequencies (Fig. 6))|
|Subtraction||Acceptable result (high SNR, relatively low RE (Table 1))||Needs multiple input, time consuming, heavy computations and uneven coherence in low frequencies (Fig. 6)|
|High-pass filter||Needs single input, very simple method||Removes useful information (low SNR, high RE and low CC (Table 1), uneven coherence (Fig. 6))|
Also, in Fig. (6) a qualitative criterion has been used to compare the result of these methods. In this figure coherence of cleaned EMG using different methods have been presented. In these curves, being close to one and being smooth show the similarity of the cleaned signal and the clean signal.
In this paper, a combination method (neural network-wavelet technique) has been proposed for the elimination of ECG contamination from surface EMG recorded from upper trunk muscles. Artificial neural network has been used for removing noise from the contaminated EMG signal. In this way, a large amount of pollution removed, but the cleaned EMG contains little noise with low frequency components. According to the advantages of the wavelet in decomposing signal to sequences representing different frequency components, wavelet transform with nonlinear thresholding has been used to remove the residual noise in the output of ANN method. Using this method, low frequency components (noise) remaining in the output of the neural network have been deleted. For simulating the contaminated EMG signal, the clean EMG signal, ECG artifact and the corresponding ECG signal were recorded from five healthy subjects and then the ECG artifact was added to the clean EMG signal. One of the strengths of this paper is the simulation method. This signal simulation method provided a quantitative evaluation and is completely consistent with the actual conditions. Therefore, the expected outcome is that the evaluation criteria are also quite valid for the real contaminated signal. The quantitative criteria such as SNR, error and cross correlation and the qualitative criteria such as power spectral analysis have been used as a performance indicator to assess the proposed method. The ANN method was applied to the five signals recorded from five subjects. Results for these signals can be seen in Table 2.
The ANN-wavelet method was applied to the five signals recorded from five subjects. Results for these signals can be seen in the Table 3.
Finally, for comparing the results of proposed method with other methods, some currently used methods such as HPF, subtraction and adaptive filter were investigated. Among the noise removal methods, the effect of the high pass filter on ECG removal from EMG signal was evaluated. According to the results, high pass filtering removed most of the ECG artifacts while some useful EMG signals were inevitably lost. As it was mentioned in the introduction, the frequency content of the surface EMG signal is between 10 Hz and 500 Hz, therefor using HPF with cutoff frequency of 30Hz will delete all the components below this frequency. In addition, the ECG signal at frequencies above 100 Hz also has components. Therefore, using this cutoff frequency still remains ECG signal in the EMG signal. Therefore, use of linear filters, not only does not enhance results, but also increases error and reduces the signal to noise ratio. Subtraction method does not remove the EMG signal, but requires the QRS pattern that is predetermined. This method is time consuming and has heavy computations. Adaptive filter is based on the ECG and time consuming. In the output of this filter a large amount of noise remains in the EMG signal. In Table 4 advantages and disadvantages of each method are listed.
CONFLICT OF INTEREST
The authors confirm that this article content has no conflicts of interest.
The authors would like to thank control of biological systems and signal processing laboratories for their excellent technical assistance and their assistance during experiments. Furthermore, they wish to thank the biomedical engineering students at Amirkabir University of Technology for their valuable help and cooperation in the signal recording.