# A Rehabilitation Training Interactive Method for Lower Limb Exoskeleton Robot

Authors: Qianqian Fang; Tian Xu; Tianjiao Zheng; Hegao Cai; Jie Zhao; Yanhe Zhu
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Rehabilitation exoskeleton robot plays an important role in rehabilitation training for limb-disabled patients and exoskeleton robots are becoming popular in rehabilitation area. To encourage the patient's active participation, the patient's subjective motion intention needs to be considered. In this paper, a rehabilitation training interactive method of lower limb exoskeleton robot based on patient's intention is proposed. The proposed method benefits patients to adjust the training trajectory in a safe range of motion according to their intentions. That is, the patient can adjust the amplitude of the trajectory and even the initial point of the trajectory by applying external interaction force to the human-robot system. To identify the patient's intention, the classical momentum observer is introduced to detect the interaction force between the patient and the exoskeleton. In addition, joint space trajectories and Cartesian space trajectories with different amplitudes are designed to enrich the training contents. Then, a trajectory switching algorithm based on external interaction recognition and designed training trajectories is developed. Finally, the proposed method is supported by the simulation results on a lower limb exoskeleton with 2 degrees of freedom (DoF).


---

## Body

## 1. Introduction

Stroke is a neurological disease with high prevalence and often leads to disability [1, 2]. From the age of 25, the global lifetime risk of stroke was estimated to be 24.9% in 2016, a relative increase of 8.9% compared with 1990 [3]. “Statistics of the National Basic Information Database of Persons with Disabilities in 2019” released by the China Disabled Persons Federation [4] shows that the number of registered persons with disabilities is 35.66 million, in which physical disabilities exist in 19.88 million, occupying 55.75% of the total disabilities. Rehabilitation training aims to provide all possible means to restore the lost functions and has become the most effective way to restore motor function [5]. Therefore, the rehabilitation exoskeleton robot with the advantages of high intensity and repeatable training is of great significance as a kind of robot directly serving humans [6].Currently, there are a large variety of studies on lower limb exoskeletons aimed at rehabilitation [7–10]. Robot-assisted rehabilitation is effective. The lower limb exoskeletons are beneficial for strengthening damaged muscles [11], improving walking speed and efficiency, and reducing spasticity and pain [12]. Robot-assisted training may help improve upper limb function in stroke patients as an additional treatment in subacute and chronic phases [13]. Robot-assisted rehabilitation therapy is superior to traditional methods in some aspects, such as the recovery of the patient's walking ability [14], the perception of fatigue [15], and the motor function of the upper limbs [16]. Its cost is also similar to or even lower than that of traditional therapy. In [8], the clinical trials of lower limb exoskeleton robot which involved nonhealthy patients are evaluated, and the safety and effectiveness of exoskeleton have been proved in many diseases. Nonetheless, evidence from clinical validation studies of exoskeletons is mostly limited to short-term intervention trials with few participants.Position or trajectory control is a widely implemented robotic strategy [17, 18]. Veneman et al. [19] proposed an exoskeleton robot for gait rehabilitation based on impedance control according to predetermined joint trajectory. Akdoğan and Adli [20] proposed a lower limb robot to learn the specific movement trajectory performed by the physiotherapist and then to imitate these movements through human-robot interface. Wu et al. [21] designed a powered exoskeleton to help participants to perform functional activities such as walking with a predefined gait. During the swing phase, the joint trajectory of the MINDWALKER designed by Wang et al. [22] was predefined by recording a healthy subject walking in zero-torque mode. However, in these predefined trajectory-based documents, the patient's intention is not considered, and the trajectory cannot be changed according to a certain subjective intention of the patient. Therefore, rehabilitation training based on human-robot interaction, which requires more active participation of the patient, is becoming necessary for rehabilitation purposes [23].The human biological signals can be used to predict the subject’s motion intent, such as noninvasive electromyography (EMG) [24, 25] and electroencephalogram (EEG) signals [26], to promote the subjective participation of patients. In [27], the EMG signals were used as the command signal to control voluntary movements of the wearer’s lower limbs. In [28–30], the ankle exoskeleton was activated with a proportional EMG controller. However, EMG signals can be difficult to interpret due to the abnormal muscle activity. Therefore, the positioning is delicate for measurement. In addition, robot-assisted rehabilitation based on EMG is not suitable for patients who have no or a low level of muscle activity. In recent years, researchers [31] have focused on using EEG signals as a method to control robot movements. A closed-loop system in [32] was presented to control an ambulatory exoskeleton for gait rehabilitation based on EEG signals without balance support. In [33], a gait-related motor imagery-based hybrid brain-computer interface controller with EEG signals was proposed for a lower limb exoskeleton. However, methods based on EEG signals require high costs, which is a limitation of accessibility in an exoskeleton clinical environment [34].In this paper, a rehabilitation training interactive method of lower limb exoskeleton robot based on patient's intention is proposed. To the authors’ knowledge, the proposed rehabilitation training interactive method has not been reported in any other rehabilitation exoskeleton research. To identify the patient's intention, the classical momentum observer is introduced to detect the interaction between the patient and the exoskeleton. In addition, joint space trajectories and Cartesian space trajectories with different amplitudes are designed to enrich the training contents. In joint space, two round-trip trajectories based on multiquintic polynomial interpolation are designed. In Cartesian space, a circular trajectory of the end point of the exoskeleton is given. Then, a trajectory switching algorithm combining external interaction recognition and the designed training trajectories is developed. When the patient wants to increase or decrease the amplitude of the training trajectories, the patient can apply a positive or negative external force to the exoskeleton. Then, the momentum observer can detect the magnitude and direction of the external force to adjust the training trajectories according to the switching rules. Finally, the proposed method is supported by the simulation results on a lower limb exoskeleton with 2 DoF.The main contribution in this article can be summarized as follows: (1) A trajectory switching algorithm based on patient's intention recognition is developed, in which patients can actively adjust the training trajectory in a simple way. (2) Multiple training trajectories in both joint space and Cartesian space with adjustable amplitudes are designed. The paper is organized as follows. Section2 presents the preliminaries including robot kinematics, human-robot system dynamics, and external torque estimation based on momentum observer. Section 3 introduces the proposed method which includes the design of adjustable trajectories and trajectory switching algorithms based on patient intention recognition. Section 4 provides the results of simulation experiments. Finally, Section 5 discusses this article and Section 6 concludes it.


## 2. Preliminaries

### 2.1. Robot Kinematics

The designed lower limb exoskeleton system shown in Figure1 is with 2 DoF in the sagittal plane: one controls the hip joint (joint 1) and the other controls the knee joint (joint 2). Therefore, it can be simplified as a two-link robot model for the convenience of kinematics analysis. Based on the modified Denavit-Hartenberg (MDH) method, the established coordinate system is shown in Figure 2 and the corresponding MDH parameters are shown in Table 1.Figure 1
The prototype of the lower limb exoskeleton.Figure 2
MDH coordinate system.Table 1
MDH parameters.
iαi−1ai−1diθi1π/200q120lth0q2In Figure2, o0x0y0z0, o1x1y1z1, o2x2y2z2, and oexeyeze are the base frame, hip joint frame, knee joint frame, and ankle joint (end point) frame, respectively. lth and lsh represent the lengths of the thigh and calf, respectively. In this paper, the ankle is regarded as the end point and the end point coordinates xe,ze can be written as(1)xe=lthcosq1+lshcosq1+q2,ze=lthsinq1+lshsinq1+q2,where q=q1q2T represents the joint positions.By differentiating both sides of (1), the velocity of the end point x˙e,z˙e can be obtained:(2)x˙e=−lthsinq1q˙1−lshsinq1+q2q˙1+q˙2,z˙e=lthcosq1q˙1+lshcosq1+q2q˙1+q˙2,where q˙=q˙1q˙2T represents the joint velocities.To establish the relationship between the joint velocities and the end point velocity, (2) can be rewritten as follows:(3)v0=J0qq˙,where v0∈ℜn×1 is the end velocity vector in Cartesian coordinates, J0q∈ℜn×n is the Jacobian matrix in Cartesian coordinates, and n is the DoF of the exoskeleton.According to (2) and (3), the Jacobian matrix J0q can be deduced as follows:(4)J0q=−lthsinθ1−lshsinq1+q2−lshsinq1+q2lthcosθ1+lshcosq1+q2lshcosq1+q2.Then, by deriving (3) and (4), the expressions of the velocity vector and acceleration vector of the joint can be obtained as follows:(5)q˙=J0q−1v0,(6)q¨=J0q−1v˙0−J˙0qq˙,where q¨∈ℜn×1 represents the joint accelerations and the derivative of Jacobian matrix J˙0q can be written as follows:(7)J˙0q=−lthq˙1cosq1−lshq˙1+q˙2cosq1+q2−lshq˙1+q˙2cosq1+q2−lthq˙1sinq1−lshq˙1+q˙2sinq1+q2−lshq˙1+q˙2sinq1+q2.


### 2.2. Human-Robot System Dynamics

