# Research on AR-AKF Model Denoising of the EMG Signal

Authors: Sijia Chen; Zhizeng Luo; Tong Hua
Journal: Computational and Mathematical Methods in Medicine
 (2021)

---

## Abstract

Electromyography (EMG) signals can be used for clinical diagnosis and biomedical applications. It is very important to reduce noise and to acquire accurate signals for the usage of the EMG signals in biomedical engineering. Since EMG signal noise has the time-varying and random characteristics, the present study proposes an adaptive Kalman filter (AKF) denoising method based on an autoregressive (AR) model. The AR model is built by applying the EMG signal, and the relevant parameters are integrated to find the state space model required to optimally estimate AKF, eliminate the noise in the EMG signal, and restore the damaged EMG signal. To be specific, AR autoregressive dynamic modeling and repair for distorted signals are affected by noise, and AKF adaptively can filter time-varying noise. The denoising method based on the self-learning mechanism of AKF exhibits certain capabilities to achieve signal tracking and adaptive filtering. It is capable of adaptively regulating the model parameters in the absence of any prior statistical knowledge regarding the signal and noise, which is aimed at achieving a stable denoising effect. By comparatively analyzing the denoising effects exerted by different methods, the EMG signal denoising method based on the AR-AKF model is demonstrated to exhibit obvious advantages.


---

## Body

## 1. Introduction

Surface electromyography (sEMG) refers to a weak bioelectric signal recorded by surface electromyography pick-up electrodes, which is capable of reflecting information associated with muscle and bone activity [1]. It has been extensively employed in sports medicine and rehabilitation training, and it is an ideal control signal for artificial prostheses and bionic control [2, 3].sEMG is recognized as a nonlinear and nonstationary signal. The useful signal displays the major distribution between 10 Hz and 500 Hz, which is extremely weak (with the amplitude of onlyμV level). The signal is vulnerable to a range of characteristics (e.g., interference, time variance, and randomness) [4]. The sEMG signal is collected by detecting electrodes placed on the skin surface, and such a collecting process is easy to be affected by surrounding environments. On the whole, sEMG noise sources consist of inherent noise of electronic devices, environmental noise, noise generated by electrode jitter and micromovement, and interference noise created by other human bioelectric signals. In addition, the signal-to-noise ratio (SNR) of the sEMG signal decreases with the increase in the muscle contraction force. The mentioned noises may seriously affect the quality of the signal and may even fail to effectively achieve the detection and analysis applications. Accordingly, noise removal processing should be performed before sEMG is studied in depth.On the hardware, noise interference can be suppressed by taking shielding and grounding or introducing high- and low-pass filters, as well as notch filters, which is recognized as a routine operation. However, the noise interference of the sEMG cannot be eliminated through hardware processing independently [5] . As digital signal processing technologies are leaping forward, digital filtering has become a vital approach to reduce noise interference. The common existing sEMG signal denoising methods comprise wavelet denoising [6, 7], empirical mode decomposition (EMD) [8, 9], adaptive filtering [10], and principal component analysis (PCA) [11] and independent component analysis (ICA) [12]. These denoising methods exhibit their own advantages and disadvantages, and a balance remains difficult to reach between denoising and muscle power signal restoration. Even in a segment of signal, there may be varied levels of noise, and it is difficult to perform well in different levels of noise.An autoregressive (AR) model is a prediction model that creates a linear sum of previous data. The coefficients of the AR model are used in sEMG classification [13, 14]. The AR model of order is usually according to the previous works; then, the model is determined. There is no way to judge whether the AR model is appropriate for sEMG data. In order to overcome existing problems above, we propose the following method.The AR-AKF model-based denoising method organically combines the dynamic modeling ability of the autoregressive model and the time-varying noise estimation ability of the adaptive Kalman filter. By using AKF, the noise in the sEMG is effectively eliminated. Moreover, with the AR model, the signal affected by noise can be restored. This method is capable of learning and tracking, as well as regulating model parameters by complying with the adaptive criteria in the absence of any prior statistical knowledge regarding the signal and noise, as an attempt to achieve a stable denoising effect. Theoretically, this method exhibits better applicability, which is also suitable for other similar bioelectric signals.


