CN115841280A - Photovoltaic monthly scene generation method and system - Google Patents

Photovoltaic monthly scene generation method and system Download PDF

Info

Publication number
CN115841280A
CN115841280A CN202211589959.4A CN202211589959A CN115841280A CN 115841280 A CN115841280 A CN 115841280A CN 202211589959 A CN202211589959 A CN 202211589959A CN 115841280 A CN115841280 A CN 115841280A
Authority
CN
China
Prior art keywords
photovoltaic
monthly
scene
output
network
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211589959.4A
Other languages
Chinese (zh)
Inventor
孙志媛
彭博雅
刘默斯
蒙宣任
宋益
郑琨
李秋文
胡弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Electric Power Research Institute of Guangxi Power Grid Co Ltd
Original Assignee
Electric Power Research Institute of Guangxi Power Grid Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Electric Power Research Institute of Guangxi Power Grid Co Ltd filed Critical Electric Power Research Institute of Guangxi Power Grid Co Ltd
Priority to CN202211589959.4A priority Critical patent/CN115841280A/en
Publication of CN115841280A publication Critical patent/CN115841280A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Photovoltaic Devices (AREA)

Abstract

The invention discloses a photovoltaic monthly scene generation method and a photovoltaic monthly scene generation system, which comprise the following steps: acquiring data of photovoltaic output within T years; inputting the real data set into a stack self-encoder for training, and performing dimension reduction on the real data set to extract features; respectively splicing Gaussian noises with corresponding dimensions by taking the feature set as a condition and the real data set as a label to obtain a feature-noise sample and a real-noise sample; inputting the feature-noise sample and the real-noise sample into a condition to generate a countermeasure network; clustering the feature set by using a feature weighted K-means clustering method to obtain a typical feature set; and inputting the typical feature set into a photovoltaic lunar scene generator to obtain a lunar typical output scene set. The photovoltaic monthly scene generation method based on the self-encoder and the generation countermeasure network accurately simulates the photovoltaic monthly output characteristics, thereby providing scientific data support for the cooperative formulation of the power system dispatching and operation plan.

Description

