## 4 Joint Space Trajectory Planning Based on Improved Quantum Particle Swarm Optimization
### Example 3: Motion Planning for 4 SPRR-SPR Parallel Robot  
Figures 9 and 10 illustrate the target motion path and the end actuator of a 4 SPRR-SPR parallel robot, respectively. The motion planning approach in the driving limb space can enhance the stability of the driving limb motion while simultaneously achieving position and posture control of the robot. The improved QPSO algorithm is utilized to plan the spatial trajectory of the parallel robot driving limb. The position and posture of the target motion path are sampled based on the motion performance parameters of the robot, followed by the solution of inverse kinematics for the sampled position and posture. The acceleration, speed, and position of the driving limb obtained from the inverse kinematics planning are computed, and the motion of each driving limb is depicted in Figures 11 and 12. \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \(p_{\mathbf{k}}\) & \(v_{\mathbf{k}}\) & \(a_{k}\) & \(p_{\mathbf{k+1}}\) & \(v_{\mathbf{k+1}}\) & \(a_{\mathbf{k+1}}\) & \(v_{\mathbf{max}}\) & \(a_{\mathbf{max}}\) & \(j_{\mathbf{max}}\) \\ \hline
100 & 300 & \(-\)350 & \(-\)800 & \(-\)50 & 0 & 800 & 400 & 200 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Track planning parameter setting. Figure 7: Convergence curve of the improved QPSO joint space trajectory planning. Figure 8: Comparison of the track planning effects. Figure 11 indicates that the motion of each driving limb is virtually identical to the target motion sampling results after planning, and the motion synchronization of each driving limb is ensured, thereby reducing the loss of motion accuracy of the robot end actuator caused by the asynchronization of the driving limb. Therefore, the efficacy of driving limb space trajectory planning utilizing the improved QPSO algorithm is validated. By employing a smoothing spline to interpolate the sampling data of the driving limb and the corresponding time, the position of each driving limb at the same time as the trajectory planning outcome is calculated as the ideal trajectory of the driving limb at each time. The error of trajectory planning results is obtained, as illustrated in Figure 12. Through trajectory planning, the position error magnitude of each driving limb is \(10^{-3}\) mm, which conforms with the actual requirements of the control process. As such, it is clear that the trajectory planning method based on the improved QPSO algorithm can guarantee the accuracy of the results. Taking driving limb 1 as an example, the speed, acceleration, and acceleration curves obtained after trajectory planning are shown in Figures 13-15. It can be seen from Figure 13b that in the process of motion that during the motion process, the motion speed of the driving limb is relatively smooth, and the motion speed is continuous and derivable without noticeable mutation. As shown in Figures 13a and 14, the limit speed value and the limit acceleration value of the whole motion process after planning fall within the allowable range of the motion performance of the parallel robot. Figure 10: Moving platform target trajectory. Figure 9: The 4 SPRR-SPR parallel robot. Figure 11: Space trajectory planning results of the parallel robot driver. Figure 12: Cont. Figure 15 demonstrates that, while setting the allowable acceleration range, the planned acceleration speed is strictly limited within the range, and its limit value is precisely the upper and lower limit of the set range. This highlights that the optimization calculation process based on the improved QPSO algorithm ensures the reliability of the constraint conditions. In practical applications, to avoid extreme situations, a safety factor can be set, and the allowable range of the robot performance can be established to ensure the stability of the actual operation effect. According to the trajectory planning results depicted in Figure 11, the position and posture of the moving platform of the robot at each time can be obtained based on the length of the driving limb of the parallel robot at each time.