Photovoltaic power prediction method based on multi-scale convolutional recurrent neural network
By introducing a multi-scale convolutional recurrent neural network into photovoltaic power prediction, capturing the correlation characteristics of different scales, the problem of low prediction accuracy of photovoltaic power generation in the existing technology is solved, and higher prediction accuracy and accuracy are achieved.
Patent Information
- Application Number
- CN202111021128.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-01
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2041-09-01
AI Technical Summary
The prior art is difficult to accurately capture the long-term dependence of photovoltaic power generation power and the timing importance between factors, resulting in low prediction accuracy of photovoltaic power generation power.
Using a multi-scale convolutional recurrent neural network method, a photovoltaic power prediction model including multi-scale convolutional layer, bidirectional GRU layer and fully connected layer is used to capture different scales using meteorological data such as irradiation intensity, temperature, and humidity. and predict the correlation characteristics of .
The accuracy and accuracy of photovoltaic power generation prediction are improved, and the prediction effect is better compared with traditional methods and deep learning methods.
Smart Images

Figure CN113642255B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of photovoltaic power generation prediction, and in particular relates to a photovoltaic power generation prediction method based on a multi-scale convolutional recurrent neural network. Background Art
[0002] Photovoltaic power output has obvious intermittent fluctuation characteristics, and large-scale photovoltaic power generation access will bring certain impacts to the safe and stable operation of the power grid. As the proportion of renewable energy such as wind power and photovoltaic power increases in various regions, the phenomenon of wind and solar power abandonment has further increased.
[0003] Photovoltaic power generation prediction is one of the key technologies to solve this problem. The research on photovoltaic power station power generation prediction method and system has important academic and application value. Therefore, how to accurately predict the power of photovoltaic power stations has become a research hotspot in recent years and has been favored by scholars at home and abroad.
[0004] At present, the prediction accuracy of photovoltaic power generation is still insufficient. Traditional machine learning methods have difficulty in capturing long-term dependencies, and the time series importance of various factors is not well obtained. Recently, some scholars have used deep learning methods to predict photovoltaic power generation and achieved good results. However, both traditional machine learning methods and the more popular deep learning methods in recent years have not captured the correlation characteristics between various factors in terms of time series, and the prediction accuracy is not ideal. Summary of the invention
[0005] In view of this, in order to solve the problem of accurate prediction of photovoltaic power generation, the purpose of the present invention is to provide a photovoltaic power generation prediction method based on a multi-scale convolutional recurrent neural network. The method provides a method with higher prediction accuracy and precision by utilizing meteorological data such as irradiation intensity, temperature, humidity, air pressure, altitude, etc., to predict photovoltaic power generation conditions.
[0006] Based on the above purpose, a photovoltaic power generation prediction method based on a multi-scale convolutional recurrent neural network is proposed, which includes the following steps:
[0007] Step 1, constructing a photovoltaic power generation prediction model based on a multi-scale convolutional recurrent neural network;
[0008] Step 2, using training set data to train the photovoltaic power generation prediction model, wherein the training set data includes influencing factor data and known photovoltaic power generation data;
[0009] Step 3: Input the test set data into the trained photovoltaic power prediction model to calculate the predicted value of photovoltaic power.
[0010] Specifically, the photovoltaic power prediction model includes a first convolutional layer, a first bidirectional GRU layer, a first multi-scale convolutional layer, a second bidirectional GRU layer, a second multi-scale convolutional layer, a first fully connected layer, and a second fully connected layer. These layers are sequentially connected in order. The outputs of the first convolutional layer and the first bidirectional GRU layer are connected and simultaneously serve as the inputs to the first multi-scale convolutional layer and the second multi-scale convolutional layer. The bidirectional GRU layer is formed by paralleling a forward GRU model and a backward GRU model to form a bidirectional structure. The bidirectional GRU layer outputs two merged GRU signals. The output layer of the first fully connected layer is 100, and the output layer of the second fully connected layer is 1. In the photovoltaic power prediction model, the input of the first convolutional layer is the influencing factor data sequence, and the output of the second fully connected layer is the photovoltaic power value.
[0011] Specifically, for the photovoltaic power prediction model x 0 ,..., x T is the influencing factor sequence data, (y 0 ,..., y K ), K < T is the known photovoltaic power value, (y K+1 ,..., y T ) is the photovoltaic power value to be predicted. is the corresponding estimated value. The input is x 0 ,..., x T , y 0 ,..., y K variables, which are sequentially input into the photovoltaic power prediction model to start training. The loss function uses the standard normalized MSE, and the activation function uses the Relu function.
[0012] Specifically, the analytical expression of the photovoltaic power prediction model is as follows:
[0013]
[0014]
[0015]
[0016]
[0017]
[0018]
[0019] C 4 t = η 2 ([C 2t ,C 3 t ])
[0020]
[0021] Among them, x t is the input of the model at time t, η 1 (·) and η 2 (·) is two convolution operations, [·,·] is a merge connection operation, MutiScalConv(·, Scale1) and MutiScalConv(·, Scale2) are two multi-scale convolution operations with scales of Scale1 and Scale2 respectively. The specific process of fused convolution is as follows:
[0022] The first convolutional layer η 1 (x t ) accepts sequence data x t The input is It is also used as the input of the first and second multi-scale convolutional layers;
[0023] is the output of the first bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the first bidirectional GRU layer. And add the offset vector Result;
[0024] Will With η 1 (x t ) Merge into P t 1 , as the input of the first multi-scale convolutional layer;
[0025] It is the output of the first multi-scale convolutional layer with scale 1, connected to the second bidirectional GRU layer;
[0026] is the output of the second bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the second bidirectional GRU layer And add the offset vector Result;
[0027] By analogy, we can get Through a convolution operation with a scale of Scale2, [C 2 t ,C 3 t ] is extracted so that the scale information that is more important to the target can be retained and the output is obtained. After the full connection operation, the output O is obtained t ;
[0028] in, and All of them are acquired through learning and training.
[0029] Specifically, the bidirectional GRU layer is a bidirectional structure formed by connecting the forward GRU and the backward GRU models. The output of the first layer forget gate in the forward GRU is: 1 t =σ(W 1 f [H 1 t-1 ,x” t ]+B 1 f ),σ(x)=1 / (1+e -x ), in the forward GRU update gate, the first output is: z 1 t =σ(W 1 z [H 1 t-1 ,x” t ]+B 1 z ), the second output is: Similarly, the corresponding first output of the backward GRU is: z 2 t =σ(W 2 z [H 2 t-1 ,x” t ]+B 2 z ), the second output: Intermediate output of the forward GRU And the intermediate output of the backward GRU By aggregating the intermediate outputs, we get the output Indicates that the output of the forward GRU With the backward GRU output Merge the connection as the output of the bidirectional GRU layer is the input of the bidirectional GRU layer, [W 1 f ,B 1 f ],[W 1 Z ,B 1 Z ],[W 1 h ,B 1 h ] is the forward GRU model parameter, [W 2 f ,B 2 f ],[W 2 Z ,B 2 Z ],[W 2 h ,B 2 h ] is the reverse GRU model parameter, [W 12 o ,B 12 o ] are the output layer parameters. is the output of the first bidirectional GRU layer, corresponding to, is the output of the second bidirectional GRU layer.
[0030] Preferably, the convolutional layer is a 1-dimensional convolutional network.
[0031] Specifically, the influencing factor data include radiation intensity, temperature, humidity and air pressure.
[0032] The photovoltaic power prediction model in the method of the present invention mainly includes a multi-scale convolution layer, a bidirectional GRU layer and a fully connected layer. The multi-scale convolution layer is introduced into the recurrent neural network, and the improved multiple attention units are connected in series to distribute the attention mechanism at different scales, so that the model can collect historical information from different scales and distinguish the influence of different input elements on the prediction results. The bidirectional GRU layer can more fully obtain the context information of the sequence data on the basis of GRU. The whole model adopts a convolution structure to fuse the recognition outputs of the attention mechanisms of different scales, and screens and identifies the outputs of different scales through convolution connections, so that the scale information that is more important to the target can be retained, thereby obtaining better accuracy for the prediction of photovoltaic power. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 It is a schematic diagram of the process of the present invention;
[0034] Figure 2Data processing flowchart of the method of the present invention;
[0035] Figure 3 Schematic diagram of the 1D convolutional network in the present invention. Detailed implementation manners
[0036] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0037] As Figure 1 shown, a photovoltaic power prediction method based on a multi-scale convolutional recurrent neural network is proposed, including the following steps:
[0038] Step 1, construct a photovoltaic power prediction model based on a multi-scale convolutional recurrent neural network;
[0039] Step 2, use the training set data to train the photovoltaic power prediction model, and the training set data includes influencing factor data and known photovoltaic power data;
[0040] Step 3, input the test set data into the trained photovoltaic power prediction model, and calculate to obtain the predicted value of the photovoltaic power.
[0041] Specifically, the photovoltaic power prediction model includes a first convolutional layer, a first bidirectional GRU layer, a first multi-scale convolutional layer, a second bidirectional GRU layer, a second multi-scale convolutional layer, a first fully connected layer, and a second fully connected layer. Each layer is sequentially connected in order. The output of the first convolutional layer and the output of the first bidirectional GRU layer are connected and simultaneously used as the input of the first multi-scale convolutional layer and the second multi-scale convolutional layer. The bidirectional GRU layer is formed by paralleling a forward GRU model and a backward GRU model to form a bidirectional structure. The bidirectional GRU layer outputs two merged GRU signals. The output layer of the first fully connected layer is 100, and the output layer of the second fully connected layer is 1. The input of the first convolutional layer in the photovoltaic power prediction model is the influencing factor data sequence, and the output of the fully connected layer is the photovoltaic power value.
[0042] Specifically, for the photovoltaic power prediction model is x 0 ,...,x T is the influencing factor sequence data, (y 0 ,...,y K ), K < T is the known photovoltaic power value, (y K+1,...,y T ) is the photovoltaic power value to be predicted, is the corresponding estimated value, input is x 0 ,...,x T ,y 0 ,...,y K The variables are sequentially input into the photovoltaic power prediction model to start training. The loss function uses the standard normalized MSE, and the activation function uses the Relu function.
[0043] Specifically, the analytical expression of the photovoltaic power generation prediction model is as follows:
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050] C 4 t =η 2 ([C 2 t ,C 3 t ])
[0051]
[0052] Among them, x t is the input of the model at time t, η 1 (·) and η 2 (·) is two convolution operations, [·,·] is a merge connection operation, MutiScalConv(·, Scale1) and MutiScalConv(·, Scale2) are two multi-scale convolution operations with scales of Scale1 and Scale2 respectively. The specific process of fused convolution is as follows:
[0053] The first convolutional layer η 1 (x t ) accepts sequence data x t The input is It is also used as the input of the first and second multi-scale convolutional layers;
[0054] is the output of the first bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the first bidirectional GRU layer And add the offset vector Result;
[0055] Will With η 1 (x t ) Merge into P t 1 , as the input of the first multi-scale convolutional layer;
[0056] It is the output of the first multi-scale convolutional layer with scale 1, connected to the second bidirectional GRU layer;
[0057] is the output of the second bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the second bidirectional GRU layer And add the offset vector Result;
[0058] By analogy, we can get Through a convolution operation with a scale of Scale2, [C 2 t ,C 3 t ] is extracted so that the scale information that is more important to the target can be retained and the output is obtained. After the full connection operation, the output O is obtained t ; The data processing flow of the method of the present invention is as follows Figure 2 As shown;
[0059] in, and All of them are acquired through learning and training.
[0060] Specifically, the bidirectional GRU layer is a bidirectional structure formed by connecting the forward GRU and the backward GRU models. The output of the first layer forget gate in the forward GRU is: 1 t =σ(W 1 f [H 1t-1 ,x” t ]+B 1 f ),σ(x)=1 / (1+e -x ), in the forward GRU update gate, the first output is: z 1 t =σ(W 1 z [H 1 t-1 ,x” t ]+B 1 z ), the second output is: Similarly, the corresponding first output of the backward GRU is: z 2 t =σ(W 2 z [H 2 t-1 ,x” t ]+B 2 z ), the second output: Intermediate output of the forward GRU And the intermediate output H of the backward GRU 2 t =(1-z 2 t )·h 2 i-1 +h 2 t ·z 2 t , through the aggregation operation of the intermediate output, the output is obtained Indicates that the output of the forward GRU With the backward GRU output Merge the connection as the output of the bidirectional GRU layer x” t is the input of the bidirectional GRU layer, [W 1 f ,B 1 f ],[W 1 Z ,B 1 Z ],[W 1 h ,B 1 h ] is the forward GRU model parameter, [W 2 f ,B 2 f ],[W 2Z ,B 2 Z ],[W 2 h ,B 2 h ] is the reverse GRU model parameter, [W 12 o ,B 12 o ] are the output layer parameters. is the output of the first bidirectional GRU layer, corresponding to, is the output of the second bidirectional GRU layer.
[0061] Preferably, the convolutional layer is a 1-dimensional convolutional network.
[0062] Specifically, the influencing factor data include radiation intensity, temperature, humidity and air pressure.
[0063] Preferably, the convolution layer is a 1D convolutional network. Convolutional neural networks generally include 1D convolution, 2D convolution and 3D convolutional networks. 1D convolutional networks are mainly used for sequence data, such as audio data, equipment maintenance sampling data, etc. 2D convolution is mainly used for image processing, such as image classification, target recognition, image segmentation, etc. 3D convolutional networks are mainly used for video processing, such as medical imaging video, motion detection, etc. In this embodiment, time series data is mainly analyzed, and the results of 1D convolutional networks are used. Typical 1D convolutional network results are as follows: Figure 3 As shown in FIG. 1 , it contains a one-dimensional convolution kernel vector, a filter size k=4, and a convolution interval (dilation factors) d=1.
[0064] For the element s that currently needs to be convolved, the mathematical expression of the one-dimensional convolution operation is:
[0065] Where f(i) represents the convolution kernel function, X s-d·i It means taking sample values with an interval of d forward.
[0066] In order to better demonstrate the details of this embodiment, this embodiment provides an experiment to illustrate the effect. The data used in this invention is the measured data from a foreign photovoltaic power generation company. Data is collected once every hour, and ten hours of data are collected every day. The experimental data of this embodiment includes 3000 sets of data for 300 days, of which 2900 sets of data are used for classification training and 100 sets of data are used as test data.
[0067] The experimental background adopted in this embodiment is: the main configuration of the computer is: Pentium (R) Dual-core 3.06 CPU, 8G RAM memory.
[0068] Effect evaluation: The parameters used in this embodiment to evaluate the performance of the method include RMSE, MAE, MAPE and CC:
[0069] RMSE (Root Mean Square Error) is calculated as follows:
[0070]
[0071] MAE (Mean Absolutely Error) is calculated as follows:
[0072]
[0073] MAPE (Mean Absolutely Percentage Error) is calculated as follows:
[0074]
[0075] R2 (coefficient of Determination), coefficient of determination, is calculated as follows:
[0076]
[0077] It should be noted that RMSE, MAE and MAPE are all measures of prediction errors. The smaller the value, the more accurate it is. The R2 parameter represents the coefficient of determination of the two sequence quantities. The larger the value, the more correlated the two sequence data are and the better the prediction effect.
[0078] Experiments were conducted on the above data, and the prediction accuracy of photovoltaic power generation was obtained as shown in Table 1.
[0079] Table 1: Prediction results of different algorithms
[0080]
[0081] It can be seen from the results that the method of the present invention has better accuracy than other recurrent neural network models.
[0082] It can be seen from the content of the invention and the embodiments that the photovoltaic power prediction model in the method of the present invention mainly includes a multi-scale convolution layer, a bidirectional GRU layer and a fully connected layer. The multi-scale convolution layer is introduced into the recurrent neural network, and the improved multiple attention units are connected in series and in a skip connection manner. The attention mechanism is distributed at different scales, so that the model can collect historical information from different scales and distinguish the influence of different input elements on the prediction results. The bidirectional GRU layer can more fully obtain the context information of the sequence data on the basis of GRU. The entire model adopts a convolution structure to fuse the recognition outputs of the attention mechanisms of different scales, and screens and identifies the outputs of different scales through convolution connections, so that those scale information that is more important to the target can be retained, thereby obtaining better accuracy for the prediction of photovoltaic power generation.
Claims
1. A photovoltaic power generation prediction method based on a multi-scale convolutional recurrent neural network, characterized in that: The following steps are involved: Step 1, constructing a photovoltaic power generation prediction model based on a multi-scale convolutional recurrent neural network; Step 2, using training set data to train the photovoltaic power generation prediction model, wherein the training set data includes influencing factor data and known photovoltaic power generation data; Step 3, input the test set data into the trained photovoltaic power prediction model to calculate the predicted value of photovoltaic power; The photovoltaic power prediction model includes a first convolution layer, a first bidirectional GRU layer, a first multi-scale convolution layer, a second bidirectional GRU layer, a second multi-scale convolution layer, a first fully connected layer, and a second fully connected layer. The layers are connected in sequence. The output of the first convolution layer and the output of the first bidirectional GRU layer are connected and used as the input of the first multi-scale convolution layer and the second multi-scale convolution layer at the same time. The bidirectional GRU layer is a forward GRU model and a backward GRU model connected in parallel to form a bidirectional structure. The bidirectional GRU layer outputs two merged GRU signals. The output layer of the first fully connected layer is 100, and the output layer of the second fully connected layer is 1. The input of the first convolution layer in the photovoltaic power prediction model is an influencing factor data sequence, and the output of the second fully connected layer is a photovoltaic power value. The analytical expression of the photovoltaic power generation prediction model is as follows: C 4 t =η 2 ([C 2 t ,C 3 t ]) Among them, x t is the input of the model at time t, η 1 (·) and η 2 (·) is two convolution operations, [·,·] is a merge connection operation, MutiScalConv(·,Scale1) and MutiScalConv(·,Scale2) are two multi-scale convolution operations with scales of Scale1 and Scale2 respectively. The specific process of fused convolution is as follows: The first convolutional layer η 1 (x t ) accepts sequence data x t The input is It is also used as the input of the first and second multi-scale convolutional layers; is the output of the first bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the first bidirectional GRU layer And add the offset vector Result; Will With η 1 (x t ) Merge into P t 1 , as the input of the first multi-scale convolutional layer; It is the output of the first multi-scale convolutional layer with scale 1, connected to the second bidirectional GRU layer; is the output of the second bidirectional GRU layer, Indicates that the output of the forward GRU With the backward GRU output Perform a merge join; is to multiply the weight vector by the second bidirectional GRU layer And add the offset vector Result; By analogy, we can get Through a convolution operation with a scale of Scale2, [C 2 t ,C 3 t ] is extracted so that the scale information that is more important to the target can be retained and the output is obtained. After the full connection operation, the output O is obtained t ; in, and All of them are acquired through learning and training.
2. The photovoltaic power generation prediction method based on a multi-scale convolutional recurrent neural network according to claim 1 is characterized in that: For the photovoltaic power prediction model described above is x0,...,x T is the sequence data of influencing factors, (y0,...,y K ), K < T are the known photovoltaic power values, (y K+1 ,...,y T ) are the photovoltaic power values to be predicted, is the corresponding estimated value, the input is x0,...,x T ,y0,...,y K variables, and input them into the above-mentioned photovoltaic power prediction model in sequence to start training. The loss function uses the standard normalized MSE, and the activation function uses the Relu function.
3. The photovoltaic power generation prediction method based on a multi-scale convolutional recurrent neural network according to claim 1 is characterized in that: The bidirectional GRU layer is a bidirectional structure formed by connecting the forward GRU and the backward GRU models. The output of the first layer forget gate in the forward GRU is: 1 t =σ(W 1 f [H 1 t-1 ,x” t ]+B 1 f ),σ(x)=1 / (1+e -x ), in the forward GRU update gate, the first output is: z 1 t =σ(W 1 z [H 1 t-1 ,x” t ]+B 1 z ), the second output is: Similarly, the corresponding first output of the backward GRU is: z 2 t =σ(W 2 z [H 2 t-1 ,x” t ]+B 2 z ), the second output: Intermediate output of the forward GRU And the intermediate output of the backward GRU By aggregating the intermediate outputs, we get the output Indicates that the output of the forward GRU With the backward GRU output Merge the connection as the output of the bidirectional GRU layer x” t is the input of the bidirectional GRU layer, [W 1 f ,B 1 f ],[W 1 Z ,B 1 Z ],[W 1 h ,B 1 h ] is the forward GRU model parameter, [W 2 f ,B 2 f ],[W 2 Z ,B 2 Z ],[W 2 h ,B 2 h ] is the reverse GRU model parameter, [W 12 o ,B 12 o ] is the output layer parameter, is the output of the first bidirectional GRU layer, corresponding to, is the output of the second bidirectional GRU layer.
4. The photovoltaic power generation prediction method based on a multi-scale convolutional recurrent neural network according to claim 3 is characterized in that: The convolutional layer is a 1-dimensional convolutional network.
5. The photovoltaic power generation prediction method based on multi-scale convolutional recurrent neural network according to claim 1 is characterized in that: The influencing factor data include radiation intensity, temperature, humidity and air pressure.