Photovoltaic monthly scene generation method and system
Technical Field
The invention relates to the technical field of new energy power systems, in particular to a photovoltaic monthly scene generation method and system.
Background
Under the requirement of the targets of "carbon peak reaching and carbon neutralization", the development of renewable energy power generation technology is urgently needed. However, as the permeability of renewable energy represented by photovoltaic is continuously improved, the disadvantages caused by the obvious space-time characteristics are gradually revealed. The accurate simulation of the power sequence of the renewable energy sources can provide scientific data support for the cooperative formulation of the power system scheduling and the operation plan.
The photovoltaic output simulation has different time scales, wherein the medium-long term power simulation can take environmental change factors such as seasons and climate into consideration, and the photovoltaic output simulation has profound guiding significance for formulation of a power system scheduling strategy, a maintenance plan and an electric quantity trading scheme. The medium-and-long-term photovoltaic output sequence has the characteristics of high dimensionality, strong randomness and the like, and the existing research method mainly adopts an interval simulation method and a scene analysis method. The scene analysis method has good optimizing stability for the uncertainty interval, the existing scene analysis method mostly builds a prior probability distribution model based on a statistical method, and combines the sampling to obtain the photovoltaic output scene, so that high-efficiency simulation can be realized, but the method is limited in the expression capability of the model and is difficult to comprehensively describe the output characteristic of renewable energy.
With the rise of artificial intelligence, the research on deep learning algorithms in the aspect of scene generation application is enthusiastic, and the generation type deep learning algorithms represented by self-encoders (AE) and generation countermeasure networks (GAN) have unique advantages in scene generation due to excellent self-learning and generalization capabilities. The existing research uses AE and variant algorithm to effectively reduce dimension of high-dimensional sequence and extract features, and preserve the time sequence of scenes, but because the decoder mostly uses the existing data distribution as learning guide, the generated scenes cannot well depict the uncertainty of new energy; and a scene generation algorithm based on GAN is researched to adaptively generate a scene through countermeasure training of a generator and a discriminator, because network input is driven by Gaussian white noise, uncertainty of generating a photovoltaic sequence can be simulated through directional mapping, but the processing effect on a long sequence is poor, and the time sequence cannot be guaranteed.
Therefore, a photovoltaic monthly scene generation method and system are provided to solve the above problems.
Disclosure of Invention
The invention provides a photovoltaic monthly scene generation method and system based on an autoencoder and a generation countermeasure network, and the photovoltaic monthly scene generation method and system accurately simulate photovoltaic monthly output characteristics, thereby providing scientific data support for power system scheduling and collaborative formulation of an operation plan and solving the problems in the background technology.
In order to achieve the purpose, the invention provides the following technical scheme:
the invention relates to a photovoltaic monthly scene generation method, which comprises the following steps: acquiring historical output data of a plurality of photovoltaic stations in T years, and carrying out preprocessing such as data normalization and bad data identification on the original data to obtain a real data set of a photovoltaic monthly output sequence;
aiming at the high-dimensional characteristics of the photovoltaic monthly output sequence, extracting the time sequence characteristics and the peak-valley characteristics of the photovoltaic monthly output sequence by adopting a stack self-encoder, realizing the layer-by-layer characteristic extraction of photovoltaic monthly output data through a deep stack neural network, and reducing the dimension of the high-dimensional photovoltaic monthly output sequence to obtain a photovoltaic monthly output characteristic sequence;
respectively splicing Gaussian noises with corresponding dimensions by taking the characteristic sequence as a condition and the real data set as a label to obtain a characteristic-noise sample and a real-noise sample;
generating a countermeasure network by inputting the characteristic-noise sample and the real-noise sample into conditions, finishing the training of the network by taking the improved Wassertein distance as a loss function, building a mapping space from a photovoltaic monthly output characteristic sequence to a photovoltaic monthly output scene, and taking the generated network as a photovoltaic monthly scene generator after finishing the training;
aiming at the problem that the photovoltaic monthly output feature sequence and a photovoltaic monthly output scene have data distribution difference, processing the feature set by using a feature weighted K mean value clustering method to establish a typical feature set;
and inputting the typical feature set into a photovoltaic lunar scene generator to obtain a lunar typical output scene set.
Preferably, the raw data is normalized according to the following formula:
Figure BDA0003993706830000031
in the formula (I), the compound is shown in the specification,
Figure BDA0003993706830000032
is a normalized value, X t For the output value, X, in the original photovoltaic data set min And X max Respectively a minimum force output value and a maximum force output value of the original photovoltaic data set;
and performing dimension reduction and feature extraction on the real data set, wherein the method comprises the following steps: building a stack self-encoder network, importing an optimizer, setting an activation function and a regularization layer, and initializing network parameters;
the real data set is trained in batches, input into a stack self-encoder, and output as Loss function Loss as the mean square error of the real data set VE Training is carried out, and the Loss function Loss VE Comprises the following steps:
Figure BDA0003993706830000033
in the formula, x i 、x′ i Are X, X' samples, respectively, and i ∈ n, n is the set of samples, m is the sequence dimension, i.e., x i =[x i1 ,x i2 ,...,x im ],x′ i =[x′ i1 ,x′ i2 ,...,x′ im ];
Loss function Loss VE Not less than 10 -4 Or the number of iterations does not exceed 10 3 Then, the error is reversely transmitted through the optimizer, the network parameter is updated, and the iteration number is counted and added by one; loss function Loss VE Less than 10 -4 Or the number of iterations exceeds 10 3 And taking the coding network as a feature extractor, and inputting the data set to obtain a low-dimensional feature set with the photovoltaic time sequence preserved.
Preferably, the true-noise sample and the feature-noise sample are respectively expressed as follows:
Figure BDA0003993706830000034
Figure BDA0003993706830000035
in the formula, S, C, Z respectively represent a true data set, a feature set and gaussian noise, as an example, a longitudinal stitching operation is indicated, m is a photovoltaic monthly output sequence dimension, and h is a feature sequence dimension.
Preferably, the generator for training the photovoltaic monthly scene by the conditional generation countermeasure network comprises the following steps:
building a condition generation network and a countermeasure network, importing an optimizer, setting an activation function, and initializing network parameters;
performing batch training processing on the true-noise sample set and the feature-noise sample set, generating structural input of a countermeasure network according to conditions, and efficiently and stably training the network by taking improved Wasserstein distance as a Loss function, wherein the Loss function Loss of a generator G Loss function with arbiter D Respectively as follows:
Figure BDA0003993706830000041
wherein the content of the first and second substances,
Figure BDA0003993706830000042
in the formula, D represents a discrimination value of the discrimination network, s ', c are a real photovoltaic scene, a scene generated by the generator, and a scene feature sequence, P _ s and P _ s ' are probability distributions obeyed by s and s ', respectively, P _ s "is a random sampling between P _ s and P _ s ', that is, s" = epsilon s- (1-epsilon) s ', and epsilon ∈ Uniform [0,1 ∈ Uniform [ ]]And lambda is the penalty coefficient of the gradient,
Figure BDA0003993706830000043
indicates that the continuous supremum value satisfying Lipschitz is K;
if Loss value Loss G And Loss D Is not less than 10 -4 Or the number of iterations does not exceed 10 3 Then the error is transmitted back through the optimizer, the network parameter is updated, and the iteration times are counted and added by one; if Loss value Loss G And Loss D Is less than 10 -4 Or the number of iterations exceeds 10 3 And finishing training and taking the generated network as a photovoltaic monthly scene generator.
Preferably, the feature set is clustered by using a feature weighted K-means clustering method, each clustering center is taken to obtain a typical feature set, and the typical feature set is input into a photovoltaic monthly scene generator to obtain a photovoltaic monthly typical output scene set, which comprises the following steps:
obtaining the weight of each sequence point through a Relief algorithm, and setting c i =[c i1 ,c i2 ,...,c im ]For the ith sample in the photovoltaic feature set c, the weighting vector λ is updated t times as follows:
λ t =λ t-1 -diff_hit/R+diff_miss/R,
wherein the content of the first and second substances,
Figure BDA0003993706830000051
in the formula, h is a nearest neighbor sample set, R is the number of neighbor samples, diff _ hit is an m-dimensional vector and represents c i Characteristic difference from h; p (l) is the probability of occurrence of the ith class, d is the R nearest neighbor samples in the ith class; diff _ miss is an m-dimensional vector, representing c i A difference in characteristics from d;
randomly selecting k characteristic sequences as clustering centers of k categories respectively, comparing the distance from each sample to each clustering center through the following formula, and attributing the sample to the category with the minimum distance:
Figure BDA0003993706830000052
representing a certain sample c within a photovoltaic feature set c in formula i =[c i1 ,c i2 ,...,c im ]To the clustering center h k,k∈K Degree of difference D;
and updating the clustering centers until convergence, taking the final clustering center as a typical feature set, and inputting the final clustering center into a photovoltaic lunar degree scene generator to obtain a photovoltaic lunar degree typical output scene set.
Preferably, the stacked self-encoder neural network model includes a convolutional neural network layer, a deconvolution neural network layer, a fully-connected neural network layer, a regularization layer, and an activation function layer, and the output dimensionality of the convolutional neural network layer is the following expression:
Figure BDA0003993706830000053
wherein padding _ size is a sample padding size, w represents an input sample width, h represents an input sample height, w _ out represents an output sample width, h _ out represents an output sample height, f represents a convolution kernel size, and s represents a convolution kernel moving step size;
the output dimensionality of the deconvolution neural network layer is as follows:
Figure BDA0003993706830000061
the fully-connected neural network layer is expressed as follows:
Figure BDA0003993706830000062
in the formula, n represents the number of characteristic input neurons, q represents the number of output neurons, p represents the number of hidden layer neurons, k is a sample index value, w and b are respectively a connection weight and a bias between the neurons, f (·) represents an activation function expression, hi h (k) And ho h (k) Respectively representing the output of the h hidden layer before the activation function and the output after the activation function for the k sample, yi o ( k ) And yo o (k) Respectively representing the output of the h output layer neuron before the activation function and the output after the activation function for the k sample;
the regularization layer based on batch normalization is the following expression:
Figure BDA0003993706830000063
in the formula, x (k) And y (k) Respectively, the data of the original data and the output data after batch normalization processing, mu (k) And delta (k) Respectively, the mean value and the standard deviation of the original data, the upper mark k represents the kth dimension of the data, and epsilon is a small constant for preventing the denominator from being 0;
the activation function layer based on ReLU and LeakyReLU is the following expression:
Figure BDA0003993706830000064
Figure BDA0003993706830000065
preferably, the conditional generation countermeasure network model comprises a maximum and minimum game mechanism, a convolutional neural network layer, a deconvolution neural network layer, a full-connection neural network layer and an activation function layer of the generation network and the discrimination network;
the maximum and minimum game mechanism for generating the network and distinguishing the network is the following expression:
Figure BDA0003993706830000071
in the formula, D represents a discrimination value of the discrimination network, s ' and c are respectively a real photovoltaic scene, a scene and a scene characteristic sequence generated by the generator, and are probability distributions that P _ s and P _ s ' are obeyed by s and s ' respectively;
the Sigmoid-based activation function layer is expressed as follows:
Figure BDA0003993706830000072
preferably, the loss function based on the improved Wasserstein distance comprises an original model, a dual theoretical solution, a weight limit implementation and a gradient penalty improvement;
the original model of the Wasserstein distance is the following expression:
Figure BDA0003993706830000073
in the formula, Π (P _ s, P _ s ') is a joint distribution of probability distributions of generated samples and probability distributions of real samples, for each possible joint distribution γ, sampling is performed in a range from (s, s') to γ, distances of the pair of samples are calculated, E represents an expected value of the distance of the pair of samples under the joint distribution γ, and inf represents an infimum boundary of the expected value;
the dual theory solving formula is as follows:
Figure BDA0003993706830000074
based on the improvement of the gradient punishment, an improved maximum and minimum game mechanism for conditional generation of the countermeasure network is obtained:
Figure BDA0003993706830000075
where P _ s "is a random sample between P _ s and P _ s ', i.e., s" = ε s- (1- ε) s', and ε ∈ Uniform [0,1 ∈ S]And lambda is the penalty coefficient of the gradient,
Figure BDA0003993706830000076
a continuous supremum value of K was indicated to satisfy Lipschitz.
Preferably, the stack self-encoder uses a second-order gradient momentum optimizer Adam, the condition generation countermeasure network uses a first-order gradient momentum optimizer RMSprop; the optimizer Adam model of the stack autoencoder is:
Figure BDA0003993706830000081
in the formula (I), the compound is shown in the specification,
Figure BDA0003993706830000082
respectively represents the weight and the bias of the network parameter at the nth iteration>
Figure BDA0003993706830000083
And &>
Figure BDA0003993706830000084
Respectively, the second order gradient momentum, beta, accumulated by the loss function during the previous n iterations 1 And beta 2 Is the momentum gradient coefficient, alpha is the learning rate,
Figure BDA0003993706830000085
for gradient corrections, ε is a small constant that prevents the denominator from being 0;
the condition generation countermeasure network optimizer RMSprop model is as follows:
Figure BDA0003993706830000086
by iteration number e = e max Or Loss is less than or equal to xi and is used as a judgment standard for the completion of the training of the stack self-encoder and the condition generation confrontation network.
The invention relates to a photovoltaic monthly scene generation system, which comprises: the photovoltaic power generation system comprises a first unit, a second unit and a third unit, wherein the first unit is used for acquiring historical output data of a plurality of photovoltaic stations in T years, and preprocessing such as data normalization and bad data identification is carried out on original data to obtain a real data set of a photovoltaic monthly output sequence; the second unit is used for extracting the time sequence characteristics and the peak-valley characteristics of the photovoltaic monthly output sequence by adopting a stack self-encoder according to the high-dimensional characteristics of the photovoltaic monthly output sequence, realizing the layer-by-layer characteristic extraction of the photovoltaic monthly output data through a deep stack neural network, and reducing the dimension of the high-dimensional photovoltaic monthly output sequence to obtain the photovoltaic monthly output characteristic sequence; the third unit is used for respectively splicing Gaussian noises with corresponding dimensionalities by taking the characteristic sequence as a condition and the real data set as a label to obtain a characteristic-noise sample and a real-noise sample; a fourth unit, configured to generate a countermeasure network from the feature-noise sample and the true-noise sample input conditions, complete training of the network with an improved Wasserstein distance as a loss function, build a mapping space from a photovoltaic monthly output feature sequence to a photovoltaic monthly output scene, and take the generated network as a photovoltaic monthly scene generator after completing training; a fifth unit, aiming at the problem that the photovoltaic monthly output characteristic sequence and the photovoltaic monthly output scene have data distribution difference, processing the characteristic set by using a characteristic weighted K-means clustering method, and establishing a typical characteristic set; and a sixth unit, inputting the typical feature set into a photovoltaic monthly scene generator to obtain a monthly typical contribution scene set.
The invention has the beneficial effects that:
1. according to the photovoltaic monthly scene generation method and system, the problems brought to a power system by photovoltaic high-permeability grid connection can be solved, the power output simulation is carried out on the power supply side by taking months as a time scale through a scene analysis method based on deep learning, and the method and system have guiding significance for the establishment of power grid dispatching and maintenance plans for accessing new energy power supplies.
2. According to the photovoltaic monthly scene generation method and system, the problems that network simulation is not easy to converge and the like when a high-dimensional scene with time sequence and uncertainty is simulated are technically considered, the advantages of various deep learning algorithms are complemented, learning target guidance with Wasserstein distance as a loss function is improved by combining with practical application scene design, and a certain reference value is provided for long sequence scene fitting.
3. According to the photovoltaic monthly scene generation method and system, through the construction of the photovoltaic monthly output typical scene, reference is provided for solving the problems of wind abandonment, light abandonment and water abandonment, the method fully considers the characteristics that a photovoltaic output sequence in the system has high dimensionality, strong randomness and the like, improves the accuracy of a new energy consumption strategy, and lays a foundation for guiding the reasonable development of new energy and ensuring the safe and stable operation of the system.
Drawings
FIG. 1 is a schematic diagram of a photovoltaic monthly scene generation method according to the present invention;
FIG. 2 is a schematic diagram of a photovoltaic monthly scene generation system according to the present invention;
FIG. 3 is a diagram illustrating the effect of feature extraction of a stacked self-encoder according to the present invention;
FIG. 4 is a diagram of a conditionally creating confrontation network architecture according to the present invention;
FIG. 5 is a diagram illustrating a monthly representative force scenario for a stacked auto-encoder and condition generating confrontation network according to the present invention;
FIG. 6 is a flow chart of the conditional generative confrontation network training process of the present invention;
FIG. 7 is a clustering distribution diagram of various feature sets based on the feature weighted K-means method according to the present invention;
fig. 8 is a diagram illustrating an exemplary scene set generating effect according to the present invention.
Description of the main reference numbers:
1. a first unit; 2. a second unit; 3. a third unit; 4. a fourth unit; 5. a fifth unit; 6. and a sixth unit.
Detailed Description
The photovoltaic monthly scene generation method provided by the invention is described by combining with the figure 1, and comprises the following steps:
s1, historical output data of a plurality of photovoltaic stations in T year are obtained, and preprocessing such as data normalization and bad data identification is carried out on original data to obtain a real data set of a photovoltaic monthly output sequence. The method comprises the steps of taking photovoltaic power generation data counted by photovoltaic power stations in European regions in 2010-2019 as original data, enabling the granularity of sampling time of the data to be one hour, accumulating 87648 groups of data in ten years, setting the dimensionality of a lunar scene sequence to be 720, obtaining the dimensionality of a feature vector through dimensionality reduction of a stack self-encoder to be 120, and obtaining the size of batch processing to be 32.
S2, aiming at the high-dimensional characteristics of the photovoltaic monthly output sequence, extracting the time sequence characteristics and the peak-valley characteristics of the photovoltaic monthly output sequence by adopting a stack self-encoder, realizing the layer-by-layer characteristic extraction of photovoltaic monthly output data through a deep stack neural network, and reducing the dimension of the high-dimensional photovoltaic monthly output sequence to obtain the photovoltaic monthly output characteristic sequence. The feature extraction effect based on the stack self-encoder is shown in fig. 3, a solid line of a left graph is a real photovoltaic month scene, features of the real photovoltaic month scene are abstracted through the encoder to obtain a feature sequence of the right graph, and a dotted line of the left graph is a reconstructed photovoltaic month scene obtained by decoding the feature sequence; as can be seen from the coincidence degree of the real output scene and the reconstructed output scene of the left graph, the reconstructed scene can almost fit the real scene, and the accuracy of network training is high; as can be seen from the curve profile of the right graph, the peak-valley characteristic of the real output sequence can be effectively abstracted by the characteristic sequence, redundant data is removed, and the effect of reducing the dimension and extracting the hidden characteristic is obtained.
And S3, respectively splicing Gaussian noises with corresponding dimensions by taking the characteristic sequence as a condition and the real data set as a label to obtain a characteristic-noise sample and a real-noise sample. Since feature extraction needs to be performed on all data sets by the encoder, the stack self-encoder employs corpus training. The training set and validation set assignments for the condition-generating countermeasure network are shown in table 1, where the validation set is used for fine-tuning of the network hyper-parameters. And when the low-dimensional feature set is spliced with a high-dimensional noise and real data set as a condition, expanding the feature set to 720 dimensions by adopting one-hot coding, and longitudinally splicing to form a matrix with the dimension of (2, 720) as network input.
Figure BDA0003993706830000111
/>
Table 1 assignment of data sets
S4, generating a countermeasure network according to the characteristic-noise sample and the real-noise sample input conditions, completing training of the network by taking the improved Wassertein distance as a loss function, building a mapping space from a photovoltaic monthly output characteristic sequence to a photovoltaic monthly output scene, and taking the generated network as a photovoltaic monthly scene generator after training is completed; s5, aiming at the problem that the photovoltaic monthly output feature sequence and the photovoltaic monthly output scene have data distribution difference, processing the feature set by using a feature weighted K-means clustering method, and establishing a typical feature set; and S6, inputting the typical feature set into a photovoltaic monthly scene generator to obtain a monthly typical output scene set.
Generating a countermeasure network by using the characteristic-noise sample and the real-noise sample according to the structural input conditions shown in the figure 5, respectively designing a generator and a discriminator network model according to the tables 2 and 3, finishing the training of the network by using the improved Wassertein distance as a loss function, building a mapping space from the characteristics to a photovoltaic lunar scene as shown in a training flow chart shown in figure 6, and taking the generated network as a photovoltaic lunar scene generator after finishing the training.
Figure BDA0003993706830000121
TABLE 2 Generator model neural network architecture
Figure BDA0003993706830000131
TABLE 3 arbiter model neural network architecture
Processing the feature set by using a feature weighted K-means clustering method, establishing a typical feature set, determining that the optimal K value is 4 according to an elbow method, and obtaining real output scenes of which the clustering centers respectively correspond to months 63, 26, 32 and 8, wherein the distribution diagram of various feature sequences is shown in FIG. 7, and a dark curve in the diagram is the clustering center.
And inputting the typical feature set into a photovoltaic lunar scene generator to obtain a lunar typical output scene set. The typical output scene set is shown in fig. 8, wherein a dark curve is a real output scene corresponding to the typical feature sequence, the photovoltaic monthly output scene set generated by the typical feature set has a certain power interval width, can reflect the uncertainty of the scene, and basically envelops the real output scene, and is highly consistent with the variation trend of the real output scene, and the peak-valley characteristics of the real output scene can be described accurately and completely.
The photovoltaic monthly scene generation system provided by the invention, as shown in fig. 2, includes: the first unit 1 is used for acquiring historical output data of a plurality of photovoltaic stations in T years, and preprocessing original data such as data normalization and bad data identification to obtain a real data set of a photovoltaic monthly output sequence; the second unit 2 is used for extracting the time sequence characteristics and the peak-valley characteristics of the photovoltaic monthly output sequence by adopting a stack self-encoder according to the high-dimensional characteristics of the photovoltaic monthly output sequence, realizing the layer-by-layer characteristic extraction of the photovoltaic monthly output data through a deep stack neural network, and reducing the dimension of the high-dimensional photovoltaic monthly output sequence to obtain the photovoltaic monthly output characteristic sequence; the third unit 3, taking the characteristic sequence as a condition and the real data set as a label, respectively splicing the Gaussian noises with corresponding dimensionalities to obtain a characteristic-noise sample and a real-noise sample; a fourth unit 4, generating a countermeasure network according to the characteristic-noise sample and the real-noise sample input conditions, completing training of the network by taking the improved Wasserstein distance as a loss function, building a mapping space from the photovoltaic monthly output characteristic sequence to the photovoltaic monthly output scene, and taking the generated network as a photovoltaic monthly scene generator after training is completed; a fifth unit 5, aiming at the problem that the photovoltaic monthly output feature sequence and the photovoltaic monthly output scene have data distribution difference, processing the feature set by using a feature weighted K-means clustering method to establish a typical feature set; and a sixth unit 6, which inputs the typical feature set into the photovoltaic lunar scene generator to obtain a lunar typical contribution scene set.

