## 3 System Framework and Model Training
### Data Generation Experiment  
Data generation is an effective application of GAN that helps to solve the problems such as lack of training samples and data imbalance. As a GAN-based model, BiWGAN-GP is also capable of generating data. Besides, a good generation result also means good feature extraction capability of the encoder [19]. Therefore, this experiment is designed to evaluate the quality of generated data. For comparison, the origin GAN, WGAN, WGAN-GP, BiGAN, and improved BiWGAN-GP models are trained to generate vibration signals in the frequency domain. All models have the same structure of generator. The BiGAN and BiWGAN-GP have the same architecture but only different loss functions for training. The models are trained for 2000  
Figure 5: Gearbox test rig and its mechanical schematics. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Category** & **Condition** & **Severity** & **Label** \\ \hline
1 & Healthy & - & HT \\
2 & Missing tooth & - & MT \\
3 & Root crack & - & RT \\
4 & Spalling & - & SP \\
5 & Chipping tip & 1 & CT1 \\
6 & Chipping tip & 2 & CT2 \\
7 & Chipping tip & 3 & CT3 \\
8 & Chipping tip & 4 & CT4 \\
9 & Chipping tip & 5 & CT5 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: UoC gear dataset faults. Figure 6: Gear working conditions. epochs using all of the available unlabeled data. After training, 1000 unlabeled samples are generated by feeding forward random noise into the model's generator. (1) Quantitative assessment: To quantitatively evaluate the generated data of GAN, inception score (IS) [29] and Frechet inception distance (FID) [30] are popular evaluation metrics. However, those methods are designed for image generation tasks, and unsuitable for vibration signals. In this paper, maximum mean discrepancy (MMD) [31] and Pearson correlation coefficients (PCC) are used to quantitatively assess the quality of generated data. The MMD can be calculated directly between two sets of samples. And the PCC is used to assess the linear correlation between two specific signals. With these two methods, we can evaluate the generation effect on two different scales. Table 4 shows the MMD and average PCC between generated data and real samples. The lower MMD means better generative result, and the closer the PCC is to 1 means the more similar the two samples are. The results on the CWRU dataset show that GAN and BiGAN have relatively higher MMD and lower PCC, and BiGAN is slightly better. With the help of Wasserstein distance, the MMD of WGAN is lower than GAN and BiGAN and the result of PCC has also improved. The results of WGAN-GP and BiWGAN-GP are much better than the other methods, which suggests that Wasserstein distance with generation quality effectively improves the model's generative capability. Furthermore, the differences between WGAN-GP and BiWGAN-GP are minor, implying that their generation capabilities are similar. As for the UoC gear dataset, the numerical difference between the various models is smaller than the results on CWRU dataset. However, the generation effect reflected in the result is similar. Although WGAN-GP reached the best MMD in the UoC dataset, the gap between BiWGAN-GP and WGAN-GP is minor. Overall, BiWGAN-GP achieves the best quantitative assessment results. (2) Visualized assessment: To visualize the quality of generated results, we show the comparison between the original and generated frequency spectrum of the CWRU dataset in Figure 7. For clarity, the comparison of the UoC dataset is shown in Figure 10 in the appendix. Since the generator is trained unsupervisedly, the generated data is also unlabeled. Therefore, by iterating through the generated samples, we find the sample that is most similar to each category, i.e., samples with the smallest mean square error to original signals. The PCC between the generated and original signal of a specific category is shown in every subfigure.