A photovoltaic power generation amount prediction method and device
Patent Information
- Application Number
- CN202110658296.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-15
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2041-06-15
AI Technical Summary
[0003]现有使用的光伏发电量预测系统大多以气象因素中的太阳辐照度作为重要 的输入特征,但是就目前而言我国辐照度观测站点很少,现有的数值天气预报 中也没有这一要素的预报,而且通过辐照度采集设备采集辐照度后预测辐照度 再预测发电量的方式成本较大,尤其是对于一些小型电站而言,并且中国天气 网提供的各地区的历史辐照度价格也很昂贵,因此,光伏发电量预测系统在实际应用中必须考虑去掉辐照度这一因素,然而在没有辐照度时预测模型的精度 就会显著降低
[0041] This invention proposes a method and apparatus for predicting photovoltaic power generation. Without considering the factor of irradiance, it constructs power generation characteristic data for each moment based on historical power generation data, obtains meteorological characteristic data based on historical meteorological data and historical power generation data, trains a pre-constructed prediction model based on the meteorological characteristic data, power generation characteristic data, and historical power generation data to obtain a process prediction model, and obtains the final prediction result based on the meteorological characteristic data, power generation characteristic data, and process prediction model. It is independent of irradiance and can adapt to various weather types to quickly predict photovoltaic power generation, and effectively improves the prediction accuracy.
Smart Images

Figure CN115481772B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of photovoltaic power generation technology, and in particular to a method and apparatus for predicting photovoltaic power generation. Background Technology
[0002] With the government's support for the development of the new energy industry, photovoltaic (PV) power generation is gradually increasing its share in the overall power supply structure. This has led to the emergence of many new technologies related to PV power generation, including PV power generation forecasting. PV power generation forecasting is the estimation of power generation over a future period. It is an important part of energy management systems, and accurate forecasting of future power generation is crucial for rationally planning power generation, saving on electricity costs, and reducing power generation expenses.
[0003] Most existing photovoltaic power generation prediction systems use solar irradiance, a meteorological factor, as an important input feature. However, there are very few irradiance observation stations in my country at present, and existing numerical weather prediction systems do not include this factor. Moreover, the method of predicting irradiance and then power generation by collecting irradiance data through irradiance acquisition equipment is costly, especially for some small power plants. Furthermore, the historical irradiance data provided by China Weather Network for various regions is also very expensive. Therefore, in practical applications, photovoltaic power generation prediction systems must consider removing the irradiance factor. However, without irradiance, the accuracy of the prediction model will be significantly reduced.
[0004] Therefore, how to improve the accuracy of prediction models in the absence of irradiance is an urgent problem to be solved in the field of photovoltaic power generation prediction. Summary of the Invention
[0005] To address the technical problems existing in the background art, the present invention proposes a method and apparatus for predicting photovoltaic power generation.
[0006] The present invention proposes a photovoltaic power generation prediction method, comprising:
[0007] Acquire historical meteorological data and historical power generation data of photovoltaic power stations at each moment within a preset time period;
[0008] The historical meteorological data and historical power generation data are preprocessed to obtain meteorological characteristic data and power generation characteristic data;
[0009] A dataset is constructed based on the meteorological characteristic data, power generation characteristic data, and historical power generation data.
[0010] The dataset is sampled according to a preset ratio to obtain a training subset and a test subset;
[0011] A prediction model is pre-built, and the prediction model is trained based on the training subset to obtain a process prediction model;
[0012] Based on the test subset and the process prediction model, the final prediction result is obtained;
[0013] The final prediction results are evaluated using various indicators.
[0014] Furthermore, the preprocessing of the historical meteorological data and historical power generation data to obtain meteorological characteristic data and power generation characteristic data specifically includes:
[0015] According to the XGBoost algorithm, the importance score of each weather factor feature in the historical meteorological data at each time moment to the historical power generation data at each time moment is calculated. The weather factor features affecting the historical power generation data are determined based on the importance score, and the weather factor features are used as meteorological feature data.
[0016] Based on the historical power generation data at each moment, extract the historical power generation data of the same moment in the previous N days for each moment, calculate the average value of the historical power generation data of the same moment in the previous N days for each moment, and use the average value as the power generation characteristic data of each moment.
[0017] Where N is a positive integer greater than zero.
[0018] Furthermore, the pre-construction of the prediction model and the training of the prediction model based on the training subset to obtain the process prediction model specifically includes:
[0019] Pre-build XGBoost and BLS models;
[0020] The XGBoost model is trained based on the meteorological characteristic data, power generation characteristic data, and historical power generation data in the training subset to obtain the process XGBoost model;
[0021] Based on the meteorological and power generation characteristic data in the training subset and the process XGBoost model, the process predicted power generation is obtained.
[0022] A new training subset is constructed based on the predicted power generation, meteorological characteristic data, and historical power generation data from the process described above;
[0023] The BLS model is trained based on the new training subset to obtain the process BLS model.
[0024] Further, obtaining the final prediction result based on the test subset and the process prediction model includes:
[0025] Based on the meteorological and power generation characteristic data and the process XGBoost model in the test subset, the target predicted power generation is obtained.
[0026] The final prediction result is obtained based on the meteorological characteristic data, target predicted power generation, and process BLS model in the test subset.
[0027] Furthermore, the evaluation of the final prediction result by indicators specifically includes:
[0028] The error is calculated by comparing the final prediction result with the historical power generation data in the test subset. The root mean square error (RMSE) and mean absolute error (MAE) are used as evaluation indicators for the error calculation.
[0029] Furthermore, the historical meteorological data includes temperature, humidity, atmospheric pressure, wind speed, weather conditions, and rainfall.
[0030] This invention also proposes a photovoltaic power generation prediction system, comprising: a data processing module, a data partitioning module, a prediction module, a training module, and an index evaluation module;
[0031] The data processing module is used to acquire historical meteorological data and historical power generation data of the photovoltaic power station at each moment within a preset time period, preprocess them to obtain meteorological characteristic data and power generation characteristic data, and construct a dataset based on the meteorological characteristic data, power generation characteristic data and historical power generation data;
[0032] The data partitioning module is used to sample the dataset according to a preset ratio to obtain a training subset and a test subset;
[0033] The training module is used to train a pre-built prediction model based on the training subset to obtain a process prediction model;
[0034] The prediction module is used to obtain the final prediction result based on the test subset and the process prediction model;
[0035] The indicator evaluation module is used to evaluate the final prediction results.
[0036] Furthermore, the prediction model is the XGBoost-BLS model.
[0037] This invention also proposes a photovoltaic power generation prediction device, comprising:
[0038] Memory, used to store computer programs;
[0039] A processor for executing the computer program to implement the steps of the photovoltaic power generation prediction method as described in any of the preceding claims.
[0040] The present invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the photovoltaic power generation prediction method as described in any of the preceding claims.
[0041] This invention proposes a method and apparatus for predicting photovoltaic power generation. Without considering the factor of irradiance, it constructs power generation characteristic data for each moment based on historical power generation data, obtains meteorological characteristic data based on historical meteorological data and historical power generation data, trains a pre-constructed prediction model based on the meteorological characteristic data, power generation characteristic data, and historical power generation data to obtain a process prediction model, and obtains the final prediction result based on the meteorological characteristic data, power generation characteristic data, and process prediction model. It is independent of irradiance and can adapt to various weather types to quickly predict photovoltaic power generation, and effectively improves the prediction accuracy. Attached Figure Description
[0042] Figure 1 This is a flowchart illustrating a photovoltaic power generation prediction method proposed in this invention.
[0043] Figure 2 Comparison of model prediction curves using the method of the present invention in the embodiments of the present invention. Figure 1 .
[0044] Figure 3 Comparison of model prediction curves using the method of the present invention in the embodiments of the present invention. Figure 2 .
[0045] Figure 4 Comparison of model prediction curves using the method of the present invention in the embodiments of the present invention. Figure 3 .
[0046] Figure 5 Comparison of model prediction curves using the method of the present invention in the embodiments of the present invention. Figure 4 .
[0047] Figure 6 Comparison of model prediction curves using the method of the present invention in the embodiments of the present invention. Figure 5 .
[0048] Figure 7 Comparison of model prediction curves using the method of the present invention in the embodiments of the present invention. Figure 6 . Detailed Implementation
[0049] One of the core ideas of this invention is to propose a photovoltaic power generation prediction method. In this method, without considering the irradiance factor, power generation characteristic data for each moment is constructed based on historical power generation data. Meteorological characteristic data is obtained based on historical meteorological data and historical power generation data. A pre-constructed prediction model is trained based on the meteorological characteristic data, power generation characteristic data, and historical power generation data to obtain a process prediction model. Finally, the prediction result is obtained based on the meteorological characteristic data, power generation characteristic data, and process prediction model, which effectively improves the prediction accuracy of the prediction model.
[0050] The photovoltaic power generation prediction method proposed in this invention will be described in detail below with reference to the accompanying drawings and specific embodiments. Figure 1 As shown, the method includes the following steps S1-S7.
[0051] This embodiment takes a domestic photovoltaic power station as an example to obtain its historical power generation data for the whole year of 2020 and its local historical meteorological data.
[0052] S1. Obtain historical meteorological data and historical power generation data of the photovoltaic power station at each moment within a preset time period.
[0053] The meteorological data includes temperature, humidity, atmospheric pressure, wind speed, weather conditions, and rainfall.
[0054] Of course, the meteorological data in this invention do not include the factor of irradiance.
[0055] The forecast period is the entire year of 2020.
[0056] S2. Preprocess the historical meteorological data and historical power generation data to obtain meteorological characteristic data and power generation characteristic data.
[0057] Specifically, based on the XGBoost algorithm, the importance score of each weather factor feature in the historical meteorological data at each time moment to the historical power generation data at each time moment is calculated. The weather factor features affecting the historical power generation data are determined based on the importance score, and the weather factor features are used as meteorological feature data. The importance scores are shown in Table 1.
[0058] Table 1
[0059]
[0060] As can be seen from Table 1, the importance of historical power generation data is ranked as follows: temperature, humidity, and atmospheric pressure. Other factors have a relatively small impact. Although weather conditions have a relatively low importance, this feature can identify the weather type in future forecasts. Therefore, based on the importance score, this embodiment determines temperature, humidity, atmospheric pressure, and weather conditions as meteorological feature data.
[0061] Specifically, based on the historical power generation data for each time point, historical power generation data for the same time point in the preceding N days are extracted for each time point. The average value of the historical power generation data for the same time point in the preceding N days for each time point is calculated, and this average value is used as the power generation characteristic data for each time point; where N is a positive integer greater than zero. This setting takes into account factors such as cloud computing power and network latency during actual online operation, thereby reducing calculation errors.
[0062] In this embodiment, based on the historical power generation data at each time point, the historical power generation data at the same time point in the previous four days is extracted for each time point.
[0063] Of course, the determination of the first N days needs to be calculated based on the actual situation for different photovoltaic power stations.
[0064] S3. Construct a dataset based on the meteorological characteristic data, power generation characteristic data, and historical power generation data.
[0065] Each time point corresponds to a meteorological feature data point, a power generation feature data point, and a historical power generation data point. The meteorological feature data point and the power generation feature data point serve as input features for the subsequent prediction model, while the historical power generation data point serves as output features for the subsequent model. Therefore, each input feature corresponds to one output feature.
[0066] S4. The dataset is sampled according to a preset ratio to obtain a training subset and a test subset.
[0067] The preset sampling ratio for the dataset is: training set > test set.
[0068] Preferably, 90% of the meteorological feature data, the power generation feature data corresponding to the meteorological feature data, and the historical power generation data corresponding to the meteorological feature data in the dataset are divided into a training subset, and the remaining 10% is a test subset.
[0069] S5. Pre-build a prediction model and train the prediction model based on the training subset to obtain a process prediction model.
[0070] The prediction model is either the XGBoost model, the XGBoost-LSTM model, or the XGBoost-BLS model.
[0071] Specifically, when the prediction model is an XGBoost-BLS model, the XGBoost model and the BLS model are pre-built;
[0072] The XGBoost model is trained based on the meteorological characteristic data, power generation characteristic data, and historical power generation data in the training subset to obtain the process XGBoost model;
[0073] Based on the meteorological and power generation characteristic data in the training subset and the process XGBoost model, the process predicted power generation is obtained.
[0074] A new training subset is constructed based on the predicted power generation, meteorological characteristic data, and historical power generation data from the process described above;
[0075] The BLS model is trained based on the new training subset to obtain the process BLS model.
[0076] S6. Obtain the final prediction result based on the test subset and the process prediction model.
[0077] Among them, when the prediction model is the XGBoost-BLS model, the target predicted power generation is obtained based on the meteorological characteristic data and power generation characteristic data in the test subset and the process XGBoost model.
[0078] The final prediction result is obtained based on the meteorological characteristic data, target predicted power generation, and process BLS model in the test subset.
[0079] S7. Evaluate the final prediction results using relevant indicators.
[0080] Specifically, the error between the final prediction result and the historical power generation data in the test subset is calculated, and the root mean square error (RMSE) and mean absolute error (MAE) are used as evaluation indicators for the error calculation.
[0081] The mathematical descriptions of the root mean square error (RMSE) and the mean absolute error (MAE) are as follows:
[0082]
[0083]
[0084] In the formula, P Mi Let P be the historical power generation data at time i. Pi Let be the final prediction result at time i, and n represent the number of prediction times.
[0085] Referring to Table 2, further, the step of extracting the historical power generation data of each time point from the historical power generation data of the same time point in the preceding 4 days specifically includes:
[0086] Based on the historical power generation data at each moment, extract the historical power generation data at the same moment in the previous 5 days for each moment, calculate the average value of the historical power generation data at the same moment from the previous 1 day to the previous 5 days for each moment, and calculate the importance score of the average value at the same moment from the previous day to the previous 5 days to the historical power generation data according to the XGBoost algorithm.
[0087] Calculate the average value of historical power generation data at the same time from the previous 1 day to the previous 5 days and the mean square error of historical power generation data respectively;
[0088] Based on importance scores and mean squared error, historical power generation data for each time point at the same time in the preceding four days are determined.
[0089] Table 2
[0090]
[0091] Reference Figures 2-7 The present invention proposes three photovoltaic power generation prediction methods based on the XGBoost model, the XGBoost-LSTM model and the XGBoost-BLS model, which predict the same prediction date and evaluate the final prediction results.
[0092] The dates to be predicted are July 12, November 25, November 29, November 30, December 28, and December 31, with each date including 24 possible prediction times.
[0093] The weather forecast for November 30 and December 31 is sunny, for July 12 and November 29 it is cloudy and overcast, and for November 25 and December 28 it is rainy or snowy.
[0094] The parameter settings for the three models are shown in Table 3.
[0095] Table 3
[0096]
[0097] Based on the above model parameters, the power generation prediction curves of the three photovoltaic power generation prediction methods proposed in this invention—based on the XGBoost model, XGBoost-LSTM model, and XGBoost-BLS model—are compared under sunny conditions, as shown in the figure below. Figure 2 and Figure 3As shown in Table 4, the evaluation indicators are as follows.
[0098] Table 4
[0099]
[0100] Based on the above model parameters, the power generation prediction curves of the three photovoltaic power generation prediction methods proposed in this invention—based on the XGBoost model, the XGBoost-LSTM model, and the XGBoost-BLS model—are compared under cloudy and overcast weather conditions, as shown in the figure below. Figure 4 and Figure 5 As shown in Table 5, the evaluation indicators are as follows.
[0101] Table 5
[0102]
[0103] Based on the above model parameters, the power generation prediction curves of the three photovoltaic power generation prediction methods proposed in this invention—based on the XGBoost model, the XGBoost-LSTM model, and the XGBoost-BLS model—are compared under rainy and snowy weather conditions, as shown in the figure below. Figure 6 and Figure 7 As shown in Table 6, the evaluation indicators are as follows.
[0104] Table 6
[0105]
[0106] From Table 4-6 and Figure 2-7 As can be seen, in the absence of irradiance data, this invention effectively improves the prediction accuracy of the prediction model by constructing power generation characteristic data for each moment and inputting the power generation characteristic data and meteorological characteristic data into the prediction model. Moreover, the photovoltaic power generation prediction method based on the XGBoost-BLS model proposed in this invention has better prediction accuracy than the prediction accuracy when using the XGBoost model alone under three weather types. It is also stronger than the XGBoost-LSTM model in terms of computing speed and prediction accuracy, which fully demonstrates that the photovoltaic power generation prediction method based on the XGBoost-BLS model proposed in this invention is more suitable for online prediction.
[0107] This invention also proposes a photovoltaic power generation prediction system, comprising: a data processing module, a data partitioning module, a prediction module, a training module, and an index evaluation module;
[0108] The data processing module is used to acquire historical meteorological data and historical power generation data of the photovoltaic power station at each moment within a preset time period, preprocess them to obtain meteorological characteristic data and power generation characteristic data, and construct a dataset based on the meteorological characteristic data, power generation characteristic data and historical power generation data;
[0109] The data partitioning module is used to sample the dataset according to a preset ratio to obtain a training subset and a test subset;
[0110] The training module is used to train a pre-built prediction model based on the training subset to obtain a process prediction model;
[0111] The prediction module is used to obtain the final prediction result based on the test subset and the process prediction model;
[0112] The indicator evaluation module is used to evaluate the final prediction results.
[0113] Preferably, the prediction model is based on the XGBoost-BLS model.
[0114] This invention also proposes a photovoltaic power generation prediction device, comprising:
[0115] Memory, used to store computer programs;
[0116] A processor for executing the computer program to implement the steps of the photovoltaic power generation prediction method as described in any of the preceding claims.
[0117] The present invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the photovoltaic power generation prediction method as described in any of the preceding claims.
[0118] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A photovoltaic power generation amount prediction method characterized by, include: Acquire historical meteorological data and historical power generation data of photovoltaic power stations at each moment within a preset time period; The historical meteorological data and historical power generation data are preprocessed to obtain meteorological characteristic data and power generation characteristic data; A dataset is constructed based on the meteorological characteristic data, power generation characteristic data, and historical power generation data. The dataset is sampled according to a preset ratio to obtain a training subset and a test subset; A prediction model is pre-built, and the prediction model is trained based on the training subset to obtain a process prediction model; The final prediction result is obtained based on the test subset and the process prediction model; The final prediction results are evaluated using various indicators. The preprocessing of the historical meteorological data and historical power generation data to obtain meteorological characteristic data and power generation characteristic data specifically includes: According to the XGBoost algorithm, the importance score of each weather factor feature in the historical meteorological data at each time moment to the historical power generation data at each time moment is calculated. The weather factor features affecting the historical power generation data are determined based on the importance score, and the weather factor features are used as meteorological feature data. Based on the historical power generation data at each moment, extract the historical power generation data of the same moment in the previous N days for each moment, calculate the average value of the historical power generation data of the same moment in the previous N days for each moment, and use the average value as the power generation characteristic data of each moment; where N is a positive integer greater than zero. The pre-constructed prediction model, and the process prediction model trained based on the training subset, specifically includes: Pre-build XGBoost and BLS models; The XGBoost model is trained based on the meteorological characteristic data, power generation characteristic data, and historical power generation data in the training subset to obtain the process XGBoost model; Based on the meteorological and power generation characteristic data and the process XGBoost model in the training subset, the process predicted power generation is obtained. A new training subset is constructed based on the predicted power generation, meteorological characteristic data, and historical power generation data from the process described above; The BLS model is trained based on the new training subset to obtain the process BLS model; The prediction model is the XGBoost-BLS model; The historical meteorological data includes temperature, humidity, atmospheric pressure, wind speed, weather conditions, and rainfall, but excludes irradiance.
2. The photovoltaic power generation amount prediction method according to claim 1, characterized by, The step of obtaining the final prediction result based on the test subset and the process prediction model specifically includes: Based on the meteorological characteristic data and power generation characteristic data in the test subset and the process XGBoost model, the target predicted power generation is obtained; The final prediction result is obtained based on the meteorological characteristic data, target predicted power generation, and process BLS model in the test subset.
3. The photovoltaic power generation amount prediction method according to claim 2, characterized by, The evaluation of the final prediction result by indicators specifically includes: The error is calculated by comparing the final prediction result with the historical power generation data in the test subset. The root mean square error (RMSE) and mean absolute error (MAE) are used as evaluation indicators for the error calculation.
4. A photovoltaic power generation amount prediction system characterized by comprising: include: Data processing module, data partitioning module, prediction module Blocks, training modules, and metric evaluation modules; The data processing module is used to acquire historical meteorological data and historical power generation data of the photovoltaic power station at each moment within a preset time period, preprocess them to obtain meteorological characteristic data and power generation characteristic data, and construct a dataset based on the meteorological characteristic data, power generation characteristic data and historical power generation data; The data partitioning module is used to sample the dataset according to a preset ratio to obtain a training subset and a test subset; The training module is used to train a pre-built prediction model based on the training subset to obtain a process prediction model; The prediction module is used to obtain the final prediction result based on the test subset and the process prediction model; The indicator evaluation module is used to evaluate the final prediction results. The data processing module specifically includes: According to the XGBoost algorithm, the importance score of each weather factor feature in the historical meteorological data at each time moment to the historical power generation data at each time moment is calculated. The weather factor features affecting the historical power generation data are determined based on the importance score, and the weather factor features are used as meteorological feature data. Based on the historical power generation data at each moment, extract the historical power generation data of the same moment in the previous N days for each moment, calculate the average value of the historical power generation data of the same moment in the previous N days for each moment, and use the average value as the power generation characteristic data of each moment; where N is a positive integer greater than zero. The prediction module specifically includes: Pre-build XGBoost and BLS models; The XGBoost model is trained based on the meteorological characteristic data, power generation characteristic data, and historical power generation data in the training subset to obtain the process XGBoost model; Based on the meteorological and power generation characteristic data and the process XGBoost model in the training subset, the process predicted power generation is obtained. A new training subset is constructed based on the predicted power generation, meteorological characteristic data, and historical power generation data from the process described above; The BLS model is trained based on the new training subset to obtain the process BLS model; The prediction model is the XGBoost-BLS model.
5. A photovoltaic power generation amount prediction device characterized by comprising: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the photovoltaic power generation prediction method as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the photovoltaic power generation prediction method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Photovoltaic power station electricity generation output power forecasting method based on similar days
CN103390200A
Application of XGBoost to short-term load prediction
CN108510113A
Wind power prediction method based on VMD and BLS combined model
CN112381279A
Photovoltaic power generation power prediction method based on width learning system
CN112381282A