Claims (10)

1. A photovoltaic monthly scene generation method is characterized by comprising the following steps: acquiring historical output data of a plurality of photovoltaic stations in T years, and carrying out preprocessing such as data normalization and bad data identification on the original data to obtain a real data set of a photovoltaic monthly output sequence;
aiming at the high-dimensional characteristics of the photovoltaic monthly output sequence, extracting the time sequence characteristics and the peak-valley characteristics of the photovoltaic monthly output sequence by adopting a stack self-encoder, realizing the layer-by-layer characteristic extraction of photovoltaic monthly output data through a deep stack neural network, and reducing the dimension of the high-dimensional photovoltaic monthly output sequence to obtain a photovoltaic monthly output characteristic sequence;
respectively splicing Gaussian noises with corresponding dimensions by taking the characteristic sequence as a condition and the real data set as a label to obtain a characteristic-noise sample and a real-noise sample;
generating a countermeasure network according to the characteristic-noise sample and the real-noise sample input conditions, completing training of the network by taking the improved Wasserstein distance as a loss function, building a mapping space from a photovoltaic monthly output characteristic sequence to a photovoltaic monthly output scene, and taking the generated network as a photovoltaic monthly scene generator after training is completed;
aiming at the problem that the photovoltaic monthly output characteristic sequence and the photovoltaic monthly output scene have data distribution difference, processing the characteristic set by using a characteristic weighted K-means clustering method to establish a typical characteristic set;
and inputting the typical feature set into a photovoltaic lunar scene generator to obtain a lunar typical output scene set.
2. The method of claim 1, wherein the raw data is normalized according to the following formula:
Figure FDA0003993706820000011
in the formula (I), the compound is shown in the specification,
Figure FDA0003993706820000012
is a normalized value, X t For output values in the original photovoltaic data set, X min And X max Respectively a minimum force output value and a maximum force output value of the original photovoltaic data set;
the method for reducing the dimension and extracting the features of the real data set comprises the following steps: building a stack self-encoder network, importing an optimizer, setting an activation function and a regularization layer, and initializing network parameters;
the real data set is trained in batches, input into a stack self-encoder, and output as Loss function Loss as the mean square error of the real data set VE Training is carried out, and the Loss function Loss VE Comprises the following steps:
Figure FDA0003993706820000021
in the formula, x i 、x′ i Are X, X' samples, respectively, and i ∈ n, n is the set of samples, m is the sequence dimension, i.e., x i =[x i1 ,x i2 ,...,x im ],x′ i =[x′ i1 ,x′ i2 ,...,x′ im ];
Loss function Loss VE Not less than 10 -4 Or the number of iterations does not exceed 10 3 Then, the error is reversely transmitted through the optimizer, the network parameter is updated, and the iteration number is counted and added by one; loss function Loss VE Less than 10 -4 Or the number of iterations exceeds 10 3 And taking the coding network as a feature extractor, and inputting the data set to obtain a low-dimensional feature set with the photovoltaic time sequence preserved.
3. The photovoltaic monthly scene generation method as claimed in claim 1, wherein the true-noise sample and the feature-noise sample are respectively expressed as follows:
Figure FDA0003993706820000022
Figure FDA0003993706820000023
in the formula, S, C, Z respectively represent a true data set, a feature set and gaussian noise, as an example, a longitudinal stitching operation is indicated, m is a photovoltaic monthly output sequence dimension, and h is a feature sequence dimension.
4. The photovoltaic monthly scene generation method according to claim 1, wherein the training photovoltaic monthly scene generator by the conditional generation countermeasure network comprises the following steps:
building a condition generation network and a countermeasure network, importing an optimizer, setting an activation function, and initializing network parameters;
performing batch training processing on the true-noise sample set and the feature-noise sample set, generating structural input of a countermeasure network according to conditions, and efficiently and stably training the network by taking improved Wasserstein distance as a Loss function, wherein the Loss function Loss of a generator G Loss function Loss with arbiter D Respectively as follows:
Figure FDA0003993706820000031
wherein the content of the first and second substances,
Figure FDA0003993706820000032
in the formula, D represents a discrimination value of the discrimination network, s ', c are a real photovoltaic scene, a scene generated by the generator, and a scene feature sequence, P _ s and P _ s ' are probability distributions obeyed by s and s ', respectively, P _ s "is a random sampling between P _ s and P _ s ', that is, s" = epsilon s- (1-epsilon) s ', and epsilon ∈ Uniform [0,1 ∈ Uniform [ ]]And lambda is the penalty coefficient of the gradient,
Figure FDA0003993706820000033
represents a continuous supremum value of K satisfying Lipschitz;
if Loss value Loss G And Loss D Is not less than 10 -4 Or the number of iterations does not exceed 10 3 Then, the error is reversely transmitted through the optimizer, the network parameter is updated, and the iteration number is counted and added by one; if Loss value Loss G And Loss D Is less than 10 -4 Or the number of iterations exceeds 10 3 And finishing training and taking the generated network as a photovoltaic monthly scene generator.
5. The photovoltaic monthly scene generation method according to claim 1, wherein the feature sets are clustered by a feature weighted K-means clustering method, each clustering center is taken to obtain a typical feature set, and the typical feature set is input to a photovoltaic monthly scene generator to obtain a photovoltaic monthly typical output scene set, comprising the steps of:
obtaining the weight of each sequence point through a Relief algorithm, and setting c i =[c i1 ,c i2 ,...,c im ]For the ith sample in the photovoltaic feature set c, the weighting vector λ is updated t times as follows:
λ t =λ t-1 -diff_hit/R+diff_miss/R,
wherein the content of the first and second substances,
Figure FDA0003993706820000034
in the formula, h is a nearest neighbor sample set, R is the number of neighbor samples, diff _ hit is an m-dimensional vector and represents c i Characteristic difference from h; p (l) is the probability of occurrence of the ith class, and d is R nearest neighbor samples in the ith class; diff _ miss is an m-dimensional vector, representing c i A difference in characteristics from d;
randomly selecting k characteristic sequences as clustering centers of k categories respectively, comparing the distance from each sample to each clustering center through the following formula, and attributing the sample to the category with the minimum distance:
Figure FDA0003993706820000041
representing a certain sample c within a photovoltaic feature set c in formula i =[c i1 ,c i2 ,...,c im ]To the clustering center h k,k∈K Degree of difference D;
and updating the clustering centers until convergence, taking the final clustering center as a typical feature set, and inputting the final clustering center into a photovoltaic lunar degree scene generator to obtain a photovoltaic lunar degree typical output scene set.
6. The photovoltaic monthly scene generation method according to claim 1, wherein the stack self-encoder neural network model comprises a convolutional neural network layer, a deconvolution neural network layer, a fully-connected neural network layer, a regularization layer and an activation function layer, and the output dimension of the convolutional neural network layer is the following expression:
Figure FDA0003993706820000042
wherein padding _ size is a sample padding size, w represents an input sample width, h represents an input sample height, w _ out represents an output sample width, h _ out represents an output sample height, f represents a convolution kernel size, and s represents a convolution kernel moving step size;
the output dimensionality of the deconvolution neural network layer is as follows:
Figure FDA0003993706820000043
the fully-connected neural network layer is expressed as follows:
Figure FDA0003993706820000051
in the formula, n represents the number of characteristic input neurons, q represents the number of output neurons, p represents the number of hidden layer neurons, k is a sample index value, w and b are respectively a connection weight and a bias between the neurons, f (·) represents an activation function expression, hi h (k) And ho h (k) Respectively representing the output of the h hidden layer before the activation function and the output after the activation function for the k sample, yi o(k) And yo o (k) Respectively representing the output of the h output layer neuron before the activation function and the output after the activation function for the k sample;
the regularization layer based on batch normalization is the following expression:
Figure FDA0003993706820000052
in the formula, x (k) And y (k) Respectively, the data of the original data and the output data after batch normalization processing, mu (k) And delta (k) Respectively, the mean value and the standard deviation of the original data, the upper mark k represents the kth dimension of the data, and epsilon is a small constant for preventing the denominator from being 0;
the activation function layer based on ReLU and LeakyReLU is the following expression:
Figure FDA0003993706820000053
Figure FDA0003993706820000054
7. the photovoltaic monthly scene generation method according to claim 5, wherein the condition generation countermeasure network model comprises a maximum and minimum game mechanism, a convolutional neural network layer, a deconvolution neural network layer, a full-connection neural network layer and an activation function layer of the generation network and the discrimination network;
the maximum and minimum game mechanism of the generation network and the discrimination network is the following expression:
Figure FDA0003993706820000055
in the formula, D represents a discrimination value of the discrimination network, s ' and c are respectively a real photovoltaic scene, a scene and a scene characteristic sequence generated by the generator, and are probability distributions that P _ s and P _ s ' are obeyed by s and s ' respectively;
the Sigmoid-based activation function layer is expressed as follows:
Figure FDA0003993706820000061
8. the photovoltaic monthly scene generation method according to claim 1, wherein the loss function based on the improved Wasserstein distance comprises an original model, a solution to dual theory, weight limit implementation and gradient penalty improvement;
the original model of the Wasserstein distance is the following expression:
Figure FDA0003993706820000062
wherein Π (P _ s, P _ s ') is a joint distribution of the probability distribution of the generated samples and the probability distribution of the real samples, sampling (s, s') to γ is performed for each possible joint distribution γ, and the distance of the pair of samples is calculated, E represents an expected value of the distance of the pair of samples under the joint distribution γ, and inf represents an infimum bound of the expected value;
the dual theory solution formula is as follows:
Figure FDA0003993706820000063
based on the improvement of the gradient punishment, an improved maximum and minimum game mechanism for conditional generation of the countermeasure network is obtained:
Figure FDA0003993706820000064
where P _ s "is a random sample between P _ s and P _ s ', i.e., s" = ε s- (1- ε) s', and ε ∈ Uniform [0,1 ∈ S]And lambda is the penalty coefficient of the gradient,
Figure FDA0003993706820000065
a continuous supremum value of K was indicated to satisfy Lipschitz.
9. The photovoltaic lunar scene generation method according to claim 1, wherein the stack autoencoder uses a second order gradient momentum optimizer Adam, the condition generation countermeasure network uses a first order gradient momentum optimizer RMSprop; the optimizer Adam model of the stack autoencoder is:
Figure FDA0003993706820000071
in the formula,
Figure FDA0003993706820000072
Respectively representing the weight and the bias of the network parameters in the nth iteration,
Figure FDA0003993706820000073
and
Figure FDA0003993706820000074
respectively, the second order gradient momentum, beta, accumulated by the loss function during the previous n iterations 1 And beta 2 Is the momentum gradient coefficient, alpha is the learning rate,
Figure FDA0003993706820000075
for gradient corrections, ε is a small constant that prevents the denominator from being 0;
the condition generation countermeasure network optimizer RMSprop model is as follows:
Figure FDA0003993706820000076
by iteration number e = e max Or Loss is less than or equal to xi and is used as a judgment standard for the completion of the training of the stack self-encoder and the condition generation confrontation network.
10. A photovoltaic monthly scene generation system, comprising:
the photovoltaic power generation system comprises a first unit, a second unit and a third unit, wherein the first unit is used for acquiring historical output data of a plurality of photovoltaic stations in T years, and preprocessing such as data normalization and bad data identification is carried out on original data to obtain a real data set of a photovoltaic monthly output sequence; the second unit is used for extracting the time sequence characteristics and the peak-valley characteristics of the photovoltaic monthly output sequence by adopting a stack self-encoder according to the high-dimensional characteristics of the photovoltaic monthly output sequence, realizing the layer-by-layer characteristic extraction of the photovoltaic monthly output data through a deep stack neural network, and reducing the dimension of the high-dimensional photovoltaic monthly output sequence to obtain the photovoltaic monthly output characteristic sequence; the third unit is used for respectively splicing Gaussian noises with corresponding dimensionalities by taking the characteristic sequence as a condition and the real data set as a label to obtain a characteristic-noise sample and a real-noise sample; a fourth unit, generating a confrontation network by inputting the characteristic-noise sample and the real-noise sample, completing the training of the network by taking the improved Wassertein distance as a loss function, constructing a mapping space from a photovoltaic monthly output characteristic sequence to a photovoltaic monthly output scene, and taking the generated network as a photovoltaic monthly scene generator after completing the training; the fifth unit is used for processing the feature set by using a feature weighted K mean value clustering method to establish a typical feature set aiming at the problem that the photovoltaic monthly output feature sequence and the photovoltaic monthly output scene have data distribution difference; and a sixth unit, inputting the typical feature set into a photovoltaic monthly scene generator to obtain a monthly typical contribution scene set.
CN202211589959.4A 2022-12-12 2022-12-12 Photovoltaic monthly scene generation method and system Pending CN115841280A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211589959.4A CN115841280A (en) 2022-12-12 2022-12-12 Photovoltaic monthly scene generation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211589959.4A CN115841280A (en) 2022-12-12 2022-12-12 Photovoltaic monthly scene generation method and system

