# Wind Power Prediction considering Ramping Events Based on Generative Adversarial Network

Authors: Qiyue Huang
Journal: Journal of Electrical and Computer Engineering
 (2021)

---

## Abstract

In view of the growing depletion of traditional fossil fuels and their adverse impact on natural environment, wind energy has gained increasing popularity across the globe. Characterized by wide distribution, low cost, and well-rounded technology, it has achieved fast-growing installed capacity in recent years. However, wind power is volatile and random in nature and the power ramping events caused by extreme weather always threaten the safe, stable, and economic operation of the power grid. To address the problems of insufficient sample data and low prediction accuracy in existing ramping prediction methods, a new way of wind power prediction considering ramping events based on Generative Adversarial Network (GAN) is proposed. First of all, the ramping events get identified and separated from the database of historical wind power, and the feature set of historical ramping events is then extracted according to the waveform and meteorological factors. Taking the feature set which integrates similar feature with historical one as the input of GAN, the simulated ramping data are continuously produced through the adversarial training of the generator and discriminator, thus enriching the ramping database. After that, the expanded ramping database can be applied to predict the ramping power through the LSTM model. An experiment based on the wind power dataset in a certain area of northwest China further verifies the effectiveness and superiority of this method compared with traditional ones.


---

## Body

## 1. Introduction

Energy powers the progress of human society. It brings people abundant material comforts and enjoyment. However, in the meantime, it may also cause serious environmental pollution to the earth. For example, traditional fossil fuels produce greenhouse gases such as carbon dioxide and sulfur oxides and toxic heavy metal particles such as mercury. Apart from that, fossil energy is exhaustible and faces the threat of resource depletion. Therefore, renewable clean energy has become the focus of research at home and abroad [1]. Wind energy, featured by large reserves, wide distribution, little pollution, and well-rounded technology, is widely favored among the power system [2]. However, it can be easily affected by wind speed, which is naturally random and intermittent, unstable, and difficult to control [3]. Especially the wind power ramping events occurring in extreme weather have posed great challenges to the safe and stable operation of power grid. Wind power ramping events here refer to the large fluctuation of output power in a short time caused by climate change happening in wind power stations, which may lead to large fluctuation of system frequency and even serious blackouts afterwards [4]. For this reason, improving the prediction accuracy of wind power is of great significance to the regular service of power system [5].Wind power ramping prediction can be divided into direct prediction and indirect prediction [6]. The former is to directly predict the characteristics of ramping events according to the recognition mechanism trained by historical data [7]. The latter refers to the detection and identification based on the wind power prediction method using the definition of ramping [8–11]. Zheng and Kusiak [12] predicted the ramp rate of wind power directly based on data mining algorithm and compared the prediction performance of five algorithms from different time scales. Zareipour et al. [13] introduced an SVM-based trainer on the basis of historical data to directly classify and predict the ramping range of wind power. Cui et al. [14] used statistical models to analyze the probability distribution of ramp amplitude, rate, and duration of wind power ramping time at different time scales. Besides, Mingjian et al. [15] also decomposed the original ramp power considering the strong tracking and prediction ability of Atomic Sparse Decomposition (ASD) to nonstationary signals, and the decomposed atomic components are self-predicted. Ouyang et al. [16] proposed a prediction method of correcting wind power according to the similar characteristics of the same type of ramping event under the same meteorological conditions. The direct prediction method is intuitive and accurate, but it requires a lot of historical data as the training model [17]. However, wind power ramping events are part of low-probability events and the lack of historical data restricts the development of this method.In this paper, a wind power prediction method considering ramping events based on Generative Adversarial Network (GAN) is proposed. According to its definition, the set of ramping events is separated from historical wind power data. In consideration of meteorological factors, the historical ramping feature set is obtained after feature extraction. In order to enrich the number of samples, GAN is used to generate more simulated ramping data. GAN is composed of two parts: the generator and the discriminator. The generator continuously produces simulated ramping data according to the input feature set. The discriminator is designed to distinguish whether the data image is historical data or simulated data. Through the adversarial training of generator and discriminator, the authenticity of simulated ramping images is continuously improved. Adversarial training means that the generator generates simulated data similar to historical data, while the discriminator tries to distinguish historical data from simulated data. When the feature distribution of the simulated data image generated by the generator is basically the same as that of the historical data and the discriminator cannot distinguish it, the training is finally completed. Simulated ramping data are then added to the historical set to realize the expansion of the database. Then, re-extraction of the feature set is achieved by using it as the input of the LSTM neural network to predict the power of ramping events. Taking the wind power dataset of a certain region in Northwest China as the basis, the feasibility of the proposed method is verified through simulated experiments.


## 2. Characteristics Analysis of Wind Power Ramping Events

Wind power ramping events refer to the large fluctuation of wind power in a short time when wind farms are affected by extreme weather. They pose a serious threat to the quality of the power grid and the safe and stable operation of the system and even cause problems such as frequency instability and load shedding [18]. Ramping events are divided into ramping up and ramping down. When low-altitude rapids, thunderstorm, or typhoon happens, the power of the wind farm will increase sharply in a short time and therefore ramping-up events will occur. Ramping down comes when some wind turbines gradually quit operation due to weather reasons, and the power of the wind farm drops sharply in a short period of time. This chapter is to conduct qualitative and quantitative analysis on ramping events, summarize the evaluation indexes of commonly used prediction methods, and lay a theoretical foundation for the research on wind power ramping prediction methods based on Generative Adversarial Network.


### 2.1. Features of Ramping Events

