# MTC-GAN Bearing Fault Diagnosis for Small Samples and Variable Operating Conditions
## 4 Experimental Validation
### Model Testing
This reflects the fine-tuning process of the generator in producing high-quality samples. At this stage, the discriminator retains a certain level of distinguishing ability, while the generator is able to produce higher-quality samples. Overall, the loss curves indicate that the MTC-GAN model has achieved effective adversarial learning during training, gradually reaching equilibrium, with a significant improvement in the quality of the samples generated by the generator. However, it is worth noting that as the number of additional samples continues to increase, the stability of the model begins to decline, showing noticeable fluctuations. This phenomenon may be attributed to the possibility that an excessive number of generated samples leads the generator to overfit the training data, resulting in instability on the test set. While the increase in additional samples enhances the model's learning ability to some extent, it also increases the difficulty of learning complex features. Therefore, it is crucial to precisely control the number of additional samples generated in each round, ensuring the quality and diversity of the generated samples while preventing the generator from overfitting, in order to maintain the model's stability and robustness. In this experiment, the number of additional samples for each input round was selected to be six. A comparison of the final accuracy obtained under different rotational speed conditions with the initial accuracy is shown in Figure 9. This indicates that the dynamic input strategy enables the MTC-GAN model to demonstrate excellent classification ability in different datasets. The dynamic input strategy can significantly improve the performance of the model. This strategy provides an effective method for GAN model training. It ensures the quality of generated samples while enabling the model to achieve the expected results faster within the specified number of training rounds and optimizes the model's performance in diverse data environments. Figure 8: The generator loss and discriminator loss curves of the MTC-GAN model. Further, we will focus on analyzing the performance of the model under small sample imbalanced data and varying working conditions. To verify the robustness of the proposed method, four test scenarios are designed. In the first scenario, dataset 1 of 1797 rpm is used to train the classifier, and datasets 2, 3, and 4 of 1772 rpm, 1750 rpm, and 1730 rpm are used as the test sets. In the second scenario, dataset 2 of 1772 rpm serves as the training set, and the remaining datasets serve as the test sets. Similarly, dataset 3 and dataset 4 serve as the training sets, and the rest of the datasets serve as the test sets in the third and fourth scenarios, respectively. This approach involves training the classifier on one speed dataset and testing it on three datasets with different speeds. In this way, the model's ability to adapt to speed variations is systematically evaluated. The preliminary diagnostic performance of the model under the above variable operating conditions is detailed in Table 7. This clearly indicates that the proposed method is effective for diagnosing bearing faults and is unaffected by variations in the rotational speed, whether random or planned. As mentioned earlier, this is due to the uniformity of the texture in the vibration images, which were constructed after determining their optimal size. The comparison of the final accuracy obtained under variable working conditions with the initial accuracy is shown in Figure 10. To analyze the classification performance of the model under different working conditions in more detail, the confusion matrix of the classification results under different scenarios is shown in Figure 11. It can be seen that the classification accuracy of the model for different RPM conditions is maintained at a high level in all four test scenarios. This further proves that the MTC-GAN model can effectively