# Robust adaptive PD-like control of lower limb rehabilitation robot based on human movement data

- Published
- Accepted
- Received

- Academic Editor
- Qichun Zhang

- Subject Areas
- Human-Computer Interaction, Robotics
- Keywords
- Human movement data, Rehabilitation robot, Trajectory tracking, S-curve function, Similarity function

- Copyright
- © 2021 Hu et al.
- Licence
- This is an open access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, reproduction and adaptation in any medium and for any purpose provided that it is properly attributed. For attribution, the original author(s), title, publication source (PeerJ Computer Science) and either DOI or URL of the article must be cited.

- Cite this article
- 2021. Robust adaptive PD-like control of lower limb rehabilitation robot based on human movement data. PeerJ Computer Science 7:e394 https://doi.org/10.7717/peerj-cs.394

## Abstract

The combination of biomedical engineering and robotics engineering brings hope of rehabilitation to patients with lower limb movement disorders caused by diseases of the central nervous system. For the comfort during passive training, anti-interference and the convergence speed of tracking the desired trajectory, this paper analyzes human body movement mechanism and proposes a robust adaptive PD-like control of the lower limb exoskeleton robot based on healthy human gait data. In the case of bounded error perturbation, MATLAB simulation verifies that the proposed method can ensure the global stability by introducing an S-curve function to make the design robust adaptive PD-like control. This control strategy allows the lower limb rehabilitation robot to track the human gait trajectory obtained through the motion capture system more quickly, and avoids excessive initial output torque. Finally, the angle similarity function is used to objectively evaluate the human body for wearing the robot comfortably.

## Introduction

Patients with lower limb movement disorders are usually caused by neurological diseases, such as stroke, hemiplegia, and others (Yang et al., 2017). The traditional effective rehabilitation methods are medical rehabilitation doctors and drug treatment. One problem of this approach is that due to the population aging, the increasing rate in the number of patients exceeds the capacity medical personnel for the assistive function training for all patients with motor dysfunction (Kim et al., 2020; Kim & Lee, 2019). The emergence of exoskeleton robots, including those virtual haptic system (Wang et al., 2020; Jiang et al., 2017), based on robotic systems and biomedical engineering principles has brought good news to patients, providing effective rehabilitation for patients without special care (Badesa et al., 2016; Chen et al., 2019). It is the mission of the lower limb rehabilitation robot (LLRR) to enable the patient's lower limbs to move or walk like a healthy person through the exoskeleton robot rehabilitation training. Therefore, the gait motion data of the human body can be used in the design and real-time training of the human-like controller of the LLRR after optimization processing. In the field of human sports rehabilitation technology, the measurement of the body movement process is one of the current challenges. Detailed movement information can be used for the verification of biomechanical models, and it is significant for human body dynamics analysis (Abd et al., 2020). The human body is a complex structure with multiple degrees of freedom of rotation joints. Generally, the motion and motion trajectory of the human body are recorded through motion capture technology. After analyzing the captured data, a lot of information about the human body at a certain moment can be accurately obtained, such as spatial position, velocity, acceleration, angle, angular velocity, angular acceleration, and so on (Liu et al., 2017).

The LLRR is a highly complex mechatronics system and its dynamic model is a multi-input, multi-output, strongly coupled nonlinear differential equation with many uncertainties (Yin et al., 2019; Becerra et al., 2018; Zhang et al., 2016). When patients undergo rehabilitation training, LLRR is required to have good positioning accuracy and fast trajectory tracking capabilities, so many dynamic control schemes based on dynamic models have been proposed (Yang et al., 2020; Zhang, Hu & Gow, 2020; Ariizumi et al., 2019). The dynamic control scheme based on the dynamic model includes modern control methods such as adaptive control (Ling, Wang & Liu, 2020; Lee et al., 2019; Cheng et al., 2011), and robust control (Yang et al., 2020; Saeed & Qin, 2019; Xue et al., 2019, Cheng et al., 2012). There are also intelligent control methods such as fuzzy control (Ling, Wang & Liu, 2020; Kong et al., 2019, 2018) and neural network control (Li et al., 2016). These control methods can solve some of the system's own nonlinearity, coupling, external interference and other uncertain problems, and improve the robustness and control accuracy of the system. However, the dynamic control scheme based on the dynamic model of the LLRR requires a large amount of real-time online calculation of dynamics, which brings difficulties to the dynamic real-time control of the LLRR. Because the LLRR system is a highly complex multi-variable, strongly coupled nonlinear system. Therefore, when designing an LLRR controller, variables are usually introduced to transform a nonlinear system into a linearized system, according to the dynamic characteristics of the LLRR system. This method simplifies the LLRR system and satisfies robust stability. For example, Boudjedir, Boukhetala & Bouri (2018) proposed a nonlinear proportional derivative control (NPD) to solve the trajectory tracking problem of robot. Although this method is simple and easy to implement, it has poor resistance to external interference and requires Larger driving torque, which is difficult to apply in robot systems. Cao, Zhang & Zhu (2017) raised a nonlinear compensation control algorithm in case of combining PID control with an active disturbance rejection control. The control strategy improves control accuracy and robustness of multi-degree-freedom industrial robot at high speeds. The geometric parameters of the LLRR system are known or can be accurately measured, but its inertial parameters are often inaccurate or completely unknown. A variable impedance strategy based on an uncertainty and disturbance estimator is proposed (Dong & Ren, 2019), which improves the adaptability and anti-interference of uncertain robot system perform tasks in an uncertain environment. The uncertainty and disturbance estimator is mainly used to deal with unknown environmental changes. To solve the problem of non-linear and uncertain system equipment with external interference, Celentano & Basin (2020) provided an approach to design robust smooth controller. A sufficiently smooth reference signal can be tracked well when an error norm smaller than a prescribed value. Therefore, Xue et al. (2019) proposed an adaptive PI controller based on the dynamic model with perturbations and uncertainties is presented for trajectory tracking control, and its stability analysis is given via the Lyapunov Theory. However, it is particularly important for the comfort and subjectivity of the patient's rehabilitation training, the convergence speed and accuracy of trajectory tracking when designing the controller for the LLRR. At present, most researches on trajectory tracking control are discussed sine waves as input or gait trajectory planning, which has a certain significance for the research of controllers, but it cannot satisfy patients with lower limb movement disorders to carry out effective rehabilitation training.

Therefore, this paper adopts an nonlinear complex exoskeleton robot as the research object, and designs a robust adaptive PD-like control (RAPLC) based on real data. The schematic diagram of the principle is shown in Fig. 1. First, NOKOV three-dimensional (3D) infrared motion capture equipment and three-dimensional force measurement platform equipment are used to collect human gait movement data and plantar force data. The collected data is analyzed for human kinematics and dynamic characteristics and the processed gait data is used as the reference expected motion trajectory of the LLRR control system. Second, the S-curve function is introduced on the basis of the traditional robust adaptive PD controller, which improves the convergence speed of the joint angular displacement and reduces the joint initial torque. Finally, the quadratic function of the error is used as the energy function of the system, and the stability of the control system of the LLRR based on the Lyapunov stability theory is guaranteed under the condition of the coupling and nonlinearity of each joint. The trajectory tracking simulations results show that the LLRR system joint angular displacement has good tracking performance. Comparing the LLRR system joint torque obtained from simulation with experimenter’s lower limbs can safely and comfortably complete the rehabilitation training.

### Analysis of the mechanism of human lower limb movement

#### Human lower limb movement data collection

