Trajectory tracking control of upper limb rehabilitation robot based on optimal discrete sliding mode control

In this paper, an optimal sliding mode control method for trajectory tracking of discrete-time systems based on linear quadratic regulator is proposed to improve the trajectory tracking control accuracy and robustness of upper limb rehabilitation robot under the condition of highly nonlinearities, external disturbances, and unmodeled dynamics. Firstly, considering the uncertainty of the mass and moment of inertia of the connecting rod arm of the upper limb rehabilitation robot and the uncertainty of external interference, the dynamic model of the upper limb rehabilitation robot is established by using the Euler Lagrange method, and the linear time-varying state equation of the rehabilitation robot system under the influence of both nonlinear and uncertain factors is derived. Secondly, directing at the chattering problem in sliding mode control, a sliding mode control method based on a new discrete time reaching law is designed to reduce the amplitude of chattering in the control input signal of the upper limb rehabilitation robot system and improve the tracking speed. Furthermore, combined with linear quadratic optimal control, the optimal discrete integral sliding mode control law (LQRSMC) is finally obtained. Meanwhile, for the sake of reducing the influence of the uncertain signal on the system, a robust control law is adopted to estimate and compensate the uncertain interference. The stability of the upper limb rehabilitation robot system is verified by the sliding mode approach condition of the discrete system. Finally, the genetic algorithm is used to further optimize the weighted value, and MATLAB/Simulink is used to simulate the state trajectory of the upper limb rehabilitation robot under various weighted values. The control strategy can not only effectively weaken the trajectory tracking oscillation problem of the upper limb rehabilitation robot, but also overcome the external disturbance and modeling uncertainty, while ensuring the robustness of the rehabilitation robot system.


