# A Fault Detection Framework for Rotating Machinery with a Spectrogram and Convolutional Autoencoder
## 4 Experimental Study
with the nonstationary signals by applying the FFT technique to stationary signal segments, the frequency information can be more precisely derived. This visualization result indicates that the spectrogram can represent the meaningful characteristics of the operating state of rotating machinery and symptoms of machinery faults. In addition to visual comparison, we used the area under the receiver operating characteristic curve (AUROC) to compare the fault detection performance of three signal representation schemes. In fault detection problems, the receiver operating characteristic (ROC) curve is used to display the trade-off relationship between two types of errors, namely, the true positive rate and false positive rate. The true positive rate is the rate of true fault signals, which are correctly classified as fault signals, while the false positive is the rate of true normal signals, which are incorrectly classified as faults. When the threshold value for the anomaly score is large, it results in a high false-positive rate and a low true-positive rate, whereas a small threshold value leads to a low false-positive rate and a high true-positive rate. The ROC curve is obtained from both the true positive rate and false positive rate from all possible thresholds. The AUROC score is defined as the area under the ROC curve, and the larger AUROC score implies the better fault detection performance. Because the AUROC score does not rely on threshold setting, it is the most widely used evaluation measure for the fault detection problems [74]. To compute the AUROC score, we used the six OCC algorithms as fault detectors, which are [PERSON]'s T\({}^{2}\) statistic, MoG, PWDE, LOF, OCSVM, and IsoForest. The hyperparameters of the OCC algorithms are not easy to be optimize due to the absence of counter-class information [75]. Therefore, the hyperparameters of those six OCC algorithms were specified as default values suggested by the _Scikit-learn_ library, and these default values have shown reasonable fault detection performance. Table 4 shows AUROC values of each signal representation scheme using the six OCC algorithms. In this table, we reported the average AUROC values obtained from 10 repetitions. The results in Table 4 indicate that, across all OCC methods, using the spectrogram yielded larger AUROC values compared to single-domain signal representation schemes, clearly demonstrating its superiority over the others. Hence, in further experimental studies, we used the spectrogram as a signal representation scheme. Figure 9: Two-dimensional t-SNE plot of 10 latent features obtained from (**a**) a time-domain representation scheme, (**b**) a frequency-domain representation scheme, and (**c**) a spectrogram representation scheme (proposed). In addition, we also compared four feature extraction methods for the fault detection: (1) using manually defined features, (2) principal component analysis (PCA), (3) kernel PCA, (4) stacked autoencoder (stacked AE), (5) denoising two-dimensional convolutional autoencoder (denoising 2D-CAE), and (6) standard 2D-CAE (proposed). As for the manually defined features, we computed 10 statistics from the signal in both the time and frequency domains. They are the most widely used in previous signal preprocessing studies [24; 76]. Table 5 summarizes the manually defined features considered in the current study. In Table 5, \(x\) is the time-domain signal to be analyzed, and \(n\) is the length of the signal. Furthermore, the absolute mean value of the time-domain signal is represented as \(\overline{x}\), and \(x_{max}\) denotes the maximum value in a signal. For frequency-related features, \(N\) is the number of frequency bins, and \(f_{i}\) denotes the frequency value of the \(i\)-th bin. Additionally, \(p_{i}\) corresponds to the amplitude of the \(i\)-th spectrum component. In addition, for the kernel PCA, we adopted the radial basis function (RBF), whose bandwidth (\(\sigma\)) is one, as a kernel function.