## 2. AR-AKF Model

Setxt as the EMG signal at sampling time t, and xt−n signifies the EMG signal at sampling time t−n, which is a random noise. Moreover, an n-order AR model can be adopted to express the EMG signal. An n-order AR model of sEMG, written as ARn, is
(1)xt=Φ1xt−1+Φ2xt−2+⋯+Φnxt−n+εt,where n denotes the model order, ϕn represents the model parameter, and εt is the white noise with zero mean and variance σε2.The main work forARn model building is to estimate the values of parameters n, ϕ1,ϕ2⋯,ϕn, and εt in the model. The reason is that ϕ1,ϕ2⋯,ϕn and εt satisfy
(2)εt=xt−ϕ1xt−1−ϕ2xt−2−⋯+ϕnxt−n,(3)σε2=1N−n∑t=n+1Nxt−∑i=1nφixt−i2,where N denotes the number of samples.Thus, ifϕ1 is estimated, σε2 can be estimated by equation (3).The method of parameter estimation falls to direct and indirect methods. Direct methods comprise the least square method, Yule-Walker equation method, Ulrych-Clayton method, etc. In addition, indirect methods include the LUD method, BSMF method, and Burg method. Using the least square method to estimate the parameters is considered to be extremely simple. The parameter estimation is unbiased with high accuracy, as expressed by(4)Y=Xϕ+ε,where Y=xn+1xn+2⋯xNT, ϕ=ϕ1ϕ2⋯ϕnT, and ε=εn+1εn+2⋯εNT.Subsequently, the least square estimate ofϕ is
(5)ϕ=XTX−1XTY.The model ordern can be determined by complying with the applicability test criterion of the model. Common information criteria consist of FPE (Final Prediction Error), AIC (An Information Criterion), and BIC (Bayesian Information Criterion) criteria of the Akaike information inspection criterion [13].AIC function:(6)AICn=Nlnσε2+2n.BIC function:(7)BICn=Nlnσε2+nlnN.FPE function:(8)FPEn=N+nN−nσε2,whereAICn, BICn, and FPEn represent the corresponding criterion indexes in the case of order n.The model when the minimum value of the respective criterion function is selected is the applicable model. Thus, the estimation criterion of the optimaln-order is presented as
(9)n∗=argminnAICn,BICn,FPEn.The core idea here is to simulate the volatility of the EMG signal through theARn model and subsequently use adaptive filtering to correct the error attributed to random noise. To be suitable for adaptive filters, an accurate mathematical model is required. First, equation (1) is extended to n AR model groups of order 1 to n:
(10)x1t+1=Φ11x1t+ε1ωt,x2t+1=Φ21x1t+Φ22x2t+ε2ωt,⋯xnt+1=Φn1x1+Φn2x2t+⋯+Φnnxnt+εnωt.Next, this model group is converted into ann-dimensional state space model:
(11)x1t+1x2t+1⋮xnt+1=Φ110⋯0Φ21Φ22⋯0⋮⋮⋱⋮Φn1Φn2⋯Φnnx1tx2t⋮xnt+ε1ε2⋮εnωt,(12)zt=ϕnl,ϕn2,⋯ϕnnxt−1xt−2⋮xt−n+εt,where (11) expresses the state transition equation, (12) presents the observation equation, x represents the measured EMG signal, y denotes the EMG observation signal, and ϕni is the i-th parameter of the n-order AR model. The mentioned (11) and (12) can be simplified to the state space model below:
(13)Xt+1=AXt+wt,Zt=HXt+vt,wherewt denotes the system noise and vt is the observation noise. The above system state transition matrix coefficient A is
(14)A=Φ110⋯0Φ21Φ22⋯0⋮⋮⋱⋮Φn1Φn2⋯Φnn.The noise covariance matrixQ of the state equation is written as
(15)Q=σε120⋯00σε22⋯0⋮⋮⋱⋮00⋯σεn2.The observation matrixH is
(16)H=ϕn1,ϕn2,⋯ϕnn.The noise covariance matrixR of the observation equation is
(17)R=σεn2.Through the mentionedA, H, Q, and R, a complete state space model of SEMG can be determined. Based on the built system model, the digital filtering method is adopted to optimally estimate the signal sequence. To be specific, a Kalman filter refers to a recursive unbiased linear minimum variance estimation method, capable of estimating the current signal value by complying with the existing system estimation value and the current observation value.As impacted by the time-varying and randomness of noise in practice, the statistical characteristics of noise may remain unknown and time-varying. Accordingly, the prior data commonly loses its meaning, causing the filtering effect to lose its optimality or to eventually lead to divergence [15].To solve this type of problem, AKF is introduced. This method is capable of estimating the system’s interference noise and measurement noise online based on the system measurement value and the filter value, tracking the noise change in real time while filtering, as well as correcting the filter parameters to increase the filtering accuracy [16]. Since the AKF algorithm is more sensitive to the initial value, a robust tracking AKF is introduced. The proposed method regulates the prediction error value by introducing a fading factor, i.e., to modify the filter gain matrix value, which increases the weight of the current observation. For this reason, the filter can track the current change and suppress the filter divergence [17].Given the mentioned analysis, to optimize and improve the conventional Kalman filter algorithm, a strong tracking idea is introduced by using the simplified Sage-Husa adaptive filter algorithm. The improved strong tracking adaptive Kalman filter algorithm abides by the principle below:(18)Xk∣k−1=Ak,k−1Xk−1+Bk,k−1Uk−1Vk=Zk−HkXk∣k−1Pk∣k−1=λkAk∣k−1Pk−1ATk,k−1+QkKk=Pk∣k−1HTkHkPk∣k−1HTk+Rk−1Xk=Xk∣k−1+KkVkPk=1−KkHkPk∣k−11−KkHkT+KkRk−1KTk,(19)Qk=1−dkQk−1+dkKk−1VkVkT+Ak,k−1Pk−1Ak,k−1TRk=dk1−HkKk−1VkVTk1−HkKk−1T+HkPk−1HTk+1−dkRk−1,(20)λk=λ01λ0≥1λ0<1λ0=trNktrMkNk=V0k−HkQk−1HTk−βRkMk=HkAk,k−1Pk−1ATk,k−1HTkV0k=V1VT1ρV0k+Vk+1VTk+11+ρk=1k>1,where dk=1−b/1−bk+1,0<b<1 and b is the forgetting factor, which usually refers to 0.95~0.99.As presented above, equations (18), (19), and (20) constitute AKF, where equation (19) describes an adaptive noise statistical estimator, equation (18) is an optimal state estimator, and equation (20) expresses an adaptive fading factor. By alternately using the mentioned equations, an estimate of the state and noise statistics can be calculated. The initial conditions of Q and R can take the values of equations (15) and (17).On the surface, under the unknown system noise variance matrixQ and the measurement noise variance matrix R, Q and R can be estimated simultaneously by the above process, which has been extensively investigated. As a matter of fact, the Sage-Husa method cannot estimate Q and R under the two unknown matrices. Filtering divergence is prone to occur under the high order of the system, and Qk and Rk are suggested to lose positive semidefiniteness and positive definiteness when filtering divergence. Thus, (19) is replaced with (21) only to iteratively update Q and fix R.
(21)Qk=1−dkQk−1+dkKk−1VkVkT+Ak,k−1Pk−1Ak,k−1TRk=R0.In brief, the following sEMG denoising method is proposed based on the AR-AKF model.According to Figure1, the optimal order n∗ of the system is first determined by the information inspection criterion. Next, the autoregressive (AR) model is employed to express the sEMG signal fluctuation sequence, and the corresponding AR model group is built. Subsequently, the AR model group in the previous step is transformed into the state space model required for optimal estimation. Lastly, the AKF adaptive noise estimator is employed to adaptively estimate the statistical characteristics of the observed signal, and the optimal state estimator is adopted to optimally estimate the observed signal. To be specific, the state space model is the combination of AR and AKF, which also underpins AKF to perform filtering estimation.Figure 1
Denoising model based on AR-AKF.


