# Generative Adversarial Network and Its Application in Energy Internet

Authors: Zeqing Xiao
Journal: Mathematical Problems in Engineering
 (2022)

---

## Abstract

Energy Internet (EI) can provide consumers with flexible energy-sharing services. Recently, artificial intelligence (AI) technology has been widely used in the field of EI. Generative adversarial network (GAN) is one of the hottest research directions in the field of AI in recent years, and its excellent data generation ability has attracted wide attention. First, this paper introduces the framework, advantages, disadvantages, and improvement of classic GAN. Then, the application of GAN in the field of EI is reviewed. Finally, the paper is summarized, and the possible application of GAN in EI is prospected.


---

## Body

## 1. Introduction

Whenever stability of energy Internet (EI) is concerned, transient stability is given the highest priority. The foundation of the Internet of things construction is based on the completion and the correction of measurement data [1]. The change in the model and the shortage of sample size will lead to difficulties in predicting the critical clearing time [2]. In the process of collecting, transmitting, and converting data, it is inevitable to be interrupted or disturbed, resulting in the loss of some data. The traditional data reconstruction method only considers the distribution of single data and does not consider the correlation between historical load change of power system, measurement variables, and measurement points [3]. One of the research hotspots in the field of power grid security is the data-driven TSA method. The scarce transient instability data bring great difficulties to the data acquisition method to judge the instability [4].Using a deep learning algorithm to detect network attacks is the most advanced method to ensure the security of the smart grid. However, the performance of the detection system will be limited by the small number of negative samples [5]. At present, the scenario method has become a popular method for uncertainty modeling of renewable energy [6]. The uncertainty and fluctuation modeling of renewable energy (such as wind and solar energy) production based on efficient and reliable scenario generation can be used for power system planning and operation [7].The rapid growth of distributed wind power generation system greatly depends on the selection of the uncertainty sets [8]. Early data quality research focused on developing technologies for querying multiple data sources and building large data warehouses [9]. At first, researchers proposed to express data quality with metadata to facilitate data quality management [10]. Literature [11] holds that data quality is the ability of data to meet user needs. The core of data quality evaluation is how to evaluate each dimension concretely. The current methods are mainly divided into two categories: qualitative strategy and quantitative strategy [12]. So far, there is no precise definition of data quality [13], and there is no systematic data quality evaluation index and governance standard [14, 15]. At the same time, the existing data quality management methods have the problems of low accuracy and efficiency. In the EI, with the vigorous development of distributed new energy, the monitoring data of large-scale new energy are becoming more and more abundant. However, due to the intermittence, periodicity, randomness, and volatility of the grid-connected monitoring data of new energy such as wind power and photovoltaic, the grid-connected data have quality problems such as data missing, duplication, abnormality, and uneven distribution, which seriously affects the accuracy and efficiency of data feature extraction and data mining [16]. Therefore, the research and application of key technologies of large-scale distributed new energy data quality are of great significance to guide and optimize the planning and construction of new energy and standardize and lead the healthy and orderly development of the new energy industry.Traditional methods mostly rely on threshold, linear mapping, and other methods to analyze data. There are serious deficiencies in large-scale data quality management, such as being unable to process large-scale information in a short time, or low operation accuracy, especially for distributed new energy source data with randomness and volatility, in which the data characteristics are more complex [17]. Traditional data management methods are not suitable in dealing with these problems. However, artificial intelligence (AI) algorithm has incomparable advantages in dealing with these problems [18]. Figure 1 shows a typical EI system diagram. Figure 2 depicts areas in which AI technology can be used to improve performance and to manage the operation of microgrid (MG) optimally.Figure 1
The diagram of EI.Figure 2
Application of AI in different aspects of MG.As a new semisupervised or unsupervised learning technology, generative adversarial network (GAN) has attracted much attention [19]. GAN realizes learning by implicitly modeling the high-dimensional distribution of data. GAN provides a method to learn deep representation without extensive annotation of training data and obtain back-propagation signals through the competitive process of a pair of networks. In 2018, MIT Technology Review listed GAN as one of the “Top 10 Breakthrough Technologies” in the world. Sun Yan’s team at Tsinghua University proved for the first time that quantum computing can use GAN with an accuracy of 98.8%, which create a new milestone in quantum machine learning. The outstanding performance of GAN in generating data is becoming a hot spot in the research of new energy data quality in EI.Focusing on the application of GAN in EI, this paper first introduces the principle, advantages, and disadvantages of classical GAN. And the theoretical improvement of GAN is summarized. Then, the application of GAN in the field of EI is summarized. And especially, the application of GAN in new energy data quality is described in detail. Finally, the potential application of GAN in the research of EI is prospected, which can provide a reference for the application of GAN to the research of EI in the future.


