# Kinematic Analysis and Motion Planning of Cable-Driven Rehabilitation Robots
## 4 Trajectory Planning  
### Adaptive S-Shaped Speed Curve  
To improve the rehabilitation effect of patients, it is necessary to adopt different rehabilitation training modes, reasonably plan rehabilitation actions, and carry out targeted rehabilitation training. Because leg length varies from person to person, it is necessary to carry out trajectory planning in joint space, and then map to the cable length space of the system through kinematics theory. The adaptive S-shaped speed curve can reduce the impact on the control process during the movement of the robot, the whole process is relatively flexible, and the whole curve has seven stages [39]. The adaptive S-shaped speed curve adaptively adjusts the value of each time according to the parameters. Suppose we know that the maximum speed \(\zeta_{\text{P}}\), the maximum acceleration \(\zeta_{\text{a}}\) and the total running time \(T\) during the movement, the initial displacement is \(l_{  
The fifth-order polynomial planning method based on the S-shaped curve is now used for hip joint spatial trajectory planning. Figure 6 shows the velocity and acceleration curves of joint 1 and joint 2 under three paths: Figure 6a,b is path one, Figure 6c,d is path two, and Figure 6e,f is path three. The joint angular velocity and acceleration on each path are within the constrained maximum joint angular velocity and acceleration range, and the start and end parts slowly transition to the final value. The middle section is a constant speed section, the whole process is relatively smooth, and there is no jitter phenomenon, which is beneficial to improve the comfort of the recovered person. Figure 7 shows the curve of the cable acceleration change under the S-shaped speed curve. The acceleration peak is large, and the smoothness of the curve is poor. Figure 8 shows  
Figure 8: _Cont._  
Figure 6: Joint velocity and acceleration under three paths: (**a**) Joint velocity of path one; (**b**) Joint acceleration of path one; (**c**) Joint velocity of path two; (**d**) Joint acceleration of path two; (**e**) Joint velocity of path three; (**f**) Joint acceleration of path three. Figure 7: S-shaped acceleration of cables. The significant optimality criteria for trajectory planning are minimum jerk and minimum energy. As the control of jerk coincides with the torque rate control, the jerk can affect the smoothness of the trajectory [40]. Reducing the jerk will lead to a smoother trajectory [41]. Limiting the jerk of the trajectory contributes to extend the life of the robot and improves tracking accuracy. The rehabilitation training process requires that the trajectory is smoother and stable and that the energy consumed by the motors is as small as possible. Smooth trajectory is easier to track and reduces the stresses to the actuators. The smoother trajectory can also improve the rehabilitation effect. Reducing energy consumption can achieve the purpose of energy saving. Similar to the work in [42], the index to measure the smoothness of the trajectory is introduced, as shown in Equation (35). The objective function is the time integral of the squared cable jerk throughout the motion. The smaller the index values are, the smoother the trajectory. The energy consumption of the motors is mainly used to drive the change of the cables. Equation (36) is an index that measures the amount of energy consumed by motors. The objective function is the time integral of the squared cable acceleration throughout the motion. The smaller the index values are, the smaller the energy consumption. \[S_{1}=\sum\limits_{l=1}^{N}\sqrt{\frac{1}{H}\int\limits_{0}^{H}{L_{\dot{\mu}} }^{2}dt} \tag{35}\]  
\[S_{2}=\sum\limits_{l=1}^{N}\sqrt{\frac{1}{H}\int\limits_{0}^{H}{L_{\dot{\mu}} }^{2}dt} \tag{36}\]  
Figure 8: The cable length change based on the fifth-order polynomial of the S-shaped curve: (**a**) Length variation of cables; (**b**) Velocity variation of cables; (**c**) Acceleration variation of cables.