In the sagittal plane, the thigh and calve of human body are with respect to the thigh and calve of the exoskeleton robot, respectively. Therefore, the dynamic model of the human-robot system can also be simplified as a planar two-link mechanism as shown in Figure2. The Lagrangian method [35] is used to model the dynamics of the exoskeleton robot in this paper. When external interaction forces occur, the dynamic model of the lower exoskeleton can be formulated as follows:(8)τ−τf+τe=Hqq¨+Cq,q˙q˙+Gq,where Hq∈ℜn×n is the symmetric and positive-definite inertia matrix, Cq,q˙∈ℜn×n is the Coriolis and centrifugal matrix, and Gq∈ℜn×1 is the gravity vector. On the left side of (8), τ∈ℜn×1 is the driving torque of the joint, τf∈ℜn×1 is the dissipative torque, and τe∈ℜn×1 is external torque.WhenCq,q˙ is defined by the first type of Christoffel symbol, H˙q−2Cq,q˙ can be a skew-symmetry matrix [36]. Therefore, we can obtain two equations as follows:(9)H˙q−2Cq,q˙=−H˙q−2Cq,q˙T,(10)H˙q=Cq,q˙+Cq,q˙T.


### 2.3. External Torque Estimation Based on Momentum Observer

When external interaction forces are applied on the exoskeleton, the momentum of the exoskeleton will change. Therefore, a momentum observer can be used to judge whether the external torques occur. The momentum of the exoskeleton can be defined as(11)p=Hqq˙,where p∈ℜn×1 is the momentum of the exoskeleton. By differentiating (11), the following equation can be obtained:(12)p˙=H˙qq˙+Hqq¨.By combining (8)–(12), the derivative of momentum can be obtained as follows:(13)p˙=τ−τf+τe+Cq,q˙Tq˙−Gq.According to [37], the dynamics of momentum observer can be defined as(14)p^˙=τ+r−τ^f+C^q,q˙Tq˙−G^q,r˙=K0p˙−p^˙,where K0∈ℜn×n is the positive diagonal gain matrix of the observer and p0 and pt are the momentum at zero moment and t moment, respectively. p^t is the estimated momentum and p^˙ is the derivative of p^t. τ^f, C^q,q˙, and G^q are the estimated values of τf, Cq,q˙, and Gq, respectively.Afterward, by combining (10), the following equation can be defined:(15)χ^q,q˙=C^q,q˙Tq˙−G^q−τ^f=H˙^qq˙−C^q,q˙q˙−G^q−τ^f.Then, by combining (14) and (15), the output of observer r can be designed as follows:(16)r=K0pt−p0−∫0tτ+r+χ^q,q˙dt.According to the above equations, the block diagram of the momentum observer for external torque estimation is shown in Figure3, in which the robot controller is based on the computed torque method [38].Figure 3
Block diagram of momentum observer for external torque detection. The subscript (d) represents the expected value of the original physical meaning.kp and kv are the diagonal positive-definite control gain matrices.


## 2.1. Robot Kinematics

The designed lower limb exoskeleton system shown in Figure1 is with 2 DoF in the sagittal plane: one controls the hip joint (joint 1) and the other controls the knee joint (joint 2). Therefore, it can be simplified as a two-link robot model for the convenience of kinematics analysis. Based on the modified Denavit-Hartenberg (MDH) method, the established coordinate system is shown in Figure 2 and the corresponding MDH parameters are shown in Table 1.Figure 1
The prototype of the lower limb exoskeleton.Figure 2
MDH coordinate system.Table 1
MDH parameters.
iαi−1ai−1diθi1π/200q120lth0q2In Figure2, o0x0y0z0, o1x1y1z1, o2x2y2z2, and oexeyeze are the base frame, hip joint frame, knee joint frame, and ankle joint (end point) frame, respectively. lth and lsh represent the lengths of the thigh and calf, respectively. In this paper, the ankle is regarded as the end point and the end point coordinates xe,ze can be written as(1)xe=lthcosq1+lshcosq1+q2,ze=lthsinq1+lshsinq1+q2,where q=q1q2T represents the joint positions.By differentiating both sides of (1), the velocity of the end point x˙e,z˙e can be obtained:(2)x˙e=−lthsinq1q˙1−lshsinq1+q2q˙1+q˙2,z˙e=lthcosq1q˙1+lshcosq1+q2q˙1+q˙2,where q˙=q˙1q˙2T represents the joint velocities.To establish the relationship between the joint velocities and the end point velocity, (2) can be rewritten as follows:(3)v0=J0qq˙,where v0∈ℜn×1 is the end velocity vector in Cartesian coordinates, J0q∈ℜn×n is the Jacobian matrix in Cartesian coordinates, and n is the DoF of the exoskeleton.According to (2) and (3), the Jacobian matrix J0q can be deduced as follows:(4)J0q=−lthsinθ1−lshsinq1+q2−lshsinq1+q2lthcosθ1+lshcosq1+q2lshcosq1+q2.Then, by deriving (3) and (4), the expressions of the velocity vector and acceleration vector of the joint can be obtained as follows:(5)q˙=J0q−1v0,(6)q¨=J0q−1v˙0−J˙0qq˙,where q¨∈ℜn×1 represents the joint accelerations and the derivative of Jacobian matrix J˙0q can be written as follows:(7)J˙0q=−lthq˙1cosq1−lshq˙1+q˙2cosq1+q2−lshq˙1+q˙2cosq1+q2−lthq˙1sinq1−lshq˙1+q˙2sinq1+q2−lshq˙1+q˙2sinq1+q2.


## 2.2. Human-Robot System Dynamics

In the sagittal plane, the thigh and calve of human body are with respect to the thigh and calve of the exoskeleton robot, respectively. Therefore, the dynamic model of the human-robot system can also be simplified as a planar two-link mechanism as shown in Figure2. The Lagrangian method [35] is used to model the dynamics of the exoskeleton robot in this paper. When external interaction forces occur, the dynamic model of the lower exoskeleton can be formulated as follows:(8)τ−τf+τe=Hqq¨+Cq,q˙q˙+Gq,where Hq∈ℜn×n is the symmetric and positive-definite inertia matrix, Cq,q˙∈ℜn×n is the Coriolis and centrifugal matrix, and Gq∈ℜn×1 is the gravity vector. On the left side of (8), τ∈ℜn×1 is the driving torque of the joint, τf∈ℜn×1 is the dissipative torque, and τe∈ℜn×1 is external torque.WhenCq,q˙ is defined by the first type of Christoffel symbol, H˙q−2Cq,q˙ can be a skew-symmetry matrix [36]. Therefore, we can obtain two equations as follows:(9)H˙q−2Cq,q˙=−H˙q−2Cq,q˙T,(10)H˙q=Cq,q˙+Cq,q˙T.


## 2.3. External Torque Estimation Based on Momentum Observer

When external interaction forces are applied on the exoskeleton, the momentum of the exoskeleton will change. Therefore, a momentum observer can be used to judge whether the external torques occur. The momentum of the exoskeleton can be defined as(11)p=Hqq˙,where p∈ℜn×1 is the momentum of the exoskeleton. By differentiating (11), the following equation can be obtained:(12)p˙=H˙qq˙+Hqq¨.By combining (8)–(12), the derivative of momentum can be obtained as follows:(13)p˙=τ−τf+τe+Cq,q˙Tq˙−Gq.According to [37], the dynamics of momentum observer can be defined as(14)p^˙=τ+r−τ^f+C^q,q˙Tq˙−G^q,r˙=K0p˙−p^˙,where K0∈ℜn×n is the positive diagonal gain matrix of the observer and p0 and pt are the momentum at zero moment and t moment, respectively. p^t is the estimated momentum and p^˙ is the derivative of p^t. τ^f, C^q,q˙, and G^q are the estimated values of τf, Cq,q˙, and Gq, respectively.Afterward, by combining (10), the following equation can be defined:(15)χ^q,q˙=C^q,q˙Tq˙−G^q−τ^f=H˙^qq˙−C^q,q˙q˙−G^q−τ^f.Then, by combining (14) and (15), the output of observer r can be designed as follows:(16)r=K0pt−p0−∫0tτ+r+χ^q,q˙dt.According to the above equations, the block diagram of the momentum observer for external torque estimation is shown in Figure3, in which the robot controller is based on the computed torque method [38].Figure 3
Block diagram of momentum observer for external torque detection. The subscript (d) represents the expected value of the original physical meaning.kp and kv are the diagonal positive-definite control gain matrices.


## 3. The Proposed Method

### 3.1. Design of Adjustable Trajectories

To enrich the contents of rehabilitation training, the rehabilitation trajectories are planned in both the joint space and Cartesian space. The trajectory planning in joint space can not only perform multijoint training but also perform single-joint training for the hip joint or knee joint separately. Trajectory planning in Cartesian space can achieve some trajectories similar to what happens in life, such as the training trajectory of ankle joint when pedaling bicycle. The two planning methods can complement each other and make the training content richer, to exercise the muscles of the lower body as comprehensively as possible. In this section, the joint space training trajectories with adjustable amplitudes and the Cartesian space training trajectories with circular motion are designed.


#### 3.1.1. Trajectory Planning in Joint Space