Introduction
As the population ages and the number of hemiplegic patients continues to rise, the demand for rehabilitation products is also increasing. In order to speed up the rehabilitation of patients, it is necessary to carry out scientific rehabilitation training in addition to early drug treatment and surgical treatment. The traditional rehabilitation training is mostly one-to-one rehabilitation training assisted by rehabilitation physiotherapists, which costs a lot, and the rehabilitation effect is also affected by its own experience, level and other factors. 1,2 Many scholars at home and abroad have tried to apply robot technology to human rehabilitation training for solving the shortcomings of traditional rehabilitation methods at this stage. Rehabilitation robots have rapidly developed into an emerging rehabilitation therapy technology and become a new application of robotic technology in the medical field. The high-accuracy positioning and repeatability of the motion track of the rehabilitation robot are the keys to realizing the rehabilitation action and ensuring the safe and stable operation of the system. Therefore, designing the optimal controller for patients is also becoming increasingly important. 1 Generally, the upper limb rehabilitation robot system is composed of connected joints, which are highly nonlinear and uncertain. Therefore, the process of rehabilitation training is often disturbed by nonlinear uncertainties of the system, modeling parameters, and external uncertainties. The uncertainty of the parameters mainly comes from the mass of the connecting rod, the length of the connecting rod and the center of mass of the connecting rod, while the uncertainty of the external disturbance mainly comes from the error of the modeling parameters and other uncertain factors. At the same time, the nonlinearity of the system mainly comes from the nonlinear links of the executive components in motion. Based on the nonlinear factors of the system itself and the uncertainty of model parameters, the model parameters will also change within a certain range for different rehabilitation training modes. This makes it difficult to describe the dynamic characteristics of the rehabilitation robot system with an accurate mathematical model, which makes the rehabilitation system difficult to be accurately controlled. Avoiding these different problems is one of the motivations for the presented research.
Robust performance is usually sought through robust control strategies when there are uncertainties and external disturbances. As far as we know, sliding mode control (SMC) is one of the well-known robust controls. This theory is extensively adopted because of its simple theoretical calculation, its good transient performances and its strong adaptability to disturbances. A lot of research [3][4][5][6][7][8] focused on the uncertainty problem in robot trajectory tracking control, and in some cases combined with model predictive control (MPC), adaptive control, fuzzy control, and other control methods. However, these control methods cannot deal with the nonlinear and complex uncertainties in the rehabilitation robot system well. The main reason is that it involves the characteristics of discontinuous time control. Inertia in system switching leads to hysteresis and chattering, which will seriously damage the performance of the system and affect the accuracy of control. Although the sliding mode control has strong robustness, the state trajectory of the time-varying system will quickly deviate from the expected trajectory because of its obvious uncorrelated errors. [9][10][11] To overcome the chattering problem in sliding mode control of rehabilitation robot trajectory tracking, many control strategies have been proposed, such as Park and Tsuji 12 proposed to apply a saturation function to the gain of sliding mode control. Huang et al. 13 proposed a predictive control strategy to weaken the influence of the initial state, and further performed rolling optimization and feedback correction on the system state to improve the accuracy of trajectory tracking. Phu et al. 14 proposed a semi-active control based on fuzzy control method (FLC) to achieve the vibration reduction effect by controlling the magnetorheological damper. 8,11,15,16 For the high-frequency chatter caused by sliding mode control, the disturbance observer can be used to estimate and compensate the uncertainty of internal parameters and external disturbance of the system. To solve this problem, many control methods have been proposed, such as high-order sliding mode control. 17,18 At the same time, sliding mode control is combined to seek a more stable control effect. There are also many problems in the calculation of the equivalent control law based on system dynamics. Solving this problem is also one of the research motivations of this paper.
Based on the above control strategy, although the flutter of nonlinear uncertain continuous systems can be effectively suppressed, the flutter control effect of discrete systems is not obvious. For this reason, Yoshimura 19 proposed a discrete-time sliding mode adaptive control strategy for discrete systems to suppress jitter, and the effectiveness of this method was verified through experiments. However, this strategy cannot meet the requirements of high accuracy for the slow change interference or constant interference outside the system. In addition, with the development of optimal control theory in modern control theory, the results of different studies [20][21][22] show that the controller based on LQR strategy has good stability, and can also make a certain performance index optimal. And the optimal control strategy can not only ensure good robustness of the system, but also be widely applied to the field of rehabilitation medicine, such as hybrid LQR, 23 neural network-based LQR control strategy. Actually, in order to gain the optimal index based on LQR strategy, it usually goes through tedious trial and error methods. This method is time-consuming and labor-intensive. To improve this, a genetic algorithm is applied to determine the optimal weighting matrix to improve the control performance of the controller.
In summary, we mainly consider an optimal control strategy that not only minimizes the chattering problem, but also includes some other properties: steadystate error and steady-state time. Sliding mode control has been widely used in the motion control of various robots and achieved good results 24,25 because of its advantages such as convenient modeling, strong adaptability to disturbances, reduced steady-state error, and improved system robustness. The optimal control is a control strategy to solve the optimal solution, and can meet the constraint conditions of the motion system when the performance index is optimal. Genetic algorithm is a meta-heuristic algorithm that searches for the optimal solution, and it can search for the optimal result by multiple iterations. The motion of the upper limb rehabilitation training robot is a kind of nonlinear problem with multiple constraints and uncertainties, and during the trajectory tracking process, frequent posture switching is required to ensure the tracking accuracy of the desired trajectory. Therefore, on the one hand, the sliding mode control law needs to be used in this paper to ensure the smoothness of the motion control process, and on the other hand, the genetic algorithm is introduced to adjust the parameters, so as to complete the trajectory tracking task more accurately. The main contributions of this work can be summarized as follows: (1) In order to establish a more realistic two-degree of freedom upper limb rehabilitation robot system dynamic model, considering the external disturbance of the upper limb rehabilitation robot system and the uncertainty of the modeling error, the upper limb rehabilitation robot system dynamic model should be represented in the form of a linear time-varying (LTV) system approach.
(2) To track the desired trajectory of the upper limb rehabilitation robot system, the aim of the paper is to propose a discrete sliding mode controller (LQRSMC) based on linear quadratic regulator. The controller is composed of optimal integral strategy and discrete sliding mode control law, which can reduce the effect of the composite uncertainty signals on the rehabilitation robot system. (3) To obtain the optimal trajectory tracking control strategy, an intelligent optimization algorithm aiming at choosing a more appropriate state weighting matrix Q is proposed. The problem is solved by applying the genetic algorithm, and a linear quadratic regulator is used to improve the state feedback performance of the control law to minimize the chattering problem.
The rest of the paper is structured as follows: The second part establishes the state space uncertainty model of the trajectory tracking of the upper limb rehabilitation robot system. The third part presents a hybrid optimal discrete integral sliding mode controller. The fourth part presents the simulation results of the time domain response of the upper limb rehabilitation robot system. The fifth part summarizes the full text.

