Seasonal trend decomposition-based short-term photovoltaic power generation power interval combined prediction method
Through seasonal trend decomposition and multi-model combination prediction methods, the insufficient accuracy and training efficiency problems under the seasonal influence of photovoltaic power generation power prediction are solved, and efficient short-term photovoltaic power generation power interval prediction is achieved.
Patent Information
- Application Number
- CN202411318359.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-10
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing photovoltaic power prediction methods are insufficient in dealing with seasonal effects, and it is difficult for a single model to balance accuracy with training efficiency.
The short-term photovoltaic power generation power interval combination prediction method based on seasonal trend decomposition was adopted, and the data were decomposed into seasonal terms, trend terms and remnants were decomposed through local weighted regression, and prediction was performed using ARIMA and BiTCN-BiGRU-AM models respectively, and finally the kernel density estimation was carried out. and Bootstrap method to achieve interval prediction.
It effectively avoids seasonal influence, improves the stability and accuracy of the prediction model, and maintains high efficiency in training efficiency, achieving a balance between the accuracy and coverage of interval prediction results.
Smart Images

Figure CN119297992A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to a short-term photovoltaic power generation power interval combination prediction method based on seasonal trend decomposition, and belongs to the field of solar power generation. Background Art
[0002] With the shortage of fossil energy and the gradual deterioration of climate, people's demand for clean energy is increasing. In recent years, the proportion of photovoltaic power stations in the power grid structure has increased year by year. In order to enable power grid workers to better realize the dispatch of power resources, accurate photovoltaic power generation power prediction is particularly important. Since the photovoltaic power generation system is significantly affected by the natural meteorological environment, it is very important to predict the uncertainty of photovoltaic power generation.
[0003] The uncertainty prediction process for photovoltaic power generation in existing research can be roughly divided into the following three steps: 1) data preprocessing to remove noise 2) point prediction model 3) interval prediction model.
[0004] Taking effective signal decomposition methods can achieve the effect of denoising and greatly improve the prediction accuracy of the prediction model. Common denoising methods used in existing research include wavelet transform denoising, empirical mode decomposition, ensemble empirical mode decomposition, complementary ensemble empirical mode decomposition, variational mode decomposition, etc. Empirical mode decomposition has the phenomenon of modal aliasing caused by intermittent high-frequency components, which will cause errors in time-frequency distribution and affect the decomposition effect. EEMD improves EMD based on the statistical characteristics of uniform distribution of white noise spectrum to solve this problem. Wang et al. decomposed the time series data into low, medium and high frequency components through EEMD, and used the variable weight combination prediction model to predict the three components and add them to obtain the final prediction result, achieving good results. CEEMD adds two positive and negative white noise sequences to the original signal to solve the modal aliasing phenomenon while ensuring computational efficiency. Ma et al. used CEEMD to decompose photovoltaic power generation, effectively improving the accuracy of the prediction model.
[0005] The conversion from a point prediction model to an interval prediction model usually depends on the accuracy of the point prediction, which makes accurate point prediction results the basis of interval prediction. Ni et al. considered the influence of natural meteorological factors and realized interval prediction by combining extreme learning machine with LUBE method to form a regression prediction model. Wang et al. passed the decomposed subsequence into LSTM for prediction, and optimized the parameters such as hidden neurons, learning rate and number of iterations in the prediction model through particle swarm optimization algorithm. Liao et al. captured the bidirectional features in the time series through BiLSTM and showed better performance than traditional LSTM in the training task. Wang et al. proposed a LSTM-CNN prediction model, the core of which is to first use LSTM to extract the time features in the time series, and then extract the spatial features in the data through convolution. Experiments show that the fusion model has a better effect in point prediction. Liu et al. used a gated logic unit with attention mechanism in prediction. The experimental results show that the GRU model improved by LSTM and the capture of key information by attention mechanism have greatly improved the accuracy of the model. Considering that a single model may have defects or limited prediction accuracy, in recent years, more and more studies have focused on the combined prediction of multiple models. Wang et al. used different prediction models for sub-modals of different frequencies obtained by signal decomposition. They used BiGRU combined with attention mechanism to predict low-frequency sequences and Transformer to predict high-frequency components. The experimental results showed that it is effective to use suitable models for different sequence characteristics.
[0006] Interval prediction usually converts point prediction results into interval prediction results. Based on the distribution of point prediction and training error, the interval prediction value can be obtained. Non-parametric estimation is a commonly used error distribution estimation method, which can estimate its probability density function based on the training error of the data. Common non-parametric estimation methods include kernel density estimation and Bootstrap. Xu et al. generalized the Fourier heat equation using the linear diffusion process and obtained the diffusion kernel density estimation method. Experiments show that the improved KDE method can achieve better interval prediction results. By analyzing the above papers, it can be concluded that 1) effective data decomposition methods can greatly improve prediction accuracy 2) Selecting a prediction model suitable for data characteristics can have better prediction results 3) Single non-parametric estimation is difficult to achieve a balance between accuracy and coverage when realizing interval prediction conversion. If multiple methods can be combined, better results can be obtained. Summary of the invention
[0007] In view of the problems existing in the prior art, the present application proposes a short-term photovoltaic power generation power interval combined prediction method based on seasonal trend decomposition, which achieves a high prediction accuracy while ensuring a certain training efficiency.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is a short-term photovoltaic power generation power interval combination prediction method based on seasonal trend decomposition, comprising the following steps:
[0009] 1) Preprocess the data, fill in missing values, remove invalid values, and normalize the data;
[0010] 2) Using seasonal trend decomposition, the power generation data is decomposed into seasonal terms, trend terms and residual terms;
[0011] 3) The seasonal term remains unchanged;
[0012] 4) The trend item is predicted using the ARIMA model;
[0013] 5) The remaining items are predicted by the BiTCN-BiGRU-AM model.
[0014] 6) Add the prediction results of step 3), step 4) and step 5) to obtain the point prediction value of the generated power;
[0015] 7) The final interval prediction result is obtained through the interval combination prediction model.
[0016] Optimized, the above-mentioned short-term photovoltaic power generation power interval combined prediction method based on seasonal trend decomposition, the process of step 2) is seasonal trend decomposition based on local weighted regression, using local weighted regression to smooth data, and fitting a low-order polynomial on each subset of the data to obtain the local trend. The specific process includes:
[0017] First, Loess regression is used to smooth the time series data to obtain the preliminary trend component;
[0018] Then, seasonal extraction is performed on the remaining part of the time series after removing the preliminary trend component; the data is divided into periods, and Loess smoothing is applied to the same position of each period to obtain the seasonal component;
[0019] Finally, the remainder after removing the trend and seasonal components is taken as the residual component.
[0020] Optimized, the above short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition, in step 2), the initial time series data is decomposed into three components of season, trend and remainder, which can be specifically expressed as:
[0021] Y t =S t +T t +R t (1)
[0022] Among them, Y represents the time series, t represents each time point, S, T, and R represent the seasonal component, trend component, and residual component, respectively.
[0023] Optimized, in the above short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition, in step 2), the specific steps of seasonal trend decomposition of local weighted regression include:
[0024] First, define the seasonal period s and use the moving average to smooth the data in each period to get the initial value of the seasonal component:
[0025]
[0026] Remove seasonal components:
[0027] D t =Y t -S t (3)
[0028] The remaining part after removing the seasonal component is smoothed using Loess to obtain the trend component:
[0029]
[0030]
[0031] Among them, w i It represents the weight obtained by calculating the distance between time points, usually calculated using a cubic function, and h represents the smoothing parameter;
[0032] Remove the trend component from the original sequence to obtain the updated seasonal component, and use Loess to smooth the updated seasonal component again;
[0033] S t =Y t -T t (6)
[0034] Finally, calculate the remainder components:
[0035] R t =Y t -S t -T t (7)
[0036] Repeat the operations of (2)-(7) until the trend and seasonal components converge. The final three sub-components are the seasonal, trend and residual components obtained after decomposition.
[0037] Optimized, in the above short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition, in step 4), the process of using the ARIMA model to forecast the trend item includes:
[0038] By introducing the difference part, the non-stationary series is converted into a stationary series;
[0039] When the model parameters are determined, the autoregressive order and the average order are selected, and the order of difference is determined;
[0040] The first-order difference operation can be expressed as:
[0041] y t '=y t -y t-1 (8)
[0042] Second-order or higher-order differences can be expressed as:
[0043]
[0044] Optimized, in the above short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition, in step 5), the specific process of predicting the remainder by the BiTCN-BiGRU-AM model includes:
[0045] BiTCN is constructed by adding a bidirectional mechanism to TCN to capture the bidirectional features in time series; BiTCN is combined with a bidirectional gated recurrent unit with an attention mechanism to form BiTCN-BiGRU-AM.
[0046] Optimized, in the above-mentioned short-term photovoltaic power generation power interval combination prediction method based on seasonal trend decomposition, in step 7), the specific process of obtaining the final interval prediction result through the interval combination prediction model includes:
[0047] Kernel density estimation, by using a kernel function to identify each data point, and superimposing several kernel functions to obtain the overall probability density function to achieve the conversion of point prediction results into interval prediction results;
[0048] The Bootstrap method performs repeated sampling with replacement on the existing data and obtains the overall distribution by calculating the statistics of the sample data;
[0049] The interval prediction results are obtained using kernel density estimation and Bootstrap method; the proportion of kernel density estimation and Bootstrap method in interval combination prediction is optimized by Raccoon optimization algorithm to obtain the aggregation weight in the final interval combination prediction.
[0050] The beneficial effects of this application are:
[0051] In the technical solution of the present application, seasonal trend is used to decompose the seasonal and trend components in the power generation sequence. Seasonal trend decomposition is used to decompose the original data, which effectively avoids the influence of seasonality in the power generation signal on the prediction process and enhances the stability of the prediction model.
[0052] In the technical solution of the present application, suitable prediction models are used for point prediction of different types of subsequences. The trend item after seasonal trend decomposition is predicted by ARIMA model, and the remaining item is predicted by BiTCN-BiGRU-AM model, which achieves high prediction accuracy while ensuring a certain training efficiency.
[0053] In the technical solution of the present application, an interval combination prediction method is designed. First, two non-parametric estimates, KDE and Bootstrap, are implemented, and then the interval combination prediction model is implemented by optimizing the weights to achieve a balance between interval coverage and interval width. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is the GRU unit structure diagram in this application;
[0055] Figure 2 This is the TCN residual block structure diagram in this application;
[0056] Figure 3 This is the BiTCN-BiGRU-AM structure diagram in this application;
[0057] Figure 4 Schematic diagram of the interval combination prediction model in this application;
[0058] Figure 5 This is a flow chart of the prediction framework of this application;
[0059] Figure 6 The prediction result on July 30 in the embodiment;
[0060] Figure 7 It is the interval combination prediction result in the embodiment. DETAILED DESCRIPTION
[0061] The technical features of the present invention are further described below in conjunction with specific embodiments.
[0062] The present invention provides a short-term photovoltaic power generation power interval combination prediction method based on seasonal trend decomposition, comprising the following steps:
[0063] 1) Preprocess the data, fill in missing values, remove invalid values, and normalize the data;
[0064] 2) Using seasonal trend decomposition, the power generation data is decomposed into seasonal terms, trend terms and residual terms;
[0065] 3) The seasonal term remains unchanged and is added to the final point prediction result;
[0066] 4) The trend item is predicted using the ARIMA model;
[0067] 5) The remaining items are predicted by the BiTCN-BiGRU-Attention model.
[0068] 6) Add the prediction results of step 3), step 4) and step 5) to obtain the point prediction value of the generated power;
[0069] 7) The final interval prediction result is obtained through the interval combination prediction model.
[0070] Specifically, in step 1), missing values are filled, invalid values are removed, and data is normalized.
[0071] Due to environmental influences and measurement equipment failures, the collected raw data contain missing values and invalid values. For the missing values in the raw data, this paper fills them in by linear interpolation, that is, assuming that there is a linear relationship between two known data points to obtain the missing values. For example, if the data at 10:00 on a certain day is missing, the mean of the data at 9:00 and 11:00 is used as the data at 10:00 to fill in. For the invalid values in the raw data, this paper subtracts the data of each sample point from the mean, and judges the data exceeding 3 standard deviations as invalid values, and such data will be eliminated. In order to facilitate the prediction model to predict the data, this paper will normalize the data. The normalization equation is shown in formula (1).
[0072]
[0073] Among them, x represents the original data, x min Represents the minimum value in the original data, x max represents the maximum value in the original data, and x' represents the result after normalization.
[0074] In step 2), seasonal trend decomposition based on local weighted regression is used to decompose the power generation data into seasonal terms, trend terms and residual terms. Specifically:
[0075] The core idea of seasonal trend decomposition based on Loess (STL) is to use local weighted regression to smooth data and get local trends by fitting low-order polynomials on each subset of data. The original time series data is decomposed into three components: seasonal, trend, and remainder, as shown in formula (2):
[0076] Y t =S t +T t +R t (2)
[0077] Among them, Y represents the time series, t represents each time point, S, T, and R represent the seasonal component, trend component, and residual component respectively. The core idea of seasonal trend decomposition based on local weighted regression is to use local weighted regression to smooth the data and obtain the local trend by fitting a low-order polynomial on each subset of the data.
[0078] The specific process is to first use Loess regression (local weighted regression) to smooth the time series data to obtain a preliminary trend component. Then, seasonal extraction is performed on the remaining part of the time series after removing the preliminary trend component. The data is divided into periods, and the Loess smoothing algorithm is applied to the same position of each period to obtain the seasonal component. Finally, the remaining part after removing the trend and seasonal components is used as the residual component.
[0079] The specific steps of seasonal trend decomposition based on local weighted regression are as follows:
[0080] First, define the seasonal period s and use the moving average to smooth the data in each period to get the initial value of the seasonal component:
[0081]
[0082] Remove seasonal components:
[0083] D t =Y t -S t (4)
[0084] The remaining part after removing the seasonal component is smoothed using Loess to obtain the trend component:
[0085]
[0086]
[0087] Among them, w i It represents the weight obtained by calculating the distance between time points, which is usually calculated using a cubic function. h represents the smoothing parameter, which is used to control the size of the smoothing window.
[0088] The trend component is removed from the original sequence to obtain the updated seasonal component, and the Loess smoothing algorithm is used again to smooth the updated seasonal component.
[0089] S t =Y t -Tt (7)
[0090] Finally, calculate the remainder components:
[0091] R t =Y t -S t -T t (8)
[0092] Repeat the operations of (3)-(8) until the trend and seasonal components converge. The final three sub-components are the seasonal, trend and residual components obtained after decomposition.
[0093] In step 4), the specific process of using the ARIMA model to predict the trend item includes:
[0094] The ARIMA model is a statistical model widely used in time series forecasting. It mainly includes the following steps:
[0095] 1) Calculate the autocorrelation coefficient and partial autocorrelation coefficient of the sequence to be predicted, and perform a stationarity test on it. The autocorrelation coefficient measures the correlation between the time series itself and its lagged value, and the partial autocorrelation coefficient determines whether the time series still has correlation after eliminating the lag effect. If the data is not in a stable state, use a differential operation until the data is stable, and determine the differential parameter d. The first-order difference operation can be expressed as:
[0096] y t '=y t -y t-1 (9)
[0097] Second-order or higher-order differences can be expressed as:
[0098]
[0099] 2) Next, perform a white noise test on the data in a stationary state. White noise refers to a completely random and irregular stationary sequence, and ARIMA cannot predict this type of model. For a time series Xt = {x1, x2, x3, ..., xn}, it is usually determined by formula (11) whether the sequence is white noise.
[0100]
[0101] 3) Identify the model type through the autocorrelation coefficient (ACF) and partial autocorrelation coefficient (PACF). The specific model selection is shown in Table 1.
[0102] Table 1 Model selection theory model
[0103] Model ACF PACF AR(p) Decaying to zero Post-p truncated MA(q) q-order post-truncation Decaying to zero ARMA(p,q) Decaying to zero Decaying to zero
[0104] Truncation means that both ACF and PACF tend to zero after a certain order.
[0105] 4) Determine the parameters p and q of the model identified in 3), set the number of prediction steps of the model, and pass the time series data into the prediction model to obtain the ARIMA model prediction result. The ARIMA model in the framework proposed in this application is implemented based on the statmodels library in python.
[0106] For the trend item, in this embodiment, the power generation data at 14 time points are first used as the input features of the ARIMA model, and the power generation data at the next time point is used as the label of the model, and the training set and the test set are divided according to June 2022 as the boundary to construct the power generation prediction data set. Then, the ARIMA model is used for training on the training set, and prediction is performed on the test set to obtain the prediction results of the ARIMA model on the test set.
[0107] In step 5), the remainder is predicted by the BiTCN-BiGRU-AM model, and the specific method is as follows.
[0108] The Temporal Convolutional Network (TCN) improves on the one-dimensional convolution by adding causal convolution and dilated convolution, and uses residual connections to form residual blocks, making the convolutional neural network more suitable for processing time series problems.
[0109] When the convolution kernel of the traditional one-dimensional convolution performs convolution calculations, the center position of the sliding window will exceed the current time step, causing the output value to depend on the characteristics of future time steps. The causal convolution ensures that the convolution operation cannot see future data through the padding operation, making TCN a model that is strictly time-constrained. Traditional convolutional neural networks can expand the receptive field through pooling operations, but this will cause a certain amount of information loss. The dilated convolution introduces intervals between the convolution kernel elements to obtain a larger receptive field without losing information. The residual connection realizes the cross-layer transmission of information and has been proven to be an effective neural network training method. Usually, a residual block in TCN is designed to contain two layers of causal dilated convolution. The structure of the TCN residual block is as follows: Figure 2 shown.
[0110] By adding a bidirectional mechanism to TCN to form BiTCN, the bidirectional features in the time series are captured, and the impact of forward and backward information on the prediction results is fully considered, which can have better long-term dependence. BiTCN is combined with a bidirectional gated recurrent unit with an attention mechanism to form BiTCN-BiGRU-AM. The neural network structure is as follows Figure 3 shown.
[0111] In the BiTCN-BiGRU-AM model framework constructed in this application, the bidirectional mechanism is first introduced into the TCN model, and the time series data is passed into the TCN1 model for training. At the same time, the Flip layer is set to flip the passed sequence and pass it into TCN2 for training. Then, the TCN1 and TCN2 model results are merged through model fusion; then, the output data of the previous layer is passed into the BiGRU layer for training, where BiGRU consists of two parts, the forward GRU and the backward GRU, which extract deep features of the time series data from both the forward and backward directions; finally, the BiGRU output result is passed into the Attention layer to further extract the sequence features, capture the key information in the sequence, and output the final prediction result through the regression output layer. The overall structure of the model is as follows: Figure 3 The following is a detailed introduction to each part of the model.
[0112] The BiTCN model can capture the short-term features of time series data in both the forward and reverse directions, and fully considers the impact of forward and backward information on the prediction results. Among them, TCN is an improved algorithm of CNN. When calculating the convolution kernel of the traditional one-dimensional convolution, the center position of the sliding window will exceed the current time step, causing the output value to depend on the characteristics of the future time step. TCN introduces causal convolution to fill the input data to ensure that the convolution operation cannot see future data, making TCN a model that is strictly constrained by time. In addition, TCN introduces dilated convolution, which adds intervals between the elements of the convolution kernel to obtain a larger receptive field without losing information. Finally, the idea of residual connection is also introduced in TCN. By connecting the direct mapping part with the residual part, the problems of gradient vanishing and network degradation are effectively avoided. The specific structure of the TCN residual block is as follows: Figure 2 As shown in the figure, the structure consists of two identical sub-modules and a 1×1 convolution residual connection. Each sub-module contains a causal expansion convolution layer, a normalization layer, a Relu activation layer, and a Dropout layer.
[0113] The BiGRU model further captures the temporal dependency and sequential information in the data, and introduces AM to assign different weights to hidden neurons, thereby increasing the influence of key information and thus improving the prediction accuracy of the model. Among them, GRU merges the input gate and forget gate of LSTM into an update gate and adds a reset gate. This change reduces the number of parameters and increases the training speed. At the same time, GRU has better long-term dependency and can effectively reduce the occurrence of the gradient vanishing problem. The internal structure of GRU is as follows: Figure 1 The specific calculation process is described as follows:
[0114] z t =σ(W z ·[h t-1,x t ]+b z ) (12)
[0115] r t =σ(W r ·[h t-1 ,x t ]+b r ) (13)
[0116]
[0117]
[0118] Among them, σ represents the sigmoid function, W z W r W h They represent the weights of the update gate, reset gate, and candidate hidden state respectively, and b represents the corresponding bias vector.
[0119] AM imitates the processing mechanism of human brain signals, that is, it locks key information according to the processing mechanism of brain signals and improves attention in a certain aspect. The attention mechanism is introduced into the neural network, and the influence of important information is increased by assigning different weights to hidden states, thereby improving the training accuracy of the model.
[0120] For the part of the variance, in this embodiment, the power generation data at 14 time points are first used as the input features of the BiTCN-BiGRU-AM model, and the power generation data at the subsequent 1 time point is used as the label of the model, and the training set and the test set are divided according to June 2022 as the boundary to construct a power generation prediction data set. Then, the BiTCN-BiGRU-AM model is used for training on the training set, where the number of TCN residual blocks is 2, the number of hidden neurons is 128, the attention mechanism key value is 50, the number of training times is 150, and the initial learning rate is 0.01. Finally, the trained model is used for testing on the test set to obtain the prediction results of the model on the test set.
[0121] In step 7), the specific process of obtaining the final interval prediction result through the interval combination prediction model is as follows.
[0122] In this application, the interval prediction results obtained by two non-parametric estimation methods are used, and the proportion of the two in the interval combination prediction is optimized by the raccoon optimization algorithm to obtain their respective weights in the final interval combination prediction.
[0123] The two non-parametric estimation methods are Kernel Density Estimation (KDE) and Bootstrap resampling.
[0124] Kernel Density Estimation (KDE) and Bootstrap resampling are two non-parametric estimation methods. Kernel density estimation uses a kernel function to identify each data point, and superimposes several kernel functions to obtain the overall probability density function to achieve the conversion of point prediction results into interval prediction results. The Bootstrap method repeatedly samples the existing data with replacement, and obtains the overall distribution by calculating the statistics of the extracted sample data.
[0125] Both nonparametric estimation methods can convert point prediction results into interval prediction results, but interval prediction results often involve the problem of how to balance multiple evaluation indicators. It is difficult to determine which prediction interval result is better for such multi-objective optimization problems. The Average Interval Score (AIS) is a quantitative method that combines the width and coverage of the interval. This indicator can reflect the quality of the interval prediction results to a certain extent.
[0126] Interval prediction refers to the process of combining the point prediction value with the error distribution to obtain the prediction interval. The existing method of obtaining probability distribution through error data sets mainly adopts non-parametric estimation methods, which are characterized by not requiring specific distribution types, and being able to deduce the overall probability distribution based on only partial data. In the interval combination prediction model proposed in this application, the probability density function of the training error is first obtained by the kernel density estimation method (KDE), and one of the prediction intervals PI1 is obtained by combining the point prediction value with the confidence interval under different confidence levels. Among them, KDE is a data-based non-parametric estimation method, and the principle is to identify each sample point by applying a kernel function, and then superimpose the kernel functions of all data points to obtain the overall probability density function. Relying on this method, the distribution can be fitted according to the characteristics of the data itself, and it performs particularly well when processing nonlinear data. In this application, the kernel function used by KDE is a Gaussian kernel function.
[0127] Then, the Bootstrap resampling method is used to estimate the overall probability distribution of the training error, and another prediction interval PI2 is obtained by combining the point prediction value with the confidence interval under different confidence levels. Bootstrap resampling is a statistical resampling method, which is often used to estimate standard errors or confidence intervals. When the overall probability distribution is unknown, a number of samples are extracted from the original data set each time and put back into the original data set. The extraction is repeated n times to obtain n Bootstrap sample sets, and the distribution of the sample sets is used to infer the overall probability distribution.
[0128] The results of interval prediction usually involve the evaluation of two indicators, namely interval coverage and interval width. Interval coverage indicates the proportion of real data contained in the confidence interval, and interval width indicates the difference between the upper and lower limits of the confidence interval. To obtain a narrower confidence interval may lead to a decrease in interval coverage. Correspondingly, to obtain a higher coverage, the width of the confidence interval may be increased. This application uses the average interval score (Average Interval Score, AIS) as an evaluation indicator for the comprehensive interval coverage and width. The AIS calculation formula is shown in equations (16) and (17).
[0129]
[0130]
[0131] Among them, y i Represents the true value of the data, U i and L i They represent the upper and lower bounds of the prediction interval of the ith sample, and α represents the significance level.
[0132] Since different non-parametric estimation methods will obtain different interval prediction results, this application constructs an interval combination prediction model (Interval Combination Prediction, ICP), aggregates the two prediction intervals obtained by the two non-parametric estimation methods, and sets the aggregation weight ω to represent the proportion of PI1 in the combined prediction interval. Correspondingly, the weight of PI2 is 1-ω, and then the product of the aggregation weight and the prediction interval is added to obtain the final interval combination prediction value. Interval combination prediction value PI ICP The calculation formula is shown in (18).
[0133] PI ICP =ω×PI1+(1-ω)×PI2 (18)
[0134] Finally, AIS is used as the objective function, COA is used to optimize the aggregation weight ω, and the optimal aggregation weight is substituted into formula (18) to obtain the interval combined prediction value.
[0135] In the technical solution of the present application, the proportions of the two in the interval combination prediction are optimized through the raccoon optimization algorithm to obtain their respective weights in the final interval combination prediction.
[0136] The core concept of the raccoon optimization algorithm refers to the two behavioral patterns of coatis in nature: 1) coatis hunt iguanas living in trees through reasonable division of labor; 2) coatis escape from predators when attacked.
[0137] (1) The raccoon in the tree drives the iguana down from the tree
[0138] The raccoon optimization algorithm sets the iguana's location as the optimal target location, where half of the raccoons will climb up the tree and drive the iguana to the ground. The actions of the raccoons on the tree can be expressed as formula (19):
[0139]
[0140] Among them, N represents the population size, m represents the decision variable dimension, and X i,j represents the position of the i-th raccoon in the j-th dimension, r is a random number between [1,2], Iguana j Indicates the position of the iguana, I = 1 or 2.
[0141] (2) Raccoons hunting iguanas under a tree
[0142] After the iguana is driven to the ground, it will fall to a random location. The raccoon on the ground will move throughout the search space. The actions of the raccoon preying on the iguana under the tree can be expressed by equations (20) and (21):
[0143]
[0144]
[0145] in, represents the position of the iguana falling on the ground for the jth decision variable, represents rounding down, and F represents the objective function value. After a round of predation behavior ends, a greedy selection is performed to update the position of the raccoon. The update formula is expressed as (22):
[0146]
[0147] (3) Raccoon fleeing from predator
[0148] A coati will flee from its current location when attacked by a predator. This behavior is simulated by generating a random location around the current location:
[0149]
[0150]
[0151] Where T is the number of iterations, lb j andub j denote the lower and upper bounds of the j-th decision variable, respectively. and Respectively represent the local upper and lower bounds of the tth generation. Similarly, after all individual positions are updated, greedy selection will be performed again according to formula (22).
[0152] In this embodiment, the training error generated in the prediction model on the training set is used as the input data of the two non-parametric estimation methods, and two probability distribution functions are obtained by the kernel density estimation method and the Bootstrap method respectively, and the interval prediction width under different confidence levels is obtained by setting the confidence level. Then, the interval prediction width obtained by the non-parametric estimation method is added and subtracted on the basis of the point prediction result to obtain two interval prediction results. Next, weights are set for the interval prediction results obtained by the two methods respectively, and the raccoon optimization algorithm is used to optimize the weights according to the minimum average interval score to obtain the final interval combination prediction result and the proportion of each of the two methods.
[0153] Next, the reliability of the short-term photovoltaic power generation power interval combination prediction method based on seasonal trend decomposition of the present application is analyzed through experiments.
[0154] This application selects the historical photovoltaic output data of a photovoltaic power station on an island in Jiangsu Province from January 1, 2020 to December 31, 2022 as the original data for the study, with a collection interval of 1 hour, of which the data from January 1, 2020 to June 30, 2022 are selected as the training set, and the data from July 1, 2022 to December 31, 2022 are selected as the test set. Since the output of the photovoltaic power station is intermittent only when there is light during the day, only the photovoltaic output data from 06:00 to 19:00 every day are selected.
[0155] By analyzing the experimental data, it is found that under the island environment, the precipitation days from 06:00 to 19:00 are few and the intensity is small, the number of cloudy days is relatively small, the change of power generation is relatively regular, and the corresponding seasonality is strong. In order to verify whether the data in the experiment is seasonal, the seasonal intensity index is defined to measure its seasonality, which further demonstrates the rationality of the STL decomposition used in this application. Seasonal intensity index F s The calculation process is as follows:
[0156]
[0157] After calculation, the seasonal intensity index of the data sample in this paper is 0.5808, indicating that the seasonality of the data is strong, so it is reasonable to use STL decomposition. This application uses mean square error (MSE), root mean square error (RMSE), mean absolute error (MAE), and determination coefficient (R2) to judge the point prediction results.
[0158]
[0159]
[0160]
[0161]
[0162] Among them, n represents the total number of samples, y i represents the true value of the generated power, represents the predicted value of generated power, and y represents the mean of the true value.
[0163] This application uses the percentage of interval coverage (PICP), the normalized average interval width (PINAW) and the average interval score (AIS) to measure the quality of interval prediction results.
[0164]
[0165]
[0166]
[0167]
[0168] Among them, when calculating PICP, when p i ∈[L i ,U i ] i =1, otherwise a i =0. Among them, p i Represents the point prediction result, U i Indicates the upper bound of the current sample interval, L i It represents the lower bound of the current sample interval, R represents the range of the target value, and α represents the significance level.
[0169] The original data sequence is decomposed by STL to obtain the seasonal term S, trend term T and residual term R. The T term is predicted by ARIMA and BiTCN-BiGRU-AM forecasting models, and the results of each evaluation index are shown in Table 2. By comparison, it can be seen that when the accuracy is not much different, the execution time of the autoregressive moving average model has obvious advantages over the complex neural network model.
[0170] Table 2. Trend term model prediction error
[0171] Prediction Model MSE RMSE MAE R2 Execution time(s) ARIMA 0.639 0.799 0.491 98.4% 1.1 BiTCN-BiGRU-AM 0.551 0.742 0.460 98.6% 625.1
[0172] The forecast results for July 30, 2022 are selected for visualization. Figure 6 It can be found that the STL-ARIMA-BiTCN-BiGRU-AM proposed in this application can achieve a good prediction accuracy. The test set evaluation indicators are calculated, where R2 is 99.29%, the mean square error is 2.05KW, the root mean square error is 1.431KW, and the mean absolute error is 0.953KW.
[0173] Photovoltaic power generation is affected by factors such as light, humidity, and temperature, and there is volatility and instability. The existing technical methods cannot achieve accurate point prediction results, so it is particularly important to obtain interval prediction results. In order to realize the interval prediction model, this application uses two non-parametric estimation methods to achieve interval prediction. One is to use the kernel density estimation method using the Gaussian kernel function to estimate the error probability density function curve of the entire model, and the other is to obtain the probability distribution of the error by Bootstrap sampling of the training error. Table 3 shows the interval prediction evaluation indicators of the two methods at three confidence levels.
[0174] Table 3 KDE and Bootstrap interval prediction evaluation indicators
[0175]
[0176] It can be concluded from the table that KDE has a higher interval coverage rate under the three confidence levels, but the interval prediction results achieved by Bootstrap are narrower in comparison. Through the AIS value, it is found that under the three confidence levels, the KDE interval prediction effect is better than the Bootstrap method, but the interval width is still improved to a certain extent under the premise of meeting the interval coverage rate. The above problem can be solved by assigning the aggregation weights of the two methods to obtain the interval combination prediction results.
[0177] Table 4 Interval combination prediction evaluation index
[0178] Confidence PICP PINAW AIS KDE weight 85% confidence 86.12% 0.0444 1.7181 0.9038 90% confidence 90.17% 0.0509 1.3085 0.8541 95% confidence 94.90% 0.0639 0.8060 1.0000
[0179] Through COA, we can find the optimal weight distribution of KDE in the interval combination prediction method. From the interval combination prediction evaluation indicators presented in Table 4, we can see that a narrower prediction interval is achieved as much as possible while meeting the coverage rate. Figure 7 It is further shown that the interval combination prediction proposed in this application can achieve a better fitting result for the error and provide a better prediction interval.
[0180] Of course, the above description is not a limitation of the present invention, and the present invention is not limited to the above examples. Any changes, modifications, additions or substitutions made by ordinary technicians in this technical field within the essential scope of the present invention should fall within the protection scope of the present invention.
Claims
1. A short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition, characterized by: The following steps are involved: 1) Preprocess the data, fill in missing values, remove invalid values, and normalize the data; 2) Using seasonal trend decomposition, the power generation data is decomposed into seasonal terms, trend terms and residual terms; 3) The seasonal term remains unchanged and is added to the final point prediction result; 4) The trend item is predicted using the ARIMA model; 5) The remaining items are predicted by the BiTCN-BiGRU-AM model. 6) Add the prediction results of step 3), step 4) and step 5) to obtain the point prediction value of the generated power; 7) The final interval prediction result is obtained through the interval combination prediction model.
2. The short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition according to claim 1 is characterized by: The process of step 2) is to decompose the seasonal trend based on local weighted regression, smooth the data using local weighted regression, and obtain the local trend by fitting a low-order polynomial on each subset of the data. The specific process includes: First, Loess regression is used to smooth the time series data to obtain the preliminary trend component; Then, seasonal extraction is performed on the remaining part of the time series after removing the preliminary trend component; the data is divided into periods, and Loess smoothing is applied to the same position of each period to obtain the seasonal component; Finally, the remainder after removing the trend and seasonal components is taken as the residual component.
3. The short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition according to claim 2 is characterized by: In step 2), the initial time series data is decomposed into three components: season, trend and remainder, which can be specifically expressed as: Y t =S t +T t +R t (1) Among them, Y represents the time series, t represents each time point, S, T, and R represent the seasonal component, trend component, and residual component, respectively.
4. The short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition according to claim 2 is characterized by: In step 2), the specific steps of seasonal trend decomposition of local weighted regression include: First, define the seasonal period s and use the moving average to smooth the data in each period to get the initial value of the seasonal component: Remove seasonal components: D t =Y t -S t (3) The remaining part after removing the seasonal component is smoothed using Loess to obtain the trend component: Among them, w i It represents the weight obtained by calculating the distance between time points, usually calculated using a cubic function, and h represents the smoothing parameter; Remove the trend component from the original sequence to obtain the updated seasonal component, and use Loess to smooth the updated seasonal component again; S t =Y t -T t (6) Finally, calculate the remainder components: R t =Y t -S t -T t (7) Repeat the operations of (2)-(7) until the trend and seasonal components converge. The final three sub-components are the seasonal, trend and residual components obtained after decomposition.
5. The short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition according to claim 1 is characterized by: In step 4), the process of using the ARIMA model to predict the trend item includes: By introducing the difference part, the non-stationary series is converted into a stationary series; When the model parameters are determined, the autoregressive order and the average order are selected, and the order of difference is determined; The first-order difference operation can be expressed as: and' t =and t -and t-1 (9) Second-order or higher-order differences can be expressed as:
6. The short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition according to claim 1 is characterized by: In step 5), the specific process of predicting the remainder through the BiTCN-BiGRU-AM model includes: BiTCN is constructed by adding a bidirectional mechanism to TCN to capture the bidirectional features in time series; BiTCN is combined with a bidirectional gated recurrent unit with an attention mechanism to form BiTCN-BiGRU-AM.
7. The short-term photovoltaic power generation power interval combined forecasting method based on seasonal trend decomposition according to claim 1 is characterized by: In step 7), the specific process of obtaining the final interval prediction result through the interval combination prediction model includes: Kernel density estimation, by using a kernel function to identify each data point, and superimposing several kernel functions to obtain the overall probability density function to achieve the conversion of point prediction results into interval prediction results; Bootstrap method, which performs repeated sampling with replacement on the existing data, and obtains the overall distribution by calculating the statistics of the sample data; The interval prediction results are obtained using kernel density estimation and Bootstrap method; the proportion of kernel density estimation and Bootstrap method in interval combination prediction is optimized by Raccoon optimization algorithm to obtain their respective weights in the final interval combination prediction.
Citation Information
Patent Citations
Multi-interval-prediction-result weighting integration method
CN104298859A
Time series short-term power load prediction method based on STL decomposition
CN112736902A
Short-term generating capacity prediction method based on ensemble learning
CN116307119A
Long-term river water quality prediction method based on improved TCN model
CN117272224A
Atmospheric pollutant concentration prediction method based on STL decomposition and ARIMA-Holt-Winters model
CN118277962A