# Dynamic Simulation Model-Driven Fault Diagnosis Method for Bearing under Missing Fault-Type Samples
## 2 Theoretical Background
### Wasserstein Generative Adversarial Networks with Gradient Normalization (WGAN-GN)
The generator performs better at simulating the real distribution if the discriminator can operate in a bigger function space because it can estimate the Wasserstein distance with greater accuracy. The Lipschitz constraint, meanwhile, reduces the steepness of the value surface and lessens the overfitting of the discriminator. In comparison to KL-divergence and JS-divergence, Wasserstein distance provides superior smoothing properties. The vanishing gradient issue can be theoretically resolved. Three characteristics can be used to define the imposition of a Lipschitz constraint on the discriminator. 1. Constraint on a model or module. Model-level restriction, in our opinion, is preferable to module-level constraint because it will limit the model capacity of layers, drastically lowering the potential of neural networks. 2. Constraint that are sample-based or not. The non-sampling-based method performs better than the sampling-based method since the latter may not be applicable to data that has not already been sampled. 3. Firm or flexible restriction. Since the continuous Lipschitz constant ensures gradient stability against unobserved data, the hard constraint outperforms the soft constraint. How to achieve the Lipschitz constraint is a problem that needs to be focused on in neural networks, because it is difficult to maintain a great balance between the Lipschitz constraint and network capacity. Many methods have been proposed to achieve this constraint, but most of them cannot meet the above three conditions. It has been demonstrated that the Lipschitz constant of layer level Lipschitz constraints (such as SN-GAN) may drastically drop when the number of layers increase. The ideas of parameter clipping and spectral normalization (SN) are similar. They both guarantee that the Lipschitz constant of each layer is bounded by constraining parameters, so the total L constant is also bounded. The gradient penalty ensures that the \"soft constraint\" is imposed through the penalty term. Therefore, WGAN-GN is proposed as shown in Figure 5. To be specific, ReLU or LeakyReLU is usually adopted as the activation function. It is a \"piecewise linear function\" under this activation function, which means that it is a linear function in the local continuous region, except for the boundary. Correspondingly, it is also a constant vector. The loss function is as follows:  
\[\hat{D}=D(x)/\left(\|\ \
abla D(x)\ \|+|D(x)|\right) \tag{12}\]  
\[L(D)=\mathbb{E}_{\widetilde{x}\sim p_{\widetilde{x}}(x)}\big{[}\hat{D}(D(x)) \big{]}-\mathbb{E}_{\widetilde{x}\sim p_{\widetilde{x}}(x)}[\hat{D}(D( \widetilde{x}))] \tag{13}\]  
Figure 3:0  
Figure 3:1 Structure of WGAN-GN. Among them, \(\hat{D}\) is the custom function, \(D(x)\) is the independent variable (\(G(x)\) or \(D(x)\)), \(\parallel\
abla D(x)\parallel\) is the any norm of a vector. The employed gradient normalization (GN) module has few hyperparameters and is easy to apply to different rotating machines without substantial modifications.