# A Fault Detection Framework for Rotating Machinery with a Spectrogram and Convolutional Autoencoder
## 4 Experimental Study
\begin{table}
\begin{tabular}{l c c} \hline \hline \multirow{2}{*}{**Bearing States**} & \multicolumn{3}{c}{**Total Number of Signals**} \\ \cline{2-3}  & **Training Dataset** & **Testing Dataset** \\ \hline Normal condition (N) & 15,680 & 3920 \\ Strong ball element fault (SB) & & 7500 \\ Weak ball element fault (WB) & & 5500 \\ Strong inner race fault (SI) & & 3000 \\ Weak inner race fault (WI) & & 5250 \\ Strong outer race fault (SO) & & 3800 \\ Weak outer race fault (WO) & & 5250 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Description of the experimental dataset. of 2D-CAE, except that it utilizes one-dimensional convolutional blocks and transposed convolutional blocks instead of two-dimensional layers. Other hyperparameters of the CAE are represented in Table 3.  
As shown in Table 3, we used the ReLU function as an activation function because it is the most widely employed one for the CAE. The ReLU simply outputs zero for negative inputs and a linear identity for positive ones. By doing so, it can reflect nonlinearity and enhance computation efficiency. Furthermore, this activation function helps parameters of CAE to converge faster during training and alleviates the vanishing gradient problem. In addition to the activation function, we set other hyperparameters, learning rate, batch size, and epoch to be specified as 0.001, 256, and 50, respectively. It is known that the performance of the neural network is not affected by those hyperparameters; we simply set them as the default recommended ones in the open library. Figure 5: The architecture of (**a**) the 2D-CAE neural network and (**b**) the 1D-CAE neural network. As shown in Figures 6-8, the frequency-domain-represented signals and spectrograms more clearly represent the difference between normal and other fault bearings than time-domain-represented signals. Furthermore, in the spectrogram, each bearing condition differs more than other single-domain-represented signals. These figures indicate that spectrograms can achieve more accurate fault detection performance than single-domain-represented signals. In addition, we also visualized these 10 latent features by facilitating the t-distributed stochastic neighborhood embedding (t-SNE; [73]) technique. Figure 9 shows the two-dimensional t-SNE plots of latent features obtained from each signal representation scheme. Figures 6-9 demonstrate that the frequency-domain information is more helpful for discriminating between the normal signals and fault ones in that the normal signals are more clearly separated from fault signals (Figure 9,c). A one-dimensional time-domain signal provides insufficient information on the operating state of rotating machinery in that the time-domain signal is significantly confounded by environmental noise, which cannot be fully removed in many real situations. Therefore, using only time-domain representation cannot accurately detect the ball element fault from the normal signals, and other fault types have also overlapped each other. On the other hand, although the frequency information is more useful than time-domain information regarding fault signal detection, the normal signals are slightly overlapping with the ball element fault types in solely using the frequency information case (Figure 9b). It should be noted that the frequency information cannot be properly derived from nonstationary signals, which are often encountered in many real situations. In contrast to single-domain signal representation schemes, the use of spectrograms most clearly distinguishes the normal signals and other fault types. Additionally, all fault types are also well separated, even without utilizing the label information of fault types. Because the spectrogram can deal  
Figure 8: Spectrogram-represented signals of (**a**) the normal bearing, (**b**) the weak ball element fault, (**c**) the weak inner race fault, (**d**) the weak outer race fault, (**e**) the strong ball element fault, (**f**) the strong inner race fault, and (**g**) the strong outer race fault.