# A Bearing Fault Diagnosis Method Based on Wavelet Denoising and Machine Learning
## 3 Results and Discussion
### Comparative Analysis of Noise Reduction Results  
For type A faults, the comparative analysis of wavelet threshold denoising shows that under the condition of constant level of decomposition, with the increase of vanishing moment, the indicators after denoising basically become better. However, when the vanishing moment increases to 9, the mean absolute error MAE increases sharply. It is considered that the signal after denoising changes greatly compared with the original signal, and some characteristics of the original signal may be lost, so it is not used. For wavelet packet analysis denoising, when the wavelet base is determined to be sym6, the denoising effect of wavelet packet analysis with four-level of decomposition is better than that with five-level of decomposition. Then we compare the denoising effects of wavelet soft thresholding and wavelet packet analysis. It is judged that the noise reduction effect of four-level of decomposition with wavelet base sym6 in wavelet packet analysis is better than that of four-level of decomposition with wavelet base db6 in wavelet soft threshold analysis.  
Taking the four-level of decomposition whose wavelet base is sym6 in the first four signals of type A fault as an example, the denoising results of wavelet packet analysis are shown in Figure 2.  
For the four signals of type B fault, the result analysis is basically consistent with the four signals of type A fault. However, in the comparison between wavelet soft threshold  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**levels** & **MSE** & **SSE** & **RMSE** & **R\({}^{2}\)** & **MAE** & **SNR** \\ \hline
4 & \(1.88\times 10^{-3}\) & \(7.74\times 10^{0}\) & \(4.35\times 10^{-2}\) & \(9.34\times 10^{-1}\) & \(5.06\times 10^{-6}\) & \(1.18\times 10^{1}\) \\
5 & \(2.67\times 10^{-2}\) & \(1.09\times 10^{2}\) & \(1.63\times 10^{-1}\) & \(6.50\times 10^{-2}\) & \(1.32\times 10^{-6}\) & \(3.00\times 10^{-1}\) \\ \hline \hline \end{tabular}
\end{table}
Table 4: Analysis results of the first signal index of Type B fault.  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**Levels** & **MSE** & **SSE** & **RMSE** & **R\({}^{2}\)** & **MAE** & **SNR** \\ \hline
4 & \(6.25\times 10^{-4}\) & \(2.56\times 10^{0}\) & \(2.50\times 10^{-2}\) & \(9.94\times 10^{-1}\) & \(4.46\times 10^{-6}\) & \(2.26\times 10^{1}\) \\
5 & \(1.10\times 10^{-2}\) & \(4.50\times 10^{1}\) & \(1.05\times 10^{-1}\) & \(8.95\times 10^{-1}\) & \(4.46\times 10^{-6}\) & \(1.01\times 10^{1}\) \\ \hline \hline \end{tabular}
\end{table}
Table 3: Analysis results of the first signal index of Type A fault.  
Figure 2: The original signal and denoised signal of the first four signals of Type A fault.  
and wavelet packet analysis, it is found that the noise reduction effect of 4-level of decomposition with wavelet base db9 in wavelet packet analysis is better than that of four-level of decomposition with wavelet base sym6 in wavelet soft threshold analysis.  
Taking the four-level of decomposition with wavelet base as db9 in the four signals of Type B fault as an example, the denoising results of wavelet packet analysis are shown in Figure 3.  
It should be noted that, from the wavelet packet analysis results of the first signal of the Type B fault, it can be seen that the excessive level of decomposition has a serious impact on the denoising effect. From the SNR point of view, using the five-level of decomposition of the sym6 wavelet base, the signal-to-noise ratio is significantly lower than that of the four-level of decomposition, indicating that this denoising method loses a lot of useful signals. This can also be illustrated from the signal images before and after denoising, as shown in Figure 4.