The existing motion capture technology is mainly divided into four categories: mechanical motion capture system (Ivanov & AZhilenkova, 2019), acoustic motion capture system, electromagnetic motion capture system, and optical motion capture system (Ren et al., 2018; Pfister et al., 2014). Through the comparison of motion capture systems, this paper adopts the better NOKOV 3D infrared passive optical motion capture system. This system work principle is to capture the movement trajectory of the reflective Marker point attached to the human body in space by using passive infrared light principle. The 3D force measurement platform system mainly realizes the mechanical force measurement and analysis functions of the human body during the movement process. During the measurement, the force in the *x*, *y* and *z* axes are integrated into multiple channel data through 3D force sensors, and then collected by NI Card. Before collecting experimental data, site layout is essential. The cameras of the motion capture system are usually arranged according to the experimental requirements (Kurihara et al., 2002; Zeng et al., 2016). Because the experiment done in this paper is to collect human lower limb movement data, cameras are placed in a spac with 5 × 4 × 3 m. The cameras are placed in three equal intervals in each column on the left and right, and the 3D force measurement platforms are placed in the center, as shown in Fig. 2.

The NK_Cortex software can observe the movement state of the Marker points attached to the human body in real time. When the human body moves in the space of the motion capture system, as long as the Marker points at the joints can be captured by two or more cameras at the same time, the location information of the Marker points is recorded. Store the collected human movement data in real time and save it in required files format through the software. The quality of data collection plays an important role in the research. Therefore, after collecting the data, it is necessary to check whether the position, velocity, acceleration and other information of each Marker point are missing, and observe whether the curve is disconnected. If there is an obvious disconnection in the middle of the curve means that the data of the frame position is lost. If the lost data fluctuates greatly or the number of consecutive lost frames is large, data collection needs to be repeated, otherwise the data can be repaired.

#### Gait trajectory data processing

The collected human gait accuracy will affect the stability, coordination and driving torque of LLRR system. The ideal gait is the continuous and smooth motion trajectory of each joint, such as position, angle, angular velocity and angular acceleration. The 3D motion gait capture system mainly captures the spatial position coordinate information of the hip joint, knee joint and ankle joint. During the measurement process, NK_Cortex software can repair the curve disconnection problem, such as the missing coordinate data of some Marker points due to occlusion or other external factors. However, there are external factors such as marker jitter and environmental capture during human movement, spliced data needs to be filtered at this time. Filtering methods mainly include Least Squares filtering, Wavelet filtering, Kalman filtering, and others. In this paper, least square filtering and wavelet filtering are used to process the data of human left leg hip joint, knee joint and angle joint.

The kinematics of the robot is used to study the geometric relationship between the motion angle of each joint of the LLRR and its position in space. Similarly, the relationship between the spatial position coordinates of each joint of the human body's lower limb and the angle of each joint is found through the collected data, which plays a vital role in the control of the gait trajectory data and the joint angle of the LLRR in the later stage. Kinematics is divided into positive kinematics analysis method and inverse kinematics analysis method. Based on the needs of experimental research, the LLRR-like mode as shown in Fig. 3. this paper adopts the inverse kinematics analysis method, that is, using the position data of the end of the human lower limb hip joint $a\left({a}_{x},{a}_{y}\right)$, knee joint $b\left({b}_{x},{b}_{y}\right)$ and ankle joint $c\left({c}_{x},{c}_{y}\right)$, the hip joint angle ${q}_{d1}$ and knee joint angle ${q}_{d2}$ can be obtained through the tangent theorem,

(1) $${q}_{\mathrm{d}1}=\mathrm{arctan}{\displaystyle \frac{{b}_{\mathrm{x}}-{a}_{\mathrm{x}}}{{b}_{\mathrm{y}}-{a}_{\mathrm{y}}}}$$

(2) $$\alpha =\mathrm{arctan}{\displaystyle \frac{{c}_{\mathrm{x}}-{b}_{\mathrm{x}}}{{c}_{\mathrm{y}}-{b}_{\mathrm{y}}}}$$

