## 3 ANN Training Parameters  
### The Input Data  
At the initial stage of the ANN design, the dataset on which the network will be trained is prepared. Since coordinates in space and end-effector rotation position are mainly used in robot control, it is necessary to know at which positions of two manipulators at certain coordinates a collision will occur.  
Taking into account the choice made in [7; 14], we will feed to the input of the ANN elements of the transformation matrix.  
As a result, a vector \(X_{i}\) is the input of the ANN.  
\[\begin{array}{ll}X_{i}=&\left[Ln_{x}\,Ln_{y}\,Ln_{z}\,L_{0x}\,L_{y}\,L_{z} \,La_{x}\,La_{y}\,La_{z}\,Lx\,Ly\,Lz\,\ldots\right.\\ &\left.Rn_{x}\,Rn_{y}\,Rn_{z}\,R_{0x}\,R_{0y}\,R_{0z}\,R_{x}\,R_{y}\,R_{a}\,R_ {a}\,R_{x}\,R_{y}\,R_{z}\right],\end{array} \tag{4}\]  
\[\begin{array}{ll}TL_{n}^{0}=\begin{pmatrix}Ln_{x}&L_{0x}&La_{x}&Lx\\ Ln_{y}&L_{0y}&L_{y}&Ly\\ Ln_{z}&L_{0z}&La_{z}&Lz\\ 0&0&0&1\end{pmatrix},\;TR_{n}^{0}=\begin{pmatrix}Rn_{x}&Ro_{x}&Ra_{x}&Rx\\ Rn_{y}&Ro_{y}&Ra_{y}&Ry\\ Rn_{z}&Ro_{z}&Ra_{z}&Rz\\ 0&0&0&1\end{pmatrix}.\end{array} \tag{5}\]  
As classified observations, we use collision information, which is distributed as above in the case of using binary classification into two classes, presence and absence of collision,  
Figure 5: State of classes for the SAR-401 robot: (**a**) Out class; (**b**) Warning class; (**c**) Collide class.  
Figure 6: State of classes for the “Ichtiandr” robot: (**a**) Out class; (**b**) Warning class; (**c**) Collide class.  
and in the case of using multiclass classification into three classes, presence, absence, and possible collision (threat of collision).  
Collection of training data consists in random positioning of manipulators by the operator, for example, with the help of a copying suit, and obtaining by means of a direct kinematics problem from the robotics complex for each manipulator position a transformation matrix and fixing the current state on the presence of a collision or not. In order to obtain training data for the ANN, let us compose the configuration space of the robot as a set of its possible configurations.  
To prepare training data, we will randomly select possible positions of the robot servos in different places of its working area. The obtained data will be stored in the form of vectors of left and right manipulator positions, respectively (6):  
\[Y1=[q_{1}\,q_{2}\,q_{3}\,\ldots q_{6}],\ Y2=[q_{1}\,q_{2}\,q_{3}\,\ldots q_{6}], \tag{6}\]  
where \(q_{i}\), \(i=\overline{1}\), \(\overline{6}\) is the servo rotation angle of the \(i\)-th joint.  
By solving the direct kinematics problem, we obtain two transformation matrices for the left and right manipulator (5), using the values of which we will form the input dataset (4). We will use binary or multiclass classification as output.  
The input parameters characterizing the position in space of each manipulator are given in Table 3. Table 3 shows examples of 13 observations. The first 12 rows of the table contain the values of the transformation matrix of the left manipulator. Rows 13 through 24 contain the values of the right manipulator transformation matrix. The last row contains the output parameter of the classification.  
\begin{table}
\begin{tabular}{c c c c c c c c c c c c c} \hline \hline  & Lnx & 0.51 & 0.51 & 0.51 & 0.51 & 0.51 &