## 2. Classical GAN

### 2.1. Advantages and Disadvantages of GAN

The competitive way of GAN no longer requires a hypothetical data distribution, but directly sampling, which can produce better samples than other models, so as to truly approach the real data in theory.GAN does not need a Markov chain, only uses back propagation to obtain gradient. GAN does not need reasoning in the learning process, and a variety of functions can be integrated into the model [20]. GAN cannot learn because the generator begins to degenerate, whose learning process is difficult, and the schemes oscillate, or generator tends to collapse [21]. That is, generator collapse produces a small number of similar samples (partial collapse), and in the worst case, only one sample [22].One way to solve the problem of poor sample diversity generated by GAN is to increase the diversity of the generator and use multiple GAN to cover different patterns of probability distribution [23]. Another way to mitigate pattern collapse is to change the distance metric used to compare statistical distributions.The research shows that the excellent performance of GAN can be reflected in Nash equilibrium. Under the condition of a convex function, gradient descent can ensure the realization of Nash equilibrium. And finding the solution of Nash equilibrium is a difficulty [24]. When a neural network represents both sides of the game, in the case of not actually reaching equilibrium, both sides of the game can adjust their strategies to achieve Nash equilibrium. GAN does not need to be modeled in advance, which makes GAN too free. One of the solutions is to add constraints to GAN [25]. Another idea is not to let GAN complete all tasks at once, but generate some at a time, such as generating a complete picture multiple times [26].


## 2.1. Advantages and Disadvantages of GAN

The competitive way of GAN no longer requires a hypothetical data distribution, but directly sampling, which can produce better samples than other models, so as to truly approach the real data in theory.GAN does not need a Markov chain, only uses back propagation to obtain gradient. GAN does not need reasoning in the learning process, and a variety of functions can be integrated into the model [20]. GAN cannot learn because the generator begins to degenerate, whose learning process is difficult, and the schemes oscillate, or generator tends to collapse [21]. That is, generator collapse produces a small number of similar samples (partial collapse), and in the worst case, only one sample [22].One way to solve the problem of poor sample diversity generated by GAN is to increase the diversity of the generator and use multiple GAN to cover different patterns of probability distribution [23]. Another way to mitigate pattern collapse is to change the distance metric used to compare statistical distributions.The research shows that the excellent performance of GAN can be reflected in Nash equilibrium. Under the condition of a convex function, gradient descent can ensure the realization of Nash equilibrium. And finding the solution of Nash equilibrium is a difficulty [24]. When a neural network represents both sides of the game, in the case of not actually reaching equilibrium, both sides of the game can adjust their strategies to achieve Nash equilibrium. GAN does not need to be modeled in advance, which makes GAN too free. One of the solutions is to add constraints to GAN [25]. Another idea is not to let GAN complete all tasks at once, but generate some at a time, such as generating a complete picture multiple times [26].


## 3. Overview of GAN and Its Improvement

In view of the disadvantages of the original GAN, various excellent GAN improvement variants have emerged in recent years.


### 3.1. Improvement of Training Skills