(3) $${q}_{\mathrm{d}2}={q}_{\mathrm{d}1}-\alpha ={q}_{\mathrm{d}1}-\mathrm{arctan}{\displaystyle \frac{{c}_{\mathrm{x}}-{b}_{\mathrm{x}}}{{c}_{\mathrm{y}}-{b}_{\mathrm{y}}}}$$From the results obtained from the above two formulas and analyzing the normal gait of the human body during walking, it can be obtained ${q}_{\mathrm{d}1}\in \left[\begin{array}{cc}0& {\displaystyle \frac{\pi}{2}}\end{array}\right]$, ${q}_{\mathrm{d}2}\in \left[\begin{array}{cc}0& {\displaystyle \frac{\pi}{2}}\end{array}\right]$. Therefore, the inverse kinematics equations of the hip and knee joints of the human body can be obtained as, (4) $$\{\begin{array}{c}{q}_{\mathrm{d}1}=\mathrm{arctan}{\displaystyle \frac{{b}_{\mathrm{x}}-{a}_{\mathrm{x}}}{{b}_{\mathrm{y}}-{a}_{\mathrm{y}}}}\\ {q}_{\mathrm{d}2}={q}_{\mathrm{d}1}-\mathrm{arctan}{\displaystyle \frac{{c}_{\mathrm{x}}-{b}_{\mathrm{x}}}{{c}_{\mathrm{y}}-{b}_{\mathrm{y}}}}\end{array}$$Its movement trajectory is shown in Fig. 4.

#### Force data processing

Since the rhythm of the human body during walking is not fixed, under-sampling or over-sampling will occur when the movement is too fast or too slow in the process of force data acquisition (Xia et al., 2017; Zhou et al., 2020). Over-sampling will result in excessive information collection, which increases the burden of data analysis, and low utilization. Under-sampling will cause some essential information lost (Zhang & Cao, 2015). Therefore, this paper uses machine learning methods to process the collected 100 sets of force data. In order to deal with data over-sampling, the cubic spline interpolation method is used for processing, and the final processed data is 128 frames per second.

The 3D force measurement platform system collects the 3D force data of the end position of the experimenter’s lower limbs. This paper research is based on a two-dimensional plane, so the force in the *x* and *y* directions are selected, as shown in Fig. 4. And the force component of the position *c* can be calculated is shown in Fig. 5.

The force in the *x* direction is,
(5)
$${M}_{x}={f}_{x}({c}_{y}-{a}_{y})$$The force in the *y* direction is,
(6)
$${M}_{y}={f}_{y}\left({c}_{x}-{a}_{x}\right)$$where,
${f}_{x}$,
${f}_{y}$ respectively present the component on the *x*-axis and *y*-axis during real-time change of the collected experimentation three-dimensional plantar force.

The Jacobian matrix $J$ of LLRR system establishes a mapping from joint speed to operating, which can better analyze the speed of system. Similarly, ${J}^{T}$ represents the force Jacobian matrix, which means a mapping linear relationship between operating force and joint force of LLRR system in the static equilibrium state.

The torque of the hip and knee joint positions can be obtained by the following equations, and its changes are shown in Fig. 6,

(7) $$\left[\begin{array}{c}{\tau}_{1}\\ {\tau}_{2}\end{array}\right]={J}^{\mathrm{T}}\left[\begin{array}{c}{M}_{\mathrm{x}}\\ {M}_{\mathrm{y}}\end{array}\right]$$Where

(8) $${J}^{\mathrm{T}}=\left[\begin{array}{cc}{l}_{11}\mathrm{cos}{q}_{\mathrm{d}1}+{l}_{22}\mathrm{cos}\left({q}_{\mathrm{d}1}-{q}_{\mathrm{d}2}\right)& -{l}_{11}\mathrm{sin}{q}_{\mathrm{d}1}-{l}_{22}\mathrm{sin}\left({q}_{\mathrm{d}1}-{q}_{\mathrm{d}2}\right)\\ -{l}_{22}\mathrm{cos}\left({q}_{\mathrm{d}1}-{q}_{\mathrm{d}2}\right)& \mathrm{sin}\left({q}_{\mathrm{d}1}-{q}_{\mathrm{d}2}\right)\end{array}\right]$$Therefore, the experimentalist’s hip joint torque is, (9) $$\begin{array}{l}{\tau}_{h}=\left({l}_{11}\mathrm{cos}{q}_{d1}+{l}_{22}\mathrm{cos}\left({q}_{d1}-{q}_{d2}\right)\right){f}_{x}\left({c}_{y}-{a}_{y}\right)\\ \text{\hspace{1em}}+\left(-{l}_{11}\mathrm{sin}{q}_{d2}-{l}_{22}\mathrm{sin}\left({q}_{d1}-{q}_{d2}\right)\right){f}_{y}\left({c}_{x}-{a}_{x}\right)\end{array}$$the experimentalist’s knee joint torque is, (10) $${\tau}_{k}=-{l}_{22}\mathrm{cos}\left({q}_{d1}-{q}_{d2}\right){f}_{x}\left({c}_{y}-{a}_{y}\right)+\mathrm{sin}\left({q}_{d1}-{q}_{d2}\right){f}_{y}\left({c}_{x}-{a}_{x}\right)$$where, ${l}_{11}$ is the length of experimenter’s thigh and ${l}_{11}=0.4m$. ${l}_{22}$ is the length of experimenter’s calf and ${l}_{22}=0.38m$.

### Analysis of human movement mechanism

Human walking movement plays a vital role in daily life. The study of human gait parameters has a significant meaning for understanding human movement laws and limbs during walking coordination (Jackson et al., 2004). During walking, the time interval between two consecutive occurrences of the same action in a repetitive motion event is called the gait cycle. Generally speaking, the lower limbs of human body walking cycle is composed of support phase and swing phase (Barbareschi et al., 2015). As with most research results, human trajectory data demonstrate during a normal walking gait cycle, the support phase accounts for about 60% and the swing phase accounts for about 40%. And the proportion of support phase and swing phase in the gait cycle also changes with time.

Human biomechanics is committed to study bone strength, muscle strength, joint range, and various parts speed of the human body. The purpose of research on human biomechanics is to make human-computer interaction play a better role for patients, and avoid doing useless work. Ensure that people wearing LLRR can receive effective rehabilitation treatment and personal safety, and considering the safely and comfort of patients during rehabilitation training. The controller design must be based on the human biomechanics theories, such as the size of the human body's output, the trajectory of the limbs, the smoothness of the movement, and the movement direction of human body parts. In walking process, the clockwise moment required by human joints are found though analysis inverse dynamic. In collected dynamics data, the ground reaction force is the main force that acts on the body during experimenter movement. According to the research needs of this paper, the vertical ground reaction force and the shear force in one direction are studied.

The typical vertical ground reaction force profile of the collected single human walking steps, as shown in Fig. 5. When the heel is in contact with the ground, the vertical ground reaction force is zero and rises sharply within a few tenths of a second. At the moment experimenter’s foot is flat, her weight will dropp and move onto legs. In the middle of standing, the experimenter’s movement center of mass is actually upward. Finally, the experimenter’s feet lost contact with the ground and the force returns to zero when the toes left the ground. It can be seen than the experimenter’s foot force change is a typical M-shaped diagram. Numerous studies have shown that the M-shaped diagram or bimodal diagram are a typical display method of normal gait, which is used to display force fluctuations. The above analysis of the collected experimenter movement data is effective and feasible in this paper.

## Methods

The data collection associated procedures are approved by Zhongyuan University of Technology Committee. The written informed consent was obtained from the participant. And the participant give permission for members of the research team to have access to her human motion data to take part in the research project. In this paper, multiple sets of movement data collected come from a healthy female with a height of 165 cm and a weight of 56 kg. A total of 15 Marker points were attached to both sides of the lower limbs of the experimenter. During the experiment, in order to reduce the influence of external factors on the experiment, experimenter wore black leggings and black sports shoes, and put her hands on the chest and walked naturally parallel.

### Dynamic model of LLRR

In this paper, the unilateral leg of LLRR is simplified as a two-bar rigid structure model, as shown in Fig. 7. The Lagrange equation of the LLRR system can be defined as the following form,

(11) $${\tau}_{1}={\displaystyle \frac{d}{dt}{\displaystyle \frac{\mathrm{\partial}L}{\mathrm{\partial}{\dot{q}}_{1}}-{\displaystyle \frac{\mathrm{\partial}L}{\mathrm{\partial}{q}_{1}},i=1,2}}}$$where, $L$ is the Lagrange function of the LLRR system in the generalized coordinate system, which expressed by the difference between the total kinetic energy and the total potential energy of the LLRR system. ${q}_{i}$ represent the joint angle, ${\dot{q}}_{i}$ represent the joint angle velocity, ${\tau}_{i}\phantom{\rule{thickmathspace}{0ex}}$represent the joint torque.

Suppose the thigh length of the LLRR is ${l}_{1}$, its mass is ${m}_{1}$, the calf length is ${l}_{2}$, its mass is ${m}_{2}$, the center of mass of the thigh rod is ${c}_{1}$, the center of mass of the calf rod is ${c}_{2}$, the distance from the hip joint to its center of mass is ${d}_{1}$, and the distance from the knee joint to its center of mass is ${d}_{2}$. The angle of the hip joint and the angle of the knee joint of the LLRR are ${q}_{1}$, ${q}_{2}$, the joints angular velocity of the LLRR are $\phantom{\rule{thickmathspace}{0ex}}{\dot{q}}_{1}$, ${\dot{q}}_{2}$, and the joint angular acceleration are ${\ddot{q}}_{1}$, ${\ddot{q}}_{2}$, respectively.

The joint torque of the LLRR system can be expressed as, $${\tau}_{1}={\displaystyle \frac{d}{dt}{\displaystyle \frac{\mathrm{\partial}L}{\mathrm{\partial}{\dot{q}}_{1}}-{\displaystyle \frac{\mathrm{\partial}L}{\mathrm{\partial}{q}_{1}}}}}$$

$$=\left({m}_{1}{d}_{1}^{2}+{m}_{2}{l}_{1}^{2}+{m}_{2}{d}_{2}^{2}+2{m}_{2}{l}_{1}{d}_{2}\mathrm{cos}{q}_{2}\right){\ddot{q}}_{1}-\left({m}_{2}{l}_{1}{d}_{2}\mathrm{cos}{q}_{2}+{m}_{2}{d}_{2}^{2}\right){\ddot{q}}_{2}$$

$$-2{m}_{2}{l}_{1}{d}_{2}\mathrm{sin}{\dot{q}}_{2}{q}_{2}{\dot{q}}_{1}+{m}_{2}{l}_{1}{d}_{2}{\dot{q}}_{2}\mathrm{sin}{\dot{q}}_{2}{q}_{2}-{m}_{2}g{d}_{2}\mathrm{sin}\left({q}_{1}-{q}_{2}\right)$$

(12) $$-{m}_{1}g{d}_{1}sin{q}_{1}-{m}_{2}g{l}_{1}sin{q}_{1}$$

$${\tau}_{2}={\displaystyle \frac{d}{dt}{\displaystyle \frac{\mathrm{\partial}L}{\mathrm{\partial}{\dot{q}}_{2}}-{\displaystyle \frac{\mathrm{\partial}L}{\mathrm{\partial}{q}_{2}}}}}$$

(13) $$=-{m}_{2}{d}_{2}\left({l}_{1}\mathrm{cos}{q}_{2}+{d}_{2}\right){\ddot{q}}_{1}+{m}_{2}{l}_{1}{d}_{2}\mathrm{sin}{\dot{q}}_{2}{q}_{1}+{m}_{2}{d}_{2}^{2}{\ddot{q}}_{2}+{m}_{2}g{d}_{2}\mathrm{sin}\left({q}_{1}-{q}_{2}\right)$$In order to simplify the expression of its equation, make

(14) $$D\left(q\right)=\left[\begin{array}{cc}{D}_{11}& {D}_{12}\\ {D}_{21}& {D}_{22}\end{array}\right]=\left[\begin{array}{cc}{m}_{1}{d}_{1}^{2}+{m}_{2}{l}_{1}^{2}+{m}_{2}{d}_{2}^{2}+2{m}_{2}{l}_{1}{d}_{2}\mathrm{cos}{q}_{2}& -\left({m}_{2}{l}_{1}{d}_{2}\mathrm{cos}{q}_{2}+{m}_{2}{d}_{2}^{2}\right)\\ -{m}_{2}{d}_{2}\left({l}_{1}\mathrm{cos}{q}_{2}+{d}_{2}\right)& {m}_{2}{d}_{2}^{2}\end{array}\right]$$

(15) $$C\left(q\right)=\left[\begin{array}{cc}{C}_{11}& {C}_{12}\\ {C}_{21}& {C}_{22}\end{array}\right]=\left[\begin{array}{cc}-2{m}_{2}{l}_{1}{d}_{2}{\dot{q}}_{2}\mathrm{sin}{q}_{2}& {m}_{2}{l}_{1}{d}_{2}{\dot{q}}_{2}\mathrm{sin}{q}_{2}\\ {m}_{2}{l}_{1}{d}_{2}{\dot{q}}_{1}\mathrm{sin}{q}_{2}& 0\end{array}\right]$$

(16) $$G\left(q\right)=\left[\begin{array}{c}{G}_{1}\\ {G}_{2}\end{array}\right]=\left[\begin{array}{c}-{m}_{1}g{d}_{1}\mathrm{sin}{q}_{1}-{m}_{2}g{l}_{1}\mathrm{sin}{q}_{1}-{m}_{2}g{d}_{2}\mathrm{sin}({q}_{1}-{q}_{2})\\ {m}_{2}g{d}_{2}\mathrm{sin}({q}_{1}-{q}_{2})\end{array}\right]$$Equations (12) and (13) can be changed to the following equation, (17) $$D\left(q\right)\ddot{q}+C\left(q,\dot{q}\right)\dot{q}+G\left(q\right)=\tau $$where, $\tau ={\left[\begin{array}{cc}{\tau}_{1}& {\tau}_{2}\end{array}\right]}^{\mathrm{T}}$, ${\tau}_{1}\left(t\right)$ and ${\tau}_{2}\left(t\right)$ represent the hip joint torque and the knee joint torque of the controller. $D\left(q\right)\in {R}^{2\times 2}$ represents the inertia matrix, $C\left(q,\dot{q}\right)\in {R}^{2\times 2}$ represents the Coriolis force and the centripetal force matrix, $G\left(q\right)\in {R}^{2\times 1}$ represents gravity matrix.

The dynamic characteristics of the LLRR shown in formula Eq. (17) are,

1. $\dot{D}\left(\theta \right)-2C\left(\theta ,\dot{\theta}\right)$ is an oblique symmetric matrix.

2. The inertial matrix $D\left(q\right)$ is a $2\times 2$ symmetric positive definite matrix of. For any $2\times 1$ vector $\zeta $, there are positive numbers ${m}_{1}$ and ${m}_{2}$ satisfying the following inequalities, $${m}_{1}\Vert \zeta {\Vert}^{2}\le {\zeta}^{T}D\left(q\right)\zeta \le {m}_{2}\Vert \zeta {\Vert}^{2}$$

3. There is a parameter vector $P$ related to the lower limb exoskeleton robot, so that the inertia matrix $D\left(q\right)$, Coriolis force matrix $C\left(q\right)$, and gravity terms $G\left(q\right)$ satisfy the following linear relationships

(19) $$D\left(q\right)\vartheta +C\left(q,\dot{q}\right)\rho +G\left(q\right)=\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)P$$

