## 4 Discussion
Even though the NN seems capable of managing this noise during the training, Figure 7 also shows that the best results are obtained when the noise is zero--or almost zero with an RMSE of 0.86, 1.8 times lower than when the noise exceeds 0.5 degrees. Figure 8 and Table 4 reiterate the interest in using an NN as a feedforward compensation in the control structure, applying both the INN and GNN methods to a real 3D-printed robotic arm. Both methods allow an RMSE of less than 2 degrees for all tested configurations during the trajectory tracking on the real physical robot arms. These results are consistent with the errors observed in the simulated model and the errors of the system in [4], i.e., over a 50% improvement for multi-joint trajectories and 40% for random joint trajectories. In fact, in Table 4, the use of the INN method demonstrates a 76% to 96% reduction in errors across all tested configurations. This result matches the simulation results of Figures 3B and 4 with an 80% to 90% in tracking errors and is better than the 40% improvement for random joint trajectories in [4]. This difference is likely due to the type of robot used--a flexible Baxter robot. In [5], where an industrial ABB robot is used, an 80% to 90% reduction has also been reported compared to the reference PD controller alone. Note that the aim of the INN and the GNN methods is not to outperform the accuracy of control structures that include accurate dynamic models when available but rather to offer a simple and reliable way to accurately track desired trajectories. Specifically, Figure 8A,B show that the improvement is even more significant for faster trajectories, where the PD controller alone is less accurate than slower trajectories, with a 96% and an 84% reduction for the fastest speed vs. a 76% reduction for the slowest trajectories. Significantly, the INN method achieves an RMSE under 1 degree across all configurations. This result is better than the accuracy of all control structures tested in [5], which had RMSE values between 2.14 and 2.62 degrees, while also using a smaller number of parameters in the NN architectures--1 neuron per motor vs. at least two layers of 50 neurons. The experimental results in Figure 8 also show that the GNN method does not outperform the accuracy of the INN method. These results are consistent with the decoupled joint dynamics, i.e., the dynamics of the servomotors prevail over the dynamics of the robotic arm due to the real reduction ratio of the servomotors (1/540). Finally, the experimental results confirm the main results from the simulated model on a real system: the INN method requires two to three times less data than the GNN method to effectively learn the dynamics. A guide summarizing the conclusions of this study for designing a neural network-based control structure for position control is presented in Table 5.  
**Step 1--Tune the Gains of the PD Controller. **  
Tune the gain values of the PD controller to allow the best accuracy possible for the controller, using either recommendations of motor manufacturers when available or tuning methods from the literature. _Applied to the real systems: the custom parameters were based on the recommendation of the manufacturer._  
**Step 2--Choose between INN and GNN methods. **  
Estimate the ratio \(J_{\text{m}}/(RMR)\) (see a suggested method in Appendix A). Refer to the cases below. \begin{table}
\begin{tabular}{c} \hline \hline
**Step 1–Tune the Gains of the PD Controller.** \\ \hline Tune the gain values of the PD controller to allow the best accuracy possible for the controller, \\ using either recommendations of motor manufacturers when available or tuning methods from the literature. \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Guide for the design of a neural network-based control structure for position control, followed by an example of its application on the real 3- and 5-DOF systems. The main limitation of this study is that the control structure has been designed for fast trajectory tracking involving large movements and accelerations.