Short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration

By adopting multi-model multi-layer stacking and integration methods in short-term photovoltaic power prediction, multiple features are extracted and multi-layer stacking models are constructed, the problem of unstable prediction effects in the prior art is solved, and higher prediction accuracy and stability are achieved.

CN120033668APending Publication Date: 2025-05-23STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO

Patent Information

Application Number
CN202411960378.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

The existing short-term photovoltaic power prediction methods have unstable prediction effects in some meteorological weather conditions, and there are noise characteristics in the generated features, which affect the prediction accuracy.

Method used

A short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration is adopted. By obtaining historical predicted meteorological data, time characteristics, irradiation difference characteristics, temperature difference characteristics and temperature-humidity ratio characteristics are extracted, and a multi-layer stacking model is constructed, including multiple sub-models and linear regression layers, and the final prediction is enhanced by layer-by-layer learning.

Benefits of technology

Improve the accuracy and stability of short-term photovoltaic power prediction, enhance the model's ability to capture potential relationships, and reduce the impact of noise characteristics.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120033668A_ABST
    Figure CN120033668A_ABST
Patent Text Reader

Abstract

The invention relates to a short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration, and the method comprises the following steps: obtaining historical prediction meteorological data of a photovoltaic power station to be predicted, carrying out the preprocessing, generating a historical prediction meteorological data sequence, and obtaining original meteorological characteristics; performing feature extraction on the historical prediction meteorological data sequence, wherein the extracted features comprise a time feature, an irradiation difference feature, a temperature difference feature and a temperature-humidity ratio feature; combining the original meteorological features and the extracted features into model input features, and taking the model input features as input of a trained short-term photovoltaic power prediction model to obtain a prediction result; the short-term photovoltaic power prediction model is a multi-layer stacked model and comprises a plurality of sub-models and a linear regression layer, each sub-model takes model input characteristics and outputs of all previous sub-models as inputs, and the linear regression layer synthesizes the outputs of the sub-models to obtain a prediction result. Compared with the prior art, the method has the advantages of high prediction accuracy, stable effect and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of short-term photovoltaic power prediction, and in particular to a short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration. Background Art

[0002] Short-term photovoltaic power forecasting refers to predicting the active power of photovoltaic power stations in the next few days based on forecast meteorological data. Accurate short-term photovoltaic power forecasting can not only optimize the dispatch of the power grid and ensure the stable operation of the power grid, but also provide decision-making support for energy management, thereby promoting the widespread application of renewable energy and the sustainable development of the power market. Therefore, it is particularly important to improve the accuracy of short-term photovoltaic power forecasting. For example, Chinese patent CN105404937A proposes a photovoltaic power station power forecast correction method. By establishing a prediction model for light intensity and component backplane temperature, and constructing a correction coefficient function with backplane temperature as the independent variable, it realizes the accurate prediction of the output power of the photovoltaic power station.

[0003] However, in the prior art, predicted meteorological data is generally used as training features, or cross-features are used to generate a large number of features for training. However, some noise features exist in the large number of generated features, and a single model or multiple models are usually used for prediction. In some meteorological weather conditions, the prediction effect of the model is not very stable.

[0004] Therefore, it is necessary to propose a new short-term photovoltaic power prediction method. Summary of the invention

[0005] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and to provide a short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration with high prediction accuracy and stable effect, so as to improve the accuracy of short-term photovoltaic power prediction and promote its implementation in the power system and new energy fields.

[0006] The purpose of the present invention can be achieved by the following technical solutions:

[0007] A short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration includes the following steps:

[0008] Obtain the historical forecast meteorological data of the photovoltaic power station to be predicted, perform preprocessing, generate a historical forecast meteorological data sequence, and obtain the original meteorological characteristics;

[0009] Extracting features from the historical forecast meteorological data sequence, the extracted features including time features, radiation difference features, temperature difference features and temperature-humidity ratio features;

[0010] Combining the original meteorological features and the extracted features into model input features, and using the model input features as inputs of a trained short-term photovoltaic power prediction model to obtain prediction results;

[0011] Among them, the short-term photovoltaic power prediction model is a multi-layer stacked model, including multiple sub-models connected in sequence and linear regression layers connected to each sub-model respectively. Each sub-model takes the model input features and the outputs of all previous sub-models as input, and the linear regression layer integrates the outputs of each sub-model to obtain the prediction result.

[0012] Furthermore, when training the short-term photovoltaic power prediction model, each sub-model and the linear regression layer are trained in sequence using the training set. When training each sub-model, the outputs of all previous sub-models for the training set are used as features and combined with the training set to train the current sub-model. When training the linear regression layer, the outputs of all sub-models for the training set are input into the linear regression layer for training.

[0013] Furthermore, a k-fold cross-validation method is used to train each of the sub-models.

[0014] Furthermore, the sub-models include multiple ones of elastic net, LightGBM, Xgboost, LSTM and Catboost.

[0015] Furthermore, the last sub-model includes at least two basic models arranged in parallel, and the two basic models both take the model input features and the outputs of all previous sub-models as input, and the outputs of the two basic models are simultaneously input into the linear regression layer.

[0016] Furthermore, the preprocessing removes duplicate data, repairs missing data, removes abnormal data and screens for strongly correlated features.

[0017] Furthermore, the time characteristics include periodic hour and minute time characteristics and month time characteristics. The hour and minute time characteristics are used for sunshine changes, and the month time characteristics are used for seasonal changes.

[0018] Furthermore, after training the short-term photovoltaic power prediction model, it also includes evaluating the trained short-term photovoltaic power prediction model, and the evaluation indicators used in the evaluation include multiple ones of mean absolute error, root mean square error, determination coefficient and accuracy.

[0019] Furthermore, the model input features of each of the sub-model inputs are the same or different.

[0020] The present invention also provides a computer-readable storage medium, comprising one or more programs for execution by one or more processors of an electronic device, wherein the one or more programs include instructions for executing the short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration as described above.

[0021] Compared with the prior art, the present invention has the following beneficial effects:

[0022] 1. In addition to using historical forecast meteorological data, the present invention also constructs new features that are strongly correlated with photovoltaic power based on historical meteorological data and corresponding time, including time features, irradiation difference features, temperature difference features and temperature-humidity ratio features, which can achieve short-term photovoltaic power prediction more accurately and stably.

[0023] 2. The present invention uses a multi-layer stacked short-term photovoltaic power prediction model for prediction. The fusion of the model occurs not only in a single meta-learning layer, but also through gradual stacking to establish a more complex prediction architecture. The output of each layer can be used as the input of the next layer and integrated with the original features to further enhance the model's ability to capture potential relationships. At the same time, models at different levels can focus on capturing different features or patterns, and enhance the final prediction through layer-by-layer learning, further improving the prediction accuracy and stability. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 It is a schematic diagram of the overall process of constructing and training the short-term photovoltaic power prediction model of the present invention;

[0025] Figure 2 A schematic diagram of the structure of a short-term photovoltaic power prediction model provided in an embodiment of the present invention;

[0026] Figure 3 Schematic diagram of a specific training process of a short-term photovoltaic power prediction model in an embodiment of the present invention. DETAILED DESCRIPTION

[0027] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0028] Example 1

[0029] The present embodiment provides a short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration, comprising the following steps: obtaining historical forecast meteorological data of a photovoltaic power station to be predicted, and performing preprocessing to generate a historical forecast meteorological data sequence, and obtaining original meteorological features, including temperature, humidity, irradiance, air pressure, wind speed, rainfall, etc.; performing feature extraction on the historical forecast meteorological data sequence, the extracted features including time features, irradiance differential features, temperature difference features, and temperature-humidity ratio features; combining the original meteorological features and the extracted features into model input features, and using the model input features as input of a trained short-term photovoltaic power prediction model to obtain a prediction result.

[0030] This embodiment, through the construction of the above-mentioned multiple features, can achieve short-term photovoltaic power prediction more accurately and stably.

[0031] In this embodiment, the short-term photovoltaic power prediction model is a multi-layer stacked model, including multiple sub-models connected in sequence and linear regression layers connected to each sub-model respectively, each sub-model takes the model input features and the output of all previous sub-models as input, and the linear regression layer integrates the output of each sub-model to obtain the prediction result. Through the above multi-layer stacked model, the final prediction is enhanced by learning layer by layer, further improving the prediction accuracy and stability.

[0032] like Figure 1 As shown, the construction and training process of the short-term photovoltaic power prediction model in this embodiment includes the following steps:

[0033] S1. Collect historical data. Collect historical data of photovoltaic power stations as training data. The historical data includes historical actual power data and historical forecast meteorological data and corresponding time. The time resolution is 15 minutes. The historical forecast meteorology includes temperature, humidity, irradiance, air pressure, wind speed, rainfall, etc.

[0034] S2. Data preprocessing: The collected historical data are preprocessed. The specific operations include removing duplicate data, repairing missing data, and eliminating abnormal data. According to the correlation between each feature and photovoltaic power, the meteorological features with strong correlation are screened out to form the original meteorological features.

[0035] In this embodiment, the Pearson correlation coefficient is used to analyze the correlation between various meteorological data and photovoltaic power. The calculation formula of the Pearson correlation coefficient is as follows:

[0036]

[0037] Where n is the sequence length, x i and i are the i-th variables of the sequences X and Y respectively, and are the means of series X and Y respectively.

[0038] S3. Construct new features. When predicting photovoltaic power, the information obtained by relying solely on meteorological data is limited, and the model cannot fully capture the interaction between meteorological data. Therefore, it is necessary to construct some features that are strongly correlated with photovoltaic power based on historical forecast meteorological data and corresponding time to form extracted features, including:

[0039] 1. Time characteristics. The prediction of photovoltaic power is affected by many periodic factors, including periodic changes such as sunshine and seasons. Therefore, it is necessary to construct a periodic feature to describe its periodic changes. For sunshine changes, hour and minute time characteristics are constructed, and for seasonal changes, month time characteristics are constructed. The specific operation is to add the hour feature data to the minute feature data, and perform sine and cosine transformation on it and the month feature data respectively, to generate hour and minute time characteristics and month time characteristics with strong periodicity.

[0040] In this embodiment, the calculation formula of the sine-cosine conversion is as follows, where x is the time characteristic data, and period is the period length, which is set to 96 here.

[0041] sin_x=sin(2*π*x / period)

[0042] cos_x=cos(2*π*x / period)

[0043] 2. Irradiation differential feature. The irradiation at each moment is subtracted from the irradiation at the previous moment to obtain the irradiation differential feature, which can highlight the changing trend of irradiation and reflect the changing trend of photovoltaic power to a certain extent.

[0044] 3. Temperature difference characteristics. Subtract the current temperature from the lowest temperature of the day to obtain the temperature difference characteristics. Temperature will affect the output power of photovoltaic modules through their physical properties, and the temperature difference characteristics reflect the temperature change of the day. The larger the temperature difference, the faster the temperature change of the day, which helps to reflect the change of the output power of photovoltaic modules.

[0045] 4. Temperature and humidity ratio characteristics. Both temperature and humidity have a certain impact on photovoltaic power, and these two characteristics will also affect each other. For example, when the temperature is too high, it will affect the photovoltaic modules, causing their temperature to rise and the output power to decrease, while humidity can reduce the temperature of the photovoltaic modules and increase their output power. The ratio of temperature to humidity can reflect the relationship between the two.

[0046] S4. Construct a short-term photovoltaic power prediction model. This embodiment constructs a multi-layer stacked short-term photovoltaic power prediction model, including multiple sub-models connected in sequence and linear regression layers (LinearRegression) connected to each sub-model respectively. Each sub-model takes the model input features composed of the original meteorological features and the extracted features and the output of all previous sub-models as input. The linear regression layer is used to integrate the output of each sub-model. The sub-model can be regarded as a base learner, and the linear regression layer is used as a meta-learner. The sub-model may include multiple ones of ElasticNet, LightGBM, Xgboost, LSTM and Catboost. The model input features input by each of the sub-models may be the same or different.

[0047] In a specific implementation, each sub-model may respectively adopt a basic model, and the last sub-model may also include at least two basic models arranged in parallel, and the two basic models both take the model input features and the outputs of all previous sub-models as input, and the outputs of the two basic models are simultaneously input into the linear regression layer.

[0048] like Figure 2 As shown, in the multi-layer stacked structure of the short-term photovoltaic power prediction model designed in this embodiment:

[0049] The first layer of the model is the ElasticNet, which combines the advantages of L1 regularization and L2 regularization. It can simultaneously select important features and control model complexity, and improve the robustness of the model in high-dimensional data scenarios.

[0050] The second layer is LightGBM, which is usually faster than the traditional gradient boosting algorithm in terms of training speed and can converge to the optimal solution faster. In addition to the data to be predicted, the input of this layer also includes the prediction results of the first layer.

[0051] The third layer is Xgboost, which introduces regularization terms to control the complexity of the model, helps prevent overfitting, improves the generalization ability of the model, and uses cache optimization and approximate algorithms to improve training efficiency. The input of this layer includes the data to be predicted and the prediction results of the first two layers.

[0052] The fourth layer is LSTM and Catboost. Catboost is an efficient gradient boosting algorithm, which has significant advantages in processing categorical features. It can automatically process categorical variables, reduce the workload of feature engineering, and improve the accuracy and stability of the model. LSTM can capture the time series characteristics and long-term dependencies in the data, making up for the shortcomings of other models that cannot capture time characteristics. The input of this layer is the data to be predicted and the prediction results of the first three layers.

[0053] Finally, there is a linear regression layer. The first four layers of the model serve as base learners, and the last layer serves as a meta-learner. The prediction results of the base learners are used as feature inputs.

[0054] In the above multi-layer stacked model, the model fusion not only occurs in a single meta-learning layer, but also through step-by-step stacking to build a more complex prediction architecture. The output of each layer can be used as the input of the next layer, combined with the original features, to further enhance the model's ability to capture potential relationships. Models at different levels can focus on capturing different features or patterns, and enhance the final prediction through layer-by-layer learning.

[0055] S5. Train the short-term photovoltaic power prediction model.

[0056] In this embodiment, the data set is divided into a training set and a test set. The k-fold cross-validation method is used to train the model of the base learner. First, the training set is used to train the elastic net and generate the prediction result T1 of the elastic net; then, the prediction result T1 of the elastic net is used as a feature to combine with the training data to train LightGBM and generate the prediction result T2 of LightGBM; then, the prediction results T1 and T2 of the first two layers are used as features to combine with the training data to train Xgboost and generate the prediction result T3 of Xgboost; then, the prediction results T1, T2, and T3 of the first three layers are used as features to combine with the training data to train LSTM and Catboost and generate the prediction result T4 of LSTM and the prediction result T5 of Catboost; finally, the outputs T1, T2, T3, T4, and T5 of these five base learners are used as features to be input into the meta-learner linear regression layer for training, and finally the trained short-term photovoltaic power prediction model is obtained.

[0057] As Figure 3 shown, the specific training process of the short-term photovoltaic power prediction model includes the following steps:

[0058] S51. Divide the processed data set into a training set and a test set.

[0059] S52. Train the first-layer elastic net. The k-fold cross-validation method is used for model training. The specific operation is to divide the training set into k sub-training sets, take one of the k sub-training sets as the validation set, and the remaining k - 1 sub-training sets as the training set to train the model, and use the validation set for prediction to obtain the prediction result corresponding to the validation set. A total of k times of training are performed to obtain the prediction result T1 corresponding to the entire data set.

[0060] S53. Train the second-layer LightGBM. The prediction result T1 of the first layer is added as a new feature to the original training set, and the k-fold cross-validation method is also used to train the model, and finally the prediction result T2 corresponding to the entire data set is obtained.

[0061] S54, train the third layer Xgboost. The prediction results T1 and T2 of the first two layers are added to the original training set as new features, and the model is trained using the k-fold cross-validation method, and finally the prediction result T3 corresponding to the entire data set is obtained.

[0062] S55, train the fourth layer LSTM and Catboost. The prediction results T1, T2, and T3 of the first three layers are added to the original training set as new features. The k-fold cross-validation method is also used to train the LSTM and Catboost models respectively, and finally the prediction results T4 and T5 corresponding to the entire data set are obtained.

[0063] S56, training the linear regression layer of the meta-learner. The prediction results T1, T2, T3, T4, and T5 of the previous four layers are combined to generate a new data set, which is used as the training set of the meta-learner to train the meta-learner and obtain a short-term photovoltaic power prediction model.

[0064] S6. Prediction and evaluation of short-term photovoltaic power prediction model. Input the test set into the above short-term photovoltaic power prediction model to obtain the test results, and use relevant evaluation indicators to evaluate the model effect. In this embodiment, the evaluation indicators include mean absolute error MAE, root mean square error RMSE, determination coefficient R2 and accuracy, and the calculation formula is as follows:

[0065]

[0066] accuracy = 1-RMSE

[0067] Where n is the number of all samples, P Pi is the actual output at time i, P Mi is the predicted output at time i, C i is the installed capacity at time i, It is the average value of the actual output during the error statistics period.

[0068] If the above method is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0069] Example 2

[0070] This embodiment provides an electronic device, including one or more processors, a memory and one or more programs stored in the memory, wherein the one or more programs include instructions for executing the short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration as described in Example 1.

[0071] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The scheme in the embodiments of the present invention may be implemented in various computer languages, for example, object-oriented programming language Java and interpreted scripting language Python, etc.

[0072] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0073] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.

Claims

1. A short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration, characterized in that: The following steps are involved: Obtain the historical forecast meteorological data of the photovoltaic power station to be predicted, perform preprocessing, generate a historical forecast meteorological data sequence, and obtain the original meteorological characteristics; Extracting features from the historical forecast meteorological data sequence, the extracted features including time features, radiation difference features, temperature difference features and temperature-humidity ratio features; Combining the original meteorological features and the extracted features into model input features, and using the model input features as inputs of a trained short-term photovoltaic power prediction model to obtain prediction results; Among them, the short-term photovoltaic power prediction model is a multi-layer stacked model, including multiple sub-models connected in sequence and linear regression layers connected to each sub-model respectively. Each sub-model takes the model input features and the outputs of all previous sub-models as input, and the linear regression layer integrates the outputs of each sub-model to obtain the prediction result.

2. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 1 is characterized in that: When training the short-term photovoltaic power prediction model, each sub-model and the linear regression layer are trained in sequence using the training set. When training each sub-model, the outputs of all previous sub-models for the training set are used as features and combined with the training set to train the current sub-model. When training the linear regression layer, the outputs of all sub-models for the training set are input into the linear regression layer for training.

3. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 2 is characterized in that: The k-fold cross validation method was used to train each sub-model.

4. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 1 is characterized in that: The sub-models include multiple ones of Elastic Net, LightGBM, Xgboost, LSTM and Catboost.

5. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 1 is characterized in that: The last sub-model includes at least two basic models arranged in parallel, and the two basic models both take the model input features and the outputs of all previous sub-models as input, and the outputs of the two basic models are simultaneously input into the linear regression layer.

6. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 1 is characterized in that: The preprocessing removes duplicate data, repairs missing data, removes abnormal data and screens for highly correlated features.

7. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 1 is characterized in that: The time characteristics include periodic hour and minute time characteristics and month time characteristics. The hour and minute time characteristics are used for sunshine changes, and the month time characteristics are used for seasonal changes.

8. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 1 is characterized in that: After training the short-term photovoltaic power prediction model, the method further includes evaluating the trained short-term photovoltaic power prediction model, wherein the evaluation indicators used in the evaluation include multiple of mean absolute error, root mean square error, determination coefficient and accuracy.

9. The short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration according to claim 1 is characterized in that: The model input features of the sub-model inputs are the same or different.

10. A computer-readable storage medium, characterized in that: It includes one or more programs for execution by one or more processors of an electronic device, and the one or more programs include instructions for executing the short-term photovoltaic power prediction method based on multi-model multi-layer stacking and integration as described in any one of claims 1-9.

Citation Information

Patent Citations

  • Photovoltaic plant short-term power prediction method and system

    CN105404937A

Cited By

  • Photovoltaic meteorological monitoring method and system based on multi-sensor cooperation

    CN121479705A