Several stable training techniques such as feature matching, small batch training discriminator, historical average, and category label smoothing can train models that could not be solved before [27]. Info GAN deals with complex factors in image appearance, including changes in posture, illumination, and emotional content of facial images [28]. Although batch normalization (BN) can accelerate training in the early stage, it may have a negative impact on the quality of the training model and the stability of the training process. On this basis, a new weight normalization method is proposed, which can improve the reconstruction ability and training speed of the neural network, especially the stability of neural network. Therefore, the weight normalization method should be used to replace BN [29] in GAN training. A semisupervised learning workflow based on GAN for acoustic impedance inversion is proposed [30].Huang [31] proposed Wasserstein GAN (WGAN) by using the approximation of Wasserstein distance instead of the cost function of GAN. Unlike the original GAN cost function, WGAN is more likely to provide a gradient useful for updating generator. Although WGAN has made progress in stability training, sometimes it can only generate poor samples or cannot converge. The unified variational autoencoders (VAEs) are proposed by Mescheder et al. Adversarial training is carried out in the form of the adversarial variational Bayes (AVB) framework, which makes the reasoning model more flexible, retains most of the advantages of standard VAEs, and is easy to implement [32]. AVB attempts to optimize the same criteria as VAEs, but uses adversarial training objectives instead of Kullback–Leibler (K-L) divergence. The AVB clearly specifies the use of divergence measurement, so WGAN cannot be applied.Bidirectional GAN (BiGAN) is used as a method of learning inverse mapping. The obtained learning feature representation is useful for assisting supervised discrimination tasks [33]. However, the observed reconstruction results are often only vaguely similar to the input and are often only semantic rather than the pixel value in terminology.GAN is applied to optimize the results in the superresolution technology, which challenged the discriminator by adding noise to the samples before sending them to the discriminator. Better results are obtained than the comparison method, which can restore the coded pictures [34]. However, this superresolution technology can only add limited details to low-resolution images and cannot correct large defects such as StackGAN [35].


### 3.2. Model Architecture Improvement

By adding constraints to GAN, we can obtain conditional GAN [36]. CGAN can solve the shortcomings that GAN is too free and uncontrollable. CGAN model can not only generate MNIST numbers conditional on class labels but also be used to learn multimodal models. However, the conditional setting of label vectors containing thousands of classes using one-bit efficient coding is not feasible in terms of memory overhead and computing time overhead [37].The deep convolutional GAN (DCGAN) enablesG and D to learn good up sampling and down sampling operations, which helps to improve the quality of image synthesis [38]. And G is more controllable and stable. DCGAN uses BN on the generator and discriminator to avoid crash. The research shows that using the leaky ReLU activation function between the discriminator interlayer has better performance than using the conventional ReLU. In addition, DCGAN can also support addition and subtraction at the “semantic” level of images. However, DCGAN is difficult to train, and the training process can only be [39]. Early experiments on the data set CIFAR-10 show that it is more difficult to train generator and discriminator networks using CNNs with the same capacity and representation ability than those used for supervised learning. Laplacian pyramid GAN (LAPGAN) based on GAN and CGAN provides a solution to this problem [40]. However, training GAN needs to determine the Nash equilibrium of nonconvex game with continuous high-dimensional parameters. When used to seek Nash equilibrium, the LAPGAN algorithm may not converge. Literature [41] proposed a recursive generation model that can be trained through adversarial training (recurrent generative model, GRAN).Zhang et al. studied the problem of three-dimensional object generation by using the latest progress of volume convolution network and GAN and proposed three-dimensional GAN [42]. Hazra proposed an alternative method of cutting weights, which performs better than the standard WGAN and can stably train various GAN architectures with little super parameter adjustment [43]. The random clipping based on gradient can accurately recover the potential vector and has strong robustness to noise. Random clipping is more accurate and robust than standard. The use of full convolutional network [44] enables GAN to learn more appropriate down-sampling methods of spatial and has achieved good results in image colorization and image detection.


## 3.1. Improvement of Training Skills