The ramping events are identified, and the historical ramping dataset is obtained. Because of the volatility and randomness of wind power, not every power fluctuation corresponds to a ramping event. The definition of valid ramping events in this paper is expressed in the following formula:(1)pi−pj>0.15PGN,ti−tj<4h,where PGN stands for the rated power of the wind farm, Pi indicates the power of wind farm at the moment ti, and Pj means the power of wind farm at the moment tj.It can be seen that if the wind power is climbing 20% up or down 15% of the rated power within 4 hours, it is judged as a valid ramping event. With this method, all the ramping events in the historical data are extracted, and the set of ramping events is constructed asE1,E2,E3,…,EL.After obtaining the set of ramping events, waveform and corresponding meteorological characteristics are extracted. Since the standard units and dimensions are different when it comes to meteorological factors and wind power and the numerical values differ greatly, normalization is urgently needed for calculation. The formula is as follows:(2)y∗=y−yminymax−ymin,where y signifies the value to be normalized and ymax and ymin denote the corresponding maximum and minimum values.The waveform feature of normalized ramping power is extracted [19], and then seven characteristic values are defined, as shown in Figure 1. ΔPl signifies the power difference between the maximum power and the minimum power on the left side, ΔPr stands for the power difference between the maximum power and the minimum power on the right side, Δtl means the time difference when the power rises rapidly, Δtr means the time difference when the power decreases rapidly, ΔPl/Δtl is the rate of ramping up, ΔPr/Δtr is the rate of ramping down, and Δt represents the time of ramping process.Figure 1
Characteristic values of ramping power.After normalizing the three typical meteorological factors, namely, temperature, wind speed, and humidity, the historical data feature setD is formed, together with the feature set extracted from the waveform. The set is as follows:(3)D=ΔPl,ΔPr,Δtl,Δtr,ΔPl/Δtl,ΔPrΔtr,Δt,Te,Vw,H,where ΔPl,ΔPr,Δtl,Δtr,ΔPl/Δtl,ΔPr/Δtr,andΔt represent seven characteristic values of wind power waveform. Among them, Te,Vw,andH indicate temperature, wind speed, and humidity, respectively.


### 2.2. Evaluation Index System

There are two evaluation indexes for wind power ramping prediction, namely, the prediction accuracy of ramping events and the prediction accuracy of power waveform [20, 21]. The accuracy of ramping events refers to whether the prediction results are consistent with the actual observation results without false positives and false negatives [22]. The prediction results are shown in Table 1.Table 1
Prediction results of wind power ramping events.
Predicted resultsActual resultsHappenNot happenHappenTrue positives (TP)False positives (FP)Not happenFalse negatives (FN)True negatives (TN)In Table1, TP refers to the predicted and actual occurrence of ramp events; FN means that the event is predicted not to happen but actually happens, that is, false negatives; TN signifies predicted and actual nonoccurrence of ramp events; and FP indicates that the event is predicted to happen but actually not happens, in other words, false positives [23, 24]. The prediction result is represented by NTP, NFN, NTN, and NFP. Common evaluation indexes of the accuracy of ramping prediction results are shown in formulas (4)–(6):(4)PR=NTPNTP+NFP,(5)RR=NTPNTP+NFN,(6)CSI=NTPNTP+NFN+NFP,where PR stands for the precision rate, indicating the probability of the event which is predicted to happen but actually not happens; RR means the recall rate, indicating the probability of the actual ramping event which is correctly predicted; and CSI shows the critical success index, which indicates whether the prediction result is valid.The accuracy of the ramping power waveform refers to the consistency between the predicted waveform and the actual waveform [25]. Because of the randomness and volatility of wind power and the limitations of prediction models and methods, there are inevitable errors in wind power prediction. For this reason, selecting an appropriate prediction error model is the premise and basis for quantitative analysis and verification of various evaluation indexes [26]. In this paper, Min–Max standardization is adopted to conduct linear transformation of the original data to limit the data size to [0, 1], using the normal distribution model as the basis of analysis. To evaluate the prediction accuracy of the model, mean absolute error (MAE) is applied as the standard [27]. The formula is as follows:(7)MAE=1n∑i=1nyt′−yt,where n represents the number of test samples and yt′ and yt represent the predicted power and real power at time t, respectively.


## 2.1. Features of Ramping Events

The ramping events are identified, and the historical ramping dataset is obtained. Because of the volatility and randomness of wind power, not every power fluctuation corresponds to a ramping event. The definition of valid ramping events in this paper is expressed in the following formula:(1)pi−pj>0.15PGN,ti−tj<4h,where PGN stands for the rated power of the wind farm, Pi indicates the power of wind farm at the moment ti, and Pj means the power of wind farm at the moment tj.It can be seen that if the wind power is climbing 20% up or down 15% of the rated power within 4 hours, it is judged as a valid ramping event. With this method, all the ramping events in the historical data are extracted, and the set of ramping events is constructed asE1,E2,E3,…,EL.After obtaining the set of ramping events, waveform and corresponding meteorological characteristics are extracted. Since the standard units and dimensions are different when it comes to meteorological factors and wind power and the numerical values differ greatly, normalization is urgently needed for calculation. The formula is as follows:(2)y∗=y−yminymax−ymin,where y signifies the value to be normalized and ymax and ymin denote the corresponding maximum and minimum values.The waveform feature of normalized ramping power is extracted [19], and then seven characteristic values are defined, as shown in Figure 1. ΔPl signifies the power difference between the maximum power and the minimum power on the left side, ΔPr stands for the power difference between the maximum power and the minimum power on the right side, Δtl means the time difference when the power rises rapidly, Δtr means the time difference when the power decreases rapidly, ΔPl/Δtl is the rate of ramping up, ΔPr/Δtr is the rate of ramping down, and Δt represents the time of ramping process.Figure 1
Characteristic values of ramping power.After normalizing the three typical meteorological factors, namely, temperature, wind speed, and humidity, the historical data feature setD is formed, together with the feature set extracted from the waveform. The set is as follows:(3)D=ΔPl,ΔPr,Δtl,Δtr,ΔPl/Δtl,ΔPrΔtr,Δt,Te,Vw,H,where ΔPl,ΔPr,Δtl,Δtr,ΔPl/Δtl,ΔPr/Δtr,andΔt represent seven characteristic values of wind power waveform. Among them, Te,Vw,andH indicate temperature, wind speed, and humidity, respectively.