In our previous study research [39], a multicubic polynomial interpolation method is proposed for two round-trip trajectory planning. To make the trajectory smoother, in this paper, a multiquintic polynomial trajectory interpolation method is designed to achieve two round-trip motion in joint place. Compared with the previous study, this method can achieve an initial velocity and initial acceleration of the trajectory to be zero. Five trajectory turning points are needed for two round-trip trajectories, named A, B, C, D, and E, respectively. Points A and E are the initial point and end point of the trajectory, respectively, and points B, C, and D are the midpoints of the trajectory. Point A to point C represent the first round-trip trajectory and point C to point E represent the second round-trip trajectory. Therefore, point A to point E constitute a two round-trip trajectory. Each two points are connected by a quintic polynomial generated by interpolation, and then the two round-trip trajectory planning is composed of four quintic splines, and the duration of each spline is t1, t2, t3, and t4, respectively.(17)qijt=aij+bijtj+cijtj2+dijtj3+eijtj4+fijtj5,where aij, bij, cij, dij, eij, and fij are polynomial coefficients, i represents the ith joint of the exoskeleton (i = 1, 2), and j represents the jth spline curves for each joint (j = 1…4).The angular velocity, angular acceleration, and angular jerk of the joint can be obtained as follows:(18)q˙ijt=bij+2cijtj+3dijtj2+4eijtj3+5fijtj4,q¨ijt=2cij+6dijtj+12eijt2+20fijtj3,q⃛ijt=6dij+24eijtj+60fijtj2.Considering constraints in (18), firstly, the velocity and acceleration at the initial point A and the goal point E are both set to 0. Secondly, the angle, angular velocity, angular acceleration, and angular jerk of the trajectory are continuous at the intermediate points B, C, and D. Finally, the angular velocity is zero at the intermediate points B, C, and D. When the joint angles of these five turning points are given, the coefficients in (18) can be solved according to these constraints.


#### 3.1.2. Trajectory Planning in Cartesian Space

Based on the kinematics modeling in Section2.1, a circular motion trajectory at the end of the exoskeleton is designed and the trajectory equation is(19)xe=a+0.5dcos2πtTcir,ze=b−0.5dsin2πtTcir,(20)a=lthcosφth+lcacosφca,b=lthsinφth+lcasinφca,where a and b are constants, φth is the hip joint angle corresponding to the center of the circle, φca is the knee joint angle corresponding to the center of the circle, d is the diameter of the circle trajectory, and Tcir is the motion period of the circular trajectory.By deriving (19), the velocity and acceleration expressions of the circular trajectory can be obtained as follows:(21)x˙e0=−2πrTsin2πt/Tcir,z˙e0=−2πrTcos2πt/Tcir,(22)x¨e0=−r2πT2cos2πtTcir,z¨e0=r2πT2sin2πtTcir.By substituting (21) and (22) into (5) and (6), the velocity and acceleration of the joint can be then obtained:(23)q˙=J0q−1x˙0ez˙0eT,(24)q¨=J0q−1x¨e0z¨e0T−J˙0qq˙.


### 3.2. Trajectory Switching Algorithm Based on Patient Intention Recognition

A real-time rehabilitation training trajectory switching algorithm based on the patient’s intention is designed, and the schematic diagram is shown in Figure4. Taking the joint space training trajectory as an example, three joint space training trajectories with different amplitudes are designed, namely, trajectory 0 with medium amplitude, trajectory 1 with large amplitude, and trajectory 2 with small amplitude. The purpose of trajectory 2 is for low-intensity training. The purpose of trajectory 0 is for medium-intensity training. The purpose of trajectory 1 is for high-intensity training. The three trajectories in Cartesian space have the same purpose as that in joint space. In the process of rehabilitation training, the amplitude of the training trajectory is adjusted online by the patient according to the patient’s feelings. When the current trajectory can no longer meet the exercise requirements or when the user feels that the current trajectory uncomfortable or when the user wants to adjust the movement posture of the lower limb, he/she can choose to switch the trajectory. The patient just needs to impose an external interaction force on the human-robot system by the hand. The patient is not only the training object of the rehabilitation exoskeleton but also the controller of the rehabilitation training contents; that is, the patient can actively participate in the rehabilitation training to get rid of the traditional passive training method. Therefore, the human and the rehabilitation exoskeleton constitute a closed-loop system, which has the advantage of exerting the subjective initiative of the patient.Figure 4
Schematic diagram of trajectory switching algorithm.In Figure4, memory A = 0, −1, or 1 represents the flag for switching the training trajectories. R represents the observer threshold, and Te represents the preset training time. A = 0 means that the human-robot system performs rehabilitation training according to the preset initialization trajectory 0. A = 1 means that the human-robot system switches to the preset trajectory 1 for rehabilitation training. A = −1 means that the human-robot system performs rehabilitation training according to the preset trajectory 2. After initializing A to 0, the exoskeleton starts to move according to the preset initial trajectory 0.The amplitude of the initial trajectory can be adjusted online by applying external interaction force by the patient. When the patient imposes a positive interaction force on the human-robot system by hand as shown in Figure5(a)), that is, the force in the same direction as the motion direction of the human-robot system, this indicates that the patient wants to switch to a larger amplitude rehabilitation trajectory; thus, the estimated external torque r > 0 is output by the observer. When the patient imposes a reverse interaction force on the human-robot system by hand as shown in Figure 5(b)), that is, the force opposite to the motion direction of the human-robot system, this indicates that the patient wants to switch to a smaller amplitude rehabilitation trajectory, and then the estimated external toque r < 0 is output by the observer. If no external human-robot interaction force occurs, which indicates that the patient does not want to switch the rehabilitation trajectory, the estimated external torque r = 0 is output by the observer. The designed rehabilitation trajectory switching rules are as follows:(1)
If the observer outputsr>R and the hip joint moves to the initial joint position again, that is, q1t=q1,0, then 1 is stored in memory A, and thus the trajectory switches from current trajectory to trajectory 1 for continuous moving(2)
If the observer outputsr≤−R and the hip joint moves to the initial joint position again, then −1 is stored in memory A, and thus the trajectory switches from current trajectory to trajectory 2 for continuous moving(3)
Otherwise, memoryA keeps the original value, and the system continues to move according to current trajectory(4)
If current training time does not reach the set training durationTe, the training continues; otherwise, the rehabilitation training stopsFigure 5
External interaction force. (a) Positive interaction force. (b) Reverse interaction force.
(a)(b)Unlike passively accepting the training trajectory arranged by the physiotherapist, the trajectory switching method proposed in this paper allows the patient to actively choose different rehabilitation trajectories to motivate patient's subjective initiative and improve patient's training enthusiasm.


## 3.1. Design of Adjustable Trajectories

To enrich the contents of rehabilitation training, the rehabilitation trajectories are planned in both the joint space and Cartesian space. The trajectory planning in joint space can not only perform multijoint training but also perform single-joint training for the hip joint or knee joint separately. Trajectory planning in Cartesian space can achieve some trajectories similar to what happens in life, such as the training trajectory of ankle joint when pedaling bicycle. The two planning methods can complement each other and make the training content richer, to exercise the muscles of the lower body as comprehensively as possible. In this section, the joint space training trajectories with adjustable amplitudes and the Cartesian space training trajectories with circular motion are designed.


### 3.1.1. Trajectory Planning in Joint Space

In our previous study research [39], a multicubic polynomial interpolation method is proposed for two round-trip trajectory planning. To make the trajectory smoother, in this paper, a multiquintic polynomial trajectory interpolation method is designed to achieve two round-trip motion in joint place. Compared with the previous study, this method can achieve an initial velocity and initial acceleration of the trajectory to be zero. Five trajectory turning points are needed for two round-trip trajectories, named A, B, C, D, and E, respectively. Points A and E are the initial point and end point of the trajectory, respectively, and points B, C, and D are the midpoints of the trajectory. Point A to point C represent the first round-trip trajectory and point C to point E represent the second round-trip trajectory. Therefore, point A to point E constitute a two round-trip trajectory. Each two points are connected by a quintic polynomial generated by interpolation, and then the two round-trip trajectory planning is composed of four quintic splines, and the duration of each spline is t1, t2, t3, and t4, respectively.(17)qijt=aij+bijtj+cijtj2+dijtj3+eijtj4+fijtj5,where aij, bij, cij, dij, eij, and fij are polynomial coefficients, i represents the ith joint of the exoskeleton (i = 1, 2), and j represents the jth spline curves for each joint (j = 1…4).The angular velocity, angular acceleration, and angular jerk of the joint can be obtained as follows:(18)q˙ijt=bij+2cijtj+3dijtj2+4eijtj3+5fijtj4,q¨ijt=2cij+6dijtj+12eijt2+20fijtj3,q⃛ijt=6dij+24eijtj+60fijtj2.Considering constraints in (18), firstly, the velocity and acceleration at the initial point A and the goal point E are both set to 0. Secondly, the angle, angular velocity, angular acceleration, and angular jerk of the trajectory are continuous at the intermediate points B, C, and D. Finally, the angular velocity is zero at the intermediate points B, C, and D. When the joint angles of these five turning points are given, the coefficients in (18) can be solved according to these constraints.


### 3.1.2. Trajectory Planning in Cartesian Space