The upper limb rehabilitation robot system model establishment
The uncertainty in nonlinear uncertain system mainly comes from the uncertainty of the internal parameters of the system and the uncertainty of external disturbance. In the studio 107 of the Science and Technology Museum of Shandong Jianzhu University, the construction and data measurement of the prototype virtual model of the upper limb rehabilitation robot was carried out. Its prototype virtual model is shown in Figure 1.
The prototype model is mainly composed of a connecting rod structure and a hand support structure. The connecting rod structure mainly includes: support, connecting rod, guide rail, handle platform, etc. The hand support structure mainly includes: support frame, forearm bracket, handle, etc. The bracket moves freely on the guide rail through the ball screw, and multiple brackets can move together. When the bracket of the link in the Z direction is fixed at a certain point, the bracket in the X and Y directions can move together, and the handle and the handle platform can realize any trajectory movement on the XY plane, which can meet the needs of two-DOF rehabilitation training in the patient plane.
The uncertainty of the parameters mainly includes the uncertainty of the connecting rod quality, length and the center of mass of the connecting rod, and the uncertainty of the external disturbance primarily involves modeling errors, parameter changes, and other uncertain factors. Due to the connecting rod quality m i , connecting rod length l i , and connecting rod centroid l ci vary within a certain range, the situation of the upper limb rehabilitation robot system during operation is more complicated.
Based on Euler's theorem, 26 the dynamic model of a two-degree-of freedom system is established as follows Where u is joint Angle, _ u and u € are angular velocity and angular acceleration severally, M u ð Þ 2 < 232 is the inertia matrix, H u ð Þ 2 < 232 is Coriolis force and centrifugal force matrix, G u ð Þ 2 < 232 is gravity vector, u 2 < 232 is input vector.
The dynamic model of upper limb rehabilitation robot is described in line with the actual parameter perturbation and external interference by Where DM is the inertia matrix error, DH is the centrifugal and Coriolis matrix error, Du is the torque input vector error, and D denotes the disturbances. Equation (2) can be expressed as follows The upper limb rehabilitation robot model can be transformed into The matrix M are consisted of the following The matrix H are composed of the following The gravity matrix G u ð Þ are comprised of the following Where the length of joint i is l i , the mass is m i , the inertia moment is I i , and the distance between the center of mass and joint i is l ci .

Nonlinear uncertain systems linearization
Aiming at the trajectory tracking problem of nonlinear uncertain systems, a predefined desired state trajectory u d is defined, and its controller can guarantee that the actual trajectory converges to the desired trajectory within a limit time. 27 Assumption 1. When there is u t ½ = u d t ½ , 8t . 0, the expected state signal u d can be obtained by the input signal u d through equation (3).
From system (3), we can write According to assumption 1 and equation (8), the expected signal u d can effectively track the expected output signal, and then the following equation can be gained Subtracting equation (9) from equation (8) yields Where unknown and bounded nonlinear real-valued function which is expressed as follows By introducing the new vector and using equation (10), we have Where x and u a = u d À u represent state vector and input control respectively, M c and H c represent state matrix and gain matrix respectively, as shown in (13) Assumption 2 (1) The exogenous signal r 2 is bounded, and r 2 = d.
(2) The designed r 1 is unknown, bounded, and non-linear.
(2) External disturbances are bounded and satisfied with Optimal sliding mode controller design Controller design under nominal system Theorem 1: For the nominal system (16), the quadratic performance index is shown in equation (17). If exists and P is the positive definite symmetric solution of the matrix algebra Riccati equation (18), then the design of the optimal controller (19) can ensure that the quadratic performance index J takes the minimum value. 28 Where Q 2 < n3n and R 2 < n3n are positive semidefinite matrix and positive definite matrix respectively.
Based on equations (16) and (19), it can be obtained From the stability of the closed-loop system, the optimal state trajectory of the nominal system is the solution of equation (20). But for the discretized state equation (14), due to the influence of external disturbances, using the controller described in equation (19), the motion of the system will deviate from the optimal trajectory, affecting the stability of the system. Therefore, the integral sliding mode control of the discrete-time system will be introduced to make the system have good robustness.

