New energy output uncertainty scenario generation and evaluation method based on generative adversarial network
By using a generative adversarial network (GAN) deep learning model, the problem that traditional methods struggle to describe the high-dimensional nonlinear characteristics of new energy power output is solved. This generates scenarios that reflect power uncertainty, thereby improving the stability and optimized scheduling capabilities of new energy power systems.
Patent Information
- Application Number
- CN202411291539.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2044-09-14
AI Technical Summary
Traditional scene generation methods are unable to describe the high-dimensional nonlinear characteristics of new energy output and cannot comprehensively model the uncertainty of output.
A generative adversarial network (GAN) deep learning architecture is adopted, combining a generator and a discriminator. The Wasserstein loss function is defined, and new energy output scenarios are generated through multiple training sessions. Kernel density estimation and autocorrelation analysis are used to evaluate the quality of the scenarios.
The generated new energy output scenarios can fully describe their uncertainties and volatility, improving the accuracy and stability of scenario generation and supporting the stable operation and optimized scheduling of the power system.
Smart Images

Figure CN119180310B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of new energy power system technology, specifically relating to a method for generating and evaluating uncertain scenarios of new energy output based on generative adversarial networks. Background Technology
[0002] Against the backdrop of "dual-carbon goals" and energy transition, building a new power system dominated by new energy sources has become a key objective for the development of my country's power industry. With the increasing penetration rate of new energy power generation, the inherent randomness and volatility of its output significantly impact the stable operation of the power system. Therefore, accurately describing the uncertainty of new energy output is crucial. Scenario generation, by generating scenarios that meet demand, describes the output characteristics of new energy sources. Based on this, calculations and analyses are performed on various issues, including power balance, optimized scheduling, and safety and stability verification. This is an effective method for characterizing its output uncertainty. For uncertain scenarios of new energy output, both its random characteristics and its true statistical properties must be considered. Therefore, how to model the output characteristics of new energy sources is a key challenge in scenario generation.
[0003] Traditional scenario generation typically employs statistical methods to model the uncertainty of renewable energy output. This involves solving for specific model parameters using historical data and combining them with methods such as Monte Carlo sampling or Latin hypercube sampling to obtain specific output scenarios. These methods primarily include Markov chain methods and time series methods. However, traditional statistical models struggle to describe the high-dimensional nonlinear characteristics of output and cannot comprehensively model the uncertainty of output. In recent years, with the development of artificial intelligence technology, generative models using deep learning have been applied in renewable energy scenario generation. Summary of the Invention
[0004] To address the shortcomings of traditional scene generation methods in describing the high-dimensional nonlinear characteristics of renewable energy output and comprehensively modeling output uncertainty, this invention aims to provide a method for generating and evaluating renewable energy output uncertainty scenarios based on generative adversarial networks (GANs). Building upon existing historical renewable energy output data, this invention establishes a scene generation model using a GAN deep learning architecture. It couples multiple neural network mechanisms to construct a generator and discriminator, defines a Wasserstein loss function, trains the neural network multiple times using a training dataset, calculates the gradient information of the loss function, and updates the parameters using an Adam optimizer. Finally, it fixes the generator and generates quantitative scenarios. The quality of the generated scenarios is evaluated through kernel density estimation and autocorrelation analysis, demonstrating its ability to fully describe the uncertainty and volatility of renewable energy output.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A method for generating and evaluating uncertainties in new energy output based on generative adversarial networks includes the following steps:
[0007] Step 1: Construct a training dataset from existing historical power output data of new energy sources through data transformation operations, namely, shuffle and batch operations.
[0008] Step 2: Construct the generator using a linear stacking method. The generator consists of a fully connected layer, a batch normalization layer, an advanced activation function, a fully connected layer, a batch normalization layer, a reshaping layer, a convolutional layer, a batch normalization layer, an advanced activation function, a convolutional layer, and a reshaping layer.
[0009] Step 3: Construct a discriminator using a linear stacking method. The discriminator consists of a flattened layer, a fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, a fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, and a fully connected layer in sequence.
[0010] Step 4: Define the Wasserstein loss function for the discriminator and generator, and define the training process of the established Generative Adversarial Network (GAN) deep learning architecture: Instructions generate noise that follows a normal distribution, input the noise into the generator to obtain generated scene data, call the discriminator to calculate the output values of the training dataset and the generated scene data, thereby calculating the loss functions of the discriminator and generator respectively, calculating the gradient of the discriminator loss function with respect to the model parameters in the discriminator, and the gradient of the generator loss function with respect to the model parameters in the generator, and finally using the Adam optimizer to update the trainable variables in the discriminator and generator;
[0011] Step 5: After repeating the training N times, save the generator and generate n. set One new energy power output scenario;
[0012] Step 6: Use kernel density estimation to obtain the probability density distribution of the generated scene data and the training dataset, and compare and analyze them to verify the generated n. set The quality of the generated new energy output scenario data is considered good when the Euclidean distance between the probability density distribution curves of the generated scenario data and the training dataset is less than 0.1. set The quality of the data for each new energy power output scenario meets the requirements;
[0013] Step 7: Calculate and compare the autocorrelation coefficient curves of the generated scene data and the training dataset to further verify the generated n. set The quality of new energy power generation scenario data is considered good when the Euclidean distance between the autocorrelation coefficient curves of the generated scenario data and the training dataset, with lag orders ranging from 0 to 20 hours, is less than 0.4. set The quality of the data for each new energy power output scenario meets the requirements.
[0014] Using the Wasserstein loss function as the loss function for both the generator and discriminator effectively measures the distance between the probability distribution of the generated scene data output by the generator and the probability distribution of the real training dataset, providing more stable gradient information. The Wasserstein loss function for the discriminator is Loss... D =E[D(G(z))]-E[D(x)](1)
[0015] The Wasserstein loss function of the generator is
[0016] Loss G =-E[D(G(z))] (2)
[0017] In the formula: E represents expectation; D represents discriminator; G represents generator; z represents random noise; G(z) represents generated scene data; E[D(G(z))] represents the expectation of the discriminator's output on the generated scene data; x is the training dataset; D(x) represents the discriminator's output on the real training dataset; E[D(x)] represents the expectation of the discriminator's output on the real training dataset.
[0018] Kernel density estimation (KDE) is used to obtain the probability distributions of the generated scene data and the training dataset. Kernel density estimation (KDE) searches for the optimal kernel function and optimal bandwidth value using a GridSearchCV class object. The calculation of kernel density estimation is as follows:
[0019]
[0020] In the formula: f(x) is the probability density function estimated for sample x; n is the number of samples; h is the set bandwidth value; K is the kernel function; x i These are sample points.
[0021] The autocorrelation coefficient curves of the generated scene data and the training dataset are calculated and compared to analyze the internal correlation of the generated new energy output scenarios. The calculation formula is as follows:
[0022]
[0023] In the formula: ρ(k) represents the autocorrelation coefficient at a lag time interval k; X t X represents the output value of the new energy source at time t; t-k Represents the output value of the new energy source at time tk; μ and σ 2 These represent the average and variance of the new energy output, respectively.
[0024] This invention constructs a training dataset from existing historical power output data of new energy sources. Next, a generator is constructed using a linear stacking method, consisting of a fully connected layer, a batch normalization layer, a high-level activation function, another fully connected layer, a batch normalization layer, a reshaping layer, a convolutional layer, another batch normalization layer, a high-level activation function, another convolutional layer, and a reshaping layer. A discriminator is also constructed using a linear stacking method, consisting of a flattening layer, a fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, another fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, and a fully connected layer. Then, the Wasserstein loss function for both the discriminator and the generator is defined. Finally, the training process is defined. The method generates normally distributed noise, inputs this noise into the generator to obtain generated scene data, and calls the discriminator to calculate the output values of the training dataset and the generated scene data. The loss functions of the discriminator and generator are then calculated separately. The gradients of the discriminator's loss function with respect to the model parameters in the discriminator and the generator's loss function with respect to the model parameters in the generator are calculated sequentially. Finally, the Adam optimizer is used to update the trainable variables in the discriminator and generator. After N cycles of training, the generator is saved, and the probability density distributions of the generated scene data and the training dataset are obtained using kernel density estimation. The autocorrelation coefficient curves of the two are calculated and compared to verify the quality of the generated new energy power output scene data. This invention's method builds a scene generation model based on generative adversarial networks, trains it using historical new energy power output data, and adaptively mines the high-dimensional feature distribution of historical data through deep learning networks. This generates a massive number of scenes that fully reflect the uncertainty and volatility of new energy power output, which is of great significance for uncertainty risk assessment of new energy and stability analysis and control of power systems. Attached Figure Description
[0025] Figure 1 This is a flowchart of the method for implementing the present invention.
[0026] Figure 2 This is a schematic diagram illustrating the principles of generative adversarial networks.
[0027] Figure 3 It is the neural network architecture of the designed generator and discriminator.
[0028] Figure 4 It is the curve showing the change of the loss function during the training process.
[0029] Figure 5 It compares the probability density distributions of the generated scene data and the training dataset.
[0030] Figure 6 It compares the autocorrelation curves of the generated scene data and the training dataset. Detailed Implementation
[0031] The present invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0032] like Figure 1 As shown, the present invention provides a method for generating and evaluating uncertainties in new energy output scenarios based on generative adversarial networks, comprising the following steps:
[0033] Step 1: Construct a training dataset from existing historical power output data of new energy sources through data transformation operations, namely, shuffle and batch operations.
[0034] Step 2: Construct the generator using a linear stacking method. The generator consists of a fully connected layer, a batch normalization layer, an advanced activation function, a fully connected layer, a batch normalization layer, a reshaping layer, a convolutional layer, a batch normalization layer, an advanced activation function, a convolutional layer, and a reshaping layer.
[0035] Step 3: Construct a discriminator using a linear stacking method. The discriminator consists of a flattened layer, a fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, a fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, and a fully connected layer in sequence.
[0036] Step 4: Define the Wasserstein loss function for the discriminator and generator, and define the training process of the established Generative Adversarial Network (GAN) deep learning architecture: Instructions generate noise that follows a normal distribution, input the noise into the generator to obtain generated scene data, call the discriminator to calculate the output values of the training dataset and the generated scene data, thereby calculating the loss functions of the discriminator and generator respectively, calculating the gradient of the discriminator loss function with respect to the model parameters in the discriminator, and the gradient of the generator loss function with respect to the model parameters in the generator, and finally using the Adam optimizer to update the trainable variables in the discriminator and generator;
[0037] Step 5: After repeating the training N times, save the generator and generate n. set One new energy power output scenario;
[0038] Step 6: Use kernel density estimation to obtain the probability density distribution of the generated scene data and the training dataset, and compare and analyze them to verify the generated n. set The quality of the generated new energy output scenario data is considered good when the Euclidean distance between the probability density distribution curves of the generated scenario data and the training dataset is less than 0.1. set The quality of the data for each new energy power output scenario meets the requirements;
[0039] Step 7: Calculate and compare the autocorrelation coefficient curves of the generated scene data and the training dataset to further verify the generated n. setThe quality of new energy power generation scenario data is considered good when the Euclidean distance between the autocorrelation coefficient curves of the generated scenario data and the training dataset, with lag orders ranging from 0 to 20 hours, is less than 0.4. set The quality of the data for each new energy power output scenario meets the requirements.
[0040] Example:
[0041] The feasibility of this invention is demonstrated through verification and analysis using on-site measurement data from a wind farm provided by the State Grid Corporation of China. The dataset includes power generation-related data collected every 15 minutes over two years (2019-2020). The Generative Adversarial Network (GAN) model is built using the deep learning framework TensorFlow, and its principle is illustrated below. Figure 2 As shown, the designed neural network architecture of the generator and discriminator is as follows: Figure 3 As shown. GPU is used for accelerated training. The computer's CPU is an Intel Core i7 13700kF, and the GPU is an NVIDIA RTX 4060.
[0042] The learning rate was set to 0.001, and batches of size 100 were randomly selected from the dataset in each training iteration, with 5000 training iterations. The loss functions of the generator and discriminator changed as follows: Figure 4 As shown, the GAN training converges when the loss function stabilizes during training. The probability density functions of the generated scene data and the real training dataset are obtained using the kernel density estimation method, as shown below. Figure 5 As shown, the horizontal axis represents the wind turbine output power, and the vertical axis represents the probability density. The autocorrelation curves of the generated data and the real data are shown below. Figure 6 As shown in the figure, the horizontal axis represents the lag time interval, and the vertical axis represents the autocorrelation coefficient. Figure 5 and 6 The generated data curve and the real data curve basically overlap, indicating that the generated scenario fully conforms to the real distribution of new energy power output and can describe the uncertainty and volatility characteristics of its power output.
Claims
1. A method for generating and evaluating uncertainties in new energy output scenarios based on generative adversarial networks, characterized by: Includes the following steps: Step 1: Construct a training dataset from existing historical power output data of new energy sources through data transformation operations, namely, shuffle and batch operations; Step 2: Construct the generator using a linear stacking method. The generator consists of a fully connected layer, a batch normalization layer, an advanced activation function, a fully connected layer, a batch normalization layer, a reshaping layer, a convolutional layer, a batch normalization layer, an advanced activation function, a convolutional layer, and a reshaping layer. Step 3: Construct a discriminator using a linear stacking method. The discriminator consists of a flattened layer, a fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, a fully connected layer, a random deactivation layer, a batch normalization layer, a high-level activation function, and a fully connected layer in sequence. Step 4: Define the Wasserstein loss function for the discriminator and generator, and define the training process of the established Generative Adversarial Network (GAN) deep learning architecture: Instructions generate noise that follows a normal distribution, input the noise into the generator to obtain generated scene data, call the discriminator to calculate the output values of the training dataset and the generated scene data, thereby calculating the loss functions of the discriminator and generator respectively, calculating the gradient of the discriminator loss function with respect to the model parameters in the discriminator, and the gradient of the generator loss function with respect to the model parameters in the generator, and finally using the Adam optimizer to update the trainable variables in the discriminator and generator; Step 5: After repeating the training N times, save the generator and generate n. set One new energy power output scenario; Step 6: Use kernel density estimation to obtain the probability density distribution of the generated scene data and the training dataset, and compare and analyze them to verify the generated n. set The quality of the generated new energy power output scenario data is considered good when the Euclidean distance between the probability density distribution curves of the generated scenario data and the training dataset is less than 0.
1. set The quality of the data for each new energy power output scenario meets the requirements; Step 7: Calculate and compare the autocorrelation coefficient curves of the generated scene data and the training dataset to further verify the generated n. set The quality of new energy output scenario data is considered good when the Euclidean distance between the autocorrelation coefficient curves of the generated scenario data and the training dataset, with lag orders ranging from 0 to 20 hours, is less than 0.
4. set The quality of the data from each new energy power generation scenario meets the requirements.
2. The method for generating and evaluating uncertainties in new energy output scenarios based on generative adversarial networks as described in claim 1, characterized in that, Step 4 defines the Wasserstein loss function as the loss function for both the generator and the discriminator. This effectively measures the distance between the probability distribution of the generated scene data output by the generator and the probability distribution of the real training dataset, providing more stable gradient information. The Wasserstein loss function for the discriminator is... Loss D =E[D(G(z))]-E[D(x)] (1) The Wasserstein loss function of the generator is Loss G =-E[D(G(z))] (2) In the formula: E represents expectation; D represents discriminator; G represents generator; z represents random noise; G(z) represents generated scene data; E[D(G(z))] represents the expectation of the discriminator's output on the generated scene data; x is the training dataset; D(x) represents the discriminator's output on the real training dataset; E[D(x)] represents the expectation of the discriminator's output on the real training dataset.
3. The method for generating and evaluating uncertainties in new energy output based on generative adversarial networks as described in claim 1, characterized in that, Step 6 uses kernel density estimation (KDE) to obtain the probability distribution of the generated scene data and the training dataset. KDE searches for the optimal kernel function and optimal bandwidth value using a GridSearchCV class object. The kernel density estimation is calculated as follows: In the formula: f(x) is the probability density function estimated for sample x; n is the number of samples; h is the set bandwidth value; K is the kernel function; x i These are sample points.
4. The method for generating and evaluating uncertainties in new energy output based on generative adversarial networks as described in claim 1, characterized in that, Step 7: Calculate and compare the autocorrelation coefficient curves of the generated scenario data and the training dataset to analyze the internal correlation of the generated new energy output scenarios. The calculation formula is as follows: In the formula: ρ(k) represents the autocorrelation coefficient at a lag time interval k; X t X represents the output value of the new energy source at time t; t-k Represents the output value of the new energy source at time tk; μ and σ 2 These represent the average and variance of the new energy output, respectively.
Citation Information
Patent Citations
Renewable energy power generation scene generation method based on conditional generative adversarial network
CN117852419A
Progressive modification of generative adversarial neural networks
US20190130278A1