## 2.2. Evaluation Index System

There are two evaluation indexes for wind power ramping prediction, namely, the prediction accuracy of ramping events and the prediction accuracy of power waveform [20, 21]. The accuracy of ramping events refers to whether the prediction results are consistent with the actual observation results without false positives and false negatives [22]. The prediction results are shown in Table 1.Table 1
Prediction results of wind power ramping events.
Predicted resultsActual resultsHappenNot happenHappenTrue positives (TP)False positives (FP)Not happenFalse negatives (FN)True negatives (TN)In Table1, TP refers to the predicted and actual occurrence of ramp events; FN means that the event is predicted not to happen but actually happens, that is, false negatives; TN signifies predicted and actual nonoccurrence of ramp events; and FP indicates that the event is predicted to happen but actually not happens, in other words, false positives [23, 24]. The prediction result is represented by NTP, NFN, NTN, and NFP. Common evaluation indexes of the accuracy of ramping prediction results are shown in formulas (4)–(6):(4)PR=NTPNTP+NFP,(5)RR=NTPNTP+NFN,(6)CSI=NTPNTP+NFN+NFP,where PR stands for the precision rate, indicating the probability of the event which is predicted to happen but actually not happens; RR means the recall rate, indicating the probability of the actual ramping event which is correctly predicted; and CSI shows the critical success index, which indicates whether the prediction result is valid.The accuracy of the ramping power waveform refers to the consistency between the predicted waveform and the actual waveform [25]. Because of the randomness and volatility of wind power and the limitations of prediction models and methods, there are inevitable errors in wind power prediction. For this reason, selecting an appropriate prediction error model is the premise and basis for quantitative analysis and verification of various evaluation indexes [26]. In this paper, Min–Max standardization is adopted to conduct linear transformation of the original data to limit the data size to [0, 1], using the normal distribution model as the basis of analysis. To evaluate the prediction accuracy of the model, mean absolute error (MAE) is applied as the standard [27]. The formula is as follows:(7)MAE=1n∑i=1nyt′−yt,where n represents the number of test samples and yt′ and yt represent the predicted power and real power at time t, respectively.


## 3. Prediction Model Based on Generative Adversarial Network

### 3.1. Flowchart of Prediction

In light of the problems of low accuracy and poor reliability caused by insufficient ramping samples in the traditional method, a new prediction method based on Generative Adversarial Network is proposed. The model first collects historical wind power data and corresponding meteorological feature set. Through ramping detection, the effective ramping events are determined and the historical ramping dataset is formed. According to the definition of ramping events, seven main characteristics of them are extracted, and the three meteorological characteristics of wind speed, temperature, and humidity are combined to obtain the historical ramping feature set. A feature set which integrates similar feature values with it is used as the input of GAN. Through the adversarial training of the generator and the discriminator, simulated ramping data with high similarity to historical climbing data are generated. It can greatly expand the number of samples while ensuring the climbing characteristics and solve the problem of insufficient input samples. The expanded dataset is refeatured and input to the LSTM neural network to produce the predicted waveform value of the ramping power. The specific workflow is shown in Figure2.Figure 2
The flowchart of proposed prediction mode.


### 3.2. The Structure of GAN

Generative adversarial network is used to generate simulated ramping data, which is an important part of the proposed power prediction scheme. It consists of a generatorG and a discriminator D. The generator is composed of two parts: encoder and decoder. The feature set of historical ramping events is sent to the encoder to extract image features. Then, the new coding features and historical data are transmitted into the decoder in series. The decoder can generate different types of simulated ramping data by combining different feature information. The simulated ramping data and the historical data are mixed as a dataset, which is then input to the discriminator D. The discriminator distinguishes whether the data source is historical data or simulated data. Through the adversarial training, the similarity between the simulated data and the historical data is continuously improved, thus ensuring the reliability of the simulated database. The specific workflow is shown in Figure 3.Figure 3
The flowchart of Generative Adversarial Network.The structures of the generatorG and the discriminator D are shown in Figures 4 and 5, respectively. At the core of the generator G, which is demonstrated in Figure 4, two convolutional layers with 3 × 3 kernels and 64 feature maps are used, followed by batch-normalization layers and ReLU as the activation function. To distinguish historical data from simulated data, a discriminator network is trained, as is illustrated in Figure 5. Here, we use Leaky ReLU activation and avoid max-pooling throughout the network. Also, the discriminator D is trained to handle the maximization problem. It includes eight convolutional layers with an increasing number of filter kernels. Strided convolutions are used to reduce the image resolution each time the number of features is doubled. Two dense layers and a final sigmoid activation function are designed to obtain a probability for sample classification. After alternatively training D and G, the output of the discriminator is stable at about 0.5. As a result, the discriminator cannot recognize whether the input data are from the historical dataset or not when the network training ends. The cost function VD,G between the generator and the discriminator is as follows:(8)minGmaxDVD,G=Ex∼pdxlogDx+Ez∼pzzlog1−DGz.Figure 4
Neural network architecture of the generator G with corresponding numbers of feature maps (n) and stride (s) indicated for each convolutional layer.Figure 5
Neural network architecture of the discriminator D with corresponding numbers of feature maps (n) and stride (s) indicated for each convolutional layer.Among them, the real ramping datax follow the data distribution pdx and noise z obeys Gaussian distribution. Traditional Generative Adversarial Network faces the problem of unstable training process and uncontrollable images resulted from that. To solve it, a common method is used to restrict the network and to introduce conditional variables y in the modeling process to guide the data generation process. The cost function is shown in the following formula:(9)minGmaxDVD,G=Ex,y∼pdx,ylogDx,y+Ez∼pzz,y∼pyylog1−DGz,y,y.