In the formula, $\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)\in {R}^{2\times 5}$ is the regression matrix of the joint variables of the known LLRR. $P\in {R}^{5\times 1}$ is an unknown fixed-length parameter vector that expresses the characteristics of the robot's mass and inertia.

The RAPLC research on of the LLRR system in this paper, since its controller is designed based on an unknown model, it is necessary to perform online identification of the unknown model. The dynamic characteristics of the robot system are used to separate the known and unknown parameters of the robot model in the identification process. Make

(20) $${p}_{1}={m}_{1}{d}_{1}^{2}+{m}_{2}{l}_{1}^{2}+{m}_{1}{d}_{2}^{2}$$

(21) $${p}_{2}={m}_{1}{l}_{1}{d}_{2}$$

(22) $${p}_{3}={m}_{2}{d}_{2}^{2}$$

(23) $${p}_{4}=-\left({m}_{1}{d}_{1}+{m}_{2}{l}_{1}\right)g$$

(24) $${p}_{5}={m}_{2}{d}_{2}g$$The Eqs. (14)–(16) can be expressed as, (25) $$D\left(q\right)=\left[\begin{array}{cc}{D}_{11}& {D}_{12}\\ {D}_{21}& {D}_{22}\end{array}\right]=\left[\begin{array}{cc}{p}_{1}+2{p}_{2}\mathrm{cos}{q}_{2}& -\left({p}_{3}+{p}_{2}\mathrm{cos}{q}_{2}\right)\\ -({p}_{3}+{p}_{2}\mathrm{cos}{q}_{2})& {p}_{3}\end{array}\right]$$

(26) $$C\left(q,\dot{q}\right)=\left[\begin{array}{cc}{C}_{11}& {C}_{12}\\ {C}_{21}& {C}_{22}\end{array}\right]=\left[\begin{array}{cc}-2{p}_{2}{\dot{q}}_{2}\mathrm{sin}{q}_{2}& {p}_{2}{\dot{q}}_{2}\mathrm{sin}{q}_{2}\\ {p}_{2}{\dot{q}}_{1}\mathrm{sin}{q}_{2}& 0\end{array}\right]$$

(27) $$G\left(q\right)=\left[\begin{array}{c}{G}_{1}\\ {G}_{2}\end{array}\right]=\left[\begin{array}{c}{p}_{4}\mathrm{sin}{q}_{1}-{p}_{5}\mathrm{sin}\left({q}_{1}-{q}_{2}\right)\\ {p}_{5}\mathrm{sin}\left({q}_{1}-{q}_{2}\right)\end{array}\right]$$Substituting Eqs. (25)–(27) into Eq. (19) can be obtained, (28) $$\left[\begin{array}{cc}{D}_{11}& {D}_{12}\\ {D}_{21}& {D}_{22}\end{array}\right]\left[\begin{array}{c}{\vartheta}_{1}\\ {\vartheta}_{2}\end{array}\right]+\left[\begin{array}{cc}{C}_{11}& {C}_{12}\\ {C}_{21}& {C}_{22}\end{array}\right]\left[\begin{array}{c}{\rho}_{1}\\ {\rho}_{2}\end{array}\right]+\left[\begin{array}{c}{G}_{1}\\ {G}_{2}\end{array}\right]=\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)P$$Then the dynamic equation of the LLRR thigh shaft can be expressed as, $$\left[\begin{array}{cc}{D}_{11}& {D}_{12}\end{array}\right]\left[\begin{array}{c}{\vartheta}_{1}\\ {\vartheta}_{2}\end{array}\right]+\left[\begin{array}{cc}{C}_{11}& {C}_{12}\end{array}\right]\left[\begin{array}{c}{\rho}_{1}\\ {\rho}_{2}\end{array}\right]+{G}_{1}$$

$$=\left({p}_{1}+2{p}_{2}\mathrm{cos}{q}_{2}\right){\vartheta}_{1}-\left({p}_{3}+{p}_{2}\mathrm{cos}{q}_{2}\right){\vartheta}_{2}-2{p}_{2}{\dot{q}}_{2}\mathrm{sin}{q}_{2}{\rho}_{1}+{p}_{2}{\dot{q}}_{2}\mathrm{sin}{q}_{2}{\rho}_{2}$$