Based on the kinematics modeling in Section2.1, a circular motion trajectory at the end of the exoskeleton is designed and the trajectory equation is(19)xe=a+0.5dcos2πtTcir,ze=b−0.5dsin2πtTcir,(20)a=lthcosφth+lcacosφca,b=lthsinφth+lcasinφca,where a and b are constants, φth is the hip joint angle corresponding to the center of the circle, φca is the knee joint angle corresponding to the center of the circle, d is the diameter of the circle trajectory, and Tcir is the motion period of the circular trajectory.By deriving (19), the velocity and acceleration expressions of the circular trajectory can be obtained as follows:(21)x˙e0=−2πrTsin2πt/Tcir,z˙e0=−2πrTcos2πt/Tcir,(22)x¨e0=−r2πT2cos2πtTcir,z¨e0=r2πT2sin2πtTcir.By substituting (21) and (22) into (5) and (6), the velocity and acceleration of the joint can be then obtained:(23)q˙=J0q−1x˙0ez˙0eT,(24)q¨=J0q−1x¨e0z¨e0T−J˙0qq˙.


## 3.1.1. Trajectory Planning in Joint Space

In our previous study research [39], a multicubic polynomial interpolation method is proposed for two round-trip trajectory planning. To make the trajectory smoother, in this paper, a multiquintic polynomial trajectory interpolation method is designed to achieve two round-trip motion in joint place. Compared with the previous study, this method can achieve an initial velocity and initial acceleration of the trajectory to be zero. Five trajectory turning points are needed for two round-trip trajectories, named A, B, C, D, and E, respectively. Points A and E are the initial point and end point of the trajectory, respectively, and points B, C, and D are the midpoints of the trajectory. Point A to point C represent the first round-trip trajectory and point C to point E represent the second round-trip trajectory. Therefore, point A to point E constitute a two round-trip trajectory. Each two points are connected by a quintic polynomial generated by interpolation, and then the two round-trip trajectory planning is composed of four quintic splines, and the duration of each spline is t1, t2, t3, and t4, respectively.(17)qijt=aij+bijtj+cijtj2+dijtj3+eijtj4+fijtj5,where aij, bij, cij, dij, eij, and fij are polynomial coefficients, i represents the ith joint of the exoskeleton (i = 1, 2), and j represents the jth spline curves for each joint (j = 1…4).The angular velocity, angular acceleration, and angular jerk of the joint can be obtained as follows:(18)q˙ijt=bij+2cijtj+3dijtj2+4eijtj3+5fijtj4,q¨ijt=2cij+6dijtj+12eijt2+20fijtj3,q⃛ijt=6dij+24eijtj+60fijtj2.Considering constraints in (18), firstly, the velocity and acceleration at the initial point A and the goal point E are both set to 0. Secondly, the angle, angular velocity, angular acceleration, and angular jerk of the trajectory are continuous at the intermediate points B, C, and D. Finally, the angular velocity is zero at the intermediate points B, C, and D. When the joint angles of these five turning points are given, the coefficients in (18) can be solved according to these constraints.


## 3.1.2. Trajectory Planning in Cartesian Space

Based on the kinematics modeling in Section2.1, a circular motion trajectory at the end of the exoskeleton is designed and the trajectory equation is(19)xe=a+0.5dcos2πtTcir,ze=b−0.5dsin2πtTcir,(20)a=lthcosφth+lcacosφca,b=lthsinφth+lcasinφca,where a and b are constants, φth is the hip joint angle corresponding to the center of the circle, φca is the knee joint angle corresponding to the center of the circle, d is the diameter of the circle trajectory, and Tcir is the motion period of the circular trajectory.By deriving (19), the velocity and acceleration expressions of the circular trajectory can be obtained as follows:(21)x˙e0=−2πrTsin2πt/Tcir,z˙e0=−2πrTcos2πt/Tcir,(22)x¨e0=−r2πT2cos2πtTcir,z¨e0=r2πT2sin2πtTcir.By substituting (21) and (22) into (5) and (6), the velocity and acceleration of the joint can be then obtained:(23)q˙=J0q−1x˙0ez˙0eT,(24)q¨=J0q−1x¨e0z¨e0T−J˙0qq˙.


## 3.2. Trajectory Switching Algorithm Based on Patient Intention Recognition

A real-time rehabilitation training trajectory switching algorithm based on the patient’s intention is designed, and the schematic diagram is shown in Figure4. Taking the joint space training trajectory as an example, three joint space training trajectories with different amplitudes are designed, namely, trajectory 0 with medium amplitude, trajectory 1 with large amplitude, and trajectory 2 with small amplitude. The purpose of trajectory 2 is for low-intensity training. The purpose of trajectory 0 is for medium-intensity training. The purpose of trajectory 1 is for high-intensity training. The three trajectories in Cartesian space have the same purpose as that in joint space. In the process of rehabilitation training, the amplitude of the training trajectory is adjusted online by the patient according to the patient’s feelings. When the current trajectory can no longer meet the exercise requirements or when the user feels that the current trajectory uncomfortable or when the user wants to adjust the movement posture of the lower limb, he/she can choose to switch the trajectory. The patient just needs to impose an external interaction force on the human-robot system by the hand. The patient is not only the training object of the rehabilitation exoskeleton but also the controller of the rehabilitation training contents; that is, the patient can actively participate in the rehabilitation training to get rid of the traditional passive training method. Therefore, the human and the rehabilitation exoskeleton constitute a closed-loop system, which has the advantage of exerting the subjective initiative of the patient.Figure 4
Schematic diagram of trajectory switching algorithm.In Figure4, memory A = 0, −1, or 1 represents the flag for switching the training trajectories. R represents the observer threshold, and Te represents the preset training time. A = 0 means that the human-robot system performs rehabilitation training according to the preset initialization trajectory 0. A = 1 means that the human-robot system switches to the preset trajectory 1 for rehabilitation training. A = −1 means that the human-robot system performs rehabilitation training according to the preset trajectory 2. After initializing A to 0, the exoskeleton starts to move according to the preset initial trajectory 0.The amplitude of the initial trajectory can be adjusted online by applying external interaction force by the patient. When the patient imposes a positive interaction force on the human-robot system by hand as shown in Figure5(a)), that is, the force in the same direction as the motion direction of the human-robot system, this indicates that the patient wants to switch to a larger amplitude rehabilitation trajectory; thus, the estimated external torque r > 0 is output by the observer. When the patient imposes a reverse interaction force on the human-robot system by hand as shown in Figure 5(b)), that is, the force opposite to the motion direction of the human-robot system, this indicates that the patient wants to switch to a smaller amplitude rehabilitation trajectory, and then the estimated external toque r < 0 is output by the observer. If no external human-robot interaction force occurs, which indicates that the patient does not want to switch the rehabilitation trajectory, the estimated external torque r = 0 is output by the observer. The designed rehabilitation trajectory switching rules are as follows:(1)
If the observer outputsr>R and the hip joint moves to the initial joint position again, that is, q1t=q1,0, then 1 is stored in memory A, and thus the trajectory switches from current trajectory to trajectory 1 for continuous moving(2)
If the observer outputsr≤−R and the hip joint moves to the initial joint position again, then −1 is stored in memory A, and thus the trajectory switches from current trajectory to trajectory 2 for continuous moving(3)
Otherwise, memoryA keeps the original value, and the system continues to move according to current trajectory(4)
If current training time does not reach the set training durationTe, the training continues; otherwise, the rehabilitation training stopsFigure 5
External interaction force. (a) Positive interaction force. (b) Reverse interaction force.
(a)(b)Unlike passively accepting the training trajectory arranged by the physiotherapist, the trajectory switching method proposed in this paper allows the patient to actively choose different rehabilitation trajectories to motivate patient's subjective initiative and improve patient's training enthusiasm.


## 4. Simulation Experiments

### 4.1. Simulation of Trajectory Planning in Joint Space

We set the thigh lengthlth to 0.492 m and the calf length lsh to 0.393 m. The movement duration of the four splines is 2 s, namely, t1 = t2 = t3 = t4 = 2 s. The five motion trajectory points from A to E are at 0°, 20°, 5°, 40°, and 0° for the hip joint and at 0°, −10°, −5°, −20°, and 0° for the knee joint. The simulation is executed under these conditions. Trajectory graphs in angle, velocity, acceleration of joints, and end displacement can be obtained as shown in Figure 6.Figure 6
Trajectories graphs based on quintic polynomial. (a) Joint angle. (b) Joint angular velocity. (c) Joint angular acceleration. (d) Displacement at the end.
(a)(b)(c)(d)Compared with previous research [35], the two round-trip trajectories based on the quintic polynomial realize that the acceleration value of the initial point and the end point of the trajectory is zero, and the acceleration curve is smoother, which is more conducive to the application of rehabilitation trajectory based on retaining the advantages of the original research.


### 4.2. Simulation of Trajectory Planning in Cartesian Space