### 3.3. Model Learning

Given any wind power ramping waveform diagram, its corresponding characteristic value isyp. The proposed model includes two types: adversarial loss and content loss. Among them, adversarial loss refers to the image x′, generated by the original ramp image x through the Generative Adversarial Network. Content loss refers to ensuring the consistency between the generated image and the original image through L1 loss.Adversarial loss signifies the loss function of generatorG and discriminator D in the Generative Adversarial Network. The role of generator G is to create a new ramping image through the new feature quantity and the historical data. Discriminator D is mainly used to distinguish the historical data from the simulated data. Its input contains historical samples and simulated samples of generator. Adversarial training between the generator and the discriminator can continuously improve the similarity between them, thus ensuring the diversity of the database of ramping events. The loss function between the generator and discriminator is(10)minGmaxDLD,G=Ex,yp∼pdx,yplogDx,yp+Ex,yp∼pdx,yplog1−DGx,yp,yp.


### 3.4. LSTM Neutral Network

Long short-term memory (LSTM) network is a special cyclic neural network, which has the advantages of better information storage and more accurate access to historical information [28]. It can avoid the gradient disappearance in RNN network and is widely applied in the processing of long time series [29–32]. In addition to the external self-circulation module, one Cell is added, which contains multiple storage units and three different “gates”: input gate, forgetting gate, and output gate. The three gates are nonlinear units used to control historical information, collect external data, and filter internal data [33–35]. This paper uses LSTM neural network algorithm as the power prediction model.


## 3.1. Flowchart of Prediction

In light of the problems of low accuracy and poor reliability caused by insufficient ramping samples in the traditional method, a new prediction method based on Generative Adversarial Network is proposed. The model first collects historical wind power data and corresponding meteorological feature set. Through ramping detection, the effective ramping events are determined and the historical ramping dataset is formed. According to the definition of ramping events, seven main characteristics of them are extracted, and the three meteorological characteristics of wind speed, temperature, and humidity are combined to obtain the historical ramping feature set. A feature set which integrates similar feature values with it is used as the input of GAN. Through the adversarial training of the generator and the discriminator, simulated ramping data with high similarity to historical climbing data are generated. It can greatly expand the number of samples while ensuring the climbing characteristics and solve the problem of insufficient input samples. The expanded dataset is refeatured and input to the LSTM neural network to produce the predicted waveform value of the ramping power. The specific workflow is shown in Figure2.Figure 2
The flowchart of proposed prediction mode.


## 3.2. The Structure of GAN

Generative adversarial network is used to generate simulated ramping data, which is an important part of the proposed power prediction scheme. It consists of a generatorG and a discriminator D. The generator is composed of two parts: encoder and decoder. The feature set of historical ramping events is sent to the encoder to extract image features. Then, the new coding features and historical data are transmitted into the decoder in series. The decoder can generate different types of simulated ramping data by combining different feature information. The simulated ramping data and the historical data are mixed as a dataset, which is then input to the discriminator D. The discriminator distinguishes whether the data source is historical data or simulated data. Through the adversarial training, the similarity between the simulated data and the historical data is continuously improved, thus ensuring the reliability of the simulated database. The specific workflow is shown in Figure 3.Figure 3
The flowchart of Generative Adversarial Network.The structures of the generatorG and the discriminator D are shown in Figures 4 and 5, respectively. At the core of the generator G, which is demonstrated in Figure 4, two convolutional layers with 3 × 3 kernels and 64 feature maps are used, followed by batch-normalization layers and ReLU as the activation function. To distinguish historical data from simulated data, a discriminator network is trained, as is illustrated in Figure 5. Here, we use Leaky ReLU activation and avoid max-pooling throughout the network. Also, the discriminator D is trained to handle the maximization problem. It includes eight convolutional layers with an increasing number of filter kernels. Strided convolutions are used to reduce the image resolution each time the number of features is doubled. Two dense layers and a final sigmoid activation function are designed to obtain a probability for sample classification. After alternatively training D and G, the output of the discriminator is stable at about 0.5. As a result, the discriminator cannot recognize whether the input data are from the historical dataset or not when the network training ends. The cost function VD,G between the generator and the discriminator is as follows:(8)minGmaxDVD,G=Ex∼pdxlogDx+Ez∼pzzlog1−DGz.Figure 4
Neural network architecture of the generator G with corresponding numbers of feature maps (n) and stride (s) indicated for each convolutional layer.Figure 5
Neural network architecture of the discriminator D with corresponding numbers of feature maps (n) and stride (s) indicated for each convolutional layer.Among them, the real ramping datax follow the data distribution pdx and noise z obeys Gaussian distribution. Traditional Generative Adversarial Network faces the problem of unstable training process and uncontrollable images resulted from that. To solve it, a common method is used to restrict the network and to introduce conditional variables y in the modeling process to guide the data generation process. The cost function is shown in the following formula:(9)minGmaxDVD,G=Ex,y∼pdx,ylogDx,y+Ez∼pzz,y∼pyylog1−DGz,y,y.


