Photovoltaic power station short-term output prediction method and system based on LightGBM-AttentionGRU combined model

Through the LightGBM-AttentionGRU combined model, using multi-source meteorological data and feature correction technology, the scenario migration problem of a single model in the short-term output forecast of photovoltaic power stations was solved, achieving higher prediction accuracy and stability.

CN119514754BActive Publication Date: 2025-09-26HUANENG HENAN CLEAN ENERGY CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411448190.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-09-26
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

In the existing short-term output prediction methods for photovoltaic power stations, a single model is difficult to migrate scenarios, resulting in reduced model stability and reliability, high computational complexity, and long training time.

Method used

The LightGBM-AttentionGRU combined model is adopted to construct multiple features through multi-source numerical meteorological forecast data and historical actual output data. The features are corrected using the correlation coefficient, and the inverse error method is used for weighted summation. The prediction results of the LightGBM and AttentionGRU models are combined.

Benefits of technology

The accuracy and stability of short-term output forecasts for photovoltaic power stations have been improved, the limitation of a single model that is difficult to migrate scenarios has been overcome, and the accuracy and efficiency of forecasts have been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119514754B_ABST
    Figure CN119514754B_ABST
Patent Text Reader

Abstract

The present invention provides a method, system, storage medium and electronic device for short-term output prediction of photovoltaic power stations based on the LightGBM-AttentionGRU combination model, and relates to the field of short-term output prediction of photovoltaic power stations. In the present invention, a plurality of features are constructed based on pre-processed multi-source numerical meteorological forecast data and historical actual output data, and each feature is corrected based on the correlation coefficient between the feature and the target output; then the corrected feature data is used as the input of the LightGBM model to obtain the first prediction result, and the corrected feature data and the first prediction result are used as the input of the AttentionGRU model to obtain the second prediction result; finally, the inverse error method is used for weighted summation to obtain the final short-term output prediction result of the photovoltaic power station to be predicted. The combination model of the LightGBM model and the AttentionGRU model based on different underlying principles improves the limitation of a single model that is difficult to perform scene migration, and greatly improves the accuracy of short-term output prediction of photovoltaic power stations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of short-term output prediction of photovoltaic power stations, and in particular to a method, system, storage medium and electronic equipment for short-term output prediction of photovoltaic power stations based on a LightGBM-AttentionGRU combined model. Background Art

[0002] Short-term photovoltaic power station output forecasting plays a crucial role in the power system. By accurately predicting the power generation capacity of photovoltaic power stations, it helps power system dispatchers adjust their operations in a timely manner, ensuring the safe and stable operation of the power grid. This process not only improves the economic efficiency and reliability of the power system, but also promotes the efficient absorption of renewable energy and reduces the adverse effects of photovoltaic power generation fluctuations. Furthermore, photovoltaic output forecasting provides decision-making support for power market participants, optimizes power trading strategies, and promotes the optimization and transformation of the energy structure. It is a key technology for achieving smart grids and sustainable development.

[0003] Among related technologies, short-term PV power station output forecasting methods fall into three main categories: physical methods, statistical methods, and machine learning methods. Machine learning methods, such as decision trees and long-short-term memory neural networks (LSTMs), can directly extract patterns of change from historical PV output and NWP data for forecasting. These methods are currently the primary method and research focus for PV output forecasting.

[0004] However, decision tree models are overly sensitive to noise in the data, prone to overfitting, and have limited ability to capture nonlinear relationships. The predictions of a single decision tree model can fluctuate significantly with even small changes in the dataset, reducing the model's stability and reliability. LSTM (Long Short-Term Memory) is a type of recurrent neural network (RNN) that can learn and memorize long-term dependencies. However, it also suffers from high computational complexity, long training time, vanishing gradients, and high computational resource consumption.

[0005] In view of this, it is necessary to provide a machine learning solution based on a combination model to improve the limitation of a single model that is difficult to migrate scenarios and improve the accuracy of model predictions. Summary of the Invention

[0006] (1) Technical problems solved

[0007] In response to the shortcomings of the existing technology, the present invention provides a method, system, storage medium and electronic device for short-term output prediction of photovoltaic power stations based on the LightGBM-AttentionGRU combined model, which solves the technical problem that a single model is difficult to perform scene migration.

[0008] (2) Technical solution

