CN115169544A - A short-term photovoltaic power generation power prediction method and system - Google Patents
A 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
- 238000010248 power generation Methods 0.000 title claims abstract description 75
- 238000000034 method Methods 0.000 title claims abstract description 63
- 238000012549 training Methods 0.000 claims abstract description 69
- 238000013526 transfer learning Methods 0.000 claims abstract description 52
- 238000012360 testing method Methods 0.000 claims abstract description 24
- 239000000284 extract Substances 0.000 claims abstract description 15
- 230000008569 process Effects 0.000 claims description 34
- 230000006870 function Effects 0.000 claims description 29
- 210000002569 neuron Anatomy 0.000 claims description 21
- 230000005855 radiation Effects 0.000 claims description 20
- 238000013528 artificial neural network Methods 0.000 claims description 11
- 230000002123 temporal effect Effects 0.000 claims description 11
- 230000006978 adaptation Effects 0.000 claims description 10
- 238000007781 pre-processing Methods 0.000 claims description 9
- 230000000694 effects Effects 0.000 claims description 7
- 239000011159 matrix material Substances 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 5
- 230000004913 activation Effects 0.000 claims description 4
- 238000010276 construction Methods 0.000 claims description 3
- 238000010606 normalization Methods 0.000 claims description 3
- 238000004891 communication Methods 0.000 claims description 2
- 238000013508 migration Methods 0.000 abstract description 8
- 230000005012 migration Effects 0.000 abstract description 8
- 238000010586 diagram Methods 0.000 description 5
- 230000000306 recurrent effect Effects 0.000 description 5
- 230000007423 decrease Effects 0.000 description 2
- 238000013135 deep learning Methods 0.000 description 2
- 238000013277 forecasting method Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
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
本发明公开了一种短期光伏发电功率预测方法及系统。首先获取目标域光伏发电站以及源域光伏发电站的特征数据,对数据进行预处理后划分出训练数据和测试数据,然后构建GRU‑DANN对抗迁移学习模型并对其进行训练,得到训练好的GRU‑DANN对抗迁移学习模型,最后将测试数据输入至训练好的GRU‑DANN对抗迁移学习模型中,得到目标域光伏发电站的目标功率,并按照时序生成与目标功率对应的功率时间序列。本发明可从多样本光伏发电站的数据中自动提取出建立少样本光伏发电站功率预测模型所需要的特征,实现多样本光伏发电站对少样本光伏发电站的有效迁移,以提高少样本光伏发电站的功率预测精度。
The invention discloses a short-term photovoltaic power generation power prediction method and system. First, the characteristic data of the target domain photovoltaic power station and the source domain photovoltaic power station are obtained, the data is preprocessed and divided into training data and test data, and then the GRU‑DANN adversarial transfer learning model is constructed and trained to obtain the trained GRU-DANN confrontation transfer learning model, and finally input the test data into the trained GRU-DANN confrontation transfer learning model to obtain the target power of the photovoltaic power station in the target domain, and generate the power time series corresponding to the target power according to the time series. The present invention can automatically extract the features required to establish a power prediction model of a few-sample photovoltaic power station from the data of the multi-sample photovoltaic power station, realize the effective migration of the multi-sample photovoltaic power station to the few-sample photovoltaic power station, and improve the efficiency of the few-sample photovoltaic power station. Power prediction accuracy for power plants.
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 technique
太阳能作为一种新能源,其大规模并网给电力系统的经济、安全稳定运行带来了挑战。因此,准确的光伏发电功率预测对电力系统具有重要意义。As a new energy source, the large-scale grid connection of solar energy brings challenges to the economical, safe and stable operation of the power system. Therefore, accurate photovoltaic power generation power prediction is of great significance to the power system.
光伏发电具有随机性、间歇性和波动性的特点,光伏发电的预测模型需要大量的样本数据进行训练仿真。然而,新建光伏发电站由于原始数据匮乏的原因,导致光伏功率预测精度较低。有效地利用多数据光伏发电站来帮助少数据光伏发电站建立光伏功率预测模型,将能够进一步提升风电场功率预测的精度。迄今为止,已有的少数据光伏发电的预测方法均是利用简单的模型迁移或是参数迁移的方式来建立预测模型,这些简单的方法无法从多数据光伏发电站数据中自动提取出建立少数据光伏功率预测模型所需要的特征,容易出现负迁移的现象。Photovoltaic power generation has the characteristics of randomness, intermittency and volatility. The prediction model of photovoltaic power generation requires a large amount of sample data for training and simulation. However, due to the lack of raw data for newly built photovoltaic power stations, the prediction accuracy of photovoltaic power is low. Effective use of multi-data photovoltaic power stations to help low-data photovoltaic power stations to establish a photovoltaic power prediction model will further improve the accuracy of wind farm power prediction. So far, the existing low-data photovoltaic power generation prediction methods are all based on simple model migration or parameter migration to establish the prediction model. These simple methods cannot automatically extract from the multi-data photovoltaic power station data. The features required for photovoltaic power prediction models are prone to negative migration.
因此,如何实现多数据光伏发电站的有效迁移进而建立少数据光伏功率预测模型是一个亟需解决的问题。Therefore, how to realize the effective migration of multi-data photovoltaic power stations and then establish a small-data photovoltaic power prediction model is an urgent problem to be solved.
发明内容SUMMARY OF THE INVENTION
本发明提供了一种短期光伏发电功率预测方法及系统,以源域光伏发电站代表多样本光伏发电站、目标域光伏发电站代表少样板光伏发电站,可从多样本光伏发电站的数据中自动提取出建立少样本光伏发电站功率预测模型所需要的特征,实现多样本光伏发电站对少样本光伏发电站的有效迁移,以提高少样本光伏发电站的功率预测精度。The invention provides a short-term photovoltaic power generation power prediction method and system. The source domain photovoltaic power station represents a multi-sample photovoltaic power station, and the target domain photovoltaic power station represents a few-sample photovoltaic power station. Automatically extract the features required to establish a power prediction model of a few-sample photovoltaic power station, and realize the effective migration of a multi-sample photovoltaic power station to a few-sample photovoltaic power station, so as to improve the power prediction accuracy of the few-sample photovoltaic power station.
本发明的技术方案如下:The technical scheme of the present invention is as follows:
一种短期光伏发电功率预测方法,包括以下步骤:A short-term photovoltaic power generation power prediction method, comprising the following steps:
S1、获取目标域光伏发电站以及源域光伏发电站的特征数据,并进行数据预处理;S1. Obtain the characteristic data of the photovoltaic power station in the target domain and the photovoltaic power station in the source domain, and perform data preprocessing;
S2、将预处理后的目标域光伏发电站的特征数据划分为两部分,一部分与预处理后的源域光伏发电站的特征数据作为训练数据,另一部分作为测试数据;S2. Divide the preprocessed feature data of the target domain photovoltaic power station into two parts, one part and the preprocessed source domain photovoltaic power station feature data are used as training data, and the other part is used as test data;
S3、采用GRU特征提取器、回归预测器以及域分类器构建GRU-DANN对抗迁移学习模型,并输入训练数据对GRU-DANN对抗迁移学习模型进行训练,过程如下:S3. Use the GRU feature extractor, regression predictor and domain classifier to build a GRU-DANN adversarial transfer learning model, and input training data to train the GRU-DANN adversarial transfer learning model. The process is as follows:
S31、利用GRU特征提取器从训练数据中提取初始时间特征;S31, using the GRU feature extractor to extract initial time features from the training data;
S32、将提取的初始时间特征输入至回归预测器中,得到初始时间特征的光伏发电功率预测值,通过光伏发电功率预测值以及光伏发电功率实测值计算回归损失函数,当回归损失函数收敛时,将初始时间特征作为目标时间特征;S32. Input the extracted initial time feature into the regression predictor to obtain the predicted value of photovoltaic power generation of the initial time feature, and calculate the regression loss function by using the predicted value of photovoltaic power generation and the measured value of photovoltaic power generation. When the regression loss function converges, Take the initial time feature as the target time feature;
S33、将目标时间特征输入至域分类器中,通过域分类器确定目标时间特征的数据域来源,通过二进制交叉熵公式计算数据域来源与真实域来源之间的域损失;S33, input the target time feature into the domain classifier, determine the data domain source of the target time feature through the domain classifier, and calculate the domain loss between the data domain source and the real domain source through the binary cross-entropy formula;
S34、根据GRU特征提取器与域分类器的对抗性域适配,不断更新GRU特征提取器及域分类器的参数,当域损失收敛时,GRU特征提取器从源域和目标域之间得到域不变特征,则GRU-DANN对抗迁移学习模型训练完成;S34. According to the adversarial domain adaptation between the GRU feature extractor and the domain classifier, the parameters of the GRU feature extractor and the domain classifier are continuously updated. When the domain loss converges, the GRU feature extractor obtains from the source domain and the target domain. Domain invariant features, the GRU-DANN adversarial transfer learning model training is completed;
S4、将测试数据输入至训练好的GRU-DANN对抗迁移学习模型中,得到目标域光伏发电站的目标功率,并按照时序生成与目标功率对应的功率时间序列。S4. Input the test data into the trained GRU-DANN adversarial transfer learning model, obtain the target power of the photovoltaic power station in the target domain, and generate a power time series corresponding to the target power according to the time series.
本发明的基于门控循环神经网络和域对抗神经网络的短期光伏发电功率预测方法,通过门控循环神经网络(GRU)的特征提取器可以有效的提取源光伏发电站和目标光伏发电站数据中的时间特征,域对抗神经网络(DANN)能够在源域和目标域之间找到有效帮助目标域光伏发电站建立预测模型的域不变特征,本发明可以有效提高光伏发电功率的预测精度。The short-term photovoltaic power generation power prediction method based on the gated recurrent neural network and the domain confrontation neural network of the present invention can effectively extract the source photovoltaic power station and the target photovoltaic power station data through the feature extractor of the gated recurrent neural network (GRU). The domain adversarial neural network (DANN) can find the domain invariant features between the source domain and the target domain that can effectively help the target domain photovoltaic power station to establish a prediction model, and the present invention can effectively improve the prediction accuracy of photovoltaic power generation.
进一步,步骤S1中,特征数据包括功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速的数据;Further, in step S1, the characteristic data includes data of power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed;
对特征数据进行预处理的过程如下:The process of preprocessing feature data is as follows:
对功率、温度、湿度、太阳直接辐射强度、太阳散射强度以及风速数据进行min-max归一化处理,获得处理后的功率序列P、温度序列T、湿度序列H、太阳直接辐射强度序列D、太阳散射强度序列S以及风速序列W。Perform min-max normalization on the power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed data to obtain the processed power sequence P, temperature sequence T, humidity sequence H, and direct solar radiation intensity sequence D, The solar scattering intensity sequence S and the wind speed sequence W.
进一步,步骤S2中,源域光伏发电站预处理后的功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速数据全部作为训练数据,而目标域光伏发电站预处理后的功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速数据则挑选出晴天、阴天、雨天三个不同气象日的数据作为测试数据,其余作为训练数据。Further, in step S2, the preprocessed power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed data of the source domain photovoltaic power station are all used as training data, while the preprocessed power, temperature and wind speed data of the target domain photovoltaic power station are used as training data. , humidity, direct solar radiation intensity, solar scattering intensity and wind speed data, the data of three different meteorological days of sunny, cloudy and rainy days are selected as test data, and the rest are used as training data.
需要说明的是,功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速这6个参数的序列数据在某一时刻的数据形成一个数据串,即不同时刻下,可形成多个数据串,并将该多个数据串形成一个数据集,该数据集即为训练数据或测试数据集的构成形式。It should be noted that the sequence data of the six parameters of power, temperature, humidity, solar direct radiation intensity, solar scattering intensity and wind speed form a data string at a certain moment, that is, at different moments, multiple data strings can be formed. , and the multiple data strings form a data set, which is the form of training data or test data set.
进一步,步骤S3中,GRU-DANN对抗迁移学习模型的构建过程如下:Further, in step S3, the construction process of the GRU-DANN adversarial transfer learning model is as follows:
GRU-DANN对抗迁移学习模型采用GRU特征提取器,并在GRU特征提取器后面分别接入回归预测器和域分类器,其中GRU特征提取器与域分类器中间通过一个梯度反转层连接;The GRU-DANN adversarial transfer learning model uses the GRU feature extractor, and is connected to the regression predictor and the domain classifier after the GRU feature extractor, where the GRU feature extractor and the domain classifier are connected through a gradient reversal layer;
通过输入数据至GRU特征提取器得到时间特征,再将时间特征分别输入至回归预测器与域分类器,得到对应的光伏发电功率预测数据与域标签预测数据。The time features are obtained by inputting data to the GRU feature extractor, and then the time features are input to the regression predictor and the domain classifier respectively to obtain the corresponding photovoltaic power generation power prediction data and domain label prediction data.
进一步,步骤S3中,GRU特征抽取器包括两层GRU层以及激活函数Tanh,两层GRU层分别包括6个神经元和64个神经元;Further, in step S3, the GRU feature extractor includes two GRU layers and an activation function Tanh, and the two GRU layers include 6 neurons and 64 neurons respectively;
回归预测器包括三层全连接层,三层全连接层分别包括100个神经元、100个神经元和1个神经元;The regression predictor includes three fully connected layers, and the three fully connected layers include 100 neurons, 100 neurons and 1 neuron respectively;
域分类器包括两层全连接层,两层全连接层分别包括100个神经元和1个神经元。The domain classifier consists of two fully connected layers with 100 neurons and 1 neuron, respectively.
进一步,步骤S32中,通过光伏发电功率预测值以及光伏发电功率实测值计算回归损失函数的过程如下:Further, in step S32, the process of calculating the regression loss function through the predicted value of photovoltaic power generation and the measured value of photovoltaic power generation is as follows:
发电功率预测的回归损失定义为均方误差,即回归损失函数的公式如下:The regression loss of power generation prediction is defined as the mean square error, that is, the regression loss function The formula is as follows:
式中,表示训练数据的样本数量,和分别表示实测值和预测值。In the formula, represents the number of samples in the training data, and represent the measured and predicted values, respectively.
进一步,在步骤S33中,通过二进制交叉熵公式计算数据域来源与真实域来源之间的域损失的过程如下: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:
域损失定义为二进制交叉熵,二进制交叉熵公式如下:Domain loss is defined as binary cross entropy, and the binary cross entropy formula is as follows:
式中,表示域损失, 和分别表示实际域标签和预测域标签,其中,源域的域标签为0,目标域的域标签为1。In the formula, represents the domain loss, and represent the actual domain label and the predicted domain label, respectively, where the domain label of the source domain is 0 and the domain label of the target domain is 1.
进一步,步骤S34中,更新GRU特征提取器及域分类器的参数的过程如下:Further, in step S34, the process of updating the parameters of the GRU feature extractor and the domain classifier is as follows:
通过训练GRU特征提取器,提取出源域和目标域的特征,再将提取的特征输入到域分类器中,域分类器通过识别提取特征的域标签,区分特征来源于源域或者目标域,通过不断地训练GRU特征提取器提取源域与目标域之间的域不变特征,最终使得域分类器无法正确识别域标签,即无法区分提取的特征来自源域或目标域,此时域损失收敛, GRU特征提取器能够顺利提取出源域与目标域之间的域不变特征,则 GRU特征提取器及域分类器的参数更新完成,表示GRU-DANN对抗迁移学习模型的训练完成。By training the GRU feature extractor, the features of the source domain and the target domain are extracted, and then the extracted features are input into the domain classifier. By continuously training the GRU feature extractor to extract the domain-invariant features between the source domain and the target domain, the domain classifier cannot correctly identify the domain labels, that is, the extracted features cannot be distinguished from the source domain or the target domain. At this time, the domain loss Convergence, the GRU feature extractor can successfully extract the domain invariant features between the source domain and the target domain, then the parameter update of the GRU feature extractor and the domain classifier is completed, indicating that the training of the GRU-DANN adversarial transfer learning model is completed.
进一步,由于GRU特征提取器和域分类器在GRU-DANN对抗迁移学习模型的训练过程中对域损失的影响相反,特征提取器的目的在于使得域分类器无法区分出所提取特征的来源,即使得域损失最大化,而域分类器的目的是为准确区分出GRU特征提取器所提取特征的来源,即使得域损失最小化,这种最小-最大运算不能同时通过神经网络反向传播过程中的梯度更新直接实现,所以在GRU特征提取器和域分类器之间加入梯度反转层(GRL),梯度反转层的作用为将传入到梯度反转层的梯度乘上一个负数,使得在梯度反转层前后的网络的训练目标是相反的,梯度反转层用伪函数来表示,下式表示其正向和反向传播过程:Further, since the GRU feature extractor and the domain classifier have opposite effects on the domain loss during the training process of the GRU-DANN adversarial transfer learning model, the purpose of the feature extractor is to make the domain classifier unable to distinguish the source of the extracted features, even if the The domain loss is maximized, and the purpose of the domain classifier is to accurately distinguish the source of the features extracted by the GRU feature extractor, even if the domain loss is minimized, this min-max operation cannot simultaneously pass through the neural network backpropagation process. The gradient update is directly implemented, so a gradient reversal layer (GRL) is added between the GRU feature extractor and the domain classifier. The function of the gradient reversal layer is to multiply the gradient passed into the gradient reversal layer by a negative number, so that in the The training goals of the network before and after the gradient inversion layer are opposite, and the gradient inversion layer uses a pseudo function to express, the following formula expresses its forward and backward propagation process:
式中,代表单位矩阵,是用于实现回归损失和域损失之间权衡的超参数,代表当前批次数,代表当前迭代数,代表迭代总次数,表示源域和目标域的最小总批次数,为迭代进程相对值,即当前迭代次数与总迭代次数的比率,为常数10。In the formula, represents the identity matrix, are the hyperparameters used to achieve the trade-off between regression loss and domain loss, represents the current batch number, represents the current iteration number, represents the total number of iterations, represents the minimum total number of batches for the source and target domains, is the relative value of the iteration process, that is, the ratio of the current number of iterations to the total number of iterations, is the constant 10.
本发明还提供一种短期光伏发电功率预测系统,包括分别与控制中心通信连接的数据处理模块、构建模型模块、输出模块;The invention also provides a short-term photovoltaic power generation power prediction system, which includes a data processing module, a model building module and an output module respectively connected to the control center in communication;
所述数据处理模块用于获取目标域光伏发电站以及源域光伏发电站的特征数据,并进行数据预处理,然后将预处理后的目标域光伏发电站的特征数据划分为两部分,一部分与预处理后的源域光伏发电站的特征数据作为训练数据,另一部分作为测试数据,并将训练数据和测试数据输送给所述控制中心;The data processing module is used to obtain the characteristic data of the photovoltaic power station in the target domain and the photovoltaic power station in the source domain, perform data preprocessing, and then divide the preprocessed characteristic data of the photovoltaic power station in the target domain into two parts. The preprocessed feature data of the source-domain photovoltaic power station is used as training data, and the other part is used as test data, and the training data and test data are sent to the control center;
所述构建模型模块采用GRU特征提取器、回归预测器以及域分类器构建GRU-DANN对抗迁移学习模型,并从所述控制中心中获取训练数据,输入训练数据对GRU-DANN对抗迁移学习模型进行训练,过程如下:The model building module uses GRU feature extractor, regression predictor and domain classifier to build a GRU-DANN adversarial transfer learning model, and obtains training data from the control center, and inputs the training data to carry out the GRU-DANN adversarial transfer learning model. The training process is as follows:
利用GRU特征提取器从训练数据中提取初始时间特征;Extract initial temporal features from training data using GRU feature extractor;
将提取的初始时间特征输入至回归预测器中,得到初始时间特征的光伏发电功率预测值,通过光伏发电功率预测值以及光伏发电功率实测值计算回归损失函数,当回归损失函数收敛时,将初始时间特征作为目标时间特征;Input the extracted initial time feature into the regression predictor to obtain the predicted value of photovoltaic power generation of the initial time feature, and calculate the regression loss function through the predicted value of photovoltaic power generation power and the measured value of photovoltaic power generation power. When the regression loss function converges, the initial Temporal features as target temporal features;
将目标时间特征输入至域分类器中,通过域分类器确定目标时间特征的数据域来源,通过二进制交叉熵公式计算数据域来源与真实域来源之间的域损失;Input the target time feature into the domain classifier, determine the data domain source of the target time feature through the domain classifier, and calculate the domain loss between the data domain source and the real domain source through the binary cross entropy formula;
根据GRU特征提取器与域分类器的对抗性域适配,不断更新GRU特征提取器及域分类器的参数,当域损失收敛时,GRU特征提取器从源域和目标域之间得到域不变特征,则GRU-DANN对抗迁移学习模型训练完成;According to the adversarial domain adaptation between the GRU feature extractor and the domain classifier, the parameters of the GRU feature extractor and the domain classifier are continuously updated. When the domain loss converges, the GRU feature extractor obtains the domain difference between the source domain and the target domain. If the feature is changed, the GRU-DANN adversarial transfer learning model training is completed;
所述构建模型模块将训练好的GRU-DANN对抗迁移学习模型输出到所述控制中心;The model building module outputs the trained GRU-DANN adversarial transfer learning model to the control center;
所述控制中心将测试数据输入到训练好的GRU-DANN对抗迁移学习模型中,输出得到目标域光伏发电站的目标功率,并按照时序生成与目标功率对应的功率时间序列;The control center inputs the test data into the trained GRU-DANN adversarial transfer learning model, outputs the target power of the photovoltaic power station in the target domain, and generates a power time series corresponding to the target power according to the time sequence;
所述输出模块用于将预测得到的功率时间序列进行输出显示。The output module is used for outputting and displaying the predicted power time series.
与现有技术相比,本发明具有如下有益效果:Compared with the prior art, the present invention has the following beneficial effects:
(1)、本发明提出的短期光伏发电功率预测方法,首次将深度学习和对抗域自适应的方法相结合用于光伏发电功率预测中,所提出的GRU-DANN对抗迁移学习模型可以显著提高光伏发电站发电功率预测性能。(1) The short-term photovoltaic power generation power prediction method proposed by the present invention combines deep learning and adversarial domain adaptation methods for photovoltaic power generation power prediction for the first time. The proposed GRU-DANN adversarial transfer learning model can significantly improve photovoltaic power generation. Predictive power generation performance of power stations.
(2)、本发明的GRU 特征提取器用于跨源域和目标域自动提取时间特征,DANN通过GRU特征提取器和域分类器的对抗性域适配,在源域和目标域之间找到域不变特征,从而完成对GRU-DANN对抗迁移学习模型的训练。本发明实现了多样本光伏发电站数据对少样本光伏发电站数据的有效迁移,训练好的模型可以直接应用于帮助预测目标光伏发电站的发电功率,而不会因域转移而导致预测性能下降,有效提高对少样本光伏发电站的功率预测精度,对短期光伏发电功率预测具有一定的实际意义。(2) The GRU feature extractor of the present invention is used to automatically extract temporal features across the source domain and the target domain. DANN finds the domain between the source domain and the target domain through the adversarial domain adaptation of the GRU feature extractor and the domain classifier. Invariant features, thus completing the training of the GRU-DANN adversarial transfer learning model. The invention realizes the effective migration of the multi-sample photovoltaic power station data to the few-sample photovoltaic power station data, and the trained model can be directly applied to help predict the power generation of the target photovoltaic power station without causing the prediction performance to decline due to domain transfer. , which can effectively improve the power prediction accuracy of few-sample photovoltaic power stations, and has certain practical significance for short-term photovoltaic power generation power prediction.
附图说明Description of drawings
图1为本发明短期光伏发电功率预测方法的流程图。FIG. 1 is a flow chart of the short-term photovoltaic power generation power prediction method of the present invention.
图2为本发明的GRU-DANN对抗迁移学习模型的框架图。FIG. 2 is a frame diagram of the GRU-DANN adversarial transfer learning model of the present invention.
图3为本发明短期光伏发电功率预测系统的框架图。FIG. 3 is a frame diagram of the short-term photovoltaic power generation power prediction system of the present invention.
图4为本发明短期光伏发电功率预测方法对晴天时的预测数据进行预测的效果图。FIG. 4 is an effect diagram of forecasting the forecast data on sunny days by the short-term photovoltaic power generation power forecasting method of the present invention.
图5为本发明短期光伏发电功率预测方法对阴天时的预测数据进行预测的效果图。FIG. 5 is an effect diagram of forecasting the forecast data in cloudy days by the short-term photovoltaic power generation power forecasting method of the present invention.
图6为本发明短期光伏发电功率预测方法对雨天时的预测数据进行预测的效果图。FIG. 6 is an effect diagram of predicting the prediction data in rainy days by the short-term photovoltaic power generation power prediction method of the present invention.
具体实施方式Detailed ways
附图仅用于示例性说明,不能理解为对本专利的限制;为了更好说明本实施例,附图某些部件会有省略、放大或缩小,并不代表实际产品的尺寸;对于本领域技术人员来说,附图中某些公知结构及其说明可能省略是可以理解的。附图中描述位置关系仅用于示例性说明,不能理解为对本专利的限制。The accompanying drawings are for illustrative purposes only, and should not be construed as limitations on this patent; in order to better illustrate the present embodiment, some parts of the accompanying drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product; for those skilled in the art It is understandable to the artisan that certain well-known structures and descriptions thereof may be omitted from the drawings. The positional relationships described in the drawings are only for exemplary illustration, and should not be construed as a limitation on the present patent.
实施例1:Example 1:
如图1和图2所示,本实施例提供一种短期光伏发电功率预测方法,包括以下步骤:As shown in FIG. 1 and FIG. 2 , this embodiment provides a short-term photovoltaic power generation power prediction method, which includes the following steps:
S1、获取目标域光伏发电站以及源域光伏发电站的特征数据,并进行数据预处理;S1. Obtain the characteristic data of the photovoltaic power station in the target domain and the photovoltaic power station in the source domain, and perform data preprocessing;
S2、将预处理后的目标域光伏发电站的特征数据划分为两部分,一部分与预处理后的源域光伏发电站的特征数据作为训练数据,另一部分作为测试数据;S2. Divide the preprocessed feature data of the target domain photovoltaic power station into two parts, one part and the preprocessed source domain photovoltaic power station feature data are used as training data, and the other part is used as test data;
S3、采用GRU特征提取器、回归预测器以及域分类器构建GRU-DANN对抗迁移学习模型,并输入训练数据对GRU-DANN对抗迁移学习模型进行训练,过程如下:S3. Use the GRU feature extractor, regression predictor and domain classifier to build a GRU-DANN adversarial transfer learning model, and input training data to train the GRU-DANN adversarial transfer learning model. The process is as follows:
S31、利用GRU特征提取器从训练数据中提取初始时间特征;S31, using the GRU feature extractor to extract initial time features from the training data;
S32、将提取的初始时间特征输入至回归预测器中,得到初始时间特征的光伏发电功率预测值,通过光伏发电功率预测值以及光伏发电功率实测值计算回归损失函数,当回归损失函数收敛时,将初始时间特征作为目标时间特征;S32. Input the extracted initial time feature into the regression predictor to obtain the predicted value of photovoltaic power generation of the initial time feature, and calculate the regression loss function by using the predicted value of photovoltaic power generation and the measured value of photovoltaic power generation. When the regression loss function converges, Take the initial time feature as the target time feature;
S33、将目标时间特征输入至域分类器中,通过域分类器确定目标时间特征的数据域来源,通过二进制交叉熵公式计算数据域来源与真实域来源之间的域损失;S33, input the target time feature into the domain classifier, determine the data domain source of the target time feature through the domain classifier, and calculate the domain loss between the data domain source and the real domain source through the binary cross-entropy formula;
S34、根据GRU特征提取器与域分类器的对抗性域适配,不断更新GRU特征提取器及域分类器的参数,当域损失收敛时,GRU特征提取器从源域和目标域之间得到域不变特征,则GRU-DANN对抗迁移学习模型训练完成;S34. According to the adversarial domain adaptation between the GRU feature extractor and the domain classifier, the parameters of the GRU feature extractor and the domain classifier are continuously updated. When the domain loss converges, the GRU feature extractor obtains from the source domain and the target domain. Domain invariant features, the GRU-DANN adversarial transfer learning model training is completed;
S4、将测试数据输入至训练好的GRU-DANN对抗迁移学习模型中,得到目标域光伏发电站的目标功率,并按照时序生成与目标功率对应的功率时间序列。S4. Input the test data into the trained GRU-DANN adversarial transfer learning model, obtain the target power of the photovoltaic power station in the target domain, and generate a power time series corresponding to the target power according to the time series.
本发明的基于门控循环神经网络和域对抗神经网络的短期光伏发电功率预测方法,通过门控循环神经网络(GRU)的特征提取器可以有效的提取源光伏发电站和目标光伏发电站数据中的时间特征,域对抗神经网络(DANN)能够在源域和目标域之间找到有效帮助目标域光伏发电站建立预测模型的域不变特征,本发明可以有效提高光伏发电功率的预测精度。The short-term photovoltaic power generation power prediction method based on the gated recurrent neural network and the domain confrontation neural network of the present invention can effectively extract the source photovoltaic power station and the target photovoltaic power station data through the feature extractor of the gated recurrent neural network (GRU). The domain adversarial neural network (DANN) can find the domain invariant features between the source domain and the target domain that can effectively help the target domain photovoltaic power station to establish a prediction model, and the present invention can effectively improve the prediction accuracy of photovoltaic power generation.
在本实施例的步骤S1中,特征数据包括功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速的数据;In step S1 of this embodiment, the characteristic data includes data of power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed;
对特征数据进行预处理的过程如下:The process of preprocessing feature data is as follows:
对功率、温度、湿度、太阳直接辐射强度、太阳散射强度以及风速数据进行min-max归一化处理,获得处理后的功率序列P、温度序列T、湿度序列H、太阳直接辐射强度序列D、太阳散射强度序列S以及风速序列W。Perform min-max normalization on the power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed data to obtain the processed power sequence P, temperature sequence T, humidity sequence H, and direct solar radiation intensity sequence D, The solar scattering intensity sequence S and the wind speed sequence W.
在本实施例的步骤S2中,源域光伏发电站预处理后的功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速数据全部作为训练数据,而目标域光伏发电站预处理后的功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速数据则挑选出晴天、阴天、雨天三个不同气象日的数据作为测试数据,其余作为训练数据。In step S2 of this embodiment, the power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed data preprocessed by the photovoltaic power station in the source domain are all used as training data, while the preprocessed data from the photovoltaic power station in the target domain are all used as training data. For power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed data, the data of three different meteorological days of sunny, cloudy and rainy days are selected as test data, and the rest are used as training data.
需要说明的是,功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速这6个参数的序列数据在某一时刻的数据形成一个数据串,即不同时刻下,可形成多个数据串,并将该多个数据串形成一个数据集,该数据集即为训练数据或测试数据集的构成形式。It should be noted that the sequence data of the six parameters of power, temperature, humidity, solar direct radiation intensity, solar scattering intensity and wind speed form a data string at a certain moment, that is, at different moments, multiple data strings can be formed. , and the multiple data strings form a data set, which is the form of training data or test data set.
其中,训练数据是用于训练GRU-DANN对抗迁移学习模型的数据,GRU-DANN对抗迁移学习模型则为由门控循环神经网络(gate recurrent unit, GRU)特征提取器、回归预测器以及域分类器三者构建的模型,其用于自动提取多数据光伏发电站与少数据光伏发电站的共同特征,帮助少数据光伏发电站预测光伏发电功率。Among them, the training data is the data used to train the GRU-DANN adversarial transfer learning model, and the GRU-DANN adversarial transfer learning model is composed of the gate recurrent unit (GRU) feature extractor, regression predictor and domain classification The model constructed by the three devices is used to automatically extract the common features of the multi-data photovoltaic power station and the less-data photovoltaic power station, and help the less-data photovoltaic power station to predict the photovoltaic power generation.
在本实施例的步骤S3中,GRU-DANN对抗迁移学习模型的构建过程如下:In step S3 of this embodiment, the construction process of the GRU-DANN adversarial transfer learning model is as follows:
GRU-DANN对抗迁移学习模型采用GRU特征提取器,并在GRU特征提取器后面分别接入回归预测器和域分类器,其中GRU特征提取器与域分类器中间通过一个梯度反转层连接;The GRU-DANN adversarial transfer learning model uses the GRU feature extractor, and is connected to the regression predictor and the domain classifier after the GRU feature extractor, where the GRU feature extractor and the domain classifier are connected through a gradient reversal layer;
通过输入数据至GRU特征提取器得到时间特征,再将时间特征分别输入至回归预测器与域分类器,得到对应的光伏发电功率预测数据与域标签预测数据。The time features are obtained by inputting data to the GRU feature extractor, and then the time features are input to the regression predictor and the domain classifier respectively to obtain the corresponding photovoltaic power generation power prediction data and domain label prediction data.
在本实施例的步骤S3中,GRU特征抽取器包括两层GRU层以及激活函数Tanh,两层GRU层分别包括6个神经元和64个神经元;In step S3 of this embodiment, the GRU feature extractor includes two GRU layers and an activation function Tanh, and the two GRU layers include 6 neurons and 64 neurons respectively;
其中激活函数Tanh的公式如下:The formula of the activation function Tanh is as follows:
式中,和为重置门和更新门,为隐含层的状态,和为输入与输出,为上一个输出,、、、、、为权重参数矩阵,、、为偏置参数矩阵,为矩阵乘法,为Sigmod函数;In the formula, and To reset gates and update gates, is the state of the hidden layer, and for input and output, for the previous output, , , , , , is the weight parameter matrix, , , is the bias parameter matrix, for matrix multiplication, is the Sigmod function;
回归预测器包括三层全连接层,三层全连接层分别包括100个神经元、100个神经元和1个神经元;The regression predictor includes three fully connected layers, and the three fully connected layers include 100 neurons, 100 neurons and 1 neuron respectively;
域分类器包括两层全连接层,两层全连接层分别包括100个神经元和1个神经元。The domain classifier consists of two fully connected layers with 100 neurons and 1 neuron, respectively.
在本实施例的步骤S31中,GRU特征提取器从训练数据中分别提取出源域和目标域的初始时间特征;初始时间特征为功率序列P、温度序列T、湿度序列H、太阳直接辐射强度序列D、散射强度序列S以及风速序列W中的隐含数据信息,隐含数据信息指的是与功率相关的信息。In step S31 of this embodiment, the GRU feature extractor extracts the initial time features of the source domain and the target domain respectively from the training data; the initial time features are the power sequence P, the temperature sequence T, the humidity sequence H, and the direct solar radiation intensity. The implicit data information in the sequence D, the scattering intensity sequence S and the wind speed sequence W, the implicit data information refers to the information related to power.
在本实施例的步骤S32中,通过光伏发电功率预测值以及光伏发电功率实测值计算回归损失函数的过程如下:In step S32 of this embodiment, the process of calculating the regression loss function through the predicted value of photovoltaic power generation and the measured value of photovoltaic power generation is as follows:
发电功率预测的回归损失定义为均方误差,即回归损失函数的公式如下:The regression loss of power generation prediction is defined as the mean square error, that is, the regression loss function The formula is as follows:
式中,表示训练数据的样本数量,和分别表示实测值和预测值。In the formula, represents the number of samples in the training data, and represent the measured and predicted values, respectively.
在本实施例的步骤S33中,通过二进制交叉熵公式计算数据域来源与真实域来源之间的域损失的过程如下:In step S33 of the present embodiment, 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:
域损失定义为二进制交叉熵,二进制交叉熵公式如下:Domain loss is defined as binary cross entropy, and the binary cross entropy formula is as follows:
式中,表示域损失, 和分别表示实际域标签和预测域标签,其中,源域的域标签为0,目标域的域标签为1。In the formula, represents the domain loss, and represent the actual domain label and the predicted domain label, respectively, where the domain label of the source domain is 0 and the domain label of the target domain is 1.
在本实施例的步骤S34中,更新GRU特征提取器及域分类器的参数的过程如下:In step S34 of this embodiment, the process of updating the parameters of the GRU feature extractor and the domain classifier is as follows:
通过训练GRU特征提取器,提取出源域和目标域的特征,再将提取的特征输入到域分类器中,域分类器通过识别提取特征的域标签,区分特征来源于源域或者目标域,通过不断地训练GRU特征提取器提取源域与目标域之间的域不变特征,最终使得域分类器无法正确识别域标签,即无法区分提取的特征来自源域或目标域,此时域损失收敛, GRU特征提取器能够顺利提取出源域与目标域之间的域不变特征,则 GRU特征提取器及域分类器的参数更新完成,表示GRU-DANN对抗迁移学习模型的训练完成。By training the GRU feature extractor, the features of the source domain and the target domain are extracted, and then the extracted features are input into the domain classifier. By continuously training the GRU feature extractor to extract the domain-invariant features between the source domain and the target domain, the domain classifier cannot correctly identify the domain labels, that is, the extracted features cannot be distinguished from the source domain or the target domain. At this time, the domain loss Convergence, the GRU feature extractor can successfully extract the domain invariant features between the source domain and the target domain, then the parameter update of the GRU feature extractor and the domain classifier is completed, indicating that the training of the GRU-DANN adversarial transfer learning model is completed.
其中,由于GRU特征提取器和域分类器在GRU-DANN对抗迁移学习模型的训练过程中对域损失的影响相反,特征提取器的目的在于使得域分类器无法区分出所提取特征的来源,即使得域损失最大化,而域分类器的目的是为准确区分出GRU特征提取器所提取特征的来源,即使得域损失最小化,这种最小-最大运算不能同时通过神经网络反向传播过程中的梯度更新直接实现,所以在GRU特征提取器和域分类器之间加入梯度反转层(GRL),梯度反转层的作用为将传入到梯度反转层的梯度乘上一个负数,使得在梯度反转层前后的网络的训练目标是相反的,梯度反转层用伪函数来表示,下式表示其正向和反向传播过程:Among them, since the GRU feature extractor and the domain classifier have opposite effects on the domain loss during the training process of the GRU-DANN adversarial transfer learning model, the purpose of the feature extractor is to make the domain classifier unable to distinguish the source of the extracted features, even if the The domain loss is maximized, and the purpose of the domain classifier is to accurately distinguish the source of the features extracted by the GRU feature extractor, even if the domain loss is minimized, this min-max operation cannot simultaneously pass through the neural network backpropagation process. The gradient update is directly implemented, so a gradient reversal layer (GRL) is added between the GRU feature extractor and the domain classifier. The function of the gradient reversal layer is to multiply the gradient passed into the gradient reversal layer by a negative number, so that in the The training goals of the network before and after the gradient inversion layer are opposite, and the gradient inversion layer uses a pseudo function to express, the following formula expresses its forward and backward propagation process:
式中,代表单位矩阵,是用于实现回归损失和域损失之间权衡的超参数,代表当前批次数,代表当前迭代数,代表迭代总次数,表示源域和目标域的最小总批次数,为迭代进程相对值,即当前迭代次数与总迭代次数的比率,为常数10。In the formula, represents the identity matrix, are the hyperparameters used to achieve the trade-off between regression loss and domain loss, represents the current batch number, represents the current iteration number, represents the total number of iterations, represents the minimum total number of batches for the source and target domains, is the relative value of the iteration process, that is, the ratio of the current number of iterations to the total number of iterations, is the constant 10.
本发明提出的短期光伏发电功率预测方法,首次将深度学习和对抗域自适应的方法相结合用于光伏发电功率预测中,所提出的GRU-DANN对抗迁移学习模型可以显著提高光伏发电站发电功率预测性能。The short-term photovoltaic power generation power prediction method proposed by the present invention combines deep learning and adversarial domain adaptation methods for photovoltaic power generation power prediction for the first time. The proposed GRU-DANN confrontation transfer learning model can significantly improve the power generation power of photovoltaic power stations. Predictive performance.
实施例2:Example 2:
如图3所示,本实施例还提供一种短期光伏发电功率预测系统,用于实现上述实施例1中的短期光伏发电功率预测方法,系统包括分别与控制中心通信连接的数据处理模块、构建模型模块、输出模块;As shown in FIG. 3 , this embodiment also provides a short-term photovoltaic power generation power prediction system, which is used to realize the short-term photovoltaic power generation power prediction method in the above-mentioned embodiment 1. Model module, output module;
所述数据处理模块用于获取目标域光伏发电站以及源域光伏发电站的特征数据,并进行数据预处理,然后将预处理后的目标域光伏发电站的特征数据划分为两部分,一部分与预处理后的源域光伏发电站的特征数据作为训练数据,另一部分作为测试数据,并将训练数据和测试数据输送给所述控制中心;The data processing module is used to obtain the characteristic data of the photovoltaic power station in the target domain and the photovoltaic power station in the source domain, perform data preprocessing, and then divide the preprocessed characteristic data of the photovoltaic power station in the target domain into two parts. The preprocessed feature data of the source-domain photovoltaic power station is used as training data, and the other part is used as test data, and the training data and test data are sent to the control center;
所述构建模型模块采用GRU特征提取器、回归预测器以及域分类器构建GRU-DANN对抗迁移学习模型,并从所述控制中心中获取训练数据,输入训练数据对GRU-DANN对抗迁移学习模型进行训练,过程如下:The model building module uses GRU feature extractor, regression predictor and domain classifier to build a GRU-DANN adversarial transfer learning model, and obtains training data from the control center, and inputs the training data to carry out the GRU-DANN adversarial transfer learning model. The training process is as follows:
利用GRU特征提取器从训练数据中提取初始时间特征;Extract initial temporal features from training data using GRU feature extractor;
将提取的初始时间特征输入至回归预测器中,得到初始时间特征的光伏发电功率预测值,通过光伏发电功率预测值以及光伏发电功率实测值计算回归损失函数,当回归损失函数收敛时,将初始时间特征作为目标时间特征;Input the extracted initial time feature into the regression predictor to obtain the predicted value of photovoltaic power generation of the initial time feature, and calculate the regression loss function through the predicted value of photovoltaic power generation power and the measured value of photovoltaic power generation power. When the regression loss function converges, the initial Temporal features as target temporal features;
将目标时间特征输入至域分类器中,通过域分类器确定目标时间特征的数据域来源,通过二进制交叉熵公式计算数据域来源与真实域来源之间的域损失;Input the target time feature into the domain classifier, determine the data domain source of the target time feature through the domain classifier, and calculate the domain loss between the data domain source and the real domain source through the binary cross entropy formula;
根据GRU特征提取器与域分类器的对抗性域适配,不断更新GRU特征提取器及域分类器的参数,当域损失收敛时,GRU特征提取器从源域和目标域之间得到域不变特征,则GRU-DANN对抗迁移学习模型训练完成;According to the adversarial domain adaptation between the GRU feature extractor and the domain classifier, the parameters of the GRU feature extractor and the domain classifier are continuously updated. When the domain loss converges, the GRU feature extractor obtains the domain difference between the source domain and the target domain. If the feature is changed, the GRU-DANN adversarial transfer learning model training is completed;
所述构建模型模块将训练好的GRU-DANN对抗迁移学习模型输出到所述控制中心;The model building module outputs the trained GRU-DANN adversarial transfer learning model to the control center;
所述控制中心将测试数据输入到训练好的GRU-DANN对抗迁移学习模型中,输出得到目标域光伏发电站的目标功率,并按照时序生成与目标功率对应的功率时间序列;The control center inputs the test data into the trained GRU-DANN adversarial transfer learning model, outputs the target power of the photovoltaic power station in the target domain, and generates a power time series corresponding to the target power according to the time sequence;
所述输出模块用于将预测得到的功率时间序列进行输出显示。The output module is used for outputting and displaying the predicted power time series.
实施例3:Example 3:
本实施例以具体数据验证上述实施例1中的短期光伏发电功率预测方法的有效性,具体过程如下:This embodiment uses specific data to verify the validity of the short-term photovoltaic power generation power prediction method in the above-mentioned embodiment 1, and the specific process is as follows:
在步骤S1中,获取澳大利亚2018/01/01/0:00~2018/12/29/23:40的三个光伏发电站的功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速数据作为源域光伏发电站的特征数据,获取同一澳大利亚时间段内的另一个光伏发电站的功率、温度、湿度、太阳直接辐射强度、太阳散射强度和风速数据作为目标域光伏发电站的特征数据;In step S1, the power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed data of the three photovoltaic power stations in Australia from 2018/01/01/0:00 to 2018/12/29/23:40 are obtained As the characteristic data of the photovoltaic power station in the source domain, obtain the power, temperature, humidity, direct solar radiation intensity, solar scattering intensity and wind speed data of another photovoltaic power station in the same Australian time period as the characteristic data of the photovoltaic power station in the target domain;
在步骤S2中,按实施例1中方式对数据进行处理,划分出训练数据和测试数据;In step S2, the data is processed according to the method in Embodiment 1, and training data and test data are divided;
在步骤S3中,按上述获取的训练数据对GRU-DANN对抗迁移学习模型进行训练,得到训练好的GRU-DANN对抗迁移学习模型;In step S3, the GRU-DANN confrontation transfer learning model is trained according to the training data obtained above, and the trained GRU-DANN confrontation transfer learning model is obtained;
在步骤S4中,将测试数据输入至训练好的GRU-DANN对抗迁移学习模型中,得到目标域光伏发电站的目标功率,并按照时序生成与目标功率对应的功率时间序列;In step S4, the test data is input into the trained GRU-DANN adversarial transfer learning model, the target power of the photovoltaic power station in the target domain is obtained, and the power time series corresponding to the target power is generated according to the time sequence;
其中,输出的目标功率为每20分钟一个功率预测点,按照一天72个功率预测点生成72×1张量的光伏功率时间序列。Among them, the output target power is a power prediction point every 20 minutes, and a 72×1 tensor photovoltaic power time series is generated according to 72 power prediction points in a day.
如图4-图6所示,在本实施例中,分别获得输出目标域光伏发电站在晴天、阴天及雨天时的功率预测效果。可知,本发明有效提高了对少样本光伏发电站的功率预测精度。As shown in FIG. 4-FIG. 6, in this embodiment, the power prediction effects of the photovoltaic power station in the output target domain in sunny days, cloudy days and rainy days are obtained respectively. It can be seen that the present invention effectively improves the power prediction accuracy of a few-sample photovoltaic power station.
综上所述,本发明的GRU 特征提取器用于跨源域和目标域自动提取时间特征,DANN通过GRU特征提取器和域分类器的对抗性域适配,在源域和目标域之间找到域不变特征,从而完成对GRU-DANN对抗迁移学习模型的训练。To sum up, the GRU feature extractor of the present invention is used to automatically extract temporal features across the source domain and the target domain, and DANN finds between the source domain and the target domain through the adversarial domain adaptation of the GRU feature extractor and the domain classifier. Domain invariant features, thus completing the training of the GRU-DANN adversarial transfer learning model.
本发明实现了多样本光伏发电站数据对少样本光伏发电站数据的有效迁移,训练好的模型可以直接应用于帮助预测目标光伏发电站的发电功率,而不会因域转移而导致预测性能下降,有效提高对少样本光伏发电站的功率预测精度,对短期光伏发电功率预测具有一定的实际意义。The invention realizes the effective migration of the multi-sample photovoltaic power station data to the few-sample photovoltaic power station data, and the trained model can be directly applied to help predict the power generation of the target photovoltaic power station without causing the prediction performance to decline due to domain transfer. , which can effectively improve the power prediction accuracy of few-sample photovoltaic power stations, and has certain practical significance for short-term photovoltaic power generation power prediction.
显然,本发明的上述实施例仅是为清楚地说明本发明所作的举例,而并非是对本发明的实施方式的限定。对于所属领域的普通技术人员来说,在上述说明的基础上还可以做出其它不同形式的变化或变动。这里无需也无法对所有的实施方式予以穷举。凡在本发明的精神和原则之内所作的任何修改、等同替换和改进等,均应包含在本发明权利要求的保护范围之内。Obviously, the above-mentioned embodiments of the present invention are only examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those of ordinary skill in the art, changes or modifications in other different forms can also be made on the basis of the above description. There is no need and cannot be exhaustive of all implementations here. Any modifications, equivalent replacements and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the claims of the present invention.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202211075827.XA CN115169544A (en) | 2022-09-05 | 2022-09-05 | A 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 | A 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 | A 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 | 广东工业大学 | A machine tool thermal error modeling method and system based on deep domain adversarial migration |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN114626512B (en) | A high temperature disaster prediction method based on directed graph neural network | |
Wang et al. | Photovoltaic cell parameter estimation based on improved equilibrium optimizer algorithm | |
Li et al. | Interpretable memristive LSTM network design for probabilistic residential load forecasting | |
CN110059878A (en) | Based on CNN LSTM photovoltaic power generation power prediction model and its construction method | |
Yuan et al. | Parameter extraction of solar cell models using chaotic asexual reproduction optimization | |
CN109711617B (en) | Medium-and-long-term runoff prediction method based on BLSTM deep learning | |
CN109583565B (en) | Flood prediction method based on attention model long-time and short-time memory network | |
CN112100911B (en) | A Solar Radiation Prediction Method Based on Deep BILSTM | |
CN103106544B (en) | A kind of photovoltaic generation prognoses system based on T-S Fuzzy neutral net | |
CN115347571B (en) | Photovoltaic power generation short-term prediction method and device based on transfer learning | |
CN104636985A (en) | Method for predicting radio disturbance of electric transmission line by using improved BP (back propagation) neural network | |
CN104978613A (en) | Short-period forecasting method for photovoltaic output in consideration of assembly temperature | |
CN108985515A (en) | A kind of new energy based on independent loops neural network goes out force prediction method and system | |
CN114462718A (en) | CNN-GRU wind power prediction method based on time sliding window | |
CN116526473A (en) | Electric heating load forecasting method based on particle swarm optimization LSTM | |
CN116345555A (en) | A Short-Term Photovoltaic Power Forecasting Method Based on CNN-ISCA-LSTM Model | |
CN115169543A (en) | A short-term photovoltaic power prediction method and system based on transfer learning | |
CN108985323A (en) | A kind of short term prediction method of photovoltaic power | |
Wang et al. | An approach for day-ahead interval forecasting of photovoltaic power: A novel DCGAN and LSTM based quantile regression modeling method | |
CN116930609A (en) | Electric energy metering error analysis method based on ResNet-LSTM model | |
CN116937565A (en) | Distributed photovoltaic power generation power prediction method, system, equipment and medium | |
CN117407802A (en) | Runoff prediction method based on improved depth forest model | |
CN115169544A (en) | A short-term photovoltaic power generation power prediction method and system | |
CN116894504A (en) | A method for establishing a wind power cluster power ultra-short-term prediction model | |
CN110826810A (en) | A regional rainfall prediction method combining spatial reasoning and machine learning |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20221011 |