*Article* **Collaborative Optimization of CNN and GAN for Bearing Fault Diagnosis under Unbalanced Datasets**

**Diwang Ruan 1,\*, Xinzhou Song 2, Clemens Gühmann <sup>1</sup> and Jianping Yan <sup>3</sup>**


**Abstract:** Convolutional Neural Network (CNN) has been widely used in bearing fault diagnosis in recent years, and many satisfying results have been reported. However, when the training dataset provided is unbalanced, such as the samples in some fault labels are very limited, the CNN's performance reduces inevitably. To solve the dataset imbalance problem, a Generative Adversarial Network (GAN) has been preferably adopted for the data generation. In published research studies, GAN only focuses on the overall similarity of generated data to the original measurement. The similarity in the fault characteristics is ignored, which carries more information for the fault diagnosis. To bridge this gap, this paper proposes two modifications for the general GAN. Firstly, a CNN, together with a GAN, and two networks are optimized collaboratively. The GAN provides a more balanced dataset for the CNN, and the CNN outputs the fault diagnosis result as a correction term in the GAN generator's loss function to improve the GAN's performance. Secondly, the similarity of the envelope spectrum between the generated data and the original measurement is considered. The envelope spectrum error from the 1st to 5th order of the Fault Characteristic Frequencies (FCF) is taken as another correction in the GAN generator's loss function. Experimental results show that the bearing fault samples generated by the optimized GAN contain more fault information than the samples produced by the general GAN. Furthermore, after the data augmentation for the unbalanced training sets, the CNN's accuracy in the fault classification has been significantly improved.

**Keywords:** fault data generation; Convolutional Neural Network (CNN); Generative Adversarial Network (GAN); bearing fault diagnosis; unbalanced datasets
