Search

CN-121980137-A - Photovoltaic power prediction method and system based on multi-model weighted fusion and incremental learning

CN121980137ACN 121980137 ACN121980137 ACN 121980137ACN-121980137-A

Abstract

The invention provides a photovoltaic power prediction method and a photovoltaic power prediction system based on multi-model weighted fusion and incremental learning, wherein the photovoltaic power prediction method comprises the steps of obtaining historical power data and historical weather data of a photovoltaic power station, preprocessing the obtained historical power data and the obtained historical weather data, extracting features of the preprocessed historical power data and the preprocessed historical weather data, constructing a multi-scale model, wherein the multi-scale model comprises an ultra-short-term prediction model group and a long-term prediction model, the ultra-short-term prediction model group is used for predicting power of the 1 st to the N th time points in the future respectively, the long-term prediction model is used for predicting long-time sequence power, the features of the time points to be predicted are input into the trained ultra-short-term prediction model group and the long-term prediction model respectively to obtain an ultra-short-term prediction value and a long-term prediction value, and the prediction results of the N time points are subjected to weighted fusion by adopting a linear attenuation weight formula to obtain final prediction power.

Inventors

  • JIANG ZHENHUA
  • GE JIANHAO
  • WANG HUAIZHI

Assignees

  • 上海宝信软件股份有限公司

Dates

Publication Date
20260505
Application Date
20260126