## 3.3. Model Learning

Given any wind power ramping waveform diagram, its corresponding characteristic value isyp. The proposed model includes two types: adversarial loss and content loss. Among them, adversarial loss refers to the image x′, generated by the original ramp image x through the Generative Adversarial Network. Content loss refers to ensuring the consistency between the generated image and the original image through L1 loss.Adversarial loss signifies the loss function of generatorG and discriminator D in the Generative Adversarial Network. The role of generator G is to create a new ramping image through the new feature quantity and the historical data. Discriminator D is mainly used to distinguish the historical data from the simulated data. Its input contains historical samples and simulated samples of generator. Adversarial training between the generator and the discriminator can continuously improve the similarity between them, thus ensuring the diversity of the database of ramping events. The loss function between the generator and discriminator is(10)minGmaxDLD,G=Ex,yp∼pdx,yplogDx,yp+Ex,yp∼pdx,yplog1−DGx,yp,yp.


## 3.4. LSTM Neutral Network

Long short-term memory (LSTM) network is a special cyclic neural network, which has the advantages of better information storage and more accurate access to historical information [28]. It can avoid the gradient disappearance in RNN network and is widely applied in the processing of long time series [29–32]. In addition to the external self-circulation module, one Cell is added, which contains multiple storage units and three different “gates”: input gate, forgetting gate, and output gate. The three gates are nonlinear units used to control historical information, collect external data, and filter internal data [33–35]. This paper uses LSTM neural network algorithm as the power prediction model.


## 4. Experimental Results and Analysis

In order to verify the effectiveness of the proposed wind power ramping prediction model based on Generative Adversarial Network, a sample dataset of a certain area in Northwest China is selected as a study case. Also, in order to make the training of the model stable, the encoder contains five convolution layers and the decoder contains seven deconvolution layers. There is a full connection layer between the encoder and the decoder. The discriminator consists of four convolution layers and two fully connected layers. In order to balance time and efficiency, VGG16 is used as each subconvolutional neural network. During training, the historical ramping image and the simulated ramping image are employed simultaneously. The experimental code is completed in TensorFlow framework.


### 4.1. Similarity Comparison between Simulated and Historical Data

To quantitively evaluate how similar historical ramping event data and GAN-generated data are, a method is adopted to calculate the level of similarity between historical data and simulated ones and to ensure the feasibility of power prediction. The dataP are regarded as the set of feature points pi, and the data Q are the set of feature points qj. Each feature point pi is used to match the corresponding qj. The formula is as follows:(11)uq=1N∑jqj,(12)dij=1−pi−uqpi−uq2qj−uqqj−uq2,(13)CXpi,qj=e1−dij/h∑ke1−dik/h,(14)CXP,Q=1N∑jmaxiCXpi,qj,where dij is defined as the cosine distance of feature points pi and qj and h represents bandwidth parameter.The distance scale is transformed into the similarity scale by exponential operation, and the standardized similarity scale is verified as shown in formulas (13) and (14). With CXP,Q ranging from 0 to 1, the level of similarity of the two images is indicated. After comparing the similarity between simulated data and historical ones, the results are derived as shown in Table 2. We can find that the similarity value is stable at 0.9–1, which proves that historical ramping event data and GAN-generated data are highly similar. The experiment shows that it is feasible to expand the historical climbing database by adopting simulated data.Table 2
The similarity between simulated data and historical data.
GroupCX(P,Q)Historical dataSimulated dataNonramping dataHistorical data#110.96730.1812#210.97810.1645#310.97870.2413#410.99480.2107#510.93070.1814#610.91520.1169#710.93510.2928


### 4.2. Experiments on Different Proportions of Simulated Data

To present the actual number of simulated data and historical data and to analyze the error rate of simulated data, we made some experiments to verify the reliability. By increasing the proportion of simulated data, the reliability of power prediction is calculated. A dataset with 1000 historical ramping events and a dataset with 100 historical ramping events are used as the input of the predictive model, and the proportion of simulated data is changed from 0% to 90%. Then, MAE is calculated in Table3.Table 3
MAE error of different proportions of simulated data.
Proportion of simulated data (%)1000 historical ramping events100 historical ramping events069.2109165.99041067.5309160.47262064.1745154.37193059.3285143.11784054.7197120.92425052.8801100.64316048.716186.64317045.387773.42358044.633877.54699045.921881.3524It can be seen that the accuracy of prediction will be gradually improved by increasing the number of simulated data in the historical data. However, when the simulated data are too large, the accuracy of the prediction algorithm will be limited to a certain extent. Also, when the simulated data are from 70% to 80%, the effect of the promotion algorithm is the best. When insufficient sample data (the number of historical ramping data is 100) are adopted, it can be seen that the prediction accuracy is continuously improved and the speed of improvement is faster through GAN. When the number of historical ramping data is 1000, which is relatively sufficient, the prediction accuracy is also improved, but the improvement effect is not obvious with the increase in the proportion of generative data. When 1000 historical data and 0 simulated data are used as input, the predicted MAE error is 69, and when 100 historical data and 900 simulated data are used as input, the predicted MAE error is 81.3. It can be seen that simulated data are not as effective as real sample data when used as training samples. However, when sufficient historical data are not available, data generation is still an effective method to improve the forecasting effect.


