# Neural Network-Enhanced Fault Diagnosis of Robot Joints
## 3 Diagnosis Framework
### Multi-Feature Fusion for Optimal Fault Diagnosis  
According to the research and analysis above, it can be found that the influence of each joint on the positions and attitude of the actuator is complex, and can be transformed into a \(1\times 3\) matrix form after the extraction of both features. Due to the different magnitude of the position and Euler angle values, they need to be normalised before feature fusion. The study above, when using actuator positions and orientation as features, respectively, reveals that the positional features have a greater impact on classification accuracy, although their number of classifications is one class less than the number of orientations as a single feature. Finding the weights of single features in multi-feature data for their influence on classification effectiveness is a popular and complex topic, and commonly used methods include grid search, genetic algorithms, etc., but none of them are applicable in this paper due to the large amount of resources and time they require. Considering that the feature of neural network algorithms is to constantly update the weights on the synapses by gradient descent method to achieve better accuracy, the simplest feature concatenation is adopted, i.e., two \(1\times 3\) features are spliced side by side (concatenation) to form \(1\times 6\) data, which \begin{table}
\begin{tabular}{l c c c c} \hline \hline
**Sampling Number** & **Number of Epochs** & **Layers** & **Accuracy (\%)** & **Cross-Entropy Loss** \\ \hline
500 & 800 & 6-13-13-7 & 94.33 & 0.4544 \\
1000 & 700 & 6-13-13-7 & 97.29 & 0.3926 \\
1500 & 600 & 6-13-13-7 & 99.76 & 0.3751 \\ \hline \hline \end{tabular}
\end{table} 
Table 6: Network training results of joint diagnosis for robots. Size of joint angle error = 0.5\({}^{\circ}\) (dual features). Figure 8: Trajectories with 0.5\({}^{\circ}\) as injected joint fault. are shown in Figure 9, and the most suitable weights are found through the training of the network. The following figure illustrates the extraction, concatenation and normalisation of the two-feature data. For the new database containing two features, the input layer of the neural network consists of six neurons corresponding to the position \(x\ y\ z\) and direction pitch roll yaw information, and the output layer contains seven neurons corresponding to the seven trajectory classifications in the six joints in faulty and fault-free states, with no change in the generation of the labelling matrices. The classification results of the neural network trained with the dual-feature database are shown in Table 7, and it can be noticed that the number of database used is much less compared to the previous single-feature, only 3500 sets of data can achieve more than 97.50% classification accuracy when the injected faults are one degree, and there is a 99.81% accuracy when the number of single-trajectory samples is 1500, which is the same as that of single-position position features with one additional feature. This is an improvement of five percentage points compared to the unit-placement position feature with one more classification. Repeating the previous procedure to shorten the size of the injected fault, the corresponding classification accuracy and single-feature classification improved with a reduced database and an increased number of classifications, and the diagnosis of 0.1 degree joint faults was achieved; the results are shown in Tables 8 and 9. The diagnostic accuracy of the classifier can be more than 99% when the fault is 0.5 degrees, and can be close to 96% at 0.1 degrees; this result is much more accurate compared to any single feature. It can be clearly seen that the database created by the dual features of position and attitude of the actuator makes the neural network much more capable of classification, and the main advantage over the single feature classification is the increase in accuracy, the smaller database required, and the greater precision.