# An Intelligent Diagnosis Method for Machine Fault Based on Federated Learning
## 3 Case Study
### Case 2: Bearing Fault Data of Case Western Reserve University  
In Case 1, the effectiveness of the FL model has been verified. In Case 2, the effectiveness of the FL model in fusing local fault diagnosis models that recognize multiple fault types is explored. Here, the data of SKF6205 bearing at the driving end are used, which is from Case Western Reserve University [31]. The data were collected under a load of 1.0 kN and a speed of 1772 r/min. The bearing data under ten kinds of working conditions are used, i.e., no fault, 0.007-inch ball fault, 0.007 inch inner fault, 0.007 inch outer fault, 0.014 inch ball fault, 0.014 inch inner fault, 0.014 inch outer fault, 0.021 inch ball fault, 0.021 inch inner fault, and 0.021 inch outer fault. Each working condition has 400 samples, and there are a total of 4000 samples. This is assuming that there are four models, which still adopt the deep convolution neural network shown in Figure 2. The four models are trained according to the different conditions. Therefore, different models have different fault diagnosis capabilities, as shown in Table 4.  
Then, the weight of the four models is fused and optimized through FL, so that each model has the same fault diagnosis capability. The results of training and testing are shown in Figure 9. Figure 9 shows the loss curves of the training set and the testing set. It can be seen that the loss gradually converges and tends to 0 as the iteration, which reflects that the model finds the optimal value and does not fall into an overfitting state. Figure 9 shows the accuracy curves of the training set and the testing set, and the accuracy is 100%. The two curves almost overlap, which reflects that there is no overfitting and underfitting in the model. So, the generalization ability of the model is very good. The weight distribution of each convolution layer in the federated fault diagnosis model is shown in Figure 10. By comparing Figure 10 with Figure 10, the weight changes, which reflects the training process of the model. In order to further observe the effectiveness of the federated fault diagnosis model, the t-SNE algorithm is also used to reduce the dimensionality of the output of each convolution layer in the model. The features scatter diagram performed is shown in Figure 11. From Figure 11a, it can be seen that the features of the data with different conditions are aliasing, i.e., there is a strong correlation among them. Only the features of the 0.007-inch ball fault and 0.021-inch ball fault are roughly clustered, and other fault features are in a chaotic state. \begin{table}
\begin{tabular}{c c} \hline \hline
**Model** & **Fault Diagnosis Capability** \\ \hline Model A & Nine types of fault expect 0.021 inch Outer fault \\ Model B & Normal and 0.007 inch Inner fault, Outer fault, and Ball fault \\ Model C & Normal and 0.014 inch Inner fault, Outer fault, and Ball fault \\ Model D & Normal and 0.021 inch Inner fault, Outer fault, and Ball fault \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Models with different fault diagnosis capability. Figure 9: Loss curve and accuracy curve of federated fault diagnosis model. Especially, the features of normal conditions are submerged in those of fault conditions. Figure 11 depicts the fault features extracted by the second convolution layer in the model. After calculating by two convolution layers, the features begin to be clustered, and the features of normal conditions begin to appear. The features of the 0.007-inch ball fault, 0.014-inch outer fault, and 0.021-inch ball fault are more obvious. Figure 11 shows the features extracted by the third convolution layer in the model. It can be seen that the features are clustered and separated clearly. Only the features of the 0.021-inch outer fault and the 0.007-inch inner fault overlap.