We set the following parameters:φth=45°, φca=−25°, Tcir = 5 s, d = 0.16 m, the initial posture angle of the hip is 34.8386°, and that of the knee is −49.4676°. Based on these parameters, the position, velocity, and acceleration of the end of exoskeleton can be obtained according to (19)–(22). Then, based on inverse kinematics derivation, (5) and (6), the angle, velocity, acceleration of the joint, and displacement curve of the end of exoskeleton can be obtained as shown in Figure 7.Figure 7
Trajectory graphs in Cartesian space. (a) Joint angle. (b) Joint angular velocity. (c) Joint angular acceleration. (d) Displacement of the end point.
(a)(b)(c)(d)In Figure7, the joint angle, velocity, and acceleration curves are smooth, and the circular trajectory at the end is realized. Cartesian space trajectory planning has many advantages and can realize common trajectories in life. For example, the circular trajectory designed in this paper is the trajectory of the foot end when a person rides the bicycle.


### 4.3. Simulation of Trajectory Switching Algorithm

The simulation of adjustable trajectory switching algorithm is carried out in joint space and Cartesian space, respectively. In joint space, trajectory switching is divided into with transition trajectory and without transition trajectory. The starting points of the trajectories without transition trajectory are coincident. The starting points of the trajectories with transition trajectory are not coincident, and then the transition trajectories are added to make a smooth transition between the trajectories. The principles of the two switching types are similar. Compared with no transition trajectory, the switching with transition trajectory can realize the switching between trajectories with different initial points, which has stronger application significance. The exoskeleton controller in simulation is based on the computed torque method shown in Figure3. To minimize the track tracking error and achieve a better track tracking effect, the diagonal positive-definite control gain matrices kp and kv are 1000 and 100, respectively.


#### 4.3.1. Trajectory Switching Algorithm in Joint Space

(1) Without Transition Trajectory. Based on the joint space trajectory planning in Section 3.1.1, the simulation of adjustable trajectory in joint space based on human intention is conducted. To plan the round-trip trajectory, five points of the hip and knee joints from A to E need to be planned, respectively. Firstly, trajectory 0 is planned so that the five position points of the hip joint are 10°, 40°, 10°, 40°, and 10° and the five position points of the knee joint are −10°, −45°, −10°, −45°, and −10°. Secondly, a trajectory with larger motion amplitude than trajectory 0, that is, trajectory 1, is planned, so that the five position points of the hip joint are 10°, 50°, 10°, 50°, and 10° and those of the knee joint are −10°, −55°, −10°, −55°, and −10°. Finally, a trajectory with smaller motion amplitude than trajectory 0, that is, trajectory 2, is planned, so that the five position points of the hip joint are 10°, 30°, 10°, 30°, and 10°, and those of the knee joint are −10°, −35°, −10°, −35°, and −10°. Set t1 = t2 = t3 = t4 = 2 s and the observer threshold R = 5 Nm. Then the simulations start, and the results are obtained and shown in Figures 8–10.Figure 8
The actual angle curve of the hip and knee joints.Figure 9
External interaction signal (r).Figure 10
MemoryA.As shown in Figure8, firstly, the hip and knee joints start to move along trajectory 0 with the initial posture angles of 10° and −10°, respectively. At t = 2 s, the hip and knee joints move to the first preset position of trajectory 0, that is, point B (40° and −45°). At this time, the patient imposes an external force on the system, and its amplitude is quickly detected to be approximately 10 Nm and its direction is recognized as positive by the observer, as shown in Figure 9. Since the external torque is in the positive direction, that is, the direction of the external torque is the same as that of the robot and 10 Nm is greater than the observer threshold R, this indicates that the patient wants a larger motion trajectory. But, at t = 2 s, the hip joint angle is 40°, which is not the initial joint angle of 10°, so the robot continues to move along trajectory 0. When t = 4 s, the hip joint moves to the initial position of 10°, and then the flag of the trajectory changes to 1, that is, memory A = 1, as shown in Figure 10. When A switches from 0 (default value) to 1, the trajectory also switches from trajectory 0 to trajectory 1 and starts to move following trajectory 1.Similarly, when the patient wants to reduce the motion amplitude of the joint, one can apply an external interaction force opposite to the motion direction of the robot by hand; that is, att = 7 s, the patient applies an external force in the opposite direction to the exoskeleton. The amplitude is quickly detected to be approximately 10 Nm and its direction is recognized as negative by the observer, which indicates that the patient wants to reduce the motion trajectory. However, the position of the hip joint is not the initial position at this time, so the robot continues to move along trajectory 1. When t = 8 s, the hip joint moves to the initial position again. After being identified, −1 is assigned to the trajectory flag, that is, memory A = −1. Therefore, A switches from 1 to −1, and the joint trajectory also switches from trajectory 1 to trajectory 2.(2) With Transition Trajectory. When the initial positions of the three trajectories are different, that is, there is a certain amount of deviation between the trajectories, the training trajectory will be more general and have a wider range of application scenarios. To achieve a smooth transition between trajectories, transition trajectories are needed. Here, trajectory 0 is the same as trajectory 0 without transition trajectory in Section 4.3.1. For trajectory 1, the five position points of the hip joint are 20°, 60°, 20°, 60°, and 20° and the five position points of the knee joint are −20°, −65°, −20°, −65°, and −20°. For trajectory 2, the five position points of the hip joint are 5°, 25°, 5°, 25°, and 5° and the five position points of the knee joint are −5°, −30°, −5°, −30°, and −5°. The transition trajectory is also based on quintic polynomial. In addition, the start and end points of the transition trajectory meet the requirements that the joint angle, velocity, and acceleration be continuous. Then, by starting the simulations, the results are obtained and shown in Figures 11–13.Figure 11
The actual angle curve of the hip and knee joints.Figure 12
External interaction signal (r).Figure 13
MemoryA.Firstly, the system starts to move along trajectory 0 as shown in Figure11. At t = 6 s, the observer detects an external torque with an amplitude of approximately 10 Nm and a positive direction as shown in Figure 12, which means that the patient applies a positive external torque to the system and wants to switch to a large amplitude trajectory. Therefore, when the hip joint moves to the initial position at t = 8 s, the flag of the trajectory is switched to 1, that is, memory A = 1, as shown in Figure 13. When A switches from 0 to 1, the joint trajectory switches to transition trajectory. Until the system moves along the transition trajectory to the initial position of trajectory 1 at t = 10 s, it starts to move following trajectory 1.Similarly, att = 15 s, the observer detects an external torque with an amplitude of about 10 Nm and a negative direction, which means that the patient applies reverse external torque to the system and wants to reduce the amplitude of the trajectory. When t = 18 s, trajectory 1 moves to the initial position and A switches from 1 to −1. Therefore, the joint trajectory also switches from trajectory 1 to transition trajectory and moves along it to the initial position of trajectory 2 and then starts to move along trajectory 2.


#### 4.3.2. Trajectory Switching Algorithm in Cartesian Space

Based on the Cartesian space trajectory planning in Section3.1.2, the adjustable trajectory simulation based on human intention is conducted in the Cartesian space. The main difference between the three trajectories with circular ends is that the diameters of the three circles are different. The diameters of trajectories 0, 1, and 2 are set to d0=0.16m, d1=0.22m, and d2=0.1m, respectively. Other parameters are as follows: R = 5 Nm, φth=45°, φca=−25°, and Tcir = 5 s. The corresponding trajectory equations are as follows:(25)xe0=a+0.5d0cos2πtTcir,ze0=b−0.5d0sin2πtTcir,(26)xe1=a−0.03+0.5d1cos2πtTcir,ze1=b−0.5d1sin2πtTcir,(27)xe2=a+0.03+0.5d2cos2πtTcir,ze2=b−0.5d2sin2πtTcir.It can be analyzed from (25)–(27) that the initial positions of the three trajectories are the same, which benefits realizing the smooth transition of the three trajectories better. By conducting the simulations, the following results can be obtained.The principle of trajectory switching in Cartesian space is the same as that in joint space. Therefore, the simulation results of the trajectory switching algorithm in the Cartesian space are briefly described here. Firstly, the human-robot system performs circular motion of the end point trajectory with a diameter of 0.16 m, that is, trajectory 0. The end displacement and actual joint angle are shown in Figures14 and 15, respectively. At t = 3 s, an external torque with an amplitude of approximately 10 Nm and a positive direction is detected by the observer, as shown in Figure 16. This means that the patient imposes a positive force on the system and wants to expand the diameter of the end circle trajectory. However, at t = 3 s, the hip joint does not return to the initial joint position, so the robot continues to move according to current trajectory 0 until the hip joint moves to the initial joint position at 5 s. At this time, memory A changes to 1, as shown in Figure 17. When A switches from 0 to 1, the trajectory also switches from trajectory 0 to trajectory 1. Then, the end of the robot moves in a circular trajectory with a diameter of 0.22 m, that is, trajectory 1.Figure 14
Displacement at the end.Figure 15
Actual joint angle.Figure 16
External interaction signal (r).Figure 17
MemoryA.Similarly, att = 7 s, the patient applies an external force opposite to the direction of exoskeleton movement. The force is quickly detected by the observer to be approximately 10 Nm in magnitude and negative in the direction, which indicates that the patient wants to reduce the diameter of the end movement trajectory. It is not until the hip joint returns to the initial position at 10 s that −1 is assigned to memory A. When A switches from 1 to −1, the end trajectory of the robot switches from trajectory 1 to trajectory 2. Then, the end of the robot moves in a circular trajectory with a diameter of 0.10 m, that is, trajectory 2.