$$+{p}_{4}\mathrm{sin}{q}_{1}-{p}_{5}\mathrm{sin}({q}_{1}-{q}_{2})$$

$$={\vartheta}_{1}{p}_{1}+\left(2{\vartheta}_{1}\mathrm{cos}{q}_{2}-{\vartheta}_{2}\mathrm{cos}{q}_{2}{\vartheta}_{2}\mathrm{cos}{q}_{2}-2{\dot{q}}_{2}\mathrm{sin}{q}_{2}{\rho}_{1}+{\dot{q}}_{2}\mathrm{sin}{q}_{2}{\rho}_{2}\right){p}_{2}-{\vartheta}_{2}{p}_{3}$$

$$+\mathrm{sin}{q}_{1}{p}_{4}-\mathrm{sin}\left({q}_{1}-{q}_{2}\right){p}_{5}$$

(29) $$=\left[\begin{array}{ccccc}{\mathrm{\Phi}}_{11}& {\mathrm{\Phi}}_{12}& {\mathrm{\Phi}}_{13}& {\mathrm{\Phi}}_{14}& {\mathrm{\Phi}}_{15}\end{array}\right]\left[\begin{array}{c}{p}_{1}\\ {p}_{2}\\ {p}_{3}\\ {p}_{4}\\ {p}_{5}\end{array}\right]$$where, $$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{11}={\vartheta}_{1}$$

$$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{12}=2{\vartheta}_{1}\mathrm{cos}{q}_{2}-{\vartheta}_{2}\mathrm{cos}{q}_{2}{\vartheta}_{2}\mathrm{cos}{q}_{2}-2{\dot{q}}_{2}\mathrm{sin}{q}_{2}{\rho}_{1}+{\dot{q}}_{2}\mathrm{sin}{q}_{2}{\rho}_{2}$$

(30) $$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{13}=-{\vartheta}_{2}$$

$$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{14}=\mathrm{sin}{q}_{1}$$

$$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{15}=-\mathrm{sin}\left({q}_{1}-{q}_{2}\right)$$Similarly, the dynamic equation of the LLRR calf rod is, $$\left[\begin{array}{cc}{D}_{21}& {D}_{22}\end{array}\right]\left[\begin{array}{c}{\vartheta}_{1}\\ {\vartheta}_{2}\end{array}\right]+\left[\begin{array}{cc}{C}_{21}& {C}_{22}\end{array}\right]\left[\begin{array}{c}{\rho}_{1}\\ {\rho}_{2}\end{array}\right]+{G}_{2}$$

$$=-\left({p}_{3}+{p}_{2}\mathrm{cos}{q}_{2}){\vartheta}_{1}+{p}_{3}{\vartheta}_{2}+{p}_{2}{\dot{q}}_{1}\mathrm{sin}{q}_{2}{\rho}_{1}+{p}_{5}\mathrm{sin}({q}_{1}-{q}_{2}\right)$$

$$=\left({\dot{q}}_{1}\mathrm{sin}{q}_{2}{\rho}_{1}-{\vartheta}_{1}\mathrm{cos}{q}_{2}){p}_{2}+\left({\vartheta}_{2}-{\vartheta}_{1}\right){p}_{3}+\mathrm{sin}({q}_{1}-{q}_{2}\right){p}_{5}$$

(31) $$=\left[\begin{array}{ccccc}{\mathrm{\Phi}}_{21}& {\mathrm{\Phi}}_{22}& {\mathrm{\Phi}}_{23}& {\mathrm{\Phi}}_{24}& {\mathrm{\Phi}}_{25}\end{array}\right]\left[\begin{array}{c}{p}_{1}\\ {p}_{2}\\ {p}_{3}\\ {p}_{4}\\ {p}_{5}\end{array}\right]$$where, $${\mathrm{\Phi}}_{21}=0$$

$$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{22}={\dot{q}}_{1}\mathrm{sin}{q}_{2}{\rho}_{1}-{\vartheta}_{1}\mathrm{cos}{q}_{2}$$

(32) $$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{23}={\vartheta}_{2}-{\vartheta}_{1}$$

$$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{24}=0$$

$$\phantom{\rule{thickmathspace}{0ex}}{\mathrm{\Phi}}_{25}=\mathrm{sin}({q}_{1}-{q}_{2})$$Derived from the above formula, the parameters in $\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)$ are only related to the joint angle and angular acceleration of the LLRR. These data are all known, that is, $\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)$ is the known parameter of the LLRR system model. $\vartheta $ represents the equation related to acceleration of the end position of the LLRR system. The parameters in $P$ are related to the joint quality, joint length, center of gravity and other data of the LLRR system. However, these parameters in the robot system are often inaccurate or completely unknown, especially the LLRR system. The joint quality is constantly changing real-time when the patient wear it for rehabilitation, so the parameters in $P$ are the unknown parameters.

Assumption 1: ${q}_{d}\in {R}^{n}$ is the desired position of joint, ${q}_{d}$ has first derivative and second derivative.

Assumption 2: The norms of error and disturbance satisfy

$$\Vert \omega \Vert \le {z}_{1}+{z}_{2}\Vert e\Vert +{z}_{3}\Vert \dot{e}\Vert $$where, ${z}_{1}$, ${z}_{2}$, ${z}_{3}$ are normal numbers, respectively. $e=q-{q}_{d}$ and $\dot{e}=\dot{q}-{\dot{q}}_{d}$ are tracking error and tracking error derivative, respectively.

### Controller design

In the rehabilitation process, the comfort of human body wearing LLRR plays a significant role, so this paper proposes a comfort function, (33) $${\tau}_{h}=m\dot{e}+ne=m\left({\dot{q}}_{d}-\dot{q}\right)+n\left({q}_{d}-q\right)$$where, $m$ and $n$ are positive number. $q$ and $\dot{q}$ are the angular displacement and angular velocity of the controller, respectively. ${q}_{d}$ and ${\dot{q}}_{d\phantom{\rule{thickmathspace}{0ex}}}$are the angular displacement and angular velocity of the experimenter, respectively.

The unilateral leg dynamics model of the two-link LLRR can be described by Eq. (17), namely, (34) $$D\left(q\right)\ddot{q}+C\left(q,\dot{q}\right)\dot{q}+G\left(q\right)=\tau $$Introduce variables $y$ and ${q}_{r}$, and make, (35) $$y=\dot{e}+\gamma e$$

(36) $${q}_{r}={\dot{q}}_{d}-\gamma e$$In the formula $\gamma >0$, and

(37) $$y=\dot{q}-{\dot{q}}_{r}$$In formula Eq. (19) make $\vartheta ={\ddot{q}}_{r}$, $\rho ={\dot{q}}_{r}$, (38) $$D\left(q\right){\ddot{q}}_{r}+C\left(q,\dot{q}\right){\dot{q}}_{r}+G\left(q\right)=\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)P$$where, (39) $${\ddot{q}}_{r}=\ddot{q}-\dot{y}=\left[\begin{array}{c}{\ddot{q}}_{1}-\dot{y}\\ {\ddot{q}}_{2}-\dot{y}\end{array}\right]=\left[\begin{array}{c}{\ddot{q}}_{r}\left(1\right)\\ {\ddot{q}}_{r}\left(2\right)\end{array}\right]$$