### 4.3. Evaluation of Ramping Events Prediction

The ramping data of wind farms in recent years are selected for experiments. In order to ensure the quantity of ramping data and obtain a reasonable wind power prediction dataset, the model is divided into the following parts according to the steps in Figure6.Figure 6
Flowchart of data input.At present, SVR, BP, and Elman neural networks have been widely used for wind farm prediction. Based on structural risk minimization, SVR has strong robustness [36]. BP is a classical neural network, which has a fast learning speed and is widely used in many fields [37]. The structure of Elman neural network is similar to BP, but the output of its hidden layer is connected with the input, which plays an important role in the global optimization of the network [38–40]. In this paper, a wind power ramping prediction model based on GAN is proposed and established, compared with the previous methods mentioned. In the sample set, 500 ramping data and 500 nonramping data are chosen for three groups of experiments. To evaluate the effect of ramping events’ prediction, PR, RR, and CSI are calculated, respectively [41]. The results obtained are shown in Table 4.Table 4
Prediction evaluation of ramping events.
ModelWithout GANWith GANPR (%)RR (%)CSI (%)PR (%)RR (%)CSI (%)Wind farm ALSTM89.840687.234079.401499.193598.795298.0080SVR78.967583.266168.151894.578390.926686.4220BP74.045879.671562.279390.163985.271378.0142Elman75.775278.989963.064588.085990.380880.5357Wind farm BLSTM89.183790.476281.529999.002099.398898.4127SVR78.431480.160365.681496.881593.762691.0156BP78.151377.178463.481294.400092.913488.0597Elman79.201775.099662.728893.535494.877089.0385Wind farm CLSTM87.184593.347282.084187.184598.591597.4155SVR80.776778.787966.347780.776794.388890.7514BP75.929580.000063.815875.929594.736887.9699Elman73.282476.646759.906473.282492.857182.4275LSTM, SVR, BP, and Elman are used to predict the ramping events. It can be found that the LSTM method has the highest prediction accuracy, which is approximately 99%, while the accuracy of other methods is only about 90%. When Generative Adversarial Network is adopted to generate data, the addition of analog data will not reduce, but will improve the prediction accuracy. The simulation results have proven the prediction accuracy of wind power prediction algorithm based on Generative Adversarial Network in ramping events.


### 4.4. Evaluation of Power Waveform Prediction

In order to verify the effectiveness of the algorithm of Generative Adversarial Network in power waveform prediction, the proposed model is compared with the traditional SVR, BP, and Elman power prediction models. Then, MAE is calculated, respectively, to predict and evaluate ramp events. The result is shown in Table5.Table 5
MAE with and without Generative Adversarial Network.
ModelWithout GANWith GANWind farm ALSTM165.990472.3265SVR171.414294.8642BP210.6367131.0226Elman187.8891150.1042Wind farm BLSTM73.186248.0482SVR78.667659.3349BP86.076052.7223Elman90.024360.0757Wind farm CLSTM83.945748.4726SVR119.595669.6969BP126.682482.8137Elman141.966888.1768As can be seen in Table5, the LSTM prediction algorithm has the smallest error and a higher accuracy. The prediction model generated by the adversarial network algorithm has significantly improved the prediction accuracy [42]. The simulation experiment results prove that the wind power prediction algorithm based on the Generative Adversarial Network realizes accurate prediction on ramping power waveform. The following figures show the comparisons of power waveform prediction.It can be seen that the power prediction waveform based on the Generative Adversarial Network algorithm shares the most similarity to the real waveform in Figures7–9.Figure 7
Comparison of power waveform prediction of wind farm A.Figure 8
Comparison of power waveform prediction of wind farm B.Figure 9
Comparison of power waveform prediction of wind farm C.


### 4.5. Evaluation of Prediction of Different Confidence Levels

Figures10–12 show the predicted power fluctuation range before and after the Generative Adversarial Network algorithm. In order to quantitatively describe the application effect of probability density function of different wind power prediction errors, the evaluation results of prediction with confidence levels of 90%, 80%, and 70% are calculated within the fluctuation range of wind power. It can be observed that the Generative Adversarial Network can significantly reduce the fluctuation of power prediction and improve the accuracy of prediction.Figure 10
Prediction with wind farm of 90% confidence.Figure 11
Prediction with wind farm of 80% confidence.Figure 12
Prediction with wind farm of 70% confidence.


### 4.6. Comparions with Other Papers

Table6 shows four typical wind power ramping predictions of three wind farms in four quarters. It can be perceived that the prediction error in spring and autumn is slightly higher than that in summer, and the biggest error is found in winter. The results show that the Generative Adversarial Network can significantly improve the accuracy of wind power ramping prediction. The prediction accuracy is basically unaffected by seasons.Table 6
MAE of different seasons.
ModelWithout GANWith GANWind farm ASpring165.990472.3265Summer182.589479.5515Autumn193.889186.1748Winter209.488292.4013Wind farm BSpring73.186248.0482Summer80.504252.8502Autumn87.161358.2543Winter93.427562.0625Wind farm CSpring83.945748.4726Summer92.342753.3986Autumn99.535658.7349Winter106.932162.5075LSTM with GAN is compared to other traditional algorithms in this paper, including K-Means-LSTM, SSA-ELM, and LSTM without GAN. The results are shown as Figures13 and 14. The MAE of four seasons and different data sources is calculated, respectively, and the results are shown below. It can be seen from the table that the prediction accuracy of the algorithm based on Generative Adversarial Network is significantly higher than other algorithms when there are few data sources.Figure 13
MAE of four seasons in the insufficient data source.Figure 14
MAE of four seasons in the sufficient data source.


