Wind hydrogen uncertainty scene generation method based on correction condition generation network
Through conditional correction generation network based on GAN network model, the supply and demand imbalance caused by the random characteristics of new energy is solved, and effective processing and scenario generation of wind power and load power uncertainty are realized.
Patent Information
- Application Number
- CN202411529668.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-02-25
AI Technical Summary
The random characteristics of new energy have led to an imbalance in supply and demand, which brings challenges to the power grid's frequency and peak regulating, and it is difficult to effectively deal with the randomness and volatility of wind power and load power.
A generator and discriminator based on the GAN network model is used to construct a loss function, and a conditional corrector is introduced to correct the wind power prediction data to generate uncertain scenario data.
Effectively identifying and handling scenarios with inaccurate predictions improves the consistency and convergence of the model, and can better cope with the uncertainty on both sides of new energy power generation and load.
Smart Images

Figure CN119516448A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a wind hydrogen uncertainty scenario generation method based on a correction condition generation network, and belongs to the field of new energy uncertainty scenario generation. Background Art
[0002] At present, the proportion of clean energy in the energy industry will continue to rise. However, the random characteristics of new energy will cause an imbalance between supply and demand, which will bring secondary challenges to the dynamics of power grid frequency regulation and peak regulation. Hydrogen production can be used as a consumption unit for new energy power generation, which can smooth the impact of fluctuations on the power grid to a certain extent. Hydrogen energy has been identified as an important component of the future energy system and an important carrier for energy-consuming terminals to achieve green and low-carbon transformation. The hydrogen energy industry has been identified as a strategic emerging industry and a key development direction for future industries. Wind power hydrogen production technology can convert wind energy into hydrogen energy. It is an important means to solve the problem of wind abandonment and realize "green hydrogen", and it is of great significance to improve the wind power consumption capacity. The randomness and volatility of wind power and load power have brought huge challenges to the operation and planning of the power grid. With the rapid development of new energy and the substantial increase in uncertainty on the power generation and power consumption sides of the power grid, it is necessary to generate uncertainty scenarios to respond to the fluctuations of new energy in advance. Summary of the invention
[0003] In order to solve the problem of how to generate uncertainty scenarios, the present invention provides a method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network.
[0004] A method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network of the present invention comprises:
[0005] Step 1: According to the GAN network model, construct the loss function of the generator and the discriminator;
[0006] Step 2: During training, the predicted data and real data of wind power are input into the conditional corrector for correction to obtain the corrected wind power sample data. Then the corrected wind power sample data Input to the generator and discriminator at the same time, the generator extracts wind power sample data The distribution characteristics of the uncertain scene data are used to generate uncertain scene data, which are then input into the discriminator. The discriminator outputs the data recognized as true. The generator is updated according to the output of the discriminator until convergence and training is completed.
[0007] Step 3: Use the trained generator to specifically identify various uncertain scenarios.
[0008] Preferably, the correction method of the condition corrector comprises:
[0009] Step 21: Determine whether the forecast data has a forecast inaccuracy event A1 according to the forecast error. If so, proceed to step 22; if not, use the forecast data as the corrected wind power sample data. Output;
[0010] Step 22: determine whether the prediction inaccuracy event A1 is a wind power ramp event A3. If so, use the prediction data as the corrected wind power sample data. Output, if not, the real data at the corresponding moment will replace the predicted data corresponding to the wind power ramp event A3.
[0011] As a preference, the prediction error e t satisfy:
[0012] e t =P t real -P t pre ,t=15min
[0013] Where P t real , P t pre are the actual data and predicted data of wind power at time t, respectively. The predicted monthly root mean square error rate RMSE should be less than 20%, and the root mean square error rate of the prediction error in each prediction interval should be less than 20%.
[0014] As a preference, it is determined whether the prediction data has a prediction inaccuracy event A1 according to the prediction error:
[0015]
[0016] in, It represents the root mean square error RMSE (e t )≥0.2, Indicates setting a threshold.
[0017] As a preferred method, it is determined whether the prediction inaccuracy event is a wind power ramp event A3:
[0018]
[0019] in, is the threshold value of the ramp event, represents the wind power forecast value at time t+Δt, P t real represents the wind power at time t.
[0020] As a preferred method, the predicted data is converted into
[0021] Will Transformed into objective function J:
[0022]
[0023]
[0024] S(i,j)=(ji) 2 ×A3(i,j)
[0025] In the formula, the objective function J(i,j) obtains the maximum value in the time subinterval [i,j], S(i,k) is the score value in the time subinterval, A3(i,j) is the ramp event flag on the time subinterval [i,j], which is a 0-1 variable. A value of 1 indicates that a ramp event occurs, and a value of 0 indicates that no ramp event occurs in the time subinterval [i,j].
[0026] The objective function is solved to identify wind power ramping event A3.
[0027] As a preference, during training, the loss function of the generator can be expressed as:
[0028]
[0029] in, represents the loss of the generator, H Gen (z) represents the uncertain scene data of the generator, H Dis (H Gen (z)) indicates H Gen (z) is the probability that the discriminator considers it as real data, represents the expectation of the data under the random noise vector z and the previous probability distribution P(z);
[0030] The loss function of the discriminator is
[0031]
[0032] in, represents the loss of the discriminator, Represents real data The probability that the discriminator considers it as real data, Represents real data New energy output or hydrogen load power data distribution Expectations for the following data;
[0033] The adversarial loss function is:
[0034]
[0035] Where, L GAN (H Gen ,HDis ) represents adversarial loss.
[0036] The beneficial effects of the present invention are as follows: the present invention first adopts a GAN network model, constructs the loss functions of the generator and the discriminator, and establishes a basic model. Then, the uncertainty on both sides of renewable energy power generation and load is considered, and conditional information and a corrector are introduced to mark and process the input information. Finally, the uncertainty on both sides of renewable energy power generation and load is considered, and conditional information and a corrector are introduced to mark and process the input information. The wind hydrogen uncertainty scenario generation method based on the correction condition generation network designed by the present invention can better identify scenarios with inaccurate predictions and use other data to replace them. At the same time, the improved model has stronger consistency and good convergence. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flow chart of a method for improving grid flexibility based on wind-hydrogen collaborative optimization control technology;
[0038] Figure 2 Schematic diagram of the GAN-based scene generation method;
[0039] Figure 3 Schematic diagram of CCGAN structure;
[0040] Figure 4 This is the working principle diagram of the condition corrector;
[0041] Figure 5 is the loss function of GAN and CCGAN. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0043] It should be noted that, in the absence of conflict, the embodiments of the present invention and the features in the embodiments may be combined with each other.
[0044] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments, but they are not intended to limit the present invention.
[0045] The wind hydrogen uncertainty scenario generation method based on the correction condition generation network of this embodiment includes:
[0046] Step 1: Use the GAN network model to construct the loss functions of the generator and discriminator.
[0047] The randomness and volatility of wind power and load power have brought great challenges to the operation and planning of power grids. Data-driven scenario generation methods can cope with this uncertainty and volatility. Scenario generation is mostly based on probabilistic models. First, a probabilistic model that conforms to the law of power distribution is established through historical data, and then new scenarios are generated through sampling methods. Generative Adversarial Networks (GANs) uses a generative network based on binary game theory. Its basic structure consists of two neural networks, a generator and a discriminator, to generate scenarios that can capture the spatial and temporal correlations of the system. The principle of the GANs-based scenario generation method is shown in Figure 2.
[0048] Assume that a simple probability distribution Z~P is known Z , the random noise vector {z} is easy to sample, and the generator constructs a vector consisting of the previous distribution p Z (z) Distribution of new energy output or hydrogen load power data The loss function of the generator can be expressed as:
[0049]
[0050] L HGen represents the loss of the generator, H Gen (z) represents the uncertain scene data of the generator, H Dis (H Gen (z)) indicates H Gen (z) is the probability that the discriminator considers it as real data, represents the expectation of the data under the random noise vector z and the previous probability distribution P(z);
[0051] The discriminator takes the original data and the generated data {H Gen (z)} as input and output the probability that the data is identified as real data rather than generated data. Based on the cross entropy theory, the loss function of the discriminator is
[0052]
[0053] represents the loss of the discriminator, Represents real data The probability that the discriminator considers it as real data, Represents real data New energy output or hydrogen load power data distribution The adversarial mechanism is reflected in the adversarial loss function, which is defined as
[0054]
[0055] L GAN (H Gen ,H Dis ) represents adversarial loss.
[0056] Introducing conditional information into GAN can form a semi-supervised generation model. The generator maps random noise to the generated samples by learning the potential distribution of the predicted data, and the discriminator tries to determine whether the input data is real historical data or data generated under label information. In the actual wind power prediction problem, the randomness, ambiguity, and prediction interval of wind power itself will cause the prediction accuracy to be unsatisfactory. If the data with poor prediction accuracy is blindly used as conditional information to input the generator, erroneous label information will be introduced, causing the generator to generate scene data that deviates from the actual situation. Therefore, it is necessary to introduce a conditional corrector to form Figure 3 The Conditional Corrective Generative Adversarial Network (CCGAN) shown.
[0057] Step 2: Considering the uncertainty of renewable energy generation and load, conditional information and corrector are introduced to mark and process the input information: During training, the predicted data and real data of wind power are input into the conditional corrector for correction to obtain the corrected wind power sample data. Then the corrected wind power sample data Input to the generator and discriminator at the same time, the generator extracts wind power sample data The distribution characteristics of the uncertain scene data are used to generate uncertain scene data, which are then input into the discriminator. The discriminator outputs the data recognized as true. The generator is updated according to the output of the discriminator until convergence and training is completed.
[0058] In CCGAN, wind power forecast data is no longer directly input into the generator G, but first input into the conditional corrector C with the real wind power data x, and the conditional corrector C performs data correction to generate the corrected wind power sample data. Then input the generator and discriminator respectively. The multi-layer convolution of the generator continuously extracts the correction sample data Similarly, the discriminator D no longer uses the uncorrected conditional information, and also completes the classification supervision learning task between the data after the correction condition and the generated data through multi-layer convolution operations. Finally, the Nash equilibrium can be achieved through repeated games, and the generator G can generate scene data that meets the correction conditions and is close to the real wind power data.
[0059] The conditional corrector used in CCGAN is as follows:
[0060] There is a difference between the measured and predicted wind power. t Satisfies the following definition:
[0061] et =P t real -P t pre ,t=15min (4)
[0062] Where: P t real , P t pre They are the actual value and predicted value of wind power at time t, with a time resolution of 15 minutes. The specification only requires that the monthly root mean square error (RMSE) of the prediction system should be less than 20%, and the root mean square error of the prediction error allocated to each prediction interval should also be less than 20%.
[0063] Based on the definition of prediction error, the predicted value not equal to the measured value can be classified into two events: inaccurate prediction A1 and reasonable prediction A2. These two types of events can be expressed by the following two formulas:
[0064]
[0065] Where: is the root mean square error RMSE (e t ) duration; is the acceptable time when the prediction error meets the upper limit. Formula (2-56) shows that when the long-term RMSE of the prediction error exceeds the fixed standard value, it can be considered as a prediction inaccuracy event. In this case, the wind power prediction power cannot provide reliable prediction information.
[0066] The definition of forecast inaccuracy event A1 needs to exclude a special case, namely the wind power ramp event. Wind power ramp event A3 refers to the rapid increase and decrease of wind power in a short period of time, which can be expressed by the following formula:
[0067]
[0068] Where: is the threshold value of the ramp event. Wind power ramping is a type of low-probability emergency event, and it is difficult to explore its statistical laws. In this case, the actual wind power output often deviates greatly from the reasonable wind power fluctuation range. Due to the low probability of occurrence, in this case, it can still be considered that the forecast data given by the forecast system is reliable, but the strong randomness of wind power itself produces excessive forecast errors.
[0069] According to the above classification of prediction events, in order to correct the condition information, Figure 4 A conditional corrector based on the prediction error is designed:
[0070] Figure 4The conditional corrector in the algorithm consists of two layers of networks. First, it determines whether the prediction inaccuracy event A1 occurs based on the prediction error. After the A1 event is retrieved, the improved revolving door algorithm (ISDA) is started to identify the wind power ramp event A3 under the A1 event.
[0071] ISDA can identify the trend characteristics of wind power time series. First, the scoring function S needs to be constructed, and the detection of ramp events can be converted into a dynamic optimization problem to solve the maximum value of the scoring function. The objective function J and its constraints of this problem are expressed as follows:
[0072]
[0073] S(i,j)=(ji) 2 ×A3(i,j) (10)
[0074] Where: The objective function J(i,j) achieves the maximum value in the time subinterval [i,j], and S(i,k) is the score value in the time subinterval. The climbing trend must satisfy equation (9). The score function can be specifically expressed as equation (10). A3(i,j) is the climbing event flag on the subinterval (i,j), which is a 0-1 variable. A value of 1 indicates that a climbing event has occurred, and a value of 0 indicates that no climbing event has occurred on the subinterval;
[0075] Solve the objective function, and after ISDA identifies ramp event A3, remove the wind power ramp events in the forecast inaccurate time period. Finally, the data is spliced to obtain the correction condition data. When the forecast is inaccurate, the measured data is used to replace the forecast data, such as Figure 4 China-Israel Alternative The formula is as follows:
[0076]
[0077] During the period of wind power ramp event A3 and reasonable prediction A2, the predicted data is still input into the generator and discriminator as conditional samples. The formula is as follows:
[0078]
[0079] This conditional correction operation can achieve refined and classified cleaning of the data, providing reliable reference information for the repeated game process between the generator and the discriminator.
[0080] After model training, the loss functions of GAN and CCGAN are shown in Figure 5Without conditional correction, the difference between the predicted value and the actual value in some time periods is too large, resulting in large fluctuations in the gradient of the training network and difficulty in achieving convergence. The conditionally corrected CCGAN shows good convergence, the loss functions of the generator and the discriminator tend to be consistent, and the Nash equilibrium is achieved.
[0081] Step 3: Specifically identify various uncertain scenarios and provide methods for processing inaccurate scenario data.
[0082] Although the present invention is described herein with reference to specific embodiments, it should be understood that these embodiments are merely examples of the principles and applications of the present invention. It should therefore be understood that many modifications may be made to the exemplary embodiments and that other arrangements may be devised without departing from the spirit and scope of the present invention as defined by the appended claims. It should be understood that the various dependent claims and features described herein may be combined in a manner different from that described in the original claims. It should also be understood that features described in conjunction with individual embodiments may be used in other described embodiments.
Claims
1. A wind hydrogen uncertainty scenario generation method based on a correction condition generation network, characterized in that: The method comprises: Step 1: According to the GAN network model, construct the loss function of the generator and the discriminator; Step 2: During training, the predicted data and real data of wind power are input into the conditional corrector for correction to obtain the corrected wind power sample data. Then the corrected wind power sample data Input to the generator and discriminator at the same time, the generator extracts wind power sample data The distribution characteristics of the uncertain scene data are used to generate uncertain scene data, which are then input into the discriminator. The discriminator outputs the data recognized as true. The generator is updated according to the output of the discriminator until convergence and training is completed. Step 3: Use the trained generator to specifically identify various uncertain scenarios.
2. The method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network according to claim 1 is characterized in that: The correction methods of the condition corrector include: Step 21: Determine whether the forecast data has a forecast inaccuracy event A1 according to the forecast error. If so, proceed to step 22; if not, use the forecast data as the corrected wind power sample data. Output; Step 22: determine whether the prediction inaccuracy event A1 is a wind power ramp event A3. If so, use the prediction data as the corrected wind power sample data. Output, if not, the real data at the corresponding moment will replace the predicted data corresponding to the wind power ramp event A3.
3. The method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network according to claim 2 is characterized in that: Prediction error t satisfy: t=15min Where P t real , P t pre are the actual data and predicted data of wind power at time t, respectively. The predicted monthly root mean square error rate RMSE should be less than 20%, and the root mean square error rate of the prediction error in each prediction interval should be less than 20%.
4. The method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network according to claim 3 is characterized in that: Determine whether the forecast data has a forecast inaccuracy event A1 based on the forecast error: A1: in, It represents the root mean square error RMSE (e t )≥0.2, Indicates setting a threshold.
5. The method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network according to claim 2 is characterized in that: Determine whether the forecast inaccuracy event is a wind power ramp event A3: A3: in, is the threshold value of the ramp event, represents the wind power forecast value at time t+Δt, P t real represents the wind power at time t.
6. The method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network according to claim 5 is characterized in that: According to the Arc de Triomphe algorithm, the predicted data A3: Transformed into objective function J: S(i,j)=(j-i) 2 ×A3(i,j) In the formula, the objective function J(i,j) obtains the maximum value in the time subinterval [i,j], S(i,k) is the score value in the time subinterval, A3(i,j) is the ramp event flag on the time subinterval [i,j], which is a 0-1 variable. A value of 1 indicates that a ramp event occurs, and a value of 0 indicates that no ramp event occurs in the time subinterval [i,j]. The objective function is solved to identify wind power ramping event A3.
7. The method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network according to claim 1, characterized in that: During training, the loss function of the generator can be expressed as: in, represents the loss of the generator, H Gen (z) represents the uncertain scene data of the generator, H Dis (H Gen (z)) indicates H Gen (z) is the probability that the discriminator considers it as real data, represents the expectation of the data under the random noise vector z and the previous probability distribution P(z); The loss function of the discriminator is in, represents the loss of the discriminator, Represents real data The probability that the discriminator considers it as real data, Represents real data New energy output or hydrogen load power data distribution Expectations for the following data; The adversarial loss function is: Where, L GAN (H Gen ,H Dis ) represents adversarial loss.
8. A computer-readable storage device storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network as described in any one of claims 1 to 7 are implemented.
9. A wind hydrogen uncertainty scenario generation device based on a correction condition generation network, comprising a storage device, a processor, and a computer program stored in the storage device and executable on the processor, characterized in that: The processor executes the computer program to implement the steps of the method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network as described in any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for generating wind hydrogen uncertainty scenarios based on a correction condition generation network as described in any one of claims 1 to 7 are implemented.