(40) $${\dot{q}}_{r}=q-y=\left[\begin{array}{c}{\dot{q}}_{1}-y\\ {\dot{q}}_{2}-y\end{array}\right]=\left[\begin{array}{c}{\dot{q}}_{r}\left(1\right)\\ {\dot{q}}_{r}\left(2\right)\end{array}\right]$$Substitute formula Eq. (35) into formula Eq. (38), (41) $$D\left(q\right)(\ddot{q}-\dot{y})+C\left(q,\dot{q}\right)\left(\dot{q}-y\right)+G\left(q\right)=\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)P$$Combining formula Eq. (41) and formula Eq. (17) can be obtained, (42) $$D\left(q\right)\dot{y}+C\left(q,\dot{q}\right)y=\tau -\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)P-\omega $$For a complex LLRR system, due to the influence of external factors, some errors and deviations will inevitably occur. In order to ensure the LLRR system stability when the upper bound of the disturbance signal is known, the following RAPLC is designed, (43) $$\tau =\mathrm{\Phi}\left(q,\dot{q},{\dot{q}}_{r},{\ddot{q}}_{r}\right)\hat{P}-{S}_{p}{K}_{p}e-{S}_{v}{K}_{v}\dot{e}+u$$

(44) $$D\left(q\right)\dot{y}+C\left(q,\dot{q}\right)y=\tau -\mathrm{\Phi}\left(q,\dot{q},\rho ,\vartheta \right)P-\omega $$In the formula Eq. (43), $${K}_{p}={K}_{p1}+{K}_{p2}{B}_{p}\left(e\right),{K}_{v}={K}_{v1}+{K}_{v2}{B}_{v}\left(\dot{e}\right)\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}$$

$${K}_{\mathrm{p}1}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left({k}_{\mathrm{p}11},{k}_{\mathrm{p}12}\right),{K}_{\mathrm{p}2}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left({k}_{\mathrm{p}21},{k}_{\mathrm{p}22}\right)\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}$$

$${K}_{\mathrm{v}1}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left({k}_{\mathrm{v}11},{k}_{\mathrm{v}12}\right),{K}_{\mathrm{v}2}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left({k}_{\mathrm{v}21},{k}_{\mathrm{v}22}\right)$$

$${B}_{\mathrm{p}}\left(e\right)=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left({\displaystyle \frac{1}{{\alpha}_{1}+\left|{e}_{1}\right|},{\displaystyle \frac{1}{{\alpha}_{2}+\left|{e}_{2}\right|}}}\right),{B}_{\mathrm{v}}\left(e\right)=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left({\displaystyle \frac{1}{{\beta}_{1}+\left|{\dot{e}}_{1}\right|},{\displaystyle \frac{1}{{\beta}_{2}+\left|{\dot{e}}_{2}\right|}}}\right)$$where, ${\gamma}_{1},{\gamma}_{2}$ are arbitrarily normal, ${k}_{\mathrm{p}1\mathrm{i}},{k}_{\mathrm{p}2\mathrm{i}},{k}_{\mathrm{v}1\mathrm{i}},{k}_{\mathrm{v}2\mathrm{i}},{\alpha}_{\mathrm{i}},{\beta}_{\mathrm{i}}$ are positive numbers in $i\in \left[1,2\right]$, and satisfy ${k}_{\mathrm{p}1\mathrm{i}}-{\displaystyle \frac{{k}_{\mathrm{v}2\mathrm{i}}}{2{\beta}_{\mathrm{i}}}>0}$, ${k}_{\mathrm{v}1\mathrm{i}}-{\displaystyle \frac{{k}_{\mathrm{p}2\mathrm{i}}}{2{\alpha}_{\mathrm{i}}}>0}$. ${S}_{\mathrm{p}}$ and ${S}_{\mathrm{v}}$ are S-shaped function matrix, and,

${S}_{\mathrm{p}}=\left[\begin{array}{cc}{\displaystyle \frac{{c}_{1}}{1+{e}^{-{\mathrm{a}}_{1}\mathrm{t}}}}& 0\\ 0& {\displaystyle \frac{{c}_{2}}{1+{e}^{-{\mathrm{a}}_{2}\mathrm{t}}}}\end{array}\right]$, ${S}_{\mathrm{v}}=\left[\begin{array}{cc}{\displaystyle \frac{1}{1+{e}^{-{\mathrm{b}}_{1}\mathrm{t}}}}& 0\\ 0& {\displaystyle \frac{1}{1+{e}^{-{\mathrm{b}}_{2}\mathrm{t}}}}\end{array}\right]$

where, ${a}_{1},{a}_{2},{b}_{1},{b}_{2}$ are the decay factor of the exponential function, ${c}_{1}$and ${c}_{2}$ are the coefficients of the exponential function.

The parameter estimation law of $\hat{P}$, (45) $$\stackrel{.}{\stackrel{\u2322}{P}}=-{\text{\Gamma \Phi}}^{T}\left(q,\dot{q},{\dot{q}}_{r},{\ddot{q}}_{r}\right)y$$where, $\mathrm{\Gamma}$ is a symmetric positive definite matrix. For the LLRR system shown in Eq. (17), and when the disturbance error signal is bounded, the designed control method can ensure the global gradual stability of the system.

### Stability analysis

Make $\stackrel{~}{P}=\dot{P}-P$, and take the Lyapunov function of LLRR as, (46) $$V={\displaystyle \frac{1}{2}\left({y}^{\mathrm{T}}D\left(q\right)y+{e}^{\mathrm{T}}\left({S}_{\mathrm{p}}{K}_{\mathrm{p}1}+\gamma {S}_{\mathrm{v}}{K}_{\mathrm{v}1}\right)e+{\stackrel{~}{P}}^{\mathrm{T}}{\mathrm{\Gamma}}^{-1}\stackrel{~}{P}\right)}$$

According to the dynamic characteristics of the LLRR, $D\left(q\right)$ is a symmetric positive definite matrix, ${S}_{\mathrm{p}}$ and ${S}_{\mathrm{v}}$ are also symmetric positive definite matrix. So, (47) $${\left({y}^{\mathrm{T}}D\left(q\right)y\right)}^{{}^{\prime}}=2{y}^{\mathrm{T}}D\left(q\right)\dot{y}+{y}^{\mathrm{T}}\dot{D}\left(q\right)y$$

(48) $${\left({e}^{\mathrm{T}}\left({S}_{\mathrm{p}}{K}_{\mathrm{p}1}+\gamma {S}_{\mathrm{v}}{K}_{\mathrm{v}1}\right)e\right)}^{{}^{\prime}}=2{e}^{\mathrm{T}}\left({S}_{\mathrm{p}}{K}_{\mathrm{p}1}+\gamma {S}_{\mathrm{v}}{K}_{\mathrm{v}1}\right)\dot{e}$$

(49) $${\left({\stackrel{~}{P}}^{T}{\mathrm{\Gamma}}^{-1}\stackrel{~}{P}\right)}^{{}^{\prime}}=2{\stackrel{~}{P}}^{T}{\mathrm{\Gamma}}^{-1}\dot{\stackrel{~}{P}}$$Take the derivative of Eq. (46) to get, $$\dot{V}={y}^{\mathrm{T}}D\left(q\right)\dot{y}+{\displaystyle \frac{1}{2}{y}^{\mathrm{T}}\stackrel{\dot{y}}{D\left(q\right)}{e}^{\mathrm{T}}+{e}^{\mathrm{T}}\left({S}_{\mathrm{p}}{K}_{\mathrm{p}1}+\gamma {S}_{\mathrm{v}}{K}_{\mathrm{v}1}\right)\dot{e}+{\stackrel{~}{P}}^{\mathrm{T}}{\mathrm{\Gamma}}^{-1}\dot{\stackrel{~}{P}}}$$

$$=-{\dot{e}}^{T}{S}_{v}{K}_{v}\dot{e}-\gamma {e}^{T}{S}_{p}{K}_{p}e-{e}^{T}\left({S}_{p}{K}_{p2}{B}_{p}\left(e\right)+\gamma {S}_{v}{K}_{v2}{B}_{p}\left(\dot{e}\right)\right)\dot{e}$$

