Photovoltaic power short-term prediction method and device based on multi-level reverse error correction, equipment and medium
Through multi-level reverse error correction and model stacking Stacking method, combined with data interpolation and clustering analysis, the computational complexity and prediction error problems of complex models in photovoltaic power prediction are solved, and high-precision short-term prediction of photovoltaic power is achieved.
Patent Information
- Application Number
- CN202510054889.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-14
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to the influence of various factors such as weather, climate, season, and time, the complex hybrid model has a large computational complexity and spatial complexity, making it difficult to extract key timing information, resulting in large prediction errors.
Using a short-term photovoltaic power prediction method based on multi-level reverse error correction, dimensionality reduction is reduced through data interpolation, correlation analysis, variational modal decomposition and core principal component analysis, and a prediction model based on model stacking stacking is constructed, combined with clustering analysis and reverse correction strategies to improve prediction accuracy.
It effectively solves the problems of low data resolution, meteorological data redundancy and insufficient data characteristics, improves model generalization and adaptability, significantly reduces prediction errors, and improves the accuracy of short-term prediction of photovoltaic power.
Smart Images

Figure CN119482452A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic prediction of electric power system, and in particular to a photovoltaic power short-term prediction method, device, equipment and medium based on multi-level reverse error correction. Background Art
[0002] Energy is the driving force of social development, economic growth and modernization. Faced with climate change, human beings have an increasing demand for clean energy. Photovoltaics, as one of the clean energy sources, has the characteristics of unlimited and clean, and has received widespread attention. However, the power generation of photovoltaic systems is affected by many factors such as weather, season, time, etc., and the output characteristics are intermittent and volatile, which is not conducive to the stable operation of the power grid. Therefore, accurate photovoltaic output prediction is of great practical significance to ensure the stability and reliability of the power grid.
[0003] At present, photovoltaic power generation prediction research has become one of the hot research directions in the field of renewable energy. Existing photovoltaic power generation prediction methods can be divided into physical models, statistical models, machine learning models, deep learning models and hybrid models. Physical models are highly dependent on numerical weather forecasts, and the prediction results are easily affected by inaccurate weather forecasts. Statistical models require data preprocessing and selection of model parameters, and have low accuracy. Machine learning models can effectively predict photovoltaic power based on input multivariate time series and handle nonlinear relationships, including machine learning models such as artificial intelligence networks, support vector machines, random forests and decision trees. Compared with traditional physical models, machine learning models can better process spatial and temporal information without relying on numerical weather forecasts, thereby improving prediction accuracy and operability.
[0004] With the continuous development of deep learning technology, deep neural networks can significantly improve the prediction accuracy of photovoltaic power generation. Deep learning models include convolutional upscaling networks, recurrent neural networks, long short-term memory networks, and gated recurrent units, which have achieved good results in time series prediction. However, a single machine learning model cannot achieve satisfactory prediction results, so some scholars have introduced hybrid models to predict photovoltaic power through data preprocessing, optimized predictors, and model post-processing.
[0005] However, in the field of photovoltaic power generation prediction, photovoltaic power generation has complex multivariate time-series and spatial characteristics due to the influence of weather, climate, season, time and other factors. Complex hybrid models will have large computational complexity and spatial complexity, making it difficult to extract key time-series information and resulting in large prediction errors. Therefore, it is necessary to correct the errors of photovoltaic power short-term prediction results to improve the prediction accuracy.
[0006] The information disclosed in this background technology section is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as acknowledging or suggesting in any form that the information constitutes the prior art already known to those skilled in the art. Summary of the invention
[0007] The present invention provides a photovoltaic power short-term prediction method, device, equipment and medium based on multi-level reverse error correction, thereby effectively solving the problems in the background technology.
[0008] In order to achieve the above object, the technical solution adopted by the present invention is: a photovoltaic power short-term prediction method based on multi-level reverse error correction, comprising the following steps:
[0009] Acquire multi-source meteorological data and original data of photovoltaic output, and perform data interpolation and data selection on the original data;
[0010] Decompose the selected data using variational mode decomposition, and perform kernel principal component analysis on the decomposed data to reduce the dimensionality;
[0011] The meteorological data and photovoltaic output data after dimension reduction are divided into several sub-datasets of the same size and a test set as input data, several training algorithms are selected, a prediction model based on model stacking is constructed, and the input data is input into the prediction model for training;
[0012] Using the trained prediction model to perform short-term photovoltaic power prediction and evaluate the prediction results;
[0013] By analyzing historical data or environmental factors, photovoltaic sites or prediction results with similar characteristics are clustered, and photovoltaic sites in different clusters are predicted according to the clustering results, and the prediction model is reversely corrected.
[0014] Furthermore, the performing data interpolation and data selection on the original data includes:
[0015] Using a linear interpolation method to perform interpolation processing on the original data;
[0016] The interpolated multi-source meteorological data and photovoltaic output were subjected to Spearman correlation analysis to remove influencing factors with correlation less than the set value.
[0017] Furthermore, the calculation formula of the linear interpolation method is as follows:
[0018] ;
[0019] In the formula, is the interpolation node; is the interpolated output; and They are the horizontal and vertical coordinates of the first set of data respectively; and They are the horizontal and vertical coordinates of the second set of data respectively.
[0020] Furthermore, the Spearman correlation analysis of the interpolated multi-source meteorological data and photovoltaic output includes:
[0021] ;
[0022] In the formula, For meteorological data, For photovoltaic power output, and Respectively and The rank of the observations; and Respectively and The average rank of yes Total number of yes and The Spearman correlation coefficient.
[0023] Furthermore, the method of using variational mode decomposition to decompose the selected data, performing kernel principal component analysis on the decomposed data to reduce the dimension, and further includes normalizing the processed data samples to the interval [0,1], and the normalization calculation formula is:
[0024] ;
[0025] In the formula, , , and Represent normalized data, power value, maximum power value and minimum power value respectively;
[0026] Before evaluating the prediction results, the prediction results are also denormalized.
[0027] Furthermore, in the prediction model based on model stacking, the prediction model is a two-layer framework structure, and the first layer of the prediction model includes N training algorithms A1~A N To train the base learner; the second layer of the prediction model uses algorithm A ’ to train the meta-learner.
[0028] Furthermore, the step of inputting the input data into the prediction model for training comprises the following steps:
[0029] The input data is input into the first layer of the prediction model, and the training algorithm A1 is selected to train the base learner by cross-validation to obtain D1, D2, ..., D N A total of N groups of predicted values for the validation set, denoted as t1, t2, ..., t N , and N groups of predicted values for the test set; combine the N groups of predicted values for the validation set, that is, T1=[t1,t2,...,t N ], and at the same time, the predicted values of N groups of test sets are averaged to obtain a set of predicted values b1;
[0030] Similarly, for training algorithms A2~A N Repeat the above steps and finally get the predicted value [T1,T2,...,T N ] and the predicted values of the test set [b1,b2,...,b N ];
[0031] The prediction values of the first layer base learners [T1,T2,...,T N ] and the predicted values of the test set obtained by the first layer [b1,b2,...,b N ] as the second-layer training set and test set, respectively, using algorithm A ’ To train the meta-learner and get the final prediction result.
[0032] Furthermore, in the evaluation of the prediction results, the following evaluation indicators are used for evaluation:
[0033] Relative mean square error RMSE:
[0034] ;
[0035] Mean absolute error (MAE):
[0036] ;
[0037] Mean Absolute Percent Error MAPE:
[0038] ;
[0039] Coefficient of determination R 2 :
[0040] ;
[0041] In the formula, is the number of prediction samples; is the predicted value; is the true value; is the average of the true values.
[0042] Furthermore, clustering photovoltaic stations or prediction results with similar characteristics includes:
[0043] Using the K-means clustering algorithm, the data set Divide into clusters The division criterion is to minimize the square error E, that is:
[0044] ;
[0045] Where: is the cluster center, if Belong to If the cluster is the center, the Euclidean distance between the two is calculated and summed;
[0046] To minimize the Euclidean distance between two points, that is, the partial derivative of the squared error is 0, we can get:
[0047] ;
[0048] Where: is the number of samples in the cluster, is the mean point of m samples;
[0049] The best cluster center that minimizes the squared error is the mean point of all samples in this cluster.
[0050] Furthermore, the method of predicting photovoltaic stations of different clusters according to the clustering results and reversely correcting the prediction model includes the following steps:
[0051] The prediction model input and the photovoltaic cluster power prediction results are used as analysis samples, and the K-means clustering algorithm is used as the clustering strategy to cluster the samples;
[0052] Based on the historical prediction errors of the prediction model, the correlation of the prediction error quantile to the correction effect of the prediction model is explored. Based on the boundary quantiles of the prediction interval with multiple confidence levels, the distribution law of the prediction error is characterized to achieve reverse correction of the prediction model.
[0053] The present invention also includes a photovoltaic power short-term prediction device based on multi-level reverse error correction, using the above method, the device comprising:
[0054] A data acquisition unit, used to acquire multi-source meteorological data and original data of photovoltaic output, and perform data interpolation and data selection on the original data;
[0055] A data processing unit, for decomposing the selected data using variational mode decomposition, and performing kernel principal component analysis on the decomposed data to reduce dimensionality;
[0056] A modeling unit is used to divide the meteorological data and photovoltaic output data after dimension reduction into several sub-data sets of equal size and a test set as input data, select several training algorithms, build a prediction model based on model stacking, and input the input data into the prediction model for training;
[0057] A prediction unit, used to use the trained prediction model to perform short-term prediction of photovoltaic power and evaluate the prediction result;
[0058] The correction unit is used to cluster photovoltaic sites or prediction results with similar characteristics by analyzing historical data or environmental factors, predict photovoltaic sites of different clusters respectively according to the clustering results, and reversely correct the prediction model.
[0059] The present invention also includes a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method described above is implemented.
[0060] The present invention also includes a storage medium on which a computer program is stored. When the computer program is executed by a processor, the method described above is implemented.
[0061] The beneficial effects of the present invention are as follows: In view of the common defects of the commonly used deep learning algorithms for photovoltaic power prediction in power systems, the present invention proposes a photovoltaic power short-term prediction method based on multi-level reverse error correction. The problem of low data resolution is solved by data interpolation method, the problem of redundant meteorological data is solved by correlation analysis, the problem of insufficient data features is solved by variational mode decomposition and kernel principal component analysis methods, the problem of poor model generalization is solved by modeling different physical level data of stations, lines and transformers through adaptive Stacking ensemble learning model, and the problem of unclear photovoltaic output trend is solved by multi-level prediction model correction strategy. Therefore, the present invention has the advantages of considering data time series correlation, accurately capturing feature changes, good model generalization, high model adaptability and high prediction accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0062] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0063] Figure 1 is a flow chart of the method in Example 1;
[0064] Figure 2 It is a structural schematic diagram of the device in Example 1;
[0065] Figure 3 Schematic diagram of the structure of the prediction error correction model in Example 2;
[0066] Figure 4 This is a schematic diagram of prediction error correction in Example 2;
[0067] Figure 5 This is a schematic diagram of the clustering results in Example 2;
[0068] Figure 6 It is a schematic diagram of the structure of the computer device of the present invention. DETAILED DESCRIPTION
[0069] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0070] Embodiment 1:
[0071] like Figure 1 As shown: A photovoltaic power short-term prediction method based on multi-level reverse error correction includes the following steps:
[0072] Obtain multi-source meteorological data and original data of photovoltaic output, and perform data interpolation and data selection on the original data;
[0073] Decompose the selected data using variational mode decomposition, and perform kernel principal component analysis on the decomposed data to reduce the dimensionality;
[0074] The meteorological data and photovoltaic output data after dimension reduction are divided into several sub-datasets of equal size and a test set as input data. Several training algorithms are selected to build a prediction model based on model stacking. The input data is input into the prediction model for training.
[0075] Use the trained prediction model to perform short-term PV power prediction and evaluate the prediction results;
[0076] By analyzing historical data or environmental factors, photovoltaic sites or prediction results with similar characteristics are clustered, and photovoltaic sites in different clusters are predicted based on the clustering results, and the prediction model is reversely corrected.
[0077] In view of the common defects of the commonly used deep learning algorithms for photovoltaic power prediction in power systems, this embodiment proposes a photovoltaic power short-term prediction method based on multi-level reverse error correction. The problem of low data resolution is solved by data interpolation method, the problem of meteorological data redundancy is solved by correlation analysis, the problem of insufficient data features is solved by variational mode decomposition and kernel principal component analysis methods, the problem of poor model generalization is solved by modeling the data of different physical levels of stations, lines, and transformers through adaptive Stacking ensemble learning model, and the problem of unclear photovoltaic output trend is solved by multi-level prediction model correction strategy. Therefore, this embodiment has the advantages of considering data time series correlation, accurately capturing feature changes, good model generalization, high model adaptability, and high prediction accuracy.
[0078] In this embodiment, data interpolation and data selection are performed on the original data, including:
[0079] Use linear interpolation method to interpolate the original data;
[0080] The interpolated multi-source meteorological data and photovoltaic output were subjected to Spearman correlation analysis to remove influencing factors with correlation less than the set value.
[0081] Among them, the calculation formula of the linear interpolation method is as follows:
[0082] ;
[0083] In the formula, is the interpolation node; is the interpolated output; and They are the horizontal and vertical coordinates of the first set of data respectively; and They are the horizontal and vertical coordinates of the second set of data respectively.
[0084] The interpolated multi-source meteorological data and photovoltaic output are subjected to Spearman correlation analysis, including:
[0085] ;
[0086] In the formula, For meteorological data, For photovoltaic power output, and Respectively and The rank of the observations; and Respectively and The average rank of yes Total number of yes and The Spearman correlation coefficient.
[0087] As a preferred embodiment of the above, the selected data is decomposed using variational mode decomposition, and after the decomposed data is subjected to kernel principal component analysis to reduce the dimension, the processed data samples are normalized to the interval [0,1], and the normalization calculation formula is:
[0088] ;
[0089] In the formula, , , and Represent normalized data, power value, maximum power value and minimum power value respectively;
[0090] Before evaluating the prediction results, the prediction results are also denormalized.
[0091] In this embodiment, in constructing a prediction model based on model stacking, the prediction model is a two-layer framework structure. The first layer of the prediction model includes N training algorithms A1~A N To train the base learner; the second layer of the prediction model uses algorithm A ’ to train the meta-learner.
[0092] Among them, inputting input data into the prediction model for training includes the following steps:
[0093] Input the input data into the first layer of the prediction model, select the training algorithm A1 to train the base learner by cross-validation, and obtain D1, D2, ..., D N A total of N groups of predicted values for the validation set, denoted as t1, t2, ..., t N , and N groups of predicted values for the test set; combine the N groups of predicted values for the validation set, that is, T1=[t1,t2,...,t N ], and at the same time, the predicted values of N groups of test sets are averaged to obtain a set of predicted values b1;
[0094] Similarly, for training algorithms A2~A N Repeat the above steps and finally get the predicted value [T1,T2,...,T N ] and the predicted values of the test set [b1,b2,...,b N ];
[0095] The prediction values of the first layer base learners [T1,T2,...,T N ] and the predicted values of the test set obtained by the first layer [b1,b2,...,bN ] as the second-layer training set and test set, respectively, using algorithm A ’ To train the meta-learner and get the final prediction result.
[0096] The following evaluation indicators are used to evaluate the prediction results:
[0097] Relative mean square error RMSE:
[0098] ;
[0099] Mean absolute error (MAE):
[0100] ;
[0101] Mean Absolute Percent Error MAPE:
[0102] ;
[0103] Coefficient of determination R 2 :
[0104] ;
[0105] In the formula, is the number of prediction samples; is the predicted value; is the true value; is the average of the true values.
[0106] As a preferred embodiment of the above, clustering photovoltaic stations or prediction results with similar characteristics includes:
[0107] Using the K-means clustering algorithm, the data set Divide into clusters The division criterion is to minimize the square error E, that is:
[0108] ;
[0109] Where: is the cluster center, if Belong to If the cluster is the center, the Euclidean distance between the two is calculated and summed;
[0110] To minimize the Euclidean distance between two points, that is, the partial derivative of the squared error is 0, we can get:
[0111] ;
[0112] Where: is the number of samples in the cluster, is the mean point of m samples;
[0113] The best cluster center that minimizes the squared error is the mean point of all samples in this cluster.
[0114] In this embodiment, predictions are made for photovoltaic stations of different clusters according to the clustering results, and the prediction model is reversely corrected, including the following steps:
[0115] The prediction model input and the photovoltaic cluster power prediction results are used as analysis samples, and the K-means clustering algorithm is used as the clustering strategy to classify the samples into clusters.
[0116] Based on the historical prediction errors of the prediction model, the correlation between the prediction error quantile and the correction effect of the prediction model is explored. Based on the boundary quantiles of the prediction interval with multiple confidence levels, the distribution law of the prediction error is characterized to achieve reverse correction of the prediction model.
[0117] like Figure 2 As shown, this embodiment also includes a photovoltaic power short-term prediction device based on multi-level reverse error correction, using the above method, the device includes:
[0118] A data acquisition unit is used to acquire multi-source meteorological data and original data of photovoltaic output, and perform data interpolation and data selection on the original data;
[0119] A data processing unit, for decomposing the selected data using variational mode decomposition, and performing kernel principal component analysis on the decomposed data to reduce dimensionality;
[0120] The modeling unit is used to divide the meteorological data and photovoltaic output data after dimension reduction into several sub-datasets of the same size and a test set as input data, select several training algorithms, build a prediction model based on model stacking, and input the input data into the prediction model for training;
[0121] A prediction unit, used to use the trained prediction model to perform short-term prediction of photovoltaic power and evaluate the prediction results;
[0122] The correction unit is used to cluster photovoltaic sites or prediction results with similar characteristics by analyzing historical data or environmental factors, predict photovoltaic sites in different clusters according to the clustering results, and reversely correct the prediction model.
[0123] Embodiment 2:
[0124] This embodiment provides a photovoltaic power short-term prediction method based on multi-level reverse error correction. The model structure is as follows: Figure 3As shown in the figure, the power data of the station, line and transformer at multiple physical levels are used to realize short-term power prediction through adaptive ensemble learning methods according to the corresponding time series characteristics. Then, the correlation of the three at different levels is studied to realize multi-level correction. At the same time, the distribution law of the prediction error is considered to correct the prediction model, so as to form a prediction model correction strategy with the deterministic and probabilistic prediction cycle correction mode. The schematic diagram is shown in the figure. Figure 4 As shown, the following steps are included:
[0125] Step 1: Raw data processing, including data interpolation and data selection.
[0126] This embodiment uses a high-precision interpolation method to transform low-resolution data into high-resolution data, increasing the integrity and continuity of the data. Next, the multi-source meteorological data after interpolation is subjected to Spearman correlation analysis with photovoltaic output, excluding factors with less correlation, and the calculation formulas for linear interpolation and Spearman correlation coefficient are as follows:
[0127] (1)
[0128] In the formula, is the interpolation node; is the interpolated output; and They are the horizontal and vertical coordinates of the first set of data respectively; and They are the horizontal and vertical coordinates of the second set of data respectively.
[0129] Assume that the weather data is , photovoltaic output is , the calculation formula of Spearman correlation coefficient is
[0130] (2)
[0131] In the formula, and Respectively and The rank of the observations; and Respectively and The average rank of yes Total number of yes and The Spearman correlation coefficient.
[0132] Step 2: Data feature extraction based on multi-level frequency domain decomposition.
[0133] By decomposing the time series, different prediction strategies are adopted for different series to improve the prediction quality. The above processed meteorological characteristic data are decomposed by variational mode decomposition to enrich the diversity of input variables and highlight the local characteristics of environmental series at different time scales. Then, the decomposed meteorological characteristic data are subjected to kernel principal component analysis to reduce the dimension, and the contribution rate is taken as 85%. The processed characteristic data samples are normalized to the interval [0,1]. The normalization calculation formula is:
[0134] (3)
[0135] In the formula, , , and Represent normalized data, power value, maximum power value, and minimum power value, respectively.
[0136] Step 3: PV cluster power prediction using adaptive ensemble learning method.
[0137] The processed meteorological data features and photovoltaic output data are divided into N sub-datasets of the same size and a test set, which are used as input data for the Stacking prediction model.
[0138] The training steps of the first layer of the Stacking prediction model are as follows: select N training algorithms and input the integrated data into the first layer of the Stacking prediction model. Select training algorithm A1 to train the base learner by cross-validation to obtain D1, D2, ..., D N A total of N groups of predicted values for the validation set, denoted as t1, t2, ..., t N , and N groups of predicted values for the test set; combine the N groups of predicted values for the validation set, that is, T1=[t1,t2,...,t N ], and the predicted values of the N test sets are averaged to obtain a set of predicted values b1. Similarly, for training algorithms A2~A N Repeat the above steps and finally get the predicted value [T1,T2,...,T N ] and the predicted values of the test set [b1,b2,...,b N ];
[0139] The training steps of the second layer of the Stacking prediction model are as follows: the prediction values [T1, T2, ..., T N ] and the predicted values of the test set obtained by the first layer [b1,b2,...,b N ] as the second-layer training set and test set, respectively, using algorithm A ’ To train the meta-learner and get the final prediction result.
[0140] Regarding the selection of two-layer training algorithms under the Stacking framework, this embodiment uses RF, KNN and BP algorithms to train the base learner, selects LSTM to train the meta-learner, and constructs a prediction model based on Stacking. It models and verifies the data of different physical levels of the platform, line and transformer, and completes the establishment of a deterministic prediction model.
[0141] Step 4: Evaluate the prediction results
[0142] First, the prediction results are denormalized and then evaluated. This embodiment uses four evaluation indicators to evaluate the performance of model prediction, namely, root mean square error (RMSE), mean absolute error (MAE), mean absolute percentage error (MAPE) and determination coefficient (R 2 ) to evaluate the prediction effect, which are recorded as RMSE, MAE, MAPE and R 2 , the calculation formula is as follows:
[0143] (4)
[0144] (5)
[0145] (6)
[0146] (7)
[0147] In the formula, is the number of prediction samples; is the predicted value; is the true value; is the average of the true values.
[0148] Step 5: Perform multi-level reverse error correction
[0149] Considering that the power mutation of a single unit is greater than that of a group unit, the group unit output can overall reflect the trend of power generation data changes over a period of time and in a region. The group unit output can be used to establish a trend reference, improve the prediction performance of single unit output, and form a trend analysis of "station reference line, line reference change". At the same time, the trend impact caused by seasonal differences can be considered to further improve the prediction performance. Explore the correlation between the output of a large group and the output of a small group within its region. Based on the analysis of the large group output, introduce the corresponding analysis results into the sample analysis stage of the small group output prediction model, so as to realize the use of the large group output to reflect the output change trend of the overall region and improve the judgment of the future changes in the output of the small group.
[0150] The application of cluster analysis in photovoltaic forecasting, especially in the forecasting of clusters and individual photovoltaic sites, plays an important role. Its main goal is to classify photovoltaic sites or forecast results with similar characteristics into one category by analyzing historical data or environmental factors, thereby improving the accuracy and reliability of the forecast. This example uses the K-means clustering algorithm to cluster the data set. Divide into clusters The division criterion is to minimize the square error E, that is:
[0151] (8)
[0152] Where: is the cluster center, if Belong to If the cluster is the center, the Euclidean distance between the two points is calculated and summed. To minimize the Euclidean distance between two points, that is, the partial derivative of the square error is 0, we can derive:
[0153] (9)
[0154] Where: is the number of samples in the cluster, is the mean point of m samples. From formula (9), we can get the optimal cluster center that minimizes the square error: is the mean point of all samples in this cluster.
[0155] PV stations in the same area may be affected by similar weather changes, so their power generation patterns may also be similar. Through clustering, stations with similar environments can be grouped together based on factors such as the climate and geographical conditions of the area where the stations are located. After multiple PV stations are divided into several clusters based on similarity, predictions can be made for each cluster separately, thus avoiding the errors caused by predicting stations with different environments and characteristics together. At the same time, different clusters in a cluster may have different seasonal or periodic patterns, and clustering can help identify these patterns and use them for prediction.
[0156] By clustering the historical data of a single photovoltaic station, we can identify power generation patterns similar to those of other photovoltaic stations, and infer the power generation trend of the entire cluster through this pattern. By finding the commonalities and similarities between a single station and a cluster, we can expand the prediction to the entire cluster. The main steps are as follows:
[0157] 1) Group output analysis: Taking the photovoltaic cluster as the output research object, based on the above-mentioned ensemble learning method, the photovoltaic station group output prediction research is realized.
[0158] 2) Multi-level correlation analysis. The PV station output prediction model input and PV cluster power prediction results are used as analysis samples. The aforementioned K-means method is used as a clustering strategy to classify the samples into clusters, improve the accuracy of the prediction model samples, implement multi-level correlation analysis, and optimize the prediction model's judgment on the overall output and weather process change trends in the region.
[0159] 3) Photovoltaic output prediction: Taking the output of photovoltaic stations as the prediction object, numerical weather forecast as the prediction model input, and the aforementioned adaptive dynamic integrated learning method as the prediction system, a short-term photovoltaic output prediction model is established.
[0160] 4) Forecast error correction. Based on the historical forecast errors of the photovoltaic output forecast model, the correlation between the forecast error quantile and the correction effect of the forecast model is explored. Based on the boundary quantiles of the forecast interval with multiple confidence levels, the distribution law of the forecast error is characterized, and the forecast model is reversely corrected to improve the forecast performance.
[0161] To verify the performance of this embodiment, a data set from the 2014 Global Energy Forecasting Competition was used for simulation verification. The data set includes solar energy data and meteorological data from a certain place from 2012 to 2014, with a sampling interval of 1h. The linear interpolation method is used to convert the original data with a resolution of 1 hour into a resolution of 15 minutes. Then, the Spearman correlation coefficient of photovoltaic power and 12 meteorological characteristic parameters is calculated in pairs, and finally the relative humidity at 1000 mbar (r), 2-meter temperature, surface solar radiation, surface thermal radiation and top net solar radiation are selected as meteorological characteristic data. The base learner is trained using RF, KNN and BP algorithms, and the meta-learner is trained using LSTM to form a prediction model based on Stacking. The data from April 2012 is selected for comparative experiments, and the training set and the test set are divided according to a ratio of 7:3. In order to ensure the accuracy of the experimental results, each experiment is carried out 5 times, and finally the prediction results with the median prediction accuracy are taken for subsequent analysis and comparison, and the deterministic prediction result indicators are summarized in Table 1.
[0162] Table 1 Summary of various deterministic prediction indicators
[0163]
[0164] It can be seen from Table 1 that the model proposed in this embodiment is superior to other models in each evaluation index and has a good prediction effect. Among them, the RMSE value is 0.022275MW, which is reduced by 11.6%, 13.1%, and 60.99% compared with the other three models respectively; the MAE value is 0.014598NW, which is reduced by 35.3%, 37.8%, and 75% compared with the other three models respectively; the MAPE value is 5.4039%, which is reduced by 1.62%, 1.87%, and 6.41% compared with the other three models respectively; the determination coefficient R 2 In summary, compared with other models, the adaptive Stacking ensemble learning model has a significant increase in prediction accuracy, a significant decrease in prediction error, and a higher degree of fit between the prediction results and the true value, indicating that the adaptive ensemble learning model proposed in this embodiment has a significant improvement in performance compared with other comparative prediction models.
[0165] The PV station output prediction model input and PV cluster power prediction results are used as analysis samples. The aforementioned K-means method is used as a clustering strategy to classify the samples into clusters, improve the accuracy of the prediction model samples, implement multi-level correlation analysis, and optimize the prediction model's judgment on the overall output and weather process change trends in the region. The clustering results are as follows: Figure 5 shown.
[0166] By reducing the data to 3 dimensions using principal component analysis, the distribution and clustering effect of the data can be observed intuitively. In PCA, the first three principal components retain the information of the original data to the greatest extent. In order to study the distribution of various types of data, 2160 sets of data from different stations were obtained by equal interval sampling and recorded as data sets. It can be seen that the clustering boundaries of the three types of data are relatively obvious, the discrimination is good, and the arrangement characteristics of various types of data are obvious.
[0167] Using the three types of data divided after K-means clustering, models are established for short-term photovoltaic power prediction. The prediction results are compared with the model without clustering, and the accuracy of the two in different actual power prediction results is analyzed. The performance evaluation is shown in Table 2.
[0168] Table 2 Summary of performance evaluation indicators
[0169]
[0170] From the comparative analysis in Table 2, it is found that although the prediction using data without clustering can better reflect the time-varying characteristics of photovoltaic power, in some complex cases, the prediction accuracy and generalization ability still need to be improved. The prediction using clustered data can identify the common characteristics between different sites and more accurately capture the photovoltaic power generation trend. The RMSE is reduced by 24.5%, the MAE is reduced by 21.96%, and the MAPE is reduced by 2.76%. Therefore, clustering effectively improves the prediction accuracy, captures trends to predict future power generation performance, analyzes the behavior and performance of different sites as a whole, enables a single site to represent the overall performance of other sites in the cluster, obtains the power generation trend of the cluster, uses trends to predict the power generation of other sites, optimizes the operation and maintenance strategy, and makes the prediction results more stable and reliable.
[0171] In view of the common defects of the commonly used deep learning algorithms for photovoltaic power prediction in power systems, this embodiment proposes a photovoltaic power short-term prediction method based on multi-level reverse error correction. The problem of low data resolution is solved by data interpolation method, the problem of meteorological data redundancy is solved by correlation analysis, the problem of insufficient data features is solved by variational mode decomposition and kernel principal component analysis methods, the problem of poor model generalization is solved by modeling the data of different physical levels of stations, lines, and transformers through adaptive Stacking ensemble learning model, and the problem of unclear photovoltaic output trend is solved by multi-level prediction model correction strategy. Therefore, this embodiment has the advantages of considering data time series correlation, accurately capturing feature changes, good model generalization, high model adaptability, and high prediction accuracy.
[0172] See also Figure 6 A computer device 400 provided in an embodiment of the present application includes: a processor 410 and a memory 420, wherein the memory 420 stores a computer program executable by the processor 410, and when the computer program is executed by the processor 410, the above method is executed.
[0173] The embodiment of the present application further provides a storage medium 430 on which a computer program is stored. When the computer program is run by the processor 410, the above method is executed.
[0174] Among them, the storage medium 430 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable red-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, disk or optical disk.
[0175] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. "Multiple" means two or more, unless otherwise clearly and specifically defined.
[0176] In the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", "connected", "fixed" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, it can be the internal connection of two elements or the interaction relationship between two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0177] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0178] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present invention includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by those skilled in the art to which the embodiments of the present invention belong.
[0179] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purposes of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples (non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0180] It should be understood that the various parts of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0181] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0182] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.
Claims
1. A photovoltaic power short-term prediction method based on multi-level reverse error correction, characterized in that: The steps include: Acquire multi-source meteorological data and original data of photovoltaic output, and perform data interpolation and data selection on the original data; Decompose the selected data using variational mode decomposition, and perform kernel principal component analysis on the decomposed data to reduce the dimensionality; The meteorological data and photovoltaic output data after dimension reduction are divided into several sub-datasets of the same size and a test set as input data, several training algorithms are selected, a prediction model based on model stacking is constructed, and the input data is input into the prediction model for training; Using the trained prediction model to perform short-term photovoltaic power prediction and evaluate the prediction results; By analyzing historical data or environmental factors, photovoltaic sites or prediction results with similar characteristics are clustered, and photovoltaic sites in different clusters are predicted according to the clustering results, and the prediction model is reversely corrected.
2. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 1 is characterized in that: The performing data interpolation and data selection on the original data includes: Using a linear interpolation method to perform interpolation processing on the original data; The interpolated multi-source meteorological data and photovoltaic output were subjected to Spearman correlation analysis to remove influencing factors with correlation less than the set value.
3. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 2 is characterized in that: The calculation formula of the linear interpolation method is as follows: ; In the formula, is the interpolation node; is the interpolated output; and They are the horizontal and vertical coordinates of the first set of data respectively; and They are the horizontal and vertical coordinates of the second set of data respectively.
4. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 2 is characterized in that: The Spearman correlation analysis of the interpolated multi-source meteorological data and photovoltaic output includes: ; In the formula, For meteorological data, For photovoltaic power generation, and Respectively and The rank of the observations; and Respectively and The average rank of yes Total number of yes and The Spearman correlation coefficient.
5. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 1 is characterized in that: The method of using variational mode decomposition to decompose the selected data, performing kernel principal component analysis on the decomposed data to reduce the dimension, and further includes normalizing the processed data samples to the interval [0,1], and the normalization calculation formula is: ; In the formula, , , and Represent normalized data, power value, maximum power value and minimum power value respectively; Before evaluating the prediction results, the prediction results are also denormalized.
6. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 1 is characterized in that: In the prediction model based on model stacking, the prediction model is a two-layer framework structure. The first layer of the prediction model includes N training algorithms A1~A N To train the base learner; the second layer of the prediction model uses algorithm A ’ to train the meta-learner.
7. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 6 is characterized in that: The step of inputting the input data into the prediction model for training comprises the following steps: The input data is input into the first layer of the prediction model, and the training algorithm A1 is selected to train the base learner by cross-validation to obtain D1, D2, ..., D N A total of N groups of predicted values for the validation set, denoted as t1, t2, ..., t N , and N groups of predicted values for the test set; combine the N groups of predicted values for the validation set, that is, T1=[t1,t2,...,t N ], and at the same time, the predicted values of N groups of test sets are averaged to obtain a set of predicted values b1; Similarly, for training algorithms A2~A N Repeat the above steps and finally get the predicted value [T1,T2,...,T N ] and the predicted values of the test set [b1,b2,...,b N ]; The prediction values of the first layer base learners [T1,T2,...,T N ] and the predicted values of the test set obtained by the first layer [b1,b2,...,b N ] as the second-layer training set and test set, respectively, using algorithm A ’ To train the meta-learner and get the final prediction result.
8. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 1 is characterized in that: In the evaluation of the prediction results, the following evaluation indicators are used for evaluation: Relative mean square error RMSE: ; Mean absolute error (MAE): ; Mean Absolute Percent Error MAPE: ; Coefficient of determination R 2 : ; In the formula, is the number of prediction samples; is the predicted value; is the true value; is the average of the true values.
9. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 1 is characterized in that: The clustering of photovoltaic stations or prediction results with similar characteristics includes: Using the K-means clustering algorithm, the data set Divide into clusters The division criterion is to minimize the square error E, that is: ; Where: is the cluster center, if Belong to If the cluster is the center, the Euclidean distance between the two is calculated and summed; To minimize the Euclidean distance between two points, that is, the partial derivative of the squared error is 0, we can get: ; Where: is the number of samples in the cluster, is the mean point of m samples; The best cluster center that minimizes the squared error is the mean point of all samples in this cluster.
10. The photovoltaic power short-term prediction method based on multi-level reverse error correction according to claim 9, characterized in that: The method of predicting photovoltaic stations of different clusters according to the clustering results and reversely correcting the prediction model comprises the following steps: The prediction model input and the photovoltaic cluster power prediction results are used as analysis samples, and the K-means clustering algorithm is used as the clustering strategy to cluster the samples; Based on the historical prediction errors of the prediction model, the correlation of the prediction error quantile to the correction effect of the prediction model is explored. Based on the boundary quantiles of the prediction interval with multiple confidence levels, the distribution law of the prediction error is characterized to achieve reverse correction of the prediction model.
11. A photovoltaic power short-term prediction device based on multi-level reverse error correction, characterized in that: Using the method according to any one of claims 1 to 10, the device comprises: A data acquisition unit, used to acquire multi-source meteorological data and original data of photovoltaic output, and perform data interpolation and data selection on the original data; A data processing unit, for decomposing the selected data using variational mode decomposition, and performing kernel principal component analysis on the decomposed data to reduce dimensionality; A modeling unit is used to divide the meteorological data and photovoltaic output data after dimension reduction into several sub-data sets of equal size and a test set as input data, select several training algorithms, build a prediction model based on model stacking, and input the input data into the prediction model for training; A prediction unit, used to use the trained prediction model to perform short-term prediction of photovoltaic power and evaluate the prediction result; The correction unit is used to cluster photovoltaic sites or prediction results with similar characteristics by analyzing historical data or environmental factors, predict photovoltaic sites of different clusters respectively according to the clustering results, and reversely correct the prediction model.
12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method according to any one of claims 1 to 10 is implemented.
13. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Wind power prediction method based on fluctuation sequence classification correction
CN114372640A
Ultra-short-term photovoltaic power prediction method based on improved whale optimization algorithm
CN117318036A
Adaptive rolling correction photovoltaic day-ahead prediction method based on FA-BLS-GWO
CN118428760A
Photovoltaic power prediction method and device based on multi-source meteorological data and multi-model integration, and storage medium
CN119066409A
Cited By
Unoccupied parking space fluctuation interval prediction method and related equipment
CN120316584A
A method and related equipment for predicting fluctuation intervals of vacant parking spaces
CN120316584B
Photovoltaic power generation amount prediction method based on multi-model cooperation, time sequence feature correction and fusion
CN122757886A