Design of sliding mode controller for uncertain systems
Design an optimal integral sliding surface and controller mainly for the discretized state equation (14), so as to ensure the optimal control law of the LTV system, so that the QSM is reached at the beginning and maintained afterward. 29 Optimal integral sliding mode surface design In this paper, the optimal controller obtained by equation (19), We proposed the following discrete-time integral sliding surface 30 Where s 2 <, C 2 < n3m , C is the constant matrix of sliding surface designed and guaranteed CB 6 ¼ 0. It can be seen from equation (21) that, 30 that is to say, the system state is on the switching surface at the initial moment.
According to equations (14) and (21), the sliding surface s k + 1 ð Þcan be given by The equivalent control is deducted from Substitute equation (23) into equation (14), the sliding mode equations of discrete uncertain systems under ideal conditions can be expressed as follows Conclusion 1: By comparing equations (20) and (24), we can see that they have the same expression form. That is to say, the trajectory of the ideal sliding mode of the uncertain system is exactly the same as the optimal trajectory of the nominal system.

Design of discrete sliding mode controller
When the upper limb rehabilitation robot system is simultaneously influenced by uncertainty and disturbance, the controller under the nominal system will lose effectiveness. Therefore, a hybrid control law is proposed, which is composed of an optimal control law (19) and a discontinuous control law to compensate the uncertainty and ensure the robustness of the upper limb rehabilitation robot.
Where u eq k ð Þ is the optimal control controller repressed by u eq k ð Þ = À K(k)x(k), u sw k ð Þ is the switching control, which follows the following principles: (1) A switching surface is designed to satisfy the requirements of the desired trajectory (2) A controller is designed to ensure that the system has sliding mode.

Control law stability analysis
According to the previous analysis, the state of the upper limb rehabilitation robot system is on the switching surface at the initial moment, and the discontinuous time control rate can keep the system state on the switching surface. System (14) is said to be in a QSM in the H -vicinity of the switching function (21) if the conditions (28) hold Where H is the sliding mode bandwidth.
Theorem 2. For the system (14), the hybrid controller (25) can guarantee the reaching conditions of the discrete-time system according to the sliding mode surface determined by equation (21). Moreover, the trajectory of the system enters the sliding mode band in finite time and eventually stay in the bandwidth.
Where u sw k ð Þ is the robust controller eliminating the influence of the external disturbance, e . 0, According to the assumption proposed in equation (28), the sliding surface and the reaching condition are respectively given in equations (21) and (26), and the new control law is repressed as Proof: We will certify that the sliding mode controller designed in this paper satisfying the sliding mode reach condition Based on equation (21), we have By incorporating equation (28) into equation (29), we have Ds k ð Þ = À z + j À Á À z + j sgn(s(k)) + CBr 1 k ð Þ Based on equation (28), the sliding surface is given by (1) When s k ð Þ . 0, we have In addition, when s k ð Þ \ 0, we have Consequently, equations (33) and (34) are equivalent to (2) When s k ð Þ . 2(z + j), we have Based on inequalities (35) and (36), the first condition of inequality (26) is proved. Similarly, if s k ð Þ \ À 2(z + j), we have Based on inequalities (35) and (37), the second condition of inequality (26) is satisfied. In addition, if 0 \ s(k) \ 2(z + j), based on equation (32) and inequality z + j À z + j À Á À z + jÞÞ \ 0, we obtain Conclusion 2: According to the above proofs, the control law (28) designed in the paper can satisfy the sliding mode arrival condition of the discrete system. Which can eliminate the chattering of system, and the system has a quasi-sliding mode (QSM). In summary, to resolve the trajectory tracking of problem of nonlinear uncertain systems, a special flow control chart based on linear quadratic discrete sliding mode controller is proposed, as shown in Figure 2.

