A method, medium, and equipment for correcting photovoltaic irradiance forecasts
By using cyclic spectrum analysis and state-space model to dynamically estimate periodic errors, combined with a dual-channel fusion method that uses adaptive filtering to track random errors, the problems of distinguishing error components and insufficient model adaptability in photovoltaic irradiance forecasting are solved, thereby improving forecast accuracy and stability.
Patent Information
- Application Number
- CN202611619165.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-20
- Publication Date
- 2026-11-17
AI Technical Summary
Existing technologies fail to effectively distinguish between periodic and random components in photovoltaic irradiance forecasting, resulting in limited correction accuracy. Furthermore, the fixed model parameters cannot adapt to dynamic changes in errors, especially in distributed photovoltaic scenarios where computational resources are limited due to limited data.
Cyclic spectral analysis is used to decompose the forecast error sequence into periodic and random error components. A state-space model is used to dynamically estimate the periodic error and an adaptive filter is used to track the random error. Error correction is performed by combining dual-channel fusion.
It improves the correction accuracy of photovoltaic irradiance forecasts, reduces computational overhead, is suitable for distributed photovoltaic scenarios, and the model parameters are dynamically adjusted in real time according to the error, enhancing its adaptability to non-stationary error scenarios.
Smart Images

Figure CN123116221A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method, medium, and equipment for photovoltaic irradiance forecasting correction, belonging to the field of new energy power generation forecasting technology. Background Technology
[0002] Solar irradiance is a core meteorological element affecting photovoltaic (PV) power generation, and the accuracy of irradiance forecasts directly determines the accuracy of PV power predictions. Numerical weather prediction (NWP) systems are currently the main means of irradiance forecasting, but the output irradiance forecasts generally suffer from systematic biases. Studies have shown that the irradiance forecast errors of NWP systems have obvious structural characteristics: on the one hand, there are regular components in the errors related to the solar cycle, which show a systematic overestimation or underestimation over time; on the other hand, random factors such as cloud cover and sudden weather changes introduce irregular random error components. The statistical characteristics and dynamic patterns of these two types of error components are fundamentally different. If a unified correction strategy is adopted, it is difficult to simultaneously take into account both periodic biases and random disturbances, thus limiting the correction accuracy.
[0003] Statistical regression is one of the commonly used methods for correcting irradiance forecasts. It corrects deviations by establishing a linear or nonlinear regression relationship between the predicted and observed NWP values. However, these methods typically assume a fixed error structure, making it difficult to adapt to dynamic changes in the error. Furthermore, they fail to distinguish between periodic and random components in the error, treating both types of errors with a uniform regression model, thus limiting the effectiveness of the correction.
[0004] Methods based on model output statistics systematically correct NWP outputs through statistical post-processing, which can effectively correct periodic errors with stable statistical characteristics. However, these methods have limited ability to handle random error components, and the model parameters are fixed and cannot be adjusted in real time according to dynamic changes in error, making them unsuitable for non-stationary error scenarios.
[0005] Machine learning-based methods use historical data to train models and correct forecast biases, achieving high correction accuracy when sufficient training data is available. However, these methods require a large number of historical samples, incur high computational costs for model training, and have poor interpretability, limiting their application in distributed photovoltaic scenarios with limited data.
[0006] The above methods share the following shortcomings: they fail to effectively distinguish between periodic and random components in irradiance forecast errors and do not adopt a unified correction strategy for the two types of errors; the correction model parameters are fixed and cannot be adjusted in real time with the dynamic changes of errors; they do not make full use of the cyclic stationary characteristics of forecast errors and lack targeted error decomposition and dynamic estimation methods; and they lack targeted design for distributed photovoltaic scenarios where data is limited and computing resources are constrained. Summary of the Invention
[0007] The purpose of this invention is to overcome the shortcomings of the prior art and provide a photovoltaic irradiance forecast correction method, medium, and device, which can effectively improve the accuracy of photovoltaic irradiance forecast correction and reduce computational overhead. To achieve the above objective, this invention employs the following technical solution:
[0008] In a first aspect, the present invention provides a method for correcting photovoltaic irradiance forecasts, comprising:
[0009] Obtain the irradiance forecast sequence to be corrected and the historical measured irradiance sequence for the corresponding time period, calculate the difference between the historical measured irradiance sequence and the irradiance forecast sequence, and obtain the forecast error sequence;
[0010] Cyclic spectrum analysis was performed on the forecast error sequence to decompose it into periodic error components and random error components;
[0011] A state-space model is established for the periodic error component, and a rolling window strategy is used to dynamically estimate and update the state of the state-space model to obtain the periodic error correction amount; an adaptive filter is used to track the random error component in real time to obtain the random error correction amount.
[0012] The periodic error correction and the random error correction are fused in two channels to obtain the total error correction. The total error correction is then used to correct the irradiance forecast sequence to be corrected, and the corrected irradiance forecast sequence is output.
[0013] In conjunction with the first aspect, optionally, obtaining the forecast error sequence includes:
[0014] The irradiance forecast sequence and the historical measured irradiance sequence are preprocessed respectively. The preprocessing includes: marking data points in the irradiance forecast sequence and the historical measured irradiance sequence that exceed the preset physical range as outliers and removing them; and using linear interpolation to fill in the missing data points after removal.
[0015] The forecast error sequence is obtained by subtracting the preprocessed historical measured irradiance sequence from the preprocessed irradiance forecast sequence.
[0016] In conjunction with the first aspect, optionally, the step of performing cyclic spectrum analysis on the forecast error sequence to decompose the forecast error sequence into periodic error components and random error components includes:
[0017] Calculate the cyclic autocorrelation function of the forecast error sequence. The cyclic autocorrelation function is expressed as:
[0018] ,
[0019] in, The cycle frequency, For time delay, To predict the length of the error sequence, For the first Prediction error of time, For the first Prediction error of time, The imaginary unit;
[0020] For different cyclic frequencies, the peak value of the cyclic autocorrelation function modulus is calculated, and cyclic frequencies with peak values exceeding a preset significance threshold are identified as significant cyclic frequencies.
[0021] The periodic error component is reconstructed from the cyclic spectrum components corresponding to the identified significant cyclic frequencies;
[0022] Subtracting the periodic error component from the forecast error sequence yields the random error component.
[0023] In conjunction with the first aspect, optionally, the preset significance threshold is determined based on the length of the prediction error sequence; the longer the prediction error sequence, the smaller the preset significance threshold.
[0024] Preset significance threshold The possible values are:
[0025] ,
[0026] in, The length of the forecast error sequence;
[0027] From the cyclic frequencies that exceed the preset significance threshold, select the cyclic spectrum components corresponding to the K highest cyclic frequencies to reconstruct the periodic error components; where K is a preset positive integer.
[0028] In conjunction with the first aspect, optionally, the step of establishing a state-space model for the periodic error components and dynamically estimating and updating the state of the state-space model using a rolling window strategy to obtain the periodic error correction amount includes:
[0029] The state-space model uses state variables that characterize the dynamic properties of the periodic error component as states, and the observed values of the periodic error component as observations. It is described by state transition equations and observation equations, and is expressed as follows:
[0030] ,
[0031] ,
[0032] in, For the first The state variable at time t, For the first The state variable at time t, Here is the state transition matrix. For process noise, For the first The observed values of the periodic error component at time t. For the observation matrix, To observe noise;
[0033] The rolling window strategy takes the periodic error component observations within a historical window of length L as input, where L is the rolling window length; it obtains the current state estimate through least squares estimation and then predicts forward. At each time step, the periodic error correction is obtained:
[0034] ,
[0035] in, For the first The periodic error correction amount at time intervals, State transition matrix of Power of 1 This represents the number of time steps for forward prediction. For the first The estimated current state at time t;
[0036] Every The window is updated once every time step, and the process is repeated, taking the periodic error component observations within a historical window of length L as input, obtaining the current state estimate through least squares estimation, and then predicting forward. The process involves several time steps to achieve rolling forecasting.
[0037] In conjunction with the first aspect, optionally, the process noise variance and observation noise variance of the state-space model are updated in real time as the window scrolls;
[0038] Among them, the observation noise variance is determined based on the sample variance of the observed values of the historical periodic error components within the effective forecast period in the rolling window. The effective forecast period is the time period in which the irradiance forecast value is greater than the preset threshold. The process noise variance is determined based on the product of the observation noise variance and the set coefficient, with the set coefficient ranging from 0.01 to 0.1.
[0039] In conjunction with the first aspect, optionally, the step of using adaptive filtering to track the random error components in real time to obtain the random error correction amount includes:
[0040] Get the Observations of random error components at time points , obtain the Predicted value of random error component at time step Calculate the first Observe residuals at all times It can be expressed by the following formula:
[0041] ;
[0042] According to the Calculate the adaptive filter gain by estimating the variance of the random error component at time points and the variance of the observation noise. It can be expressed by the following formula:
[0043] ,
[0044] in, To observe the noise variance, it is determined based on the long-term sample variance of the random error component within the rolling window; For the first The estimated variance of the random error component at time step is initialized to... and utilize the first The current estimated variance is updated by constantly observing the residuals, as expressed by the following formula:
[0045] ,
[0046] in, is the forgetting factor, with a value range of (0,1); For the first The estimated variance of the random error component at time step. For the first Observe the residuals at all times;
[0047] The random error correction is calculated based on the observation residuals and the filter gain, and is expressed by the following formula:
[0048] ,
[0049] in, For the first Random error correction amount at time step;
[0050] With the first Random error correction at time As the first The predicted value of the random error component at time step is continuously updated and expressed by the following formula:
[0051] ,
[0052] in, For the first The predicted value of the random error component at time step.
[0053] In conjunction with the first aspect, optionally, the step of fusing the periodic error correction and the random error correction in a dual-channel manner to obtain the total error correction includes:
[0054] Correction amount of periodic error With random error correction The total error correction is obtained by weighted summation according to the fusion weights, and is expressed by the following formula:
[0055] ,
[0056] in, This is the total error correction amount. The fusion weights for the periodic error components, The fusion weights for the random error components satisfy the following conditions: ;
[0057] The fusion weight is determined based on the proportion of variance contribution of the two error components within the current scrolling window, and is expressed by the following formula:
[0058] ,
[0059] ,
[0060] in, For variance operators, This is the sequence of periodic error components within the current scrolling window. This is the sequence of random error components within the current scrolling window;
[0061] The corrected irradiance forecast value is obtained by adding the forecast value to be corrected to the total error correction amount, and is expressed by the following formula:
[0062] ,
[0063] in, This is the corrected irradiance forecast value. These are the irradiance forecast values to be revised.
[0064] In a second aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the photovoltaic irradiance forecast correction method described in the first aspect.
[0065] Thirdly, the present invention provides a computer device, comprising:
[0066] Memory, used to store computer programs / instructions;
[0067] A processor for executing the computer program / instructions to implement the steps of the photovoltaic irradiance forecast correction method described in the first aspect.
[0068] Compared with the prior art, the beneficial effects achieved by the photovoltaic irradiance forecast correction method, medium, and equipment provided in this embodiment of the invention include:
[0069] This invention obtains the irradiance forecast sequence to be corrected and the historical measured irradiance sequence for the corresponding time period, calculates the difference between the historical measured irradiance sequence and the irradiance forecast sequence to obtain the forecast error sequence; performs cyclic spectrum analysis on the forecast error sequence to decompose the forecast error sequence into periodic error components and random error components; this invention can utilize the cyclic stationarity characteristics of NWP irradiance forecast errors to effectively separate the periodic components with regular time structure from the random components caused by factors such as cloud cover and meteorological changes, avoiding the use of a unified correction strategy for errors with significantly different statistical characteristics, providing a basis for subsequent separate corrections, and helping to improve the overall correction accuracy;
[0070] This invention establishes a state-space model for periodic error components and uses a rolling window strategy to dynamically estimate and update the state of the state-space model to obtain the periodic error correction. The state-space model of this invention can characterize the inherent dynamic characteristics of periodic error components. The rolling window strategy enables the model state and noise parameters to be updated in real time as the window rolls. The correction model parameters can be adaptively adjusted according to the dynamic changes of error, which can enhance the adaptability to non-stationary error scenarios and overcome the shortcomings of correction models with fixed parameters that are difficult to adapt to dynamic changes of error.
[0071] This invention employs adaptive filtering to track random error components in real time, obtaining random error correction values. The adaptive filtering of this invention can dynamically adjust the filter gain according to the difference between the real-time observed and predicted values of random error components. When the observed residual increases, the gain is increased to accelerate the tracking speed, and when the observed residual decreases, the gain is decreased to suppress noise. This can effectively cope with forecast deviations caused by sudden factors such as cloud cover and meteorological changes, and can improve the real-time tracking capability of random error components.
[0072] This invention fuses periodic error corrections and random error corrections in a dual-channel manner to obtain a total error correction. The total error correction is then used to correct the irradiance forecast sequence to be corrected, and the corrected irradiance forecast sequence is output. This invention uses a dual-channel fusion mechanism to weight and merge the two types of error corrections according to their variance contribution ratio. The fusion weight changes synchronously with the rolling window update, so that the correction result takes into account the dynamic contribution of both periodic and random errors. This avoids the limitations of a single correction channel and can further improve the correction accuracy and stability.
[0073] In summary, this invention does not require large-scale training data, has low computational overhead, and the model parameters are dynamically adjusted in real time according to the error. It is suitable for operational applications of irradiance forecasting in distributed photovoltaic scenarios and can effectively improve the accuracy of photovoltaic irradiance forecast correction without significantly increasing computational resources. Attached Figure Description
[0074] Figure 1 This is a schematic flowchart of a photovoltaic irradiance forecast correction method provided in Embodiment 1 of the present invention;
[0075] Figure 2 This is a schematic diagram of the process of performing cyclic spectrum analysis on the forecast error sequence in a photovoltaic irradiance forecast correction method provided in Embodiment 1 of the present invention;
[0076] Figure 3 This is a schematic diagram of the dual-channel fusion process in a photovoltaic irradiance forecast correction method provided in Embodiment 1 of the present invention;
[0077] Figure 4 This is a local time RMSE comparison chart in a photovoltaic irradiance forecast correction method provided in Embodiment 2 of the present invention. Detailed Implementation
[0078] The present invention will be further described below with reference to the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and should not be used to limit the scope of protection of the present invention.
[0079] Example 1:
[0080] like Figure 1 As shown, this embodiment provides a photovoltaic irradiance forecast correction method, including:
[0081] Obtain the irradiance forecast sequence to be corrected and the historical measured irradiance sequence for the corresponding time period, calculate the difference between the historical measured irradiance sequence and the irradiance forecast sequence, and obtain the forecast error sequence;
[0082] Cyclic spectrum analysis was performed on the forecast error sequence to decompose it into periodic error components and random error components;
[0083] A state-space model is established for the periodic error component, and a rolling window strategy is used to dynamically estimate and update the state of the state-space model to obtain the periodic error correction amount; an adaptive filter is used to track the random error component in real time to obtain the random error correction amount.
[0084] The periodic error correction and the random error correction are fused in two channels to obtain the total error correction. The total error correction is then used to correct the irradiance forecast sequence to be corrected, and the corrected irradiance forecast sequence is output.
[0085] Specifically, the steps are as follows.
[0086] Step 1: Obtain the irradiance forecast sequence to be corrected and the historical measured irradiance sequence for the corresponding time period. Calculate the difference between the historical measured irradiance sequence and the irradiance forecast sequence to obtain the forecast error sequence.
[0087] Step 1.1: Obtain the irradiance forecast sequence to be corrected and the historical measured irradiance sequence for the corresponding time period.
[0088] In this embodiment, the irradiance prediction sequence is: ,in, The total length of the sequence. , For the first The irradiance forecast sequence at each time point, in W / m², with a time resolution of 15 minutes.
[0089] Specifically, This is the irradiance forecast sequence for time 1. This is the irradiance forecast sequence for the second time period. For the first Irradiance forecast sequence at each time point.
[0090] In this embodiment, the historical measured irradiance sequence is as follows: ,in, The total length of the sequence. , For the first The historical measured irradiance sequence at each moment is given in W / m², with a time resolution of 15 minutes.
[0091] Specifically, This is the historical measured irradiance sequence at time 1. This is the historical measured irradiance sequence at time 2. This is the historical measured irradiance sequence at time N.
[0092] Step 1.2: Preprocess the irradiance forecast sequence and the historical measured irradiance sequence respectively.
[0093] Data points in the irradiance forecast sequence and historical measured irradiance sequence that exceed the preset physical range are marked as outliers and removed. The missing data points resulting from the removal are then filled in using a linear interpolation method.
[0094] Outlier removal specifically involves marking data points in both predicted and measured irradiance values that exceed the physically reasonable range as outliers and removing them. The physically reasonable range for irradiance is set as follows: ,in This represents the highest historical irradiance observed in the area, typically 1500 W / m².
[0095] Missing value imputation: For missing data points resulting from outlier removal, linear interpolation is used to fill in the missing values. Let the adjacent valid values before and after the missing point be a and b, respectively, and the corresponding time points be... and Then the missing moment interpolation value for:
[0096] .
[0097] Step 1.3: Subtract the preprocessed historical measured irradiance sequence from the preprocessed irradiance forecast sequence to obtain the forecast error sequence.
[0098] Calculate the forecast error sequence , The total length of the sequence. The prediction error at time t is... It can be expressed by the following formula:
[0099] ,
[0100] in, For the first Irradiance forecast sequence at each time point, For the first A sequence of historical measured irradiance at each moment.
[0101] Specifically, This indicates that the irradiance forecast value output by the numerical weather prediction is lower than expected. This indicates that the irradiance forecast value output by the numerical weather prediction is too high.
[0102] Step 2: Perform cyclic spectrum analysis on the forecast error sequence to decompose the forecast error sequence into periodic error components and random error components.
[0103] like Figure 2 As shown, the irradiance forecast error contains both periodic components with a regular time structure and random components caused by random factors. This step decomposes the forecast error sequence E into periodic error components through cyclic spectrum analysis. and random error components ,satisfy:
[0104] ,
[0105] in, For the first The periodic error component at each moment, For the first The random error component at each time step.
[0106] Step 2.1: Calculate the cyclic autocorrelation function of the forecast error sequence. The cyclic autocorrelation function is expressed as:
[0107] ,
[0108] in, The cycle frequency, For time delay, To predict the length of the error sequence, For the first Prediction error of time, For the first Prediction error of time, It is the imaginary unit.
[0109] when When the time is right, the cyclic autocorrelation function degenerates into the ordinary autocorrelation function.
[0110] Step 2.2: Calculate the magnitude of the cyclic autocorrelation function for different cycle frequencies. The peak value will exceed the preset significance threshold. The cycle frequency was identified as a significant cycle frequency.
[0111] The preset significance threshold is determined based on the length of the forecast error sequence; the longer the forecast error sequence, the smaller the preset significance threshold.
[0112] Specifically, a significance threshold is preset. The possible values are:
[0113] ,
[0114] in, This represents the length of the forecast error sequence.
[0115] From the cyclic frequencies that exceed the preset significance threshold, select the cyclic spectrum components corresponding to the K highest cyclic frequencies to reconstruct the periodic error components; where K is a preset positive integer.
[0116] Step 2.3: Reconstruct the periodic error components from the cyclic spectrum components corresponding to the identified significant cyclic frequencies. .
[0117] Step 2.4: Subtract the periodic error component from the forecast error sequence to obtain the random error component.
[0118] Step 3: Establish a state-space model for the periodic error component, and use a rolling window strategy to dynamically estimate and update the state of the state-space model to obtain the periodic error correction amount; use adaptive filtering to track the random error component in real time to obtain the random error correction amount.
[0119] Step 3.1: Establish a state-space model for the periodic error components, and use a rolling window strategy to dynamically estimate and update the state of the state-space model to obtain the periodic error correction amount.
[0120] The state-space model uses state variables that characterize the dynamic properties of the periodic error component as states, and the observed values of the periodic error component as observations. It is described by state transition equations and observation equations, and is expressed as follows:
[0121] ,
[0122] ,
[0123] in, For the first The state variable at time t, For the first The state variable at time t, Here is the state transition matrix. For process noise, For the first The observed values of the periodic error component at time t. For the observation matrix, To observe noise.
[0124] Specifically, process noise and observation noise All are zero-mean Gaussian white noise, with variances of respectively. and .
[0125] The process noise variance and observation noise variance are updated in real time as the window scrolls. The observation noise variance is determined based on the sample variance of the observed values of the historical periodic error components within the effective forecast period in the scrolling window. The effective forecast period is the time period in which the irradiance forecast value is greater than a preset threshold. The process noise variance is determined based on the product of the observation noise variance and a set coefficient, the set coefficient ranging from 0.01 to 0.1.
[0126] The rolling window strategy uses periodic error components of observations within a historical window of length L. The input is L, where L is the length of the rolling window; the current state estimate is obtained through least squares estimation, and the prediction is made forward. At each time step, the periodic error correction is obtained:
[0127] ,
[0128] in, For the first The periodic error correction amount at time intervals, State transition matrix of Power of 1 This represents the number of time steps for forward prediction. For the first The estimated current state at time t.
[0129] Every The window is updated once every time step, and the process is repeated, taking the periodic error component observations within a historical window of length L as input, obtaining the current state estimate through least squares estimation, and then predicting forward. The process involves several time steps to achieve rolling forecasting.
[0130] Specifically, in practical applications, the typical value of the rolling window length L is the number of time steps corresponding to 7 to 14 days in the historical data, so as to fully cover the periodicity of the error. Based on forecast requirements, the typical value for short-term forecast scenarios is 1 to 4 time steps.
[0131] Step 3.2: Use adaptive filtering to track the random error components in real time to obtain the random error correction amount.
[0132] Get the Observations of random error components at time points , obtain the Predicted value of random error component at time step Calculate the first Observe residuals at all times It can be expressed by the following formula:
[0133] .
[0134] According to the Calculate the adaptive filter gain by estimating the variance of the random error component at time points and the variance of the observation noise. It can be expressed by the following formula:
[0135] ,
[0136] in, To observe the noise variance, it is determined based on the long-term sample variance of the random error component within the rolling window; For the first The estimated variance of the random error component at time step is initialized to... and utilize the first The current estimated variance is updated by constantly observing the residuals, as expressed by the following formula:
[0137] ,
[0138] in, is the forgetting factor, with a value range of (0,1); For the first The estimated variance of the random error component at time step. For the first Observe the residuals at all times.
[0139] Specifically, forgetting factor A typical value of 0.9 is used to control the decay rate of historical information. The larger the value, the more historical information is retained, and the smoother the filter response. The smaller the value, the greater the impact of the current observation residual, and the more sensitive the filter tracking.
[0140] The random error correction is calculated based on the observation residuals and the filter gain, and is expressed by the following formula:
[0141] ,
[0142] in, For the first The random error correction amount at time step.
[0143] With the first Random error correction at time As the first The predicted value of the random error component at time step is continuously updated and expressed by the following formula:
[0144] ,
[0145] in, For the first The predicted value of the random error component at time step.
[0146] Specifically, when the The absolute value of the observed residual at each time point As the value increases, the estimated variance of the random error component at time t. Increase the adaptive filter gain Increasing the filter speed accelerates the tracking process; when the absolute value of the observed residual at time t... When the adaptive filter gain decreases, The filter reduces noise, reflecting an adaptive adjustment mechanism.
[0147] It should be noted that steps 3.1 and 3.2 are executed independently and in no particular order.
[0148] Step 4: Combine the periodic error correction and the random error correction in a dual-channel manner to obtain the total error correction. Use the total error correction to correct the irradiance forecast sequence to be corrected and output the corrected irradiance forecast sequence.
[0149] like Figure 3 As shown, it includes the following steps:
[0150] Step 4.1: Combine the periodic error correction and the random error correction in a dual-channel manner to obtain the total error correction.
[0151] Correction amount of periodic error With random error correction The total error correction is obtained by weighted summation according to the fusion weights, and is expressed by the following formula:
[0152] ,
[0153] in, This is the total error correction amount. The fusion weights for the periodic error components, The fusion weights for the random error components satisfy the following conditions: .
[0154] The fusion weight is determined based on the proportion of variance contribution of the two error components within the current scrolling window, and is expressed by the following formula:
[0155] ,
[0156] ,
[0157] in, For variance operators, This is the sequence of periodic error components within the current scrolling window. This is the sequence of random error components within the current scrolling window.
[0158] The corrected irradiance forecast value is obtained by adding the forecast value to be corrected to the total error correction amount, and is expressed by the following formula:
[0159] ,
[0160] in, This is the corrected irradiance forecast value. These are the irradiance forecast values to be revised.
[0161] Step 4.2: Use the total error correction to correct the irradiance forecast sequence to be corrected, and output the corrected irradiance forecast sequence.
[0162] Step 4.3: Perform a physical rationality check on the corrected irradiance forecast values. Setting values less than 0 to 0 will exceed the preset irradiance limit. The value is truncated to The final output irradiance forecast value is obtained. satisfy:
[0163] .
[0164] This embodiment requires no large-scale training data, has low computational overhead, and the model parameters are dynamically adjusted in real time according to the error. It is suitable for operational applications of irradiance forecasting in distributed photovoltaic scenarios and can effectively improve the accuracy of photovoltaic irradiance forecast correction without significantly increasing computational resources.
[0165] Example 2:
[0166] Based on the photovoltaic irradiance forecast correction method provided in Embodiment 1, this embodiment takes a representative station 020 (located at 33.15°N, 119.45°E) out of 31 distributed photovoltaic power stations in a certain province as an example to illustrate the specific application process and effects of the method of the present invention. This embodiment does not specifically limit the source of forecast data, but only uses forecast sequences and measured sequences for illustration.
[0167] Step 1: Obtain the irradiance forecast sequence to be corrected and the historical measured irradiance sequence for the corresponding time period. Calculate the difference between the historical measured irradiance sequence and the irradiance forecast sequence to obtain the forecast error sequence.
[0168] This embodiment uses the total horizontal irradiance forecast data provided by the European Centre for Medium-Range Weather Forecasts (ECMWF) global deterministic model, with a data time resolution of 1 hour.
[0169] To maintain consistency with the 15-minute operational forecast frequency, linear interpolation was performed simultaneously on the irradiance forecast sequence and the CLDAS measured sequence, with resampling at a 15-minute resolution for 96 time periods per day. Historical NWP irradiance forecast data for 21 consecutive days and corresponding CLDAS measured data were selected for model initialization. After 15-minute resampling, the total sequence length... (21 days × 96 time steps / day).
[0170] Outlier removal: Values exceeding the predicted and measured irradiance values will be removed. Data points within a certain range are marked as outliers and removed, where No samples exceeding the limit were found in this embodiment.
[0171] Missing value imputation: Linear interpolation is used to fill in any missing data points that may occur during the interpolation process. In this example, there are no missing data points during the training period, so no additional imputation is required.
[0172] Forecast error calculation: After preprocessing, the forecast error is calculated time-by-time. ,in, For the first Irradiance forecast sequence at each time point, For the first A sequence of historical measured irradiance at each moment. This indicates that the forecast value is lower than expected. This indicates that the forecast value is too high. From this, we obtain the forecast error sequence. .
[0173] Statistical analysis was performed on the training period (days 1-21, totaling 2016 samples), and the results are as follows:
[0174] The mean value is -6.36 W / m², indicating that the overall forecast value is slightly higher than expected; the standard deviation is 33.45 W / m²; the maximum positive error is +102.75 W / m²; and the maximum negative error is -206.55 W / m².
[0175] The temporal distribution of the error exhibits a clear diurnal cycle: the error fluctuates significantly during the day (08:00-16:00 local time) and approaches zero at night.
[0176] Step 2: Perform cyclic spectrum analysis on the forecast error sequence to decompose the forecast error sequence into periodic error components and random error components.
[0177] Forecast error sequence during training period Perform cyclic spectral analysis to identify significant periodic components.
[0178] Step 2.1: Calculate the cyclic autocorrelation function of the forecast error sequence.
[0179] Step 2.2: Calculate the magnitude of the cyclic autocorrelation function for different cycle frequencies. The peak value will exceed the preset significance threshold. The cycle frequency was identified as a significant cycle frequency.
[0180] In this embodiment, the frequency search range corresponds to a period of 6 to 48 hours (i.e., ... The search range is 1 / 192 to 1 / 24 - 1 (1 step = 15 minutes).
[0181] In this embodiment, a saliency threshold is preset. The possible values are:
[0182] ,
[0183] in, In this embodiment, to predict the length of the error sequence, If the value is 2016, then the significance threshold is... Only retain normalized cyclic autocorrelation function amplitudes exceeding [a certain value]. Furthermore, the five highest-energy periodic components are selected to avoid overfitting.
[0184] The results of significant periodicity identification are shown in Table 1.
[0185] Table 1. Results of significant periodicity identification
[0186]
[0187] Step 2.3: Reconstruct the periodic error components from the cyclic spectrum components corresponding to the identified significant cyclic frequencies. .
[0188] Step 2.4: Subtract the periodic error component from the forecast error sequence to obtain the random error component.
[0189] The statistical characteristics of the decomposition results in this embodiment are as follows:
[0190] Periodic error components The standard deviation was 23.60 W / m², and the variance was 557.09 (W / m²)², accounting for 49.8% of the total error variance.
[0191] Random error components The standard deviation was 23.70 W / m², and the variance was 561.78 (W / m²)², accounting for 50.2% of the total error variance.
[0192] verify: and The cross-correlation coefficient is close to zero, indicating that the two types of components are approximately orthogonal and the decomposition quality is good.
[0193] The beneficial effects of this step are: by utilizing the cyclic stationary characteristics of forecast errors, the periodic components with regular time structures are effectively separated from the random components caused by factors such as cloud cover and sudden weather changes. This avoids using a unified correction strategy for errors with significantly different statistical characteristics, provides a basis for subsequent separate corrections, and helps improve the overall correction accuracy.
[0194] Step 3: Establish a state-space model for the periodic error component, and use a rolling window strategy to dynamically estimate and update the state of the state-space model to obtain the periodic error correction amount; use adaptive filtering to track the random error component in real time to obtain the random error correction amount.
[0195] Step 3.1: Establish a state-space model for the periodic error components, and use a rolling window strategy to dynamically estimate and update the state of the state-space model to obtain the periodic error correction amount.
[0196] Based on the M=5 significant periodic components identified in step 2, construct the state vector. ,in , The first The cosine and sine coefficients of each periodic component.
[0197] The observation matrix of the state-space model is represented as:
[0198] .
[0199] In this embodiment, the scrolling window parameter is: window length. (Corresponding to 7 days × 96 steps / day), predicted step length (Corresponding to 15 minutes).
[0200] In this embodiment, the process noise variance is adjusted by the coefficient. Process noise variance ,in For the daytime sample (forecast value) within the current rolling window Periodic error component The sample variance. The purpose of daytime screening is to exclude trivial samples with zero nighttime irradiance, so that the variance estimate can better reflect the error level of the effective forecast period.
[0201] Within each rolling window, regularized least squares estimation (i.e., ridge regression) is used to solve for the . The estimated state (state vector) at time 1. :
[0202] ,
[0203] in, It is a stack of observation matrices at all times within the window. The periodic error component vector within the window. It is the identity matrix. Regularization term. Used to suppress coefficient instability caused by collinearity of basis functions.
[0204] The current state estimate is obtained by least squares estimation, and the periodic error correction is obtained by predicting Δ time steps forward.
[0205] Calculation example: Taking the predicted time t=2032 (corresponding to 04:00 UTC on January 22, 2025, approximately 12:00 noon local time) as an example:
[0206] Current scroll window coverage This refers to data from 04:15 on January 15, 2025 to 04:00 on January 22, 2025, a total of 7 days. There are 280 daytime samples within the window. The sample variance is Then the process noise variance is:
[0207] ,
[0208] State coefficients are obtained through regularized least squares estimation, and forward prediction is performed. The predicted value of the periodic error is obtained in the following steps:
[0209] ,
[0210] The predicted periodic error correction for this moment is -23.47 W / m², indicating that the forecast value is expected to be about 23.47 W / m² higher.
[0211] The beneficial effects of this step are: the state-space model can characterize the inherent dynamic characteristics of periodic error components, the rolling window strategy enables the model state and noise parameters to be updated in real time as the window rolls, and the correction model parameters can be adaptively adjusted with the dynamic changes of error, which enhances the adaptability to non-stationary error scenarios and overcomes the shortcomings of fixed parameter correction models in adapting to dynamic changes of error.
[0212] Step 3.2: Use adaptive filtering to track the random error components in real time to obtain the random error correction amount.
[0213] Parameter initialization: Forgetting factor ; Observation noise variance Take daytime samples during the training period The sample variance; estimated initial values of the variance. Initial values for random error prediction: .
[0214] Obtaining random error observations during the online prediction phase: In the online prediction phase, the true periodic error components at the current moment. The predicted periodic error value obtained in step 3 cannot be obtained directly. Instead, the observed values of the random error component are calculated.
[0215] Specifically, the adaptive filtering process is illustrated using time t=2032 as an example:
[0216] Step 3.2.1: Obtain the total forecast error at the current time:
[0217] ,
[0218] Calculate the observed values of the random error component using the predicted values of the periodic errors from step 3:
[0219] ,
[0220] The predicted value of the random error transmitted from the previous time step is:
[0221] .
[0222] Step 3.2.2: Calculate the observation residuals:
[0223] .
[0224] Step 3.2.3: Update the estimated variance (using the observed residuals from the previous time step). ):
[0225] .
[0226] Step 3.2.4: Calculate the adaptive filter gain:
[0227] .
[0228] Step 3.2.5: Calculate the random error correction amount:
[0229] .
[0230] The beneficial effects of this step are: adaptive filtering can dynamically adjust the filter gain according to the difference between the real-time observed value and the predicted value of the random error component. When the observed residual increases, the gain is increased to speed up the tracking speed, and when the observed residual decreases, the gain is reduced to suppress noise. This effectively copes with the forecast deviation caused by sudden factors such as cloud cover and meteorological changes, and improves the real-time tracking capability of random error components.
[0231] Step 4: Combine the periodic error correction and the random error correction in a dual-channel manner to obtain the total error correction. Use the total error correction to correct the irradiance forecast sequence to be corrected and output the corrected irradiance forecast sequence.
[0232] by For example, time:
[0233] The variance operator for the periodic error component sequence within the current scrolling window is:
[0234] ,
[0235] The variance operator for the random error component sequence within the current scrolling window is:
[0236] ,
[0237] The fusion weights for the periodic error components are:
[0238] ,
[0239] The fusion weights for the random error components are:
[0240] .
[0241] Calculate the total error correction:
[0242] .
[0243] Irradiance forecast values to be revised Corrected irradiance forecast values:
[0244] .
[0245] The beneficial effects of this step are: by using a dual-channel fusion mechanism to weight and merge the two types of error corrections according to the variance contribution ratio, and the fusion weight changes synchronously with the rolling window update, the correction results take into account the dynamic contribution of both periodic and random errors, avoid the limitations of a single correction channel, and further improve the correction accuracy and stability.
[0246] Apply physical constraints to the revised forecast values:
[0247] ,
[0248] This moment Satisfying the physical constraint of [0, 1500] W / m², no truncation is needed, and the final output is: .
[0249] The measured irradiance at that moment was The corrected forecast error is 536.97-517.79=19.18W / m², while the error of the irradiance forecast value to be corrected is 536.97-531.30=5.67W / m².
[0250] In this case, the predicted irradiance value to be corrected was already close to the actual measurement, and after correction, it remained within a reasonable range; throughout the testing period, the correction system systematically reduced the degree of error dispersion.
[0251] Step 5: Evaluation of the correction effect.
[0252] Under the above parameter settings, the irradiance forecasts for the representative station and all 31 stations were corrected, and the overall correction effect was evaluated. The evaluation indicators are defined as follows:
[0253] Root mean square error It can be expressed by the following formula:
[0254] ,
[0255] Mean Absolute Error It can be expressed by the following formula:
[0256] ,
[0257] Mean absolute percentage error (statistics only on daytime samples, i.e.) The daytime sample selection threshold The minimum threshold for avoiding percentage distortion caused by small denominators is expressed by the following formula:
[0258] .
[0259] in, The total number of samples during the test period. For the first A sequence of historical measured irradiance at each moment. Let be the corrected irradiance forecast value at time t. To meet the requirements during the testing period The number of daytime samples, where t is the sample time index.
[0260] A total of 98 samples were collected during the 020 test period of the representative site, including 83 daytime samples. The evaluation results are shown in Table 2.
[0261] Table 2. Evaluation Results of Representative Site 020
[0262]
[0263] The average evaluation results for all 31 stations are shown in Table 3.
[0264] Table 3 Average evaluation results of all 31 stations
[0265]
[0266] Figure 4A local time-specific RMSE comparison chart shows the changes in RMSE before and after correction with local time. The chart shows that during the nighttime period (18:00 to 06:00 the next day local time), the RMSE of both the forecast value to be corrected and the forecast after correction is close to zero, with little difference between the two. During the daytime period (07:00 to 17:00 local time), the RMSE of the forecast value to be corrected increases significantly, peaking around noon. The corrected RMSE is significantly lower than the forecast value to be corrected at all times, and the peak value decreases sharply. Taking the representative station 020 as an example, the average RMSE of the forecast value to be corrected was 45.5 W / m², which decreased to 24.2 W / m² after correction. The average RMSE of all 31 stations decreased from 71.21 W / m² to 37.85 W / m², a reduction of 46.8%. The above results demonstrate that the method of the present invention can effectively reduce the irradiance forecast error at various time periods, especially showing significant error suppression during the high irradiance period of daytime. The corrected irradiance forecast values all satisfy the physical constraints. .
[0267] The above results demonstrate that this invention achieves significant correction effects on real field station data by decomposing forecast errors into periodic and random components, processing them separately, and then applying dual-channel weighted fusion and physical constraints. This invention requires no large-scale training data, has low computational overhead, and its model parameters are dynamically adjusted in real time according to error changes. It is suitable for operational applications of irradiance forecasting in distributed photovoltaic scenarios, and can effectively improve the accuracy of photovoltaic irradiance forecast correction without significantly increasing computational resources.
[0268] Example 3:
[0269] This embodiment provides a computer-readable storage medium storing a computer program / instruction thereon. When the computer program / instruction is executed by a processor, it implements the steps of the photovoltaic irradiance forecast correction method described in Embodiment 1.
[0270] Example 4:
[0271] This embodiment provides a computer device, including:
[0272] Memory, used to store computer programs / instructions;
[0273] A processor is used to execute the computer program / instructions to implement the steps of the photovoltaic irradiance forecast correction method described in Embodiment 1.
[0274] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0275] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0276] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0277] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0278] The embodiments of the present invention have been described above with reference to the accompanying drawings. However, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of the present invention without departing from the spirit and scope of the claims. All of these forms are within the protection scope of the present invention.
Claims
1. A photovoltaic irradiance forecast revision method, characterized in that, include: Obtain the irradiance forecast sequence to be corrected and the historical measured irradiance sequence for the corresponding time period, calculate the difference between the historical measured irradiance sequence and the irradiance forecast sequence, and obtain the forecast error sequence; Cyclic spectrum analysis was performed on the forecast error sequence to decompose it into periodic error components and random error components; A state-space model is established for the periodic error component, and a rolling window strategy is used to dynamically estimate and update the state of the state-space model to obtain the periodic error correction amount; an adaptive filter is used to track the random error component in real time to obtain the random error correction amount. The periodic error correction and the random error correction are fused in two channels to obtain the total error correction. The total error correction is then used to correct the irradiance forecast sequence to be corrected, and the corrected irradiance forecast sequence is output.
2. The photovoltaic irradiance forecast refinement method of claim 1, wherein, The obtained prediction error sequence includes: The irradiance forecast sequence and the historical measured irradiance sequence are preprocessed respectively. The preprocessing includes: marking data points in the irradiance forecast sequence and the historical measured irradiance sequence that exceed the preset physical range as outliers and removing them; and using linear interpolation to fill in the missing data points after removal. The forecast error sequence is obtained by subtracting the preprocessed historical measured irradiance sequence from the preprocessed irradiance forecast sequence.
3. The photovoltaic irradiance forecast refinement method of claim 1, wherein, The cyclic spectrum analysis of the forecast error sequence decomposes the forecast error sequence into periodic error components and random error components, including: Calculate the cyclic autocorrelation function of the forecast error sequence. The cyclic autocorrelation function is expressed as: , wherein, is the cycle frequency, is the time delay, is the prediction error sequence length, is the prediction error at time is the prediction error at time is the prediction error at time is the prediction error at time is the imaginary unit; For different cyclic frequencies, the peak value of the cyclic autocorrelation function modulus is calculated, and cyclic frequencies with peak values exceeding a preset significance threshold are identified as significant cyclic frequencies. The periodic error component is reconstructed from the cyclic spectrum components corresponding to the identified significant cyclic frequencies; Subtracting the periodic error component from the forecast error sequence yields the random error component.
4. The photovoltaic irradiance forecast revision method according to claim 3, characterized in that, The preset significance threshold is determined based on the length of the prediction error sequence; the longer the prediction error sequence, the smaller the preset significance threshold. Pre-set saliency threshold Value: , wherein, is the length of the prediction error sequence; From the cyclic frequencies that exceed the preset significance threshold, select the cyclic spectrum components corresponding to the K highest cyclic frequencies to reconstruct the periodic error components; where K is a preset positive integer.
5. The photovoltaic irradiance forecast refinement method of claim 1, wherein, The process of establishing a state-space model for the periodic error components and dynamically estimating and updating the state of the state-space model using a rolling window strategy to obtain the periodic error correction amount includes: The state-space model uses state variables that characterize the dynamic properties of the periodic error component as states, and the observed values of the periodic error component as observations. It is described by state transition equations and observation equations, and is expressed as follows: , , wherein is the state variable at time is the state variable at time is the state variable at time is the state variable at time is the state transition matrix, is the process noise, is the state variable at time is the observation of the periodic error component at time is the observation matrix, is the observation noise; The rolling window strategy takes periodic error component observation values in a history window with length L as input, L being the length of the rolling window; a current state estimation value is obtained by least square estimation, and a periodic error correction value is obtained by forward prediction at a time step. , wherein, is the state transition matrix is the current state estimate at time is the periodic error correction at time is the power of the state transition matrix is the number of time steps for the forward prediction; is the state transition matrix is the current state estimate at time Every The window is updated once every time step, and the process is repeated, taking the periodic error component observations within a historical window of length L as input, obtaining the current state estimate through least squares estimation, and then predicting forward. The process involves several time steps to achieve rolling forecasting.
6. The photovoltaic irradiance forecast correction method according to claim 5, characterized in that, The process noise variance and observation noise variance of the state-space model are updated in real time as the window scrolls. Among them, the observation noise variance is determined based on the sample variance of the observed values of the historical periodic error components within the effective forecast period in the rolling window. The effective forecast period is the time period in which the irradiance forecast value is greater than the preset threshold. The process noise variance is determined based on the product of the observation noise variance and the set coefficient, with the set coefficient ranging from 0.01 to 0.
1.
7. The photovoltaic irradiance forecast correction method according to claim 1, characterized in that, The process of using adaptive filtering to track random error components in real time to obtain random error correction amounts includes: Get the Observations of random error components at time points , obtain the Predicted value of random error component at time step Calculate the first Observe residuals at all times It can be expressed by the following formula: ; According to the Calculate the adaptive filter gain by estimating the variance of the random error component at time points and the variance of the observation noise. It can be expressed by the following formula: , in, To observe the noise variance, it is determined based on the long-term sample variance of the random error component within the rolling window; For the first The estimated variance of the random error component at time step is initialized to... and utilize the first The current estimated variance is updated by constantly observing the residuals, as expressed by the following formula: , in, is the forgetting factor, with a value range of (0,1); For the first The estimated variance of the random error component at time step. For the first Observe the residuals at all times; The random error correction is calculated based on the observation residuals and the filter gain, and is expressed by the following formula: , in, For the first Random error correction amount at time step; With the first Random error correction at time As the first The predicted value of the random error component at time step is continuously updated and expressed by the following formula: , in, For the first The predicted value of the random error component at time step.
8. The photovoltaic irradiance forecast correction method according to claim 1, characterized in that, The process of fusing the periodic error correction and the random error correction in a dual-channel manner to obtain the total error correction includes: Correction amount of periodic error With random error correction The total error correction is obtained by weighted summation according to the fusion weights, and is expressed by the following formula: , in, This is the total error correction amount. The fusion weights for the periodic error components, The fusion weights for the random error components satisfy the following conditions: ; The fusion weight is determined based on the proportion of variance contribution of the two error components within the current scrolling window, and is expressed by the following formula: , , in, For variance operators, This is the sequence of periodic error components within the current scrolling window. The sequence of random error components within the current scrolling window; The corrected irradiance forecast value is obtained by adding the forecast value to be corrected to the total error correction amount, and is expressed by the following formula: , in, This is the corrected irradiance forecast value. These are the irradiance forecast values to be revised.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the photovoltaic irradiance forecast correction method according to any one of claims 1-8.
10. A computer device, characterized in that, include: Memory, used to store computer programs / instructions; A processor for executing the computer program / instructions to implement the steps of the photovoltaic irradiance forecast correction method according to any one of claims 1-8.