Publications (1)

Publication Number Publication Date
CN115841280A true CN115841280A (en) 2023-03-24

Family

ID=85578409

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211589959.4A Pending CN115841280A (en) 2022-12-12 2022-12-12 Photovoltaic monthly scene generation method and system

Country Status (1)

Country Link
CN (1) CN115841280A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117370825A (en) * 2023-10-11 2024-01-09 国网经济技术研究院有限公司 Long-term scene generation method and system for generating countermeasure network based on attention condition

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117370825A (en) * 2023-10-11 2024-01-09 国网经济技术研究院有限公司 Long-term scene generation method and system for generating countermeasure network based on attention condition

Similar Documents

Publication Publication Date Title
Gu et al. GAN-based model for residential load generation considering typical consumption patterns
CN106971240A (en) The short-term load forecasting method that a kind of variables choice is returned with Gaussian process
CN110942194A (en) Wind power prediction error interval evaluation method based on TCN
CN109902340B (en) Multi-source-load combined scene generation method considering complex meteorological coupling characteristics
Nedić Distributed optimization
Chinnathambi et al. Deep neural networks (DNN) for day-ahead electricity price markets
CN113869616A (en) Self-adaptive residential user load prediction method
CN113191918A (en) Lunar wind-solar power generation power scene analysis method based on time sequence generation countermeasure network
CN115841280A (en) Photovoltaic monthly scene generation method and system
CN115204035A (en) Generator set operation parameter prediction method and device based on multi-scale time sequence data fusion model and storage medium
Pannocchia Distributed model predictive control
CN115907195A (en) Photovoltaic power generation power prediction method, system, electronic device and medium
CN116681152A (en) Short-term load prediction method based on SOM-BP neural network improved Prophet model
CN116014722A (en) Sub-solar photovoltaic power generation prediction method and system based on seasonal decomposition and convolution network
CN111192158A (en) Transformer substation daily load curve similarity matching method based on deep learning
Lafortune Diagnosis of discrete event systems
Sørensen Dynamic positioning control systems for ships and underwater vehicles
CN116843057A (en) Wind power ultra-short-term prediction method based on LSTM-ViT
CN111563614A (en) Load prediction method based on adaptive neural network and TLBO algorithm
CN115936062A (en) Photovoltaic power day-ahead interval prediction method based on scene generation and deep learning
CN116415177A (en) Classifier parameter identification method based on extreme learning machine
CN115759343A (en) E-LSTM-based user electric quantity prediction method and device
Castañón Dynamic noncooperative games
CN115456286A (en) Short-term photovoltaic power prediction method
CN114897260A (en) Short-term wind speed prediction model modeling method and prediction method based on LSTM neural network

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination