Renewable energy random scene generation method based on enhanced time sequence generative adversarial network

By introducing the spatiotemporal attention module, projection module, supervision module and Transformer encoder network into the generative adversarial network, the problem of poor generation of wind and photovoltaic power generation scenes in the existing technology is solved, and more accurate spatiotemporal correlation capture and update are achieved. Realistic scene generation.

CN119358593APending Publication Date: 2025-01-24TAIYUAN UNIVERSITY OF TECHNOLOGY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411292022.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-14
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The improved generative adversarial network of existing recurrent neural networks is poor in generating wind and light power generation scenarios, and it is difficult to accurately capture the complex probability characteristics and spatial and temporal correlation of wind and light power generation.

Method used

Adopt a enhanced sequential -generated confrontation network. By constructing time -space attention modules, projection modules, supervision modules, and generating confrontation modules, combined with the Transformer encoder network, improve the structure and loss function of the GAN to better capture the time and space correlation of time and space of landscape power generation data Essence

Benefits of technology

It improves the generative adversarial network's ability to generate wind and photovoltaic power generation scenarios, captures spatiotemporal correlations more accurately, generates more realistic and detailed results, and improves the ability to handle uncertainty variables in power system planning and operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119358593A_ABST
    Figure CN119358593A_ABST
Patent Text Reader

Abstract

The invention relates to a renewable energy scene generation method, in particular to a renewable energy random scene generation method based on an enhanced time sequence generative adversarial network. According to the method, firstly, a Transform encoder part is adopted as a bottom-layer framework of each module of the enhanced time sequence generative adversarial network, so that time sequence features can be fully captured, and the overall model complexity is reduced; secondly, integrating a space attention sub-module and a time attention sub-module into the model, dynamically paying attention to the most important space-time characteristics in the input data, improving the expression ability of the model, and generating a more real and detailed result; besides unsupervised confrontation loss, step-by-step supervision loss using original data as supervision is introduced, and conditional distribution of effective data capture of the model is ensured; finally, a projection module is introduced, mapping from an original feature space to a high-dimensional potential space is provided, the potential relation between features is better captured, and the efficiency of the GAN antagonism training process is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a renewable energy scenario generation method, specifically a renewable energy random scenario generation method based on an enhanced time series generative adversarial network. Background Art

[0002] As the penetration rate of renewable energy such as wind power in the power system continues to increase, its randomness and intermittency increase the uncertainty of the power grid, posing a huge challenge to the operation and planning of the power system. The scenario analysis method is an effective tool to describe the uncertainty of renewable energy. Its essence is to model the probability model of random vectors with continuous probability distribution, discretize the probability model into a series of time series scenarios, and transform the random optimization problem of the power system into a deterministic problem for processing. Unlike the day-ahead scenario generation, the random scenario generation does not specify the time scale. The generated scenario only needs to meet the overall distribution characteristics of the historical wind power data, and does not need to meet the specific output characteristics on a certain date.

[0003] Most existing scenario generation studies use statistical methods, first building a specific mathematical model to describe the probability distribution of wind and solar power, and then building a scenario set through random sampling methods such as Monte Carlo sampling or Latin hypercube sampling. The generation model based on statistical methods has strong interpretability, but it is difficult to accurately capture the complex probabilistic characteristics and spatiotemporal correlation of wind and solar power generation in practical applications.

[0004] With the development of artificial intelligence technology, the Generative Adversarial Network (GAN) can directly generate wind and solar power generation scenarios by alternately training two deep neural networks, the generator and the discriminator, and using GAN to learn probability features from historical data of wind and solar power generation without establishing a specific probability distribution model. However, since GAN is derived from image generation, its network structure does not fully consider the characteristics of time series data, which makes it challenging to capture the time dependency of the spatiotemporal joint probability distribution in wind and solar time series data.

