## 4 Discussion
In fact, when the step time of the data used for training corresponds to the PD frequency, the RMSE is twice as low compared to scenarios where the step time is 10 times smaller than the PD frequency. However, to enable the neural network to effectively learn the dynamics of the PD controller, sufficient resolution in the data is required. Particularly, the motor should be able to complete at least 20 encoder steps between 2 consecutive time steps. Thus, the resolution of the encoders can limit the step time of the dataset. To our knowledge, none of the existing literature addresses the impact of the PD frequency on the tracking accuracy and the requirements for encoder resolution for this control structure. Figure 6 also shows that the more accurate the PD controller, the more accurate the NN-based control structure. Thus, it is strongly recommended to optimize the gain of the PD controller before starting the training process, to ensure the best accuracy for the control structure without the feedforward neural network. In fact, the relative accuracy of the NN-based control structure compared to the PD controller alone remains stable regardless of the accuracy of the PD controller. The tuning can be performed by using manufacturer recommendations when available or through classical tuning methods from the literature. Table 3 indicates that a necessary condition for the successful use of the GNN method is that the number of neurons in each layer should be larger than or equal to the number of motors in the system for proper convergence. When this condition is not met, the global NN is forced to express the dynamics of multiple motors in one neuron, which is insufficient to accurately represent the joint dynamics. To our knowledge, the current study is the first one to provide guidelines on the minimal size required for the NN architecture to efficiently learn dynamic compensation. Furthermore, Table 3 shows that, theoretically, when the INN method is used, each neural network may require only a single neuron. In fact, the RMSE comparison for trajectory tracking has shown that when this condition is met, there is no significant difference in accuracy--less than 10 percent--regardless of the NN size. This aligns with the results from [5], which tested various NN sizes, showing no significant performance differences. The best accuracy was achieved with one of the smallest tested architectures. This result encourages the use of minimal neural networks to limit the number of parameters and improve the convergence process. Compared to other NN-based control structures in the literature, the smallest NN presented in Figure 4B achieves an accuracy comparable to larger networks while requiring only 15 parameters for the entire 3-DOF robot arm--5 parameters per motor. This is 67 times fewer than the system described in [4] and 6700 times fewer than the architecture in [23] that operates at the torque level. This allows a proportional diminution of the calculation time, allowing for increased frequency of the control structure and performance. In the same way, when the GNN method is used, the NN should obtain at least as many neurons as there are joints in the system (on each layer). Note that in real systems, it can be necessary to repeat the training process of the NN to achieve convergence, so it is possible to gradually increase the number of neurons and the number of layers until having a good convergence. Finally, Figure 7 shows that while not critical, it is good practice to use the highest possible encoder resolution to limit the noise in the data. Although a significant noise--more than 0.5 degrees--does not prevent the control structure from improving the trajectory tracking, with an RMSE ranging from 1.4 to 1.65 degrees (five times lower than the PD controller), lower noise levels yield better results.