Claims (10)

  1. 1. A photovoltaic power prediction method based on multi-model weighted fusion and incremental learning is characterized by comprising the following steps: Step S1, acquiring historical power data and historical weather data of a photovoltaic power station, and preprocessing the acquired historical power data and the historical weather data to obtain preprocessed historical power data and preprocessed historical weather data, wherein the weather data comprise irradiance, earth surface 2M temperature, humidity, dew point, air pressure and cloud cover; Step S2, extracting features of the preprocessed historical power data and the preprocessed historical weather data; step 3, constructing a multi-scale model, wherein the multi-scale model comprises an ultra-short-term prediction model group and a long-term prediction model, the ultra-short-term prediction model group comprises N ultra-short-term prediction models which are respectively used for predicting power from the 1 st time point to the N th time point in the future, and the long-term prediction model is used for predicting long-time sequence power; And S4, respectively inputting the characteristics of the time points to be predicted into the trained ultra-short-term prediction model group and the trained long-term prediction model to obtain an ultra-short-term prediction value and a long-term prediction value, and carrying out weighted fusion on the ultra-short-term prediction value and the long-term prediction value by adopting a linear attenuation weight formula on the prediction results of the previous N time points to obtain final prediction power.
  2. 2. The photovoltaic power prediction method based on multi-model weighted fusion and incremental learning according to claim 1, wherein the step S1 comprises: Step S1.1, acquiring historical power data and historical weather data of a photovoltaic power station; Step S1.2, defining a sliding window, calculating the average value and standard deviation of the sliding window of irradiance and power data, judging the absolute deviation of the data at the current moment to be an abnormal value and setting the abnormal value as a null value if the absolute deviation exceeds the preset multiple of the standard deviation, and then carrying out linear interpolation on the processed data to fill the null value.
  3. 3. The photovoltaic power prediction method based on multi-model weighted fusion and incremental learning according to claim 1, wherein the step S2 comprises: Step S2.1, sliding window statistics is carried out on power data and irradiance data respectively to obtain rolling statistical characteristics, wherein the rolling statistical characteristics comprise average values, maximum values, minimum values and hysteresis characteristics and difference characteristics of historical moments under different window sizes; S2.2, periodically encoding the time dimension by utilizing sine and cosine functions to obtain a time period characteristic; S2.3, obtaining an original sequence based on the acquired power data and weather data, and obtaining original characteristics based on the original sequence; And S2.4, constructing a feature vector based on the rolling statistical feature, the time period feature and the original feature.
  4. 4. The photovoltaic power prediction method based on multi-model weighted fusion and incremental learning according to claim 1, wherein the step S3 comprises: S3.1, constructing N ultra-short-term prediction models based on N independent XGBoost regression models, and constructing a long-term prediction model based on LightGBM regression models; Step S3.2, triggering a multi-scale model maintenance task when new actually measured power data and weather data are monitored to be put in storage or reach a preset updating period; Step S3.3, scanning a local model storage catalog to check whether a model file of a previous version exists, reading the model file if the model file exists, and inversely sequencing the model file into a boost object in a memory to prepare incremental updating; traversing each time step for N ultrashort-term predictive models , Load the first Transferring XGBoost algorithm interfaces to the old ultra-short-term prediction model files, and transferring the ultra-short-term prediction model to be incrementally trained into parameters of a training function; For a long-term prediction model, loading an old long-term prediction model file, calling LightGBM an algorithm interface, transferring the long-term prediction model to be incrementally trained into parameters of a training function, calculating initial residual errors of new data by using the old long-term prediction model, constructing a new decision tree on the basis to fit the latest nonlinear relation between weather and power, and re-serializing an updated long-term prediction model object to cover or save the updated long-term prediction model object as a new long-term prediction model file after training is completed.
  5. 5. The photovoltaic power prediction method based on multi-model weighted fusion and incremental learning according to claim 1, wherein the step S4 comprises: S4.1, obtaining a feature set matrix of a period to be predicted Wherein the feature set matrix Comprises a feature vector of each time point in a period to be predicted, a feature set matrix Inputting the long-term prediction model to perform full-quantity reasoning to obtain a reference prediction sequence covering the full period ; Step S4.2 front of predicted sequence A time step, entering a point-by-point reasoning loop, comprising for the first A time step, wherein, Loading corresponding ultra-short-term prediction model according to index, extracting characteristic vector at current moment Inputting the ultra-short-term prediction model to obtain the ultra-short-term prediction value only aiming at the moment The process is executed for N times in parallel or in series to obtain an ultra-short-term prediction sequence segment; S4.3, calculating the current step length of the ultra-short-term prediction model by using the linear decay function Confidence weight of (2) ; Step S4.4, carrying out weighted summation on the two paths of predicted values according to the calculated weight to generate a primary fusion result : When (when) N is as follows: ; When (when) N is as follows: ; step S4.5, introducing a physical gating mechanism, wherein a gating index is formed based on the history synchronous measured power and the current predicted irradiance : If it is Determining the current ineffective power generation period, and forcedly correcting If (1) The fusion predicted value is reserved, Ensuring that no negative value appears, and finally outputting the corrected power sequence 。
  6. 6. A photovoltaic power prediction system based on multi-model weighted fusion and incremental learning, comprising: The module M1 is used for acquiring historical power data and historical weather data of a photovoltaic power station, preprocessing the acquired historical power data and the historical weather data to obtain preprocessed historical power data and preprocessed historical weather data, wherein the weather data comprise irradiance, earth surface 2M temperature, humidity, dew point, air pressure and cloud cover; The module M2 is used for extracting characteristics of the preprocessed historical power data and the preprocessed historical weather data; The module M3 is used for constructing a multi-scale model and comprises an ultra-short-term prediction model group and a long-term prediction model, wherein the ultra-short-term prediction model group comprises N ultra-short-term prediction models which are respectively used for predicting the power of the 1 st to the N th time points in the future, and the long-term prediction model is used for predicting the power of a long-time sequence; and the module M4 is used for respectively inputting the characteristics of the time points to be predicted into the trained ultra-short-term prediction model group and the trained long-term prediction model to obtain an ultra-short-term prediction value and a long-term prediction value, and carrying out weighted fusion on the ultra-short-term prediction value and the long-term prediction value by adopting a linear attenuation weight formula on the prediction results of the previous N time points to obtain the final prediction power.
  7. 7. The photovoltaic power prediction system based on multi-model weighted fusion and incremental learning of claim 6, wherein the module M1 comprises: the method comprises the steps of (1) obtaining historical power data and historical weather data of a photovoltaic power station by a module M1.1; The module M1.2 is used for defining a sliding window, calculating the average value and standard deviation of the sliding window of irradiance and power data, judging the absolute deviation of the data at the current moment to be an abnormal value and setting the abnormal value as a null value if the absolute deviation exceeds the preset multiple of the standard deviation, and carrying out linear interpolation on the processed data to fill the null value.
  8. 8. The photovoltaic power prediction system based on multi-model weighted fusion and incremental learning of claim 6, wherein the module M2 comprises: The module M2.1 carries out sliding window statistics on the power data and the irradiance data to obtain rolling statistical characteristics, wherein the rolling statistical characteristics comprise average values, maximum values, minimum values and hysteresis characteristics and difference characteristics of historical moments under different window sizes; a module M2.2, performing periodic coding on the time dimension by utilizing sine and cosine functions to obtain a time period characteristic; A module M2.3, obtaining an original sequence based on the obtained power data and weather data, and obtaining original characteristics based on the original sequence; And a module M2.4, constructing a feature vector based on the rolling statistical feature, the time period feature and the original feature.
  9. 9. The photovoltaic power prediction system based on multi-model weighted fusion and incremental learning of claim 6, wherein the module M3 comprises: the module M3.1 is used for constructing N ultra-short-term prediction models based on N independent XGBoost regression models; a module M3.2, triggering a multi-scale model maintenance task when new actually measured power data and weather data are monitored to be put in storage or reach a preset updating period; the module M3.3 is used for scanning a local model storage catalog and checking whether a model file of a previous version exists or not, reading the model file if the model file exists, and inversely sequencing the model file into a boost object in a memory to prepare incremental updating; traversing each time step for N ultrashort-term predictive models , Load the first Transferring XGBoost algorithm interfaces to the old ultra-short-term prediction model files, and transferring the ultra-short-term prediction model to be incrementally trained into parameters of a training function; For a long-term prediction model, loading an old long-term prediction model file, calling LightGBM an algorithm interface, transferring the long-term prediction model to be incrementally trained into parameters of a training function, calculating initial residual errors of new data by using the old long-term prediction model, constructing a new decision tree on the basis to fit the latest nonlinear relation between weather and power, and re-serializing an updated long-term prediction model object to cover or save the updated long-term prediction model object as a new long-term prediction model file after training is completed.
  10. 10. The photovoltaic power prediction system based on multi-model weighted fusion and incremental learning of claim 6, wherein the module M4 comprises: Module M4.1 obtaining a feature set matrix of the period to be predicted Wherein the feature set matrix Comprises a feature vector of each time point in a period to be predicted, a feature set matrix Inputting the long-term prediction model to perform full-quantity reasoning to obtain a reference prediction sequence covering the full period ; Module M4.2 front for predicted sequence A time step, entering a point-by-point reasoning loop, comprising for the first A time step, wherein, Loading corresponding ultra-short-term prediction model according to index, extracting characteristic vector at current moment Inputting the ultra-short-term prediction model to obtain the ultra-short-term prediction value only aiming at the moment The process is executed for N times in parallel or in series to obtain an ultra-short-term prediction sequence segment; Module M4.3 calculating the ultra-short term prediction model at the current step by using the linear decay function Confidence weight of (2) ; A module M4.4, carrying out weighted summation on the two paths of predicted values according to the calculated weight to generate a primary fusion result : When (when) N is as follows: ; When (when) N is as follows: ; A module M4.5, introducing a physical gating mechanism, wherein a gating index is formed based on the history synchronous measured power and the current predicted irradiance : If it is Determining the current ineffective power generation period, and forcedly correcting If (1) The fusion predicted value is reserved, Ensuring that no negative value appears, and finally outputting the corrected power sequence 。

Description

Photovoltaic power prediction method and system based on multi-model weighted fusion and incremental learning Technical Field The invention relates to the technical field of photovoltaic power generation power prediction, in particular to a photovoltaic power prediction method and a photovoltaic power prediction system based on multi-model weighted fusion and incremental learning. Background The photovoltaic power output is easily influenced by meteorological factors such as irradiance, temperature, cloud cover and the like and the running state of the photovoltaic power station, has the characteristics of strong randomness, fluctuation and intermittence, and the accurate photovoltaic power prediction is a key support for guaranteeing the safe and stable running of the photovoltaic power station and the efficient dispatching and the digestion of the power grid. The existing photovoltaic power prediction method mostly adopts a single model, is difficult to meet the precision requirements of ultra-short-term and long-term prediction, has limited generalization capability, cannot effectively adapt to complex changes of meteorological conditions, and meanwhile, the traditional model mostly adopts an off-line full-quantity training mode, has low updating efficiency when aiming at newly-added measured data, cannot timely track the dynamic changes of the running state of a photovoltaic power station, causes gradual decline of the prediction precision along with time, and is difficult to meet the high-precision and real-time prediction requirements in practical engineering application. Therefore, a photovoltaic power prediction technology capable of considering multi-scale prediction precision and adapting to dynamic data update is needed, and the defects existing in the prior art are overcome. Patent document CN111369070B (application number: 202010175312.1) discloses a multimode fusion photovoltaic power prediction method based on envelope clustering, which specifically comprises the steps of identifying abnormal photovoltaic power data, processing the abnormal photovoltaic power data, carrying out clustering division on historical photovoltaic power data, respectively constructing XGBoost models and LightGBM models by the clustered photovoltaic power data, constructing an LSTM model by the historical photovoltaic power data, fusing XGBoost models, lightGBM models and the LSTM model to obtain a prediction model, and outputting a prediction result. The scheme focuses on modeling by weather type classification, but on the time axis of the same prediction sequence, for example, from 15 th minute to 24 th hour, smooth transition processing lacking dynamic weights is easy to generate discontinuous predicted values when time scales are switched. Meanwhile, depending on complex clustering and deep Learning (LSTM) networks, the model training calculation amount is large, and lightweight online incremental updating is difficult to realize. Disclosure of Invention Aiming at the defects in the prior art, the invention aims to provide a photovoltaic power prediction method and a photovoltaic power prediction system based on multi-model weighted fusion and incremental learning. The photovoltaic power prediction method based on multi-model weighted fusion and incremental learning provided by the invention comprises the following steps: Step S1, acquiring historical power data and historical weather data of a photovoltaic power station, and preprocessing the acquired historical power data and the historical weather data to obtain preprocessed historical power data and preprocessed historical weather data, wherein the weather data comprise irradiance, earth surface 2M temperature, humidity, dew point, air pressure and cloud cover; Step S2, extracting features of the preprocessed historical power data and the preprocessed historical weather data; step 3, constructing a multi-scale model, wherein the multi-scale model comprises an ultra-short-term prediction model group and a long-term prediction model, the ultra-short-term prediction model group comprises N ultra-short-term prediction models which are respectively used for predicting power from the 1 st time point to the N th time point in the future, and the long-term prediction model is used for predicting long-time sequence power; And S4, respectively inputting the characteristics of the time points to be predicted into the trained ultra-short-term prediction model group and the trained long-term prediction model to obtain an ultra-short-term prediction value and a long-term prediction value, and carrying out weighted fusion on the ultra-short-term prediction value and the long-term prediction value by adopting a linear attenuation weight formula on the prediction results of the previous N time points to obtain final prediction power. Preferably, the step S1 includes: Step S1.1, acquiring historical power data and historical weather data of a photovoltaic power station; Step S