Application of a novel generative adversarial network to wind power forecasting

As the global economy rapidly develops, energy consumption and carbon dioxide emissions have increased annually, prompting countries to strive for carbon neutrality by 2050. Accurate wind power forecasting can aid power system dispatch departments to obtain wind farms’ output and improve the power system’s new energy absorption capacity by coordinating multiple power generation resources. To this end, this study proposes a novel method for wind power forecasting: the Generative Adversarial Network method-based Deep Q Neural Network (GDQN). Wind power is a nonlinear model with random characteristics like dynamics and uncertainty. The GDQN generates wind power data similar to historical wind power data, solving the problem of insufficient wind power data samples by developing adversarial networks. The deep Q-learning network is then utilized to predict future wind power data. The experimental results based on the actual test of the total power generated by all wind turbines in a complete wind farm indicate that the proposed GDQN method can significantly reduce the Mean Absolute Percentage Error (MAPE %) of wind power forecasting, as compared to other commonly used methods in wind power forecasting.


Introduction
The rapid development of wind power generation technology in response to the energy crisis has been accompanied by challenges posed by wind energy's intermittent and fluctuating nature, particularly when large-scale wind power is integrated into the grid.To ensure the reliable operation of the power system, it is essential to forecast the output power of wind power on a time scale.Wind power forecasting technologies and short-term forecasting have become hot topics for scholars and play a crucial role in the coordinated planning of wind turbines and the economic dispatch of power systems.Wind power forecasting methods can be classified into physical forms, statistical methods, and intelligent learning methods.The physical process uses weather forecasting and site-specific IOP Publishing doi:10.1088/1742-6596/2631/1/012022 2 information to predict power output.Statistical methods rely on historical meteorological values and wind power data to forecast future work.Time series forecasting models [1][2] are widely used for this purpose, although they require more nonlinear fitting knowledge to improve their accuracy.Intelligent learning methods based on artificial intelligence can identify complex relationships between input and output, making them another popular area of research.Machine learning models, including Artificial Neural Networks (ANN) [3][4][5], Machine Learning (ML) [6][7][8], Support Vector Regression (SVR) [9], Support Vector Machine (SVM) [10][11][12][13], and Long Short-term Memory Neural Networks (LSTM) [14][15][16][17][18], are among the methods currently being explored by researchers.

Short-term wind power forecasting based on generative adversarial networks of convolutional and deep Q-networks 2.1. Foreword
Short-term wind power forecasting refers to learning the potential information contained in historical data through network models and mining the development laws in the time series so that decisionmaking information for forecasting future trends can be obtained after calculation.Due to the unstable, nonlinear, and intermittent nature of wind power data, which leads to the problem of low accuracy of wind power forecasting, the most valuable generative adversarial network method for processing data distribution is introduced, which can effectively obtain the output value of the accurate network.At the same time, aiming at the problem of model instability in wind power forecasting of the original generative adversarial network model, the powerful feature extraction ability of convolutional neural network (CNN) and the deep Q network (DQN) with strong recognition ability have used A combination of generative adversarial networks (CQGAN) to mine the internal information of wind power data deeply.Therefore, a short-term wind power forecasting model is proposed based on a convolutional generative adversarial network.The generator and discriminator use a convolutional neural network and deep Q network, respectively, to improve the prediction accuracy of the proposed model.