[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions:

[0010] A method for short-term output prediction of photovoltaic power stations based on the LightGBM-AttentionGRU combined model includes:

[0011] Acquire and preprocess multi-source numerical meteorological forecast data and first historical actual output data of the photovoltaic power station to be predicted;

[0012] Constructing a plurality of features based on the preprocessed multi-source numerical weather forecast data and the first historical actual output data, wherein the features include at least irradiance features, statistical features, polynomial features, sliding window features, and hysteresis features;

[0013] Modifying each of the features based on a correlation coefficient between each of the features and the target output;

[0014] Use the corrected features as the input of the pre-trained LightGBM model to obtain the first prediction result;

[0015] The corrected features and the first prediction result are used as input to the pre-trained AttentionGRU model to obtain the second prediction result;

[0016] The first prediction result and the second prediction result are weightedly summed using the inverse error method to obtain the final short-term output prediction result of the photovoltaic power station to be predicted.

[0017] Preferably, the irradiance characteristics include the peak irradiance of the day and the difference between the irradiance at each moment and the peak irradiance;

[0018] The statistical characteristics include one or a combination of any of the following: mean, standard deviation, coefficient of variation, skewness, kurtosis, range and total added value;

[0019] The polynomial features refer to multiple new combined features obtained by performing addition, subtraction, multiplication and division operations on irradiance features or statistical features;

[0020] The sliding window feature refers to the use of historical actual output data from 2 to 8 days before the target date;

[0021] The lag feature refers to the historical actual output data of the week before and after the target day.

[0022] Preferably, the multi-source numerical weather forecast data includes EC and GFS forecast data, and the characteristics specifically include:

[0023] EC / GFS shortwave downward irradiance, EC / GFS daily peak irradiance, difference between EC / GFS irradiance and peak irradiance, GFS cloud cover, EC / GFS surface wind speed, EC humidity, EC air pressure, EC temperature, whether GFS has rain, whether GFS has snow, 0.8*EC irradiance + 0.2*GFS irradiance, square of EC irradiance, sliding window characteristics of actual power output on dates D-1 / D-2 / D-3, and lag characteristics of the week before and after the same date D+1 in the previous year; where D represents the current day.

[0024] Preferably, the training process of the LightGBM model includes:

[0025] Acquire and preprocess historical EC and GFS forecast data and second historical actual output data;

[0026] Based on the pre-processed historical EC and GFS forecast data, the irradiance features are constructed, and based on the pre-processed historical EC and GFS meteorological fields, the statistical features and polynomial features are constructed respectively.

[0027] Based on the pre-processed second historical actual output data, sliding window features and hysteresis features are constructed respectively;

[0028] Use Boruta algorithm for feature selection to obtain multiple input features;

[0029] Calculating the correlation coefficient between each of the input features and the target output, modifying each of the input features, and obtaining feature data with a preset weight;

[0030] A piece of pre-processed historical actual output data and the corresponding feature data are spliced ​​together as a piece of sample data;

[0031] Each sample data is used as the input of the LightGBM model, and Optuna is used to optimize the parameters until the model converges.

[0032] Preferably, the training process of the AttentionGRU model includes:

[0033] Each of the sample data and the corresponding third prediction result is used as the input of the AttentionGRU model, and optuna is used to optimize the parameters until the model converges; wherein the third prediction result is the prediction result obtained after the sample data is used as the input of the converged LightGBM model.

[0034] Preferably, the first prediction result and the second prediction result are weighted summed using the inverse error method to obtain the final short-term output prediction result of the photovoltaic power station to be predicted; expressed as:

[0035] f PV =ω L f L +ω G f G

[0036]

[0037]

[0038] Among them, f PV Indicates the final short-term output forecast result;

[0039] ω L 、f L Represent the weight coefficient and the first prediction result of the LightGBM model respectively;

[0040] ω G 、f G Represent the weight coefficient of the AttentionGRU model and the second prediction result respectively;

[0041] e L 、e G Represent the errors of the LightGBM model and the AttentionGRU model respectively.

[0042] A photovoltaic power station short-term output forecasting system based on the LightGBM-AttentionGRU combined model, including:

[0043] A data acquisition module is used to acquire and preprocess multi-source numerical meteorological forecast data and first historical actual output data of the photovoltaic power station to be predicted;

[0044] A feature construction module, configured to construct a plurality of features based on the preprocessed multi-source numerical meteorological forecast data and the first historical actual output data; wherein the features include at least irradiance features, statistical features, polynomial features, sliding window features, and hysteresis features;

[0045] a feature correction module, configured to correct each of the features based on a correlation coefficient between each of the features and the target output;

[0046] The first output prediction module is used to use the corrected feature data as the input of the pre-trained LightGBM model to obtain the first prediction result;

[0047] The second output prediction module is used to use the corrected feature data and the first prediction result as input to the pre-trained AttentionGRU model to obtain a second prediction result;

[0048] The result fusion module is used to perform weighted summation on the first prediction result and the second prediction result using the inverse error method to obtain the final short-term output prediction result of the photovoltaic power station to be predicted.

[0049] A storage medium stores a computer program for short-term output prediction of a photovoltaic power station based on a LightGBM-AttentionGRU combined model, wherein the computer program enables a computer to execute the above-mentioned method for short-term output prediction of a photovoltaic power station.

[0050] An electronic device, comprising:

[0051] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, the programs including a method for executing the photovoltaic power station short-term output prediction method as described above.

[0052] (3) Beneficial effects

[0053] The present invention provides a method, system, storage medium, and electronic device for short-term photovoltaic power station output prediction based on the LightGBM-AttentionGRU combined model. Compared with the existing technology, it has the following advantages:

[0054] In the present invention, multiple features are constructed based on preprocessed multi-source numerical weather forecast data and historical actual output data, and each feature is corrected based on the correlation coefficient between each feature and the target output. The corrected features are then used as input to the LightGBM model to obtain a first prediction result, and the corrected features and the first prediction result are used as input to the AttentionGRU model to obtain a second prediction result. Finally, the inverse error method is used for weighted summation to obtain the final short-term output prediction result of the photovoltaic power station to be predicted. The combined model of the LightGBM model and the AttentionGRU model, which have different underlying principles, overcomes the limitation of a single model in that it is difficult to perform scenario migration, and greatly improves the accuracy of the short-term output prediction of the photovoltaic power station. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0056] Figure 1A block diagram of a method for short-term output prediction of a photovoltaic power station based on a LightGBM-AttentionGRU combined model provided by an embodiment of the present invention;