#### 4.3.3. The Comparison of Joint Torque

Because the dynamic parameters of the simulator model are not obtained by the experimental identification, it is difficult to compare the simulation torques with the experimental torques measured from real patients. However, we show an indirect comparison between the simulation torques and the experimental torques which are calculated by using the actual joint position data measured from the exoskeleton and using the dynamic parameters of the simulator. To obtain the actual joint position data, we command the exoskeleton robot to track a Fourier series trajectory [40]. At the same time, the actual joint position data are measured from the exoskeleton robot. Then, we calculate joint velocity and joint acceleration by the central differentiation. After that, we use the joint position, joint velocity, and joint acceleration data as the input of the dynamics equation and output the actual joint torques. As shown in Figure 18, the actual torques (blue-dotted line) are with noise because they are calculated by the actual trajectory data. The simulation torques (red solid line) are without noise because they are calculated by the desired trajectory data. It can be found that the desired torques and the actual torques basically coincide except for some spikes, which is caused by the inaccuracy of the used friction model when the speed is reversed. This is because the used friction model cannot describe the complex joint friction phenomenon at the low joint speed.Figure 18
Actual and expected moments of the hip and knee joints. (a) Hip joint. (b) Knee joint.
(a)(b)


## 4.1. Simulation of Trajectory Planning in Joint Space

We set the thigh lengthlth to 0.492 m and the calf length lsh to 0.393 m. The movement duration of the four splines is 2 s, namely, t1 = t2 = t3 = t4 = 2 s. The five motion trajectory points from A to E are at 0°, 20°, 5°, 40°, and 0° for the hip joint and at 0°, −10°, −5°, −20°, and 0° for the knee joint. The simulation is executed under these conditions. Trajectory graphs in angle, velocity, acceleration of joints, and end displacement can be obtained as shown in Figure 6.Figure 6
Trajectories graphs based on quintic polynomial. (a) Joint angle. (b) Joint angular velocity. (c) Joint angular acceleration. (d) Displacement at the end.
(a)(b)(c)(d)Compared with previous research [35], the two round-trip trajectories based on the quintic polynomial realize that the acceleration value of the initial point and the end point of the trajectory is zero, and the acceleration curve is smoother, which is more conducive to the application of rehabilitation trajectory based on retaining the advantages of the original research.


## 4.2. Simulation of Trajectory Planning in Cartesian Space

We set the following parameters:φth=45°, φca=−25°, Tcir = 5 s, d = 0.16 m, the initial posture angle of the hip is 34.8386°, and that of the knee is −49.4676°. Based on these parameters, the position, velocity, and acceleration of the end of exoskeleton can be obtained according to (19)–(22). Then, based on inverse kinematics derivation, (5) and (6), the angle, velocity, acceleration of the joint, and displacement curve of the end of exoskeleton can be obtained as shown in Figure 7.Figure 7
Trajectory graphs in Cartesian space. (a) Joint angle. (b) Joint angular velocity. (c) Joint angular acceleration. (d) Displacement of the end point.
(a)(b)(c)(d)In Figure7, the joint angle, velocity, and acceleration curves are smooth, and the circular trajectory at the end is realized. Cartesian space trajectory planning has many advantages and can realize common trajectories in life. For example, the circular trajectory designed in this paper is the trajectory of the foot end when a person rides the bicycle.


## 4.3. Simulation of Trajectory Switching Algorithm

The simulation of adjustable trajectory switching algorithm is carried out in joint space and Cartesian space, respectively. In joint space, trajectory switching is divided into with transition trajectory and without transition trajectory. The starting points of the trajectories without transition trajectory are coincident. The starting points of the trajectories with transition trajectory are not coincident, and then the transition trajectories are added to make a smooth transition between the trajectories. The principles of the two switching types are similar. Compared with no transition trajectory, the switching with transition trajectory can realize the switching between trajectories with different initial points, which has stronger application significance. The exoskeleton controller in simulation is based on the computed torque method shown in Figure3. To minimize the track tracking error and achieve a better track tracking effect, the diagonal positive-definite control gain matrices kp and kv are 1000 and 100, respectively.


### 4.3.1. Trajectory Switching Algorithm in Joint Space

(1) Without Transition Trajectory. Based on the joint space trajectory planning in Section 3.1.1, the simulation of adjustable trajectory in joint space based on human intention is conducted. To plan the round-trip trajectory, five points of the hip and knee joints from A to E need to be planned, respectively. Firstly, trajectory 0 is planned so that the five position points of the hip joint are 10°, 40°, 10°, 40°, and 10° and the five position points of the knee joint are −10°, −45°, −10°, −45°, and −10°. Secondly, a trajectory with larger motion amplitude than trajectory 0, that is, trajectory 1, is planned, so that the five position points of the hip joint are 10°, 50°, 10°, 50°, and 10° and those of the knee joint are −10°, −55°, −10°, −55°, and −10°. Finally, a trajectory with smaller motion amplitude than trajectory 0, that is, trajectory 2, is planned, so that the five position points of the hip joint are 10°, 30°, 10°, 30°, and 10°, and those of the knee joint are −10°, −35°, −10°, −35°, and −10°. Set t1 = t2 = t3 = t4 = 2 s and the observer threshold R = 5 Nm. Then the simulations start, and the results are obtained and shown in Figures 8–10.Figure 8
The actual angle curve of the hip and knee joints.Figure 9
External interaction signal (r).Figure 10
MemoryA.As shown in Figure8, firstly, the hip and knee joints start to move along trajectory 0 with the initial posture angles of 10° and −10°, respectively. At t = 2 s, the hip and knee joints move to the first preset position of trajectory 0, that is, point B (40° and −45°). At this time, the patient imposes an external force on the system, and its amplitude is quickly detected to be approximately 10 Nm and its direction is recognized as positive by the observer, as shown in Figure 9. Since the external torque is in the positive direction, that is, the direction of the external torque is the same as that of the robot and 10 Nm is greater than the observer threshold R, this indicates that the patient wants a larger motion trajectory. But, at t = 2 s, the hip joint angle is 40°, which is not the initial joint angle of 10°, so the robot continues to move along trajectory 0. When t = 4 s, the hip joint moves to the initial position of 10°, and then the flag of the trajectory changes to 1, that is, memory A = 1, as shown in Figure 10. When A switches from 0 (default value) to 1, the trajectory also switches from trajectory 0 to trajectory 1 and starts to move following trajectory 1.Similarly, when the patient wants to reduce the motion amplitude of the joint, one can apply an external interaction force opposite to the motion direction of the robot by hand; that is, att = 7 s, the patient applies an external force in the opposite direction to the exoskeleton. The amplitude is quickly detected to be approximately 10 Nm and its direction is recognized as negative by the observer, which indicates that the patient wants to reduce the motion trajectory. However, the position of the hip joint is not the initial position at this time, so the robot continues to move along trajectory 1. When t = 8 s, the hip joint moves to the initial position again. After being identified, −1 is assigned to the trajectory flag, that is, memory A = −1. Therefore, A switches from 1 to −1, and the joint trajectory also switches from trajectory 1 to trajectory 2.(2) With Transition Trajectory. When the initial positions of the three trajectories are different, that is, there is a certain amount of deviation between the trajectories, the training trajectory will be more general and have a wider range of application scenarios. To achieve a smooth transition between trajectories, transition trajectories are needed. Here, trajectory 0 is the same as trajectory 0 without transition trajectory in Section 4.3.1. For trajectory 1, the five position points of the hip joint are 20°, 60°, 20°, 60°, and 20° and the five position points of the knee joint are −20°, −65°, −20°, −65°, and −20°. For trajectory 2, the five position points of the hip joint are 5°, 25°, 5°, 25°, and 5° and the five position points of the knee joint are −5°, −30°, −5°, −30°, and −5°. The transition trajectory is also based on quintic polynomial. In addition, the start and end points of the transition trajectory meet the requirements that the joint angle, velocity, and acceleration be continuous. Then, by starting the simulations, the results are obtained and shown in Figures 11–13.Figure 11
The actual angle curve of the hip and knee joints.Figure 12
External interaction signal (r).Figure 13
MemoryA.Firstly, the system starts to move along trajectory 0 as shown in Figure11. At t = 6 s, the observer detects an external torque with an amplitude of approximately 10 Nm and a positive direction as shown in Figure 12, which means that the patient applies a positive external torque to the system and wants to switch to a large amplitude trajectory. Therefore, when the hip joint moves to the initial position at t = 8 s, the flag of the trajectory is switched to 1, that is, memory A = 1, as shown in Figure 13. When A switches from 0 to 1, the joint trajectory switches to transition trajectory. Until the system moves along the transition trajectory to the initial position of trajectory 1 at t = 10 s, it starts to move following trajectory 1.Similarly, att = 15 s, the observer detects an external torque with an amplitude of about 10 Nm and a negative direction, which means that the patient applies reverse external torque to the system and wants to reduce the amplitude of the trajectory. When t = 18 s, trajectory 1 moves to the initial position and A switches from 1 to −1. Therefore, the joint trajectory also switches from trajectory 1 to transition trajectory and moves along it to the initial position of trajectory 2 and then starts to move along trajectory 2.