(50) $$+{\stackrel{~}{P}}^{T}{\mathrm{\Gamma}}^{-1}\stackrel{\dot{+}}{\stackrel{~}{P}}{y}^{T}\mathrm{\Phi}\left(q,\dot{q},{\dot{q}}_{r},{\ddot{q}}_{r}\right)\stackrel{~}{P}+{y}^{\mathrm{T}}\left(u-\omega \right)$$Combine ${y}^{T}\mathrm{\Phi}\left(q,\dot{q},{\dot{q}}_{r},{\ddot{q}}_{r}\right)\stackrel{~}{P}={\stackrel{~}{P}}^{T}{\mathrm{\Phi}}^{T}\left(q,\dot{q},{\dot{q}}_{r},{\ddot{q}}_{r}\right)y$, $\dot{\stackrel{~}{P}}=\dot{\hat{P}}$ and Eq. (45), (51) $${y}^{T}\mathrm{\Phi}\left(q,\dot{q},{\dot{q}}_{r},{\ddot{q}}_{r}\right)\stackrel{~}{P}+{\stackrel{~}{P}}^{T}{\mathrm{\Gamma}}^{-1}\dot{\stackrel{~}{P}}=0$$Then, $$\dot{V}=-{\dot{e}}^{\mathrm{T}}{S}_{\mathrm{v}}{K}_{\mathrm{v}}\dot{e}-\gamma {e}^{\mathrm{T}}{S}_{\mathrm{p}}{K}_{\mathrm{p}}e-{e}^{\mathrm{T}}\left({S}_{\mathrm{p}}{K}_{\mathrm{p}2}{B}_{\mathrm{p}}\left(e\right)+\gamma {S}_{\mathrm{v}}{K}_{\mathrm{v}2}{B}_{\mathrm{p}}\left(\dot{e}\right)\right)\dot{e}+{y}^{\mathrm{T}}\left(u-\omega \right)$$

$$=-\sum _{i=1}^{2}\left(\gamma \left({S}_{p}{k}_{p1i}+{\displaystyle \frac{{S}_{p}{k}_{p2i}}{{\alpha}_{i}+|{e}_{i}|}}\right){{e}_{i}}^{2}\right)-\sum _{i=1}^{2}\left(\left({S}_{v}{k}_{v1i}+{\displaystyle \frac{{S}_{v}{k}_{v2i}}{{\beta}_{i}+\left|\dot{{e}_{i}}\right|}}\right){\dot{{e}_{i}}}^{2}\right)$$

(52) $$-\sum _{i=1}^{2}\left(\left({\displaystyle \frac{{S}_{p}{k}_{p2i}}{{\alpha}_{i}+|{e}_{i}|}+{\displaystyle \frac{\gamma {S}_{v}{k}_{v2i}}{{\beta}_{i}+\left|\dot{{e}_{i}}\right|}}}\right){e}_{i}\dot{{e}_{i}}\right)+{y}^{\mathrm{T}}\left(u-\omega \right)$$

The following formula can be obtained due to ${e}_{i}{\dot{e}}_{i}\le {\displaystyle \frac{1}{2}\left({{e}_{i}}^{2}+{{\dot{e}}_{i}}^{2}\right)}$, $$\dot{V}\le -\sum _{i=1}^{2}\left(\gamma \left({S}_{p}{k}_{p1i}+{\displaystyle \frac{{S}_{p}{k}_{p2i}}{{\alpha}_{i}+|{e}_{i}|}}\right)-{\displaystyle \frac{1}{2}\left({\displaystyle \frac{{S}_{p}{k}_{p2i}}{{\alpha}_{i}+|{e}_{i}|}+{\displaystyle \frac{\gamma {S}_{v}{k}_{v2i}}{{\beta}_{i}+\left|{\dot{e}}_{i}\right|}}}\right)}\right){{e}_{i}}^{2}$$

(53) $$-\sum _{i=1}^{2}\left(\left({S}_{v}{k}_{v1i}+{\displaystyle \frac{{S}_{v}{k}_{v2i}}{{\beta}_{i}+\left|\dot{{e}_{i}}\right|}}\right)-{\displaystyle \frac{1}{2}\left({\displaystyle \frac{{S}_{p}{k}_{p2i}}{{\alpha}_{i}+|{e}_{i}|}+{\displaystyle \frac{\gamma {S}_{v}{k}_{v2i}}{{\beta}_{i}+\left|\dot{{e}_{i}}\right|}}}\right){\dot{{e}_{i}}}^{2}}\right)+{y}^{T}\left(u-\omega \right)$$When $\frac{1}{2}\le \gamma \le 2$, $$\gamma {\displaystyle \frac{{S}_{\mathrm{p}}{k}_{\mathrm{p}2\mathrm{i}}}{{\alpha}_{\mathrm{i}}+\left|{e}_{\mathrm{i}}\right|}-{\displaystyle \frac{1}{2}{\displaystyle \frac{{S}_{\mathrm{p}}{k}_{\mathrm{p}2\mathrm{i}}}{{\alpha}_{\mathrm{i}}+\left|{e}_{\mathrm{i}}\right|}\ge 0}}}$$

(54) $$\frac{{S}_{\mathrm{v}}{k}_{\mathrm{v}2\mathrm{i}}}{{\beta}_{\mathrm{i}}+\left|{\dot{e}}_{\mathrm{i}}\right|}-{\displaystyle \frac{1}{2}{\displaystyle \frac{\gamma {S}_{\mathrm{v}}{k}_{\mathrm{v}2\mathrm{i}}}{{\beta}_{\mathrm{i}}+\left|{\dot{e}}_{\mathrm{i}}\right|}\ge 0}}$$Formula Eq. (55) can be expressed, $$\dot{V}\le -\sum _{i=1}^{2}\left(\gamma \left({S}_{p}{k}_{p1i}-{\displaystyle \frac{1}{2}{\displaystyle \frac{{S}_{v}{k}_{v2i}}{{\beta}_{i}+\left|{\dot{e}}_{i}\right|}}}\right){{e}_{i}}^{2}+\left({S}_{v}{k}_{v1i}-{\displaystyle \frac{1}{2}{\displaystyle \frac{{S}_{p}{k}_{p2i}}{{\alpha}_{i}+|{e}_{i}|}}}\right)\right)+{y}^{T}\left(u-\omega \right)$$

$$\le -\sum _{\mathrm{i}=1}^{2}\left(\gamma \left({S}_{\mathrm{p}}{k}_{\mathrm{p}1\mathrm{i}}-{\displaystyle \frac{1}{2}{\displaystyle \frac{{S}_{\mathrm{v}}{k}_{\mathrm{v}2\mathrm{i}}}{{\beta}_{i}}}}\right){{e}_{\mathrm{i}}}^{2}+\left({S}_{\mathrm{v}}{k}_{\mathrm{v}1\mathrm{i}}-{\displaystyle \frac{1}{2}{\displaystyle \frac{{S}_{\mathrm{p}}{k}_{\mathrm{p}2\mathrm{i}}}{{\alpha}_{\mathrm{i}}}}}\right)\right)+{y}^{\mathrm{T}}\left(u-\omega \right)$$

(55) $$\le {y}^{\mathrm{T}}\left(u-\omega \right)$$Since, $${y}^{\mathrm{T}}u=\sum _{\mathrm{i}=1}^{2}{y}_{\mathrm{i}}\left[-\left({z}_{1}+{z}_{2}e+{z}_{3}\dot{e}\right)\mathrm{s}\mathrm{g}\mathrm{n}\left({y}_{\mathrm{i}}\right)\right]$$

$$\le \sum _{\mathrm{i}=1}^{2}-\left(||\omega ||.||{y}_{\mathrm{i}}||\right)\mathrm{s}\mathrm{g}\mathrm{n}\left({y}_{\mathrm{i}}\right)-{y}^{\mathrm{T}}\omega $$