[0057] Figure 2 A comparison curve chart of the average accuracy of photovoltaic output prediction provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention are clearly and completely described. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0059] The embodiments of the present application solve the technical problem of the limitation that a single model is difficult to perform scene migration by providing a method, system, storage medium and electronic device for short-term output prediction of photovoltaic power stations based on the LightGBM-AttentionGRU combination model.

[0060] The technical solution in the embodiments of the present application is to solve the above technical problems, and the overall idea is as follows:

[0061] It should be noted that the difficulty in predicting photovoltaic output lies in its inherent intermittent and volatile nature, which makes predictions face many challenges. Photovoltaic power output is affected by a variety of meteorological factors such as solar radiation, temperature, cloud cover, rainfall, and wind speed. The uncertainty and variability of these factors increase the complexity of prediction. In addition, differences in static information such as the geographic information, installation angle, and conversion efficiency of photovoltaic systems, as well as dynamic information such as the accuracy of real-time meteorological data, all have a significant impact on the prediction results. Existing prediction methods, whether based on physics-based models, time series methods, machine learning, or deep learning, all require processing large amounts of data and establishing accurate mapping relationships. In actual operations, this may be limited by factors such as data quality, computing resources, and model generalization capabilities.

[0062] In order to improve the accuracy and stability of short-term output prediction of photovoltaic power stations, this embodiment of the solution addresses the defects of decision tree models and LSTM models, and comprehensively considers the problems that a single model is prone to overfitting and low prediction accuracy. A short-term output prediction method for photovoltaic power stations based on multi-source meteorological forecasts and LightGBM-AttentionGRU combined models is proposed. This method constructs a gradient boosting tree (LightGBM) model and a gated recurrent network (AttentionGRU) model with an added self-attention mechanism, uses the inverse error method to perform model fusion, and outputs the final optimized prediction results.

[0063] In order to better understand the above technical solution, the above technical solution will be described in detail below with reference to the accompanying drawings and specific implementation methods.

[0064] Example 1:

[0065] like Figure 1 As shown, the embodiment of the present invention provides a method for short-term output prediction of a photovoltaic power station based on a LightGBM-AttentionGRU combined model, including:

[0066] S1. Acquire and preprocess multi-source numerical meteorological forecast data and first historical actual output data of the photovoltaic power station to be predicted;

[0067] S2. Constructing a plurality of features based on the preprocessed multi-source numerical weather forecast data and the first historical actual output data, wherein the features include at least irradiance features, statistical features, polynomial features, sliding window features, and hysteresis features;

[0068] S3. Modifying each of the features based on a correlation coefficient between each of the features and the target output;

[0069] S4. Use the corrected feature data as the input of the pre-trained LightGBM model to obtain the first prediction result;

[0070] S5. Using the corrected feature data and the first prediction result as input to the pre-trained AttentionGRU model to obtain a second prediction result;

[0071] S6. Perform weighted summation on the first prediction result and the second prediction result using the inverse error method to obtain a final short-term output prediction result of the photovoltaic power station to be predicted.

[0072] The embodiment of the present invention is based on a combination model of the LightGBM model and the AttentionGRU model with different underlying principles, which improves the limitation of a single model that is difficult to perform scene migration and greatly improves the accuracy of short-term output prediction of photovoltaic power stations.

[0073] The following sections describe the various steps of the above solution in detail:

[0074] In step S1 , multi-source numerical meteorological forecast data and first historical actual output data of the photovoltaic power station to be predicted are acquired and preprocessed.

[0075] First, Numerical Weather Prediction (NWP) is a scientific method that uses mathematical models and computer technology to predict future weather conditions. NWP models are based on fundamental equations of atmospheric dynamics, thermodynamics, and fluid mechanics, which describe the conservation and state changes of mass, momentum, and energy in the atmosphere. NWP forecast products include predictions for temperature, humidity, wind speed and direction, air pressure, precipitation, cloud cover, irradiance, and other meteorological factors.

[0076] The embodiment of the present invention takes into account the problems of false alarms and deviations in a single weather forecast source, and integrates multiple weather forecast sources to improve the accuracy of weather forecast products.

