# Partial Discharge Data Augmentation and Pattern Recognition Method Based on DAE-GAN +
## 3 Data Augmentation and Pattern Recognition Method Based on DAE-GAN
### DAE-GAN Network and Its Training Process  
The DAE is incorporated into the GAN's sample generation process to impose constraints, enhancing the authenticity of the generated data. A strong inverse relationship exists between a set and its complementary set, allowing the latter to provide additional probabilistic information for the same class. During the generation process, samples from other classes are introduced as complementary data to further enhance the process. The DAE-GAN network structure is depicted in Figure 5[21], with red dashed lines showing the flow of generated data. In DAE-GAN, the generator not only improves the quality of generated data through the constraints of the DAE but also introduces complementary data to provide an additional reference for minority classes. This mechanism allows the generator to produce diverse, high-quality samples even in data-scarce scenarios, thereby enhancing the generalization for minority class samples. With its strengths in noise reduction, increasing sample diversity, addressing data imbalance, and handling small-sample challenges, DAE-GAN is particularly suited for managing limited and unevenly distributed partial discharge samples in electrical equipment. The CWGAN-GP models serve as the basis for sample generation. Since \(\mathbf{x_{r}}\), \(\mathbf{y}\), and \(\mathbf{x_{o}}\) are in the same space, they share a common distance-cost function. Consequently, the Kantorovich-Rubinstein dual form [26] of the Wasserstein distance in CWGAN-GP is given in Equation (3). \[\left\{ \begin{array}{l}W\big{(}P_{r},P_{g}\big{)}=\underset{\|D\|_{L}\leq 1}{ \max}E[D(\mathbf{x_{r}}|\mathbf{c})]-\\ \qquad\qquad\qquad E[D(\mathbf{G}(\mathbf{z}|\mathbf{c})|\mathbf{c})]\\ W(P_{r},P_{o})=\underset{\|D\|_{L}\leq 1}{\max}E[D(\mathbf{x_{r}}|\mathbf{c})]-\\ \qquad\qquad\qquad E[D(\mathbf{x_{o}}|\mathbf{c})]\end{array} \right. \tag{3}\]  
Using the discriminator \(D\) as the distance-cost function, the generative network should satisfy both distance equations in Equation (3) simultaneously [27]. The decoder must also both deceive the discriminator and satisfy Equation (1). The loss functions for each module are provided in Equation (4). In Equations (4) and (5), \(L_{En}\), \(L_{De}\), \(L_{D}\), and \(L_{G}\) represent the loss functions for the encoder, decoder, discriminator, and latent code generator, respectively. \(\gamma_{1}\) and \(\gamma_{2}\) are adaptive coefficients for multi-objective functions, balancing the optimization progress between the discriminator and decoder to prevent mode collapse. \(\beta_{1}\) and \(\beta_{2}\) are set to \(1\times 10^{-10}\) to avoid division by zero, which could cause algorithm failure. \(L_{\text{margin}}\) represents  
Figure 5: Structure diagram of DAE-GAN [21]. the reconstruction error penalty, ensuring the error is not dominated by the gradient. \(M\) is the penalty factor, \(ma\) is the reconstruction error margin, and \(\max\{\cdot\}\) is the max function. \[\left\{ \begin{array}{l}L_{En}=\min\limits_{En}\sum\limits_{i=1}^{n}\left( \boldsymbol{x}_{ri}-\boldsymbol{x}_{ri}^{\boldsymbol{\wedge}}\right)^{T}\! \left(\boldsymbol{x}_{ri}-\boldsymbol{x}_{ri}^{\boldsymbol{\wedge}}\right)\\ L_{De}=\min\limits_{De}M\cdot L_{margin}-\gamma_{2}E_{z\sim P_{z}}\!\left[D \!\left(x_{f}\middle|\boldsymbol{c}\right)\right]+\\ \sum\limits_{i=1}^{n}\left(\boldsymbol{x}_{ri}-\boldsymbol{x}_{ri}^{\boldsymbol {\wedge}}\right)^{T}\!\left(\boldsymbol{x}_{ri}-\boldsymbol{x}_{ri}^{\boldsymbol {\wedge}}\right)\\ L_{D}=\min\limits_{D}\{-(1+\gamma_{1})E_{x_{r}\sim P_{r}}[D(\boldsymbol{x}_ {r}|\boldsymbol{c})]+\\ \gamma_{1}E_{\boldsymbol{x}_{o}\sim P_{o}}[D(\boldsymbol{x}_{o}|\boldsymbol{c })]+\\ E_{z\sim P_{z}}\!\left[D\!\left(x_{f}\middle|\boldsymbol{c}\right)\right]\}\\ L_{G}=\min\limits_{G}\!\left\{-E_{z\sim P_{z}}\!\left[D\!\left(x_{f}\middle| \boldsymbol{c}\right)\right]\right\}\end{array} \right. \tag{4}\]  
where  
\[\left\{