Human Intention Recognition for Lower Limb Rehabilitation Exoskeleton Robot

With the increasing aging of the population, the contradiction between the increasing demand for rehabilitation and the insufficient rehabilitation medical resources of the patients with moderate limb disorders in stroke is increasingly prominent. As a new means of rehabilitation, rehabilitation exoskeleton robot has gradually become a research hotspot in recent years. The rapid and accurate recognition of human lower limb movement intentions is very important for the control system of lower limb rehabilitation exoskeleton robots, this paper innovatively proposes an adaptive inertial weighted improved particle swarm optimization LSTM algorithm (IPSO-LSTM), which not only characterizes the mapping relationship between the surface EMG (sEMG) signal and the joint angle of the lower extremity in continuous motion, but also solves the values random setting problems of iterations number, learning rate and hidden layer number. More importantly, the optimization algorithm solves the network over fitting problem and further improves the predict accuracy of the model. Finally, based on the complex system of lower limb rehabilitation exoskeleton robot, the algorithm is applied to the human-machine cooperative control experiment of active rehabilitation training, the experiment verifies that the IPSO-LSTM algorithm model can meet the requirements of real-time and accuracy of active intention recognition. sEMG used the predicted angle as the control signal of the 2-DoF assisted exoskeleton The simulation results show that this method can better estimate the elbow joint angle. However, this document only trains the collected discrete data into a predictive model, and does not conduct real-time control experiments on the model. The Hierarchical Projected Regression (HPR) method proposed by Chen is a learning method for high-dimensional EMG signal 5 , which can estimate the angle of the human elbow joint online. The experimental results show that the average error of tester A is about 8.39° when the load is 1.54Kg, and the average error is about 11.21° when the load is 1.92Kg. The average is about 11.21° when the tester is loaded with 1.54Kg, and the about 11.92Kg. It is 13.28°, and the average error of the drinking task 10.33°. Perceptron Neural Network (MLPNN) and Radial Basis Function Neural Network (RBFNN) to identify kinematic parameters such as the angle and angular velocity of the human upper limb forearm results show that RBFNN has better recognition, and the average regression coefficient values of angular velocity and angular velocity are 0.76 and 0.39, respectively. Wang used an improved training algorithm of radial basis function (RBF) neural network, that is, a Gaussian function is used between the input layer and the hidden layer to identify the relationship between sEMG and joint angle in periodic motion. Experimental results show that the mean square error and correlation coefficient are about 0.043 and 0.905, respectively 7 . Ren proposed a motion prediction model based on multi-stream LSTM against deep learning (MS-LSTM Dueling) 8 , which was used on NTUH-II's 8-DOF upper limb rehabilitation exoskeleton. Offline experimental results show that the MS-LSTM Dueling model has higher accuracy. In real-time experiments, IMU control and MSLSTM Dueling mode control are compared. The results show that this method reduces the average error of the joint angle between the human arm and the robot arm by 50% and the average