Genetic algorithm based on multiobjective optimization of upper limb rehabilitation robot system
When implementing the optimal quadratic trajectory tracking control strategy for the upper limb rehabilitation robot system, the value of the state weighted matrix Q is the key to designing the linear quadratic controller. At present, the vast majority of the weighting matrices Q are selected through designer's experience. Based on a large number of experimental selections, the design cycle of LQRSMC is forced to be longer, the optimal control effect of the control law depends on the global optimal state weighting matrices Q, which are necessary to be selected suitable to guarantee the desired control effect. Hence, this article is to more effectively diminish the error in the trajectory tracking of the upper limb rehabilitation robot and increase the comfort of rehabilitation training. Meanwhile, it fully considers the difficulty of LQRSMC to achieve the optimal weighting matrix selection, and introduce the genetic algorithm (GA) into the control law, and propose a new multi-objective fitness goal. The designer can obtain multiple different state weighting matrices, and then chose the optimal target solution.

Multi-objective optimization
Multi-objective optimization is considered as the most common application problems in engineering, which involves the simultaneous minimization of multiple conflicting objectives. Meanwhile, multi-objective optimization can be transformed into Where x = x 1 , x 2 , . . . , x n ½ T is a vector, f is the objective function, and ' is the constraint condition.

Genetic algorithm
Genetic algorithm 31 (GA) is a meta-heuristic algorithm: that is searching for the optimal goal solution of method via simulating the process of natural evolution, and following the law of survival of fittest and survival of the fittest. In the genetic algorithm, the individuals of the initial population formed by coding are genetically operated on the base of their environmental fitness to complete process of evolution, and through several iterations to find the optimal result. GA includes three operators: the selection operators, the crossover operators, and the mutation operators, is performing genetic loop iteration optimization operations, finally ending under the termination condition of the iteration, and obtaining the optimal result. Compared with other optimization algorithms: the genetic algorithm 32,33 has lower complexity; it ensures that the excellent population individuals will not be discarded in the evolution, thus improving the accuracy of the optimization results; it overcomes the defect of artificially specifying shared parameters and makes it a part of the population. The reference standard ensures that individuals spread evenly across the entire domain, thus satisfying the diversity of the population.
Selection operator: Select superior individuals from the group and eliminate inferior individuals. Selection operation is based on individual fitness evaluation, and its purpose is to inherit excellent individuals to the next generation.
Where n is the size of population, P i is the proportion of the fitness of individual i in the total fitness of the entire group, f i is the fitness of the individual, and P n j = 1 f i is the total individual fitness of the entire group.
Crossover operator: What plays an important role in biological evolution in nature is the reorganization of biological genetic genes, and the genetic operation that also plays an important role in genetic algorithms is the crossover operator. Crossover refers to the process of replacing and reorganizing two male parent genes and generating new individuals.
Where q i is the individual, q i is the new individual, U c is the crossover rate, and r c is a number between 0 and 1. Mutation operator: Make changes to the gene values at certain loci of the individual strings in the population, and according to different coding methods, the individual codes can be divided into real-valued mutations and binary mutations. The mutation operator operates in two steps: Determine whether to mutate based on the preset compilation probability for all individuals in the group; Individuals undergoing mutation are randomly selected for mutation. At the same time, the genetic algorithm that introduces mutation has two main characteristics: It has local random search capability; it can maintain the diversity of the group and prevent immature convergence. For each individual, the mutation individual will be produced according to equation (43).
Where m r1 and m r2 represent an individual randomly selected in the current population, p represents the generation to which the individual belongs. Therefore, this article also gives the corresponding flow chart of genetic algorithm ( Figure 3) and related basic concepts.

