# Research on CNC Machine Tool Spindle Fault Diagnosis Method Based on DRSN-GCE Model
## 4 Results
### Comparison Test
\begin{table}
\begin{tabular}{c c c c c c} \hline \hline
**Frequency** & **Type of Model** & **Precision (Avg)** & **Recall (Avg)** & **F1 Scores (Avg)** & **Accuracy (Avg)** \\ \hline high-frequency & 1D-CNN & 79.00 \(\pm\) 0.16 & 78.50 \(\pm\) 0.14 & 78.75 \(\pm\) 0.15 & 78.81 \(\pm\) 0.15 \\  & CNN-Transformer & 92.01 \(\pm\) 0.15 & 91.00 \(\pm\) 0.14 & 91.50 \(\pm\) 0.15 & 90.89 \(\pm\) 0.14 \\  & 1D-DRSN & 95.34 \(\pm\) 0.14 & 95.11 \(\pm\) 0.15 & 95.09 \(\pm\) 0.14 & 95.11 \(\pm\) 0.15 \\  & Swin Transformer & 97.04 \(\pm\) 0.13 & 96.89 \(\pm\) 0.13 & 96.84 \(\pm\) 0.14 & 96.89 \(\pm\) 0.13 \\  & 1 DRSN–GCE & 95.96 \(\pm\) 0.14 & 95.44 \(\pm\) 0.13 & 95.32 \(\pm\) 0.13 & 95.44 \(\pm\) 0.12 \\  & Model of this paper & 99.23 \(\pm\) 0.12 & 99.22 \(\pm\) 0.10 & 99.22 \(\pm\) 0.11 & 99.22 \(\pm\) 0.11 \\  & 1D-CNN & 80.50 \(\pm\) 0.15 & 80.00 \(\pm\) 015 & 80.25 \(\pm\) 0.16 & 80.21 \(\pm\) 0.14 \\  & CNN-Transformer & 92.04 \(\pm\) 0.15 & 91.20 \(\pm\) 0.15 & 91.62 \(\pm\) 0.14 & 91.88 \(\pm\) 0.15 \\  & 1D-DRSN & 93.51 \(\pm\) 0.14 & 93.01 \(\pm\) 0.15 & 92.91 \(\pm\) 0.14 & 93.01 \(\pm\) 0.14 \\ frequency & Swin Transformer & 95.86 \(\pm\) 0.13 & 95.67 \(\pm\) 0.14 & 95.68 \(\pm\) 0.14 & 95.67 \(\pm\) 0.13 \\  & 1 DRSN–GCE & 96.08 \(\pm\) 0.14 & 95.89 \(\pm\) 0.12 & 95.89 \(\pm\) 0.13 & 95.89 \(\pm\) 0.13 \\  & Model of this paper & 99.12 \(\pm\) 0.12 & 99.11 \(\pm\) 0.11 & 99.11 \(\pm\) 0.11 & 99.11 \(\pm\) 0.12 \\ \hline \hline \end{tabular}
\end{table} 
Table 7: Performance metrics for each model with a signal-to-noise ratio of \(-5\) (% or s). Figure 5: _Cont._  
The t-SNE graph was introduced to help show fault classification more clearly. The t-SNE plots in Figure 6 show the outputs from each model with a signal-to-noise ratio of \(-5\) dB. It is clear that this model is better than others for clustering fault features and classification of bearings. In order to verify the effectiveness of the model in this paper, Gauss noise and non-Gauss noise (Salt-and-Pepper noise and Poisson noise) are added to the vibration signals at the same time to simulate a bearing diagnosis more consistent with a noisy environment, and again to compare the other deep learning models (1D-CNN, CNN-Transformer, Swin Transformer, 1D-DRSN, 1 DRSN-GCE) to evaluate the noise immunity of other models under different noise conditions, as shown in Tables 8-10. From Table 8, it can be seen that the diagnostic accuracies of the models in this paper are the highest at signal-to-noise ratios ranging from \(-5\) dB to \(3\) dB. From Table 8, it can be seen that the diagnostic accuracy of this paper's model reaches \(89.11\%\) at a signal-to-noise ratio of \(-5\). The other models  
Figure 5: Confusion matrix for each model at SNR \(=-5\) under Gauss noise and Laplace noise. Figure 6: t-SNE visualization of each model at SNR \(=-5\) under Gauss noise and Laplace noise. are 76.33%, 82.01%, 85.55%, 87.00%, and 86.11% in order of accuracy from top to bottom according to Table 8. The diagnostic accuracy of this paper's model is 3.56% higher than that of 1D-DRSN, and 3% higher than that of the 1 DRSN-GCE model without CWT, which indicates that this paper's model has good stability and noise immunity. From Table 9, it can be seen that in the low-frequency noise conditions, the accuracy of this paper's model is also the highest in all cases, indicating that the model can cope with the frequency variation of noise. From Table 10, it can be seen that the model of this paper compared with other models in terms of precision, recall, F1 score, and so on has a more excellent performance. The confusion matrix in Figure 7 is a comparison of the different bearing fault diagnostic models with signal-to-noise ratios of \(-5\) dB. The confusion matrix plot of the model in this paper has the highest accuracy, and lowest misidentification rates. This paper shows how the methods can be used to achieve high-precision diagnosis with robustness in noisy environments.