# Time-Optimal Trajectory Planning for Woodworking Manipulators Using an Improved PSO Algorithm
## 3 Experiments and Results
### Time Optimization Experiment of Woodworking Manipulator  
Time Optimization experiments were conducted on the four joints of woodworking manipulator to optimize runtime. The woodworking manipulator passed through four path points A, B, C, and D. The corresponding joint position and joint angle were obtained through the inverse kinematics of Section 2.1, as shown in Table 4. The basic PSO, Gold-SA and algorithms proposed in this paper were selected for time-optimal trajectory planning. For each algorithm, the population size was set to 50, the maximum iterations were 300, the maximum velocity of joints 1 and 2 was 0.6 m/s, the maximum acceleration was 0.8 m/s\({}^{2}\), the maximum velocity of joints 3 and 4 was 1.8 rad/s, the maximum acceleration was 2.4 rad/s\({}^{2}\), and the particle position range was constrained at [1,5]. Under velocity and acceleration limitations, the total optimal interpolation time and the three-stage interpolation time for each joint were recorded in Table 5. The shortest \(T_{\text{total}}\) and maximum \(t_{i}\) of each joint are highlighted in bold. \begin{table}
\begin{tabular}{l l l l l l} \hline \hline  & **Function** & **PSO** & **CFPSO** & **SPSO** & **Gold-SA** & **GoldS-PSO** \\ \hline \multirow{3}{*}{\(F_{4}\)} & Mean & \(3.58749\times 10^{1}\) & \(0.12009\times 10^{1}\) & \(0.53438\times 10^{1}\) & \(6.3772\times 10^{-5}\) & **3.0695 \(\times\) 10\({}^{-5}\)** \\  & Best & \(2.7984\times 10^{1}\) & \(5.26\times 10^{-1}\) & \(0.4776\times 10^{1}\) & \(2.7074\times 10^{-7}\) & **2.3277 \(\times\) 10\({}^{-7}\)** \\  & Std & \(0.49812\times 10^{1}\) & \(4.6943\times 10^{-1}\) & \(4.2675\times 10^{-1}\) & \(1.6428\times 10^{-4}\) & **3.52212 \(\times\) 10\({}^{-5}\)** \\ \hline \multirow{3}{*}{\(F_{5}\)} & Mean & \(1.5867973\times 10^{3}\) & \(0.75091\times 10^{1}\) & \(1.3191\times 10^{-1}\) & \(4.141\times 10^{-5}\) & **2.9164 \(\times\) 10\({}^{-5}\)** \\  & Best & \(1.0118771\times 10^{3}\) & \(0.28872\times 10^{1}\) & \(2.3587\times 10^{-2}\) & \(3.9512\times 10^{-6}\) & **1.0577 \(\times\) 10\({}^{-6}\)** \\  & Std & \(3.269182\times 10^{2}\) & \(0.38832\times 10^{1}\) & \(7.6126\times 10^{-2}\) & \(5.6872\times 10^{-5}\) & **2.3199 \(\times\) 10\({}^{-5}\)** \\ \hline \multirow{3}{*}{\(F_{6}\)} & Mean & \(0.38518\times 10^{1}\) & \(0.16354\times 10^{1}\) & \(7.8752\times 10^{-15}\) & **8.8818 \(\times\) 10\({}^{-16}\)** & **8.8818 \(\times\) 10\({}^{-16}\)** \\  & Best & \(0.35918\times 10^{1}\) & \(7.1535\times 10^{-1}\) & \(4.4409\times 10^{-15}\) & **8.8818 \(\times\) 10\({}^{-16}\)** & **8.8818 \(\times\) 10\({}^{-16}\)** \\  & Std & \(1.15\times 10^{1}\) & \(4.6235\times 10^{-1}\) & \(6.4863\times 10^{-16}\) & **0** & **0** \\ \hline \multirow{3}{*}{\(F_{7}\)} & Mean & \(8.6704\times 10^{-1}\) & \(5.0136\times 10^{-2}\) & \(1.1211\times 10^{-1}\) & **0** & **0** \\  & Best & \(7.7332\times 10^{-1}\) & \(1.5054\times 10^{-2}\) & **0** & **0** & **0** \\  & Std & \(4.6326\times 10^{-2}\) & \(2.0134\times 10^{-2}\) & 2.6264 \(\times\) 10\({}^{-1}\) & **0** & **0** \\ \hline \multirow{3}{*}{\(F_{8}\)} & Mean & \(0.56774\times 10^{1}\) & \(3.2971\times 10^{-1}\) & \(0.31016\times 10^{1}\) & **9.1171 \(\times\) 10\({}^{-5}\)** & 9.823\(\times\) 10\({}^{-5}\) \\  & Best & \(0.30884\times 10^{1}\) & \(1.4755\times 10^{-1}\) & \(0.26321\times 10^{1}\) & **1.0629 \(\times\) 10\({}^{-7}\)** & \(1.3947\times 10^{-77}\) \\ \cline{1-1}  & Std & \(8.3954\times 10^{-1}\) & \(1.0153\times 10^{-1}\) & \(3.8235\times 10^{-1}\) & \(2.5837\times 10^{-4}\) & **1.0078 \(\times\) 10\({}^{-4}\)** \\ \hline \hline \end{tabular}
\end{table} 
Table 3: _Cont._ \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Joint** & **A** & **B** & **B** & **D** \\ \hline
1 & 0.800 m & 0.578 m & 0.688 m & 0.459 m \\
2 & 1.200 m & 0.868 m & 0.567 m & 0.964 m \\
3 & 3.141 rad & 1.897 rad & 1.468 rad & 2.355 rad \\
4 & 0.000 rad & 1.047 rad & 1.771 rad & 0.754 rad \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Four joint positions and angle of path points.