[0077] Therefore, this step uses multiple sources of numerical weather forecasts, including high-precision forecasts from the European Centre for Medium-Range Weather Forecasts (ECMWF) and the Global Forecast System (GFS) of the US Global Forecast Center. ECMWF is recognized as a leading institution in numerical weather forecasting, renowned for its high-quality medium-range weather forecasts, while GFS is a key provider of global numerical weather forecast services.

[0078] Specifically, in this step, according to the longitude and latitude coordinates of the photovoltaic power station to be predicted, the meteorological forecast data corresponding to the longitude and latitude grid points closest to the coordinates of the photovoltaic power station are extracted from the EC and GFS respectively as the multi-source numerical meteorological forecast corresponding to the photovoltaic power station.

[0079] For example, here, Euclidean distance is used to approximate the distance between longitude and latitude coordinates. The calculation formula is as follows:

[0080]

[0081] Where (x1, y1) and (x2, y2) represent the coordinates of any two points, and d represents the distance between the two points.

[0082] In addition, the first historical actual output data obtained in this step includes at least the historical actual output data of 2 to 8 days before the target date, and the historical actual output data of the target date in the same period before and after one week.

[0083] Furthermore, in this step, the multi-source numerical weather forecast data and the first historical actual output data are preprocessed. The preprocessing process includes operations such as elimination, cleaning, and data standardization. For details, see below:

[0084] Due to the high volatility of photovoltaic power generation output and its time distribution, which differs from electricity load, the power system has difficulty adapting to the integration of large-scale, fluctuating renewable energy sources. As a result, photovoltaic power generation cannot be fully absorbed and utilized by the grid, resulting in difficulty in absorption and curtailment. However, the historical actual output data of photovoltaic power stations is the actual grid output, which cannot reflect the actual power generation capacity of the photovoltaic station when curtailment occurs. Therefore, the actual output data corresponding to the curtailment and power rationing periods needs to be eliminated.

[0085] Subsequently, data cleaning was performed on the eliminated multi-source numerical weather forecast data and historical actual output data. Data cleaning includes deleting redundant, conflicting, and abnormal data from the original data, checking data consistency, and handling invalid and missing values.

[0086] Finally, because the EC and GFS meteorological fields represent different meteorological factors and have different orders of magnitude, this step also performs data standardization on the meteorological fields.

[0087] In step S2, a plurality of features are constructed based on the preprocessed multi-source numerical meteorological forecast data and the first historical actual output data; wherein the features include at least irradiance features, statistical features, polynomial features, sliding window features and hysteresis features.

[0088] In this step, based on the preset feature engineering (including feature construction and feature screening), the following features are obtained:

[0089] (1) The irradiance characteristics include the peak irradiance of the day and the difference between the irradiance at each moment and the peak irradiance.

[0090] (2) The statistical characteristics include one or a combination of any of the following: mean, standard deviation, coefficient of variation, skewness, kurtosis, range, and total added value.

[0091] (3) The polynomial features refer to multiple new combined features obtained by performing addition, subtraction, multiplication and division operations on irradiance features or statistical features.

[0092] (4) The sliding window feature refers to the use of historical actual output data from 2 to 8 days before the target date (i.e., D-1 to D-7 days).

[0093] (5) The lag characteristic refers to the historical actual output data of the target day (D+1) in the week before and after.

[0094] Exemplarily, the features set in this step specifically include:

[0095] EC / GFS shortwave downward irradiance, EC / GFS daily peak irradiance, difference between EC / GFS irradiance and peak irradiance, GFS cloud cover, EC / GFS surface wind speed, EC humidity, EC air pressure, EC temperature, whether GFS has rain, whether GFS has snow, 0.8*EC irradiance + 0.2*GFS irradiance, square of EC irradiance, sliding window characteristics of actual power output on dates D-1 / D-2 / D-3, and lag characteristics of the week before and after the same date D+1 in the previous year; where D represents the current day.

[0096] In step S3, each of the features is corrected based on the correlation coefficient between each of the features and the target output.

[0097] In this step, each feature is corrected based on the pre-calculated correlation coefficient between each feature and the target output as the weight of the feature.

[0098] In step S4, the corrected feature data is used as the input of the pre-trained LightGBM model to obtain the first prediction result.

[0099] First, let’s introduce the training process of the LightGBM model:

[0100] Step 10: Obtain and preprocess historical EC and GFS forecast data and second historical actual output data.

[0101] Step 20: Based on the preprocessed historical EC and GFS forecast data, construct the irradiance feature, and based on the preprocessed historical EC and GFS meteorological fields, construct the statistical feature and polynomial feature respectively.

[0102] As you can understand, solar radiation reaching the ground includes direct radiation and diffuse radiation, the sum of which is called total radiation. Direct radiation refers to the solar radiation that reaches the ground directly without being scattered by any material; diffuse radiation is the solar radiation that reaches the ground after being scattered by the atmosphere and clouds. The amount of radiation per unit area is called irradiance. The principles of photovoltaic power generation show a positive correlation between actual solar irradiance and the actual output of a photovoltaic power station. The actual amount of photovoltaic power generated is largely determined by the actual irradiance.

