Keywords

1 Introduction

According to WHO, stroke has become the leading cause of premature death after coronary heart disease and lower respiratory tract infection, and 75% of the patients show varying degrees of limb motor dysfunction, which seriously affected the quality of patients’ life. In recent years, rehabilitation robot technology has developed rapidly, and has been widely used in clinical rehabilitation [1]. Studies have shown that the active training mode based on human-computer interaction can improve the participation of patients and accelerate the recovery of motor function [2].

One of the major sequelae of stroke patients is unilateral motor dysfunction. Therefore, according to the motion analysis of sEMG, injured limb can achieve active rehabilitation exercises by mirroring healthy limb [3]. However, there are still some problems in the motion analysis of sEMG, such as poor real-time and low accuracy, which restricts the development of human-computer interaction technology on rehabilitation exercises.

In this paper, we select the muscle channel based on the analysis of the coupling relationship between the joint angle of the lower limb and the EMG signal, which can reduce the time-consuming and instability of model caused by data redundancy. We propose the least squares extreme learning machine algorithm based on golden section(GS-LSELM), and establish a prediction model between the sEMG and joint angle, which is used to predict the hip angle and knee angle, and achieve the motion analysis finally. The experimental results show that, compared with the BP neural network, the model establishment time is reduced by 99.85% and the prediction error is also reduced, which satisfy real-time and accuracy requirements of the sEMG motion analysis and can be used to active rehabilitation robot tracking control.

2 Joint Motion Analysis Algorithm Based on GS-LSELM

2.1 Algorithm Principle

The principle of sEMG motion analysis algorithm is shown in Fig. 1. The whole process is divided into three parts: synchronizing data acquisition, data processing and analysis, model training and angle prediction.

Fig. 1
figure 1

The principle of joint motion analysis algorithm

2.2 Data Acquisition

In this paper, we make the lower limb flexion and extension as experimental mode of operation, and simultaneously collect sEMG, hip and knee angle of seven healthy subjects (5 boys, 2 girls, (25 ± 2) years old). Before the experiment, the subjects were asked to have no muscle fatigue and had a good mental state, and were familiar with the experimental process. With the EMG acquisition equipment of the US Delsys company, we recorded vastus rectus (VR), vastus lateralis (VL), vastus medialis (VM), semitendinosus muscle (SM), biceps muscle(BM), and tibialisa-nterior (TA) of the subjects.

The experimental procedure is as follows: Before experiment, a subject lies on the experimental platform with the feet fixed on the slideway and pedal, as shown in Fig. 2, and does continuous motion in three cycles (5 s, 3.5 s, 2 s). To avoid muscle fatigue, the subject rest 3–5 min before the start of each experiment. The data of the seven subjects are recorded and repeated three times according to the above procedure.

Fig. 2
figure 2

Data acquisition equipment and mark point location

2.3 Data Processing and Feature Extraction

The EMG signal has the characteristics of strong non-linearity, non-stationarity and being susceptible to interference, so it is necessary to preprocess the EMG signal before the feature extraction. The specific process is shown in Fig. 3:

Fig. 3
figure 3

Original sEMG preprocessing

The wavelet packet decomposition and reconstruction technique is used to remove the baseline drift [4], and the 4 order band-pass filter is used to remove the signals outside of 10–200 Hz. Combined with sliding window technology, we propose adaptive ICA algorithm to automatically detect power frequency noise. Based on the window width and noise frequency, we construct signals:

$$ a(t) = \left[ {a_{1} (t), \cdots ,a_{6} (t)} \right]^{\rm T} $$
(1)

A new set of data is formed by the combination of the structural signal and the original sEMG, and its power frequency noise and harmonic signal is separated by traditional ICA method. After preprocessing, the EMG is expressed by \( \xi \), and its characteristics WL(wave length) is abstracted, which represents the accumulated wavelength of \( \xi \) over a period.

$$ WL = \sum\limits_{i = 1}^{N - 1} {\left| {\xi_{i + 1} - \xi_{i} } \right|} $$
(2)

where, N is the sampling number within a period of time, and 13 sampling points are selected as a data segment in this paper.

As shown in Fig. 4, with the change of joint angle, sEMG of vastus rectus muscle (VR) shows a strong periodicity, and the biceps muscle (BM) has poor periodicity and robustness, which has a small change in 0 ~ 5 s and a big change in 10 ~ 15 s. At the same time, too many input channels will increase the complexity of the model, reduce the stability of the model and increase the training time, so it is necessary to select the muscle channels.