Introduction
The sEMG signal is a kind of bioelectric signal, which is generated about 30-100ms before the skeletal muscle contraction 1 , the sEMG-based human motion intention recognition method, especially the mapping between kinematics/dynamics of continuous motion regression, can be found to be an important role in improving recognition accuracy and will become the future. Research has shown that there are two types of motion intention recognition methods: sEMG-driven musculoskeletal model-based motion intention recognition methods and machine learning model-based motion intention recognition methods. Commonly used ML methods for motion intent recognition include SVM, Linear Discriminant Analysis, Back Propagation Neural Network and Deep Learning 2,3 . This paper focuses on the continuous motion regression based on machine learning, that is, the continuous motion estimation problem, which is divided into the mapping between sEMG and joint kinematics and the mapping between sEMG and joint dynamics.
For joint kinematics regression, a mapping between sEMG and joint angle is usually established. The estimated angle is used as an input signal in the control system of the wearable robot to achieve precise angle trajectory tracking. Luh predicted the motion angle of the elbow joint in the lifting task based on the sEMG signal and used the predicted angle as the control signal of the 2-DoF assisted exoskeleton 4 . The simulation results show that this method can better estimate the elbow joint angle. However, this document only trains the collected discrete data into a predictive model, and does not conduct real-time control experiments on the model. The Hierarchical Projected Regression (HPR) method proposed by Yang Chen is a learning method for high-dimensional EMG signal 5 , which can estimate the angle of the human elbow joint online. The experimental results show that the average error of tester A is about 8.39° when the load is 1.54Kg, and the average error is about 11.21° when the load is 1.92Kg. The average error is about 11.21° when the tester B is loaded with 1.54Kg, and the average error is about 11.92Kg. It is 13.28°, and the average error of the drinking task result is about 10.33°. Raj used Multi-Layered Perceptron Neural Network (MLPNN) and Radial Basis Function Neural Network (RBFNN) to identify kinematic parameters such as the angle and angular velocity of the human upper limb forearm 6 . The results show that RBFNN has better recognition, and the average regression coefficient values of angular velocity and angular velocity are 0.76 and 0.39, respectively. Wang used an improved training algorithm of radial basis function (RBF) neural network, that is, a Gaussian function is used between the input layer and the hidden layer to identify the relationship between sEMG and joint angle in periodic motion. Experimental results show that the mean square error and correlation coefficient are about 0.043 and 0.905, respectively 7 . Ren proposed a motion prediction model based on multi-stream LSTM against deep learning (MS-LSTM Dueling) 8 , which was used on NTUH-II's 8-DOF upper limb rehabilitation exoskeleton. Offline experimental results show that the MS-LSTM Dueling model has higher accuracy. In real-time experiments, IMU control and MSLSTM Dueling mode control are compared. The results show that this method reduces the average error of the joint angle between the human arm and the robot arm by 50% and the average delay time by 70%. Ngeo used FFNN to establish the non-linear relationship between the finger joint angle and the sEMG signal 9 , using this method to predict the finger joint angle, the correlation between the predicted value and the actual value was as high as 0.92, and the average NRMSE was about 8.5°. Xia implemented a recursive convolutional neural network (RCNN) to estimate the motion of the upper limbs, with an average correlation coefficient of 93% 10 . Zhang Feng used BPNN to establish the mapping between sEMG and the angles of the ankle, knee and hip joints 11 . The results of the study showed that the average error of different leg movements was less than 9°. Jiang developed a real-time control method based on sEMG 12 , and the experimental results show that the average correlation coefficient is about 0.963. Mefoued developed an RBFNN to map the nonlinearity between the sEMG signal and the expected knee angle 13 . Using the nonlinear radial basis function as the activation function, the maximum mean square error of the knee joint position estimate is equal to 1.34°.
Compared with joint kinematics regression, there are relatively few studies on dynamic regression. The mapping between sEMG and joint force or torque is constructed. The estimated force or torque is used as an input signal in the control system of the wearable robot to achieve accuracy. Torque trajectory tracking. Ziai used ANN based on sEMG to estimate wrist torque. The proposed network uses FFBPNN, with an average NRMSE of 2.8% 14 . Yokoyama used ANN based on sEMG to predict hand grip strength 15 , and the experimental results showed that the average CC between predictive power and observation power was 0.84. Bian proposed a sEMG signal processing method consisting of filtering, feature extraction, feature dimensionality reduction, and pattern recognition, using SVM, random forest, naive Bayes and LDA four classification algorithms for simultaneous hand movement classification 16 . Experimental results show that the SVM with linear kernel function is better than the other three classifiers, and its accuracy rate is as high as 92.25%. When the training set and the test set are from two different subjects, the accuracy is about 80.00%. Pena proposed a multi-layer perceptron neural network to map sEMG signals to the torque and stiffness of the knee joint and developed a second order sliding mode control method to control auxiliary equipment through the angle of the knee joint 17 . Chandrapal established a mapping between five sEMG signals and knee moments by implementing ANN 18 , and the results showed that the average minimum estimation error of the proposed method reached 10.46%. Ardestani proposed a multidimensional wavelet neural network (WNN) to predict the torque of the lower limb joints 19 . The results show that the proposed WNN can improve the estimation accuracy of joint torque, the root mean square error is less than 10%, and the correlation coefficient is greater than 0.94. Khoshdel developed an optimized artificial neural network (one input layer, two hidden layers and one output layer) for knee joint force estimation 20 , with a total error of 3.45.
Based on the latest research findings above, due to the lack of daily repeatability and long-term training process, the method is still in the laboratory exploration and application stage, and the market should be less. Moreover, the above methods are only suitable for specific users and motion patterns, and the robustness and practicality of the algorithm have a lot of possibility for improvement.
In this paper, the lower limb rehabilitation exoskeleton can realize passive training, assisted training and active training in function, and the control algorithm proposed in this paper is aimed at the active rehabilitation training stage. Firstly, we presented the principle of joint angle prediction based on IPSO-LSTM, which solves the problem that it is difficult to determine the number of iterations, the learning rate, and the number of hidden layers in LSTM model. Then, the simulation of joint angle prediction based on IPSO-LSTM, a joint angle prediction model based on IPSO-LSTM algorithm is established, and the network is trained by the combination of different channel sEMG signal features, the prediction error of the model under different feature combinations is compared. Finally, based on the prediction model, the human-machine cooperative control experiment of lower limb rehabilitation exoskeleton is carried out, and the multi-sensor fusion based human-machine cooperative control scheme is verified.

The principle of joint angle prediction based on IPSO-LSTM
The long and short time memory (LSTM) network is a deep learning model, its structure has a good time series modeling expression ability. Using LSTM deep network for modeling can effectively extract sequence information with temporal and spatial correlations in sEMG signals and enable the model to retain strong generalization capabilities to meet the needs of movement model migration. In this paper, the sEMG signal and joint angle signal data set are used to train the model, and the in-depth coupling relationship between the sEMG signal and the motion joint angle in time is obtained, and the LSTM joint angle prediction model is established based on this feature.
In order to obtain the optimal model, this paper studies the estimation of the knee joint motion angle of the different feature parameter combination data sets of different channels under the same tester and the same action. Using the results of the study of characteristic parameter changes, select the optimal characteristic values of the integral value of the rectus femoris, the standard deviation of the semitendinosus, the average power frequency of the lateral femoris, the median frequency of the gastrocnemius and the maximum value of the wavelet coefficient of the rectus femoris.
In the LSTM algorithm, the values of the iterations number, learning rate and hidden layer number are set randomly. To reduce the randomness of the parameters and improve the prediction effect of the model, this paper proposes a particle swarm optimization LSTM prediction model algorithm (PSO-LSTM), which is used to solve the values random setting problems of three parameters in the LSTM model.
Particle Swarm Optimization (PSO) is a kind of evolutionary algorithm. It is like simulated annealing. It starts from a random solution, finds the optimal solution through iteration, and evaluates the quality of the solution through fitness. This method is simpler than the rules of genetic algorithm and does not have the "crossover" and "mutation" operations of genetic algorithm. It searches for the global optimal solution by following the optimal value currently searched. The basic principle of PSO is based on the observation of animal group activity and behavior, and the sharing of information obtained by individuals in the group, so that the movement of the group can evolve from disorder to order in the problem-solving space, and then obtain the optimal solution.
In PSO, the solution of each optimization problem is a bird in the search space, called a "particle". All particles have a fitness value determined by the optimized function, and a speed determines their flying direction and distance. Then the particle gate will follow the current optimal particle to search in the solution space. PSO is initialized as a group of random particles (random solution), and the optimal solution is found through iteration. In each iteration, the particle updates itself by tracking two "extreme values". The first value is the optimal solution found by the particle itself, that is, the individual extreme value id P . The other value is the optimal solution currently found by the entire population, that is, the global extreme value gd P . When finding these two optimal values, the particles update their speed and position according to equation (2.1).
In the formula, id V is the particle velocity, w is the inertia weight, id X is the current particle position, id P is the d-th dimension of the individual extreme value of the i-th variable, gd P is the d-th dimension of the global optimal solution, and 1 c is each particle The individual learning factor of, 2 c is the group learning factor of each particle, and Comparing the parameters of the PSO optimized model with the LSTM model parameters, it is found that the standard PSO algorithm is easy to cause the model to fall into the local optimal value, causing problems such as network overfitting. Therefore, research on the method of solving the network overfitting problem found that by increasing the value of the inertia weight, the global search ability of the algorithm can be greatly improved 21 . The literature pointed out that the inertia weight is also an important parameter of the particle swarm optimization algorithm 22,23 . The weight includes five types: constant inertia weight, random inertia weight, time-varying inertia weight, chaotic inertia weight, and adaptive inertia weight, which can be selected according to model performance requirements. To further improve the accuracy of the PSO-LSTM model in predicting the joint angles, an LSTM algorithm with adaptive inertia weights is proposed, namely the IPSO-LSTM algorithm to improve network overfitting and apply it to the sitting and lying lower limb rehabilitation exoskeleton system for knee angle prediction.
Different scholars have proposed a variety of adaptive inertial weighting algorithms, that is, adjusting the inertial weight according to one or more feedback parameters 24,25 . Based on literature research, this paper proposes an adaptive inertial weighted particle swarm algorithm based on the fitness value of particles. Through the ratio of the historical optimal fitness value of each particle to the historical optimal fitness value of the group, the self-adapt the inertial weight, as shown in equation (2.2). The flow chart of the IPSO-LSTM algorithm is shown in Figure 1.
Among them, gbest is the optimal position of the historical group, i best is the historical optimal position of the i-th particle, and f is the fitness function.

. Parameter settings of IPSO-LSTM
The IPSO-LSTM algorithm process needs to initialize the population number, evolution times and learning factors of the particle swarm, set the number of iterations, learning rate and hidden layer boundaries, etc. The simulation parameter settings of the IPSO model are shown in Table 1, and the IPSO model is optimized. The parameter results are shown in Table 2.

Simulation results
Compare the angle estimation simulation results of the three algorithms separately. Figure 2 shows the IPSO-LSTM model prediction results of 5 sets of feature parameter combinations in turn, and Table 3 shows the angle estimation errors of 5 sets of feature parameter combinations in turn. It can be seen from Table 2 that after optimization using the IPSO algorithm, in the (a) iemg+rms combined prediction, the angle estimation error of the IPSO-LSTM model decreases by about 0.8° in the first cycle; in the first and second cycles, the IPSO-LSTM model is optimal, the third and fourth cycles The LSTM model is the best. In the (b) iemg+mpf combined prediction, the angle estimation error of the IPSO-LSTM model decreases by 3.4° compared with LSTM in the first cycle and 0.9° compared with PSO-LSTM. In the (c) rms+mf combined prediction, the IPSO-LSTM model is better than that of the LSTM model, especially the angle estimation error in the first cycle drops by about 10°. In the (d) rms+mpf+mf combination, the prediction effect of the IPSO-LSTM model is better than that of the LSTM and PSO-LSTM models, especially the angle estimation error in the first motion cycle decreases by about 0.8°. In the (e) rms+mpf+mf+cwt combination, the IPSO-LSTM model is significantly better than the prediction effect of the PSO-LSTM model, and the angle estimation error in the first, third, and fourth cycles is better than the LSTM model.  It can be seen from the results that the optimization effect of the IPSO-LSTM algorithm model is better than that of the LSTM model and the PSO-LSTM model, especially for the second and third groups. The optimization effect is the best in the first and fifth groups. When the model error is small, the IPSO-LSTM algorithm model can reduce the angle estimation error to about 0.6°, which further illustrates that the adaptive inertial weight particle swarm optimization algorithm optimization process of the particle fitness value obtains the global maximum the figure of merit improves the accuracy of the model. 4 Active rehabilitation experiment based on rehabilitation exoskeleton 4.1 Experimental platform for rehabilitation exoskeleton According to the anatomy of the lower limbs, the lower limb sitting and lying rehabilitation exoskeleton robot is designed with 3 degrees of freedom, including 3 degrees of freedom of hip joint flexion/extension, knee joint flexion/extension, and ankle joint flexion/extension. This design takes into account Movements from large joints to small joints with varying degrees of damage. As shown in Figure  3.