### 4.3.2. Trajectory Switching Algorithm in Cartesian Space

Based on the Cartesian space trajectory planning in Section3.1.2, the adjustable trajectory simulation based on human intention is conducted in the Cartesian space. The main difference between the three trajectories with circular ends is that the diameters of the three circles are different. The diameters of trajectories 0, 1, and 2 are set to d0=0.16m, d1=0.22m, and d2=0.1m, respectively. Other parameters are as follows: R = 5 Nm, φth=45°, φca=−25°, and Tcir = 5 s. The corresponding trajectory equations are as follows:(25)xe0=a+0.5d0cos2πtTcir,ze0=b−0.5d0sin2πtTcir,(26)xe1=a−0.03+0.5d1cos2πtTcir,ze1=b−0.5d1sin2πtTcir,(27)xe2=a+0.03+0.5d2cos2πtTcir,ze2=b−0.5d2sin2πtTcir.It can be analyzed from (25)–(27) that the initial positions of the three trajectories are the same, which benefits realizing the smooth transition of the three trajectories better. By conducting the simulations, the following results can be obtained.The principle of trajectory switching in Cartesian space is the same as that in joint space. Therefore, the simulation results of the trajectory switching algorithm in the Cartesian space are briefly described here. Firstly, the human-robot system performs circular motion of the end point trajectory with a diameter of 0.16 m, that is, trajectory 0. The end displacement and actual joint angle are shown in Figures14 and 15, respectively. At t = 3 s, an external torque with an amplitude of approximately 10 Nm and a positive direction is detected by the observer, as shown in Figure 16. This means that the patient imposes a positive force on the system and wants to expand the diameter of the end circle trajectory. However, at t = 3 s, the hip joint does not return to the initial joint position, so the robot continues to move according to current trajectory 0 until the hip joint moves to the initial joint position at 5 s. At this time, memory A changes to 1, as shown in Figure 17. When A switches from 0 to 1, the trajectory also switches from trajectory 0 to trajectory 1. Then, the end of the robot moves in a circular trajectory with a diameter of 0.22 m, that is, trajectory 1.Figure 14
Displacement at the end.Figure 15
Actual joint angle.Figure 16
External interaction signal (r).Figure 17
MemoryA.Similarly, att = 7 s, the patient applies an external force opposite to the direction of exoskeleton movement. The force is quickly detected by the observer to be approximately 10 Nm in magnitude and negative in the direction, which indicates that the patient wants to reduce the diameter of the end movement trajectory. It is not until the hip joint returns to the initial position at 10 s that −1 is assigned to memory A. When A switches from 1 to −1, the end trajectory of the robot switches from trajectory 1 to trajectory 2. Then, the end of the robot moves in a circular trajectory with a diameter of 0.10 m, that is, trajectory 2.


### 4.3.3. The Comparison of Joint Torque

Because the dynamic parameters of the simulator model are not obtained by the experimental identification, it is difficult to compare the simulation torques with the experimental torques measured from real patients. However, we show an indirect comparison between the simulation torques and the experimental torques which are calculated by using the actual joint position data measured from the exoskeleton and using the dynamic parameters of the simulator. To obtain the actual joint position data, we command the exoskeleton robot to track a Fourier series trajectory [40]. At the same time, the actual joint position data are measured from the exoskeleton robot. Then, we calculate joint velocity and joint acceleration by the central differentiation. After that, we use the joint position, joint velocity, and joint acceleration data as the input of the dynamics equation and output the actual joint torques. As shown in Figure 18, the actual torques (blue-dotted line) are with noise because they are calculated by the actual trajectory data. The simulation torques (red solid line) are without noise because they are calculated by the desired trajectory data. It can be found that the desired torques and the actual torques basically coincide except for some spikes, which is caused by the inaccuracy of the used friction model when the speed is reversed. This is because the used friction model cannot describe the complex joint friction phenomenon at the low joint speed.Figure 18
Actual and expected moments of the hip and knee joints. (a) Hip joint. (b) Knee joint.
(a)(b)


## 4.3.1. Trajectory Switching Algorithm in Joint Space

(1) Without Transition Trajectory. Based on the joint space trajectory planning in Section 3.1.1, the simulation of adjustable trajectory in joint space based on human intention is conducted. To plan the round-trip trajectory, five points of the hip and knee joints from A to E need to be planned, respectively. Firstly, trajectory 0 is planned so that the five position points of the hip joint are 10°, 40°, 10°, 40°, and 10° and the five position points of the knee joint are −10°, −45°, −10°, −45°, and −10°. Secondly, a trajectory with larger motion amplitude than trajectory 0, that is, trajectory 1, is planned, so that the five position points of the hip joint are 10°, 50°, 10°, 50°, and 10° and those of the knee joint are −10°, −55°, −10°, −55°, and −10°. Finally, a trajectory with smaller motion amplitude than trajectory 0, that is, trajectory 2, is planned, so that the five position points of the hip joint are 10°, 30°, 10°, 30°, and 10°, and those of the knee joint are −10°, −35°, −10°, −35°, and −10°. Set t1 = t2 = t3 = t4 = 2 s and the observer threshold R = 5 Nm. Then the simulations start, and the results are obtained and shown in Figures 8–10.Figure 8
The actual angle curve of the hip and knee joints.Figure 9
External interaction signal (r).Figure 10
MemoryA.As shown in Figure8, firstly, the hip and knee joints start to move along trajectory 0 with the initial posture angles of 10° and −10°, respectively. At t = 2 s, the hip and knee joints move to the first preset position of trajectory 0, that is, point B (40° and −45°). At this time, the patient imposes an external force on the system, and its amplitude is quickly detected to be approximately 10 Nm and its direction is recognized as positive by the observer, as shown in Figure 9. Since the external torque is in the positive direction, that is, the direction of the external torque is the same as that of the robot and 10 Nm is greater than the observer threshold R, this indicates that the patient wants a larger motion trajectory. But, at t = 2 s, the hip joint angle is 40°, which is not the initial joint angle of 10°, so the robot continues to move along trajectory 0. When t = 4 s, the hip joint moves to the initial position of 10°, and then the flag of the trajectory changes to 1, that is, memory A = 1, as shown in Figure 10. When A switches from 0 (default value) to 1, the trajectory also switches from trajectory 0 to trajectory 1 and starts to move following trajectory 1.Similarly, when the patient wants to reduce the motion amplitude of the joint, one can apply an external interaction force opposite to the motion direction of the robot by hand; that is, att = 7 s, the patient applies an external force in the opposite direction to the exoskeleton. The amplitude is quickly detected to be approximately 10 Nm and its direction is recognized as negative by the observer, which indicates that the patient wants to reduce the motion trajectory. However, the position of the hip joint is not the initial position at this time, so the robot continues to move along trajectory 1. When t = 8 s, the hip joint moves to the initial position again. After being identified, −1 is assigned to the trajectory flag, that is, memory A = −1. Therefore, A switches from 1 to −1, and the joint trajectory also switches from trajectory 1 to trajectory 2.(2) With Transition Trajectory. When the initial positions of the three trajectories are different, that is, there is a certain amount of deviation between the trajectories, the training trajectory will be more general and have a wider range of application scenarios. To achieve a smooth transition between trajectories, transition trajectories are needed. Here, trajectory 0 is the same as trajectory 0 without transition trajectory in Section 4.3.1. For trajectory 1, the five position points of the hip joint are 20°, 60°, 20°, 60°, and 20° and the five position points of the knee joint are −20°, −65°, −20°, −65°, and −20°. For trajectory 2, the five position points of the hip joint are 5°, 25°, 5°, 25°, and 5° and the five position points of the knee joint are −5°, −30°, −5°, −30°, and −5°. The transition trajectory is also based on quintic polynomial. In addition, the start and end points of the transition trajectory meet the requirements that the joint angle, velocity, and acceleration be continuous. Then, by starting the simulations, the results are obtained and shown in Figures 11–13.Figure 11
The actual angle curve of the hip and knee joints.Figure 12
External interaction signal (r).Figure 13
MemoryA.Firstly, the system starts to move along trajectory 0 as shown in Figure11. At t = 6 s, the observer detects an external torque with an amplitude of approximately 10 Nm and a positive direction as shown in Figure 12, which means that the patient applies a positive external torque to the system and wants to switch to a large amplitude trajectory. Therefore, when the hip joint moves to the initial position at t = 8 s, the flag of the trajectory is switched to 1, that is, memory A = 1, as shown in Figure 13. When A switches from 0 to 1, the joint trajectory switches to transition trajectory. Until the system moves along the transition trajectory to the initial position of trajectory 1 at t = 10 s, it starts to move following trajectory 1.Similarly, att = 15 s, the observer detects an external torque with an amplitude of about 10 Nm and a negative direction, which means that the patient applies reverse external torque to the system and wants to reduce the amplitude of the trajectory. When t = 18 s, trajectory 1 moves to the initial position and A switches from 1 to −1. Therefore, the joint trajectory also switches from trajectory 1 to transition trajectory and moves along it to the initial position of trajectory 2 and then starts to move along trajectory 2.


