# Fault Diagnosis of Wind Turbine Gearbox Based on Mel Spectrogram and Improved ResNeXt50 Model
## 4 Experiment
### Comparison of CBAM-ResNeXt50-ArcLoss with Classical Models  
With the increase in the number of iterations, the accuracy of the training set and test set of the CNN reaches 86.8% and 86.5%, respectively, and remained stable. The loss value drops significantly at first and then tends to stabilize. Eventually, the loss value of the training set stabilizes around 0.388, and the loss value of the test set stabilizes around 0.368. The test results are shown in Figure 8. \begin{table}
\begin{tabular}{l c} \hline \hline
**Parameter** & **Value** \\ \hline Size of Mel spectrogram & 256 \(\times\) 256 \\ Learning rate & 0.001 \\ Batch size & 32 \\ Number of classification categories & 5 \\ Number of training iterations & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Parameters of model. The training results of the ResNet50 model are shown in Figure 9. As the number of iterations increases, the accuracy of the model gradually improves and then tends to stabilize. The accuracy of the training set and the test set finally stabilizes at 95.9% and 96.2%, respectively. The model loss value drops and then slowly tends to stabilize. Eventually, the loss values of the training set and the test set stabilize at 0.34 and 0.256, respectively. Compared with the CNN, the accuracy of the training set is increased by 9.1 percentage points, the accuracy of the test set is increased by 9.7 percentage points, and the loss values of the training set and the test set are reduced by 0.048 and 0.112, respectively. The ResNeXt50 model is an improvement and enhancement of the ResNet50 model, which utilizes residual connections and group convolutions to maximize the feature extraction capability. Experiments show that the accuracy of the training set and test set of the ResNeXt50 model is 97.2% and 97.4%, respectively, which is an increase of 1.3 and 1.2 percentage points compared to the ResNet50 model. The loss values of the training set and test set are 0.159 and 0.146, respectively, which are reduced by 0.181 and 0.11, respectively. There is no overfitting or underfitting phenomenon. The accuracy and loss values of the ResNeXt50 model are shown in Figure 10.  
The results of the CBAM-ResNeXt50-ArcLoss model are shown in Figure 11. As the number of iterations increases, the accuracy of the model on the training set and test set gradually increases and finally stabilizes at 99.6% and 99.8%, respectively. The loss value of the model gradually decreases and then tends to be stable, finally stabilizing at 0.082 and 0.054, respectively. As shown in Table 3, verifying the effectiveness of the algorithm, the test accuracy of the CBAM-ResNeXt50-ArcLoss model is improved by 13.3, 3.6, 2.4, and 1.3 percentage points compared with the classical algorithms CNN, ResNet50, ResNeXt50, CBAM-ResNeXt50, and CBAM-ResNeXt50-ArcLoss, respectively. Due to the introduction of the CBAM and the use of a more complex ArcLoss loss function, the calculation process of the model is increased. Therefore, the training time of the model is slightly increased compared with other models, but the robustness and generalization ability of the model are improved. Figure 11: Loss value and accuracy of CBAM-ResNeXt50-ArcLoss model. Figure 10: Loss value and accuracy of ResNeXt50 model. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Model** & **Accuracy/\%** & **Loss Value** \\ \hline CNN & 86.5\% & 0.368 \\ ResNet50 & 96.2\% & 0.256 \\ ResNeXt50 & 97.4\% & 0.146 \\ CBAM-ResNeXt50 & 98.5\% & 0.113 \\ CBAM-ResNeXt50- & 99.8\% & 0.054 \\ ArcLoss & & \\ \hline \hline \end{tabular}
\end{table} 
Table 3: A comparison with the test results of the classical model. Using PyTorch 2.5.1, we obtained the confusion matrices obtained after testing CNN, ResNet50, ResNeXt50, and CBAM-ResNeXt50-ArcLoss after training, as shown in Figure 12. The horizontal coordinate represents the predicted labels of different faults, and the vertical coordinate represents the true categories of different faults.