## 3 Fault Diagnosis Method for BIW-Welding Robot Based on Multi-Layered BRB
### Reasoning and Optimization Based on Multi-Layered BRB Fault Diagnosis Model
#### 3.3.2 Parameter Optimization of the Model
Four reference levels were set for the servo drive system failure and control system failure: small (S), medium (M), large (L), and very large (VL). The reference values of BRB6 are shown in Tables 4 and 5. \begin{table}
\begin{tabular}{c c c c} \hline
**S** & **M** & **L** & **VL** \\ \hline
0.04 & 0.043 & 0.046 & 0.048 \\ \end{tabular}
\end{table} 
Table 2: \(X_{1}\) Reference values in BRB1. Figure 7: FTA to BRB conversion. Figure 8: BRB1 output results. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Rule** & **Rule Weight** & **Input** & **Result** \\ \hline
7 & 1 & M\(\wedge\)L & (0.7 0.2 0.1 0) \\
8 & 1 & M\(\wedge\)VL & (0.4 0.4 0.2) \\
9 & 1 & L\(\wedge\)S & (0.3 0.6 0.1) \\
10 & 1 & L\(\wedge\)M & (0.2 0.6 0.1 0.1) \\
11 & 1 & L\(\wedge\)L & (0.4 0.4 0.2) \\
12 & 1 & L\(\wedge\)VL & (0.2 0.15 0.5 0.15) \\
13 & 1 & VL\(\wedge\)S & (0.2 0.4 0.3 0.1) \\
14 & 1 & VL\(\wedge\)M & (0.3 0.4 0.3) \\
15 & 1 & VL\(\wedge\)L & (0.2 0.2 0.5 0.1) \\
16 & 1 & VL\(\wedge\)VL & (0.2 0.4 0.3 0.1) \\ \hline \hline \end{tabular}
\end{table} 
Table 7: _Cont._  
Figure 9: BRB6 output results. Analyzing the output results of BRB1 and BRB6 showed that the MSE of the BRB1 model was 5.385 \(\times\) 10\({}^{-7}\), and the MSE of the BRB6 model was 8.598 \(\times\) 10\({}^{-9}\). The output of the model in this paper was found to fit the real values of torch attitude and suspension height failure well, which also proved the advantage of the model numerically. In order to further verify the effectiveness of the proposed method in the BIW-welding robot fault diagnosis, a comparative experiment was conducted to compare with other modeling methods. Currently, commonly used fault diagnosis methods include fuzzy C-means clustering (FCM), the BP neural network, and RBF neural network, so this model can be compared with these three methods for verification. The data adopt the above 100 sets of fitted welding torch attitude and the true value of the suspension height fault. The comparison graph is shown in Figure 10. For comparison, the evaluation results of several methods and the mean square error (MSE) of each method were calculated. MSE is a common comparison method of the \"average error\". The value of MSE can provide a measure of the quality of a model. Finally, the mean square error (MSE) can be used as a judgment criterion for the fault diagnosis model to evaluate the fault diagnosis of the BIW-welding robot. The specific mean square error value is shown in Figure 11 below. Figure 10: Comparison of this model with other methods. (**a**) Comparison chart of FCM method and real value. (**b**) The comparison chart of the model and the real value in this paper. (**c**) Comparison chart of BP neural network and real value. (**d**) Comparison chart of RBF method and real value. The curve trend of each fault diagnosis model can be seen in Figure 10, in which the blue curve represents the real value, while the other color curves represent the trend curve obtained through different fault diagnosis models. It can also be seen that the curve trend of the model in this paper and the real data have the best-fitting effect. The RBF neural network is slightly less effective than this model, and the curve has the same trend as the data as a whole. The effect of the BP neural network is not good, and the curve is only partly similar to the trend of the data. The fuzzy C-means clustering (FCM) curve fluctuates significantly, and it is difficult to express a good diagnostic effect. Meanwhile, Figure 11 illustrates the validity of the above analysis in terms of data. According to Figure 11, it can be seen that the MSE of the model in this paper reached a minimum value of \(8.598\times 10^{-9}\), while the MSE of FCM was \(1.055598\times 10^{-6}\), the MSE of a BP neural network was \(5.534598\times 10^{-7}\), and the MSE of the RBF neural network was \(1.026598\times 10^{-7}\). The results obtained in Figures 10 and 11 are consistent, illustrating the validity of the model.