## 4.3.2. Trajectory Switching Algorithm in Cartesian Space

Based on the Cartesian space trajectory planning in Section3.1.2, the adjustable trajectory simulation based on human intention is conducted in the Cartesian space. The main difference between the three trajectories with circular ends is that the diameters of the three circles are different. The diameters of trajectories 0, 1, and 2 are set to d0=0.16m, d1=0.22m, and d2=0.1m, respectively. Other parameters are as follows: R = 5 Nm, φth=45°, φca=−25°, and Tcir = 5 s. The corresponding trajectory equations are as follows:(25)xe0=a+0.5d0cos2πtTcir,ze0=b−0.5d0sin2πtTcir,(26)xe1=a−0.03+0.5d1cos2πtTcir,ze1=b−0.5d1sin2πtTcir,(27)xe2=a+0.03+0.5d2cos2πtTcir,ze2=b−0.5d2sin2πtTcir.It can be analyzed from (25)–(27) that the initial positions of the three trajectories are the same, which benefits realizing the smooth transition of the three trajectories better. By conducting the simulations, the following results can be obtained.The principle of trajectory switching in Cartesian space is the same as that in joint space. Therefore, the simulation results of the trajectory switching algorithm in the Cartesian space are briefly described here. Firstly, the human-robot system performs circular motion of the end point trajectory with a diameter of 0.16 m, that is, trajectory 0. The end displacement and actual joint angle are shown in Figures14 and 15, respectively. At t = 3 s, an external torque with an amplitude of approximately 10 Nm and a positive direction is detected by the observer, as shown in Figure 16. This means that the patient imposes a positive force on the system and wants to expand the diameter of the end circle trajectory. However, at t = 3 s, the hip joint does not return to the initial joint position, so the robot continues to move according to current trajectory 0 until the hip joint moves to the initial joint position at 5 s. At this time, memory A changes to 1, as shown in Figure 17. When A switches from 0 to 1, the trajectory also switches from trajectory 0 to trajectory 1. Then, the end of the robot moves in a circular trajectory with a diameter of 0.22 m, that is, trajectory 1.Figure 14
Displacement at the end.Figure 15
Actual joint angle.Figure 16
External interaction signal (r).Figure 17
MemoryA.Similarly, att = 7 s, the patient applies an external force opposite to the direction of exoskeleton movement. The force is quickly detected by the observer to be approximately 10 Nm in magnitude and negative in the direction, which indicates that the patient wants to reduce the diameter of the end movement trajectory. It is not until the hip joint returns to the initial position at 10 s that −1 is assigned to memory A. When A switches from 1 to −1, the end trajectory of the robot switches from trajectory 1 to trajectory 2. Then, the end of the robot moves in a circular trajectory with a diameter of 0.10 m, that is, trajectory 2.


## 4.3.3. The Comparison of Joint Torque

Because the dynamic parameters of the simulator model are not obtained by the experimental identification, it is difficult to compare the simulation torques with the experimental torques measured from real patients. However, we show an indirect comparison between the simulation torques and the experimental torques which are calculated by using the actual joint position data measured from the exoskeleton and using the dynamic parameters of the simulator. To obtain the actual joint position data, we command the exoskeleton robot to track a Fourier series trajectory [40]. At the same time, the actual joint position data are measured from the exoskeleton robot. Then, we calculate joint velocity and joint acceleration by the central differentiation. After that, we use the joint position, joint velocity, and joint acceleration data as the input of the dynamics equation and output the actual joint torques. As shown in Figure 18, the actual torques (blue-dotted line) are with noise because they are calculated by the actual trajectory data. The simulation torques (red solid line) are without noise because they are calculated by the desired trajectory data. It can be found that the desired torques and the actual torques basically coincide except for some spikes, which is caused by the inaccuracy of the used friction model when the speed is reversed. This is because the used friction model cannot describe the complex joint friction phenomenon at the low joint speed.Figure 18
Actual and expected moments of the hip and knee joints. (a) Hip joint. (b) Knee joint.
(a)(b)


## 5. Discussion

We assume that human leg is one part of the exoskeleton in this paper, and there is no or small (negligible) interaction force between human leg and the exoskeleton. This assumption is reasonable to a certain extent. Generally, in the process of passive rehabilitation training, human legs do not need to exert force, because human leg is completely driven by the movement of the exoskeleton. Secondly, the exoskeleton designed in this paper has a binding structure, which can firmly bind human leg and the exoskeleton to prevent separation during movement. Based on these assumptions, this paper puts human leg and the exoskeleton together for dynamic modeling, that is, the dynamics of the human-exoskeleton system. For example, the mass of human leg plus the mass of the exoskeleton is the mass of the human-exoskeleton system. If the patient's leg exerts a large force on the exoskeleton, it will affect the accuracy of the external torque estimation of the observer. However, just as the previous assumption, this paper considers that human leg is a part of the exoskeleton; therefore, there is no or small (negligible) interaction force between human leg and the exoskeleton.Through the external torque estimation based on momentum observation, the exoskeleton can realize external torque perception. Then, combined with the designed rehabilitation training trajectory switching strategy, the exoskeleton can understand the patient's intention, thereby realizing a more intelligent rehabilitation training interaction mode. The proposed strategy enables the exoskeleton robot to have more intelligent interaction ability. In the simulation case, the default is no disturbances such as measurement noise and modeling errors, and the simulation results are very good. In real-world applications, the influence of measurement noise on the proposed control strategy in this paper can be reduced by some filtering algorithms. The modeling errors (especially the accuracy of the friction model) will have a certain impact on the proposed control strategy, such as affecting the accuracy of external torque estimation. However, this problem is common in robot control. In fact, in real-world applications, readers can consider more accurate friction models, such as nonlinear friction models [41], to improve the accuracy of the dynamic model and the accuracy of external torque estimation.The dynamics of the human-exoskeleton system in this paper need to be identified to adapt to different individuals. Because the leg’s mass for different patients is different, which leads to the different dynamics of the human-exoskeleton system, we can adopt the static identification method in [42] to identify the dynamics of the human-exoskeleton system. This method only needs to collect the joint data of the human-exoskeleton system in different static positions. It is beneficial to ensure the safety of the patient during the identification process and is suitable for parameter identification of the human-exoskeleton system. This is one part of our future work. In addition, in terms of structure, at the hip and knee joints, we designed a telescopic structure that can adjust the length of the exoskeleton to adapt to the length of the legs of different individuals. We also adopted a soft strap construction that adapts to the width of the legs.The goal of the system is to allow patients to choose suitable rehabilitation training trajectories according to their intentions. This can motivate the patient's training initiative, avoid single training mode, and enrich the training contents. Assuming that the exoskeleton hardware is feasible, the algorithm proposed in this paper only relies on the dynamics of the human-exoskeleton system. Therefore, the algorithm can be implemented when the dynamic model and dynamic parameters of the human-exoskeleton system are known. The dynamics of the human-exoskeleton system can be obtained through experimental identification. The theory of dynamic identification is relatively mature, which is also the future work of this paper. Indeed, the dynamic model identification is a complex process that needs large work to do. It is for this main reason that only the simulation results are given in this paper. The simulation results have also verified the effectiveness of the proposed algorithm. In future work, we will calibrate the dynamic parameters of the human-exoskeleton system and then conduct rehabilitation training experiments based on the calibrated dynamic parameters of the human-exoskeleton system.


## 6. Conclusion

In this paper, a rehabilitation training interactive method for lower limb exoskeleton robot based on patient's intention is proposed. The proposed method allows the patient to adjust the movement trajectory according to their intention. The implementation method is that the patient applies external interaction force to the human-robot system by hand. The participation and enthusiasm of patients in training can be mobilized. In addition, adjustable trajectories with different amplitudes are designed in joint space and Cartesian space, respectively. When the patient intends to adjust the amplitude of current trajectory, the amplitude can be increased or decreased. Moreover, taking the joint space as an example, smooth switching between trajectories with different initial points is also achieved through adding transition trajectories, which makes trajectory switching more applicable. Furthermore, external interaction force is detected by the classical momentum observer. Finally, the simulation of trajectory planning and switching in both joint space and Cartesian space are carried out. In joint space trajectory planning, the velocity and acceleration of the initial point and the end point are 0, and the acceleration curve is smooth. Trajectory planning in Cartesian space can simulate common trajectories that happen in life and make up for trajectories that cannot be achieved in joint space planning. Trajectory planning in Cartesian space and joint space can enrich rehabilitation trajectories. The simulation results of trajectory planning prove the rationality of training trajectory. Once an external force of 10 Nm is applied to the system, the observer can quickly identify the magnitude of the external force as approximately 10 Nm and determine its direction. Comparing the external force of 10 Nm with the preset threshold R, if R is less than or equal to 10 Nm, or −R is larger than or equal to 10 Nm, then it means that the trajectory will be switched to another trajectory. The simulation results of trajectory switching show the effectiveness of the proposed strategy.



---

*Source: 2429832-2022-04-20.xml*