Scene generation method and system based on deep learning source load medium and long term prediction
Through the medium- and long-term source load prediction method based on deep learning, combined with WGAN-GP expansion scenery scene and Gaussian hybrid cluster reduction scene, the problem of difficulty in dealing with power system uncertainty is solved in traditional modeling, and the accuracy of accurate depiction of source load scenarios and load prediction is achieved.
Patent Information
- Application Number
- CN202411765841.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-04
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-04
AI Technical Summary
Traditional single source/load scenario modeling is difficult to meet the need to deal with uncertainty in power systems, especially in rural power distribution systems. How to accurately extract the uncertainty of source load, long-term dynamic growth characteristics and short-term power fluctuation characteristics is the core challenge.
The medium- and long-term prediction method of source and load is used based on deep learning, and the load power consumption is predicted through the DenseNet-Autoformer network, and the combined scenery scene samples are expanded in combination with WGAN-GP. Finally, the scene is reduced through Gaussian mixed clustering to generate a typical source and load power scenario.
It realizes accurate and reliable characterization of the source load scenario, improves the accuracy and calculation efficiency of medium and long-term load prediction, and can better capture the nonlinear characteristics of the scenery output.
Smart Images

Figure CN119721455A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of source-load prediction and scene generation, and in particular to a scene generation method and system based on deep learning medium- and long-term source-load prediction. Background Art
[0002] With the access of a large number of distributed power sources to the rural power distribution system and the transformation of the national economy, the rural economic structure has undergone major changes. The traditional single source / load scenario modeling can no longer meet the needs of handling uncertainty in the operation and scheduling, planning and design of the power system. How to accurately extract the uncertainty of the source and load and reflect the long-term dynamic growth characteristics of the source and load and the short-term power fluctuation characteristics is the core challenge of source-load scenario modeling.
[0003] In terms of wind and solar scene modeling, although traditional scene generation methods can better describe the uncertainty of renewable energy output, it is difficult to capture the nonlinear characteristics of its high-dimensional data, and this method usually relies on statistical assumptions and has certain limitations.
[0004] As for load forecasting methods, existing artificial intelligence forecasting models autonomously mine feature correlation information from massive data to establish complex nonlinear models for forecasting. However, traditional recurrent neural networks and their variants have low computational efficiency and difficulty learning information related to long-term dependencies when processing long sequence data. Summary of the invention
[0005] To this end, an object of the present invention is to propose a scene generation method and system based on deep learning source-load medium- and long-term prediction to solve the problems mentioned in the background technology and overcome the shortcomings of the prior art.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, the present invention provides a scenario generation method based on deep learning source-load medium- and long-term prediction, comprising:
[0008] Predict future load power consumption through the load forecasting model based on DenseNet-Autoformer network;
[0009] Expand the wind-solar joint scenario samples, reduce the generated wind-solar joint scenario samples to obtain the typical wind-solar joint power scenario; integrate the predicted future load power consumption and the typical wind-solar joint power scenario to obtain the source-load scenario.
[0010] Preferably, the method of predicting future load power consumption by using a load prediction model based on a DenseNet-Autoformer network comprises: taking historical monthly average meteorological and economic sequences and historical load monthly power consumption sequences as input, predicting future load power consumption by using a load prediction model based on a DenseNet-Autoformer network, and outputting prediction results of load power consumption for each future month;
[0011] The load forecasting model based on the DenseNet-Autoformer network includes N encoder layers and M decoder layers; each encoder layer includes an autocorrelation module, two time series decomposition modules and a deep feature extraction module; each decoder layer includes an autocorrelation module, an encoder-decoder correlation module, three time series decomposition modules and a deep feature extraction module;
[0012] The deep feature extraction module adds a DenseNet layer after the feedforward layer. The DenseNet network structure includes 4 densely connected blocks and 3 transfer layers. The transfer layer is Conv (1×1) + global average pooling (2×2) layer. The size of the feature map transferred between each layer in the densely connected block is consistent. The nonlinear conversion function in the densely connected block adopts the operation structure of BN+ReLU+Conv (3×3). After the convolution operation, each layer in the densely connected block obtains the number of channels of k feature maps, that is, the growth rate of the DenseNet network is k, then the number of input channels of the lth layer is k0+k(l-1), where k0 is the number of channels of the input layer feature map.
[0013] Preferably, the expanding the wind-solar joint scene samples comprises: expanding the wind-solar joint scene samples according to a wind-solar joint scene expansion model based on WGAN-GP.
[0014] Preferably, the time series decomposition module is embedded in the encoder-decoder, and the prediction result optimization and sequence decomposition are performed alternately through the model, and the trend term and the period term are gradually separated from the latent variable to achieve progressive decomposition, and the moving average method is used to smooth the violent fluctuations. For the input sequence X with a length of L, the decomposition process is:
[0015] X t =AvgPool(Padding(X))
[0016] X s =XX t
[0017] Among them, X t , X s They represent the trend component and the periodic component respectively, AvgPool represents the average filter convolution operation, and Padding represents the padding operation.
[0018] Preferably, the autocorrelation module is for the discrete time series {X t}, define the autocorrelation coefficient R xx (τ),
[0019]
[0020] The autocorrelation coefficient R xx (τ) represents the sequence {X t} and its τ delay {X t-τ}Correlation between
[0021] Select the top k time delay sequences with the strongest correlation The time-delay information aggregation method is used to establish the periodic dependence between the time-delay subsequence and the current time series, and the autocorrelation coefficient R is calculated by fast Fourier transform. xx (τ), the calculation process is as follows:
[0022]
[0023]
[0024] Where i represents the imaginary unit, t represents the time in the time domain, f represents the frequency in the frequency domain, τ represents the delay, F and F -1 represent the fast Fourier transform and its inverse transform, respectively. Represents the conjugate part of F in frequency domain calculation.
[0025] Preferably, the generated wind-solar joint scenario samples are reduced to obtain a typical wind-solar joint power scenario, and the predicted future load power consumption and the typical wind-solar joint power scenario are integrated to obtain a source-load scenario, including: based on Gaussian mixture clustering, the generated wind-solar joint scenario samples and load power samples are reduced to obtain a typical source-load power scenario.
[0026] Preferably, the method of expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP includes: taking historical wind power daily power scenarios and historical photovoltaic daily power scenarios as input, expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP, and outputting a monthly wind-solar joint power expansion scenario set.
[0027] Preferably, the wind-solar joint scene sample expansion according to the wind-solar joint scene expansion model based on WGAN-GP further includes: dividing the wind-solar output into subsets by month, and combining the wind power and the photovoltaic power into the wind-solar joint power according to the timestamp for training, using GAN to expand the wind-solar output sample, and generating the objective function of the min-max game of the adversarial network training process as follows:
[0028]
[0029] Where G(·) represents the generator, D(·) represents the discriminator, E represents the expectation, x represents the historical wind and solar power output data, p(x) represents the probability distribution of x, z is random noise, and p(z) represents the probability distribution of z;
[0030] Use Wasserstein distance instead of JS divergence as the optimization target. The definition of Wasserstein distance is:
[0031]
[0032] Among them, P r represents the real data distribution, P g represents the generated data distribution, Π(P r ,P g ) is P r and P g The set of all possible joint distributions of the distribution, γ represents one of the joint distributions, (x, y)~γ represents sampling from the joint distribution γ to obtain a sample x and y, ‖xy‖ is the distance between the two samples, E (x,y)~γ (‖xy‖) represents the expected value of the sample distance;
[0033] The loss function for building the WGAN-GP model is:
[0034]
[0035] in,‖·‖ p represents the p-norm; represents the gradient operator, λ is the penalty term coefficient, ζ is a uniform distribution in the range [0,1], Represents the distribution of real data P r (·) and generate data distribution P g (·) Straight lines between sampling points are uniformly sampled.
[0036] Preferably, the generated wind-solar joint scenario samples and load power samples are subjected to scenario reduction based on Gaussian mixture clustering to obtain typical source-load power scenarios, including: taking the predicted load power consumption in each future month as input, outputting typical load power scenarios and scenario probabilities for the corresponding future months through GMM clustering, and taking the monthly wind-solar joint power expansion scenario set as input, outputting typical wind-solar joint power scenarios and scenario probabilities for the corresponding months through GMM clustering.
[0037] In a second aspect, the present invention also provides a scenario generation system based on deep learning source-load medium- and long-term prediction, comprising: a load prediction module, a scenario expansion module and a hybrid clustering module.
[0038] The load forecasting module is configured to predict future load power consumption through a load forecasting model based on a DenseNet-Autoformer network;
[0039] The scene expansion module is configured to expand the scene samples of the combined scene;
[0040] The hybrid clustering module is configured to reduce the generated wind-solar joint scenario samples according to the predicted future load power consumption to obtain a typical wind-solar joint power scenario, and integrate the predicted future load power consumption and the typical wind-solar joint power scenario to obtain a source-load scenario.
[0041] Preferably, the method of predicting future load power consumption by using a load prediction model based on a DenseNet-Autoformer network comprises: taking historical monthly average meteorological and economic sequences and historical load monthly power consumption sequences as input, predicting future load power consumption by using a load prediction model based on a DenseNet-Autoformer network, and outputting prediction results of load power consumption for each future month;
[0042] The load forecasting model based on the DenseNet-Autoformer network includes N encoder layers and M decoder layers; each encoder layer includes an autocorrelation module, two time series decomposition modules and a deep feature extraction module; each decoder layer includes an autocorrelation module, an encoder-decoder correlation module, three time series decomposition modules and a deep feature extraction module;
[0043] The deep feature extraction module adds a DenseNet layer after the feedforward layer. The DenseNet network structure includes 4 densely connected blocks and 3 transfer layers. The transfer layer is Conv (1×1) + global average pooling (2×2) layer. The size of the feature map transferred between each layer in the densely connected block is consistent. The nonlinear conversion function in the densely connected block adopts the operation structure of BN+ReLU+Conv (3×3). After the convolution operation, each layer in the densely connected block obtains the number of channels of k feature maps, that is, the growth rate of the DenseNet network is k, then the number of input channels of the lth layer is k0+k(l-1), where k0 is the number of channels of the input layer feature map.
[0044] Preferably, the expanding the wind-solar joint scene samples comprises: expanding the wind-solar joint scene samples according to a wind-solar joint scene expansion model based on WGAN-GP.
[0045] Preferably, the time series decomposition module is embedded in the encoder-decoder, and the prediction result optimization and sequence decomposition are performed alternately through the model, and the trend term and the period term are gradually separated from the latent variable to achieve progressive decomposition, and the moving average method is used to smooth the violent fluctuations. For the input sequence X with a length of L, the decomposition process is:
[0046] X t =AvgPool(Padding(X))
[0047] X s =XX t
[0048] Among them, X t , X s They represent the trend component and the periodic component respectively, AvgPool represents the average filter convolution operation, and Padding represents the padding operation.
[0049] Preferably, the autocorrelation module is for the discrete time series {X t}, define the autocorrelation coefficient R xx (τ),
[0050]
[0051] The autocorrelation coefficient R xx (τ) represents the sequence {X t} and its τ delay {X t-τ}Correlation between
[0052] Select the top k time delay sequences with the strongest correlation The time-delay information aggregation method is used to establish the periodic dependence between the time-delay subsequence and the current time series, and the autocorrelation coefficient R is calculated by fast Fourier transform. xx (τ), the calculation process is as follows:
[0053]
[0054] Where i represents the imaginary unit, t represents the time in the time domain, f represents the frequency in the frequency domain, τ represents the delay, F and F -1 represent the fast Fourier transform and its inverse transform, respectively. Represents the conjugate part of F in frequency domain calculation.
[0055] Preferably, the generated wind-solar joint scenario samples are reduced to obtain a typical wind-solar joint power scenario, and the predicted future load power consumption and the typical wind-solar joint power scenario are integrated to obtain a source-load scenario, including: based on Gaussian mixture clustering, the generated wind-solar joint scenario samples and load power samples are reduced to obtain a typical source-load power scenario.
[0056] Preferably, the method of expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP includes: taking historical wind power daily power scenarios and historical photovoltaic daily power scenarios as input, expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP, and outputting a monthly wind-solar joint power expansion scenario set.
[0057] Preferably, the wind-solar joint scene sample expansion according to the wind-solar joint scene expansion model based on WGAN-GP further includes: dividing the wind-solar output into subsets by month, and combining the wind power and the photovoltaic power into the wind-solar joint power according to the timestamp for training, using GAN to expand the wind-solar output sample, and generating the objective function of the min-max game of the adversarial network training process as follows:
[0058]
[0059] Where G(·) represents the generator, D(·) represents the discriminator, E represents the expectation, x represents the historical wind and solar power output data, p(x) represents the probability distribution of x, z is random noise, and p(z) represents the probability distribution of z;
[0060] Use Wasserstein distance instead of JS divergence as the optimization target. The definition of Wasserstein distance is:
[0061]
[0062] Among them, P r represents the real data distribution, P g represents the generated data distribution, Π(P r ,P g ) is P r and P g The set of all possible joint distributions of the distribution, γ represents one of the joint distributions, (x, y)~γ represents sampling from the joint distribution γ to obtain a sample x and y, ‖xy‖ is the distance between the two samples, E (x,y)~γ (‖xy‖) represents the expected value of the sample distance;
[0063] The loss function for building the WGAN-GP model is:
[0064]
[0065] in,‖·‖ p represents the p-norm; represents the gradient operator, λ is the penalty term coefficient, τ is uniformly distributed in the range [0,1], Represents the distribution of real data Pr (·) and generate data distribution P g (·) Straight lines between sampling points are uniformly sampled.
[0066] Preferably, the generated wind-solar joint scenario samples and load power samples are subjected to scenario reduction based on Gaussian mixture clustering to obtain typical source-load power scenarios, including: taking the predicted load power consumption in each future month as input, outputting typical load power scenarios and scenario probabilities for the corresponding future months through GMM clustering, and taking the monthly wind-solar joint power expansion scenario set as input, outputting typical wind-solar joint power scenarios and scenario probabilities for the corresponding months through GMM clustering.
[0067] In a third aspect, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of a scene generation method based on deep learning medium- and long-term source-load prediction as described above are implemented.
[0068] In a fourth aspect, the present invention also provides a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a scene generation method based on deep learning medium- and long-term source-load prediction as described above.
[0069] Therefore, the present invention has the following beneficial effects:
[0070] The present invention deeply decomposes the load time series through a progressive time series decomposition architecture and an embedded time series decomposition module, an autocorrelation module, and a deep feature extraction module, mines the deep periodicity and trend characteristics of the load monthly electricity consumption series and the correlation between external influencing factors and the load monthly electricity consumption, establishes a medium- and long-term load prediction model that comprehensively considers meteorological and economic factors, expands the wind-solar joint scene samples with the wind-solar joint scene expansion model, and reduces the generated wind-solar joint scene samples to obtain a typical wind-solar joint power scene.
[0071] Among them, the progressive time series decomposition architecture predicts future load power consumption through a load forecasting model based on the DenseNet-Autoformer network. The model alternately optimizes the prediction results and decomposes the sequence, and combines the autocorrelation mechanism to achieve sequence-level links of the load time series, reducing the time complexity of the model and improving computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The above and / or additional aspects and advantages of the present invention will become apparent and easily understood from the description of the embodiments in conjunction with the following drawings, in which:
[0073] Figure 1 It is the overall flow chart of the method of the present invention;
[0074] Figure 2 It is a schematic diagram of the framework of the source load medium- and long-term prediction and scenario generation method according to an embodiment of the present invention;
[0075] Figure 3 It is a schematic diagram of a medium- and long-term load forecasting framework based on a DenseNet-Autoformer network of the present invention;
[0076] Figure 4 is a schematic diagram of the autocorrelation mechanism structure of an embodiment of the present invention;
[0077] Figure 5 is a schematic diagram of DenseNet forward propagation according to an embodiment of the present invention;
[0078] Figure 6 is a schematic diagram of a densely connected block structure according to an embodiment of the present invention;
[0079] Figure 7 is a diagram of prediction results of various load prediction models in an embodiment of the present invention;
[0080] Figure 8 is the wind power output probability distribution result of each wind-solar scenario generation model in the embodiment of the present invention;
[0081] Fig. 9 is the photovoltaic output probability distribution result of each wind and solar scene generation model in the embodiment of the present invention;
[0082] Fig.10 is the wind power autocorrelation coefficient result of each wind-solar scene generation model in the embodiment of the present invention;
[0083] Fig.11 is the photovoltaic autocorrelation coefficient result of each wind and solar scene generation model in the embodiment of the present invention;
[0084] Fig.12 It is a schematic diagram of the system structure connection relationship of the present invention;
[0085] Fig.13 It is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0086] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present invention, and should not be construed as limiting the present invention.
[0087] With the low-carbon transformation of the energy structure, a large number of distributed power sources are connected to the rural power distribution system. The uncertainty and volatility of renewable energy output have brought challenges to the safe and reliable operation of the system. At the same time, with the transformation of the national economy, the economic structure of rural areas has undergone major changes. Relying solely on historical power load data to predict load power will cause large errors. Therefore, traditional single source / load scenario modeling can no longer meet the needs of operation scheduling, planning and design in the power system for dealing with uncertainty. Accurate and reliable source-load scenario characterization is of great significance to ensuring the safety and smooth operation of the power grid. How to accurately extract source-load uncertainty and reflect the long-term dynamic growth characteristics and short-term power fluctuation characteristics of source-load is the core challenge of source-load scenario modeling.
[0088] Regarding load forecasting methods, existing forecasting models are mainly divided into parameter models and artificial intelligence models. The parameter model obtains the forecast result by establishing a mathematical parameter model between the load and its related factors, but this type of model lacks adaptability and accuracy in the face of medium- and long-term forecasts affected by complex factors. The artificial intelligence model autonomously mines feature correlation information from massive data to establish a complex nonlinear model for prediction. However, traditional recurrent neural networks and their variants have low computational efficiency and difficulty in learning information related to long-term dependencies when processing long sequence data. In terms of wind and solar scene modeling, although the traditional scene generation method can better describe the uncertainty of new energy output, it is difficult to capture the nonlinear characteristics of its high-dimensional data, and this method usually relies on statistical assumptions and has certain limitations. Based on this, the present invention provides a scene generation method and system based on deep learning source-load medium- and long-term prediction.
[0089] like Figure 1 As shown, a scenario generation method based on deep learning source-load medium- and long-term prediction includes:
[0090] Predict future load power consumption through the load forecasting model based on DenseNet-Autoformer network;
[0091] Expand the scene samples of combined scenery and solar power;
[0092] The generated wind-solar combined scenario samples are reduced to obtain a typical wind-solar combined power scenario, and the predicted future load power consumption and the typical wind-solar combined power scenario are integrated to obtain the source-load scenario.
[0093] More specifically, expanding the wind-solar joint scene samples includes: expanding the wind-solar joint scene samples according to the wind-solar joint scene expansion model based on WGAN-GP; reducing the generated wind-solar joint scene samples to obtain typical wind-solar joint power scenarios includes: reducing the generated wind-solar joint scene samples based on Gaussian mixture clustering to obtain typical wind-solar joint power scenarios.
[0094] The present invention fully extracts the uncertainty characteristics of source and load to achieve accurate and reliable characterization of source and load scenarios. First, a medium- and long-term load prediction model based on the DenseNet-Autoformer network is constructed to extract the periodicity and trend characteristics of the load, and the medium- and long-term load prediction results are obtained by comprehensively considering meteorological and economic factors. On this basis, the load per unit curve of the corresponding historical month is combined to obtain the typical load scenario for the corresponding month in the future. Secondly, the improved adversarial generative network is used to expand the wind and solar scene samples. Finally, the generated wind and solar joint output samples are reduced by Gaussian mixture clustering to obtain a typical wind and solar scene.
[0095] like Figure 2 As shown, the present invention constructs a medium- and long-term source-load prediction and scenario generation method based on deep learning, and its overall architecture is as follows Figure 2 It mainly includes three parts: a medium- and long-term load prediction model based on the DenseNet-Autoformer network, a wind-solar joint scene expansion model based on WGAN-GP (Wasserstein GAN with gradient penalty), and a scene reduction method based on Gaussian Mixture Model (GMM).
[0096] Preferably, future load power consumption is predicted by a load prediction model based on a DenseNet-Autoformer network, including: taking historical monthly average meteorological and economic sequences and historical load monthly power consumption sequences as input, predicting future load power consumption by a load prediction model based on a DenseNet-Autoformer network, and outputting the load power consumption prediction results for each future month.
[0097] More specifically, affected by economic and meteorological factors, the load sequence changes show trend and periodic characteristics. The present invention constructs a load forecasting model based on the DenseNet-Autoformer network, and mines the deep periodicity and trend characteristics of the load monthly power consumption sequence and the correlation between external influencing factors and the load monthly power consumption through the embedded time series decomposition module, autocorrelation module and deep feature extraction module. The input is the historical monthly average meteorological, economic sequence and historical load monthly power consumption sequence, and the output is the prediction of load power consumption in future months.
[0098] The load forecasting model based on the DenseNet-Autoformer network includes N encoder layers and M decoder layers; each encoder layer includes an autocorrelation module, two time series decomposition modules and a deep feature extraction module; each decoder layer includes an autocorrelation module, an encoder-decoder correlation module, three time series decomposition modules and a deep feature extraction module;
[0099] The deep feature extraction module adds a DenseNet layer after the feedforward layer. The DenseNet network structure includes 4 densely connected blocks and 3 transfer layers. The transfer layer is Conv(1×1)+global average pooling (2×2) layer. The size of the feature maps transferred between the layers in the densely connected block is consistent. The nonlinear transformation function in the densely connected block adopts the operation structure of BN+ReLU+Conv(3×3). After the convolution operation, each layer in the densely connected block obtains k channels of feature maps, that is, the growth rate of the DenseNet network is k, then the number of input channels of the lth layer is k0+k(l-1), where k0 is the number of channels of the input layer feature map.
[0100] As a preferred method, the time series decomposition module is embedded in the encoder-decoder. The model is used to alternately optimize the prediction results and decompose the sequence, and the trend term and the period term are gradually separated from the latent variable to achieve progressive decomposition. The moving average method is used to smooth the violent fluctuations. For the input sequence X of length L, the decomposition process is:
[0101] X t =AvgPool(Padding(X))
[0102] X s =XX t
[0103] Among them, X t , X s They represent the trend component and the periodic component respectively, AvgPool represents the average filter convolution operation, and Padding represents the padding operation.
[0104] As an example, the autocorrelation module is used for the discrete time series {X t}, define the autocorrelation coefficient R xx (τ),
[0105]
[0106] The autocorrelation coefficient R xx (τ) represents the sequence {X t} and its τ delay {X t-τ}Correlation between
[0107] Select the top k time delay sequences with the strongest correlation The time-delay information aggregation method is used to establish the periodic dependence between the time-delay subsequence and the current time series, and the autocorrelation coefficient R is calculated by fast Fourier transform. xx (τ), the calculation process is as follows:
[0108]
[0109] Where i represents the imaginary unit, t represents the time in the time domain, f represents the frequency in the frequency domain, τ represents the delay, F and F -1 represent the fast Fourier transform and its inverse transform, respectively. Represents the conjugate part of F in frequency domain calculation.
[0110] Preferably, the wind-solar joint scenario samples are expanded according to the wind-solar joint scenario expansion model based on WGAN-GP, including: taking historical wind power daily power scenarios and historical photovoltaic daily power scenarios as input, expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP, and outputting a monthly wind-solar joint power expansion scenario set.
[0111] As a preferred method, expanding the wind-solar joint scene sample according to the wind-solar joint scene expansion model based on WGAN-GP also includes: dividing the wind-solar output into subsets by month, and combining the wind power and the photovoltaic power into the wind-solar joint power according to the timestamp for training, using GAN to expand the wind-solar output sample, and generating the objective function of the min-max game of the adversarial network training process as follows:
[0112]
[0113] Where G(·) represents the generator, D(·) represents the discriminator, E represents the expectation, x represents the historical wind and solar power output data, p(x) represents the probability distribution of x, z is random noise, and p(z) represents the probability distribution of z;
[0114] Use Wasserstein distance instead of JS divergence as the optimization target. The definition of Wasserstein distance is:
[0115]
[0116] Among them, P r represents the real data distribution, P g represents the generated data distribution, Π(P r ,P g ) is P r and P g The set of all possible joint distributions of the distribution, γ represents one of the joint distributions, (x, y)~γ represents sampling from the joint distribution γ to obtain a sample x and y, ‖xy‖ is the distance between the two samples, E (x,y)~γ (‖xy‖) represents the expected value of the sample distance;
[0117] The loss function for building the WGAN-GP model is:
[0118]
[0119] in,‖·‖ p represents the p-norm; represents the gradient operator, λ is the penalty term coefficient, ζ is a uniform distribution in the range [0,1], Represents the distribution of real data P r (·) and generate data distribution P g (·) Straight lines between sampling points are uniformly sampled.
[0120] Preferably, the generated wind-solar joint scenario samples and load scenario samples are reduced based on Gaussian mixture clustering to obtain typical source-load power scenarios, including: taking the predicted load power consumption in future months as input, outputting typical load power scenarios and scenario probabilities in corresponding months in the future through GMM clustering, and taking the monthly wind-solar joint power expansion scenario set as input, outputting typical wind-solar joint power scenarios and scenario probabilities in corresponding months through GMM clustering.
[0121] The DenseNet-Autoformer network proposed in the present invention deeply decomposes the load time series through the embedded time series decomposition module, the autocorrelation module and the deep feature extraction module, mines the deep periodicity and trend characteristics of the load monthly electricity consumption series and the correlation between the external influencing factors and the load monthly electricity consumption, and establishes a medium- and long-term load prediction model that comprehensively considers meteorological and economic factors.
[0122] The present invention establishes a progressive time series decomposition architecture. In the process of predicting future load power consumption through a load forecasting model based on a DenseNet-Autoformer network, the model alternately optimizes the prediction results and decomposes the sequence. Combined with the autocorrelation mechanism, the sequence-level linking of the load time series is realized, which reduces the time complexity of the model and improves the computational efficiency.
[0123] The present invention adopts a generative adversarial network with Wasserstein distance and gradient penalty term to expand the data of wind-solar joint output, without specifying a model or fitting probability distribution, thereby enhancing the stability of model training and the generation effect.
[0124] The present invention adopts a Gaussian mixture clustering model to perform scene reduction on the generated wind-solar joint output samples, and uses multiple Gaussian distributions to fit the wind-solar data distribution, which can be applicable to various complex data distributions.
[0125] In this embodiment, a scene generation method based on deep learning source-load medium- and long-term prediction of the present invention is described in detail in conjunction with the accompanying drawings.
[0126] The present invention constructs a medium- and long-term source-load prediction and scenario generation method based on deep learning, and its overall architecture is as follows: Figure 2As shown in the figure, it mainly includes three parts, namely, the medium- and long-term load forecasting model based on the DenseNet-Autoformer network, the wind-solar joint scene expansion model based on WGAN-GP (Wasserstein GAN with gradient penalty), and the scene reduction based on Gaussian Mixture Model (GMM).
[0127] Medium- and long-term load forecasting model based on DenseNet-Autoformer network: Affected by economic and meteorological factors, the load sequence changes show trend and periodic characteristics. The present invention constructs a load forecasting model based on the DenseNet-Autoformer network, and mines the deep periodicity and trend characteristics of the load monthly power consumption sequence and the correlation between external influencing factors and the load monthly power consumption through the embedded time series decomposition module, autocorrelation module and deep feature extraction module. The input is the historical monthly average meteorological, economic sequence and historical load monthly power consumption sequence, and the output is the prediction of load power consumption in future months.
[0128] Wind-solar joint scenario expansion model based on WGAN-GP (Wasserstein GAN with gradient penalty): Due to the randomness and uncertainty of wind-solar output, the historical wind power and photovoltaic power scenarios are divided according to monthly labels, and the wind power and photovoltaic historical power scenarios are aligned according to timestamps to form wind-solar joint power scenarios. A wind-solar sample expansion model based on WGAN-GP is constructed. The distribution deviation is quantified by Wasserstein distance and gradient penalty terms are added to improve training efficiency and avoid gradient disappearance. The input is historical wind power daily power scenarios and historical photovoltaic daily power scenarios, and the output is a monthly wind-solar joint power expansion scenario set.
[0129] Scenario reduction method based on Gaussian Mixture Model (GMM): According to the predicted electricity consumption in each future month and the historical load per unit power curve of the corresponding month, GMM clustering is used to obtain the typical load power scenarios and scenario probabilities for the corresponding months in the future; according to the monthly wind-solar combined power expansion scenario set, GMM clustering is used to obtain the typical wind-solar combined power scenarios and scenario probabilities for the corresponding months.
[0130] 1. Medium- and long-term load forecasting model based on DenseNet-Autoformer network:
[0131] The medium- and long-term load forecasting model based on the DenseNet-Autoformer network constructed in the present invention is a model of an encoder-decoder architecture. The time series decomposition module, the autocorrelation mechanism, and the deep feature extraction module are embedded in the encoder and decoder as independent modules. The overall architecture of the model is as follows: Figure 3 shown.
[0132] (1) Embedded timing decomposition module:
[0133] The present invention embeds the time series decomposition unit into the encoder-decoder, and alternately optimizes the prediction results and decomposes the sequence through the model, gradually separating the trend term and the period term from the latent variable to achieve progressive decomposition. Furthermore, the moving average method is used to smooth the violent fluctuations to reduce their impact on the stability of model training. For an input sequence X of length L, the decomposition process can be expressed as:
[0134] X t =AvgPool(Padding(X))
[0135] X s =XX t
[0136] Where, X t , X s Represent the trend component and the period component respectively, AvgPool represents the average filter convolution operation, and Padding represents the padding operation to keep the sequence length unchanged. The entire decomposition process can be expressed as:
[0137] X t ,X s =SeriesDevomp(X).
[0138] (2) Autocorrelation mechanism / module:
[0139] The present invention adopts the autocorrelation mechanism instead of the traditional self-attention mechanism to enhance the feature extraction capability of similar weather processes and adjacent months. The monthly power consumption trend of the load to be predicted is highly correlated with the historical monthly power consumption sequence, and the current time pattern can be frequently observed in the historical subsequence. t}, in order to model the correlation between its time series, the present invention defines the autocorrelation coefficient R xx (τ), can be calculated by the following formula:
[0140]
[0141] In the formula, the autocorrelation coefficient R xx (τ) represents the sequence {X t} and its τ delay {X t-τ} similarities between them.
[0142] Select the top k time delay sequences with the strongest correlation The time-delay information aggregation method is used to establish the periodic dependency between the time-delay subsequence and the current time series. Similar to the self-attention mechanism, the autocorrelation mechanism also adopts a multi-head mechanism. For a head, after the time series of length L is projected in high dimensions, its query vector Q, key vector K, and value vector V are calculated. On this basis, its autocorrelation coefficient R is calculated by Fast Fourier Transforms (FFT). xx (τ), such as Figure 4 As shown, the calculation process is as follows:
[0143]
[0144] Where i represents the imaginary unit, t represents the time in the time domain, f represents the frequency in the frequency domain, τ represents the delay, F and F -1 represent the fast Fourier transform and its inverse transform, respectively. Represents the conjugate part of F in frequency domain calculation.
[0145] (3) Deep feature extraction module:
[0146] The present invention adds a DenseNet layer after the feedforward layer to deeply extract the hidden periodicity and trend information of the long-term monthly electricity consumption series, such as Figure 3 As shown in the dashed box in the middle. DenseNet uses a dense connection mechanism, each layer is connected to the channel dimensions of all previous layers and serves as the input of the next layer, that is,
[0147] x l =H i ([x0,x1,...,x l-1 ])
[0148] In the formula, x l is the output of the lth layer; [x0,x1,...,x l-1 ] is the feature map connection of 0, 1, ..., l-1 layers; is a nonlinear transformation function, which includes batch normalization (BN), rectified linear unit (ReLU), pooling layer and convolution layer operations.
[0149] The forward propagation process of the DenseNet network is as follows Figure 5As shown in the figure, the input of h3 is the connection of x2 of h2 and x1 and x0 of the first two layers in the channel dimension, that is, each layer can receive feature information from all previous layers.
[0150] The main part of the DenseNet network structure consists of 4 dense blocks (DB) and 3 transition layers (TL). TL is a Conv (1×1) + global average pooling (GAP) (2×2) layer. The feature maps transmitted between the layers in DB are of the same size, which can realize the connection in the channel dimension; the nonlinear transformation function H in DB i () uses the operation structure of BN+ReLU+Conv(3×3), such as Figure 6 In addition, after the convolution operation, each layer in DB obtains k channels of feature maps, that is, the growth rate of the Dense Net network is k, then the number of input channels of the lth layer is k0+k(l-1), where k0 is the number of channels of the input layer feature map.
[0151] (4) Encoder:
[0152] like Figure 3 As shown in Figure 1, the DenseNet-Autoformer network has N encoder layers, each of which contains an autocorrelation module, two time series decomposition modules, and a deep feature extraction module. The encoder is mainly used for periodic component modeling, and its input is the load monthly power consumption sequence X with a length of Lseq. en , output It contains the historical cycle information of the load monthly power consumption sequence and will be used as interactive information to help the decoder refine the prediction results. The overall process of the l-th layer encoder can be expressed as Details are as follows:
[0153]
[0154] In the formula, “_” represents the trend component that is eliminated. l∈{1,2,...,N} represents the output of the encoder at the lth layer and X en Encoded as They respectively represent the periodic components output by the i-th timing decomposition unit in the l-th layer.
[0155] (5) Decoder:
[0156] like Figure 3As shown in Figure 1, DenseNet-Autoformer has M decoder layers, each of which contains an autocorrelation module, an encoder-decoder correlation module that can use historical period information to refine the prediction, three time series decomposition modules, and a deep feature extraction module. The structure of the decoder layer can be divided into two parts, namely, an accumulation mechanism structure for accumulating trend components and a multi-layer autocorrelation mechanism block for period components. The input of the decoder is a length The periodic component X des With the trend component X det :
[0157]
[0158] X des =Concat(X ens , X0)
[0159] X det =Concat(X ent , X mean )
[0160] Where, X ens , X ent Represents the monthly load power consumption sequence X en The second half is the cycle and trend items obtained after time series decomposition. mean They represent placeholders of length L0 filled with 0 and mean, respectively. The overall output of the encoder is Using it as mutual information, the overall process of the l-th layer decoder can be expressed as Details are as follows:
[0161]
[0162] In the formula, l∈{1,2,...,M} represents the output of the l-th layer decoder; X des Encoded as And X det Encoded as i∈{1,2,3} respectively represent the periodic component and trend component obtained after the i-th time series decomposition block processing in the l-th layer decoder. l,i , i∈{1,2,3} means extracting deep trend information in the i-th time series decomposition block Finally, the encoder outputs the periodic features and trend features extracted by the two refined structures respectively.
[0163] 2. Expanded model of wind-solar combined power scenario based on WGAN-GP:
[0164] Since wind and solar power output has obvious seasonal characteristics and correlation, the present invention divides wind and solar power output into subsets by month in wind and solar power scene generation, and combines wind power and photovoltaic power into wind and solar power combined power according to timestamps for training.
[0165] GAN is used to expand the wind and solar power output samples, and the objective function of the min-max game in the training process of the generative adversarial network is:
[0166]
[0167] Among them, G(·) represents the generator, D(·) represents the discriminator, E represents the expectation, x represents the historical wind and solar power output data, p(x) represents the probability distribution of x, z is random noise, and p(z) represents the probability distribution of z.
[0168] However, traditional GAN is prone to problems such as unstable training, gradient disappearance, and mode collapse. To address the problems in GAN model training, this paper uses Wasserstein distance instead of JS divergence as the optimization target. The definition of Wasserstein distance is:
[0169]
[0170] Among them, P r represents the real data distribution, P g represents the generated data distribution, Π(P r ,P g ) is P r and P g The set of all possible joint distributions of the distribution, γ represents one of the joint distributions, (x, y)~γ represents sampling from the joint distribution γ to obtain a sample x and y, ‖xy‖ is the distance between the two samples, E (x,y)~γ (‖xy‖) represents the expected value of the sample distance.
[0171] The above formula indicates that the lower bound that can be obtained for this expected value in all possible joint distributions is the Wasserstein distance.
[0172] WGAN uses weight clipping to meet the Lipschitz continuity condition, which causes the weights and bias coefficients of WGAN to tend to be extreme, limiting the fitting ability of the neural network. To this end, a gradient penalty term is added to the original network loss function, and the loss function of the established WGAN-GP model is:
[0173]
[0174] in,‖·‖ p represents the p-norm; represents the gradient operator, λ is the penalty term coefficient, ζ is a uniform distribution in the range [0,1], Represents the distribution of real data P r (·) and generate data distribution P g (·) Straight lines between sampling points are uniformly sampled.
[0175] 3. Scene reduction method based on GMM clustering:
[0176] The present invention obtains the typical load power scenario for the corresponding month in the future through GMM clustering based on the load per unit curve of the corresponding month in history and the predicted monthly power consumption, and obtains the typical wind-solar power scenario for the corresponding month through GMM clustering based on the monthly wind-solar joint power expansion scenario set. The clustering process is described as follows:
[0177] (1) Initialize k parameters μ of multivariate Gaussian distributions j and ε j , assuming that each mixing element has its own diagonal matrix.
[0178] (2) Traverse all sample points and calculate the sample point x i The probability γ that (i=1,2,…,m) belongs to the jth Gaussian distribution i,j .
[0179]
[0180] (3) The Gaussian distribution parameters μ are calculated by the following formula: j and ε j The updated value μ′ j and ε′ j .
[0181]
[0182] (4) Repeat (2) and (3) until all Gaussian parameters converge.
[0183] (5) Using the calculated Gaussian parameters, traverse all samples and assign the samples to probability γ i,j The largest category.
[0184] In this embodiment, the source-load data, regional economic development and meteorological data of a rural area in northern China from January 1, 2012 to December 31, 2022 are used for research. The meteorological data include temperature and humidity, and the economic development data include GDP, GDP per capita, regional population size and added value of various industries. The time resolution of wind, light and load power is 1 hour. The above data are divided into training set and test set in a ratio of 4:1. The parameter settings are shown in Table 1.
[0185] Table 1 Parameter settings
[0186] parameter Parameter Value Number of encoder layers 2 Decoder Layers 1 Batch size 16 Iterations 2 Epoch 10 Learning rate 0.01 Number of samples per month 1000 Number of typical scenes in the scenery month 5
[0187] (1) Comparison model settings:
[0188] In order to verify the superiority of the medium- and long-term load forecasting method based on the DenseNet-Autoformer model proposed in this invention, three forecasting models are set for comparative analysis. Model 1: DenseNet-Autoformer model considering meteorological and economic factors, Model 2: DenseNet-Autoformer model without considering meteorological and economic factors, Model 3: LSTM model considering meteorological and economic factors, and the load in rural areas is predicted. The test set is the monthly electricity consumption from January 2021 to December 2022.
[0189] In order to verify the effectiveness of the wind-solar joint scene generation method based on WGAN-GP proposed in this invention, two wind-solar sample generation models are set for comparative analysis: Model 1: wind-solar joint scene generation model based on WGAN-GP, Model 2: wind-solar joint scene generation model based on Frank-copula.
[0190] (2) Model evaluation:
[0191] For the deterministic load forecasting results, the root mean square error (RMSE) and mean absolute percentage error (MAPE) are used as the accuracy evaluation indicators of the load forecasting model:
[0192]
[0193] (3) Comparative experimental results:
[0194] Figure 7 The load forecasting results of three models are shown. Figure 7 It can be seen that the prediction trends of the medium- and long-term load forecasting models 1, 2, and 3 are consistent with the measured value trends, which proves the sensitivity and effectiveness of the models. However, the prediction curve of model 1 has the highest degree of fit with the measured curve and has higher prediction accuracy.
[0195] Table 2 gives a comparison of the evaluation indicators of the root mean square error and mean absolute error of the model proposed in the present invention and the two comparative models. It can be seen from Table 2 that the load forecasting model proposed in the present invention is superior to the comparative forecasting model in both evaluation indicators. From the perspective of the root mean square error, the load forecasting model proposed in the present invention is improved by 5.31% and 5.62% compared with Model 1 and Model 2 respectively; from the perspective of the mean absolute error, the load forecasting model proposed in the present invention is improved by 5.1% and 5.77% compared with Model 1 and Model 2 respectively, which effectively proves the advantage of the load forecasting method proposed in the present invention in terms of prediction accuracy.
[0196] Table 2 Evaluation indicators
[0197] Evaluation indicators Model 1 Model 2 Model 3 RMSE 5.15% 10.46% 10.77% MAPE 3.91% 9.01% 9.68%
[0198] Depend on Figure 8 and Fig. 9 It can be seen that the probability density function curve of the samples generated by the model proposed in the present invention is closer to the probability density function curve of the real samples, which shows that the WGAN-GP model proposed in the present invention can effectively fit the wind and solar output characteristics. Furthermore, the generated data is subjected to autocorrelation analysis, and the autocorrelation coefficients with a time interval of 1-6h are calculated. The results are as follows: Fig.10 and Fig.11 The generated data of the model proposed in the present invention and the comparison model have a certain autocorrelation in the time interval of 1-6h. As the time interval increases, the autocorrelation coefficient gradually decreases, but the autocorrelation coefficient of the generated data of the model proposed in the present invention is closer to the autocorrelation coefficient of the real data, which shows that the model proposed in the present invention has the ability to simulate the timing of wind and solar power output.
[0199] (4) Conclusion:
[0200] The results of this embodiment show that:
[0201] The medium- and long-term load forecasting method based on the DenseNet-Autoformer model proposed in the present invention is superior to the comparison model in terms of both root mean square error and mean absolute error. Compared with model 1, which performs better in the comparison model, the root mean square error and mean absolute error are increased by 5.31% and 5.1% respectively.
[0202] Compared with the traditional Frank-copula wind-solar joint scene generation method, the probability density curve and autocorrelation coefficient curve of wind-solar output obtained by the wind-solar joint scene generation method based on WGAN-GP proposed in the present invention are closer to the real sample, which effectively verifies that the wind-solar joint scene generation method proposed in the present invention can effectively fit the wind-solar output characteristics.
[0203] The method proposed in the present invention can be used to generate typical source-load scenarios.
[0204] like Fig.12 As shown, the present invention also provides a scenario generation system based on deep learning source-load medium- and long-term prediction, including: a load prediction module, a scenario expansion module and a hybrid clustering module;
[0205] The load forecasting module is configured to predict future load power consumption through a load forecasting model based on a DenseNet-Autoformer network;
[0206] The scene expansion module is configured to expand the scene samples of the combined scene of scenery and solar energy;
[0207] The hybrid clustering module is configured to reduce the generated wind-solar joint scenario samples according to the predicted future load power consumption to obtain a typical wind-solar joint power scenario, and integrate the predicted future load power consumption and the typical wind-solar joint power scenario to obtain a source-load scenario.
[0208] Specifically, the load forecasting module includes a load forecasting model based on the DenseNet-Autoformer network, which is used to take the historical monthly average meteorological, economic series and historical load monthly electricity consumption series collected by the data acquisition module as input, predict future load electricity consumption through the load forecasting model based on the DenseNet-Autoformer network, and output the load electricity consumption forecast results for each future month.
[0209] Specifically, the scenario expansion module includes a wind-solar joint scenario expansion model based on WGAN-GP, which is used to take the historical wind power daily power scenarios and historical photovoltaic daily power scenarios collected by the data acquisition module as input, expand the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP, and output a monthly wind-solar joint power expansion scenario set.
[0210] Specifically, the hybrid clustering module is used to take the predicted load power consumption in future months as input, and output the typical load power scenarios and scenario probabilities in the corresponding months in the future through GMM clustering. It also takes the monthly wind-solar combined power expansion scenario set as input, and outputs the typical wind-solar combined power scenarios and scenario probabilities in the corresponding months through GMM clustering.
[0211] The scene generation system based on deep learning source-load medium- and long-term prediction of the present invention is applicable to the above-mentioned scene generation method based on deep learning source-load medium- and long-term prediction.
[0212] As an implementation method, the system also includes a data acquisition module. Specifically, the data acquisition module is configured to collect data required by the load forecasting module, the scenario expansion module and the hybrid clustering module, including historical monthly average meteorological and economic series data, historical load monthly electricity consumption series data, historical wind power daily power scenarios, and historical photovoltaic daily power scenarios.
[0213] Specifically, the medium- and long-term load forecasting model based on the DenseNet-Autoformer network constructed by the present invention is a model of an encoder-decoder architecture. The time series decomposition module, the autocorrelation mechanism, and the deep feature extraction module are embedded in the encoder and decoder as independent modules. The overall architecture of the model is as follows: Figure 3 shown.
[0214] The present invention embeds the time series decomposition unit into the encoder-decoder, and alternately optimizes the prediction results and decomposes the sequence through the model, gradually separating the trend term and the period term from the latent variable to achieve progressive decomposition. Furthermore, the moving average method is used to smooth the violent fluctuations to reduce their impact on the stability of model training. For an input sequence X of length L, the decomposition process can be expressed as:
[0215] X t =AvgPool(Padding(X))
[0216] X s =XX t
[0217] Where, X t , X s Represent the trend component and the period component respectively, AvgPool represents the average filter convolution operation, and Padding represents the padding operation to keep the sequence length unchanged. The entire decomposition process can be expressed as:
[0218] X t ,X s =SeriesDevomp(X).
[0219] The present invention adopts the autocorrelation mechanism instead of the traditional self-attention mechanism to enhance the feature extraction capability of similar weather processes and adjacent months. The monthly power consumption trend of the load to be predicted is highly correlated with the historical monthly power consumption sequence, and the current time pattern can be frequently observed in the historical subsequence. t}, in order to model the correlation between its time series, the present invention defines the autocorrelation coefficient R xx (τ), can be calculated by the following formula:
[0220]
[0221] In the formula, the autocorrelation coefficient R xx (τ) represents the sequence {X t} and its τ delay {X t-τ} similarities between them.
[0222] Select the top k time delay sequences with the strongest correlation The time-delay information aggregation method is used to establish the periodic dependency between the time-delay subsequence and the current time series. Similar to the self-attention mechanism, the autocorrelation mechanism also adopts a multi-head mechanism. For a head, after the time series of length L is projected in high dimensions, its query vector Q, key vector K, and value vector V are calculated. On this basis, its autocorrelation coefficient R is calculated by Fast Fourier Transforms (FFT). xx (τ), such as Figure 4 As shown, the calculation process is as follows:
[0223]
[0224] Where i represents the imaginary unit, t represents the time in the time domain, f represents the frequency in the frequency domain, τ represents the delay, F and F -1 represent the fast Fourier transform and its inverse transform, respectively. Represents the conjugate part of F in frequency domain calculation.
[0225] The present invention adds a DenseNet layer after the feedforward layer to deeply extract the hidden periodicity and trend information of the long-term monthly electricity consumption series, such as Figure 3 As shown in the dashed box in the middle. DenseNet uses a dense connection mechanism, each layer is connected to the channel dimensions of all previous layers and serves as the input of the next layer, that is,
[0226] x l =H i ([x0,x1,...,x l-1 ])
[0227] In the formula, x l is the output of the lth layer; [x0,x1,...,x k-1 ] is the feature map connection of 0, 1, ..., l-1 layers; is a nonlinear transformation function, which includes batch normalization (BN), rectified linear unit (ReLU), pooling layer and convolution layer operations.
[0228] The forward propagation process of the DenseNet network is as follows Figure 5 As shown in the figure, the input of h3 is the connection of x2 of h2 and x1 and x0 of the first two layers in the channel dimension, that is, each layer can receive feature information from all previous layers.
[0229] The main part of the DenseNet network structure consists of 4 dense blocks (DB) and 3 transition layers (TL). TL is a Conv (1×1) + global average pooling (GAP) (2×2) layer. The feature maps transmitted between the layers in DB are of the same size, which can realize the connection in the channel dimension; the nonlinear transformation function H in DB i () uses the operation structure of BN+ReLU+Conv(3×3), such as Figure 6 In addition, after the convolution operation, each layer in DB obtains k channels of feature maps, that is, the growth rate of the Dense Net network is k, then the number of input channels of the lth layer is k0+k(l-1), where k0 is the number of channels of the input layer feature map.
[0230] like Figure 3 As shown in Figure 1, the DenseNet-Autoformer network has N encoder layers, each of which contains an autocorrelation module, two time series decomposition modules, and a deep feature extraction module. The encoder is mainly used for periodic component modeling, and its input is the load monthly power consumption sequence X with a length of Lseq. en , output It contains the historical cycle information of the load monthly power consumption sequence and will be used as interactive information to help the decoder refine the prediction results. The overall process of the l-th layer encoder can be expressed as Details are as follows:
[0231]
[0232] In the formula, “_” represents the trend component that is eliminated. l∈{1,2,...,N} represents the output of the encoder at the lth layer and X en Encoded as i∈{1,2} represents the periodic component output by the i-th timing decomposition unit in the l-th layer.
[0233] like Figure 3 As shown in Figure 1, DenseNet-Autoformer has M decoder layers, each of which contains an autocorrelation module, an encoder-decoder correlation module that can use historical period information to refine the prediction, three time series decomposition modules, and a deep feature extraction module. The structure of the decoder layer can be divided into two parts, namely, an accumulation mechanism structure for accumulating trend components and a multi-layer autocorrelation mechanism block for period components. The input of the decoder is a length The periodic component X des With the trend component X det:
[0234]
[0235] X des =Concat(X ens , X0)
[0236] X det =Concat(X ent , X mean )
[0237] Where, X ens , X ent Represents the monthly load power consumption sequence X en The second half is the cycle and trend items obtained after time series decomposition. mean They represent placeholders of length L0 filled with 0 and mean, respectively. The overall output of the encoder is Using it as mutual information, the overall process of the l-th layer decoder can be expressed as Details are as follows:
[0238]
[0239] In the formula, l∈{1,2,...,M} represents the output of the l-th layer decoder; X des Encoded as And X det Encoded as i∈{1,2,3} respectively represent the periodic component and trend component obtained after the i-th time series decomposition block processing in the l-th layer decoder. l,i , i∈{1,2,3} means extracting deep trend information in the i-th time series decomposition block Finally, the encoder outputs the periodic features and trend features extracted by the two refined structures respectively.
[0240] Since wind and solar power output has obvious seasonal characteristics and correlation, the present invention divides wind and solar power output into subsets by month in wind and solar power scene generation, and combines wind power and photovoltaic power into wind and solar power combined power according to timestamps for training.
[0241] GAN is used to expand the wind and solar power output samples, and the objective function of the min-max game in the training process of the generative adversarial network is:
[0242]
[0243] Among them, G(·) represents the generator, D(·) represents the discriminator, E represents the expectation, x represents the historical wind and solar power output data, p(x) represents the probability distribution of x, z is random noise, and p(z) represents the probability distribution of z.
[0244] However, traditional GAN is prone to problems such as unstable training, gradient disappearance, and mode collapse. To address the problems in GAN model training, this paper uses Wasserstein distance instead of JS divergence as the optimization target. The definition of Wasserstein distance is:
[0245]
[0246] Among them, P r represents the real data distribution, P g represents the generated data distribution, Π(P r ,P g ) is P r and P g The set of all possible joint distributions of the distribution, γ represents one of the joint distributions, (x, y)~γ represents sampling from the joint distribution γ to obtain a sample x and y, ‖xy‖ is the distance between the two samples, E (x,y)~γ (‖xy‖) represents the expected value of the sample distance.
[0247] The above formula indicates that the lower bound that can be obtained for this expected value in all possible joint distributions is the Wasserstein distance.
[0248] WGAN uses weight clipping to meet the Lipschitz continuity condition, which causes the weights and bias coefficients of WGAN to tend to be extreme, limiting the fitting ability of the neural network. To this end, a gradient penalty term is added to the original network loss function, and the loss function of the established WGAN-GP model is:
[0249]
[0250] in,‖·‖ p represents the p-norm; represents the gradient operator, λ is the penalty term coefficient, ζ is a uniform distribution in the range [0,1], Represents the distribution of real data P r (·) and generate data distribution P g (·) Straight lines between sampling points are uniformly sampled.
[0251] The present invention obtains the typical load power scenario for the corresponding month in the future through GMM clustering based on the load per unit curve of the corresponding month in history and the predicted monthly power consumption, and obtains the typical wind-solar power scenario for the corresponding month through GMM clustering based on the monthly wind-solar joint power expansion scenario set. The clustering process is described as follows:
[0252] Step 1: Initialize the parameters μ of k multivariate Gaussian distributions j and ε j , assuming that each mixing element has its own diagonal matrix.
[0253] Step 2: Traverse all sample points and calculate the sample point x i The probability γ that (i=1,2,…,m) belongs to the jth Gaussian distribution i,j .
[0254]
[0255] Step 3: Calculate the Gaussian distribution parameters μ by the following formula: j and ε j The updated value μ′ j and ε′ j .
[0256]
[0257] Step 4: Repeat steps 2 and 3 until the Gaussian parameters converge.
[0258] Step 5: Use the calculated Gaussian parameters to traverse all samples and assign the samples to probability γ i,j The largest category.
[0259] In order to solve the above technical problems, an embodiment of the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of a scene generation method based on deep learning source-load medium- and long-term prediction are implemented as described above.
[0260] like Fig.13As shown, the computer device includes a memory, a processor, and a network interface that are interconnected through a system bus. It should be noted that the figure only shows a computer device with component memory, a processor, a network interface, and an operating system, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application specific integrated circuits (Application Specific Integrated Circuit, ASIC), programmable gate arrays (Field-Programmable Gate Array, FPGA), digital processors (Digital Signal Processor, DSP), embedded devices, etc.
[0261] Computer devices can be computing devices such as desktop computers, notebooks, PDAs, and cloud servers. Computer devices can interact with users through keyboards, mice, remote controls, touch pads, or voice control devices.
[0262] The memory may be one or more, and may include at least one type of readable storage medium, the readable storage medium including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory may be an internal storage unit of a computer device, such as a hard disk or memory of the computer device. In other embodiments, the memory may also be an external storage device of a computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device. Of course, the memory may also include both the internal storage unit of the computer device and its external storage device. In this embodiment, the memory is generally used to store an operating system and various application software installed on the computer device, such as a program code of a scene generation method based on a medium- and long-term prediction of a source load based on deep learning, etc. In addition, the memory may also be used to temporarily store various types of data that have been output or are to be output.
[0263] The processor may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor is generally used to control the overall operation of a computer device. In this embodiment, the processor is used to run program codes stored in a memory or process data, such as running program codes of a scenario generation method based on deep learning source-load medium- and long-term prediction.
[0264] The network interface may include a wireless network interface and / or a wired network interface, which is generally used to establish a communication connection between a computer device and other electronic devices.
[0265] The present invention also provides another embodiment, namely, providing a readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of a scene generation method based on deep learning medium- and long-term source-load prediction as described above.
[0266] The purpose of the present invention is to fully extract the uncertainty characteristics of source and load, and realize accurate and reliable characterization of source and load scenarios. First, a medium- and long-term load prediction model based on the DenseNet-Autoformer network is constructed to extract the periodicity and trend characteristics of the load, and the medium- and long-term load prediction results are obtained by comprehensively considering meteorological and economic factors. On this basis, the load per unit curve of the corresponding historical month is combined to obtain the typical load scenario for the corresponding month in the future. Secondly, the improved adversarial generative network is used to expand the wind and solar scene samples. Finally, the generated wind and solar joint output samples are reduced to obtain the typical wind and solar scene through Gaussian mixture clustering.
[0267] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "examples", "specific examples", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0268] It is not difficult for those skilled in the art to understand that the present invention includes any combination of the invention content and specific implementation methods of the above specification and the various parts shown in the drawings. Due to the limited space and to make the specification concise, the various schemes composed of these combinations are not described one by one. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
[0269] Although the embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. Those skilled in the art may change, modify, replace and modify the above embodiments within the scope of the present invention without departing from the principles and purpose of the present invention. The scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A scenario generation method based on deep learning source-load medium- and long-term prediction, characterized in that: include: Predict future load power consumption through the load forecasting model based on DenseNet-Autoformer network; Expand the wind-solar joint scenario samples, reduce the generated wind-solar joint scenario samples to obtain the typical wind-solar joint power scenario; integrate the predicted future load power consumption and the typical wind-solar joint power scenario to obtain the source-load scenario.
2. The scenario generation method based on deep learning source-load medium- and long-term prediction according to claim 1 is characterized in that: The method of predicting future load power consumption by using a load prediction model based on a DenseNet-Autoformer network includes: taking historical monthly average meteorological and economic sequences and historical load monthly power consumption sequences as input, predicting future load power consumption by using a load prediction model based on a DenseNet-Autoformer network, and outputting prediction results of load power consumption in each future month; The load forecasting model based on the DenseNet-Autoformer network includes N encoder layers and M decoder layers; each encoder layer includes an autocorrelation module, two time series decomposition modules and a deep feature extraction module; each decoder layer includes an autocorrelation module, an encoder-decoder correlation module, three time series decomposition modules and a deep feature extraction module; The deep feature extraction module adds a DenseNet layer after the feedforward layer. The DenseNet network structure includes 4 densely connected blocks and 3 transfer layers. The transfer layer is Conv (1×1) + global average pooling (2×2) layer. The size of the feature map transferred between each layer in the densely connected block is consistent. The nonlinear conversion function in the densely connected block adopts the operation structure of BN+ReLU+Conv (3×3). After the convolution operation, each layer in the densely connected block obtains the number of channels of k feature maps, that is, the growth rate of the DenseNet network is k, then the number of input channels of the lth layer is k0+k(l-1), where k0 is the number of channels of the input layer feature map.
3. A scenario generation method based on deep learning source-load medium- and long-term prediction according to claim 1 or 2, characterized in that: The expanding the wind-solar joint scene samples includes: expanding the wind-solar joint scene samples according to a wind-solar joint scene expansion model based on WGAN-GP.
4. The scenario generation method based on deep learning source-load medium- and long-term prediction according to claim 1 is characterized in that: The time series decomposition module is embedded in the encoder-decoder. The model alternately optimizes the prediction results and decomposes the sequence, gradually separates the trend term and the period term from the latent variable, and realizes progressive decomposition. The moving average method is used to smooth the violent fluctuations. For the input sequence X of length L, the decomposition process is: X t =AvgPool(Padding(X)) X s =X-X t Among them, X t , X s They represent the trend component and the periodic component respectively, AvgPool represents the average filter convolution operation, and Padding represents the padding operation.
5. The scenario generation method based on deep learning source-load medium- and long-term prediction according to claim 1 is characterized in that: The autocorrelation module is used for the discrete time series {X t }, define the autocorrelation coefficient R xx (τ), The autocorrelation coefficient R xx (τ) represents the sequence {X t } and its τ delay {X t-τ }Correlation between Select the top k time delay sequences with the strongest correlation The time-delay information aggregation method is used to establish the periodic dependence between the time-delay subsequence and the current time series, and the autocorrelation coefficient R is calculated by fast Fourier transform. xx (τ), the calculation process is as follows: Where i represents the imaginary unit, t represents the time in the time domain, f represents the frequency in the frequency domain, τ represents the delay, F and F -1 represent the fast Fourier transform and its inverse transform, respectively. Represents the conjugate part of F in frequency domain calculation.
6. The scenario generation method based on deep learning source-load medium- and long-term prediction according to claim 1 is characterized in that: The generated wind-solar joint scenario samples are reduced to obtain a typical wind-solar joint power scenario, and the predicted future load power consumption and the typical wind-solar joint power scenario are integrated to obtain a source-load scenario, including: based on Gaussian mixture clustering, the generated wind-solar joint scenario samples and load power samples are reduced to obtain a typical source-load power scenario.
7. The method for generating scenarios based on deep learning source-load medium- and long-term prediction according to claim 3, characterized in that: The method of expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP includes: taking historical wind power daily power scenarios and historical photovoltaic daily power scenarios as input, expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP, and outputting a monthly wind-solar joint power expansion scenario set.
8. The method for generating scenarios based on deep learning source-load medium- and long-term prediction according to claim 7, characterized in that: The method of expanding the wind-solar joint scenario samples according to the wind-solar joint scenario expansion model based on WGAN-GP further includes: dividing the wind-solar output into subsets by month, and combining the wind power and the photovoltaic power into the wind-solar joint power according to the timestamp for training, using GAN to expand the wind-solar output samples, and generating the objective function of the min-max game of the adversarial network training process as follows: Where G(·) represents the generator, D(·) represents the discriminator, E represents the expectation, x represents the historical wind and solar power output data, p(x) represents the probability distribution of x, z is random noise, and p(z) represents the probability distribution of z; Use Wasserstein distance instead of JS divergence as the optimization target. The definition of Wasserstein distance is: Among them, P r represents the real data distribution, P g represents the generated data distribution, Π(P r ,P g ) is P r and P g The set of all possible joint distributions of the distribution, γ represents one of the joint distributions, (x, y)~γ represents sampling from the joint distribution γ to obtain a sample x and y, ‖xy‖ is the distance between the two samples, E (x,y)~γ (‖xy‖) represents the expected value of the sample distance; The loss function for building the WGAN-GP model is: in,‖·‖ p represents the p-norm; represents the gradient operator, λ is the penalty term coefficient, To obey the uniform distribution in the range [0,1], Represents the distribution of real data P r (·) and generate data distribution P g (·) Straight lines between sampling points are uniformly sampled.
9. The scenario generation method based on deep learning source-load medium- and long-term prediction according to claim 6, characterized in that: The Gaussian mixture clustering-based method performs scenario reduction on the generated wind-solar joint scenario samples and load power samples to obtain a typical source-load power scenario, including: taking the predicted load power consumption in each future month as input, outputting the typical load power scenario and scenario probability in the corresponding future month through GMM clustering, and taking the monthly wind-solar joint power expansion scenario set as input, outputting the typical wind-solar joint power scenario and scenario probability in the corresponding month through GMM clustering.
10. A scenario generation system based on deep learning source-load medium- and long-term prediction, characterized in that: include: Load forecasting module, scenario expansion module and hybrid clustering module, The load forecasting module is configured to predict future load power consumption through a load forecasting model based on a DenseNet-Autoformer network; The scene expansion module is configured to expand the scene samples of the combined scene of scenery and solar energy; The hybrid clustering module is configured to perform scenario classification on the generated wind-solar joint scenario samples according to the predicted future load power consumption. The typical wind-solar combined power scenario is obtained by reducing the predicted future load power consumption and the typical wind-solar combined power scenario. Get the source load scene.
Citation Information
Patent Citations
New energy power generation scene generation method and system, electronic equipment and medium
CN115859809A
Power distribution network distribution robust optimization scheduling method based on conditional generative adversarial network
CN117291292A
Monthly source load random scene generation method and system
CN118607365A
Tidal reach layered flow velocity forecasting method and device, terminal and storage medium
CN118917218A
Photovoltaic power short-term probability prediction system and method
CN119005750A
Cited By
Medium and long term provincial domain load time sequence scene generation method and system considering accumulated temperature effect under drive of meteorological data
CN120317761A