Photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB
By using the sky image sequence and historical output data of the photovoltaic site, combining the convolutional neural network and the gated recurrent neural network to extract features, the CNN-GRU-LGB model was built, and the problem of large photovoltaic prediction error in the existing technology was solved, and the More accurate prediction of photovoltaic output fluctuations.
Patent Information
- Application Number
- CN202410856516.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-11-12
AI Technical Summary
The existing photovoltaic power generation prediction methods are difficult to accurately predict photovoltaic output fluctuations caused by cloud shading, and the previous meteorological data characteristics are difficult to comprehensively quantify and characterize, resulting in large prediction errors.
Using the photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB, the sky image sequence of the photovoltaic site is directly used, combined with the convolutional neural network and the gated recurrent neural network to extract the Image-PV features, and the CNN-GRU-LGB model is built , reduce prediction error.
It significantly reduces the error of photovoltaic prediction, improves the accuracy of prediction, and can better predict photovoltaic output fluctuations caused by cloud shading, enhancing the generalization ability and robustness of the model.
Smart Images

Figure CN118940877A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of renewable energy power generation prediction, and relates to a photovoltaic power generation prediction method based on deep learning and machine learning, and in particular to a photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB. Background Art
[0002] Under the dual pressure of global warming and energy structure transformation, my country, as one of the world's largest energy consumers, is actively promoting the development of new energy power generation. In this context, photovoltaic power generation, as an important part of new energy, has continued to grow rapidly in installed capacity, making great contributions to the optimization of my country's energy structure and environmental protection. According to the latest data released by the National Energy Administration, by the end of 2023, my country's solar power generation installed capacity has reached 610 million kilowatts, a year-on-year increase of 55.2%, accounting for 21% of the total installed capacity. However, photovoltaic power generation is intermittent and volatile, and its power generation is affected by many factors such as weather, season, geographical location, and cloud cover. With the increase in the proportion of new energy power generation in the power system, this intermittent and volatile nature has brought new challenges to the safe and stable operation of the power grid. The power system needs to quickly adapt to the fluctuations of photovoltaic power sources and maintain a balance between supply and demand to ensure the stability and reliability of the power system. Therefore, it is of great significance to accurately predict photovoltaic power generation. First of all, accurately predicting photovoltaic power generation can help the power grid dispatching department better arrange the coordination between photovoltaic power stations and conventional energy to ensure the balance of supply and demand and economic operation of the power grid. Secondly, the prediction results can provide guidance for the construction and operation of energy storage equipment, reduce the construction investment of redundant energy storage equipment, and improve the economic efficiency of the power system. In addition, accurate photovoltaic power generation prediction can also help maintain the frequency and voltage stability of the power grid and ensure the quality of power.
[0003] At present, the photovoltaic prediction method is mainly based on deep learning, which uses the historical meteorological data and historical output data of photovoltaic sites for photovoltaic prediction. Cloud shielding is the primary factor affecting the fluctuation of photovoltaic output. Factors such as the thickness and width of the shielding cloud layer will affect the photovoltaic output. However, the characteristics of previous meteorological data (such as irradiation intensity, cloudiness, etc.) are difficult to fully quantify and characterize the degree of cloud shielding, which makes it difficult for previous methods to accurately predict the fluctuation of photovoltaic output.
[0004] Therefore, the present invention proposes a photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB.
[0005] After searching, no public documents of the prior art that are identical or similar to the present invention were found. Summary of the invention
[0006] The purpose of the present invention is to overcome the shortcomings of the prior art and propose a photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB. In order to more accurately predict the fluctuation of photovoltaic output, the sky image sequence at the photovoltaic site is directly used, and the Image-PV features are extracted by combining the convolutional neural network and the gated recurrent neural network, and the CNN-GRU-LGB is built to predict the photovoltaic output, which significantly reduces the error of photovoltaic prediction.
[0007] The present invention solves the practical problem by adopting the following technical solutions:
[0008] A photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB includes the following steps:
[0009] S1. Obtain historical sky image data and photovoltaic output data at the photovoltaic power station to generate a deep learning data set;
[0010] S2. Establish and train the CNN-GRU neural network;
[0011] S3, input the deep learning data set generated in step S1 into the CNN-GRU neural network trained in step S2, intercept the output of the first layer of the CNN-GRU neural network as the Image-PV feature, and then obtain the data set required for LightGBM training;
[0012] S4. Build and train the CNN-GRU-LGB model;
[0013] S5. Calculate the Image-PV features at the time to be predicted, and input the Image-PV features and the corresponding historical photovoltaic output data into the CNN-GRU-LGB model trained in step S4 to calculate the prediction result of the photovoltaic output.
[0014] Moreover, the specific method of step S1 is:
[0015] The historical sky image data and photovoltaic output data of the photovoltaic power station are obtained, and the sky image data and photovoltaic output data are preprocessed to generate a deep learning dataset with a ratio of 7:3 between the training set and the test set. The deep learning dataset predicts the photovoltaic output at the Nth moment based on the historical N-1 photovoltaic output data and N sky image data, where N is the number of time nodes.
[0016] Moreover, the granularity of various historical data in step S1 is 1 minute, and N is 16, that is, the historical 15-minute photovoltaic output data, sky image data, and sky image data at the prediction time are used as model inputs.
[0017] Moreover, the specific method of step S2 is:
[0018] A CNN-GRU neural network was built in Pytorch. The neural network performed convolution operations on the sky images at N historical moments and extracted features. The image features extracted at N-1 historical moments were then merged with the historical photovoltaic output to obtain the Image-pv time series, which was used as the input of the GRU. Subsequently, the output of the GRU was merged with the convolution result of the image on the Nth day, and the prediction results were output through two fully connected layers. The CNN-GRU neural network used the MSE of the predicted value and the true value as the objective function to train the model. The optimizer selected Adam and the learning rate were 0.3*10-6.
[0019] Moreover, the CNN-GRU neural network in step S2 adds a maximum pooling layer, a normalization layer and a ReLU activation function in each convolution layer, and adds a Dropout layer before the output layer of the CNN-GRU neural network.
[0020] Moreover, the specific method of step S3 is:
[0021] The data set is input into the trained CNN-GRU neural network, and the output of the first layer of the CNN-GRU neural network is intercepted as a new feature, called Image-PV feature; the historical photovoltaic output data is combined with the Image-PV feature to obtain the data set required for LightGBM training, and the ratio of the training set to the test set is 7:3. The LightGBM data set predicts the photovoltaic output at the Nth moment with historical N-1 photovoltaic output data and N-1 groups of Image-PV features.
[0022] Moreover, the Image-PV features in step S3 are 1024, and after being combined with the historical 15-minute photovoltaic output, the total number of features of a single sample is 1039.
[0023] Moreover, the specific method of step S4 is:
[0024] The CNN-GRU-LGB model was built and trained with the help of the lightgbm library in Python. The model used an early stopping strategy during training, recorded the training rounds when the model was optimal, and retrained the model with the training rounds.
[0025] Moreover, both step S2 and step S4 use MSE as the objective function.
[0026] Advantages and beneficial effects of the present invention:
[0027] 1. The present invention proposes a photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB. First, the historical sky image data and photovoltaic output data at the photovoltaic power station are obtained, the sky image data and the photovoltaic output data are preprocessed, and a deep learning data set is generated, and the ratio of the training set to the test set is 7:3. The deep learning data set predicts the photovoltaic output at the Nth moment with the historical N-1 photovoltaic output data and N sky image data, where N is the number of time nodes. Then, a CNN-GRU neural network is built in Pytorch, which performs convolution operations on the sky images at N historical moments and extracts features, and then merges the image features extracted at the historical N-1 moments with the historical photovoltaic output to obtain the Image-pv sequence, and uses the sequence as the input of the GRU. Subsequently, the output result of the GRU is merged with the convolution result of the image of the Nth day, and the prediction result is output through two fully connected layers. The CNN-GRU neural network uses the MSE of the predicted value and the true value as the objective function to train the model, and the optimizer selects Adam with a learning rate of 0.3*10-6. Secondly, the data set is input into the trained CNN-GRU neural network, and the output of the first layer of the CNN-GRU neural network is intercepted as a new feature, called the Image-PV feature. The historical photovoltaic output data is merged with the Image-PV feature to obtain the data set required for LightGBM training, and the ratio of the training set to the test set is 7:3. The LightGBM data set predicts the photovoltaic output at the Nth moment with historical N-1 photovoltaic output data and N-1 groups of Image-PV features. The CNN-GRU-LGB model is built and trained with the help of the lightgbm library in Python. The model uses an early stopping strategy during training, records the training rounds when the model effect is optimal, and retrains the model with the training rounds. Finally, the Image-PV features at the time to be predicted are calculated, and the Image-PV features and the corresponding historical photovoltaic output data are input into the trained CNN-GRU-LGB model to calculate the prediction result of the photovoltaic output. The method of the present invention is different from the previous photovoltaic prediction method, and uses the sky image sequence and historical output data of the power station to be predicted to predict the photovoltaic output. The present invention first combines the advantages of convolutional neural network CNN and gated recurrent neural network GRU in image processing and time series data processing, and builds a CNN-GRU photovoltaic prediction model based on Image-PV sequence, which reduces the prediction error. Subsequently, the Image-PV features calculated by the model are combined with the LightGBM model to build a CNN-GRU-LGB model, which further reduces the prediction error and provides technical support for the development of new energy power generation and the construction of new power systems in my country.
[0028] 2. The present invention directly uses the sky image sequence and historical output data at the photovoltaic site to perform photovoltaic prediction, which helps to predict the fluctuation of photovoltaic output caused by cloud cover.
[0029] 3. The present invention combines the convolutional neural network CNN with the gated recurrent neural network GRU, giving full play to their respective advantages in image processing and time series processing. The prediction error is lower than that of CNN-LSTM and a single convolutional neural network CNN, and the training time is shorter.
[0030] 4. The present invention introduces a maximum pooling layer, a normalization layer, and a Dropout layer into the CNN-GRU neural network, which reduces the computational complexity of the model and improves the generalization ability and robustness of the model.
[0031] 5. Since the convolutional neural network CNN has significant advantages in image processing, the present invention innovatively uses the CNN-GRU network to construct Image-PV features, and combines the Image-PV features with historical output data for training the Lightgbm model, which significantly reduces the prediction error of the model. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] Figure 1 A model framework diagram of CNN-GRU photovoltaic prediction provided by an embodiment of the present invention;
[0033] Figure 2 A schematic diagram of the training and prediction process of the CNN-GRU-LGB model provided in an embodiment of the present invention;
[0034] Figure 3 A comparison chart of photovoltaic output prediction results of CNN, CNN-LSTM, and CNN-GRU neural networks on sunny days provided by an embodiment of the present invention;
[0035] Figure 4 A comparison chart of photovoltaic output prediction results of CNN, CNN-LSTM, and CNN-GRU neural networks on cloudy days provided by an embodiment of the present invention;
[0036] Figure 5 A comparison chart of photovoltaic output predictions of the CNN-GRU-LGB, LGB, and CNN-GRU models on cloudy days provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0037] The embodiments of the present invention are further described in detail below with reference to the accompanying drawings:
[0038] A photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB includes the following steps:
[0039] S1. Obtain historical sky image data and photovoltaic output data at the photovoltaic power station to generate a deep learning data set;
[0040] The specific method of step S1 is:
[0041] The historical sky image data and photovoltaic output data of the photovoltaic power station are obtained, and the sky image data and photovoltaic output data are preprocessed to generate a deep learning dataset with a ratio of 7:3 between the training set and the test set. The deep learning dataset predicts the photovoltaic output at the Nth moment based on the historical N-1 photovoltaic output data and N sky image data, where N is the number of time nodes.
[0042] The granularity of various historical data in step S1 is 1 minute, and N is 16, that is, the historical 15-minute photovoltaic output data, sky image data, and sky image data at the prediction time are used as model inputs.
[0043] S2. Establish and train the CNN-GRU neural network;
[0044] The specific method of step S2 is:
[0045] A CNN-GRU neural network was built in Pytorch. The neural network performed convolution operations on the sky images at N historical moments and extracted features. The image features extracted at N-1 historical moments were then merged with the historical photovoltaic output to obtain the Image-pv time series, which was used as the input of the GRU. Subsequently, the output of the GRU was merged with the convolution result of the image on the Nth day, and the prediction results were output through two fully connected layers. The CNN-GRU neural network used the MSE of the predicted value and the true value as the objective function to train the model. The optimizer selected Adam and the learning rate were 0.3*10-6.
[0046] The CNN-GRU neural network in step S2 adds a maximum pooling layer, a normalization layer, and a ReLU activation function to each convolution layer, and adds a Dropout layer before the output layer of the CNN-GRU neural network to increase the generalization ability and robustness of the model, and the random inactivation ratio of neurons is 0.3.
[0047] S3, input the deep learning data set generated in step S1 into the CNN-GRU neural network trained in step S2, intercept the output of the first layer of the CNN-GRU neural network as the Image-PV feature, and then obtain the data set required for LightGBM training;
[0048] The specific method of step S3 is:
[0049] The data set is input into the trained CNN-GRU neural network, and the output of the first layer of the CNN-GRU neural network is intercepted as a new feature, called Image-PV feature; the historical photovoltaic output data is combined with the Image-PV feature to obtain the data set required for LightGBM training, and the ratio of the training set to the test set is 7:3. The LightGBM data set predicts the photovoltaic output at the Nth moment with historical N-1 photovoltaic output data and N-1 groups of Image-PV features.
[0050] The Image-PV features in step S3 are 1024. After being combined with the historical 15-minute photovoltaic output, the total number of features of a single sample is 1039.
[0051] S4. Build and train the CNN-GRU-LGB model;
[0052] The specific method of step S4 is:
[0053] The CNN-GRU-LGB model was built and trained with the help of the lightgbm library in Python. The model used an early stopping strategy during training, recorded the training rounds when the model was optimal, and retrained the model with the training rounds.
[0054] Step S2 and step S4 both use MSE as the objective function;
[0055] S5. Calculate the Image-PV features at the time to be predicted, and input the Image-PV features and the corresponding historical photovoltaic output data into the CNN-GRU-LGB model trained in step S4 to calculate the prediction result of the photovoltaic output.
[0056] The working principle of the present invention is:
[0057] The present invention relates to a photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB, comprising the following steps:
[0058] ① Obtain historical sky image data and photovoltaic output data at the photovoltaic power station, pre-process the sky image data and photovoltaic output data, and generate a deep learning data set with a training set to test set ratio of 7:3. The deep learning data set predicts the photovoltaic output at the Nth moment based on the historical N-1 photovoltaic output data and N sky image data, where N is the number of time nodes.
[0059] ② Build a CNN-GRU neural network in Pytorch. This neural network performs convolution operations on the sky images at N historical moments and extracts features. Then, the image features extracted at N-1 historical moments are combined with the historical photovoltaic output to obtain the Image-pv sequence, and this time series is used as the input of the GRU. Subsequently, the output of the GRU is combined with the convolution result of the image of the Nth day, and the prediction result is output through two fully connected layers. The CNN-GRU neural network uses the MSE of the predicted value and the true value as the objective function to train the model. The optimizer selects Adam and the learning rate is 0.3*10 -6 .
[0060] ③ Input the data set into the trained CNN-GRU neural network, and intercept the output of the first layer of the CNN-GRU neural network as a new feature, called Image-PV feature. Combine the historical photovoltaic output data with the Image-PV feature to obtain the data set required for LightGBM training, with a ratio of 7:3 between the training set and the test set. The LightGBM data set predicts the photovoltaic output at the Nth moment with historical N-1 photovoltaic output data and N-1 sets of Image-PV features.
[0061] ④ Use the lightgbm library in Python to build and train the CNN-GRU-LGB model. The model uses an early stopping strategy during training, records the training rounds when the model is optimal, and retrains the model with the training rounds.
[0062] ⑤ Calculate the Image-PV features at the time to be predicted, and input the Image-PV features and the corresponding historical photovoltaic output data into the trained CNN-GRU-LGB model to calculate the prediction result of photovoltaic output.
[0063] The following is combined Figure 1-5 The present invention will be described in detail.
[0064] Example 1
[0065] like Figure 1-5 As shown, this embodiment uses the photovoltaic prediction method of the present invention to perform photovoltaic prediction on the Stanford sky image and photovoltaic power generation data set, including the following steps:
[0066] S1. Obtain historical sky image data and photovoltaic output data at the photovoltaic power station, pre-process the sky image data and photovoltaic output data, and generate a deep learning data set with a training set to test set ratio of 7:3. The deep learning data set predicts the photovoltaic output at the Nth moment based on the historical N-1 photovoltaic output data and N sky image data, where N is the number of time nodes.
[0067] The Stanford sky image and photovoltaic power generation data set contains high-resolution sky video clips (2048×2048) recorded at 20 frames per second from 2017 to 2019, sky image frames (2048×2048) and historical photovoltaic power generation data with a granularity of 1 minute. Since the original data is too large, in order to reduce the amount of calculation required for the training model, the original sky video is first snapshotted with a granularity of 1min, and the resolution of the snapshot image is reduced. In this embodiment, the reduced image resolution is 64×64. Then, the pre-processed sky image data is normalized and aligned with the photovoltaic processing data on the time axis. Subsequently, the time axis is traversed to obtain the first N-1 sky images, photovoltaic output data (in this embodiment, N is 16, i.e., the first 15min) and sky image data at the time node in turn, and each set of data is a training sample. After the traversal is completed, a deep learning data set is obtained, and the training set and the test set are divided by time, with a ratio of 7:3.
[0068] S2. Build a CNN-GRU neural network in Pytorch. The neural network performs convolution operations on the sky images at N historical moments and extracts features. Then, the image features extracted at N-1 historical moments are combined with the historical photovoltaic output to obtain the Image-PV sequence, which is used as the input of the GRU. Subsequently, the output of the GRU is combined with the convolution result of the image on the Nth day, and the prediction result is output through two fully connected layers. The CNN-GRU neural network uses the MSE of the predicted value and the true value as the objective function to train the model. The optimizer selects Adam, and the learning rate is 0.3*10 -6 .
[0069] The CNN-GRU photovoltaic prediction model framework and calculation process based on sky image sequence proposed in this invention are as follows: Figure 1 As shown. Figure 1It can be seen that the model inputs 16 sky RGB image data at each time and 15 historical photovoltaic output data at each time. The model first performs two convolution operations on the sky RGB image at each time, and normalizes and max pools after each convolution. Normalization helps to improve the generalization ability of the model and reduce the difficulty of training. Max pooling helps to avoid the "curse of dimensionality" and reduce the amount of model calculation. Subsequently, the historical photovoltaic output data is introduced, and the convolution operation results of the historical sky image (first 15 minutes) are aligned with the photovoltaic output data on the time axis to form an Image-PV sequence. Then, the Image-PV sequence is input into the gated recurrent neural network GRU, and the calculation results are merged with the convolution calculation results of the sky image data at the time to be predicted, and the prediction results are calculated by two fully connected layers. In addition, ReLU is selected as the activation function of the convolution layer and the fully connected layer, and a Dropout layer is added after the first fully connected layer to improve the generalization ability of the model. The optimizer is Adam, the learning rate is 0.3*10-6, the training is 15 rounds, the batch size is 256, and the objective function is the mean square error (MSE). The calculation formula is as follows:
[0070]
[0071] Where n is the total number of samples; y true The actual value of photovoltaic output; pred is the predicted value of photovoltaic output.
[0072] In addition, this embodiment also uses the root mean square error (RMSE) to evaluate the model effect, and the formula is as follows:
[0073]
[0074] The hidden unit h of GRU t It can be calculated by the following formula:
[0075]
[0076] Among them, r t is the reset gate; t is the update gate; σ is the sigmoid function; W r , U r , W z , U z , W, U are all training parameter matrices; tanh is the hyperbolic tangent function.
[0077] The detailed parameters of the CNN-GRU neural network in this embodiment are shown in Table 1.
[0078] Table 1 CNN-GRU model parameters
[0079]
[0080] S3. Input the data set into the trained CNN-GRU neural network, and intercept the output of the first layer of the CNN-GRU neural network as a new feature, called Image-PV feature. Combine the historical photovoltaic output data with the Image-PV feature to obtain the data set required for LightGBM training, with a ratio of 7:3 between the training set and the test set. The LightGBM data set predicts the photovoltaic output at the Nth moment with historical N-1 photovoltaic output data and N-1 sets of Image-PV features.
[0081] Since the prediction result differs from the output of the first fully connected layer only by a fixed linear transformation, the output of the first fully connected layer can be regarded as the photovoltaic output feature of the Image-PV sequence extracted by the CNN-GRU neural network. The present invention uses the output of the first fully connected layer as a new feature, called the Image-PV feature. As can be seen from Table 1, there are 1024 Image-PV features for a single data sample in this embodiment, which greatly enriches the feature expression of historical photovoltaic output and sky images, and is conducive to improving the robustness and generalization ability of the subsequent LightGBM model.
[0082] S4. Use the lightgbm library in Python to build and train the CNN-GRU-LGB model. The model uses an early stopping strategy during training, records the training rounds when the model is optimal, and retrains the model with the training rounds.
[0083] The parameters of LightGBM are shown in Table 2.
[0084] Table 2 LightGBM parameters
[0085]
[0086] S5. Calculate the IMAGE-PV features at the time to be predicted, and input the IMAGE-PV features and the corresponding historical photovoltaic output data into the trained CNN-GRU-LGB model to calculate the prediction result of the photovoltaic output.
[0087] The process of using CNN-GRU-LGB model to predict photovoltaic output is as follows Figure 2As shown. First, the original data is preprocessed to generate the Image-PV time series required for training the CNN-GRU neural network. Then, the CNN-GRU neural network is built and trained. After the training is completed, the Image-PV features required for training LightGBM are calculated and the LightGBM model is trained. Finally, the CNN-GRU model is used to calculate the Image-PV features at the time to be predicted, and the photovoltaic output can be predicted by the trained LightGBM model.
[0088] 1. CNN-GRU neural network framework effect analysis
[0089] In order to verify the superiority of the CNN-GRU neural network based on Image-PV time series proposed in this paper, CNN and CNN-LSTM neural networks were built and trained respectively. Figure 1 The GRU in the CNN-LSTM neural network is replaced by a fully connected layer. Figure 1 The GRU in the training set is replaced by LSTM. The MSE and RMSE of the three neural networks on the test set and the training time are shown in Table 3. As can be seen from Table 3, the performance indicators of the CNN-GRU neural network are significantly better than those of the CNN neural network. The performance of CNN-GRU is similar to that of CNN-LSTM, but because GRU has fewer training parameters, its training time is shorter. The CNN neural network in the comparative analysis is Figure 1 The GRU in the CNN-LSTM neural network is replaced by a fully connected layer. Figure 1 The GRU in is replaced by LSTM.
[0090] Table 3 Comparison of evaluation indicators of various neural network frameworks
[0091]
[0092] Comparison of prediction results of three neural network frameworks on sunny and cloudy days Figure 3 , Figure 4 As shown. Figure 3 It can be seen that when the weather is clear, the photovoltaic output fluctuates little, the CNN prediction results fluctuate greatly, and the prediction results of the three neural networks are more accurate. Figure 4 It can be seen that when the weather is cloudy, the photovoltaic output fluctuates greatly, and the prediction results of the three neural networks all have certain errors, especially the CNN neural network, whose prediction results are not accurate enough and the fluctuations are significantly greater than the actual situation.
[0093] 2. CNN-GRU-LGB model effect analysis
[0094] Depend on Figure 4It can be seen that even though the CNN-GRU photovoltaic prediction model proposed in this paper reduces the prediction error to a certain extent, when the photovoltaic output fluctuates greatly, the prediction error of the CNN-GRU model is still large. In order to verify the effect of the CNN-GRU-LGB model of the present invention, the LGB model (only using historical photovoltaic data, not using the Image-PV features calculated by CNN-GRU) and the CNN-GRU neural network are set as control groups. The performance indicators of each model are compared as shown in Table 4. The prediction results on cloudy days are as follows Figure 5 As shown in Table 4, the CNN-GRU-LGB photovoltaic prediction model proposed in the present invention significantly reduces the prediction error. The RMSE and MSE of the test set are only 72.89% and 53.16% of those of the CNN-GRU neural network, respectively. In addition, the prediction error of CNN-GRU-LGB is also significantly lower than that of the LGB model, indicating that the method of using the CNN-GRU neural network to calculate the Image-PV features in the present invention is effective. Figure 5 As can be seen from the dotted box in the figure, the CNN-GRU-LGB model can accurately predict output fluctuations even on cloudy days, significantly reducing the prediction error.
[0095] Table 4 Comparison of evaluation indicators of each model
[0096]
[0097] The improvement effect of the method of the present invention in the embodiment is summarized in Table 5. The RMSE and MSE of the photovoltaic prediction method of the present invention on the test set are only 64.29% and 41.39% of the Baseline (CNN), respectively.
[0098] Table 5 Summary of the improvement effect of the method of the present invention
[0099]
[0100] It should be emphasized that the embodiments of the present invention are illustrative rather than restrictive. Therefore, the present invention includes but is not limited to the embodiments described in the specific implementation modes. Any other implementation modes derived by those skilled in the art based on the technical solutions of the present invention also fall within the scope of protection of the present invention.
Claims
1. A photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB, characterized by: The steps include: S1. Obtain historical sky image data and photovoltaic output data at the photovoltaic power station to generate a deep learning data set; S2. Establish and train the CNN-GRU neural network; S3, input the deep learning data set generated in step S1 into the CNN-GRU neural network trained in step S2, intercept the output of the first layer of the CNN-GRU neural network as the Image-PV feature, and then obtain the data set required for LightGBM training; S4. Build and train the CNN-GRU-LGB model; S5. Calculate the Image-PV features at the time to be predicted, and input the Image-PV features and the corresponding historical photovoltaic output data into the CNN-GRU-LGB model trained in step S4 to calculate the prediction result of the photovoltaic output.
2. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 1, characterized in that: The specific method of step S1 is: The historical sky image data and photovoltaic output data of the photovoltaic power station are obtained, and the sky image data and photovoltaic output data are preprocessed to generate a deep learning dataset with a ratio of 7:3 between the training set and the test set. The deep learning dataset predicts the photovoltaic output at the Nth moment based on the historical N-1 photovoltaic output data and N sky image data, where N is the number of time nodes.
3. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 1, characterized in that: The granularity of various historical data in step S1 is 1 minute, and N is 16, that is, the historical 15-minute photovoltaic output data, sky image data, and sky image data at the prediction time are used as model inputs.
4. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 1, characterized in that: The specific method of step S2 is: A CNN-GRU neural network was built in Pytorch. The neural network performed convolution operations on the sky images at N historical moments and extracted features. The image features extracted at N-1 historical moments were then merged with the historical photovoltaic output to obtain the Image-pv time series, which was used as the input of the GRU. Subsequently, the output of the GRU was merged with the convolution result of the image on the Nth day, and the prediction result was output through two fully connected layers. The CNN-GRU neural network used the MSE of the predicted value and the true value as the objective function to train the model. The optimizer selected Adam and the learning rate was 0.3*10-6.
5. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 4, characterized in that: The CNN-GRU neural network in step S2 adds a maximum pooling layer, a normalization layer, and a ReLU activation function to each convolution layer, and adds a Dropout layer before the output layer of the CNN-GRU neural network.
6. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 1, characterized in that: The specific method of step S3 is: The data set is input into the trained CNN-GRU neural network, and the output of the first fully connected layer of the CNN-GRU neural network is intercepted as a new feature, called Image-PV feature; The historical photovoltaic output data are combined with the Image-PV features to obtain the data set required for LightGBM training, with the ratio of training set to test set being 7:
3. The LightGBM data set predicts the photovoltaic output at the Nth moment using N-1 historical photovoltaic output data and N-1 groups of Image-PV features.
7. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 6, characterized in that: The Image-PV features in step S3 are 1024. After being combined with the historical 15-minute photovoltaic output, the total number of features of a single sample is 1039.
8. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 1, characterized in that: The specific method of step S4 is: The CNN-GRU-LGB model was built and trained with the help of the lightgbm library in Python. The model used an early stopping strategy during training, recorded the training rounds when the model effect was optimal, and retrained the model with the training rounds.
9. The photovoltaic prediction method based on Image-PV sequence and CNN-GRU-LGB according to claim 1, characterized in that: The step S2 and the step S4 both use MSE as the objective function.
Citation Information
Cited By
Line loss prediction method and system based on GRU model
CN119442121A