Conduct of the Q-Learning algorithm
Estimating the evaluation function during the learning process is necessary to solve reinforcement learning problems.This function must evaluate whether a strategy is successful based on the sum of rewards obtained.The basic idea of Q-learning is for the algorithm to learn the optimal evaluation function within the entire state and action space ( ) S A × .The so-called Q-function provides a match as an equation S A R × → , where R is the expected reward obtained by acting a A ∈ in a state S s∈ .Once the intelligent agent learns the optimal Q function, it can identify which action can yield the highest future reward in a specific form.The most common way to implement the Q-learning algorithm is by using a table, where each unit cell represents a value ( ; ) Q s a R = and is initially set to 0. The actions performed a A ∈ by the intelligent agent are selected using a - ε greedy algorithm strategy based on Q.
The core idea of the Q-Learning algorithm is to update the training rules for table elements.The basic steps of the algorithm are as follows: 1. Initialize any values ( ; ) Q s a .
2. Repeat the following operations (for each event): 1) Initialize state s.
2) Repeat (for each time step in the event): 3) Choose an action a A ∈ from s S ∈ by the generated policy of the Q-function.
4) Take action and observer , r s′ 5) Continue until s reaches the terminal state.The parameters used in the Q-value update process include the following steps: 1. a is the learning rate: which takes a value between 0 and 1. Setting a to 0 means the Q-value will IOP Publishing doi:10.1088/1742-6596/2631/1/0120223 never be updated so no learning will occur.Setting a to a more significant value, such as 0.9, means learning can occur more quickly.2. γ is the discount factor: which takes a value between 0 and 1.This reflects a real-world situation where future rewards are worth less than immediate rewards.Mathematically, γ it must be set to a value less than 1 for the algorithm to converge.
3. max ( ; ) Q s a ′ can be obtained in the current state is the reward received by taking optimal action in the future.

Deep Q-Convolutional neural network (DQCNN)
When considering the matrix's perspective, simple Q-Learning algorithms can lead to significant issues as the number of states and possible behaviors expands beyond manageability.Since the state space is discrete, the quantity of states is considerable.This is where deep learning becomes essential.Convolutional neural networks excel at generating optimal features for highly organized data.They can detect Q functions that utilize states and behaviors as inputs and output corresponding Q values.

Q(state; action) = value
Alternatively, you can state as input and generate a value corresponding to each possible behavior:

value for each likely behavior
The above optimization is implemented, as shown in Figure 1

New DQCNN (NDQCNN) network
The new DQCNN uses Experience Reply and Freezing Target Network technologies to solve these problems effectively.Experience recovery removes data correlation by constructing an experienced pool (Replay Buffer), a dataset of sequences generated by the agent's recent experience.The target network freeze stabilizes the learning target by fixing the parameters in the target network for a certain period.The network framework of NDQCNN is shown in Figure 2. First, input a data set of actions, states, rewards, and end flags into the Q network.The network outputs a predicted value predict Q

DQCNN
, and then the best move action is selected based on that value to interact with the environment and obtain the latest state s′ .Next, the network is trained again, and the results of each interaction between the agent and the environment are stored in a fixed-size experience pool.Every once in a while, a network target Q with the same structure and parameters is copied from the Q network to stable output targets.The Q Target network samples data from the experience pool to output stable target values ( , , , ) , where r is the reward value function, γ is the reward discount rate and ( , , , ) Finally, the NDQCNN loss selects the mean squared error (MSE) between two predicted values ( predict Q and target Q ).In contrast to Q-Learning, NDQCN's algorithm leverages the historical experience of each time step to enhance data utilization efficiency.Specifically, NDQCN enables multiple model updates using the same historical background.Additionally, NDQCN utilizes the empirical playback pool method to minimize variance after each update instead of relying on continuous samples like Q-Learning.Moreover, NDQCN employs the observed replay mechanism to automatically average the agent's prior behavior, resulting in a smoother data distribution of the model training samples.This approach prevents parameter oscillation or non-convergence caused by an uneven sample distribution.

Generative adversarial networks GAN network comprises two models, the Generative Model (G) and the Discriminative Model (D).
The generative model extracts potential data distributions from actual data and generates new profile data.Discriminant model D determines the probability that it comes from natural or induced data.
Generative and discriminant models are continuously optimized through minimum-maximum games to improve their ability to generate or discriminate.There are a few applications of GANs for time series forecasting problems, and the basic structure of a GAN network is shown in Figure 3. Figure 3 uses the dummy data G(z) generated by the generative model and the actual data x as input for the discriminator.When G(z) is input, the discriminator outputs "0", and when x is input, the discriminator outputs "1".The two models are trained in an alternating manner.The discriminator model is first fixed, and the generative model is allowed to learn so that the discriminator cannot determine whether the data is real or fake.Then, the generative model is fixed, and the discriminator model learns to distinguish accurate data from counterfeit data.The generator and discriminator have their loss function definitions, which are: The objective function is:

Establishment of the convolutional generative adversarial network model
The wind power data is mainly characterized by nonlinearity and non-stationarity.To address this, a convolutional neural network (CNN) can effectively extract data features and reduce feature dimensions by using convolutional and pooling layers.Furthermore, weight sharing can decrease the model's complexity by reducing the number of weights.A CNN is introduced into the generative adversarial network to construct a model based on a convolutional generative adversarial network (CGAN).Figure 4 shows the CGAN model structure, which consists of three main parts: data preprocessing, generator G, and discriminator D.

Results and discussions
The data used in this study was collected from wind farms in Taiwan, as depicted in Figure 5 ( )  Figure 6 shows that the whole day of May 3, 2022, was predicted using the GDQN method mentioned in the 24-hour wind power generation curve.Figure 7 shows the six different methods used to forecast May 3, 2022; in Figure 6, the comparison chart of other MAPE (%) is obtained from the wind power generation curve of 24 hours a day, and the MAPE (%) obtained using the GDQN method mentioned in this article can be seen from the Figure 7.
The values are lower than the other five methods, it which proves that the GDQN method mentioned in this study can obtain more accurate wind power generation predictions.

Conclusions
This study suggests a solution to the challenge of accurately forecasting wind power due to its unstable, nonlinear, and intermittent data.A short-term wind power forecasting model is proposed that uses a convolutional and deep Q network generative adversarial network.To enhance data distribution processing, the most valuable productive harmful network method is introduced, which effectively shapes the output distribution of the network.Additionally, to address the instability issue in the original generative adversarial network model for wind power forecasting, a combination of convolutional neural network and generative adversarial network is utilized to extract internal information from wind power data.The generator(G) and discriminator(D) employ convolutional neural networks to improve the accuracy of the proposed model's predictions.In this study, GDQN is used as a wind power prediction to improve the accuracy considerably over the other five prediction methods used in this study.Its measured value in MAE is improved compared to other methods, 21.8% to 137%; the measurement in RMSE is enhanced from 21.8% to 172% compared to other methods, and the measured value of the MAPE is improved from 0.49% to 1.28%.Actual example results demonstrate that the proposed method outperforms other models, effectively enhancing the accuracy of short-term wind power forecasting with promising application potential.

Figure 1 .
Figure 1.The implementation of optimization of DQCNN.

Figure 3 .
Figure 3.The basic structure of a GAN network.

Figure 4 .
Figure 4.The structure diagram of the CGAN model.
, from December 1, 2021, to November 30, 2022.The Taiwan Power Company (T.P.C.) obtained the wind power generation data.The research focused on a wind farm situated in southern Taiwan.It utilized data from May 1, 2021, to April 30, 2022, for training a model to predict wind power generation over the next 24 hours.The prediction was based on five meteorological parameters (wind speed, wind direction, temperature, air pressure, humidity), sampled every 15 minutes, with 96 samples collected daily.The data were normalized to a range of [0,1] to standardize the input data and remove inconsistencies between units.The research aimed to predict the wind power value over the next 24 hours, and three evaluation indicators, Mean Absolute Error (MAE), Root Mean Square Error (RMSE), and Mean Absolute Percentage Error (MAPE), were chosen to evaluate the performance of different models objectively.Equations (4) to (6) outline the formulas for calculating these evaluation metrics.
The above column pi y is the model prediction value, ri y the actual value of the model, and n is the number of predicted points.

Figure 5 .
Figure 5. Wind power of every month of T.P.C.
) represents the probability that the discriminator will judge that the input is from accurate data, and G(z) represents the virtual data generated by the generator with low-dimensional random noise z,

Table 1
displays the forecasts utilized by six distinct methods between 7 June 2022 and 6 December 2022.Upon analyzing the MAE, RMSE, and MAPE of wind power generation, it is evident from the table that the values attained through the implementation of the GDQN method, as described in this study, are notably lower than those of the other five methods.These results substantiate the superiority of the GDQN method outlined in this study.

Table 1 .
Comparison of error values of different methods.