New energy extreme weather scene generation method and system based on improved CGAN
By using an improved CGAN method, extreme power output characteristics of new energy sources are extracted. Combining extreme value theory and probability distribution transfer, and utilizing long short-term memory networks and conditional information embedding, a conditional generative adversarial network is constructed. This solves the problem of inaccurate generation of extreme weather scenarios in existing technologies, achieves accurate generation of extreme weather scenarios for new energy sources, and improves the operational stability of the power system.
Patent Information
- Application Number
- CN202511759062.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-27
- Publication Date
- 2026-02-03
AI Technical Summary
Existing technologies cannot effectively generate realistic extreme weather scenarios for new energy sources, making it difficult to guarantee the stability of power system operation. This is mainly due to the lack of accurate capture of the differentiated characteristics of new energy output under extreme weather conditions and the lack of combination of extreme meteorological physical laws and the correlation between output.
An improved CGAN method is adopted to extract the extreme power output characteristics of new energy sources, perform data augmentation by combining extreme value theory and probability distribution transfer, and construct a conditional generative adversarial network by combining long short-term memory network and conditional information embedding. The generator and discriminator are trained to generate target new energy extreme weather scenarios.
It improves the accuracy and controllability of extreme weather scenario characterization, making the generated extreme scenarios more realistic and ensuring the operational stability of the power system.
Smart Images

