# Research of Flexible Assembly of Miniature Circuit Breakers Based on Robot Trajectory Optimization
## 5 Algorithm Simulation  
As shown in Figure 10, the flexible assembly performed of MCB parts can be divided into four operating sections: section AB represents the robot moving from the initial position to the loading area; section BC represents the robot gripping a part and placing it on the adjustment rack; section CD indicates the robot adjusting the part to a fixed posture for assembly on the adjustment rack; section DE indicates the robot arm placing the adjusted part on the positioning carrier. This paper takes section AB as an example for optimization verification. The interpolation points and interpolation times of the six joints are shown in Tables 2 and 3, and the joint kinematic constraints are shown in Table 4. During the process of section AB, joint 4 has no angular deflection, so the angle difference is 0 degrees. The position, velocity, acceleration, and jerk interpolation curves of the six joints calculated by the first quintic polynomial interpolation are shown in Figure 11. In Figure 11, The oscillations of the position, speed, and acceleration curves are expected to be continuous and smooth. Meanwhile, the maximum values of the speed, acceleration, and jerk oscillations are expected to be as close to the constraint values as possible, to achieve a higher performance. Figure 11a shows that the quintic polynomial interpolation curve passes the given interpolation points \(X_{1}\), \(X_{2}\), \(X_{3}\), \(X_{4}\) and is continuously smooth during \(t_{1}\), \(t_{2}\), and \(t_{3}\), which proves the effectivity of the fifth-degree polynomial interpolation. Figure 11b-d show that the unoptimized speed, acceleration, and jerk curves are continuous, and the peaks meet the constraints Table 4, but the maximum values of the oscillations are much smaller than the constraint values. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Joint/\(i\)** & **Joint 1** & **Joint 2** & **Joint 3** & **Joint 4** & **Joint 5** & **Joint 6** \\ \hline \(p/(^{\circ})\) & \(-43.7\) & \(-58.3\) & \(-30.6\) & \(0.00\) & \(-33.6\) & \(135.3\) \\ \(v/(\text{rad}/\text{s})\) & \(0.90\) & \(0.90\) & \(0.90\) & \(0.90\) & \(0.95\) & \(1.00\) \\ \(a/(\text{rad}/\text{s}^{2})\) & \(0.90\) & \(0.90\) & \(0.90\) & \(0.90\) & \(0.90\) & \(1.00\) \\ \(a^{\prime}/(\text{rad}/\text{s}^{3})\) & \(2.00\) & \(2.00\) & \(2.00\) & \(2.00\) & \(2.00\) & \(2.00\) \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Joint kinematic constraints. Figure 10: Schematic diagram of robot segmentation. \begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Point/\(X_{i}\)** & **Joint 1** & **Joint 2** & **Joint 3** & **Joint 4** & **Joint 5** & **Joint 6** \\ \hline \(X_{1}/(^{\circ})\) & \(0\) & \(-35.1\) & \(-29.8\) & \(0\) & \(-25.1\) & \(0\) \\ \(X_{2}/(^{\circ})\) & \(-24\) & \(-37.7\) & \(-30.6\) & \(0\) & \(-21.7\) & \(23.96\) \\ \(X_{3}/(^{\circ})\) & \(-43.7\) & \(-52.2\) & \(-4.14\) & \(0\) & \(-33.6\) & \(135.3\) \\ \(X_{4}/(^{\circ})\) & \(-30\) & \(-58.3\) & \(-2.11\) & \(0\) & \(-29.6\) & \(125\) \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Interpolation points of the joints. To compare and verify the optimization results, the proposed optimization algorithm is compared with the standard PSO, genetic algorithm (GA), and chaotic optimization algorithm (COA). The chaotic optimization algorithm designed two different optimization spaces, and the comparison results are shown in Figure 12, which shows that the improved PSO converges to the optimal at the 8 th iteration, the standard PSO converges to the optimal value at the 33 rd iteration, the genetic algorithm converges to the optimal at the 17 th iteration, and the COA with optimization space sizes of 100 and 200 converges to the optimal value at the 20 th and 56 th iteration, respectively. Hence, the improved PSO is about 76% faster than the standard PSO, 53% faster than the genetic algorithm, and 60% and 85.7% faster than the chaos algorithm.