## 6 Discussion  
The generalized results of self-collision detection of two manipulators based on the classification ANN are summarized in Table 16. The graph of the error variation is shown in Figure 26. It should be noted once again that the characteristics of the most significant networks obtained during the design process are given in this paper. Analyzing the obtained results, we can conclude that for correct operation and real application of the ANN, it is necessary to train them on a sufficiently large sample of input data, and the more input analyzed features, the higher the complexity of the network, the larger the sample should be. A comparative analysis between the cross-validation method and the holdout method was performed. In spite of all the advantages of the cross-validation method for the considered problem of controlling the self-collision of multilink manipulators, the holdout method showed the best results. The classification ANN can be applied to the collision detection solution, but even though the error is small, we still cannot neglect it because sooner or later it will lead to collision and damage the mechanism. Figure 25: The experimental results SAR-401: (**a**) Matlab model; (**b**) simulator; (**c**) real robot. As mentioned above and in [7], experimental approaches are often used when designing the ANN because of the difficulty in finding the global extremum. In [14], it is shown that by constructing an efficient ANN configuration, a complex solution can be obtained that allows us to solve IKP and the self-collision control problem simultaneously with a high degree of speed and accuracy, either based on the solution of a regression problem or a classification problem. \begin{table}
\begin{tabular}{c c c c c c} \hline \hline \multirow{2}{*}{\(\mathbf{N}\)**Network**} & \multicolumn{4}{c}{**Prediction Error**} & \multirow{2}{*}{**Notes**} & \multirow{2}{*}{**Conclusion**} \\ \cline{2-2} \cline{5-6}  & **Training** & **Test** & **Random** & & **Nodes** & **Conclusion** \\  & **Sample** & **Sample** & **Sample** & & & \\ \hline \multirow{3}{*}{Network 1} & \multirow{3}{*}{41.17\%} & \multirow{3}{*}{62.5\%} & \multirow{3}{*}{92.94\%} & A basic network with one layer and 10 neurons in it was used & Bad result, on a random dataset \\  & & & & & \\ \hline \multirow{3}{*}{Network 2} & \multirow{3}{*}{41.1\%} & \multirow{3}{*}{50\%} & \multirow{3}{*}{81.5\%} & Increased the number of neurons in the hidden layer to 47 & Bad result, on a random dataset \\  & & & & & \\ \hline \multirow{3}{*}{Network 3} & \multirow{3}{*}{30.33\%} & \multirow{3}{*}{33.76\%} & \multirow{3}{*}{36\%} & \multirow{3}{*}{Increased dataset} & 36\% incorrect results, a change in the network is needed \\  & & & & & \\ \hline \multirow{3}{*}{Network 4} & \multirow{3}{*}{34.07\%} & \multirow{3}{*}{38.15\%} & \multirow{3}{*}{36\%} & Adding a third class & 36\% incorrect results, a change in the network is needed \\  & & & & & \\ \hline \multirow{3}{*}{Network 5} & \multirow{3}{*}{0\%} & \multirow{3}{*}{0\%} & \multirow{3}{*}{5\%} & Changing the cross-validation training method & Received retraining \\ \hline \multirow{3}{*}{Network 6} & \multirow{3}{*}{1.8\%} & \multirow{3}{*}{2.57\%} & \multirow{3}{*}{5.10\%} & Changing the cross-validation training method & \multirow{3}{*}{Good result training method} \\  & & & & & \\ \hline \multirow{3}{*}{Network 7} & \multirow{3}{*}{1.50\%} & \multirow{3}{*}{1.84\%} & \multirow{3}{*}{2\%} & \multirow{3}{*}{dataset increase} & Best result \\  & & & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 16: The generalized results of self-collision detection. Figure 26: The graph of the error variation. Let us also evaluate the time characteristics.