## 3 Fault Diagnosis with Original Data
### Full Analysis and PCA Transform  
In this approach, the FFT of the signal is fed directly into the AI model to determine whether or not the machine has errors. The AI models analyzed in this study are artificial neural network (ANN) [25], K-mean clustering [26], and support vector machines (SVM) [27]. These models have proved to be robust for classification applications. Moreover, ANN, K-mean clustering, and SVM are very flexible when dual with different data types and structures. However, K-mean clustering and SVM-based models are not effective when applied with high-dimension input data [28]. Therefore, we also consider the PCA to reduce the dimensions of the input data. Figure 6 shows normal and broken sample data of the signal after the PCA process, which transforms high-dimension input data into low-dimension input data for K-mean clustering and SVM algorithms. Figure 4: Overall fault diagnosis diagram with different data processing and multiple AI models. Figure 5: Training process using both real data and generated data by generative adversarial network (GAN). The vibration signals, which include full FFT and PCA transform, are fed into the ANN networks. The inputs are different so we consider two ANN structures for the machine fault detection application. The first ANN model for the full FFT of the signal has a large structure because the input contains all four signals in the _g_x_, _g_y_, _g_z_, and _g_t_ directions. This ANN model has an input shape of 200 \(\times\) 4, 200 input neural, 100 hidden units, and 2 output neural with the Softmax activation function for classification. The Softmax function is defined as follows:  
\[\sigma(z_{i})\ =\ \frac{e^{z_{i}}}{\sum_{k=1}^{K}e^{z_{k}}}, \tag{4}\]  
where \(i\) = 1,...,\(K\) and \(z\) = (\(z_{1}\),..., \(z_{K}\)). The predicted probability of an output of the neural network classified as normal (or broken machine) is:  
\[P(y=j|x)\ =\ \frac{e^{\mathbf{x}^{\mathbf{T}}\mathbf{w}_{j}}}{\sum_{k=1}^{K}e^{ \mathbf{x}^{\mathbf{T}}\mathbf{w}_{k}}}, \tag{5}\]  
where \(\mathbf{x}\) is the input vector; \(\mathbf{w}\) is the weighting vector of the output neural network; and \(\mathbf{x}^{\mathbf{T}}\mathbf{w}\) is the inner product of \(\mathbf{x}\) and \(\mathbf{w}\). In this formula, we have \(i\) = 1,..., \(K\) and \(z\) = (\(z_{1}\),..., \(z_{K}\)). The PCA transform reduces the FFT of the signal into a 20 \(\times\) 1 vector, which is much smaller than the original signal. Therefore, the ANN has a small structure with 64 input neural, 32 hidden units, and 2 output neural with the Softmax activation function for classification. For comparison, we apply the same optimization for both the ANN structures. Xavier initialization [29] is applied to set up the weights of all ANN cells, and the Dropout technique [30] with 0.7 keeping probability is also used to improve the ANN performance. We use Leaky Rectified Linear Unit (Leaky ReLU) [31] as the activation function for both the input and hidden layers, which is defined as follows:  
\[f(x)\ =\ \left\{ \begin{array}{c}0.01x\ for\ x<0\\ x\ for\ x\geq 0\end{array} \right.. \tag{6}\]  
Sparse categorical cross-entropy is used as the loss function for our ANN models, and Adaptive Moment Estimation (ADAM) is selected as the optimization algorithm with 1000 epochs. Table 1 shows the accuracy of ANN, K-mean clustering, and SVM based on two input data (full FFT of the signal and PCA transform signal). The accuracy of ANN, K-mean clustering, and SVM reaches 100% in both cases. Compared with the acoustic signal in Reference [4], we achieve higher accuracy with a simpler data collection method. However, with high training and testing speed, the K-mean clustering and SVM are more suitable in the real-time scenario. Table 2 shows the test results with a small broken machine signal training set (40 s of broken signal, only 10% of the original amount). When there is a lack of  
Figure 6: Principal component analysis (PCA) in _g_x_ direction of the normal and broken machine.