[0103] Because irradiance exhibits a strong periodic pattern, two features are constructed in this step to represent this periodicity: ① the peak irradiance of the day, and ② the difference between the irradiance at each moment and the peak irradiance. The former represents the highest level of irradiance on the day, while the latter represents the difference from the peak irradiance.

[0104] Furthermore, to make model predictions more accurate, it's necessary to consider more influencing factors and the relationships between them. Therefore, during training, statistical and polynomial features are constructed based on the EC and GFS meteorological fields, respectively, to better learn the relationship between each feature and actual PV output.

[0105] Step 30: Based on the pre-processed second historical actual output data, construct a sliding window feature and a hysteresis feature.

[0106] In this step, a sliding window feature is constructed based on the second historical actual output data, and specifically, the actual output data 2 to 8 days before the target date is used as the sliding window feature.

[0107] And constructing a lag feature based on the second historical actual output data, specifically using the historical actual output data of the target date one week before and after the historical same period as the target date as the lag feature.

[0108] Step 40: Use the Boruta algorithm to perform feature selection and obtain multiple input features.

[0109] The commonly used feature selection method based on correlation coefficient has a fast calculation speed and mainly measures the linear relationship between two variables. This method is suitable for identifying linearly correlated features, but may not capture nonlinear relationships or complex interactions between variables.

[0110] This step uses the Boruta algorithm for feature selection to obtain multiple input features as model input.

[0111] It should be noted that the Boruta algorithm is a feature selection method based on random forests. Its core idea is to identify features that are relevant to the dependent variable by comparing the importance of original features (real features) and randomly generated features (shadow features). The Boruta algorithm creates random copies of the original features, called shadow features, and uses them together with the original features to train the model. The algorithm determines which features are important by iteratively comparing the importance score of each feature with the importance score of the shadow features. The goal of the Boruta algorithm is to identify all features that are relevant to the dependent variable, not just to optimize the performance of a specific model.

[0112] Step 50: Calculate the correlation coefficient between each of the input features and the target output, modify each of the input features, and obtain feature data with preset weights.

[0113] Because the contribution of different features to actual PV output varies significantly, the correlation coefficient between each feature and the target output is calculated and used as the feature weight. Each feature is multiplied by its corresponding weight to obtain the input features with preset weights, which serve as the input feature data for the subsequent prediction model.

[0114] For example, assume that there are n input features, expressed as f = (f1, f2, ..., f n ), and its correlation coefficient with the target actual output is w=(w1,w2,…,w n ), then the characteristic data of each preset weight is expressed as x i =w i ·f i .

[0115] Step 60: splice a piece of pre-processed historical actual output data and corresponding feature data as a piece of sample data.

[0116] Step 70: Use each sample data as input to the LightGBM model, and use Optuna to optimize the parameters until the model converges.

[0117] The LightGBM proposed in the embodiment of the present invention belongs to the Gradient Boosting Decision Tree (GBDT) category of machine learning models. It optimizes GBDT based on gradient unilateral sampling and mutually exclusive feature binding. GBDT contains multiple weak classifiers and uses an additive model to continuously optimize and reduce the training residual of the previous weak classifier to achieve the goals of classification and regression. The LightGBM model adopts a histogram-based decision tree algorithm and a leaf node growth strategy with depth restriction, which has faster training speed and supports parallel learning.

[0118] During the LightGBM training process, each sample data is used as input, and Optuna is used for parameter optimization. The core parameters to be optimized include: ① the number of decision trees n_estimators; ② the decision tree depth max_depth; ③ the learning rate learning_rate; ④ the regularization terms reg_alpha and reg_lambda.

[0119] After training and optimization are completed, save the model.

[0120] On this basis, this step uses the corrected feature data as the input of the trained LightGBM model to obtain the first prediction result fL.

[0121] In step S5, the corrected feature data and the first prediction result are used as inputs of a pre-trained AttentionGRU model to obtain a second prediction result.

[0122] First, let’s introduce the training process of the AttentionGRU model:

[0123] S100, execute steps S10 to S70, and use each of the sample data as the input of the converged LightGBM model to obtain the corresponding third prediction result.

[0124] S200: Use each piece of sample data and the corresponding third prediction result as input to the AttentionGRU model, and use optuna to perform parameter optimization until the model converges.

[0125] The feature-mining-based attention mechanism and the Attention-Gated Recurrent Unit (GRU) network proposed in this embodiment of the present invention are short-term photovoltaic power prediction models. The Gated Recurrent Unit (GRU) is a variant of the Long Shot Term Memory (LSTM) model. It combines the forget gate and input gate of the LSTM into a single update gate, simplifying the model and making the calculation process faster and simpler. Although the GRU performs well in time series, it cannot represent the importance of hidden layer outputs.

[0126] Therefore, an attention mechanism is added to the GRU to reflect the importance of each output. Its function is to force the neural network to review the hidden vector corresponding to each instantaneous quantity in the source sequence at each step of the sequence decoding process, and retain useful information to enhance the currently used hidden vector.

[0127] Specifically, the Attention mechanism and the GRU model are combined to form the AttentionGRU model.

[0128] During the AttentionGRU model training process, each sample data and the corresponding third prediction result are used as input, and optuna is used for parameter optimization. The core parameters to be optimized include: ① hidden layer feature number hidden_size; ② number of network layers num_layer; ③ zero ratio dropout; ④ learning rate lr; ⑤ optimizer (Adam, RMSprop and SGD).

[0129] After training and optimization are completed, save the model.

[0130] On this basis, this step combines the corrected feature data and the first prediction result f L As the input of the pre-trained AttentionGRU model, the second prediction result fG is obtained.

[0131] In step S6, the first prediction result and the second prediction result are weightedly summed using the inverse error method to obtain a final short-term output prediction result of the photovoltaic power station to be predicted.

[0132] It is worth noting that since the LightGBM model is a boosting tree model and the AttentionGRU model is a recurrent neural network model, the two models have different principles and their prediction results are not highly correlated. Both have achieved good results in the prediction field. Therefore, the embodiment of the present invention combines the two to predict the final short-term output value of the photovoltaic power station.

[0133] Specifically, in this step, the prediction results of the two models are weighted and summed using the inverse error method to obtain the final short-term output prediction result. The inverse error method is as follows:

[0134] f PV =ω L f L +ω G f G

[0135]

[0136]

[0137] Among them, f PV Represents the final short-term output forecast result; ω L Represents the weight coefficient of the LightGBM model; ω G Represents the weight coefficient of the AttentionGRU model; e L 、e G Represent the errors of the LightGBM model and the AttentionGRU model respectively.

[0138] Through the inverse error method, the two models can be combined to reduce the overall error and thus improve the prediction accuracy.

[0139] At this point, the embodiment of the present invention completes the entire process of the photovoltaic power station short-term output prediction method based on the LightGBM-AttentionGRU combined model.

[0140] To help understand the superiority of the method provided by the embodiment of the present invention, the following specific verification process is given:

[0141] In actual application scenarios, the photovoltaic output forecast values ​​for 57 time points, from 05:45 to 19:45 on D+1, are generally carried out around 09:30 on the morning of D (during the night period, the photovoltaic output is 0 and has no prediction significance).

[0142] Taking a photovoltaic power station in Shanxi as an example, the specific process is as follows:

[0143] 1. Training phase:

[0144] First, we acquired data, including: ① Historical actual output data for the PV power station for the entire year of 2023. The actual output data was obtained at 15-minute intervals and 57 time points per day, with 05:45 being the first time point and 19:45 being the last time point. ② EC and GFS weather forecast data for the entire year of 2023. Some of this data can be found in Table 1.

[0145] Then, for historical actual output data, samples from historical power curtailment periods were removed. For NWP forecast data, based on the geographic coordinates of the PV plant, the weather forecast values ​​for the nearest latitude and longitude grid points were extracted from the NWP as the corresponding weather forecast features for the PV plant. Using linear interpolation upsampling, the extracted weather forecast data was converted to a 15-minute time resolution, consistent with the time interval of the actual output sample data. Outliers and missing values ​​in the historical actual output and NWP weather forecast data were then corrected, and the NWP weather forecast data was standardized.

[0146] Next, the processed historical actual output data is spliced ​​with the feature data of the preset weights to form the processed sample data.

[0147] The processed sample data is then fed into the previously constructed LightGBM model for model training. Optuna is used to optimize parameters during the training process. After training is complete, the model is saved. The trained model is then used to predict the corresponding date in 2023.

[0148] Finally, the processed sample data and the predicted value of LightGBM are fed into the aforementioned AttentionGRU model. Optuna is used for parameter optimization during the training process. After the training is completed, the model is saved.

[0149] So far, two trained photovoltaic output prediction models have been obtained, namely LightGBM and AttentionGRU.

[0150] 2. Prediction stage:

[0151] According to the aforementioned method, on the morning of D-day, the NWP data for the corresponding period of D+1 are obtained and preprocessed, and respectively fed into the aforementioned trained models to obtain two prediction values. Subsequently, the models are fused according to the aforementioned model fusion method to obtain the final PV output forecast value for D+1.

[0152] For the period from May 12, 2024 to May 23, 2024, some of the prediction results for this section can be found in Table 1. The complete prediction results are as follows: Figure 2 shown.

[0153] Table 1

[0154]

[0155]

[0156] It should be noted that the new method in Table 1 refers to the method provided in the embodiment of the present invention, and the original method refers to using a separate LightGBM model for prediction.

[0157] based on Figure 2 , we can get the accuracy comparison results in Table 2.

[0158] Table 2

[0159] date The accuracy of the new method Accuracy of the original method 2024 / 5 / 12 98.34% 97.03% 2024 / 5 / 13 96.39% 93.67% 2024 / 5 / 14 95.53% 88.41% 2024 / 5 / 15 85.54% 86.99% 2024 / 5 / 16 86.67% 76.58% 2024 / 5 / 17 97.24% 91.41% 2024 / 5 / 18 85.89% 80.57% 2024 / 5 / 19 64.51% 71.06% 2024 / 5 / 20 78.05% 72.08% 2024 / 5 / 21 88.62% 85.86% 2024 / 5 / 22 71.32% 71.71% 2024 / 5 / 23 96.28% 94.35% mean 87.03% 84.14%

[0160] As shown in Table 2, by adopting the method provided by the embodiment of the present invention, the average accuracy of photovoltaic output prediction of the photovoltaic power station on day D+1 reaches 87.03%, which is 2.89% higher than that of the original method.

[0161] Example 2:

[0162] The embodiment of the present invention provides a photovoltaic power station short-term output forecasting system based on the LightGBM-AttentionGRU combined model, including:

[0163] A data acquisition module is used to acquire and preprocess multi-source numerical meteorological forecast data and first historical actual output data of the photovoltaic power station to be predicted;

[0164] A feature construction module, configured to construct a plurality of features based on the preprocessed multi-source numerical meteorological forecast data and the first historical actual output data; wherein the features include at least irradiance features, statistical features, polynomial features, sliding window features, and hysteresis features;

[0165] a feature correction module, configured to correct each of the features based on a correlation coefficient between each of the features and the target output;

[0166] The first output prediction module is used to use the corrected feature data as the input of the pre-trained LightGBM model to obtain the first prediction result;

[0167] The second output prediction module is used to use the corrected feature data and the first prediction result as input to the pre-trained AttentionGRU model to obtain a second prediction result;

[0168] The result fusion module is used to perform weighted summation on the first prediction result and the second prediction result using the inverse error method to obtain the final short-term output prediction result of the photovoltaic power station to be predicted.

[0169] Example 3:

[0170] An embodiment of the present invention provides a storage medium storing a computer program for short-term output prediction of a photovoltaic power station based on a LightGBM-AttentionGRU combination model, wherein the computer program enables a computer to execute the short-term output prediction method of a photovoltaic power station as described in Example 1.

[0171] Example 4:

[0172] An embodiment of the present invention provides an electronic device, including:

[0173] One or more processors; a memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the photovoltaic power station short-term output prediction method as described in Example 1.

[0174] It can be understood that the photovoltaic power station short-term output prediction system, storage medium and electronic device based on the LightGBM-AttentionGRU combination model provided in the embodiments of the present invention correspond to the photovoltaic power station short-term output prediction method based on the LightGBM-AttentionGRU combination model provided in the embodiments of the present invention. The explanation, examples and beneficial effects of the relevant contents can refer to the corresponding parts in the photovoltaic power station short-term output prediction method, which will not be repeated here.

[0175] In summary, compared with the existing technology, the present invention has the following beneficial effects:

[0176] 1. The embodiment of the present invention is based on a combination model of the LightGBM model and the AttentionGRU model with different underlying principles, which improves the limitation of a single model that is difficult to perform scene migration and greatly improves the accuracy of short-term output prediction of photovoltaic power stations.

[0177] 2. This embodiment of the present invention utilizes high-precision multi-source meteorological forecast data, including EC and GFS. During preprocessing, samples corresponding to power-rationing periods are removed. Multiple methods are used to construct features, and the Boruta algorithm is used for feature selection to form input feature data with preset weights. The GRU model is modified using the attention mechanism, and the output of the LightGBM model is used as one of the input features during the AttentionGRU training process. This further improves the accuracy and efficiency of short-term output forecasts for photovoltaic power plants.

[0178] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations are intended to cover non-exclusive inclusion, so that a process, method, article, or device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of additional identical elements in the process, method, article, or device that includes the element.

[0179] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A photovoltaic power station short-term output prediction method based on the LightGBM-AttentionGRU combined model, characterized in that: include: Acquire and preprocess multi-source numerical meteorological forecast data and first historical actual output data of the photovoltaic power station to be predicted; The multi-source numerical meteorological forecast data include EC and GFS forecast data; Constructing a plurality of features based on the preprocessed multi-source numerical weather forecast data and the first historical actual output data, wherein the features include at least irradiance features, statistical features, polynomial features, sliding window features, and hysteresis features; Modifying each of the features based on a correlation coefficient between each of the features and the target output; wherein the Boruta algorithm is used in advance to perform feature selection to determine the correlation coefficient; Use the corrected feature data as the input of the pre-trained LightGBM model to obtain the first prediction result; The corrected feature data and the first prediction result are used as inputs of the pre-trained AttentionGRU model to obtain the second prediction result; The first prediction result and the second prediction result are weightedly summed using the inverse error method to obtain the final short-term output prediction result of the photovoltaic power station to be predicted.

2. The photovoltaic power station short-term output prediction method according to claim 1, characterized in that: The irradiance characteristics include the peak irradiance of the day and the difference between the irradiance at each moment and the peak irradiance; The statistical characteristics include one or a combination of any of the following: mean, standard deviation, coefficient of variation, skewness, kurtosis, range and total added value; The polynomial features refer to multiple new combined features obtained by performing addition, subtraction, multiplication and division operations on irradiance features or statistical features; The sliding window feature refers to the use of historical actual output data from 2 to 8 days before the target date; The lag feature refers to the historical actual output data of the week before and after the target day.

3. The method for short-term output prediction of a photovoltaic power station according to claim 2, wherein: The features specifically include: EC / GFS shortwave downward irradiance, EC / GFS daily peak irradiance, difference between EC / GFS irradiance and peak irradiance, GFS cloud cover, EC / GFS surface wind speed, EC humidity, EC air pressure, EC temperature, whether GFS has rain, whether GFS has snow, 0.8*EC irradiance + 0.2*GFS irradiance, square of EC irradiance, sliding window characteristics of actual power output on dates D-1 / D-2 / D-3, and lag characteristics of the week before and after the same date D+1 in the previous year; where D represents the current day.

4. The method for short-term output prediction of a photovoltaic power station according to claim 1, wherein: The training process of the LightGBM model includes: Acquire and preprocess historical EC and GFS forecast data and second historical actual output data; Based on the pre-processed historical EC and GFS forecast data, the irradiance features are constructed, and based on the pre-processed historical EC and GFS meteorological fields, the statistical features and polynomial features are constructed respectively. Based on the pre-processed second historical actual output data, sliding window features and hysteresis features are constructed respectively; Use Boruta algorithm for feature selection to obtain multiple input features; Calculating the correlation coefficient between each of the input features and the target output, modifying each of the input features, and obtaining feature data with a preset weight; A piece of pre-processed historical actual output data and the corresponding feature data are spliced ​​together as a piece of sample data; Each sample data is used as the input of the LightGBM model, and Optuna is used to optimize the parameters until the model converges.

5. The method for short-term output prediction of a photovoltaic power station according to claim 4, wherein: The training process of the AttentionGRU model includes: Each of the sample data and the corresponding third prediction result is used as the input of the AttentionGRU model, and optuna is used to optimize the parameters until the model converges; wherein the third prediction result is the prediction result obtained after the sample data is used as the input of the converged LightGBM model.

6. The method for short-term output prediction of a photovoltaic power station according to claim 1, wherein: The first prediction result and the second prediction result are weighted summed using the inverse error method to obtain the final short-term output prediction result of the photovoltaic power station to be predicted; expressed as: f PV =ω L f L +oh G f G Among them, f PV Indicates the final short-term output forecast result; ω L 、f L Represent the weight coefficient and the first prediction result of the LightGBM model respectively; ω G 、f G Represent the weight coefficient of the AttentionGRU model and the second prediction result respectively; e L 、e G Represent the errors of the LightGBM model and the AttentionGRU model respectively.

7. A photovoltaic power station short-term output prediction system based on the LightGBM-AttentionGRU combined model, characterized in that: include: A data acquisition module is used to acquire and preprocess multi-source numerical meteorological forecast data and first historical actual output data of the photovoltaic power station to be predicted; The multi-source numerical meteorological forecast data include EC and GFS forecast data; A feature construction module, configured to construct a plurality of features based on the preprocessed multi-source numerical meteorological forecast data and the first historical actual output data; wherein the features include at least irradiance features, statistical features, polynomial features, sliding window features, and hysteresis features; a feature correction module, configured to correct each of the features based on a correlation coefficient between each of the features and the target output; wherein the Boruta algorithm is used in advance to perform feature selection to determine the correlation coefficient; The first output prediction module is used to use the corrected feature data as the input of the pre-trained LightGBM model to obtain the first prediction result; The second output prediction module is used to use the corrected feature data and the first prediction result as input to the pre-trained AttentionGRU model to obtain a second prediction result; The result fusion module is used to perform weighted summation on the first prediction result and the second prediction result using the inverse error method to obtain the final short-term output prediction result of the photovoltaic power station to be predicted.

8. A storage medium, characterized in that: It stores a computer program for short-term output prediction of a photovoltaic power station based on a LightGBM-AttentionGRU combination model, wherein the computer program enables a computer to execute the short-term output prediction method of a photovoltaic power station according to any one of claims 1 to 6.

9. An electronic device, characterized in that: include: one or more processors; Memory; and one or more programs, wherein the one or more programs are stored in the memory and are configured to be executed by the one or more processors, and the programs include a method for executing the photovoltaic power station short-term output prediction method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Prediction method for photovoltaic power generation

    CN116760017A

  • Photovoltaic power prediction method and device, storage medium and equipment

    CN116826737A

  • Photovoltaic power generation power condition data generation method based on improved diffusion model

    CN119719839A

  • Short-term power prediction method, device and equipment of photovoltaic power station, medium and product

    CN119994873A