Fitness value evaluation
The fitness value evaluation needs to calculate the fitness of the new individuals produced by the exchange, and fitness is an index used for measuring the pros and cons of individuals in the population, that is, the value of the criterion of feature combination. The GA generally does not need other external information in the process of search and evolution, and only needs the evaluation function to assess the pros and cons of the individual or the solution. In this article, for solving the LQRSMC integrated control problem on account of GA, the dynamic weighted aggregation method (DWAM) is used to transform the multiobjective problem 34-36 into a single-objective problem. Determine the change of the weighting matrix by gradually changing a specific frequency, while forcing various particles to move alone the Pareto front. It can be design as follows According to the DWAM, the new objective function is designed as follows Where E represents the mean squared error, log 10 (U) represents the total change of system control input, and the expression is as follows: This method can not only ensure the priority of control input and mean square error, but also attain the objective function and a set of optimal solutions.

Simulation and experience
Through MATLAB/Simulink simulation, it is verified that the linear quadratic optimal integral sliding mode controller (LQRSMC) based on genetic algorithm has a good tracking effect on the trajectory of the upper limb rehabilitation robot system. In the simulation, the parameter uncertain part is bounded by the norm, and its external uncertain time-varying disturbance, the values are respectively u d = 0:5 cos 0:1pt ð Þ; 0:5 sin (0:1pt) Where u d is the desired trajectory. The initial position of the two joints of the upper limb rehabilitation robot is set to u(0) = 0; 2:5; 0; 0 ½ , and the discrete period is T s = 0:05s. The relevant parameters of the simulation experiment of the upper limb rehabilitation robot trajectory tracking system are shown in Table 1.
For better analyzing the robust control performance of the LQRSMC discrete sliding mode controller proposed in this article, the trajectory tracking effect of the upper limb rehabilitation robot system based on ESMC and LQRSMC under the action of the optimal state-weighted matrix Q under the three non-dominant solutions was comprehensively evaluated. Set the genetic population M, the mating rate is P, and the evolutionary generation is N. Use MATLAB programing to write the optimization objective function of the genetic algorithm based on the state weighting matrix Q of LQRSMC (43), and perform the optimization operation on the programed optimization handle function through the GA algorithm toolbox, When the GA algorithm's optimization results converged, the output weighted coefficient matrix was found as follows: The state weighted matrix Q obtained from the optimization result satisfies the stability analysis.

Computational simulation analysis
The model of the upper limb rehabilitation robot is used as a simulation object, and the numerical simulation analysis is carried out to prove that the discrete sliding mode control law designed in this article can effectively track the joint state trajectory of the rehabilitation robot. Perform numerical simulation analysis of equivalent discrete sliding mode control (ESMC) and linear quadratic discrete sliding mode control (LQRSMC) on the trajectories of the two joint states of the upper limb rehabilitation robot; Three nondominated solutions are obtained based on genetic algorithm, and comparative simulation is completed by LQRSMC. Aiming at the traditional equivalent discrete sliding mode control (ESMC) and the proposed linear quadratic discrete sliding mode control law (LQRSMC), the state trajectory tracking control simulation of the upper limb rehabilitation robot system was completed. The state trajectory tracking response, controlled input control signal, sliding mode variable, and state trajectory error of the two joints can be obtained, which are shown in Figures 4 to 11, respectively. Figures 12 to 19 show that under the excitation of external time-varying disturbance, the response curves of control input torque, sliding mode variables and evolution error of each component of the position vector of the upper limb rehabilitation robot system          proposed discrete sliding mode control law, the trajectory tracking effect of the two joint states of the control rehabilitation robot is significantly better than the control effect of the equivalent discrete sliding mode control law. At the same time, the LQRSMC control is compared with the ESMC control of the system steady state. The response time is shorter and the effect of reducing the state trajectory error is better, indicating that the approaching rehabilitation robot system has stronger uncertain time-varying disturbance ability, and it is more helpful to improve the rehabilitation training effect of the patient's affected limb.
For comparing the effectiveness of the proposed control laws, the typical digital characteristics of the control        Tables 2  to 4. According to the data in the table, it can be concluded that the linear quadratic discrete sliding mode control law (LQRSMC) based on the genetic algorithm reduces the root mean square value of the two joint control input torques of the upper limb rehabilitation robot by 1.47% and 5.99%, respectively. The root mean square value of the sliding mode variable is reduced by 28.39% and 8.60%, and the root mean square value of the state tracking error is reduced by 37.42% and 7.79%, respectively. The root mean square of state tracking error decreases by 37.42% and 7.79%, respectively. Through different control strategies, the control input signals, sliding mode variables and state trajectory errors of the two joints of the upper limb rehabilitation robot are simulated numerically. The temporal response curves and typical numerical characteristics are compared and analyzed. The results show that the linear quadratic discrete sliding mode control law (LQRSMC) proposed in this article has better tracking control effect and better robustness for the joint state trajectory of the upper limb rehabilitation robot.