[0005] Considering that the wind and solar output sequence has obvious time correlation, that is, there is a strong correlation between the data in adjacent time periods, the paper "Pressure sensor data modeling with recurrent conditional generative adversarial networks" proposes to improve GAN based on recurrent neural network (RNN). However, the serial structure of RNN requires sequential processing of the elements in the sequence, which has the "vanishing gradient" problem, making it difficult to model long-distance dependencies and easily ignoring local time features. Therefore, the existing improvements to GAN affect its actual effect in generating random scenarios of renewable energy. Summary of the invention

[0006] In order to solve the problem that the generative adversarial network has poor effect in generating wind and solar power generation scenarios after the generative adversarial network is improved by a recurrent neural network, the present invention provides a renewable energy random scenario generation method based on an enhanced temporal generative adversarial network.

[0007] The present invention is implemented by adopting the following technical solution: a method for generating random scenarios of renewable energy based on enhanced temporal generative adversarial networks, the specific steps of which are as follows:

[0008] Step 1: First, construct a spatiotemporal attention module and introduce spatial and temporal attention submodules to dynamically improve the input data features, which are expressed as follows: Where X′ is the real data after the spatiotemporal attention module; X is the power sample matrix of the renewable energy power station; N is the renewable energy power station in a certain area; T is the total time length of the power sample, L is the number of samples; A S , A T Attention maps of spatial and temporal attention submodules respectively;

[0009] Step 2: Construct a projection module, introduce an embedding network and a recovery network to achieve the mapping between the original feature space and the latent space; the embedding network can extract richer and more representative features from the real data X′, which is expressed as follows: The restoration network can map the latent space data to the original feature space, which is expressed as follows: Where: is the real scene in the latent space, is the generated scene after the supervised module in the latent space, They are the real scene and the generated scene restored to the original feature space respectively; E and R are the projection function and the recovery function respectively, which are composed of the Transformer encoder module, the linear layer and the sigmoid activation function;

[0010] Step 3: Construct the supervision module, which is expressed as follows: Where: is the generated scene after the supervision module; S is the supervision function, which consists of the Transformer encoder module, the linear layer and the sigmoid function;

[0011] Step 4: Construct a generative adversarial module, including a generator and a discriminator. The generator maps the noise vector z to the corresponding generated scene. The discriminator then transforms the real scene in the latent space Generate scenes Separately, the generator and discriminator are represented as: Where: G and D are the generator and discriminator respectively, which are composed of Transformer encoder module, linear layer and sigmoid function; Represents a classification of real or generated scenes;

[0012] Step 5: Introduce the spatiotemporal attention module, projection module and supervision module to improve the generative adversarial module and form an enhanced temporal generative adversarial network.

[0013] Step 6: Enhance the temporal generative adversarial network to exploit real scenarios in the latent space And the generated scene after the supervision module The constructed training set is iteratively trained, and the hyperparameters in the model are adjusted during the training process until the enhanced temporal generative adversarial network with the best generation effect is obtained.

[0014] In the above-mentioned method for generating random scenarios of renewable energy based on enhanced temporal generative adversarial networks, the improvement of the generative adversarial module in step 5 requires reconstruction and collaborative training of the loss function. The specific steps are as follows:

[0015] 1) First, the loss function constructed by the supervised module learning is reconstructed as:

[0016] In the formula, Represents probability distribution The mathematical expectation under represents the value of the real scene in the latent space at time t, Represents the value of the real scene at time t after the supervision module;

[0017] 2) The loss function constructed by the projection module is reconstructed into the bi-norm of the original feature space and latent space data: X t represents the value of the power sample matrix at time t, Represents the value of the real scene restored to the original feature space at time t, Represents the value of the generated scene restored to the original feature space at time t;

[0018] 3) Generate adversarial loss Considering the projection and supervision modules, the reconstruction is as follows:

[0019]

[0020] 4) Finally, the objective function of the enhanced temporal generation adversarial network is reconstructed as: Where: η is the coefficient of balance loss.