Several stable training techniques such as feature matching, small batch training discriminator, historical average, and category label smoothing can train models that could not be solved before [27]. Info GAN deals with complex factors in image appearance, including changes in posture, illumination, and emotional content of facial images [28]. Although batch normalization (BN) can accelerate training in the early stage, it may have a negative impact on the quality of the training model and the stability of the training process. On this basis, a new weight normalization method is proposed, which can improve the reconstruction ability and training speed of the neural network, especially the stability of neural network. Therefore, the weight normalization method should be used to replace BN [29] in GAN training. A semisupervised learning workflow based on GAN for acoustic impedance inversion is proposed [30].Huang [31] proposed Wasserstein GAN (WGAN) by using the approximation of Wasserstein distance instead of the cost function of GAN. Unlike the original GAN cost function, WGAN is more likely to provide a gradient useful for updating generator. Although WGAN has made progress in stability training, sometimes it can only generate poor samples or cannot converge. The unified variational autoencoders (VAEs) are proposed by Mescheder et al. Adversarial training is carried out in the form of the adversarial variational Bayes (AVB) framework, which makes the reasoning model more flexible, retains most of the advantages of standard VAEs, and is easy to implement [32]. AVB attempts to optimize the same criteria as VAEs, but uses adversarial training objectives instead of Kullback–Leibler (K-L) divergence. The AVB clearly specifies the use of divergence measurement, so WGAN cannot be applied.Bidirectional GAN (BiGAN) is used as a method of learning inverse mapping. The obtained learning feature representation is useful for assisting supervised discrimination tasks [33]. However, the observed reconstruction results are often only vaguely similar to the input and are often only semantic rather than the pixel value in terminology.GAN is applied to optimize the results in the superresolution technology, which challenged the discriminator by adding noise to the samples before sending them to the discriminator. Better results are obtained than the comparison method, which can restore the coded pictures [34]. However, this superresolution technology can only add limited details to low-resolution images and cannot correct large defects such as StackGAN [35].


## 3.2. Model Architecture Improvement

By adding constraints to GAN, we can obtain conditional GAN [36]. CGAN can solve the shortcomings that GAN is too free and uncontrollable. CGAN model can not only generate MNIST numbers conditional on class labels but also be used to learn multimodal models. However, the conditional setting of label vectors containing thousands of classes using one-bit efficient coding is not feasible in terms of memory overhead and computing time overhead [37].The deep convolutional GAN (DCGAN) enablesG and D to learn good up sampling and down sampling operations, which helps to improve the quality of image synthesis [38]. And G is more controllable and stable. DCGAN uses BN on the generator and discriminator to avoid crash. The research shows that using the leaky ReLU activation function between the discriminator interlayer has better performance than using the conventional ReLU. In addition, DCGAN can also support addition and subtraction at the “semantic” level of images. However, DCGAN is difficult to train, and the training process can only be [39]. Early experiments on the data set CIFAR-10 show that it is more difficult to train generator and discriminator networks using CNNs with the same capacity and representation ability than those used for supervised learning. Laplacian pyramid GAN (LAPGAN) based on GAN and CGAN provides a solution to this problem [40]. However, training GAN needs to determine the Nash equilibrium of nonconvex game with continuous high-dimensional parameters. When used to seek Nash equilibrium, the LAPGAN algorithm may not converge. Literature [41] proposed a recursive generation model that can be trained through adversarial training (recurrent generative model, GRAN).Zhang et al. studied the problem of three-dimensional object generation by using the latest progress of volume convolution network and GAN and proposed three-dimensional GAN [42]. Hazra proposed an alternative method of cutting weights, which performs better than the standard WGAN and can stably train various GAN architectures with little super parameter adjustment [43]. The random clipping based on gradient can accurately recover the potential vector and has strong robustness to noise. Random clipping is more accurate and robust than standard. The use of full convolutional network [44] enables GAN to learn more appropriate down-sampling methods of spatial and has achieved good results in image colorization and image detection.


## 4. Application of GAN in EI