(56) $$\phantom{\rule{thickmathspace}{0ex}}\le ||{y}^{\mathrm{T}}||.||\omega ||$$Then, (57) $${y}^{\mathrm{T}}\left(u-\omega \right)\le \sum _{\mathrm{i}=1}^{2}\left(-||\omega ||\cdot ||{y}_{\mathrm{i}}||\right)+||{y}^{\mathrm{T}}||\cdot ||\omega ||=0$$Namely, (58) $$\dot{V}\le 0$$It can be seen from the above proof results, $\underset{t\to \mathrm{\infty}}{lim}e=0$, $\underset{t\to \mathrm{\infty}}{lim}\dot{e}=0$, the LLRR control system is globally asymptotically stable. Therefore, the LLRR system can realize the desired trajectory tracking no matter where it starts from the initial position.

### Comfort evaluation function

When the human body wears the LLRR, too much fluctuation of the angle of the system will cause discomfort to the wearer. The comfort of patients is usually known through subjective feelings, but most patients with lower limb movement disorders are not sensitive. Most studies usually evaluate changes in angle, joint torque, changes in patient muscle strength, etc. This paper uses the similarity formula Eq. (59) between the trajectory of the lower limb exoskeleton robot and the trajectory of the human body to objectively evaluate the comfort of the human body wearing LLRR.

(59)
$$C={\displaystyle \frac{1}{1+{({\displaystyle \frac{{q}_{1}-{q}_{\mathrm{d}1}}{{q}_{1\mathrm{m}\mathrm{a}\mathrm{x}}-{q}_{\mathrm{d}1\mathrm{m}\mathrm{i}\mathrm{n}}})}}^{2}+{({\displaystyle \frac{{q}_{2}-{q}_{\mathrm{d}2}}{{q}_{2\mathrm{m}\mathrm{a}\mathrm{x}}-{q}_{\mathrm{d}2\mathrm{m}\mathrm{i}\mathrm{n}}})}}^{2}}}$$where,
${q}_{1}\phantom{\rule{thickmathspace}{0ex}}$and
${q}_{\mathrm{d}1}$ are LLRR hip joint and experimenter hip joint.
${q}_{2}$ and
${q}_{\mathrm{d}2}$ are LLRR knee joint and experimenter knee joint.
${q}_{1\mathrm{m}\mathrm{a}\mathrm{x}}\phantom{\rule{thickmathspace}{0ex}}$ and
${q}_{2\mathrm{m}\mathrm{a}\mathrm{x}}$ are the maximum values of LLRR hip and knee joints.
${q}_{\mathrm{d}1\mathrm{m}\mathrm{i}\mathrm{n}}$ and
${q}_{\mathrm{d}2\mathrm{m}\mathrm{i}\mathrm{n}}$ are the minimum values of the hip and knee joints of experimenter. When *C* is close to 1, it means that LLRR trajectory is very similar to the trajectory of the human body, which indirectly reflects that the comfort of the human body wearing LLRR will be higher.

## Results

In the second section of this paper, the hip joint and knee joint trajectories are obtained after data collection, processing, and fitting as the reference trajectories of the LLRR. Assume that the initial state of the LLRR is zero. And the acceleration of gravity is 9.8 m/s.

Make ${z}_{1}=2$, ${z}_{2}=3$, ${z}_{3}=6$ and assume that the initial value of the error perturbation is, $$\omega =0.05+0.05t\mathrm{sin}\left(2\pi t\right)\phantom{\rule{thickmathspace}{0ex}}$$

RAPLC parameters are designed as,

$a=0.2$, $b=1$

${\alpha}_{\mathrm{i}}=1$, ${\beta}_{\mathrm{i}}=1\left(\mathrm{i}=1,2\right)$, $\gamma =5$, $\mathrm{\Gamma}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left(5,5,5\right)$

${K}_{\mathrm{p}1}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left(50,50\right)$, $\phantom{\rule{thickmathspace}{0ex}}{K}_{\mathrm{p}2}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left(130,130\right)$

$\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}\phantom{\rule{thickmathspace}{0ex}}{K}_{\mathrm{v}1}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left(100,100\right)$, $\phantom{\rule{thickmathspace}{0ex}}{K}_{\mathrm{v}2}=\mathrm{d}\mathrm{i}\mathrm{a}\mathrm{g}\left(100,100\right)$

${S}_{\mathrm{p}}=\left[\begin{array}{cc}{\displaystyle \frac{80}{1+{e}^{-100\mathrm{t}}}}& 0\\ 0& {\displaystyle \frac{40}{1+{e}^{-100\mathrm{t}}}}\end{array}\right]$, ${S}_{\mathrm{v}}=\left[\begin{array}{cc}{\displaystyle \frac{1}{1+{e}^{-100\mathrm{t}}}}& 0\\ 0& {\displaystyle \frac{1}{1+{e}^{-100\mathrm{t}}}}\end{array}\right]$

From the simulation diagram of the LLRR control system based on the experimental data, it can be seen that Fig. 8A shows the hip joint trajectory tracking curve of the robust adaptive PD control (RAPC) based on the experimental data. And the hip joint angular displacement starts to converge at 2.6 s and the convergence error is 1% in Fig. 8B. Figure 9A shows the knee joint trajectory tracking curve of RAPC, and knee joint angular displacement starts to converge at 1.132 S with an error of 1% in Fig. 9B. Figure 10A shows the hip joint trajectory tracking curve of the RAPDC based on the experimental data. The hip joint angular displacement can achieve a convergence error of 1% within 0.1655 s in Fig. 10B. Figure 11A shows the hip and knee joint trajectory tracking curves of the RAPDC. Figure 11B can achieve a convergence error of 0.1% within 0.048 s of the knee joint angular displacement. It can be proved that RAPDC has a better performance by comparing the joints trajectory tracking convergence speed of RAPC and RAPDC. The joints angle of the LLRR system can track the gait trajectory of a normal person so quickly with errors and interferences, and the joints position tracking error quickly converges within the ideal range, the S-curve function plays an essential role. Figure 12A shows the hip and knee joints torque curves of the RAPDC based on experiment data, the joint input torque of the robot is relatively small. Compared with the collected real torque of the human body (Fig. 12B), it is found that it has the same movement trend as the real torque curve and the torque range of the experiment data and simulation result is different, Fig. 13A is higher, because LLRR system must provide motivation for Human-robot. And the small fluctuations come from external interference, which proves that the designed controlled has better robust performance. The hip and knee joint torque are in Fig. 13B only from humans. The above results demonstrate the method proposed in the paper is effective and feasible. Figure 13A shows the joint similarity curve based on comfort function of RAPC and the curve can be stabilized near 0.995 within 2.5 s. Figure 13B shows the joint similarity curve based on comfort function of RAPLC. it can reach a higher similarity faster compared with Fig. 13A and the curve can quickly stabilize around 0.995 within 0.048 s and the fluctuation range is within the allowable error. It can be found that compared with RAPC, RAPLC can ensure that patients wear LLRR for a rehabilitation training in an extremely short time, which is very important for patients. The extremely high comfort can objectively indicate that the patient can perform more comfortable rehabilitation training, and the proposed method has a better control effect of the LLRR system in this paper.

## Conclusions

In this article, the research innovations are summarized as follows:

(1) The experimental data collected from healthy humans was used as the reference expected trajectory of the LLRR control system, and this paper analyzes its dynamics and operational analysis based on human movement characteristics.

(2) Considering comfort, tracking convergence speed, and others, a RAPLC was designed based on human movement mechanism. The controller introduced an S-curve function and comfort formula to improves the convergence speed of the joint angular displacement and reduces the joint initial torque. The results show that this method has a faster convergence rate and a lower input torque than RAPC.

(3) Simulation verification of the lower extremity exoskeleton robot control system based on experimental data. The joint torque obtained by simulation is very similar to the collected real human joint torque, which shows that the method designed in this paper is effective and feasible. It is verified by the similarity function that this paper proposed can ensure the patient has a higher level of comfort when wearing LLRR.