[0021] Considering that Transformer is a self-attention mechanism model for time series tasks, it can extract features from input data in parallel and model long- and short-term time series features, where the self-attention mechanism can pay attention to important sequence features through weight allocation. Therefore, the present invention introduces the Transformer encoder network into GAN. Applying it to the generator can enhance the generator's ability to capture dynamic features, and applying it to the discriminator can enhance the discriminator's ability to classify and identify real and generated error sequence features. Generating random scenes only requires the use of the Transformer encoder structure, which reduces the complexity of the overall model and efficiently and fully mines time series features. The present invention proposes a renewable energy scenario generation method based on an enhanced time series generative adversarial network, which fully mines the complex spatiotemporal correlation of renewable energy output and provides a more advanced uncertain variable processing method for power system planning and operation problems.

[0022] In summary, compared with the prior art, the beneficial effects of the present invention are:

[0023] The present invention proposes a method for generating random scenes of renewable energy based on an enhanced temporal generative adversarial network to overcome the limitations of the prior art. First, only the Transformer encoder part is used as the underlying architecture of each module of the enhanced temporal generative adversarial network, which can not only efficiently and fully capture the time series characteristics, but also reduce the overall model complexity; secondly, the spatial and temporal attention submodules are integrated into the GAN model to dynamically focus on the most important spatiotemporal features in the input data, improve the expressive ability of the model, and generate more realistic and detailed results; in addition, in addition to the unsupervised adversarial loss, a stepwise supervised loss using the original data as supervision is introduced to ensure that the model effectively captures the conditional distribution of the data; finally, the projection module is introduced to provide a mapping from the original feature space to the high-dimensional latent space, better capture the potential relationship between features, and improve the efficiency and effectiveness of the GAN adversarial training process. In summary, the enhanced temporal generative adversarial network proposed in the present invention can fully explore the complex spatiotemporal correlation of renewable energy output and provide a more advanced uncertainty variable processing method for power system planning and operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 Schematic diagram of the enhanced temporal generative adversarial network described in an embodiment of the present invention.

[0025] Figure 2 Schematic diagram of the spatiotemporal attention mechanism module described in an embodiment of the present invention.

[0026] Figure 3 Schematic diagram of the projection module and the supervision module described in an embodiment of the present invention.

[0027] Figure 4 Schematic diagram of the Transformer encoder network described in an embodiment of the present invention. DETAILED DESCRIPTION

[0028] A method for generating random scenes of renewable energy based on an enhanced temporal generative adversarial network, the method comprising a spatiotemporal attention module, a projection module, a supervision module and a generative adversarial module.

[0029] Generative Adversarial Module: Build a Generative Adversarial Network (GAN) based on the Transformer encoder network.

[0030] Spatiotemporal attention module: In order to fully capture the spatiotemporal correlation of wind and solar power generation data, the present invention adds a spatiotemporal attention module to GAN to dynamically focus on the most important spatiotemporal features in the input data, highlight key information, and improve the expressiveness of the model, thereby generating more realistic and detailed results.

[0031] Projection module: In order to better capture the complex patterns and internal structures of wind and solar power generation data, the present invention introduces a projection module to map the original features into a high-dimensional latent space, thereby obtaining a more meaningful and effective feature representation. GAN is trained based on latent space data, which can improve the efficiency and effectiveness of the adversarial training process.

[0032] Supervision module: Traditional GAN ​​only includes unsupervised adversarial losses on real scenes and synthetic scenes. Based on the Transformer encoder network, this paper introduces a step-by-step supervision loss that uses real scenes as supervision, combining unsupervised learning with supervised learning to ensure that the model effectively captures the temporal correlation of the data.

[0033] In summary, the present invention proposes a renewable energy random scenario generation method based on enhanced time series generative adversarial network, which fully exploits the complex spatiotemporal correlation of renewable energy output and provides a more advanced uncertain variable processing method for power system planning and operation problems.

[0034] A method for generating random scenarios of renewable energy based on enhanced temporal generative adversarial networks, the specific steps are as follows:

[0035] Step 1: First, construct a spatiotemporal attention module and introduce spatial and temporal attention submodules to dynamically improve the input data features, which are expressed as follows:

[0036]

[0037] Where X′ is the real data after the spatiotemporal attention module; X∈R LⅩTⅩNis the power sample matrix of renewable energy power stations; N is the renewable energy power stations in a certain area; T is the total time length of the power samples, and L is the number of samples.

[0038] A S ∈R LⅩ1ⅩN and A T ∈R LⅩTⅩ1 They are the attention maps of the spatial and temporal attention submodules, which are represented as follows:

[0039]

[0040] Where: Sig represents the sigmoid activation function; MLP represents the multi-layer perceptron; Conv represents the convolutional network, AvgPool and MaxPool represent the maximum pooling output and the average pooling output respectively.

[0041] Step 2: Construct a projection module, introduce an embedding network and a recovery network to achieve the mapping between the original feature space and the latent space. The embedding network can extract richer and more representative features from the real data X′. It can better capture the complex patterns and intrinsic structures of the real data X′, enabling the generative adversarial network to learn the potential temporal dynamic features of the data in the latent space, thereby improving the robustness and generalization ability of the model. The recovery network can map the latent space data to the original feature space.

[0042] The embedding network can extract richer and more representative features from the real data X′, which can be expressed as follows:

[0043]

[0044] The restoration network can map the latent space data to the original feature space, which is expressed as follows:

[0045]

[0046] Where: is the real scene in the latent space, is the generated scene after the supervised module in the latent space, They are the real scene and the generated scene restored to the original feature space.

[0047] E and R are the projection function and recovery function respectively, which are composed of multiple Transformer encoder modules, linear layers and sigmoid activation functions, which are expressed as follows:

[0048]

[0049] Where: Line represents the linear layer; TransEn krepresents k Transformer encoder modules, which are expressed as follows

[0050]

[0051] Where: Layernorm normalizes the input hidden layer to a standard normal distribution; SelfAtt is a multi-head attention mechanism; Position and In are position encoding and input embedding modules.

[0052] Step 3: Build a supervision module to learn the real scene based on the latent space through the supervision module The moment-by-moment supervision signal enables the model to capture the step-by-step conditional distribution in the data, allowing the generator to learn the time-dependent features inherent in the time series, thereby generating more reasonable generation scenarios. It is expressed as follows:

[0053]

[0054] Where: is the generated scene after the supervision module; S is the supervision function, which is also composed of multiple Transformer encoder modules, linear layers and sigmoid functions.

[0055] Step 4: Construct a generative adversarial module whose goal is to model the distribution of a given training dataset. The generator will generate z The (usually normally distributed) sampled noise vector z is mapped to the corresponding generated scene Then, the discriminator aims to transform the real scene in the latent space Generate scenes The generator and discriminator can be expressed as:

[0056]

[0057] Where: G and D are the generator and discriminator, respectively, which are also composed of multiple Transformer encoder modules, linear layers and sigmoid functions; the generator does not create data in the original feature space, but first outputs it to the latent space. Represents the classification of real scenes or generated scenes; z is a noise vector, which obeys the probability distribution P z .

[0058] Step 5: Introduce the spatiotemporal attention module, projection module and supervision module to improve the generative adversarial module and form an enhanced temporal generative adversarial network. It is necessary to reconstruct and collaboratively train the traditional loss function. The specific process is as follows:

[0059] 1) First, the supervision module learns the real scene in the previous t-1 time in the latent space (provided by the embedding network) in order to correct the generated scene of the generator at generation time t This helps GAN better realize the real scene of the potential space The probability distribution of The best approximation of This enables the generator to learn the temporal dependencies of the sequence, that is, how to correctly transition from one time step to the next:

[0060]

[0061] In the formula, Represents probability distribution The mathematical expectation under represents the value of the real scene in the latent space at time t, Represents the value of the real scene at time t after the supervision module;