Fig. 3 Exoskeleton robot system of sitting and horizontal lower limb rehabilitation
In addition, the exoskeleton type lower limb rehabilitation robot needs to match the human lower limbs, and the robot joints must be highly consistent with the human limb joints. However, due to the great individual differences of people, there are tall, short, fat and thin. This requires the robot to have the function of intelligent adjustment of individual differences. In order to realize the adjustment of the thigh length, calf length, seat width, and seat pitch angle, Electric push rods are installed inside the robot's upper and lower leg links and on the hip joint width adjustment sliding table. At the same time, in order to realize the rapid combination and separation of the seat structure and the platform, an electromechanical locking device is installed at the combination position of the platform and the seat structure to realize the function of the patient to quickly get on and off the rehabilitation equipment.
The working process of the lower limb rehabilitation robot control system is as follows: first obtain sEMG data, plantar two-dimensional torque data and joint angle data based on the data acquisition board and control board, and transmit the data to the upper computer system, which processes and stores the data The analysis is converted into a control signal and transmitted to the lower computer controller through the data transmission path, and the lower computer controller sends the execution command to the rehabilitation robot control driver, so as to realize the rehabilitation training of the lower limb rehabilitation robot system. The control system of the lower limb rehabilitation robot is shown in Figure 4.

Determination of prediction IPSO-LSTM model
Using different feature combinations to predict the error results of the knee joint angle during sitting and flexion movement is shown in Figure 5 and Figure 6. The experiment compared the prediction results of sEMG and the joint angle time difference from 80ms to 180ms, as shown in Table 4. It can be seen that the angle prediction effect of the iemg+mpf+mf feature combination numbered 4 is better than that of the other 3 feature combinations, the minimum angle prediction error is 3.17°, and the iemg+mf feature combination numbered 2 is used for the angle prediction effect Poor, the minimum angle prediction error is 4.77°.  From the experimental results, the prediction effect in the first cycle of active training is relatively poor. Therefore, in the sitting and lying rehabilitation exoskeleton system experiment, the first passive and then active method is adopted, and the IPSO-LSTM model with an advance of 165ms is used. The angle prediction is the best.

Human-machine collaborative control experiment of rehabilitation exoskeleton
This paper presents a human-machine cooperative active rehabilitation experiment based on multisensor fusion and adds a plantar torque sensor and a joint angle encoder for real-time monitoring during the training process to ensure the safety and reliability of the active rehabilitation training experiment. Figure 7 shows the angle prediction results of the IPSO-LSTM model based on the combination of rms+mf+cwt in the first group of active rehabilitation training, and Figure 8 shows the IPSO-LSTM model based on the combination of iemg+rms+mpf+mf in the first group of active rehabilitation training Angular prediction result. The experiment was switched to active rehabilitation training at about 22 seconds from the second cycle to 1/5 cycle. During the active rehabilitation training, the experimenter actively slowed down the rehabilitation exercise and reduced the rehabilitation training range. It can be seen from the predicted angle curve that the training trajectory is smooth, and there is no abnormal situation such as jitter. From the torque curve, it can be seen that the active rehabilitation training process, the interaction between man and machine is small, indicating that the exoskeleton can follow the recovery person's exercise intention for better active rehabilitation training.  In summary, the IPSO-LSTM model based on the fusion of multi-sensor information such as sEMG signals and human-machine interaction force signals can realize the rapid recognition of human lower limb movement intentions, which verifies the reliability, practicability and practicality of the humanmachine collaborative real-time control method for active exoskeleton rehabilitation training.

Conclusions
This paper studies the joint angle prediction strategy based on sEMG signals and proposes a knee joint angle prediction method based on the LSTM deep learning algorithm. At the same time, in order to improve the performance of the traditional algorithm in manual parameter adjustment, anti-interference and robustness, LSTM and PSO are used. Comparative analysis of the prediction effect of the LSTM algorithm, and finally optimized the inertia weight of the PSO algorithm and proposed an adaptive inertial weight particle swarm algorithm based on the particle fitness value to solve the network overfitting problem. It can be seen from the predicted angle curve that the training trajectory is smooth, and there is no abnormal situation such as jitter. From the torque curve, it can be seen that the active rehabilitation training process has a small human-machine interaction force, indicating that it is based on the sEMG signal and The depth prediction model of multi-sensor information fusion such as human-machine interaction force signal can realize the rapid recognition of human lower limb movement intention, which verifies the reliability, practicability and real-time performance of the human-machine collaborative control method for exoskeleton active rehabilitation training.

Ethics approval
The experimental protocol was established, according to the ethical guidelines of the Helsinki Declaration and was approved by the Human Ethics Committee of Peking University First Hospital clinical trial ethics committee. Written informed consent was obtained from individual or guardian participants.