# FPGA-Based Methodology for Detecting Positional Accuracy Degradation in Industrial Robots
## 3 Results and Discussion  
The results of the proposed methodology to determine joint deviation in the robot using motor current analysis are presented below. The results are shown in the form of confusion matrices, and a summary in tabular form is provided to help interpret the findings. The confusion matrix chart has the correctly classified observations on its diagonal, while the cells outside the diagonal show the incorrect observations. In both cases, the percentage is shown. The last cell on the diagonal shows the average accuracy. Moving to the last column, the first two cells specifically present the percentages of all samples that were correctly and incorrectly classified for each class. These values correspond to precision and false discovery rate, respectively. Lastly, focusing on the last row, the two cells highlight the percentage of samples belonging to each class that were correctly and incorrectly classified. These values are commonly referred to as recall and false negative rate, respectively. In summary, the last cell of the confusion matrix diagonal shows the average number of samples that the ANN correctly and incorrectly classified, providing an overall accuracy measure for the classifier, this information for the real and synthetic cases is presented in Table 4.  
To evaluate the operation of the proposed method, a computer software simulation of the different techniques that make up the methodology was carried out. Additionally, to evaluate the classifiers 600 samples from each dataset were used for each corresponding joint; these samples account for 15% of the dataset for each of the six scenarios in the synthetic case. These samples were then separated from the original dataset and are treated as unknown samples for the ANN classifiers. Figure 15 shows the confusion matrices obtained from the classifiers based on neural networks for the synthetic scenario and a summarized version is presented in Table 4. \begin{table}
\begin{tabular}{c c c c c c} \hline
**Accuracy** & **Joint 1** & **Joint 2** & **Joint 3** & **Joint 4** & **Joint 5** & **Joint 6** \\ \hline Synthetic case & 82.7\% & 98.2\% & 97.7\% & 89.8\% & 100\% & 82.7\% \\ Real case & 93.5\% & 66.5\% & 78.8\% & 88.7\% & 100\% & 100\% \\ \hline \end{tabular}
\end{table} 
Table 4: Average accuracy obtained in the ANN validation process for the synthetic and real cases. Figure 15a-c corresponds to the cases of joints one to three, while Figure 15d-f corresponds to joints four to six. In this sense, it is observed that the classifiers can differentiate between the states of operation when there is a deviation in the joints with a minimum average accuracy of 82.7% corresponding to joints one and six, while joint four has an average value of 89.8%, joints two and three have an average accuracy of around 97% and joint five has an average accuracy of 100%. It should be noted that for the synthetic scenario, each case includes a deviation in the respective joint. For instance, in case one, only joint one contains a deviation, while the other five joints remain unaffected. In this regard, joints two and three are well differentiated by their respective classifiers; this can be attributed to the fact that in the trajectory carried out, these joints have a more significant intervention than the rest. In addition, in the motion equations of the robot, these joints are closely related; therefore, since this test is synthetic, the deviation of one joint can affect the behavior of the other. Regarding joint five, which presents 100% accuracy, this is attributable to its minimal intervention in the trajectory; therefore, by inducing deviation in the joint, the change between both operating states is differentiable by the proposed methodology. For joints, one, four, and six, the difference between their accuracy levels and those of the joints with the best ranking result can be inflated by their level of intervention in the trajectory and the fact that the synthetically induced deviation has a random amplitude.