[0062] 2) The loss function constructed by the projection module is reconstructed into the bi-norm of the original feature space and latent space data:

[0063]

[0064] 3) Generate adversarial loss Considering the projection and supervision modules, the reconstruction is as follows:

[0065]

[0066] 4) Finally, the objective function of the enhanced temporal generation adversarial network is reconstructed as:

[0067]

[0068] Where: η is the coefficient of balance loss.

[0069] Step 6: Enhance the temporal generative adversarial network to exploit real scenarios in the latent space And the generated scene after the supervision module After the training, the Wasserstein distance is used to evaluate the training results, and the model hyperparameters are adjusted and retrained until the enhanced temporal generative adversarial network with the best generation effect is obtained.

[0070] Wasserstein distance can effectively measure the distance between two probability distributions and is defined as follows:

[0071]

[0072] In the formula, To satisfy and Joint probability distribution of marginal distributions; and denote the probability distribution of the generated scenes in the power sample matrix and the original feature space, respectively. is the distance measure between scenes.

Claims

1. A method for generating random scenarios of renewable energy based on enhanced temporal generative adversarial networks, characterized by: The specific steps are as follows: Step 1: First, construct a spatiotemporal attention module and introduce spatial and temporal attention submodules to dynamically improve the input data features, which are expressed as follows: Where X′ is the real data after the spatiotemporal attention module; X is the power sample matrix of the renewable energy power station; N is the renewable energy power station in a certain area; T is the total time length of the power sample, L is the number of samples; A S , A T Attention maps of spatial and temporal attention submodules respectively; Step 2: Construct a projection module, introduce an embedding network and a recovery network to achieve the mapping between the original feature space and the latent space; the embedding network can extract richer and more representative features from the real data X′, which is expressed as follows: The restoration network can map the latent space data to the original feature space, which is expressed as follows: Where: is the real scene in the latent space, is the generated scene after the supervised module in the latent space, They are the real scene and the generated scene restored to the original feature space respectively; E and R are the projection function and the recovery function respectively, which are composed of the Transformer encoder module, the linear layer and the sigmoid activation function; Step 3: Construct the supervision module, which is expressed as follows: Where: is the generated scene after the supervision module; S is the supervision function, which consists of the Transformer encoder module, the linear layer and the sigmoid function; Step 4: Construct a generative adversarial module, including a generator and a discriminator. The generator maps the noise vector z to the corresponding generated scene. The discriminator then transforms the real scene in the latent space Generate scenes Separately, the generator and discriminator are represented as: Where: G and D are the generator and discriminator respectively, which are composed of Transformer encoder module, linear layer and sigmoid function; Represents a classification of real or generated scenes; Step 5: Introduce the spatiotemporal attention module, projection module and supervision module to improve the generative adversarial module and form an enhanced temporal generative adversarial network. Step 6: Enhance the temporal generative adversarial network to exploit real scenarios in the latent space And the generated scene after the supervision module The constructed training set is iteratively trained, and the hyperparameters in the model are adjusted during the training process until the enhanced temporal generative adversarial network with the best generation effect is obtained.

2. According to claim 1, a renewable energy random scenario generation method based on enhanced temporal generative adversarial network is characterized by: Improving the generative adversarial module in step 5 requires reconstruction and collaborative training of the loss function. The specific steps are: 1) First, the loss function constructed by the supervised module learning is reconstructed as: In the formula, Represents probability distribution The mathematical expectation under represents the value of the real scene in the latent space at time t, Represents the value of the real scene at time t after the supervision module; 2) The loss function constructed by the projection module is reconstructed into the bi-norm of the original feature space and latent space data: X t represents the value of the power sample matrix at time t, Represents the value of the real scene restored to the original feature space at time t, Represents the value of the generated scene restored to the original feature space at time t; 3) Generate adversarial loss Considering the projection and supervision modules, the reconstruction is as follows: 4) Finally, the target loss function of the enhanced temporal generation adversarial network is reconstructed as: Where: η is the coefficient of balance loss.