Fig. 4
figure 4

Characteristic signal and joint angle signal of sEMG

2.4 Muscle Optimal Selection

In this paper, the local frequency coherence analysis method [5] is used to calculate the coherence value between the EMG feature signal \( v \) and the joint angle signal \( \theta \). Taking hip for example, the hip angle frequency spectrum is mainly concentrated in the 0~2 Hz. We record the frequency channel as \( \omega \), and have a coherence analysis of \( v \) and \( \theta_{h} \) in the frequency channel \( \omega \) by the following formula.

$$ c_{{v_{\omega } \theta_{h} }} (f) = \frac{{\left| { < S_{{v_{\omega } \theta_{h} }} (f) > } \right|^{2} }}{{\left| { < S_{{v_{\omega } v_{\omega } }} (f) > } \right| * \left| { < S_{{\theta_{h} \theta_{h} }} (f) > } \right|}} $$
(3)

where \( S_{{\theta_{h} \theta_{h} }} (f) \) and \( S_{{\theta_{h} \theta_{h} }} (f) \) are separately the self spectral density function of \( v \) and \( \theta_{h} \) in \( \omega \), and \( S_{{v_{\omega } \theta }} (f) \) is the cross spectral density function of \( v \) and \( \theta_{h} \) in \( \omega \). \( c_{{v_{\omega } \theta_{h} }} (f) \) is used to describe the linear correlation of the two signals in \( \omega \), whose span is from 0 (no correlation) to 1(perfect correlation).

The significant coherence threshold CL is used to describe the coherence degree between \( v \) and \( \theta_{h} \).

$$ CL(\alpha ) = 1 - (1 - \alpha )^{{\frac{1}{n - 1}}} $$
(4)

where n is the number of data segments involved in spectral estimation, \( \alpha \) is the confidence level.

The significant coherence area index \( A_{{coh(\upomega)}} \) is used to describe the coherence of \( v \) and \( \theta_{h} \) in \( \omega \).

$$ A_{coh(\omega )} = \sum\limits_{f} {\Delta f \cdot (C_{{v_{\omega } \theta_{h} }} (f) - CL)} $$
(5)

where \( \Delta f \) is the frequency resolution. The larger the \( A_{{coh(\upomega)}} \), the greater the coherence of \( v \) and \( \theta_{h} \) is in \( \omega \).

As shown in Fig. 5, in the frequency channel \( \omega \), the coherence between the anterior tibial muscle and the hip joint is the largest, followed by the vastus rectus muscle and semitendinosus muscle. The same conclusion is found in the analysis of the knee joint. So the anterior tibial muscle and vastus rectus are used as the input channel to predict the hip and knee angles.

Fig. 5
figure 5

Significant coherence area of sEMG and hip angle in different muscle channels

2.5 Joint Angle Prediction Based on GS-LSELM

In this paper, we use the least squares method [6] to optimize the input weight and bias of the limit learning machine, and combine the golden segmentation algorithm to optimize the number of hidden layer nodes and simplify the network structure to obtain the optimal prediction accuracy.

Network input of the predicted model are the tibial anterior muscle signal \( u_{AT} \) and vastus rectus muscle signal \( u_{VR} \), and the difference signals \( \Delta u_{AT} = u_{AT} (i + 1) - u_{AT} (i) \), \( \Delta u_{VR} = u_{VR} (i + 1) - u_{VR} (i) \), and network output are hip and knee joint angles. Taking hip angle prediction for example, \( U = \{ u_{j,1} ,u_{j,2} , \ldots ,u_{j,n} \} \)(j = 1,2,3,4) and \( \theta_{h} = \{ \theta_{1} ,\theta_{2} , \ldots ,\theta_{n} \} \) are the input and output of the network respectively, the number of samples and hidden layer nodes are n and L respectively, and the implicit layer excitation function is \( G( \cdot ) \). We chooses the sigmode function as an excitation function:

$$ G(z) = \frac{1}{{1 + e^{ - z} }} $$
(6)

Expected mathematical model is

$$ \theta_{h} = \sum\limits_{i = 1}^{L} {\beta_{i} } G_{i} (\alpha_{i} \times u_{i} + b_{i} ) $$
(7)

where \( \alpha_{i} = [\alpha_{i1} ,\alpha_{i1} , \ldots ,\alpha_{in} ]^{T} \) is the weight of the i-th hidden layer node and the input node, b i is the i-th hidden layer node threshold, \( \beta_{i} = [\beta_{i1} ,\beta_{i2} , \ldots ,\beta_{iL} ,]^{T} \) is the connection weight of the output layer node and the i-th hidden layer node. Formula (8) can be simplified as: \( \theta_{h} = H \cdot \beta \).

$$ H = G\left[ {\begin{array}{*{20}c} {\alpha_{1} \cdot u_{1} + b_{1} } & \cdots & {\alpha_{L} \cdot u_{1} + b_{L} } \\ \vdots & \ddots & \vdots \\ {\alpha_{1} \cdot u_{n} + b_{1} } & \cdots & {\alpha_{L} \cdot u_{n} + b_{L} } \\ \end{array} } \right] = G(u \cdot \alpha ) $$
(8)

where H is the hidden layer output matrix,

$$ u = \left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\begin{array}{*{20}c} {u_{1} } \\ 1 \\ \end{array} } & {\begin{array}{*{20}c} {u_{2} } \\ 1 \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} \cdots \\ \cdots \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} {u_{n} } \\ 1 \\ \end{array} } \\ \end{array} } \right]^{T} $$
(9)
$$ \alpha = \left[ {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\begin{array}{*{20}c} {\alpha_{1} } \\ {b_{1} } \\ \end{array} } & {\begin{array}{*{20}c} {\alpha_{2} } \\ {b_{2} } \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} \cdots \\ \cdots \\ \end{array} } \\ \end{array} } & {\begin{array}{*{20}c} {\alpha_{L} } \\ {b_{L} } \\ \end{array} } \\ \end{array} } \right] $$
(10)

According to the Mohr-Penrose inverse matrix theory \( u \cdot \alpha = \theta_{h} \theta_{h}^{ + } G^{ - 1} (\theta_{h} \beta^{ + } ) \), assuming \( Z = \theta_{h}^{ + } G^{ - 1} (\theta_{h} \beta^{ + } ) \), then we can obtain the linear relationship between the input weight and the output value: \( u \cdot \alpha = \theta_{h} Z \). By the principle of least squares solution, when Z is randomly generated, the input weights u and the bias \( \alpha \) can be obtained and can be substituted into the formula (7) and (8) to calculate the hidden layer output matrix H and output weight \( \beta \), so as to obtain the parameters of the model.

3 Results

According to the description of Sect. 2.2, 7 subjects (S1 ~ S7) carried out lower limb flexion and extension with three cycles (5 s, 3.5 s, 2 s). sEMG, hip and knee angle were collected synchronously, which were used to calculate the characteristics \( u_{AT} \), \( u_{VR} \) and the difference signal \( \Delta u_{AT} \), \( \Delta u_{VR} \) of tibialis anterior muscle and vastus rectus muscle. The root mean square error RMSE and training time T are selected as the performance verification indexes. The smaller the RMSE, the higher the prediction accuracy of the model; and the less the training time T, the faster the model is established and the better the real-time.

Taking S2 as an example, when the motion cycle is 5 s, the RMSE of the hip joint angle is \( 8^{ \circ } \), and it is \( 2.9^{ \circ } \) when the motion cycle is about 2 s, which shows that motion velocity has a great influence on prediction error. So, it is necessary to choose the right speed in the rehabilitation training of mirror image motion to avoid large prediction error and patient fatigue. The prediction results of the three kinds of motion cycle are shown in Fig. 6. It can be seen that the deviation between the predicted value and the actual value is larger at low speed, and is mainly concentrated at the inflection point.

Fig. 6
figure 6

Practical angle and forecast angle of hip joint and knee joint

Table 1 shows the comparison results of the two algorithms on the training time and the verification time. From Table 1, we can know that, on the same training set, the training time of GS-LSELM is 0.0013 s, which is only 0.15% of BP, and its prediction time is only 1.2 ms, which shows that the GS-LSELM algorithm is better than traditional BP neural network in real-time.

Table 1 Comparisons of real-time between BP and GS-LSELM

4 Conclusion

In this paper, we studied the coupling relationship between the EMG signals of lower limbs and the joint angles by the method of coherence analysis, and filtered the model input channel and used a first order recursive filter to realize the data synchronization. On this basis, we proposed GS-LSELM algorithm and establish- ed the prediction model of joint angles based on the EMG signals, and the performance of the model was verified by experiment. In future studies, the proposed method can be used in the rehabilitation training system, making the rehabilitation robot tracking the joint angle so as to achieve the active movement of patients.