Wind power scenario data generation method, device and system based on corrected conditional generative adversarial network
By designing a condition corrector in the generative adversarial network and improving the revolving door algorithm, identifying and cleaning wind power prediction errors and hill climbing events, the problem of insufficient generation accuracy of wind power scene data is solved in the prior art, and higher precision wind power scene data generation is achieved.
Patent Information
- Application Number
- CN202211272477.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-18
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2042-10-18
AI Technical Summary
The existing statistical methods are difficult to fully describe the high-dimensional characteristics of wind power output scenarios. The generated scene data has the problems of single feature modes, large fluctuation range, and poor accuracy.
The method of generating an adversarial network based on correction conditions is adopted. By designing a condition corrector, the wind power prediction error events and hill climbing events are identified, the wind power historical prediction data is cleaned, and the wind power climbing events are identified using an improved revolving door algorithm to improve the training stability and convergence of the generated adversarial network.
More accurate wind power scene data is generated, which improves the accuracy and referenceability of wind power scene data and alleviates the collapse problem of the generative adversarial network.
Smart Images

Figure CN115758131B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of wind power output scenario data generation, and particularly relates to a method, device and system for generating wind power scenario data based on a corrected conditional generative adversarial network. Background Art
[0002] Wind power output scenarios are the data basis for power system planning and operation. Statistical methods for describing the uncertainty of wind power output have become common methods. Statistical methods use prior statistical models. By fitting historical wind power data and solving the parameters of the model, sampling is then carried out to generate wind power output scenarios. Wind power scenario generation methods under statistical theory include: Monte Carlo sampling, scenario trees, dynamic scenario trees, and Markov chains, etc. Using statistical theory to describe wind power output requires assuming fixed and prior probability models, while the fuzziness and randomness of wind power output are difficult to meet the invariant probability model, and the parameter dimension of the probability model determines that it is difficult for this method to comprehensively describe the high-dimensional characteristics of wind power uncertain output. There are problems such as single characteristic mode, large fluctuation range, and poor accuracy in generating scenario data. Summary of the Invention
[0003] In view of the above problems, the present invention proposes a method, device and system for generating wind power scenario data based on a corrected conditional generative adversarial network, which fully considers the accuracy of historical wind power prediction data, designs a conditional corrector in the generative adversarial network, can accurately identify wind power prediction misalignment events and wind power ramp events, clean the historical wind power prediction data used as conditional information, and ensure the high referenceability of the conditional information.
[0004] In order to achieve the above technical objectives and reach the above technical effects, the present invention is realized through the following technical solutions:
[0005] In a first aspect, the present invention provides a method for generating wind power scenario data based on a corrected conditional generative adversarial network, including:
[0006] Dividing the obtained predicted wind power data and real wind power data into a training set and a test set;
[0007] Obtaining a preset corrected conditional generative adversarial network, where the corrected conditional generative adversarial network includes a conditional corrector, a discriminator, and a generator; the conditional corrector is used to correct the received data, and its output ends are respectively connected to the discriminator and the generator;
[0008] Training the corrected conditional generative adversarial network using the training set until a Nash equilibrium is reached between the discriminator and the generator;
[0009] Performing cross-validation on the trained corrected conditional generative adversarial network using the training set and the test set;
[0010] Generate wind power scenario data by using the trained calibration conditional generative adversarial network.
[0011] Optionally, training the calibration conditional generative adversarial network using the training set until a Nash equilibrium is reached between the discriminator and the generator includes the following steps:
[0012] Input both the predicted wind power data and the real wind power data in the training set into the conditional corrector. The conditional corrector corrects the data in the training set to obtain calibration conditional data, and sends the calibration conditional data to the discriminator and the generator respectively;
[0013] Input the real wind power data in the training set into the discriminator;
[0014] Continuously extract the distribution features of the calibration conditional data by using the multi-layer convolution of the generator to obtain generated data;
[0015] Complete the classification supervised learning task between the calibration conditional data and the generated data by using the multi-layer convolution of the discriminator, and through repeated games with the generator until a Nash equilibrium is reached.
[0016] Optionally, the conditional corrector includes a first-layer network and a second-layer network;
[0017] Divide the predicted wind power data in the training set into prediction misalignment events A1 and prediction reasonable events A2;
[0018] After the training set is input into the conditional corrector, use the first-layer network to judge whether the prediction misalignment event A1 occurs according to the prediction error;
[0019] After judging the prediction misalignment event A1, use the second-layer network to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm;
[0020] Retain the data segments in the predicted wind power data that are identified as the wind power ramp event A3, and replace the remaining data segments with the corresponding real wind power data to generate new predicted wind power data, which is used as a conditional label and input into the generator and the discriminator.
[0021] Optionally, the step of using the first-layer network to judge whether the prediction misalignment event A1 occurs according to the prediction error specifically includes:
[0022] Calculate the prediction error based on the predicted wind power data and the real wind power data in the training set;
[0023] When the prediction error satisfies then it is determined that the prediction misalignment event A1 occurs, where T eis the duration of the prediction error; t is the wind power prediction time point; Δt is the time interval of wind power prediction; RMSE is the root mean square error, y t , are respectively the actual value and the predicted value of the wind power at time t, m is the sample length; p t is the wind power; is the acceptable duration when the prediction error meets the upper limit;
[0024] When the said prediction error meets it is determined that the prediction reasonable event A2 occurs.
[0025] Optionally, the use of the second - layer network to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing - door algorithm specifically includes:
[0026] Input the real wind power data in the training set into the swing - door algorithm module;
[0027] Use the swing - door algorithm module to divide the real wind power data into several stages, and judge whether there is a wind power ramp event A3 in each stage according to the definition of the wind power ramp event A3; wherein, the definition of the wind power ramp event A3 is specifically: if the change amplitude of the wind power compared with the rated power meets the first set ratio, it is recorded as a ramp event, or if the change amplitude of the wind power compared with the rated power meets the second set ratio and the duration meets the preset threshold, it is recorded as a ramp event;
[0028] Use the swing - door algorithm module to output the judgment result of the entire real wind power data, and complete the identification of the wind power ramp event A3;
[0029] The retention of the data segments identified as the wind power ramp event A3 in the predicted wind power data is specifically:
[0030] Correspond the judgment result to the predicted wind power data by time period, and obtain the data segments identified as the wind power ramp event A3 in the predicted wind power data;
[0031] Retain the data segments identified as the wind power ramp event A3 in the predicted wind power data.
[0032] Optionally, dilated convolutions are used for the convolutions in both the discriminator and the generator.
[0033] In a second aspect, the present invention provides a wind power scenario data generation device based on a corrected conditional generative adversarial network, which is characterized by including:
[0034] A data division module configured to divide the obtained predicted wind power data and real wind power data into a training set and a test set;
[0035] An acquisition module, configured to acquire a preset calibration conditional generative adversarial network, where the calibration conditional generative adversarial network includes a conditional corrector, a discriminator, and a generator; the conditional corrector is used to correct the received data, and its output terminals are respectively connected to the discriminator and the generator;
[0036] A training module, configured to train the calibration conditional generative adversarial network using the training set until a Nash equilibrium is reached between the discriminator and the generator;
[0037] A cross-validation module, configured to perform cross-validation on the trained calibration conditional generative adversarial network using the training set and the test set;
[0038] A wind power scenario data output module, configured to output wind power scenario data using the trained calibration conditional generative adversarial network.
[0039] Optionally, the training module includes:
[0040] A calibration sub-module, configured to input both the predicted wind power data and the real wind power data in the training set into the conditional corrector, and the conditional corrector corrects the data in the training set to obtain calibration conditional data, and sends the calibration conditional data to the discriminator and the generator respectively;
[0041] A data input module, configured to input the real wind power data in the training set into the discriminator;
[0042] A data generation module, configured to continuously extract the distribution features of the calibration conditional data using the multi-layer convolution of the generator to obtain generated data;
[0043] A data discrimination module, which uses the multi-layer convolution of the discriminator to complete the classification supervised learning task between the calibration conditional data and the generated data, and through repeated games with the generator until a Nash equilibrium is reached.
[0044] Optionally, the conditional corrector includes a first-layer network and a second-layer network;
[0045] The predicted wind power data in the training set is divided into a prediction misalignment event A1 and a prediction reasonable event A2;
[0046] After the training set is input into the conditional corrector, the first-layer network is used to judge whether the prediction misalignment event A1 occurs according to the prediction error;
[0047] After judging the prediction misalignment event A1, the second-layer network is used to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm;
[0048] Retain the data segments in the predicted wind power data that are identified as wind power ramp event A3, and replace the remaining data segments with the corresponding actual wind power data to generate new predicted wind power data, which is used as a conditional label and input into the generator and discriminator.
[0049] Optionally, the first-layer network is used to determine whether a prediction inaccuracy event A1 occurs based on the prediction error, specifically including:
[0050] Based on the predicted wind power data and the actual wind power data in the training set, calculate the prediction error;
[0051] When the prediction error satisfies then it is determined that a prediction inaccuracy event A1 has occurred, where T e is the duration of the prediction error; t is the wind power prediction time point; Δt is the time interval of wind power prediction; RMSE is the root mean square error, y t , respectively represent the actual value and the predicted value of the wind power at time t, m is the sample length; p t is the wind power; is the acceptable duration when the prediction error meets the upper limit;
[0052] When the prediction error satisfies then it is determined that a prediction reasonable event A2 has occurred.
[0053] Optionally, the second-layer network is used to identify the wind power ramp event A3 under the prediction inaccuracy event A1 based on the improved swing door algorithm, specifically including:
[0054] Input the actual wind power data in the training set into the swing door algorithm module;
[0055] Use the swing door algorithm module to divide the actual wind power data into several stages, and judge whether there is a wind power ramp event A3 in each stage according to the definition of the wind power ramp event A3; among them, the definition of the wind power ramp event A3 is specifically: if the change amplitude of the wind power compared with the rated power meets the first set ratio, it is recorded as a ramp event, or if the change amplitude of the wind power compared with the rated power meets the second set ratio and the duration meets the preset threshold, it is recorded as a ramp event;
[0056] Use the swing door algorithm module to output the judgment result of the entire actual wind power data to complete the identification of the wind power ramp event A3;
[0057] The specific method of retaining the data segments in the predicted wind power data that are identified as the wind power ramp event A3 is:
[0058] Correspond the judgment result to the predicted wind power data according to time periods, and obtain the data segment of the predicted wind power data that is identified as the wind power ramp event A3;
[0059] Retain the data segment of the predicted wind power data that is identified as the wind power ramp event A3.
[0060] In a third aspect, the present invention provides a wind power scenario data generation system based on a corrected conditional generative adversarial network, including a storage medium and a processor;
[0061] The storage medium is used to store instructions;
[0062] The processor is used to operate according to the instructions to execute the steps of the method according to any one of the first aspects.
[0063] Compared with the prior art, the beneficial effects of the present invention are:
[0064] The present invention proposes a wind power scenario data generation method, device and system based on a corrected conditional generative adversarial network, which fully considers the accuracy of wind power historical prediction data, designs a conditional corrector in the generative adversarial network, accurately identifies wind power prediction misalignment events using prediction errors, and identifies wind power ramp events using an improved swing door algorithm, realizes the discrimination of the accuracy of label information, and then realizes the cleaning of the wind power historical prediction data as conditional information, ensures the high referenceability of the conditional information, improves the stability and convergence of the training of the corrected conditional generative adversarial network, alleviates the problem of the collapse of the corrected conditional generative adversarial network, and finally obtains more accurate wind power scenario data. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] In order to make the content of the present invention easier to be clearly understood, the following further details the present invention according to specific embodiments in combination with the drawings, where:
[0066] Figure 1 is a schematic structural diagram of a conditional generative adversarial network diagram according to an embodiment of the present invention;
[0067] Figure 2 is a schematic structural diagram of a corrected conditional generative adversarial network diagram according to an embodiment of the present invention;
[0068] Figure 3 is a schematic diagram of a dilated convolution operation according to an embodiment of the present invention;
[0069] Figure 4 is a schematic diagram of the working principle of a conditional corrector according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0070] In order to make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below in conjunction with embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the protection scope of the present invention.
[0071] The application principle of the present invention will be described in detail below with reference to the accompanying drawings.
[0072] To achieve the efficient accommodation of wind power, characterizing the intermittency, randomness and volatility of wind power output has become a key problem to be solved. At present, deep learning represented by generative adversarial networks has great technical advantages in data and scenario generation. Using generative adversarial networks can learn the high-dimensional manifold features in the training data and can solve the problem of difficult modeling and generation of wind power time series data to a certain extent. However, the accuracy of the finally generated wind power scenario data is not high. For this reason, the present invention fully considers the accuracy of wind power historical prediction data, designs a conditional corrector in the generative adversarial network, can accurately identify wind power prediction misalignment events and wind power ramp events, clean the wind power historical prediction data used as conditional information, ensure the high referenceability of the conditional information, and finally can obtain more accurate wind power scenario data.
[0073] Embodiment 1
[0074] The present invention provides a method for generating wind power scenario data based on a corrected conditional generative adversarial network in an embodiment, including the following steps:
[0075] (1) Divide the obtained predicted wind power data and real wind power data into a training set and a test set;
[0076] (2) Obtain a preset corrected conditional generative adversarial network, which includes a conditional corrector, a discriminator and a generator; the conditional corrector is used to correct the received data, and its output ends are respectively connected to the discriminator and the generator;
[0077] (3) Use the training set to train the corrected conditional generative adversarial network until Nash equilibrium is reached between the discriminator and the generator;
[0078] (4) Use the training set and the test set to complete cross-validation of the trained corrected conditional generative adversarial network;
[0079] (5) Use the trained corrected conditional generative adversarial network to output wind power scenario data.
[0080] In a specific implementation manner of the embodiment of the present invention, the step of dividing the obtained predicted wind power data and real wind power data into a training set and a test set can be implemented through the following sub-steps:
[0081] Collect the predicted wind power data (i.e., historical predicted data) and the real wind power data (i.e., historical measured data) respectively. The sample dimensions of the predicted wind power data and the real wind power data must be the same, and the sample numbers of the test solutions and the sample sets are randomly allocated according to a ratio of 1:4. In the specific implementation process, the ratio of 1:4 can be modified according to the actual situation.
[0082] In a specific implementation manner of the embodiment of the present invention, the corrected conditional generative adversarial network can be constructed through the following steps:
[0083] a) Construct a conditional generative adversarial network:
[0084] The conditional generative adversarial network includes two deep neural networks: a discriminator and a generator. The generator maps a random noise signal to a generated sample by learning the latent distribution of the predicted wind power data. The discriminator tries to determine whether the input data is real wind power data or data generated under conditional information (i.e., predicted wind power data).
[0085] As Figure 1 shown, the predicted wind power data is conditional information c (which can also be called label information c). This conditional information is input into the discriminator to distinguish it from the conventional unsupervised generative adversarial network. The internal hierarchical structures of both the generator and the discriminator can include convolutional layers, pooling layers, and fully connected layers to implement convolution, activation functions, and batch normalization operations, and complete the extraction and recognition of the wind power time series and amplitude feature information.
[0086] The random noise signal z and the conditional information c are combined and input into the generator, and the generator will generate a scene sample containing the conditional information The discriminator has two tasks:
[0087] First, determine whether the generated data satisfies the conditional information c;
[0088] Second, determine the probability distance between the distribution of the generated data and the distribution of the real wind power data. It can be described by the Wasserstein distance. The probability distance W is defined as follows:
[0089]
[0090] In the formula: represents the joint probability density distribution that satisfies the measured wind power distribution and the predicted power distribution; is the probability measure between the distributions. According to the 1-Lipschitz continuity and the gradient penalty function transformation, the objective function of the discriminator under this probability measure is expressed as follows:
[0091]
[0092] Where: E represents the expected value of different distributions; D(~) is the objective function of the discriminator. The above formula can be understood as a min-max game problem with conditional information. The generator hopes to increase the probability that the generated samples are judged as true by the discriminator, while the discriminator hopes to increase the probability that it judges the samples generated by the generator as false as much as possible. After repeated games, the generator can generate scenario data that conforms to the conditional information and is close to the real wind power samples. There are convolutional operations in both the discriminator and the generator. In the embodiments of the present invention, to improve the ability of the convolutional operation to capture the longitudinal and transverse correlations of wind power output, dilated convolutions are introduced. By modifying the dilation rate, different dilation rates correspond to different receptive fields, that is, zeros are filled in the convolutional kernel, thereby obtaining the high-dimensional information of the samples. Figure 3 is a schematic diagram of convolutions with different dilation rates.
[0093] b) Construct a conditional corrector
[0094] The conditional information, as the input of the generator, has a labeling effect. In actual wind power prediction problems, problems such as the randomness and ambiguity of wind power itself, as well as the prediction interval, will all result in unsatisfactory prediction accuracy. If data with poor prediction accuracy is used as the conditional information input to the generator, it will introduce incorrect label information, resulting in the generator generating scenario data that deviates from the actual situation. Therefore, based on the conditional generative adversarial network, the present invention designs a conditional corrector to form a corrected conditional generative adversarial network as shown in Figure 2 .
[0095] Comparison Figure 1 , Figure 2 in which the historical wind power prediction data is no longer directly input into the generator, but is first jointly input into the conditional corrector with the real wind power data x, and the conditional corrector performs data correction to generate the corrected corrected wind power data which is then respectively input into the generator and the discriminator. The multi-layer convolution of the generator continuously extracts the distribution characteristics of the corrected wind power data . Similarly, the discriminator no longer uses the uncorrected conditional information, and also completes the classification supervised learning task between the corrected wind power data and the generated data through multi-layer convolution operations. Finally, through repeated games, the Nash equilibrium can be achieved, and the generator can generate wind power scenario data that conforms to the corrected conditions and is close to the real wind power data.
[0096] In the actual application process, a conditional corrector can be constructed based on the improved rotation door algorithm, and the construction method of the conditional corrector is as follows:
[0097] First, the prediction error e t is defined as follows:
[0098] e t = P t real - Pt pre (3)
[0099] Where: P t real , P t pre They are the actual value and predicted value of wind power at time t, respectively, with a time resolution of 15 minutes, i.e., t=15min (adaptive design can also be performed according to actual needs). The monthly root mean square error rate of the forecast should be less than 20%, and the root mean square error rate of the forecast error allocated to each forecast interval should also be less than 20%.
[0100] When the prediction error satisfies When , it is determined that the prediction inaccuracy event A1 occurs, where T e is the duration of the prediction error, t is the wind power prediction time point; Δt is the time interval of wind power prediction; RMSE is the root mean square error, y t , are the actual value and predicted value of wind power at time t, m is the sample length; p t is wind power; The acceptable time length when the prediction error meets the upper limit.
[0101] When the prediction error satisfies When , it is determined that the predicted reasonable event A2 occurs.
[0102] 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 situation where wind power rises and falls sharply in a short period of time, which can be expressed by the following formula:
[0103]
[0104] Where: is the threshold value of the ramp event. Wind power ramping is a type of small 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.
[0105] According to the above classification of prediction events, in order to correct the condition information, Figure 4 A conditional corrector based on prediction error is designed.
[0106] Figure 4The conditional corrector in it consists of two layers of networks, which are respectively defined as the first layer network and the second layer network. First, it judges whether the prediction misalignment event A1 occurs according to the prediction error. After judging the prediction misalignment event A1, the improved swing door algorithm is started to identify the wind power ramp event A3 under the prediction misalignment event A1. That is, when the training set is input into the conditional corrector, the first layer network is used to judge whether the prediction misalignment event A1 occurs according to the prediction error; after judging the prediction misalignment event A1, the second layer network is used to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm.
[0107] The improved swing door algorithm can identify the trend characteristics of wind power time series. First, a scoring function S needs to be constructed, and the detection of the ramp event can be converted into a dynamic optimization problem of solving the maximum value of the scoring function. The objective function J of this problem and its constraints are expressed as follows:
[0108]
[0109]
[0110] S(i,j) = (j - i) 2 ×A3(i,j) (10)
[0111] In the formula: the objective function J(i,j) needs to obtain the maximum value in the sub-interval; S(i,k) is the scoring value in the sub-interval. The ramp trend needs to satisfy formula (9). The scoring function can be specifically expressed as formula (10). A3(i,j) is the ramp event flag in the sub-interval (i,j), which is a 0-1 variable. When the value is 1, it represents that the ramp event occurs, and when the value is 0, no ramp event occurs in this sub-interval.
[0112] The main process of the improved swing door algorithm is as follows: input the real wind power data in the training set into the swing door algorithm module;
[0113] Use the swing door algorithm module to divide the real wind power data into several stages, and judge whether there is a wind power ramp event A3 in each stage according to the definition of the wind power ramp event A3; among them, the definition of the wind power ramp event A3 is specifically: if the change range of the wind power is compared with the rated power and satisfies the first set ratio, it is recorded as a ramp event, or if the change range of the wind power is compared with the rated power and satisfies the second set ratio and the duration satisfies the preset threshold, it is recorded as a ramp event; in the specific implementation process, the following settings can be made: if the change range of the wind power is greater than 25% of the rated power, it is recorded as a wind power ramp event; or if the change range of the wind power is greater than 20% of the rated power and the duration is greater than 4 hours, it is recorded as a wind power ramp event.
[0114] The rotation door algorithm module outputs the judgment result of the entire real wind power data, completes the identification of the wind power ramp event A3; corresponds the judgment result to the predicted wind power data according to time periods, and performs a correction operation on the predicted wind power data.
[0115] The correction operation is as follows: Correspond the judgment result to the predicted wind power data according to time periods, and obtain the data segment identified as the wind power ramp event A3 in the predicted wind power data; retain the data segment identified as the wind power ramp event A3 in the predicted wind power data, and the remaining predicted wind power data segments are replaced by the real wind power data to obtain new predicted wind power data, and the new predicted wind power data is used as the input of the correction condition label generator and discriminator. Specifically, when splicing data to obtain the correction condition data, when the prediction is inaccurate, the real wind power data is used to replace the predicted wind power data, such as Figure 2 in replace while in the time periods of the wind power ramp event A3 and the reasonable prediction A2, the predicted data is still used as the condition to input the generator and discriminator. In the actual application process, the Python programming language can be used to build the correction condition generative adversarial network in the embodiment of the present invention based on the Pytorch framework.
[0116] In a specific implementation manner of the embodiment of the present invention, training the correction condition generative adversarial network using the training set until a Nash equilibrium is reached between the discriminator and the generator includes the following steps:
[0117] Input both the predicted wind power data and the real wind power data in the training set into the conditional corrector, and the conditional corrector corrects the data in the training set to obtain the correction condition data, and sends the correction condition data to the discriminator and the generator respectively;
[0118] Input the real wind power data in the training set into the discriminator;
[0119] Continuously extract the distribution characteristics of the correction condition data by using the multi-layer convolution of the generator to obtain the generated data;
[0120] Complete the classification supervised learning task between the correction condition data and the generated data by using the multi-layer convolution of the discriminator, and through repeated games with the generator until a Nash equilibrium is reached.
[0121] In a specific implementation manner of the embodiment of the present invention, performing cross-validation on the trained correction condition generative adversarial network using the training set and the test set specifically includes the following steps:
[0122] Model parallel acceleration training based on CUDA;
[0123] a) Prepare the CUDA device and select the CUDA11 version;
[0124] b) Prepare the CUDA environment and install cuDNN;
[0125] c) Use CUDA instructions to read data and start training;
[0126] d) Complete k-fold cross-validation, where k is 10, k - 1 parts are used for training, 1 part is used for validation, and record the performance of each model.
[0127] Embodiment 2
[0128] Based on the same inventive concept as Embodiment 1, an apparatus for generating wind power scenario data based on a corrected conditional generative adversarial network is provided in an embodiment of the present invention, including:
[0129] A data division module configured to divide the obtained predicted wind power data and real wind power data into a training set and a test set;
[0130] An acquisition module configured to acquire a preset corrected conditional generative adversarial network, where the corrected conditional generative adversarial network includes a conditional corrector, a discriminator, and a generator; the conditional corrector is used to correct the received data, and its output terminals are respectively connected to the discriminator and the generator;
[0131] A training module configured to use the training set to train the corrected conditional generative adversarial network until a Nash equilibrium is reached between the discriminator and the generator;
[0132] A wind power scenario data output module configured to output wind power scenario data by using the trained corrected conditional generative adversarial network.
[0133] The apparatus for generating wind power scenario data based on a corrected conditional generative adversarial network in the embodiment of the present invention fully considers the accuracy of historical wind power prediction data, designs a conditional corrector in the generative adversarial network, accurately identifies wind power prediction misalignment events by using prediction errors, and identifies wind power ramp events by using an improved swing door algorithm, so as to realize the discrimination of the accuracy of label information, and further realize the cleaning of historical wind power prediction data as conditional information, ensure the high referenceability of conditional information, improve the stability and convergence of the training of the corrected conditional generative adversarial network, alleviate the problem of the collapse of the corrected conditional generative adversarial network, and finally obtain more accurate wind power scenario data.
[0134] In a specific implementation manner of the embodiment of the present invention, the division of the obtained predicted wind power data and real wind power data into a training set and a test set can be realized through the following sub-steps:
[0135] Collect the predicted wind power data (i.e., historical predicted data) and the real wind power data (i.e., historical measured data) respectively. The sample dimensions of the predicted wind power data and the real wind power data must be the same, and the sample numbers of the test solutions and the sample sets are randomly allocated according to a ratio of 1:4. In the specific implementation process, the ratio of 1:4 can be modified according to the actual situation.
[0136] In a specific implementation manner of the embodiment of the present invention, the corrected conditional generative adversarial network can be constructed through the following steps:
[0137] a) Construct a conditional generative adversarial network:
[0138] The conditional generative adversarial network includes two deep neural networks: a discriminator and a generator. The generator maps the random noise signal to the generated samples by learning the latent distribution of the predicted wind power data, and the discriminator tries to judge whether the input data is the real wind power data or the data generated under the conditional information (i.e., the predicted wind power data).
[0139] As Figure 1 shown, the predicted wind power data is the conditional information c (which can also be called the label information c). This conditional information is input into the discriminator to distinguish it from the conventional unsupervised generative adversarial network. The internal hierarchical structures of both the generator and the discriminator can include convolutional layers, pooling layers, and fully connected layers to implement convolution, activation functions, and batch normalization operations, and complete the extraction and recognition of the wind power time series and amplitude feature information.
[0140] The random noise signal z and the conditional information c are synthesized and input into the generator, and the generator will generate the scene samples containing the conditional information The discriminator has two tasks:
[0141] First, judge whether the generated data meets the conditional information c;
[0142] Second, judge the probability distance between the distribution of the generated data and the distribution of the real wind power data. It can be described by the Wasserstein distance, and this probability distance W is defined as follows:
[0143]
[0144] In the formula: represents the joint probability density distribution that satisfies the measured wind power distribution and the predicted power distribution; is the probability measure between the distributions. According to the 1-Lipschitz continuity and the gradient penalty function transformation, the objective function of the discriminator under this probability measure is expressed as follows:
[0145]
[0146] Where: E represents the expected values of different distributions; D(~) is the objective function of the discriminator. The above formula can be understood as a min-max game problem with conditional information. The generator hopes to increase the probability that the generated samples are judged as true by the discriminator, while the discriminator hopes to increase the probability that it judges the samples generated by the generator as false as much as possible. After repeated games, the generator can generate scenario data that conforms to the conditional information and is close to the real wind power samples. There are convolutional operations in both the discriminator and the generator. In the embodiments of the present invention, to improve the ability of the convolutional operation to capture the longitudinal and transverse correlations of wind power output, dilated convolutions are introduced. By modifying the dilation rate, different dilation rates correspond to different receptive fields, that is, 0 is filled in the convolutional kernel, thereby obtaining the high-dimensional information of the samples. Figure 3 Schematic diagram of convolutions with different dilation rates.
[0147] b) Construct a conditional corrector
[0148] The conditional information, as the input of the generator, has a labeling effect. In actual wind power prediction problems, problems such as the randomness, ambiguity of wind power itself, and prediction intervals will all result in unsatisfactory prediction accuracy. If data with poor prediction accuracy is used as the conditional information input to the generator, it will introduce incorrect label information, resulting in the generator generating scenario data that deviates from the actual situation. Therefore, based on the conditional generative adversarial network, the present invention designs a conditional corrector to form a corrected conditional generative adversarial network as shown in Figure 2 the following.
[0149] Comparison Figure 1 , Figure 2 in which the historical wind power prediction data is no longer directly input into the generator, but is first jointly input into the conditional corrector with the real wind power data x, and the conditional corrector performs data correction to generate the corrected corrected wind power data which is then respectively input into the generator and the discriminator. The multi-layer convolution of the generator continuously extracts the distribution characteristics of the corrected wind power data . Similarly, the discriminator no longer uses the uncorrected conditional information, and also completes the classification supervised learning task between the corrected wind power data and the generated data through multi-layer convolution operations. Finally, through repeated games, the Nash equilibrium can be achieved, and the generator can generate wind power scenario data that conforms to the corrected conditions and is close to the real wind power data.
[0150] In the actual application process, a conditional corrector can be constructed based on the improved swing door algorithm, and the construction method of the conditional corrector is as follows:
[0151] First, the prediction error e t is defined as follows:
[0152] e t = P t real - Pt pre (3)
[0153] Where: P t real , P t pre They are the actual value and predicted value of wind power at time t, respectively, with a time resolution of 15 minutes, i.e., t=15min (adaptive design can also be performed according to actual needs). The monthly root mean square error rate of the forecast should be less than 20%, and the root mean square error rate of the forecast error allocated to each forecast interval should also be less than 20%.
[0154] When the prediction error satisfies When , it is determined that the prediction inaccuracy event A1 occurs, where T e is the duration of the prediction error, t is the wind power prediction time point; Δt is the time interval of wind power prediction; RMSE is the root mean square error, y t , are the actual value and predicted value of wind power at time t, m is the sample length; p t is wind power; The acceptable time length when the prediction error meets the upper limit.
[0155] When the prediction error satisfies When , it is determined that the predicted reasonable event A2 occurs.
[0156] 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 situation where wind power rises and falls sharply in a short period of time, which can be expressed by the following formula:
[0157]
[0158] Where: is the threshold value of the ramp event. Wind power ramping is a type of small 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.
[0159] According to the above classification of prediction events, in order to correct the condition information, Figure 4 A conditional corrector based on prediction error is designed.
[0160] Figure 4The conditional corrector in it consists of two layers of networks, which are respectively defined as the first-layer network and the second-layer network. First, it judges whether the prediction misalignment event A1 occurs according to the prediction error. After judging the prediction misalignment event A1, the improved swing door algorithm is started to identify the wind power ramp event A3 under the prediction misalignment event A1. That is, when the training set is input into the conditional corrector, the first-layer network is used to judge whether the prediction misalignment event A1 occurs according to the prediction error; after judging the prediction misalignment event A1, the second-layer network is used to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm.
[0161] The improved swing door algorithm can identify the trend characteristics of wind power time series. First, a scoring function S needs to be constructed, and the detection of the ramp event can be converted into a dynamic optimization problem of solving the maximum value of the scoring function. The objective function J of this problem and its constraints are expressed as follows:
[0162]
[0163]
[0164] S(i,j) = (j - i) 2 ×A3(i,j) (10)
[0165] In the formula: the objective function J(i,j) needs to obtain the maximum value in the sub-interval; S(i,k) is the scoring value in the sub-interval. The ramp trend needs to satisfy formula (9). The scoring function can be specifically expressed as formula (10). A3(i,j) is the ramp event flag in the sub-interval (i,j), which is a 0-1 variable. When the value is 1, it represents that the ramp event occurs, and when the value is 0, no ramp event occurs in this sub-interval.
[0166] The main process of the improved swing door algorithm is as follows: Input the real wind power data in the training set into the swing door algorithm module;
[0167] Use the swing door algorithm module to divide the real wind power data into several stages, and judge whether there is a wind power ramp event A3 in each stage according to the definition of the wind power ramp event A3; among them, the definition of the wind power ramp event A3 is specifically: if the change range of the wind power is compared with the rated power and satisfies the first set ratio, it is recorded as a ramp event, or if the change range of the wind power is compared with the rated power and satisfies the second set ratio and the duration meets the preset threshold, it is recorded as a ramp event; in the specific implementation process, the following settings can be made: if the change range of the wind power is greater than 25% of the rated power, it is recorded as a wind power ramp event; or if the change range of the wind power is greater than 20% of the rated power and the duration is greater than 4 hours, it is recorded as a wind power ramp event.
[0168] The rotation door algorithm module outputs the judgment result of the entire real wind power data, completes the identification of the wind power ramp event A3, corresponds the judgment result to the predicted wind power data according to time periods, and performs a correction operation on the predicted wind power data.
[0169] The correction operation is as follows: Correspond the judgment result to the predicted wind power data according to time periods to obtain the data segment in the predicted wind power data that is identified as the wind power ramp event A3; retain the data segment in the predicted wind power data that is identified as the wind power ramp event A3, and replace the remaining predicted wind power data segments with the real wind power data to obtain new predicted wind power data, and the new predicted wind power data is used as the input of the correction condition label generator and discriminator. Specifically, when splicing data to obtain correction condition data, when the prediction is inaccurate, use the real wind power data to replace the predicted wind power data. For example, Figure 2 in replace And during the time periods of the wind power ramp event A3 and the reasonable prediction A2, the predicted data is still used as the condition input to the generator and discriminator. In the actual application process, the Python programming language can be used to build the correction condition generative adversarial network in the embodiments of the present invention based on the Pytorch framework.
[0170] In a specific implementation manner of the embodiment of the present invention, the training module includes:
[0171] A correction sub-module, configured to input both the predicted wind power data and the real wind power data in the training set into the condition corrector, and the condition corrector corrects the data in the training set to obtain correction condition data, and sends the correction condition data to the discriminator and the generator respectively;
[0172] A data input module, configured to input the real wind power data in the training set into the discriminator;
[0173] A data generation module, configured to continuously extract the distribution features of the correction condition data by using the multi-layer convolution of the generator to obtain generated data;
[0174] A data discrimination module uses the multi-layer convolution of the discriminator to complete the classification supervised learning task between the correction condition data and the generated data, and through repeated games with the generator until the Nash equilibrium is reached.
[0175] In a specific implementation manner of the embodiment of the present invention, the wind power scenario data generation device based on the correction condition generative adversarial network further includes a cross-validation module, and the cross-validation module is configured to perform cross-validation on the trained correction condition generative adversarial network by using the training set and the test set, specifically including the following steps:
[0176] CUDA-based Model Parallel Accelerated Training;
[0177] a) Prepare CUDA devices and select CUDA 11 version;
[0178] b) Prepare the CUDA environment and install cuDNN;
[0179] c) Read data using CUDA instructions and start training;
[0180] d) Complete k-fold cross-validation, where k is 10, k - 1 parts are used for training, 1 part is used for validation, and record the performance of each model.
[0181] Example 3
[0182] Based on the same inventive concept as in Example 1, an onshore wind farm scenario data generation system based on a conditional generative adversarial network is provided in an embodiment of the present invention, including a storage medium and a processor;
[0183] The storage medium is used to store instructions;
[0184] The processor is configured to operate according to the instructions to execute the steps of the method according to any one of the first aspects.
[0185] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0186] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in Figure 1 one or more of the processes or multiple processes and / or blocks Figure 1 one or more of the blocks or multiple blocks.
[0187] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including an instruction means that implements the functions specified in one or more of the procedures Figure 1 one or more of the procedures and / or blocks Figure 1 specified in one or more of the blocks or blocks.
[0188] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, such that a series of operational steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable apparatus provide steps for implementing the functions specified in one or more of the procedures Figure 1 one or more of the procedures and / or blocks Figure 1 specified in one or more of the blocks or blocks.
[0189] The embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above specific embodiments. The above specific embodiments are merely illustrative and not restrictive. Under the inspiration of the present invention, those of ordinary skill in the art can also make many forms without departing from the spirit and scope of the present invention as defined by the claims. These all fall within the protection scope of the present invention.
[0190] The basic principles, main features and advantages of the present invention have been shown and described above. Those skilled in the art should understand that the present invention is not limited by the above embodiments. The above embodiments and the description in the specification are only to illustrate the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention will have various changes and improvements, and these changes and improvements all fall within the scope of the present invention claimed. The scope of protection claimed by the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for generating wind power scenario data based on a corrected conditional generative adversarial network, characterized in that Including: Dividing the obtained predicted wind power data and real wind power data into a training set and a test set; Obtaining a preset corrected conditional generative adversarial network, which includes a conditional corrector, a discriminator, and a generator; the conditional corrector is used to correct the received data, and its output terminals are respectively connected to the discriminator and the generator; Training the corrected conditional generative adversarial network using the training set until a Nash equilibrium is reached between the discriminator and the generator; Performing cross-validation on the trained corrected conditional generative adversarial network using the training set and the test set; Outputting wind power scenario data using the trained corrected conditional generative adversarial network; The conditional corrector includes a first-layer network and a second-layer network; Dividing the predicted wind power data in the training set into prediction misalignment events A1 and prediction reasonable events A2; After the training set is input into the conditional corrector, using the first-layer network to determine whether the prediction misalignment event A1 occurs according to the prediction error; After determining the prediction misalignment event A1, using the second-layer network to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm; Retaining the data segments in the predicted wind power data identified as the wind power ramp event A3, and replacing the remaining data segments with the corresponding real wind power data to generate new predicted wind power data, which is used as a conditional label and input into the generator and the discriminator; the using the second-layer network to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm specifically includes: Inputting the real wind power data in the training set into the swing door algorithm module; Using the swing door algorithm module to divide the real wind power data into several stages, and determining whether there is a wind power ramp event A3 in each stage according to the definition of the wind power ramp event A3; wherein, the definition of the wind power ramp event A3 is specifically: if the change amplitude of the wind power compared with the rated power meets the first set ratio, it is recorded as a ramp event, or if the change amplitude of the wind power compared with the rated power meets the second set ratio and the duration meets the preset threshold, it is recorded as a ramp event; Using the swing door algorithm module to output the judgment result of the real wind power data to complete the identification of the wind power ramp event A3; The specifically retaining the data segments in the predicted wind power data identified as the wind power ramp event A3 is: Corresponding the judgment result to the predicted wind power data by time period to obtain the data segments in the predicted wind power data identified as the wind power ramp event A3; Retaining the data segments in the predicted wind power data identified as the wind power ramp event A3.
2. The method for generating wind power scenario data based on a corrected conditional generative adversarial network according to claim 1, wherein: The training the corrected conditional generative adversarial network using the training set until a Nash equilibrium is reached between the discriminator and the generator includes the following steps: Inputting both the predicted wind power data and the real wind power data in the training set into the conditional corrector, and the conditional corrector corrects the data in the training set to obtain corrected conditional data, and sends the corrected conditional data to the discriminator and the generator respectively; Inputting the real wind power data in the training set into the discriminator; Using the multi-layer convolution of the generator to continuously extract the distribution characteristics of the calibration condition data to obtain generated data; Using the multi-layer convolution of the discriminator to complete the classification supervised learning task between the calibration condition data and the generated data, and through repeated games with the generator until the Nash equilibrium is reached.
3. A method for generating wind power scenario data based on a corrected conditional generative adversarial network according to claim 1, characterized in that: The first layer network is used to determine whether the prediction misalignment event A1 occurs according to the prediction error, specifically including: Based on the predicted wind power data and the actual wind power data in the training set, the prediction error is calculated; When the prediction error satisfies , it is determined that a prediction misalignment event A1 occurs, where T e is the duration of the prediction error; t is the wind power prediction time point; Δt is the time interval of the wind power prediction; RMSE is the root mean square error, y t , are respectively the actual value and the predicted value of the wind power at time t, m is the sample length; p t is the wind power; is the acceptable duration when the prediction error satisfies the upper limit; When the prediction error satisfies then it is determined that a prediction reasonable event A2 occurs.
4. A method for generating wind power scenario data based on a corrected conditional generative adversarial network according to claim 1, characterized in that: Dilated convolutions are used in the convolutions of both the discriminator and the generator.
5. A wind power scenario data generation device based on a corrected conditional generative adversarial network, characterized in that Including: A data partitioning module configured to partition the obtained predicted wind power data and actual wind power data into a training set and a test set; An acquisition module configured to acquire a preset calibration condition generative adversarial network, where the calibration condition generative adversarial network includes a condition corrector, a discriminator, and a generator; the condition corrector is used to correct the received data, and its output terminals are respectively connected to the discriminator and the generator; A training module configured to use the training set to train the calibration condition generative adversarial network until the Nash equilibrium is reached between the discriminator and the generator; A cross-validation module configured to perform cross-validation on the trained calibration condition generative adversarial network using the training set and the test set; A wind power scenario data output module configured to output wind power scenario data using the trained calibration condition generative adversarial network; The condition corrector includes a first layer network and a second layer network; Dividing the predicted wind power data in the training set into a prediction misalignment event A1 and a prediction reasonable event A2; When the training set is input into the condition corrector, the first layer network is used to determine whether the prediction misalignment event A1 occurs according to the prediction error; After determining the prediction misalignment event A1, the second layer network is used to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm; Retaining the data segments in the predicted wind power data that are identified as the wind power ramp event A3, and replacing the remaining data segments with the corresponding actual wind power data to generate new predicted wind power data, which is used as a conditional label and input into the generator and the discriminator; The use of the second layer network to identify the wind power ramp event A3 under the prediction misalignment event A1 based on the improved swing door algorithm specifically includes: Inputting the actual wind power data in the training set into the swing door algorithm module; Using the swing door algorithm module to divide the actual wind power data into several stages, and determining whether there is a wind power ramp event A3 in each stage according to the definition of the wind power ramp event A3; where the definition of the wind power ramp event A3 is specifically: if the change amplitude of the wind power compared with the rated power satisfies the first set ratio, it is recorded as a ramp event, or if the change amplitude of the wind power compared with the rated power satisfies the second set ratio and the duration satisfies the preset threshold, it is recorded as a ramp event; Using the swing door algorithm module to output the judgment result of the actual wind power data to complete the identification of the wind power ramp event A3; The retaining of the data segments in the predicted wind power data that are identified as the wind power ramp event A3 is specifically: Correspond the judgment result to the predicted wind power data according to time periods, and obtain a data segment in the predicted wind power data that is identified as the wind power ramp event A3; Retain the data segment in the predicted wind power data that is identified as the wind power ramp event A3.
6. The wind power scenario data generation device based on a calibration conditional generative adversarial network according to claim 5, wherein The training module includes: A calibration sub-module, configured to input both the predicted wind power data and the real wind power data in the training set into the conditional corrector, and the conditional corrector corrects the data in the training set to obtain calibrated conditional data, and sends the calibrated conditional data to the discriminator and the generator respectively; A data input module, configured to input the real wind power data in the training set into the discriminator; A data generation module, configured to continuously extract the distribution characteristics of the calibrated conditional data by using multiple-layer convolutions of the generator to obtain generated data; A data discrimination module, which uses multiple-layer convolutions of the discriminator to complete the classification supervised learning task between the calibrated conditional data and the generated data, and through repeated games with the generator until the Nash equilibrium is reached.
7. The wind power scenario data generation device based on a corrected conditional generative adversarial network according to claim 5, characterized in that, The use of the first layer of network to judge whether the prediction misalignment event A1 occurs according to the prediction error specifically includes: Based on the predicted wind power data and the real wind power data in the training set, calculate the prediction error; When the prediction error satisfies , it is determined that a prediction misalignment event A1 occurs, where T e is the duration of the prediction error; t is the wind power prediction time point; Δt is the time interval of wind power prediction; RMSE is the root mean square error, y t , are the actual value and the predicted value of the wind power at time t, respectively, m is the sample length; p t is the wind power; is the acceptable duration when the prediction error meets the upper limit; When the prediction error satisfies then it is determined that a prediction reasonable event A2 occurs.
8. A wind power scenario data generation system based on a corrected conditional generative adversarial network, characterized in that: Comprising a storage medium and a processor; The storage medium is used to store instructions; The processor is used to operate according to the instructions to execute the steps of the method according to any one of claims 1-4.
Citation Information
Patent Citations
Wind-solar active power output scene generation method and device, electronic equipment and storage medium
CN114066236A