# A Fault Detection Framework for Rotating Machinery with a Spectrogram and Convolutional Autoencoder
## 3 Proposed Framework
### OCC Algorithm with Extracted Features from 2D-CAE for Fault Detection  
After the latent feature vectors are extracted from the encoder part of the 2D-CAE, the final fault signal detection model is constructed by using OCC algorithms. The OCC algorithm builds a decision boundary solely using extracted latent feature vectors of normal signals, and the decision boundary determines whether a given signal is obtained from the normal state. If a given latent feature vector is located outside of the boundary, it is rejected as a fault, and vice versa for the vector inside the boundary. It should be noted that the normal operating patterns are well-defined, whereas the machinery fault patterns cannot be specified. Hence, the one-class classifier is constructed by only using normal signals, not relying on the information on fault signals, and it is used to discriminate between the normal signals and all other fault types. Accordingly, owing to the one-class classification, the proposed framework can be used to detect any types of faults. In this study, we consider the most well-known OCC algorithms: [PERSON]'s \(\mathrm{T}^{2}\) statistic, mixture of Gaussian (MoG; [18]), Parzen window density estimation (PWDE; [19]),one-class support vector machine (OCSVM; [20]), isolation forest (IsoForest; [21]), and local outlier factor (LOF; [22]). In this section, we will denote the latent feature vector extracted from the encoder part of the 2D-CAE as \(\mathbf{z}\) and refer to the signals collected during the normal operating condition as belonging to the target class. _[PERSON]'s \(T^{2}\) statistic_: It is clear that anomalous signals are located remotely from the target class region, and thus the distance from the training target class's prototype (e.g., the mean vector of the training target class) can be considered as the anomaly level (generally referred to as the novelty score) of the newly collected samples [68; 69; 70]. Among various distance measures, Mahalanobis distance is the most widely used to define the novelty scores because it takes into account the correlation between features. Hence, in this study, the novelty score is defined as the Mahalanobis distance from the mean vector of the latent feature vector z of the training target class, and this novelty score is referred to as [PERSON]'s \(T^{2}\) statistic. The Mahalanobis distance between the new signal embedded into the latent feature vector, \(z_{new}\), and the mean vector of the latent features of the training target class, \(\overline{z}\), \(T^{2}_{new}\), can be defined as follows:  
\[T^{2}_{new}=(z_{new}-\overline{z})^{T}S^{-1}(z_{new}-\overline{z}), \tag{9}\]  
where \(S\) is the covariance matrix between the latent features of the training target class. The newly collected signals having larger [PERSON]'s \(T^{2}\) statistics are finally rejected as fault signals. _Mixture of Gaussian (MoG)_: Density measures also can be used to quantify the level of anomaly, as the anomalous samples are prone to have low density values. Among various density measures, the probability distribution function is the most widely used. To estimate the probability distribution function, mixture models are often used, which define the probability distribution function by combining multiple distributional components. The resulting mixture model is then utilized to calculate the probability distribution function of samples. MoG estimates the probability function of the target class, assuming that the target class is generated from a mixture of Gaussian probability distributions. In the MoG method, a probability distribution function of samples is represented as a weighted sum of individual Gaussian probability distribution components. Each Gaussian probability distribution component comprises its own mean vector, covariance matrix, and weight.