## 4.1. Similarity Comparison between Simulated and Historical Data

To quantitively evaluate how similar historical ramping event data and GAN-generated data are, a method is adopted to calculate the level of similarity between historical data and simulated ones and to ensure the feasibility of power prediction. The dataP are regarded as the set of feature points pi, and the data Q are the set of feature points qj. Each feature point pi is used to match the corresponding qj. The formula is as follows:(11)uq=1N∑jqj,(12)dij=1−pi−uqpi−uq2qj−uqqj−uq2,(13)CXpi,qj=e1−dij/h∑ke1−dik/h,(14)CXP,Q=1N∑jmaxiCXpi,qj,where dij is defined as the cosine distance of feature points pi and qj and h represents bandwidth parameter.The distance scale is transformed into the similarity scale by exponential operation, and the standardized similarity scale is verified as shown in formulas (13) and (14). With CXP,Q ranging from 0 to 1, the level of similarity of the two images is indicated. After comparing the similarity between simulated data and historical ones, the results are derived as shown in Table 2. We can find that the similarity value is stable at 0.9–1, which proves that historical ramping event data and GAN-generated data are highly similar. The experiment shows that it is feasible to expand the historical climbing database by adopting simulated data.Table 2
The similarity between simulated data and historical data.
GroupCX(P,Q)Historical dataSimulated dataNonramping dataHistorical data#110.96730.1812#210.97810.1645#310.97870.2413#410.99480.2107#510.93070.1814#610.91520.1169#710.93510.2928


## 4.2. Experiments on Different Proportions of Simulated Data

To present the actual number of simulated data and historical data and to analyze the error rate of simulated data, we made some experiments to verify the reliability. By increasing the proportion of simulated data, the reliability of power prediction is calculated. A dataset with 1000 historical ramping events and a dataset with 100 historical ramping events are used as the input of the predictive model, and the proportion of simulated data is changed from 0% to 90%. Then, MAE is calculated in Table3.Table 3
MAE error of different proportions of simulated data.
Proportion of simulated data (%)1000 historical ramping events100 historical ramping events069.2109165.99041067.5309160.47262064.1745154.37193059.3285143.11784054.7197120.92425052.8801100.64316048.716186.64317045.387773.42358044.633877.54699045.921881.3524It can be seen that the accuracy of prediction will be gradually improved by increasing the number of simulated data in the historical data. However, when the simulated data are too large, the accuracy of the prediction algorithm will be limited to a certain extent. Also, when the simulated data are from 70% to 80%, the effect of the promotion algorithm is the best. When insufficient sample data (the number of historical ramping data is 100) are adopted, it can be seen that the prediction accuracy is continuously improved and the speed of improvement is faster through GAN. When the number of historical ramping data is 1000, which is relatively sufficient, the prediction accuracy is also improved, but the improvement effect is not obvious with the increase in the proportion of generative data. When 1000 historical data and 0 simulated data are used as input, the predicted MAE error is 69, and when 100 historical data and 900 simulated data are used as input, the predicted MAE error is 81.3. It can be seen that simulated data are not as effective as real sample data when used as training samples. However, when sufficient historical data are not available, data generation is still an effective method to improve the forecasting effect.


## 4.3. Evaluation of Ramping Events Prediction

The ramping data of wind farms in recent years are selected for experiments. In order to ensure the quantity of ramping data and obtain a reasonable wind power prediction dataset, the model is divided into the following parts according to the steps in Figure6.Figure 6
Flowchart of data input.At present, SVR, BP, and Elman neural networks have been widely used for wind farm prediction. Based on structural risk minimization, SVR has strong robustness [36]. BP is a classical neural network, which has a fast learning speed and is widely used in many fields [37]. The structure of Elman neural network is similar to BP, but the output of its hidden layer is connected with the input, which plays an important role in the global optimization of the network [38–40]. In this paper, a wind power ramping prediction model based on GAN is proposed and established, compared with the previous methods mentioned. In the sample set, 500 ramping data and 500 nonramping data are chosen for three groups of experiments. To evaluate the effect of ramping events’ prediction, PR, RR, and CSI are calculated, respectively [41]. The results obtained are shown in Table 4.Table 4
Prediction evaluation of ramping events.
ModelWithout GANWith GANPR (%)RR (%)CSI (%)PR (%)RR (%)CSI (%)Wind farm ALSTM89.840687.234079.401499.193598.795298.0080SVR78.967583.266168.151894.578390.926686.4220BP74.045879.671562.279390.163985.271378.0142Elman75.775278.989963.064588.085990.380880.5357Wind farm BLSTM89.183790.476281.529999.002099.398898.4127SVR78.431480.160365.681496.881593.762691.0156BP78.151377.178463.481294.400092.913488.0597Elman79.201775.099662.728893.535494.877089.0385Wind farm CLSTM87.184593.347282.084187.184598.591597.4155SVR80.776778.787966.347780.776794.388890.7514BP75.929580.000063.815875.929594.736887.9699Elman73.282476.646759.906473.282492.857182.4275LSTM, SVR, BP, and Elman are used to predict the ramping events. It can be found that the LSTM method has the highest prediction accuracy, which is approximately 99%, while the accuracy of other methods is only about 90%. When Generative Adversarial Network is adopted to generate data, the addition of analog data will not reduce, but will improve the prediction accuracy. The simulation results have proven the prediction accuracy of wind power prediction algorithm based on Generative Adversarial Network in ramping events.


## 4.4. Evaluation of Power Waveform Prediction

In order to verify the effectiveness of the algorithm of Generative Adversarial Network in power waveform prediction, the proposed model is compared with the traditional SVR, BP, and Elman power prediction models. Then, MAE is calculated, respectively, to predict and evaluate ramp events. The result is shown in Table5.Table 5
MAE with and without Generative Adversarial Network.
ModelWithout GANWith GANWind farm ALSTM165.990472.3265SVR171.414294.8642BP210.6367131.0226Elman187.8891150.1042Wind farm BLSTM73.186248.0482SVR78.667659.3349BP86.076052.7223Elman90.024360.0757Wind farm CLSTM83.945748.4726SVR119.595669.6969BP126.682482.8137Elman141.966888.1768As can be seen in Table5, the LSTM prediction algorithm has the smallest error and a higher accuracy. The prediction model generated by the adversarial network algorithm has significantly improved the prediction accuracy [42]. The simulation experiment results prove that the wind power prediction algorithm based on the Generative Adversarial Network realizes accurate prediction on ramping power waveform. The following figures show the comparisons of power waveform prediction.It can be seen that the power prediction waveform based on the Generative Adversarial Network algorithm shares the most similarity to the real waveform in Figures7–9.Figure 7
Comparison of power waveform prediction of wind farm A.Figure 8
Comparison of power waveform prediction of wind farm B.Figure 9
Comparison of power waveform prediction of wind farm C.


## 4.5. Evaluation of Prediction of Different Confidence Levels

Figures10–12 show the predicted power fluctuation range before and after the Generative Adversarial Network algorithm. In order to quantitatively describe the application effect of probability density function of different wind power prediction errors, the evaluation results of prediction with confidence levels of 90%, 80%, and 70% are calculated within the fluctuation range of wind power. It can be observed that the Generative Adversarial Network can significantly reduce the fluctuation of power prediction and improve the accuracy of prediction.Figure 10
Prediction with wind farm of 90% confidence.Figure 11
Prediction with wind farm of 80% confidence.Figure 12
Prediction with wind farm of 70% confidence.


## 4.6. Comparions with Other Papers

Table6 shows four typical wind power ramping predictions of three wind farms in four quarters. It can be perceived that the prediction error in spring and autumn is slightly higher than that in summer, and the biggest error is found in winter. The results show that the Generative Adversarial Network can significantly improve the accuracy of wind power ramping prediction. The prediction accuracy is basically unaffected by seasons.Table 6
MAE of different seasons.
ModelWithout GANWith GANWind farm ASpring165.990472.3265Summer182.589479.5515Autumn193.889186.1748Winter209.488292.4013Wind farm BSpring73.186248.0482Summer80.504252.8502Autumn87.161358.2543Winter93.427562.0625Wind farm CSpring83.945748.4726Summer92.342753.3986Autumn99.535658.7349Winter106.932162.5075LSTM with GAN is compared to other traditional algorithms in this paper, including K-Means-LSTM, SSA-ELM, and LSTM without GAN. The results are shown as Figures13 and 14. The MAE of four seasons and different data sources is calculated, respectively, and the results are shown below. It can be seen from the table that the prediction accuracy of the algorithm based on Generative Adversarial Network is significantly higher than other algorithms when there are few data sources.Figure 13
MAE of four seasons in the insufficient data source.Figure 14
MAE of four seasons in the sufficient data source.


## 5. Conclusion

In this paper, a wind power ramping prediction model based on Generative Adversarial Network (GAN) is proposed. In light of the problems of insufficient historical data samples and low accuracy of ramping prediction in wind farms, the Generative Adversarial Network is employed to create high-reliability simulated ramping images, which enriches the database and improves the prediction accuracy. Through the simulation experiment of historical data of wind farms in Northwest China, the feasibility and superiority of the proposed model are verified. The main work of this paper can be summarized as follows:(1)
Based on its definition, valid ramping events are extracted from wind power data. According to the waveform characteristics of seven ramping events and the three weather characteristics of wind speed, temperature, and humidity, a historical ramping feature set is constructed.(2)
A method based on Generative Adversarial Network is proposed to generate data. Taking the historical ramping feature set as the input of the model, the simulated data are produced through the generator and then the discriminator determines whether the data type is historical or simulated. Through adversarial training, the similarity level of simulated data is continuously improved. Highly similar simulated data can be used to expand the historical ramping database.(3)
The similarity between the simulated data and the historical data is calculated quantitatively, and the influence of errors in simulated data on the prediction result is analyzed. Experiments show that the simulated data are highly similar to the historical ones, and the best prediction effect is obtained when the proportion is between 70% and 80%.(4)
An evaluation system for the prediction of ramping events has been established. The ramping prediction model is evaluated from two aspects: the prediction accuracy of ramping events and the prediction accuracy of power waveform. Taking the historical data of wind farms in Northwest China as the sample, the proposed model is compared with the prediction models of SVR, BP, and Elman neural network to verify its superiority. Through different confidence levels and prediction evaluation in different seasons, it is confirmed that the generation of adversarial network algorithm can improve the accuracy of ramping prediction.



---

*Source: 5516909-2021-10-21.xml*