CN115169544A - Short-term photovoltaic power generation power prediction method and system - Google Patents
Short-term photovoltaic power generation power prediction method and system Download PDFInfo
- Publication number
- CN115169544A CN115169544A CN202211075827.XA CN202211075827A CN115169544A CN 115169544 A CN115169544 A CN 115169544A CN 202211075827 A CN202211075827 A CN 202211075827A CN 115169544 A CN115169544 A CN 115169544A
- Authority
- CN
- China
- Prior art keywords
- domain
- gru
- data
- photovoltaic power
- target
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
- G06N3/084—Backpropagation, e.g. using gradient descent
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for ac mains or ac distribution networks
- H02J3/004—Generation forecast, e.g. methods or systems for forecasting future energy generation
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J3/00—Circuit arrangements for ac mains or ac distribution networks
- H02J3/38—Arrangements for parallely feeding a single network by two or more generators, converters or transformers
- H02J3/381—Dispersed generators
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2203/00—Indexing scheme relating to details of circuit arrangements for AC mains or AC distribution networks
- H02J2203/20—Simulating, e g planning, reliability check, modelling or computer assisted design [CAD]
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J2300/00—Systems for supplying or distributing electric power characterised by decentralized, dispersed, or local generation
- H02J2300/20—The dispersed energy generation being of renewable origin
- H02J2300/22—The renewable source being solar energy
- H02J2300/24—The renewable source being solar energy of photovoltaic origin
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y04—INFORMATION OR COMMUNICATION TECHNOLOGIES HAVING AN IMPACT ON OTHER TECHNOLOGY AREAS
- Y04S—SYSTEMS INTEGRATING TECHNOLOGIES RELATED TO POWER NETWORK OPERATION, COMMUNICATION OR INFORMATION TECHNOLOGIES FOR IMPROVING THE ELECTRICAL POWER GENERATION, TRANSMISSION, DISTRIBUTION, MANAGEMENT OR USAGE, i.e. SMART GRIDS
- Y04S10/00—Systems supporting electrical power generation, transmission or distribution
- Y04S10/50—Systems or methods supporting the power network operation or management, involving a certain degree of interaction with the load-side end user applications
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Evolutionary Computation (AREA)
- General Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Health & Medical Sciences (AREA)
- Supply And Distribution Of Alternating Current (AREA)
Abstract
The invention discloses a short-term photovoltaic power generation power prediction method and system. Firstly, obtaining characteristic data of a target domain photovoltaic power station and a source domain photovoltaic power station, dividing training data and test data after preprocessing the data, then constructing a GRU-DANN anti-migration learning model and training the GRU-DANN anti-migration learning model to obtain the trained GRU-DANN anti-migration learning model, finally inputting the test data into the trained GRU-DANN anti-migration learning model to obtain target power of the target domain photovoltaic power station, and generating a power time sequence corresponding to the target power according to a time sequence. The method can automatically extract the characteristics required for establishing the power prediction model of the low-sample photovoltaic power station from the data of the low-sample photovoltaic power station, and realize the effective migration of the low-sample photovoltaic power station by the high-sample photovoltaic power station so as to improve the power prediction precision of the low-sample photovoltaic power station.
Description
Technical Field
The invention relates to the technical field of photovoltaic power stations, in particular to a short-term photovoltaic power generation power prediction method and system.
Background
Solar energy is used as a new energy, and the large-scale grid connection of the solar energy brings challenges to the economical, safe and stable operation of a power system. Therefore, accurate photovoltaic power generation power prediction has important significance for the power system.
The photovoltaic power generation has the characteristics of randomness, intermittence and fluctuation, and a prediction model of the photovoltaic power generation needs a large amount of sample data to carry out training simulation. However, due to the lack of original data, the photovoltaic power prediction precision of a newly-built photovoltaic power station is low. The multiple data photovoltaic power stations are effectively utilized to help the few data photovoltaic power stations to establish a photovoltaic power prediction model, and the accuracy of power prediction of the wind power plant can be further improved. Hitherto, existing few-data photovoltaic power generation prediction methods establish prediction models by using simple model migration or parameter migration, and the simple methods cannot automatically extract features required for establishing few-data photovoltaic power prediction models from data of a multi-data photovoltaic power station, so that negative migration is easy to occur.
Therefore, how to realize the effective migration of multiple data photovoltaic power stations and further establish a photovoltaic power prediction model with a small number of data is a problem which needs to be solved urgently.
Disclosure of Invention
The invention provides a short-term photovoltaic power generation power prediction method and system, wherein a source domain photovoltaic power station represents a multi-sample photovoltaic power station, a target domain photovoltaic power station represents a low-sample photovoltaic power station, and characteristics required for establishing a low-sample photovoltaic power station power prediction model can be automatically extracted from data of the multi-sample photovoltaic power station, so that the multi-sample photovoltaic power station can effectively migrate the low-sample photovoltaic power station, and the power prediction accuracy of the low-sample photovoltaic power station is improved.
The technical scheme of the invention is as follows:
a short-term photovoltaic power generation power prediction method comprises the following steps:
s1, acquiring characteristic data of a target domain photovoltaic power station and a source domain photovoltaic power station, and preprocessing the data;
s2, dividing the preprocessed feature data of the target domain photovoltaic power station into two parts, wherein one part and the preprocessed feature data of the source domain photovoltaic power station are used as training data, and the other part is used as test data;
s3, constructing a GRU-DANN antagonistic migration learning model by adopting a GRU feature extractor, a regression predictor and a domain classifier, and inputting training data to train the GRU-DANN antagonistic migration learning model, wherein the process is as follows:
s31, extracting initial time characteristics from training data by using a GRU characteristic extractor;
s32, inputting the extracted initial time features into a regression predictor to obtain a photovoltaic power generation power predicted value of the initial time features, calculating a regression loss function through the photovoltaic power generation power predicted value and a photovoltaic power generation power measured value, and taking the initial time features as target time features when the regression loss function is converged;
s33, inputting the target time characteristics into a domain classifier, determining a data domain source of the target time characteristics through the domain classifier, and calculating the domain loss between the data domain source and a real domain source through a binary cross entropy formula;
s34, continuously updating parameters of the GRU feature extractor and the domain classifier according to the adaptation of the GRU feature extractor and the domain classifier to the resistant domain, and finishing the training of the GRU-DANN antagonistic migration learning model when the domain loss converges and the GRU feature extractor obtains the domain invariant feature from the source domain to the target domain;
and S4, inputting the test data into the trained GRU-DANN antagonistic migration learning model to obtain the target power of the target domain photovoltaic power station, and generating a power time sequence corresponding to the target power according to the time sequence.
According to the short-term photovoltaic power generation power prediction method based on the gated recurrent neural network and the domain antagonistic neural network, time characteristics in data of a source photovoltaic power station and a target photovoltaic power station can be effectively extracted through a characteristic extractor of the gated recurrent neural network (GRU), and domain invariant characteristics which effectively help the target domain photovoltaic power station to establish a prediction model can be found between the source domain and the target domain through the Domain Antagonistic Neural Network (DANN).
Further, in step S1, the characteristic data includes data of power, temperature, humidity, direct solar radiation intensity, solar scattering intensity, and wind speed;
the characteristic data is preprocessed as follows:
and carrying out min-max normalization processing on the power, the temperature, the humidity, the direct solar radiation intensity, the solar scattering intensity and the wind speed data to obtain a processed power sequence P, a processed temperature sequence T, a processed humidity sequence H, a processed direct solar radiation intensity sequence D, a processed direct solar scattering intensity sequence S and a processed wind speed sequence W.
Further, in step S2, the power, temperature, humidity, direct solar radiation intensity, direct solar scattering intensity, and wind speed data after the source domain photovoltaic power generation station is preprocessed are all used as training data, and the power, temperature, humidity, direct solar radiation intensity, direct solar scattering intensity, and wind speed data after the target domain photovoltaic power generation station is preprocessed are used to select data of three different weather days, namely sunny days, cloudy days, and rainy days, as test data, and the rest are used as training data.
It should be noted that, data of the sequence data of 6 parameters, i.e. power, temperature, humidity, solar direct radiation intensity, solar scattering intensity and wind speed, at a certain time, form a data string, i.e. at different times, a plurality of data strings can be formed, and the plurality of data strings form a data set, which is a form of a training data set or a test data set.
Further, in step S3, the GRU-DANN antagonistic migration learning model is constructed as follows:
the GRU-DANN antagonistic migration learning model adopts a GRU feature extractor, and a regression predictor and a domain classifier are respectively connected behind the GRU feature extractor, wherein the GRU feature extractor is connected with the domain classifier through a gradient inversion layer;
and inputting the data to a GRU feature extractor to obtain time features, and respectively inputting the time features to a regression predictor and a domain classifier to obtain corresponding photovoltaic power generation power prediction data and domain label prediction data.
Further, in step S3, the GRU feature extractor includes two GRU layers and an activation function Tanh, the two GRU layers respectively include 6 neurons and 64 neurons;
the regression predictor comprises three fully-connected layers, wherein the three fully-connected layers respectively comprise 100 neurons, 100 neurons and 1 neuron;
the domain classifier includes two fully connected layers including 100 neurons and 1 neuron, respectively.
Further, in step S32, the process of calculating the regression loss function from the predicted photovoltaic power generation value and the measured photovoltaic power generation value is as follows:
the regression loss of the power generation prediction is defined as the mean square error, i.e. the regression loss functionThe formula of (1) is as follows:
in the formula (I), the compound is shown in the specification,represents the number of samples of the training data,andthe measured values and the predicted values are indicated, respectively.
Further, in step S33, the process of calculating the domain loss between the data domain source and the real domain source through the binary cross entropy formula is as follows:
the domain loss is defined as binary cross entropy, which is expressed as follows:
in the formula (I), the compound is shown in the specification,which is indicative of a loss of the domain,andrespectively representing an actual domain label and a predicted domain label, wherein the domain label of the source domain is 0, and the domain label of the target domain is 1.
Further, in step S34, the process of updating the parameters of the GRU feature extractor and the domain classifier is as follows:
the method comprises the steps of extracting features of a source domain and a target domain by training a GRU feature extractor, inputting the extracted features into a domain classifier, distinguishing the features from the source domain or the target domain by the domain classifier through identifying domain labels of the extracted features, and extracting domain invariant features between the source domain and the target domain by continuously training the GRU feature extractor to finally enable the domain classifier to fail to correctly identify the domain labels, namely fail to distinguish the extracted features from the source domain or the target domain, wherein domain loss is converged at the moment, the GRU feature extractor can smoothly extract the domain invariant features between the source domain and the target domain, parameters of the GRU feature extractor and the domain classifier are updated, and the training of a GRU-DANN confrontation and migration learning model is completed.
Further, since the GRU feature extractor and the domain classifier have opposite effects on the domain loss in the training process of the GRU-DANN anti-migration learning model, the feature extractor aims to make the domain classifier unable to distinguish the source of the extracted feature, i.e. maximize the domain loss, and the domain classifier aims to accurately distinguish the source of the extracted feature of the GRU feature extractor, i.e. minimize the domain loss, the min-max operation cannot be directly realized by the gradient update in the neural network back propagation process at the same time, a gradient inversion layer (GRL) is added between the GRU feature extractor and the domain classifier, the gradient inversion layer has the function of multiplying the gradient transmitted to the gradient inversion layer by a negative number, so that the training targets of the network before and after the gradient inversion layer are opposite, and the gradient inversion layer uses a pseudo functionThe forward and backward propagation processes are represented by the following formula:
in the formula (I), the compound is shown in the specification,represents a matrix of the unit cells,is a hyper-parameter for achieving a trade-off between regression loss and domain loss,which represents the number of times of the current batch,represents the number of the current iteration numbers,represents the total number of iterations,representing the minimum total number of batches of the source domain and the target domain,the relative value of the iteration process, i.e. the ratio of the current iteration number to the total iteration number,is constant 10.
The invention also provides a short-term photovoltaic power generation power prediction system which comprises a data processing module, a construction model module and an output module, wherein the data processing module, the construction model module and the output module are respectively in communication connection with the control center;
the data processing module is used for acquiring characteristic data of the target domain photovoltaic power station and the source domain photovoltaic power station, carrying out data preprocessing, dividing the preprocessed characteristic data of the target domain photovoltaic power station into two parts, taking one part and the preprocessed characteristic data of the source domain photovoltaic power station as training data and the other part as test data, and transmitting the training data and the test data to the control center;
the model building module adopts a GRU feature extractor, a regression predictor and a domain classifier to build a GRU-DANN antagonistic migration learning model, obtains training data from the control center, inputs the training data to train the GRU-DANN antagonistic migration learning model, and the process is as follows:
extracting initial time characteristics from the training data by using a GRU characteristic extractor;
inputting the extracted initial time characteristics into a regression predictor to obtain a photovoltaic power generation power predicted value of the initial time characteristics, calculating a regression loss function through the photovoltaic power generation power predicted value and a photovoltaic power generation power measured value, and taking the initial time characteristics as target time characteristics when the regression loss function is converged;
inputting the target time characteristics into a domain classifier, determining a data domain source of the target time characteristics through the domain classifier, and calculating the domain loss between the data domain source and a real domain source through a binary cross entropy formula;
continuously updating parameters of the GRU feature extractor and the domain classifier according to the adaptation of the GRU feature extractor and the domain classifier to the antagonistic domain, and when the domain loss is converged, obtaining the domain invariant feature between the source domain and the target domain by the GRU feature extractor, and finishing the training of the GRU-DANN antagonistic migration learning model;
the building model module outputs the trained GRU-DANN antagonistic transfer learning model to the control center;
the control center inputs test data into the trained GRU-DANN anti-migration learning model, outputs the test data to obtain target power of the target domain photovoltaic power station, and generates a power time sequence corresponding to the target power according to a time sequence;
and the output module is used for outputting and displaying the predicted power time sequence.
Compared with the prior art, the invention has the following beneficial effects:
(1) The short-term photovoltaic power generation power prediction method provided by the invention combines deep learning and an antagonistic domain self-adaption method for photovoltaic power generation power prediction for the first time, and the GRU-DANN antagonistic migration learning model provided by the invention can obviously improve the power generation power prediction performance of a photovoltaic power station.
(2) The GRU feature extractor is used for automatically extracting time features across a source domain and a target domain, and the DANN finds domain invariant features between the source domain and the target domain through the adversarial domain adaptation of the GRU feature extractor and the domain classifier, so that the training of a GRU-DANN adversarial migration learning model is completed. The method realizes effective migration of the data of the multi-sample photovoltaic power station to the data of the few-sample photovoltaic power station, the trained model can be directly applied to help predict the power generation power of the target photovoltaic power station, the prediction performance is not reduced due to domain transfer, the power prediction precision of the few-sample photovoltaic power station is effectively improved, and the method has certain practical significance for short-term photovoltaic power generation prediction.
Drawings
Fig. 1 is a flowchart of a short-term photovoltaic power generation power prediction method according to the present invention.
FIG. 2 is a block diagram of the GRU-DANN anti-migratory learning model of the present invention.
Fig. 3 is a block diagram of a short term photovoltaic power generation power prediction system according to the present invention.
Fig. 4 is a diagram illustrating the effect of the short-term photovoltaic power generation power prediction method of the present invention on predicting data in a sunny day.
Fig. 5 is a diagram illustrating the effect of the short-term photovoltaic power generation power prediction method on prediction data in cloudy days.
Fig. 6 is a diagram illustrating the effect of the short-term photovoltaic power generation power prediction method of the present invention on predicting data in rainy days.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent; for the purpose of better illustrating the embodiments, certain features of the drawings may be omitted, enlarged or reduced, and do not represent the size of an actual product; it will be understood by those skilled in the art that certain well-known structures in the drawings and descriptions thereof may be omitted. The positional relationships depicted in the drawings are for illustrative purposes only and are not to be construed as limiting the present patent.
Example 1:
as shown in fig. 1 and fig. 2, the present embodiment provides a short-term photovoltaic power generation power prediction method, including the following steps:
s1, acquiring characteristic data of a target domain photovoltaic power station and a source domain photovoltaic power station, and preprocessing the data;
s2, dividing the preprocessed characteristic data of the target domain photovoltaic power station into two parts, wherein one part and the preprocessed characteristic data of the source domain photovoltaic power station are used as training data, and the other part is used as test data;
s3, constructing a GRU-DANN antagonistic migration learning model by adopting a GRU feature extractor, a regression predictor and a domain classifier, and inputting training data to train the GRU-DANN antagonistic migration learning model, wherein the process is as follows:
s31, extracting initial time characteristics from training data by using a GRU characteristic extractor;
s32, inputting the extracted initial time features into a regression predictor to obtain a photovoltaic power generation power predicted value of the initial time features, calculating a regression loss function through the photovoltaic power generation power predicted value and a photovoltaic power generation power measured value, and taking the initial time features as target time features when the regression loss function is converged;
s33, inputting the target time characteristics into a domain classifier, determining a data domain source of the target time characteristics through the domain classifier, and calculating the domain loss between the data domain source and a real domain source through a binary cross entropy formula;
s34, continuously updating parameters of the GRU feature extractor and the domain classifier according to the adaptation of the GRU feature extractor and the domain classifier to the resistant domain, and finishing the training of the GRU-DANN antagonistic migration learning model when the domain loss converges and the GRU feature extractor obtains the domain invariant feature from the source domain to the target domain;
and S4, inputting the test data into the trained GRU-DANN antagonistic migration learning model to obtain the target power of the target domain photovoltaic power station, and generating a power time sequence corresponding to the target power according to the time sequence.
According to the short-term photovoltaic power generation power prediction method based on the gated cyclic neural network and the domain antagonistic neural network, the time characteristics in data of a source photovoltaic power station and a target photovoltaic power station can be effectively extracted through the characteristic extractor of the gated cyclic neural network (GRU), and the Domain Antagonistic Neural Network (DANN) can find the domain invariant characteristic which effectively helps the target domain photovoltaic power station to establish a prediction model between a source domain and a target domain.
In step S1 of the present embodiment, the characteristic data includes data of power, temperature, humidity, solar direct radiation intensity, solar scattering intensity, and wind speed;
the characteristic data is preprocessed as follows:
and (3) carrying out min-max normalization processing on the power, the temperature, the humidity, the direct solar radiation intensity and the wind speed data to obtain a processed power sequence P, a processed temperature sequence T, a processed humidity sequence H, a processed direct solar radiation intensity sequence D, a processed direct solar radiation intensity sequence S and a processed wind speed sequence W.
In step S2 of this embodiment, the power, temperature, humidity, direct solar radiation intensity, direct solar scattering intensity, and wind speed data after the source domain photovoltaic power plant is preprocessed are all used as training data, and the power, temperature, humidity, direct solar radiation intensity, direct solar scattering intensity, and wind speed data after the target domain photovoltaic power plant is preprocessed are used to select data of three different meteorological days, namely sunny day, cloudy day, and rainy day, as test data, and the rest are used as training data.
It should be noted that, data of the sequence data of 6 parameters, i.e. power, temperature, humidity, solar direct radiation intensity, solar scattering intensity and wind speed, at a certain time, form a data string, i.e. at different times, a plurality of data strings can be formed, and the plurality of data strings form a data set, which is a form of a training data set or a test data set.
The training data are used for training the GRU-DANN anti-migration learning model, and the GRU-DANN anti-migration learning model is a model constructed by a gated recurrent neural network (GRU) feature extractor, a regression predictor and a domain classifier and is used for automatically extracting common features of multiple data photovoltaic power stations and few data photovoltaic power stations and helping the few data photovoltaic power stations to predict photovoltaic power generation power.
In step S3 of this embodiment, the process of constructing the GRU-DANN anti-migration learning model is as follows:
the GRU-DANN confrontation migration learning model adopts a GRU feature extractor, and a regression predictor and a domain classifier are respectively connected behind the GRU feature extractor, wherein the GRU feature extractor is connected with the domain classifier through a gradient inversion layer;
and inputting the data to a GRU feature extractor to obtain time features, and respectively inputting the time features to a regression predictor and a domain classifier to obtain corresponding photovoltaic power generation power prediction data and domain label prediction data.
In step S3 of this embodiment, the GRU feature extractor includes two GRU layers and an activation function Tanh, where the two GRU layers respectively include 6 neurons and 64 neurons;
the formula of the activation function Tanh is as follows:
in the formula (I), the compound is shown in the specification,andin order to reset the gate and to refresh the gate,in order to imply the state of the layer,andare an input and an output, respectively,in order to be the last output, the output is,、、、、、in order to be a matrix of the weight parameters,、、in the form of a matrix of offset parameters,in order to perform a matrix multiplication,is a Sigmod function;
the regression predictor comprises three fully-connected layers, wherein the three fully-connected layers respectively comprise 100 neurons, 100 neurons and 1 neuron;
the domain classifier includes two fully connected layers including 100 neurons and 1 neuron, respectively.
In step S31 of this embodiment, the GRU feature extractor extracts initial time features of the source domain and the target domain from the training data, respectively; the initial time characteristics are implicit data information in a power sequence P, a temperature sequence T, a humidity sequence H, a solar direct radiation intensity sequence D, a scattering intensity sequence S and a wind speed sequence W, and the implicit data information refers to information related to power.
In step S32 of the present embodiment, the process of calculating the regression loss function from the predicted photovoltaic power generation value and the measured photovoltaic power generation value is as follows:
the regression loss of the power generation prediction is defined as the mean square error, i.e. the regression loss functionThe formula (c) is as follows:
in the formula (I), the compound is shown in the specification,represents the number of samples of the training data,andthe measured values and the predicted values are indicated, respectively.
In step S33 of the present embodiment, the process of calculating the domain loss between the data domain source and the real domain source by the binary cross entropy formula is as follows:
the domain loss is defined as binary cross entropy, which is expressed as follows:
in the formula (I), the compound is shown in the specification,which is indicative of a loss of the domain,andrespectively representing an actual domain label and a predicted domain label, wherein the domain label of the source domain is 0, and the domain label of the target domain is 1.
In step S34 of this embodiment, the process of updating the parameters of the GRU feature extractor and the domain classifier is as follows:
the method comprises the steps of extracting features of a source domain and a target domain by training a GRU feature extractor, inputting the extracted features into a domain classifier, distinguishing the features from the source domain or the target domain by the domain classifier through identifying domain labels of the extracted features, and extracting domain invariant features between the source domain and the target domain by continuously training the GRU feature extractor, so that the domain classifier cannot correctly identify the domain labels, namely the extracted features are from the source domain or the target domain, wherein the domain loss is converged, the GRU feature extractor can smoothly extract the domain invariant features between the source domain and the target domain, parameters of the GRU feature extractor and the domain classifier are updated, and the training of a GRU-DANN anti-migration learning model is completed.
Wherein, because the GRU feature extractor and the domain classifier have opposite effects on the domain loss in the training process of the GRU-DANN anti-migration learning model, the feature extractor aims to ensure that the domain classifier can not distinguish the source of the extracted feature, namely, the domain loss is maximized, the domain classifier aims to accurately distinguish the source of the extracted feature of the GRU feature extractor, namely, the domain loss is minimized, the minimum-maximum operation can not be directly realized by the gradient update in the neural network back propagation process at the same time, a gradient inversion layer (GRL) is added between the GRU feature extractor and the domain classifier, the gradient inversion layer is used for multiplying the gradient transmitted to the gradient inversion layer by a negative number, so that the training targets of the networks before and after the gradient inversion layer are opposite, and the gradient inversion layer uses a pseudo functionThe forward and backward propagation processes are represented by the following formula:
in the formula (I), the compound is shown in the specification,represents a matrix of units, and represents a matrix of units,is a hyper-parameter for achieving a trade-off between regression loss and domain loss,which represents the number of times of the current batch,represents the number of the current iteration numbers,represents the total number of iterations,representing the minimum total number of batches of the source domain and the target domain,the relative value of the iteration process, i.e. the ratio of the current iteration number to the total iteration number,is constant 10.
According to the short-term photovoltaic power generation power prediction method, a deep learning method and an antagonistic domain self-adaption method are combined for photovoltaic power generation power prediction for the first time, and the GRU-DANN antagonistic migration learning model can remarkably improve the power generation power prediction performance of a photovoltaic power station.
Example 2:
as shown in fig. 3, the present embodiment further provides a short-term photovoltaic power generation power prediction system, which is configured to implement the short-term photovoltaic power generation power prediction method in embodiment 1, and the system includes a data processing module, a construction model module, and an output module, which are respectively in communication connection with the control center;
the data processing module is used for acquiring characteristic data of the target domain photovoltaic power station and the source domain photovoltaic power station, preprocessing the characteristic data, dividing the preprocessed characteristic data of the target domain photovoltaic power station into two parts, using one part and the preprocessed characteristic data of the source domain photovoltaic power station as training data and the other part as test data, and transmitting the training data and the test data to the control center;
the model building module adopts a GRU feature extractor, a regression predictor and a domain classifier to build a GRU-DANN antagonistic migration learning model, obtains training data from the control center, inputs the training data to train the GRU-DANN antagonistic migration learning model, and the process is as follows:
extracting initial time characteristics from the training data by using a GRU characteristic extractor;
inputting the extracted initial time characteristics into a regression predictor to obtain a photovoltaic power generation power predicted value of the initial time characteristics, calculating a regression loss function through the photovoltaic power generation power predicted value and a photovoltaic power generation power measured value, and taking the initial time characteristics as target time characteristics when the regression loss function is converged;
inputting the target time characteristics into a domain classifier, determining a data domain source of the target time characteristics through the domain classifier, and calculating the domain loss between the data domain source and a real domain source through a binary cross entropy formula;
continuously updating parameters of the GRU feature extractor and the domain classifier according to the adaptation of the GRU feature extractor and the domain classifier to the antagonistic domain, and when the domain loss is converged, obtaining the domain invariant feature between the source domain and the target domain by the GRU feature extractor, and finishing the training of the GRU-DANN antagonistic migration learning model;
the building model module outputs the trained GRU-DANN antagonistic transfer learning model to the control center;
the control center inputs test data into the trained GRU-DANN anti-migration learning model, outputs the test data to obtain target power of the target domain photovoltaic power station, and generates a power time sequence corresponding to the target power according to a time sequence;
and the output module is used for outputting and displaying the predicted power time sequence.
Example 3:
the embodiment verifies the effectiveness of the short-term photovoltaic power generation power prediction method in the embodiment 1 by using specific data, and the specific process is as follows:
in step S1, acquiring power, temperature, humidity, direct solar radiation intensity, scattered solar intensity and wind speed data of three photovoltaic power generation stations of Australian 2018/01/01/0 to 2018/12/29/23 as characteristic data of a source area photovoltaic power generation station, and acquiring power, temperature, humidity, direct solar radiation intensity, scattered solar intensity and wind speed data of another photovoltaic power generation station in the same Australian time period as characteristic data of a target area photovoltaic power generation station;
in step S2, the data is processed in the manner described in embodiment 1 to divide training data and test data;
in step S3, training the GRU-DANN antagonistic migration learning model according to the obtained training data to obtain a trained GRU-DANN antagonistic migration learning model;
in the step S4, test data are input into the trained GRU-DANN confrontation migration learning model to obtain target power of the target domain photovoltaic power station, and a power time sequence corresponding to the target power is generated according to a time sequence;
the output target power is one power prediction point every 20 minutes, and a photovoltaic power time sequence of 72 multiplied by 1 tensor is generated according to 72 power prediction points in one day.
As shown in fig. 4 to fig. 6, in the present embodiment, the power prediction effect of the photovoltaic power plant of the output target area is obtained on a sunny day, a cloudy day, and a rainy day, respectively. Therefore, the power prediction accuracy of the photovoltaic power station with few samples is effectively improved.
In summary, the GRU feature extractor of the present invention is configured to automatically extract time features across a source domain and a target domain, and the DANN finds domain invariant features between the source domain and the target domain through the adversarial domain adaptation of the GRU feature extractor and the domain classifier, thereby completing the training of the GRU-DANN adversarial migration learning model.
The method realizes effective migration of the data of the multi-sample photovoltaic power station to the data of the few-sample photovoltaic power station, the trained model can be directly applied to help predict the power generation power of the target photovoltaic power station, the prediction performance is not reduced due to domain transfer, the power prediction precision of the few-sample photovoltaic power station is effectively improved, and the method has certain practical significance for short-term photovoltaic power generation prediction.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. This need not be, nor should it be exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.
Claims (10)
1. A short-term photovoltaic power generation power prediction method is characterized by comprising the following steps:
s1, acquiring characteristic data of a target domain photovoltaic power station and a source domain photovoltaic power station, and preprocessing the data;
s2, dividing the preprocessed characteristic data of the target domain photovoltaic power station into two parts, wherein one part and the preprocessed characteristic data of the source domain photovoltaic power station are used as training data, and the other part is used as test data;
s3, constructing a GRU-DANN antagonistic migration learning model by adopting a GRU feature extractor, a regression predictor and a domain classifier, and inputting training data to train the GRU-DANN antagonistic migration learning model, wherein the process is as follows:
s31, extracting initial time characteristics from training data by using a GRU characteristic extractor;
s32, inputting the extracted initial time features into a regression predictor to obtain a photovoltaic power generation power predicted value of the initial time features, calculating a regression loss function through the photovoltaic power generation power predicted value and a photovoltaic power generation power measured value, and taking the initial time features as target time features when the regression loss function is converged;
s33, inputting the target time characteristics into a domain classifier, determining a data domain source of the target time characteristics through the domain classifier, and calculating the domain loss between the data domain source and a real domain source through a binary cross entropy formula;
s34, continuously updating parameters of the GRU feature extractor and the domain classifier according to the adaptation of the GRU feature extractor and the domain classifier to the resistant domain, and finishing the training of the GRU-DANN antagonistic migration learning model when the domain loss converges and the GRU feature extractor obtains the domain invariant feature from the source domain to the target domain;
and S4, inputting the test data into the trained GRU-DANN antagonistic migration learning model to obtain the target power of the target domain photovoltaic power station, and generating a power time sequence corresponding to the target power according to the time sequence.
2. The method for predicting the short-term photovoltaic power generation power as claimed in claim 1, wherein in the step S1, the characteristic data comprises data of power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed;
the characteristic data is preprocessed as follows:
and carrying out min-max normalization processing on the power, the temperature, the humidity, the direct solar radiation intensity, the solar scattering intensity and the wind speed data to obtain a processed power sequence P, a processed temperature sequence T, a processed humidity sequence H, a processed direct solar radiation intensity sequence D, a processed direct solar scattering intensity sequence S and a processed wind speed sequence W.
3. The method for predicting the short-term photovoltaic power generation power as claimed in claim 2, wherein in step S2, the preprocessed power, temperature, humidity, direct solar radiation intensity, scattered solar intensity and wind speed data of the source-domain photovoltaic power plant are all used as training data, and the preprocessed power, temperature, humidity, direct solar radiation intensity, scattered solar intensity and wind speed data of the target-domain photovoltaic power plant are used for selecting data of three different meteorological days of sunny days, cloudy days and rainy days as test data, and the rest are used as training data.
4. The method for predicting short-term photovoltaic power generation power as claimed in claim 1, wherein in step S3, the GRU-DANN anti-migration learning model is constructed as follows:
the GRU-DANN confrontation migration learning model adopts a GRU feature extractor, and a regression predictor and a domain classifier are respectively connected behind the GRU feature extractor, wherein the GRU feature extractor is connected with the domain classifier through a gradient inversion layer;
and inputting the data to a GRU feature extractor to obtain time features, and respectively inputting the time features to a regression predictor and a domain classifier to obtain corresponding photovoltaic power generation power prediction data and domain label prediction data.
5. The method for predicting the short-term photovoltaic power generation power according to claim 1, wherein in step S3, the GRU feature extractor comprises two GRU layers and an activation function Tanh, the two GRU layers respectively comprise 6 neurons and 64 neurons;
the regression predictor comprises three fully-connected layers, wherein the three fully-connected layers respectively comprise 100 neurons, 100 neurons and 1 neuron;
the domain classifier includes two fully connected layers including 100 neurons and 1 neuron, respectively.
6. The method as claimed in claim 1, wherein the step S32 of calculating the regression loss function from the predicted pv power and the measured pv power is as follows:
the regression loss of the power generation prediction is defined as the mean square error, i.e. the regression loss functionThe formula of (1) is as follows:
7. The method for predicting short-term photovoltaic power generation power as claimed in claim 1, wherein in step S33, the domain loss between the data domain source and the real domain source is calculated by using a binary cross entropy formula as follows:
the domain loss is defined as binary cross entropy, which is expressed as follows:
8. The method as claimed in claim 1, wherein the step S34 of updating the parameters of the GRU feature extractor and the domain classifier is as follows:
the method comprises the steps of extracting features of a source domain and a target domain by training a GRU feature extractor, inputting the extracted features into a domain classifier, distinguishing the features from the source domain or the target domain by the domain classifier through identifying domain labels of the extracted features, and extracting domain invariant features between the source domain and the target domain by continuously training the GRU feature extractor to finally enable the domain classifier to fail to correctly identify the domain labels, namely fail to distinguish the extracted features from the source domain or the target domain, wherein domain loss is converged at the moment, the GRU feature extractor can smoothly extract the domain invariant features between the source domain and the target domain, parameters of the GRU feature extractor and the domain classifier are updated, and the training of a GRU-DANN confrontation and migration learning model is completed.
9. The method of claim 8, wherein the impact on domain loss due to the GRU feature extractor and domain classifier during the training of the GRU-DANN anti-migration learning modelIn contrast, the purpose of the feature extractor is to make the domain classifier unable to distinguish the source of the extracted features, i.e. to maximize the domain loss, and the purpose of the domain classifier is to accurately distinguish the source of the extracted features of the GRU feature extractor, i.e. to minimize the domain loss, and this min-max operation cannot be directly implemented by the gradient update in the neural network back propagation process at the same time, so a gradient inversion layer is added between the GRU feature extractor and the domain classifier, and the gradient inversion layer is used to multiply the gradient transmitted to the gradient inversion layer by a negative number, so that the training targets of the network before and after the gradient inversion layer are opposite, and the gradient inversion layer uses a pseudo functionThe forward and backward propagation processes are represented by the following formula:
in the formula (I), the compound is shown in the specification,represents a matrix of the unit cells,is a hyper-parameter for achieving a trade-off between regression loss and domain lossThe number of the first and second groups is,which represents the number of times of the current batch,representing the current number of iterations,represents the total number of iterations,representing the minimum total number of batches of the source domain and the target domain,the relative value of the iteration process, i.e. the ratio of the current iteration number to the total iteration number,is constant 10.
10. A short-term photovoltaic power generation power prediction system is characterized by comprising a data processing module, a construction model module and an output module which are respectively in communication connection with a control center;
the data processing module is used for acquiring characteristic data of the target domain photovoltaic power station and the source domain photovoltaic power station, carrying out data preprocessing, dividing the preprocessed characteristic data of the target domain photovoltaic power station into two parts, taking one part and the preprocessed characteristic data of the source domain photovoltaic power station as training data and the other part as test data, and transmitting the training data and the test data to the control center;
the model building module builds a GRU-DANN antagonistic migration learning model by adopting a GRU feature extractor, a regression predictor and a domain classifier, acquires training data from the control center, inputs the training data to train the GRU-DANN antagonistic migration learning model, and comprises the following processes:
extracting initial time features from the training data by using a GRU feature extractor;
inputting the extracted initial time characteristics into a regression predictor to obtain a photovoltaic power generation power predicted value of the initial time characteristics, calculating a regression loss function through the photovoltaic power generation power predicted value and a photovoltaic power generation power measured value, and taking the initial time characteristics as target time characteristics when the regression loss function is converged;
inputting the target time characteristics into a domain classifier, determining a data domain source of the target time characteristics through the domain classifier, and calculating the domain loss between the data domain source and a real domain source through a binary cross entropy formula;
continuously updating parameters of the GRU feature extractor and the domain classifier according to the adaptation of the GRU feature extractor and the domain classifier to the antagonistic domain, and when the domain loss is converged, obtaining the domain invariant feature between the source domain and the target domain by the GRU feature extractor, and finishing the training of the GRU-DANN antagonistic migration learning model;
the building model module outputs the trained GRU-DANN antagonistic transfer learning model to the control center;
the control center inputs test data into the trained GRU-DANN anti-migration learning model, outputs the test data to obtain target power of the target domain photovoltaic power station, and generates a power time sequence corresponding to the target power according to a time sequence;
and the output module is used for outputting and displaying the predicted power time sequence.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211075827.XA CN115169544A (en) | 2022-09-05 | 2022-09-05 | Short-term photovoltaic power generation power prediction method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211075827.XA CN115169544A (en) | 2022-09-05 | 2022-09-05 | Short-term photovoltaic power generation power prediction method and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN115169544A true CN115169544A (en) | 2022-10-11 |
Family
ID=83481610
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202211075827.XA Pending CN115169544A (en) | 2022-09-05 | 2022-09-05 | Short-term photovoltaic power generation power prediction method and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN115169544A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115933531A (en) * | 2023-01-09 | 2023-04-07 | 广东工业大学 | Machine tool thermal error modeling method and system based on depth domain anti-migration |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766212A (en) * | 2019-10-15 | 2020-02-07 | 哈尔滨工程大学 | Ultra-short-term photovoltaic power prediction method for historical data missing electric field |
CN112085108A (en) * | 2020-09-11 | 2020-12-15 | 杭州华电下沙热电有限公司 | Photovoltaic power station fault diagnosis algorithm based on automatic encoder and K-means clustering |
CN113420492A (en) * | 2021-04-30 | 2021-09-21 | 华北电力大学 | Modeling method for frequency response model of wind-solar-fire coupling system based on GAN and GRU neural network |
CN113902104A (en) * | 2021-11-01 | 2022-01-07 | 南京工程学院 | Non-invasive load monitoring method combining unsupervised domain self-adaptive strategy and attention mechanism |
CN114239733A (en) * | 2021-12-21 | 2022-03-25 | 华中科技大学 | Machine tool response modeling method and system based on transfer learning and response prediction method |
CN114692950A (en) * | 2022-03-03 | 2022-07-01 | 内蒙古工业大学 | Wind power prediction method |
CN114970365A (en) * | 2022-06-08 | 2022-08-30 | 昆明理工大学 | Bearing residual life prediction model based on anti-migration learning |
-
2022
- 2022-09-05 CN CN202211075827.XA patent/CN115169544A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110766212A (en) * | 2019-10-15 | 2020-02-07 | 哈尔滨工程大学 | Ultra-short-term photovoltaic power prediction method for historical data missing electric field |
CN112085108A (en) * | 2020-09-11 | 2020-12-15 | 杭州华电下沙热电有限公司 | Photovoltaic power station fault diagnosis algorithm based on automatic encoder and K-means clustering |
CN113420492A (en) * | 2021-04-30 | 2021-09-21 | 华北电力大学 | Modeling method for frequency response model of wind-solar-fire coupling system based on GAN and GRU neural network |
CN113902104A (en) * | 2021-11-01 | 2022-01-07 | 南京工程学院 | Non-invasive load monitoring method combining unsupervised domain self-adaptive strategy and attention mechanism |
CN114239733A (en) * | 2021-12-21 | 2022-03-25 | 华中科技大学 | Machine tool response modeling method and system based on transfer learning and response prediction method |
CN114692950A (en) * | 2022-03-03 | 2022-07-01 | 内蒙古工业大学 | Wind power prediction method |
CN114970365A (en) * | 2022-06-08 | 2022-08-30 | 昆明理工大学 | Bearing residual life prediction model based on anti-migration learning |
Non-Patent Citations (1)
Title |
---|
BIN CHENG WEN 等: "Data-driven remaining useful life prediction based on domain adaptation", 《PEERJ COMPUTER SCIENCE》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115933531A (en) * | 2023-01-09 | 2023-04-07 | 广东工业大学 | Machine tool thermal error modeling method and system based on depth domain anti-migration |
CN115933531B (en) * | 2023-01-09 | 2024-04-05 | 广东工业大学 | Machine tool thermal error modeling method and system based on depth domain countermeasure migration |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110070226B (en) | Photovoltaic power prediction method and system based on convolutional neural network and meta-learning | |
US20230035108A1 (en) | Photovoltaic cell parameter identification method based on improved equilibrium optimizer algorithm | |
CN108596327B (en) | Seismic velocity spectrum artificial intelligence picking method based on deep learning | |
Abdel-Nasser et al. | A novel smart grid state estimation method based on neural networks | |
CN112100911B (en) | Solar radiation prediction method based on depth BILSTM | |
CN103942749B (en) | A kind of based on revising cluster hypothesis and the EO-1 hyperion terrain classification method of semi-supervised very fast learning machine | |
CN115347571B (en) | Photovoltaic power generation short-term prediction method and device based on transfer learning | |
CN111260126A (en) | Short-term photovoltaic power generation prediction method considering correlation degree of weather and meteorological factors | |
CN110942205A (en) | Short-term photovoltaic power generation power prediction method based on HIMVO-SVM | |
CN107562992B (en) | Photovoltaic array maximum power tracking method based on SVM and particle swarm algorithm | |
Premkumar et al. | A reliable optimization framework for parameter identification of single‐diode solar photovoltaic model using weighted velocity‐guided grey wolf optimization algorithm and Lambert‐W function | |
CN114462718A (en) | CNN-GRU wind power prediction method based on time sliding window | |
CN115169543A (en) | Short-term photovoltaic power prediction method and system based on transfer learning | |
CN111785018A (en) | Toll station lower flow prediction method based on gate control cycle unit | |
Yu et al. | Sub-population improved grey wolf optimizer with Gaussian mutation and Lévy flight for parameters identification of photovoltaic models | |
CN114897204A (en) | Method and device for predicting short-term wind speed of offshore wind farm | |
CN117081063A (en) | Distributed charging load prediction method and system based on GCN-Crossformer model | |
CN116794547A (en) | Lithium ion battery residual service life prediction method based on AFSA-GRU | |
CN115169544A (en) | Short-term photovoltaic power generation power prediction method and system | |
CN116826737A (en) | Photovoltaic power prediction method, device, storage medium and equipment | |
CN116014722A (en) | Sub-solar photovoltaic power generation prediction method and system based on seasonal decomposition and convolution network | |
Wibawa et al. | Long Short-Term Memory to Predict Unique Visitors of an Electronic Journal | |
CN115034432A (en) | Wind speed prediction method for wind generating set of wind power plant | |
CN118157127A (en) | Multi-weather photovoltaic power generation power prediction digital twin system based on LSTM-MM model | |
CN114818871A (en) | Abnormal electricity utilization detection method for power distribution network with distributed power supply |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221011 |
|
RJ01 | Rejection of invention patent application after publication |