## 3. Experiment Analysis

In the experiment here, the Trigno Wireless System of DELSYS is employed to collect EMG signals, and healthy men are taken as the experimental subjects. The collection frequency reaches 1000 Hz. The sEMG signals of the superficial flexor muscles of the fingers are collected to determine discrete sEMG sampling values. On the whole, 40 sets of wrist upturning are collected. There are 2000 data points per group. The Trigno sensor integrates a 20-450 Hz bandpass filter, so the frequency of the collected sEMG signal largely ranges from 20 to 450 Hz.To verify the effectiveness of the denoising model proposed here, in the experiment, the standard sEMG signal is added with a SNR of 5 dB, 10 dB, 15 dB, 20 dB, 25 dB, and 30 dB band-limited Gaussian white noise, and the root mean square error (RMSE) and Mean Absolute Percentage Error (MAPE) are introduced, and also SNR is presented as an evaluation index. In addition to these evaluation indexes, a local similarity metric [18] is used for quantitative experimental results; it can reflect the signal leakage which refers to those lost coherent signal energy in the removed noise section. To compare the denoising effect of the denoising method proposed and the classic denoising method, simulation comparison experiments based on four denoising methods, i.e., AR-AKF, wavelet-sym8, LMS, and EMD, are designed.Figure2 illustrates a comparison diagram of the signal denoising effects exerted by the four methods (i.e., AR-AKF, wavelet-sym8, LMS, and EMD) under 5 dB of noisy signal. Figure 3 shows the signal denoising error curve. Obviously, the sym8 wavelet method exerts a more significant denoising effect on low-amplitude signals, whereas it loses part of the real information in high-amplitude signals. According to Figure 2, the denoising result of EMD is suggested to be more effective than that of AR-AKF. However, as revealed by the data in Table 1, neither the mean RMSE nor the mean SNR is as good as AR-AKF. Through the combination of Figure 3, though most of the denoising error results of EMD are good, there is a period of very unsatisfactory results, and the final result is not as good as AR-AKF.Figure 2
Comparison chart of denoising effect.
(a)
EMG signal collected when the wrist is turned up(b)
Noisy signal(c)
LMS denoising signal(d)
Sym8 wavelet denoising signal(e)
EMD denoising signal(f)
AR-AKF noise cancellation signalFigure 3
Signal denoising error curve.Table 1
Signal denoising effect evaluation table.
Noisy signal (dB)Sym8EMDLMSAR-AKFRMSESNRMAPERMSESNRMAPERMSESNRMAPERMSESNRMAPE534.6977.0072.80432.0897.6865.20235.6036.7835.66935.6036.7835.6691024.09110.1761.57626.4729.3573.79420.60911.5324.00121.16811.2994.6451516.08413.6851.24129.9078.2972.00916.80413.3051.78513.06815.4882.0312010.75717.1790.88630.5958.1001.48815.55813.9741.4757.73520.0431.374257.44720.3730.70036.2256.6331.05214.98114.3020.9134.56924.6150.761305.54822.9300.58138.6246.0761.15114.72314.4560.9472.96028.3850.619Table1 presents the evaluated denoising effect of the four methods under a range of noise signals. Specific to low polluted signals, AR-AKF has the highest SNR and other methods have much lower SNR than the undenoised signal. For highly polluted signals, though the AR-AKF method does not make significant improvement compared to other methods, there are still more glitches in the denoised signal. The four methods are not extremely effective in denoising signals with low SNR ideally, and the advantage of AR-AKF indicates that it is capable of adaptively filtering and estimating the noise signal, so relatively ideal denoising results can be achieved in different noise levels. Table 2 presents the local similarity metric of the four methods in different noise levels. In the original paper, the index of the local similarity metric is a map which has detailed information about the similarity between the original signal and denoised signal; for simplicity in this experiment, the local similarity metric is assigned the mean of all elements. Table 2 indicates that AR-AKF has the best performance for low polluted signals which means that the lost coherent signal energy in the removed noise section is least; for highly polluted signals, AR-AKF is not the best but not badly performed compared to others. Generally speaking, the results of Table 2 are basically consistent with those of Table 1.Table 2
Local similarity metric evaluation table.
Noisy signal (dB)Sym8EMDLMSAR-AKFMean of local similarity metric50.62800.70610.66830.6465100.73010.79170.77370.7448150.83320.83000.85110.8310200.85120.82400.88310.8758250.86760.86990.90040.9026300.88950.84500.90920.9175Overall, the AR-AKF method, as compared with other methods, is subject to a smaller root mean square error and a larger SNR, which also shows that the method based on the AR-AKF model exhibits a stronger denoising ability.To more specifically study the effect of the AKF type in the overall model on the denoising effect, the four methods (i.e., AR-RTS, AR-SHKF, AR-STKF, and AR-STSHKF) are compared longitudinally. To be specific, RTS, SHKF, STKF, and STSHKF refer to a volumetric Kalman smoother, a Sage-Husa adaptive Kalman filter, a strong tracking adaptive filter, and a strong tracking adaptive filter based on Sage-Husa.Figure4 plots the signal denoising effect error curves of the four methods of AR-RTS, AR-SHKF, AR-STKF, and AR-STSHKF. Table 3 lists the denoising evaluation results of the four methods. Obviously, the denoising effect achieved by different AKFs is different. To be specific, the optimal denoising effects are AR-STSHKF and AR-RTS. The average RMSE and SNR of AR-RTS are significantly better than those of other methods. AR-STSHKF is second only to AR-RTS. However, AR-RTS is primarily applied in offline scenarios, and AR-STSHKF can be exploited to achieve real-time online prediction. As a result, AR-STSHKF is more often employed in practice. Nevertheless, under weak real-time performance, the effect of the filter using the RTS smoother is more significant.Figure 4
Signal denoising error comparison chart.Table 3
Nonnoise effect data statistics table.
AR-RTSAR-SHKFAR-STKFAR-STSHKFRMSE29.780833.100732.749732.5449SNR8.33477.41677.50937.5638Moreover, the denoising effects under different orders are compared to determine the impact of the AR order on the denoising effect. Figure5 presents the size of the information criterion under different orders n. Table 4 lists the AR-AKF denoising effect data table under different AR orders. To be specific in Figure 6, the AR-RTS denoising effect is optimal when n=4, and the optimal denoising of the AR-STSHKF method is n=3, basically consistent with the estimation of the information criterion.Figure 5
Different order information check criterion function value graph.Table 4
Data table of denoising effect under different orders.
nRMSEAR-RTSAR-STSHKFn=225.938426.8722n=325.551826.8495n=425.216426.8683n=525.864326.8719n=625.956426.8689Figure 6
Comparison chart of denoising error under different orders.


## 4. Conclusion

In brief, a denoising method is developed in this study by employing the AR-AKF model based on the characteristics of the EMG signal. First, the optimal ordern of the AR model is determined by abiding by the FPE, AIC, and BIC criteria of the Akaike information test. Subsequently, the AR model of this order is adopted to express the EMG signal sequence. Thus, n1 to n orders are determined. The AR model equation set is used to build the state space model and the observation model by applying n AR model equation sets. Next, the adaptive Kalman filter method is adopted to obtain the optimal estimation of the original sEMG signal. As demonstrated from the experimental results, the model is capable of effectively removing the noise in the sEMG signal since the denoising effect of AKF complies with the accurate modeling of the target object. Accordingly, this study uses the AR model to build the precise mathematical model required for filtering the EMG signal sequence. Moreover, this mathematical model can describe the regular EMG signal and filter most irregular noises, so the model can be compared with reality. The signal data are fitted. Lastly, the dynamic modeling capabilities of AR and the characteristics of AKF’s adaptive noise estimation are integrated, and the model parameters are regulated with the time-varying noise estimator to achieve a stable denoising effect, having strong adaptive capabilities and tracking performance.In the experiment, the denoising effect of this model is compared with those of some classic methods, and the different effects exerted by different adaptive filters are analyzed in depth. As revealed from the experimental results, for the random noise of sEMG, the denoising effect of this model is significantly enhanced. Furthermore, the impact of different AR orders on the denoising results is experimentally analyzed, and the validity of the AR optimal order estimation criteria is verified.



---

*Source: 9409560-2021-11-08.xml*