Figure CN121456431A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to the technical field of new energy scene generation, in particular to a new energy extreme weather scene generation method and system based on an improved CGAN. BACKGROUND
[0002] Under the background of high proportion of renewable energy deep penetration, the strong volatility and characteristic specificity of new energy output pose a serious challenge to power system safety defense, risk assessment and emergency dispatch. Most existing power systems generate new energy scenes to reproduce and simulate new energy output sequences under different extreme weather conditions, and then plan power system operation to avoid the impact of new energy output volatility.
[0003] With the frequent occurrence of extreme weather, the demand for new energy extreme scene generation under extreme weather is growing. New energy scene generation under extreme weather itself has a double technical contradiction. On the one hand, the characteristics of sudden change and continuous low valley of output caused by extreme weather need to be effectively combined with probability distribution rules to ensure the extremeness and statistical rationality of the scene, and on the other hand, the diversification demand of power system for extreme scene requires the generation process to have controllability and correlation maintenance ability.
[0004] Traditional new energy scene generation methods are mostly based on the statistical rules of conventional scenes, which lack the ability to accurately capture the differentiated characteristics of new energy output under extreme weather, and it is difficult to integrate extreme weather physical laws and output correlation constraints in the model at the same time, which can easily lead to significant deviation of the generated extreme scene from the actual output characteristics, thereby affecting the planning accuracy of the power system and the stability of the power system operation cannot be guaranteed. SUMMARY
[0005] The purpose of the present application is to overcome the shortcomings in the prior art that the new energy scene generation method based on the statistical rules of conventional scenes cannot adapt to extreme weather scene generation, and the generated extreme scene has significant deviation from the actual output characteristics. The present application provides a new energy extreme weather scene generation method and system based on an improved CGAN, which strengthens the learning ability of the correlation of new energy output under extreme weather through the synergistic effect of feature quantization, probability enhancement and conditional generation, thereby improving the feature description accuracy and controllability of the extreme scene, and ensuring that the generated new energy extreme weather scene can better fit the actual situation.
[0006] The purpose of the present application is achieved by the following technical scheme: The new energy extreme weather scene generation method based on the improved CGAN comprises: Based on the historical output information of new energy under each type of extreme weather, the extreme output characteristics of new energy are extracted, and the corresponding condition information of each type of extreme weather scene is determined; Based on extreme value theory, the historical output information is data enhanced through probability distribution migration; In combination with long short-term memory network and conditional information embedding, the generator and discriminator of the conditional generative adversarial network are constructed. According to the historical output information and the corresponding conditional information after data enhancement, the constructed conditional generative adversarial network is trained. The generator of the trained conditional generative adversarial network is called to input the corresponding conditional information and random noise vector to generate the target new energy extreme weather scene.
[0007] Further, based on the historical output information of new energy under various types of extreme weather, the extreme output characteristics of new energy are extracted, including: The historical output information of new energy under various types of extreme weather is obtained, and the obtained historical output information is preprocessed. The extreme output characteristics of new energy are obtained by feature extraction of historical output information with extreme value level, fluctuation intensity and utilization efficiency as characteristic measurement dimensions.
[0008] Further, based on the extreme value theory, the historical output information is data enhanced through probability distribution migration, including: The historical output information is arranged in descending order according to the extreme value, the initial extreme sample is selected according to the sorting result, and the initial extreme sample training set is constructed; The conditional generative adversarial network for data enhancement processing is trained based on the initial extreme sample training set, and the candidate sample is generated; The extreme samples exceeding the preset threshold in the candidate sample are selected based on the extreme value theory, and the new sample training set is formed by combining the initial extreme sample set; The parameters of the generator of the conditional generative adversarial network for data enhancement processing in the current round are taken as the initialization value of the next round, and the next round iteration is performed according to the new sample training set until the data enhancement iteration end condition is met; The historical output information after data enhancement is obtained according to the initial extreme sample and the extreme sample selected in each iteration.
[0009] Further, in combination with long short-term memory network and conditional information embedding, the generator and discriminator of the conditional generative adversarial network are constructed, including: The generator and discriminator of the conditional generative adversarial network are constructed, and the generator and discriminator both include feature extraction layer, full connection layer and output layer; The long short-term memory network is embedded into the feature extraction layer of the generator to capture the time sequence dependence of the input generator data and output the time sequence feature vector; The conditional information fusion rule is embedded in the full connection layer of the generator to receive the conditional information of the input generator data and splice it with the corresponding time sequence feature vector for vector fusion; A plurality of nonlinear transformations are arranged in the output layer of the generator to output a new energy extreme weather scene sequence corresponding to the fused vector; The long short-term memory network is embedded in the feature extraction layer of the discriminator to capture the time sequence features of the input discriminator data and form a time sequence feature representation vector; The conditional consistency discrimination rule is embedded in the full connection layer of the discriminator to receive the conditional information of the input discriminator and splice it with the corresponding time sequence feature representation vector for vector fusion; An activation function is arranged in the output layer of the discriminator to output a real scene probability value according to the corresponding fused vector.
[0010] Further, the training of the constructed conditional generative adversarial network according to the data-enhanced historical output information and the corresponding conditional information comprises: A training set is constructed according to the data-enhanced historical output information and the corresponding conditional information, and the parameters of the generator and the discriminator of the constructed conditional generative adversarial network are initialized, and the training hyperparameters and the iteration end condition are set; Based on the training set, the constructed conditional generative adversarial network is trained by a phased adversarial strategy, and the network parameters of the conditional generative adversarial network are optimized and updated until the corresponding iteration condition is met.
[0011] Further, the training of the constructed conditional generative adversarial network by the phased adversarial strategy comprises: In the first training phase, the parameters of the generator are fixed, the long short-term memory network embedded in the generator is trained based on the training set, and the iteration end condition of the first training phase is met; In the second training phase, random noise vectors and conditional information are input into the generator to generate false extreme output features, and the generated false extreme output curve and the training set are input into the discriminator; The loss function of the generator and the discriminator is calculated according to the discrimination results of the discriminator on the training set and the false extreme output curve, and the network parameters of the generator and the discriminator are optimized and updated by back propagation; The optimization and update of the network parameters of the generator and the discriminator are repeatedly performed until the iteration end condition of the second training phase is met.
[0012] Further, the iteration end condition of the second training phase comprises: The loss function of the generator and the discriminator reaches a dynamic balance, and the distribution consistency index of the false extreme output curve generated by the generator and the corresponding historical output information is lower than a preset threshold.
[0013] Further, the condition information at least includes each extreme output feature and meteorological information of each extreme output feature under corresponding extreme weather.
[0014] Further, the generator of the trained conditional generative adversarial network is called to input corresponding condition information and a random noise vector to generate a target new energy extreme weather scene, including: The scene type of the target new energy extreme weather scene is acquired, and the condition information is constructed in combination with meteorological information and extreme output features of the corresponding scene type; A random noise vector is generated, and the condition information and the random noise vector are synchronously input into the generator to output a new energy extreme weather scene sequence.
[0015] The new energy extreme weather scene generation system based on the improved CGAN is used for the scene generation method in any of the above, and includes: The data processing module is used for extracting extreme output features of new energy according to historical output information of new energy under each type of extreme weather, determining corresponding condition information of each type of extreme weather scene, and performing data enhancement on the historical output information based on the extreme value theory through probability distribution migration; The model construction module is used for constructing the generator and the discriminator of the conditional generative adversarial network in combination with a long short-term memory network and condition information embedding; The training processing module is used for training the constructed conditional generative adversarial network according to the historical output information after data enhancement and the corresponding condition information; The scene generation module is used for calling the generator of the trained conditional generative adversarial network to input corresponding condition information and a random noise vector to generate a target new energy extreme weather scene.
[0016] The present application has the following advantages: Through extreme output feature quantization, the subsequent generated scene is prevented from deviating from the actual situation due to feature ambiguity or condition loss, and further data enhancement is performed in combination with the extreme value theory and probability distribution migration to make up for the problem of small sample size of extreme weather scene related data, and provide sufficient data for extreme output correlation learning. In combination with the long short-term memory network and the condition information embedding, the conditional adversarial distribution network is improved, so that the extreme weather under which the new energy output is accurately captured, the time sequence change rule is accurately captured, and the corresponding relationship between the scene and the output is closely combined with the condition information, the learning ability for the key characteristics of the extreme scene is improved, and the enhanced data and the corresponding condition information are further used for training to improve the description precision of the extreme scene characteristics, reduce the deviation between the generated scene and the real extreme scene, and ensure that the finally output new energy extreme weather scene can be fitted to the actual situation. BRIEF DESCRIPTION OF DRAWINGS
[0017] Figure 1 is a flowchart of the present application; Figure 2 is a structure diagram of an improved long short-term memory network for optimization according to an embodiment of the present application; Figure 3 is a comparison diagram of randomly generated samples and real output samples of wind power in a rainstorm scenario according to an embodiment of the present application; Figure 4 is a comparison diagram of randomly generated samples and real output samples of photovoltaic power in a rainstorm scenario according to an embodiment of the present application; Figure 5 is an autocorrelation coefficient AC box plot of a wind power extreme scenario output sample set generated by a CGAN model and real time series output according to an embodiment of the present application; Figure 6 is an autocorrelation coefficient AC box plot of a wind power extreme scenario output sample set generated by an LSTM-CGAN model and real time series output according to an embodiment of the present application; Figure 7 is an autocorrelation coefficient AC box plot of a wind power extreme scenario output sample set generated by an LSTM-EVT-CGAN model and real time series output according to an embodiment of the present application. DETAILED DESCRIPTION
[0018] The present application is further described below in conjunction with the accompanying drawings and embodiments.
[0019] Embodiment: A new energy extreme weather scenario generation method based on an improved CGAN, as shown in Figure 1 , includes: Based on the historical output information of new energy under each type of extreme weather, the extreme output features of new energy are extracted, and the corresponding condition information of each type of extreme weather scenario is determined; Based on the extreme value theory, the historical output information is data enhanced through probability distribution migration; Combined with long short-term memory network and condition information embedding, the generator and discriminator of the conditional generative adversarial network are constructed; According to the data enhanced historical output information and the corresponding condition information, the constructed conditional generative adversarial network is trained; The generator of the trained conditional generative adversarial network is called, the corresponding condition information and random noise vector are input, and the target new energy extreme weather scenario is generated.
[0020] Before extracting the extreme output characteristics, a core characteristic measurement index system is constructed based on the differentiated characteristics of new energy output under multiple types of extreme weather to characterize the extreme output characteristics. The core characteristic measurement index system includes the maximum output rate index and the minimum output rate index in the extreme value level dimension, the fluctuation rate index in the fluctuation intensity dimension, and the utilization hours index and the average power index in the utilization efficiency dimension. The fluctuation rate index is specifically calculated by the standard deviation of the power change rate of adjacent time points.
[0021] A core characteristic measurement index set is constructed based on the core characteristic measurement index system , to extract the differentiated dynamic characteristics of new energy output under multiple types of extreme weather. The calculation expression of each index in the index set is: ; ; ; ; ; Among them, is the maximum output rate, is the minimum output rate, is the fluctuation rate index, is the average power, and are the outputs of the new energy unit at and time points, is the total sample duration, is the new energy utilization hours in the specified period, is the new energy installed capacity.
[0022] On this basis, the extreme output characteristics of new energy are extracted based on the historical output information of new energy under each type of extreme weather, including: Obtaining the historical output information of new energy under each type of extreme weather, and preprocessing the obtained historical output information; Taking the extreme value level, the fluctuation intensity and the utilization efficiency as the characteristic measurement dimensions, the historical output information is feature extracted to obtain the extreme output characteristics of new energy.
[0023] The extracted extreme output characteristics of new energy and the meteorological information under the corresponding extreme weather are taken as the condition information, which is used as the input data of the subsequent conditional adversarial network to guide it to learn the mapping relationship between the typical extreme scenario and the output characteristics. That is, the condition information in the embodiment includes at least each extreme output characteristic and the meteorological information under the corresponding extreme weather of each extreme output characteristic.
[0024] Considering that extreme weather itself has the characteristics of low frequency and high impact, leading to a small amount of historical data samples of corresponding new energy output, if directly used for model training, it will lead to underfitting due to insufficient samples, and cannot fully learn the output law under extreme scenarios.
[0025] Therefore, by focusing on the tail characteristics of extreme data, i.e. the extremely small extreme output interval in historical data, and combining probability distribution migration, the distribution characteristics of a small amount of real extreme data are migrated and expanded to generate a large number of new extreme samples that conform to the real statistical law, effectively filling the sample gap in extreme scenarios and providing sufficient training samples for the model.
[0026] Among them, the data enhancement of historical output information based on extreme value theory includes: The historical output information is arranged in descending order according to the extreme value, the initial extreme sample is selected according to the sorting result, and the initial extreme sample training set is constructed; Train the conditional generative adversarial network for data enhancement processing based on the initial extreme sample training set, and generate candidate samples; Based on the extreme value theory, the extreme samples exceeding the preset threshold in the candidate samples are screened out, and the new sample training set is formed by combining the initial extreme sample set; The parameters of the conditional generative adversarial network generator for data enhancement processing in the current round are used as the initialization value of the next round, and the next round of iteration is performed according to the new sample training set until the data enhancement iteration end condition is met; According to the initial extreme sample and the extreme sample screened out in each iteration, the data enhanced historical output information is obtained.
[0027] The extreme value can select the measurement index of the extreme value level dimension, arrange the historical output information in descending order according to the corresponding index value, and select the top several historical output information as the initial extreme sample training set to quickly identify the samples with the most extreme properties in the historical output information.
[0028] Train the conditional generative adversarial network dedicated to data enhancement based on the initial extreme sample training set and generate candidate samples, and use the high-dimensional distribution matching ability of the conditional generative adversarial network to initially expand the number of extreme samples. The conditional generative adversarial network for data enhancement and the conditional generative adversarial network for scenario generation constructed subsequently are not the same adversarial network, and the training target is not to generate a complete scenario, but to learn the high-dimensional distribution law of the initial extreme sample, avoiding generating invalid data that is not consistent with the real extreme output characteristics.
[0029] The conditional generative adversarial network for data enhancement includes a generator and a discriminator. The generator G takes the latent noise vector z and the conditional variable c as input, and generates a sample The conditional variable c is then merged with the real sample x and the generated sample x' to input the discriminator D to analyze the approximation of the probability distribution of the generated sample and the real data. The generator ensures that x' approximates x as much as possible under the constraint of the conditional variable c, and the discriminator ensures that x' conforms to the conditional variable c and maximizes the discrimination between x and x'. ; ; ; wherein, represents the expected value, and are the distributions of the real sample and the generated sample respectively, is the generator loss, is the discriminator loss, is the target function of the data-augmented conditional generative adversarial network.
[0030] During the training process, the conditional generative adversarial network takes the initial extreme sample as input, simulates the distribution characteristics of extreme output through the generator, and outputs a large number of candidate samples. Although these candidate samples have the initial form of extreme output, some of them may not meet the extreme characteristics. Therefore, based on the extreme value theory, the extreme samples exceeding the preset threshold are selected from the candidate samples.
[0031] The preset threshold is determined based on the extreme value theory, such as the peak exceeding threshold method. The extreme value theory can quantify the probability of extreme output events by describing the extreme deviation of the probability distribution and the asymptotic behavior of the tail of the random variable, and extrapolate the extreme situation of the exceeding sample data. The cumulative distribution function is represented as : ; wherein, and are the scale parameter and the shape parameter respectively, is the input sample. The scale parameter and the shape parameter of the cumulative distribution function can be obtained by maximum likelihood estimation.
[0032] By defining the data extreme attribute through the cumulative distribution function, the corresponding preset threshold is set. After obtaining the candidate samples, only the candidate samples exceeding the corresponding preset threshold are retained, and the pseudo-extreme samples that do not meet the extreme characteristics are removed. Then, the filtered effective candidate samples are merged with the initial extreme samples to form a new sample training set. On the basis of retaining the real extreme characteristics of the initial samples, the training set size is expanded by adding new samples.
[0033] Since each new training set is expanded from previous samples, and its distribution pattern is continuous with the previous data, a parameter inheritance mechanism is further implemented during training. This avoids starting from scratch in each training round by inheriting generator parameters, effectively improving training efficiency and reducing model instability caused by parameter fluctuations. The iterative process follows the logic of generating candidate samples, extreme value screening, merging new training sets, and retraining using the conditional generative adversarial network (GAN), until the preset iteration termination conditions are met, such as the cumulative extreme sample size reaching the target scale, the deviation of the generated sample tail distribution from the theoretical distribution being below a threshold, and the GAN loss value stabilizing. At this point, the generated extreme samples fully reflect the statistical patterns of real extreme outputs.
[0034] Based on the initial extreme samples and the extreme samples selected in each iteration, the historical output information after data augmentation is obtained. All high-quality extreme samples are integrated to form a complete augmentation dataset, which ensures both the authenticity of the augmented data and the diversity of the data.
[0035] After data augmentation, a conditional generative adversarial network (GAN) for generating extreme weather scenarios for new energy sources was further constructed, and the GAN was optimized and improved through long short-term memory networks and conditional information embedding.
[0036] Among them, the long short-term memory network structure used for optimization and improvement is as follows: Figure 2 As shown, the input data for the Long Short-Term Memory (LSTM) network is set as follows: ,Depend on Input data at all times Combined with the hidden unit of the previous time step Perform a parameterized linear transformation to generate the hidden unit at the current time step. .
[0037] The forget gate, based on the current input and the hidden state of the previous time step, outputs a control signal with a value range of [0, 1] through the Sigmoid activation function. This signal is used to quantify the information in the memory cell state that needs to be retained or discarded. When the output value approaches 1, the memory cell state is completely passed on; when it approaches 0, selective forgetting of historical information is achieved, effectively avoiding the gradient vanishing problem.
[0038] The output expression of the forget gate is: ; In the formula: Is it the Gate of Oblivion? Output at any moment and These represent the weight matrix of the forget gate and the network bias term, respectively.
[0039] The input gate is cooperated by a sigmoid layer and a tanh layer, the former outputs information update weight, and the latter generates a candidate value vector. After element-by-element multiplication, the newly added information that needs to be integrated into the memory unit at the current moment is constructed.
[0040] The output expression of the sigmoid layer and the tanh layer of the input gate is: ; ; Among them, is the output of the sigmoid layer of the input gate at moment, and represent the weight matrix and network bias of the sigmoid layer of the input gate, is the candidate value vector generated by the tanh layer of the input gate at moment, is the weight matrix for calculating the candidate value vector, is the bias term of the tanh layer of the input gate.
[0041] The output gate also uses a sigmoid activation function to generate an output weight according to the updated memory unit state, and combines the memory information transformed by the tanh to dynamically regulate the output content of the hidden state at the current moment, and its expression is: ; ; ; In the formula, is the memory unit state at moment, is the memory unit state at moment, is the output value of the output gate at moment, and are the weight matrix and bias term of the output gate, respectively.
[0042] On the basis of the structure of the long short-term memory network, combined with the embedding of conditional information, a conditional generative adversarial network for generating new energy extreme weather scenarios is constructed. The basic structure of the improved conditional generative adversarial network for generating new energy extreme weather scenarios is consistent with that of the data enhancement conditional generative adversarial network.
[0043] Among them, the generator and discriminator of the conditional generative adversarial network constructed by combining the long short-term memory network and the conditional information embedding include: A generator and a discriminator of a conditional generative adversarial network are constructed, each of which includes a feature extraction layer, a fully connected layer, and an output layer; Long Short-Term Memory (LSTM) networks are embedded into the feature extraction layer of the generator to capture the temporal dependencies of the input generator data and output temporal feature vectors. Embed conditional information fusion rules in the fully connected layer of the generator to receive conditional information from the input generator data and concatenate it with the corresponding temporal feature vector for vector fusion. Multiple nonlinear transformations are set in the output layer of the generator to output the new energy extreme weather scene sequence corresponding to the fusion vector; Long Short-Term Memory (LSTM) networks are embedded into the feature extraction layer of the discriminator to capture the temporal features of the input discriminator data and form a temporal feature representation vector. Conditional consistency discrimination rules are embedded in the fully connected layer of the discriminator to receive the conditional information input to the discriminator and concatenate it with the corresponding temporal feature representation vector for vector fusion. An activation function is set in the output layer of the discriminator to output the probability value of the real scene based on the corresponding fusion vector.
[0044] The improvement direction is to capture temporal features and constrain conditional information, so as to match the generation needs of new energy extreme weather scenarios with strong temporal dependence and clear conditional constraints.
[0045] The generator and discriminator both adopt a three-stage structure consisting of a feature extraction layer, a fully connected layer, and an output layer. The feature extraction layer is used to capture time-series information, which can effectively solve the time dependence problem of new energy output. The fully connected layer is used for conditional information fusion and discrimination, which can solve the controllability problem of scene generation and discrimination. The output layer is used for result format adaptation, which can match the actual needs of scene generation or probability discrimination, ensuring that the conditional generative adversarial network can both learn time-series patterns and respond to conditional constraints.
[0046] For the generator, a long short-term memory network is embedded in the feature extraction layer. Through the gating mechanism and memory unit of the long short-term memory network, the time dependence of the input new energy output information is accurately captured, invalid noise is filtered out, and finally the time-series feature vector containing the time-series change pattern is output.
[0047] Specifically, the expression for the feature extraction layer of the constructed generator is as follows: ; in, For time steps The predicted value or output result, Indicates for Take the parameter or state with the highest probability. Let be the conditional probability, representing the probability given the past... the output of the prediction time step under the condition of the time step data; is a long short-term memory network, processes the historical output information and generates a fixed-dimensional vector identifier, represents the actual observed historical data points, is the output of the feature extraction layer.
[0048] At the same time, the condition information fusion rule is embedded in the full connection layer, and the generator presets the condition information fusion rule through this layer to adapt the time series feature vector output by the long short-term memory network to the condition information and element by element fusion, so that the subsequent scene generation process is always constrained by the condition information.
[0049] Finally, a multi-layer nonlinear change is set in the output layer to convert the fused high-dimensional vector into a new energy extreme weather scene sequence that meets the actual application.
[0050] For the discriminator, the goal is to distinguish whether the input data is a real extreme scene or a false scene generated by the generator, and the discrimination needs to meet the time series reality and condition consistency, and each layer is designed to form an adaptive confrontation with the generator.
[0051] Consistent with the generator, the discriminator feature extraction layer also embeds a long short-term memory network, but its role is to analyze the time series rationality of the input data. Whether it is a real historical extreme scene sequence or a false scene sequence output by the generator, the long short-term memory network will extract its time series features, such as output change frequency, extreme value duration, and correlation between previous and subsequent time points, to form a time series feature representation vector. This vector not only contains the time series rules of the input data, but also implicitly contains information about whether the time series conforms to the logic of real extreme scenes, such as sudden output surges and drops without weather changes, which will present corresponding abnormal features in the time series representation vector.
[0052] The full connection layer embeds the condition consistency discrimination rule to verify whether the time series features match the condition information. The discriminator will simultaneously receive the condition information corresponding to the input data, and then through the splicing and fusion mechanism of the full connection layer, the time series feature representation vector and the corresponding condition information are spliced and vector fused, and the condition consistency discrimination rule is combined to judge whether the current time series features conform to the scene rules corresponding to the condition information. In order to add a condition matching constraint to the optimization direction of the generator based on the judgment of the time series reality.
[0053] An activation function is set in the output layer of the discriminator to map the fusion discrimination result of the full connection layer to a real scene probability value in the 0-1 interval. When the probability value is close to 1, the discriminator determines that the input sample is a real extreme scene, its time series is reasonable and the condition is consistent, and when it is close to 0, it is determined to be a false scene generated by the generator, its time series has abnormalities or the condition does not match.
[0054] After the infrastructure of the generator and the discriminator of the conditional generative adversarial network is constructed, the conditional generative adversarial network is further trained according to the data-enhanced historical output information and the corresponding condition information.
[0055] The training of the constructed conditional generative adversarial network according to the data-enhanced historical output information and the corresponding condition information comprises: A training set is constructed according to the data-enhanced historical output information and the corresponding condition information, and the parameters of the generator and the discriminator of the conditional generative adversarial network are initialized, and training hyperparameters and iteration end conditions are set; Based on the training set, the constructed conditional generative adversarial network is trained by a phased adversarial strategy, and the network parameters of the conditional generative adversarial network are optimized and updated until the corresponding iteration conditions are met.
[0056] Based on the data-enhanced historical output information, each output sequence is matched with its corresponding condition information to form a structured training set.
[0057] The parameters of the generator and the discriminator of the conditional generative adversarial network are initialized by random initialization or pre-training parameter initialization. At the same time, key training hyperparameters are set, including adapting data size, learning rate and the number of discriminator updates per round.
[0058] The extreme weather scenario of new energy has strong time sequence dependence characteristics, and the long short-term memory network is the core component of the generator to capture this feature. If direct joint adversarial training is performed, the generator needs to cope with three training tasks of time sequence feature extraction, condition information fusion and adversarial discrimination, which easily leads to the problem that the long short-term memory network cannot fully learn the time sequence rule, and the generated false extreme output curve appears time sequence logic confusion.
[0059] Therefore, a phased adversarial strategy is set to train the conditional generative adversarial network in stages to ensure the training effect.
[0060] The training of the constructed conditional generative adversarial network according to the data-enhanced historical output information and the corresponding condition information comprises: In the first training phase, the parameters of the generator are fixed, and the long short-term memory network embedded in the generator is trained based on the training set until the iteration end condition of the first training phase is met; In the second training phase, random noise vectors and condition information are input into the generator to generate false extreme output features, and the generated false extreme output curve and the training set are input into the discriminator; The loss function of the generator and the discriminator is calculated according to the discrimination results of the discriminator on the training set and the false extreme output curve, and the network parameters of the generator and the discriminator are optimized and updated by back propagation; The network parameter optimization update of the generator and the discriminator is repeatedly performed until the iteration end condition of the second training stage is met.
[0061] In the first training stage, in order to avoid the target dispersion caused by the multi-part simultaneous training, the parameters of the full connection layer, the output layer and other non-long short-term memory network components of the generator are fixed, and only the training set is input to train the embedded long short-term memory network in the generator.
[0062] In the training process, the long short-term memory network only learns the time series dependence relationship of new energy output under extreme weather, and optimizes its own parameters through time series prediction type loss. The iteration end condition of the first training stage is that the training loss of the long short-term memory network is stable for multiple rounds in succession, or that the time series correlation of the extracted time series features and the real output sequence meets the corresponding threshold.
[0063] After the first training stage is completed, the second training stage is entered. First, the generator receives random noise vectors and corresponding condition information, captures the time series regularity by means of the long short-term memory network which has been trained in the first training stage, fuses the condition information through the full connection layer, and generates a false extreme output curve after nonlinear transformation of the output layer. Then, the false extreme output curve and the real extreme output data in the training set containing the corresponding condition information are input into the discriminator at the same time. The discriminator extracts the time series features of the two types of data through its own long short-term memory network, verifies the consistency of the time series features and the condition information through the full connection layer, and finally outputs the real scene probability value in the interval of 0-1.
[0064] The long short-term memory network embedded in the discriminator does not need to be trained separately in advance. Its passive identification of time series rationality and the collaborative learning logic in joint adversarial training can meet its training purpose in the training process in the second training stage.
[0065] Then, the loss of the two is calculated according to the preset loss function, and all network parameters of the generator and the discriminator are optimized synchronously through back propagation. This process is repeated continuously until the iteration end condition of the second training stage is met.
[0066] The iteration end condition of the second training stage includes: The loss functions of the generator and the discriminator reach a dynamic balance, and the distribution consistency index of the false extreme output curve generated by the generator and the corresponding historical output information is lower than the preset threshold.
[0067] Based on the trained conditional generative adversarial network, the precise generation of target extreme weather scenes can be realized.
[0068] Specifically, the generator of the trained conditional generative adversarial network is called, the corresponding condition information and random noise vectors are input, and the target new energy extreme weather scene is generated, including: obtain a scene type of a target new energy extreme weather scene, combine meteorological information and extreme output characteristics of the corresponding scene type to construct condition information; generate a random noise vector, input the condition information and the random noise vector into a generator synchronously, and output a new energy extreme weather scene sequence.
[0069] obtain a scene type of a target new energy extreme weather scene, combine meteorological information and extreme output characteristics of the corresponding scene type to construct condition information;
[0070] further generate a random noise vector to introduce uncertainty and avoid singularity of the generated target scene. The random noise vector is also generated according to the parameters set during model training, which ensures randomness and avoids deviation of the generated scene from the actual rule due to abnormal noise parameters, Finally, the condition information and the random noise vector are input into the trained generator synchronously, and a structured new energy extreme weather scene sequence is output.
[0071] Another aspect of the embodiment also provides a new energy extreme weather scene generation system based on the improved CGAN, which comprises: The data processing module is configured to extract extreme output characteristics of the new energy according to historical output information of the new energy under various types of extreme weather, determine corresponding condition information of the extreme weather scenes of various types, and perform data enhancement on the historical output information through probability distribution migration based on the extreme value theory. The model construction module is configured to combine a long short-term memory network and condition information embedding to construct a generator and a discriminator of the conditional generative adversarial network. The training processing module is configured to train the constructed conditional generative adversarial network according to the data-enhanced historical output information and the corresponding condition information. The scene generation module is configured to call the trained generator of the conditional generative adversarial network, input the corresponding condition information and a random noise vector, and generate a target new energy extreme weather scene.
[0072] The data processing module, the model construction module, the training processing module, and the scene generation module are all computers or other devices with data processing capabilities, carry corresponding algorithm programs, and can realize accurate generation of new energy extreme weather scenes.
[0073] The new energy extreme weather scene generation method proposed in the embodiment is verified based on measured meteorological data and historical output sequences of adjacent wind and light stations in a certain place in the past four years.
[0074] The data of the previous three years is taken as a training data set for feature engineering and model parameter training, and the data of the last year is taken as a test data set to verify the effectiveness of the extreme scenario generation model.
[0075] In the data preprocessing stage, data cleaning, outlier removal, and normalization processing are performed in sequence to build a standardized data set that meets the model input requirements.
[0076] Further based on the scenario accuracy evaluation index system, the effectiveness of the generation method is quantitatively verified. At the same time, the extreme weather scenario generation model (LSTM-EVT-CGAN) proposed in this embodiment is compared with CGAN (Conditional Generative Adversarial Nets) and LSTM-CGAN model generation samples to demonstrate the advantages of the proposed model in processing extreme scenario time series output data.
[0077] Under extreme weather scenarios, compared with the single dominant feature of extreme temperature and snowstorm events, the rainstorm weather scenario has more significant nonlinear characteristics, with strong nonlinear interaction between meteorological factors and high uncertainty in new energy output. Therefore, this embodiment specifically selects the rainstorm scenario as the verification benchmark to evaluate the model's ability to capture and analyze the correlation characteristics of complex extreme weather scenarios and verify the model's robustness and generalization performance under complex meteorological conditions.
[0078] The accuracy of the generated sample output feature indicators of the three models for photovoltaic and wind power under rainstorm weather scenarios is shown in Tables 1 and 2, respectively: Table 1 Comparison of accuracy of generated sample output feature indicators for photovoltaic under rainstorm scenario
[0079] Table 2 Comparison of accuracy of generated sample output feature indicators for wind power under rainstorm scenario
[0080] As shown in Tables 2 and 3, under extreme scenarios, the accuracy of the generated sample output feature indicators is higher than 90%, and is higher than that of other models, which can effectively verify the precise generation capability of the scenario generation model proposed in this embodiment.
[0081] Based on the three models for generating samples of wind power and photovoltaic under rainstorm scenarios, they are compared with the test samples in the test set, and the comparison results are shown in Figure 3 and Figure 4
[0082] From Figure 3 andFigure 4 It can be seen that the generated samples have high consistency with the dynamic trend of the test samples that do not participate in training, proving that the scene generation model described in the embodiment is accurate in depicting the characteristics of new energy time series output.
[0083] Considering the similarity of wind and light random scene generation processes, and the high volatility of wind power output sequence, which makes it more typical in random scene generation, the wind power extreme scene is selected as the main analysis object. The autocorrelation coefficient AC box plots of the wind power extreme scene output sample sets generated by the CGAN, LSTM-CGAN and LSTM-EVT-CGAN models and the real time series output are shown in Figure 5 、 Figure 6 and Figure 7 .
[0084] It can be seen from Figure 5 、 Figure 6 and Figure 7 that the AC of the samples generated by the traditional CGAN is quite different from the actual sequence, and the ability to capture the time correlation of the time series output is insufficient. The AC of the scene samples generated based on the LSTM-CGAN and LSTM-EVT-CGAN models can cover the autocorrelation coefficient of the actual samples, and show high consistency in the change law.
[0085] In addition, the AC of the samples generated by the LSTM improved CGAN model has fewer outliers compared with the traditional CGAN method, verifying the optimization effect of the LSTM on the time series modeling ability of the generator and the discriminator. Further analysis shows that the median of the AC of the extreme scene sample set generated by the LSTM-EVT-CGAN method is closer to the AC of the actual time series output, and the deviation is low, verifying that the data enhancement strategy based on the extreme value theory can effectively improve the efficiency of the model in learning the time series correlation of new energy output, and enhance its ability to depict complex time-dependent relationships.
[0086] The embodiments described above are only a preferred scheme of the present application, and do not limit the present application in any form. Other variants and modifications can be made without exceeding the technical solutions described in the claims.
Claims
1. A method for generating extreme weather scenarios of new energy based on improved CGAN, characterized in that, The method comprises the following steps: Based on the historical output information of new energy under various types of extreme weather, the extreme output characteristics of new energy are extracted, and the corresponding condition information of each type of extreme weather scene is determined; Based on the extreme value theory, the historical output information is data enhanced through probability distribution migration; A generator and a discriminator of a conditional generative adversarial network are constructed by combining a long short-term memory network and condition information embedding; The conditional generative adversarial network constructed is trained according to the historical output information after data enhancement and the corresponding condition information; The generator of the trained conditional generative adversarial network is called to input the corresponding condition information and a random noise vector to generate a target new energy extreme weather scene.
2. The method for generating new energy extreme weather scene based on improved CGAN according to claim 1, characterized in that, The method comprises the following steps: The historical output information of new energy under various types of extreme weather is obtained, and the obtained historical output information is preprocessed; Extreme value level, fluctuation intensity and utilization efficiency are taken as characteristic measurement dimensions, the historical output information is characterized, and the extreme output characteristics of new energy are obtained.
3. The method of claim 1, wherein the method is characterized by, The method comprises the following steps: The historical output information is arranged in descending order according to the extreme value, and initial extreme samples are selected according to the sorting result, and an initial extreme sample training set is constructed; A conditional generative adversarial network for data enhancement processing is trained based on the initial extreme sample training set, and candidate samples are generated; Extreme samples exceeding a preset threshold are screened out from the candidate samples based on the extreme value theory, and the initial extreme sample set is combined to form a new sample training set; The parameters of the generator of the conditional generative adversarial network for data enhancement processing in the current round are taken as the initialization values of the next round, and the next round of iteration is performed according to the new sample training set until the data enhancement iteration end condition is met; The historical output information after data enhancement is obtained according to the initial extreme samples and the extreme samples screened out in each round of iteration.
4. The method for generating new energy extreme weather scene based on improved CGAN according to claim 1, characterized in that, The method comprises the following steps: The generator and the discriminator of the conditional generative adversarial network are constructed, and the generator and the discriminator both comprise a feature extraction layer, a full connection layer and an output layer; The long short-term memory network is embedded into the feature extraction layer of the generator to capture the time sequence dependence of the input generator data and output a time sequence feature vector; The condition information fusion rule is embedded into the full connection layer of the generator to receive the condition information of the input generator data, and the condition information is spliced with the corresponding time sequence feature vector for vector fusion; A plurality of nonlinear transformations are set in the output layer of the generator to output a new energy extreme weather scene sequence corresponding to the fused vector; The long short-term memory network is embedded into the feature extraction layer of the discriminator to capture the time sequence features of the input discriminator data and form a time sequence feature representation vector; The condition consistency discrimination rule is embedded into the full connection layer of the discriminator to receive the condition information of the input discriminator data, and the condition information is spliced with the corresponding time sequence feature representation vector for vector fusion; An activation function is set in the output layer of the discriminator to output a real scene probability value according to the corresponding fused vector.
5. The method for generating new energy extreme weather scene based on improved CGAN according to claim 1, characterized in that, The training of the constructed conditional generative adversarial network according to the data-enhanced historical output information and the corresponding condition information comprises: constructing a training set according to the data-enhanced historical output information and the corresponding condition information, initializing parameters of a generator and a discriminator of the constructed conditional generative adversarial network, setting training hyperparameters and an iteration end condition, and training the constructed conditional generative adversarial network based on the training set by a phased adversarial strategy, and optimizing and updating network parameters of the conditional generative adversarial network until the corresponding iteration condition is met.
6. The method of claim 5, wherein the method is characterized by, The training of the constructed conditional generative adversarial network based on the phased adversarial strategy comprises: in a first training phase, fixing the parameters of the generator, training a long short-term memory network embedded in the generator based on the training set until the iteration end condition of the first training phase is met, in a second training phase, inputting random noise vectors and condition information into the generator to generate false extreme output features, and inputting the generated false extreme output curves and the training set into the discriminator, calculating loss functions of the generator and the discriminator according to the discrimination results of the discriminator on the training set and the false extreme output curves, and optimizing and updating network parameters of the generator and the discriminator by back propagation, repeating the optimization and updating of the network parameters of the generator and the discriminator until the iteration end condition of the second training phase is met.
7. The method of claim 6, wherein the method is a method for generating new energy extreme weather scenarios based on improved CGAN. The iteration end condition of the second training phase comprises: the loss functions of the generator and the discriminator reach a dynamic balance, and a distribution consistency index of the false extreme output curves generated by the generator and the corresponding historical output information is lower than a preset threshold.
8. The method for generating new energy extreme weather scene based on improved CGAN according to claim 1, characterized in that, The condition information at least comprises each extreme output feature and meteorological information under each extreme weather corresponding to each extreme output feature.
9. The method for generating new energy extreme weather scene based on improved CGAN according to claim 1, characterized in that, The calling of the generator of the trained conditional generative adversarial network, the inputting of the corresponding condition information and random noise vectors, and the generation of the target new energy extreme weather scene comprise: obtaining a scene type of the target new energy extreme weather scene, constructing condition information in combination with meteorological information and extreme output features corresponding to the scene type, generating random noise vectors, synchronously inputting the condition information and the random noise vectors into the generator, and outputting a new energy extreme weather scene sequence.
10. A new energy extreme weather scene generation system based on an improved CGAN, configured to perform the scene generation method of any one of claims 1 to 9. It comprises: a data processing module configured to extract extreme output features of new energy according to historical output information of new energy under each type of extreme weather, determine corresponding condition information of each type of extreme weather scene, and perform data enhancement on the historical output information by probability distribution migration based on the extreme value theory; a model construction module configured to construct a generator and a discriminator of a conditional generative adversarial network in combination with a long short-term memory network and condition information embedding; a training processing module configured to train the constructed conditional generative adversarial network according to the data-enhanced historical output information and the corresponding condition information; a scene generation module configured to call the generator of the trained conditional generative adversarial network, input the corresponding condition information and random noise vectors, and generate a target new energy extreme weather scene.