Numerical simulation of three solutions
The state weighted matrix Q obtained through genetic algorithm optimization is applied to the proposed control law. For finding the optimal solution, the steadystate characteristics of the control system of the upper limb rehabilitation robot must be weighed against the chattering phenomenon. 37 Finally, three non-dominant points are selected to represent the state of the rehabilitation robot system, and the value of the optimal weighting matrix Q is shown in Table 5.
Under the condition of time-varying interference and uncertain internal modeling parameters of the model, Figures 12 to 19 respectively show the timedomain response curves of state trajectory, control input signal, sliding mode variable and state trajectory error of the two joints of the upper limb rehabilitation robot under linear quadratic discrete sliding mode control (LQRSMC) based on genetic algorithm. Through comparative analysis, the control input torque value, sliding mode variable value and state trajectory error value of the first solution and the second solution are obviously greater than the values under the third solution. The results show that the third solution of LQRSMC control based on genetic algorithm can significantly enhance the state trajectory tracking of the rehabilitation robot. The third solution can achieve satisfactory performance of the rehabilitation robot system, stabilize the state of the system, and improve the tracking effect. In order to further illustrate that the designed control law control effect is more effective for the third solution, the typical digital characteristics of the state trajectory tracking of the upper limb rehabilitation robot system are compared and analyzed, as shown in Tables 6 to 8. It can be seen from the data in the table that the third solution is smaller than the root mean square value, maximum value and tracking error value of the state trajectory tracking of the first solution and the second solution. Although the three solutions based on genetic algorithm LQRSMC control method in this paper do not significantly reduce the trajectory tracking error and input control torque of the rehabilitation robot, considering the chattering phenomenon and steady-state performance of the system, the time domain response of the joint state trajectory   tracking of the upper limb rehabilitation robot is integrated. It shows that the third solution has better robustness and stability.

Conclusion
In view of the trajectory tracking problem of the upper limb rehabilitation robot system, a robust controller control method based on LQR method and discrete-time sliding mode control is proposed, which solves the problem of system parameter uncertainty and external disturbance uncertainty. The correctness and effectiveness of the linear time-varying model are proved by experiments, which establishes a solid model foundation for the trajectory tracking control method of nonlinear system. The chattering of the system is reduced by designing the optimal discrete integral sliding mode controller. The robust switching term is used to estimate and compensate the time-varying disturbance, which reduces the effect of composite uncertainty on the system. The discrete sliding mode approach condition is used to prove the robustness of the closed-loop system, which makes the control law suitable for practical application. Furthermore, the optimal configuration of LQR and the inconsecutive gain of a given problem taking into account a set of competitive objectives are determined based on genetic algorithm.
The improved method has successfully worked out the trajectory tracking problem of the upper limb rehabilitation robot under the condition of uncertain model parameters as well as evaluated the tracking response under the external time-varying disturbance.
The simulation results show that: compared with the traditional equivalent discrete sliding mode control, the optimal discrete integral sliding mode control (LQRSMC) made the rehabilitation robot system state trajectory error, control input signal and the peak value of the sliding mode variable smaller, and ensured that the system state displacement satisfied the displacement constraint limit. In addition, the proposed method can effectively suppress the vibration of the upper limb rehabilitation robot, significantly enhance the closed-loop performance and tracking accuracy of the system, and has good robustness and superiority to the parameter uncertainty, while ensuring the movement stability of the upper limb rehabilitation robot and the comfort of the patient's rehabilitation training.