The incompleteness of PMU data can be solved by GAN, and GAN can obtain high DSA accuracy with low computational complexity [45]. GAN is proposed to synthesize multiple PMU measurement streams directly from historical data. The proposed method can simultaneously create multiple PMU measurement streams that reflect practically meaningful electromechanical dynamics which observe Kirchhoff's laws [46].WGAN can solve the problems of changing models and insufficient samples in CCT prediction [47]. WGAN can automatically learn the correlation between measured values and load fluctuation rule in the power system, which is difficult to model. In order to fill in incomplete load data without using other relevant data, the GAN model can automatically learn these complex load characteristics in the process of unsupervised training for complex load characteristics that are difficult to be explicitly modeled.The operation results show that GAN can achieve satisfactory results for discontinuous missing load reconstruction and continuous missing load reconstruction, including the loss of massive data [1]. To avoid uncoordinated problems, Yin and Zhang proposed a long-term smart generation control framework with a single time scale to replace the conventional combined generation control framework with two time scales and then proposed time series GAN controller for long-term smart generation control of microgrid [6].Using GAN to generate a large number of negative samples can improve the performance of the most advanced detection system by 4% [5]. Scenario generation helps to simulate the uncertainty and variability of renewable energy power generation. It is an important tool for the decision-making of renewable energy with high permeability power [48]. GAN is applied to the scene generation of renewable resources and uses the ability of a deep neural network and a large amount of historical data to directly generate scenes consistent with the same historical data distribution. The case study based on the model shows that GAN can generate scenes well for both wind power generation and solar power generation. This method does not need to fit the probability model but generates a new scene based on historical data. The method is easy to expand and better than the existing model-based methods. However, the mixed scenario generated by historical data with several different modes may not be suitable for subsequent optimization problems. In order to overcome this challenge, Bayesian [49] captures the inherent diversity in scene clusters and reproduces each of them successfully.A data-driven method is proposed for renewable scenario creation by embedding interpretable manifold space in controllable GAN [7]. Wasserstein GAN has more advantages in modeling spatiotemporal relationship [50]. GAN is combined with reinforcement learning, and long short-term memory structure is used to capture time correlation to avoid manual marking, which can capture complex weather dynamics [8]. The deep learning GAN algorithm for modeling unknown distribution can predict scenarios under different levels of prediction uncertainities [6].At present, a lot of research has been done on the data quality of smart grid [51, 52]. The methods are roughly divided into (1) traditional bad data detection methods, such as weighted residual method, quantity measurement mutation detection method, and objective function extreme value detection method [53]; (2) relatively new detection methods, such as fuzzy equivalent matrix cluster analysis [54], neural network [55], and cloud technology [56]. Although the method based on residual class has an obvious effect on the detection and identification of bad data, it has some disadvantages such as residual pollution [57]. The comprehensive detection and correction method of voltage data quality based on multisource and multitemporal and spatial information can effectively detect and correct the voltage data that does not meet the accuracy requirements and provide a reference for operators to evaluate the data quality [58]. False data injection (FDI) attacks interfere with control decisions by destroying network data integrity, which is a typical network attack [59].Filling in the missing data ensures the authenticity, integrity, and accuracy of power grid business data and promotes the development of smart grid big data [60]. The optimization algorithms of optimal data parameters include the genetic algorithm [61] and the chaotic genetic optimization algorithm [62]. New energy data usually have low-value density and few abnormal data (such as fault data), but it is the key to learning many algorithms. To solve the small sample problem, we usually improve the algorithm to make it more suitable for the small sample. Another idea is to expand the small sample data. The traditional methods include bootstrap method [63], support vector machine [64], and professional software simulation [65]. Reference [65] chose to build the simulation model of a real urban power grid in the power grid simulation software BPA (Bonneville power administration) to generate the simulation data and verified the optimization algorithm of the EI reactive power decision based on deep reinforcement learning on the simulation data.Although the volume of big data in smart grid is huge, the quality is often not high [60]. Power big data usually have low value density; that is, most of the collected data are normal sample data, and there are few abnormal data, which is the key for deep learning [66]. Therefore, solving the problem of small sample learning is the key to the in-depth application of deep learning in smart grid. Tan et al. [67] proposed an integration technology of intelligent distribution and utilization of heterogeneous data based on GAN for solving the problem that intelligent allocation and utilization in small sample environment with low utilization of heterogeneous data resources. By introducing GAN theory, the method expands the sample space according to the target samples whose measurement indexes have been completed.


## 5. Conclusion

As a rookie in the field of AI in recent years, the excellent data generation ability of GAN is becoming a new research hotspot in the research of EI. First, this paper introduces the classical theory of GAN and its advantages and disadvantages and summarizes the improvement of GAN. Then, the application of GAN in the field of EI is summarized and discussed.GAN method is data-driven and model-free and does not need any specific statistical assumptions. Therefore, GAN can be applied to the most interesting stochastic processes in EI. Because the GAN method uses feedforward neural network structure, which can generate power data very efficiently without sampling potentially complex high-dimensional processes. In future work, it is suggested to extend GAN to the design of high penetration decision-making strategy for EI. In addition, various excellent variants of GAN have not been widely used in the research of EI. Tracking the improvement of GAN and applying it to the field of EI are a novel and challenging attempt, which plays a positive role in promoting the research of EI.



---

*Source: 9985522-2022-09-22.xml*