## 5 Three-Dimensional Motion Planning Algorithm
### Results
#### 5.2.3 Testing and Examples  
In this section, we present statistical results for 50,000 cases examining the model's performance, accompanied by visual examples that illustrate the differences in accuracy and time efficiency between the two models. The results presented in Table 3 demonstrate the effectiveness of incorporating the Jacobian method as a complementary step subsequent to the network's output. This method reduced the average error across 50,000 examples without significantly impacting task execution time. This approach has several notable advantages. The first is that by terminating the network training relatively early, we can prevent overfitting of the data while still achieving a low error rate.  
Moreover, in scenarios where time constraints are crucial, the network brings us closer to the target points, and the subsequent application of the Jacobian method fine-tunes the angles to attain maximum accuracy with minimal impact on the overall task completion time. By using this approach, we reduced the average error to 0.28 mm (a reduction of 95%) for the model without time constraints, and to an average of 0.66 mm for the model with time constraints (a reduction of 77%). We observed that the modifications to the angles had a minimal impact (an increase of 0.82%) on the time required to perform the task, making this a robust solution. This combined strategy ensured improved accuracy without compromising efficiency.  
Figure 13 depicts the algorithm's successful attainment of an arbitrary target point from a non-zero initial configuration. In this example, the robot's initial joint angles were [\(-\)15.5, 7.5, 34.7, 46.8] degrees, and the gripper was positioned 37 cm from the first joint. The target was located at coordinates (55, 0, 50) cm. These parameters were entered into the algorithm. The resultant solution demonstrates the advantage of this type of optimization. For the model focusing solely on accuracy (Model I), the final joint angles were [93.2, \(-\)27.2, 36.4, 11] degrees, and the gripper's position was 72 cm along the arm (Figure 13A). The actuator made significant adjustments to three out of the four joints, reaching the target with an error of only 0.0052 mm in 6.9 s. While this error is by far smaller than the accuracy of the robot, it demonstrates the efficiency of the algorithm. On the other hand, for the model that optimizes for both precision and time (Model II), the final joint angles were [93.2, 7.5, 34.7, 45.1] degrees, and the gripper's position was 85 cm along the arm (Figure 13B). In this scenario, the MA operated efficiently, and only significantly made a change in the first joint, and it reached the target with an accuracy of 0.06 mm in a single second. This resulted in a notable time-save of approximately 5 s.  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **NN** & \multicolumn{2}{c}{**NN + Jacobian**} \\  & **Model I** & **Model II** & **Model I** & **Model II** \\ \hline Mean error \(\overline{z}\) (mm) & 2.8 & 5.5 & 0.66 & 0.28 \\ Mean time \(\overline{\tau}\) (s) & 10.2 & 7.3 & 10.6 & 7.91 \\ \(\overline{z}\) \(<\) 1 mm (\%) & 80 & 73 & 98 & 95 \\ \hline \hline \end{tabular}
\end{table}
Table 3: Testing the results of 50,000 unseen examples.