Photovoltaic power short-term probability prediction method, device, equipment and medium
The original data was processed through data interpolation and correlation analysis, and features were extracted in combination with EMD and KPCA models, and prediction was performed using Stacking models. Finally, through the adaptive boundary optimization strategy, the problems of poor generalization and inflexible error boundary processing in the existing short-term probability prediction methods were solved, achieving efficient and accurate photovoltaic power prediction.
Patent Information
- Application Number
- CN202411714147.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
The existing short-term probability prediction methods for photovoltaic power ignore the intrinsic relationship between meteorological data and photovoltaic output, have poor generalization of the model, and lack flexible processing of error boundary quantiles, resulting in poor prediction effect.
Data interpolation and correlation analysis were used to process the original data, and the correlation characteristics of photovoltaic power and meteorological data were extracted based on the empirical modal decomposition (EMD) and nuclear principal component analysis (KPCA) models were used to perform deterministic predictions, and the generalization ability of the model was improved through cross-validation, and finally the prediction results were corrected based on the adaptive boundary optimization strategy.
It improves the accuracy and reliability of short-term probability prediction of photovoltaic power, enhances the generalization ability of the model and the quality of prediction error analysis, and can efficiently process multi-source data and consider data timing correlation.
Smart Images

Figure CN119647998A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of photovoltaic prediction of power systems, and in particular to a method, device, equipment and medium for short-term probability prediction of photovoltaic power. Background Art
[0002] As the most abundant and most promising clean energy among renewable energy sources, the development and utilization of solar energy has become an important direction for my country's energy structure adjustment. The short-term power forecast of photovoltaic power generation can not only effectively reduce the impact of photovoltaic output uncertainty on the power grid, but also improve the reliability of photovoltaic power generation systems, thereby promoting the high-quality and stable power supply of the power grid. In recent years, the development and utilization of solar energy has become an important field of global energy transformation, and photovoltaic power generation has entered a stage of large-scale development, showing good prospects.
[0003] After years of research, photovoltaic power generation prediction methods have formed a relatively mature system. The mainstream prediction methods include statistical methods and artificial intelligence algorithms. Although statistical methods are widely used because of their simple principles and easy implementation, the prediction effect is often not ideal when the sample data is complex. On the other hand, the effect of artificial intelligence algorithms in processing time series is not satisfactory, especially when predicting longer time series, its performance is insufficient. For this reason, deep learning methods have been introduced, especially long short-term memory networks (LSTM), which are widely used in photovoltaic power prediction due to their superior historical data memory ability and ability to handle long-term dependencies.
[0004] However, the current photovoltaic power short-term probability forecasting methods generally ignore the intrinsic connection between meteorological data and photovoltaic output, have poor model generalization, lack of flexible treatment of error boundary quantiles, and other problems, resulting in poor model prediction results. Therefore, it is urgent to study new photovoltaic power short-term probability forecasting methods with new model fusion and adaptive boundary optimization to overcome these shortcomings.
[0005] 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
[0006] The present invention provides a photovoltaic power short-term probability prediction method, device, equipment and medium, thereby effectively solving the problems in the background technology.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is: a photovoltaic power short-term probability prediction method, comprising the following steps:
[0008] S10: processing the original data, including data interpolation and data selection, to obtain preprocessed data;
[0009] S20: extracting features of the preprocessed data based on EMD and KPCA models, including relevant features of photovoltaic power and meteorological data, so as to extract key factors affecting photovoltaic power generation;
[0010] S30: using a Stacking model to perform deterministic prediction on the extracted features, generating a preliminary photovoltaic power prediction result, and improving the generalization ability of the Stacking model through cross-validation;
[0011] S40: Evaluate the photovoltaic power prediction result, calculate the prediction error and perform performance analysis to obtain a prediction result;
[0012] S50: Based on the prediction result, an adaptive boundary optimization strategy is used to correct the deterministic prediction result, thereby generating a short-term probabilistic prediction result of photovoltaic power.
[0013] Furthermore, in step S10, the original data is processed, including data interpolation and data selection, to obtain preprocessed data, including:
[0014] S11: performing interpolation processing on the original data using a linear interpolation method to convert low-resolution data into high-resolution data to improve the integrity and continuity of the data;
[0015] S12: Based on the interpolation processing results of the data, a Spearman correlation analysis is performed on the interpolated multi-source meteorological data and the photovoltaic output to evaluate the correlation between the meteorological data and the photovoltaic output, and influencing factors with a high correlation with photovoltaic power generation are selected to optimize the data set and calculate the Spearman correlation coefficient.
[0016] Furthermore, the calculation model of the linear interpolation method includes:
[0017]
[0018] Where y is the interpolated output, x is the interpolation node, x1 and y1 are the horizontal and vertical coordinates of the first set of data, respectively; x2 and y2 are the horizontal and vertical coordinates of the second set of data, respectively.
[0019] Furthermore, assuming that the meteorological data is X and the photovoltaic output is Y, the calculation model of the Spearman correlation coefficient includes:
[0020]
[0021] Where ρ is the Spearman correlation coefficient between X and Y, x i and i are the observed values ranks of X and Y respectively, and are the average ranks of X and Y respectively, and N is the total number of X.
[0022] Further, in step S20, feature extraction is performed on the preprocessed data based on the EMD and KPCA models, the steps comprising:
[0023] S21: The processed meteorological and PV power characteristic data are decomposed using the EMD algorithm to enrich the diversity of input variables and highlight the local characteristics of environmental sequences at different time scales;
[0024] S22: performing KPCA dimensionality reduction on the decomposed feature data, and selecting a principal component whose cumulative contribution rate reaches 85%;
[0025] S23: normalize the processed feature data samples to the interval [0,1], and the normalization calculation model is:
[0026]
[0027] In the formula, P′, P, P max and P min They are normalized data, power value, maximum power value and minimum power value respectively.
[0028] Furthermore, in step S30, the Stacking model is used to perform deterministic prediction on the extracted features to generate preliminary photovoltaic power prediction results, and the generalization ability of the Stacking model is improved through cross-validation. The steps include:
[0029] S31: Integrate the meteorological data and photovoltaic power data whose features are extracted by EMD and KPCA, and divide them into N sub-datasets of the same size and a test set as input data of the Stacking prediction model;
[0030] S32: Select N training algorithms, input the integrated data into the first-layer prediction model, select training algorithm A1, train the base learner through 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 the predicted values of N groups for the test set;
[0031] S33: Combine the N groups of predicted values for the validation set, i.e., T1 = [t1, t2, ..., t N ], and average the predicted values of the N test sets to obtain a set of predicted values b1;
[0032] S34: Repeat steps S32 to S33, and select training algorithms A2 to AN , and finally obtain the prediction value of the base learner [T1,T2,...,T N ] and the predicted values of the test set [b1,b2,...,b N ];
[0033] S35: The predicted values [T1, T2, ..., T N ] and the predicted values of the test set [b1,b2,...,b N ] are used as the training set and test set of the second layer respectively, and the meta-learner is trained using algorithm A' to obtain the final prediction results;
[0034] S36: Under the Stacking framework, RF, SVM and KNN are selected as the training algorithms of the base learner, and Linear Regression is selected as the training algorithm of the meta learner to form a prediction model based on Stacking.
[0035] Furthermore, in step S40, the photovoltaic power prediction result is evaluated, and the steps include:
[0036] S41: firstly perform a denormalization process on the photovoltaic power prediction result;
[0037] S42: The relative mean square error, mean absolute error, mean absolute percentage error and coefficient of determination are used to evaluate the performance of the model prediction. The model includes:
[0038]
[0039] In the formula, RMSE is the relative mean square error, MAE is the mean absolute error, MAPE is the mean absolute percentage error, R 2 is the coefficient of determination, N is the number of prediction samples, y i is the predicted value, is the true value, is the average of the true values.
[0040] Furthermore, in step S50, based on the prediction result, an adaptive boundary optimization strategy is used to correct the deterministic prediction result, and the steps include:
[0041] S51: Evaluate the reliability and overall performance of the prediction interval based on the deviation between the prediction interval coverage probability and the nominal confidence of the prediction interval and the interval score;
[0042] S52: Considering the deviation of the points outside the prediction interval, a cost function of the optimization problem is used to describe it;
[0043] S53: Based on the cost function, the boundary of the prediction interval is optimized by combining the extreme learning machine with the traditional linear quantile regression method to improve the accuracy of the boundary quantile.
[0044] Furthermore, in step S51, the model of the prediction interval coverage probability includes:
[0045]
[0046] Where, T p is the number of prediction samples, η i is a Boolean quantity, t i is the predicted value, I α is the prediction interval.
[0047] Furthermore, sharpness is an indicator used to measure the width of the prediction interval, and the sharpness model includes:
[0048]
[0049]
[0050] In the formula, AW α is the width of the interval prediction interval, T p is the number of prediction samples, W(x i ) is the width of each prediction interval, is the upper boundary, q α is the lower boundary.
[0051] Further, in step S51, according to the deviation between the prediction interval coverage probability and the prediction interval nominal confidence and the interval score, including the sharpness and the interval score, the model includes:
[0052]
[0053] In the formula, S α (x i ) is the bandwidth deviation of the prediction interval of the i-th iteration, W(x i ) is the width of each prediction interval, q α is the lower boundary, is the upper boundary, t i is the target value, α is the quantile, T p is the number of prediction samples.
[0054] Further, in step S52, the cost function of the optimization problem is adopted, and the model includes:
[0055]
[0056] In the formula, x i andi are the sample input and measurement value to be predicted, T is the number of prediction samples, and α is the quantile; and a are the percentages of the upper and lower quantiles, respectively, w α is the mapping model parameter, and w a are the output coefficients in nonlinear quantile regression, g is the output of the extreme learning machine, ξ i,α and is an intermediate variable.
[0057] Further, in step S53, the nominal proportion of the upper percentile is adaptively optimized by a meta-heuristic algorithm, and the quantification of the nominal proportion of the lower percentile, the model includes:
[0058]
[0059] 0≤ α ≤α;
[0060] In the formula, α is the quantile; and a are the percentages of the upper and lower quantiles, respectively.
[0061] The present invention also includes a photovoltaic power short-term probability prediction device, using the above method, including:
[0062] A data processing module, used for processing the raw data, including data interpolation and data selection, to obtain pre-processed data;
[0063] A feature extraction module, used to extract features of the pre-processed data based on EMD and KPCA models, including relevant features of photovoltaic power and meteorological data, so as to extract key factors affecting photovoltaic power generation;
[0064] A prediction model module, used to use a Stacking model to perform deterministic prediction on the extracted features, generate preliminary photovoltaic power prediction results, and improve the generalization ability of the Stacking model through cross-validation;
[0065] An evaluation module, used to evaluate the photovoltaic power prediction result, calculate the prediction error and perform performance analysis to obtain the prediction result;
[0066] The optimization module is used to modify the deterministic prediction result based on the prediction result by using an adaptive boundary optimization strategy, so as to generate a short-term probabilistic prediction result of photovoltaic power.
[0067] 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.
[0068] The present invention also includes a storage medium on which a computer program is stored. Further, when the computer program is executed by a processor, the method as described above is implemented.
[0069] The beneficial effects of the present invention are:
[0070] The problem of low data resolution is solved by the data interpolation method, the problem of insufficient consideration of the time series correlation of data is solved by correlation analysis, the problem of input feature redundancy is solved by the EMD and KPCA methods, the problem of poor model generalization is solved by the Stacking model, and the problem of poor prediction interval performance is solved by the adaptive boundary quantile optimization strategy. Therefore, the present invention has the advantages of efficiently processing multi-source data, considering data time series correlation, accurately capturing feature changes, excellent model generalization, and high quality of prediction error analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0071] 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.
[0072] Figure 1 It is a flow chart of the short-term probability prediction method of photovoltaic power;
[0073] Figure 2 It is the structural diagram of the combined prediction model;
[0074] Figure 3 It is a schematic diagram of the structure of the photovoltaic power short-term probability prediction device;
[0075] Figure 4 A schematic diagram of the structure of a computer device. DETAILED DESCRIPTION
[0076] 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.
[0077] Embodiment 1:
[0078] like Figure 1 to Figure 2As shown: A photovoltaic power short-term probability prediction method includes the following steps:
[0079] S10: Process the raw data, including data interpolation and data selection, to obtain preprocessed data; ensure the integrity and accuracy of the data and provide high-quality input data for subsequent steps;
[0080] S20: Extract features of preprocessed data based on EMD (Empirical Mode Decomposition) and KPCA (Kernel Principal Component Analysis) models, including relevant features of photovoltaic power and meteorological data, so as to extract key factors affecting photovoltaic power generation; so as to provide effective information for the prediction model;
[0081] S30: The stacking model is used to perform deterministic prediction on the extracted features, generate preliminary PV power prediction results, and improve the generalization ability of the stacking model through cross-validation; this solves the problem of poor generalization of traditional models, which means that the proposed method can maintain high prediction accuracy when facing unseen data, thereby improving the practicality of the model;
[0082] S40: Evaluate the PV power prediction results, calculate the prediction error and perform performance analysis to obtain the prediction results; the evaluation and error calculation allow the prediction results to receive effective feedback, helping to identify the deficiencies of the model and make improvements. This process helps to dynamically adjust the prediction strategy, thereby continuously optimizing the prediction results;
[0083] S50: Based on the prediction results, an adaptive boundary optimization strategy is used to correct the deterministic prediction results, thereby generating short-term probabilistic prediction results of photovoltaic power, thereby improving the accuracy and reliability of the prediction.
[0084] The problem of low data resolution is solved by the data interpolation method, the problem of insufficient consideration of the time series correlation of data is solved by correlation analysis, the problem of input feature redundancy is solved by the EMD and KPCA methods, the problem of poor model generalization is solved by the Stacking model, and the problem of poor prediction interval performance is solved by the adaptive boundary quantile optimization strategy. Therefore, the present invention has the advantages of efficiently processing multi-source data, considering data time series correlation, accurately capturing feature changes, excellent model generalization, and high quality of prediction error analysis.
[0085] By interpolating and selecting the original data, the integrity and accuracy of the input data are ensured, the prediction errors caused by missing or incorrect data are reduced, and a reliable basis is provided for subsequent analysis; feature extraction based on the EMD and KPCA models, especially taking into account the relevant characteristics of photovoltaic power and meteorological data, enables the model to comprehensively reflect the key factors affecting photovoltaic power generation, which enhances the scientificity and accuracy of the prediction results.
[0086] The stacking model is used and cross-validation is used to improve the generalization ability of the model, ensuring that high prediction accuracy can be maintained on unseen data. This feature makes the model more effective in practical applications and can adapt to different operating environments and conditions.
[0087] The evaluation process of photovoltaic power prediction results, including the calculation of prediction errors and performance analysis, helps to identify model deficiencies in a timely manner and make dynamic adjustments and optimizations. This feedback mechanism improves the adaptability and improvement space of the model. By correcting the deterministic prediction results through an adaptive boundary optimization strategy, the problem of inflexible error boundary processing in existing methods is solved, which not only improves the accuracy of the prediction, but also enhances the reliability of the prediction results, and can better cope with the uncertainty of photovoltaic power generation.
[0088] As a preference of the above embodiment, in step S10, the original data is processed, including data interpolation and data selection, to obtain preprocessed data, including:
[0089] S11: Use linear interpolation method to interpolate the original data, convert low-resolution data into high-resolution data, so as to improve the integrity and continuity of the data;
[0090] S12: Based on the interpolation results of the data, a Spearman correlation analysis is performed on the interpolated multi-source meteorological data and the photovoltaic output to evaluate the correlation between the meteorological data and the photovoltaic output, exclude the influencing factors with less correlation with photovoltaic power generation, and select the influencing factors with greater correlation with photovoltaic power generation to optimize the data set and calculate the Spearman correlation coefficient.
[0091] Low-resolution data is converted into high-resolution data through linear interpolation, which enhances the integrity and continuity of the data, provides a more reliable data basis for subsequent analysis, and reduces errors caused by incomplete or discontinuous data; through Spearman correlation analysis, influencing factors with less correlation with photovoltaic power generation can be excluded. This process ensures a stronger correlation between the selected features and photovoltaic power, optimizes the data set, and improves the effectiveness of model prediction; selecting influencing factors with a greater correlation with photovoltaic power generation enables subsequent feature extraction and model training to focus more on key factors, thereby improving the accuracy and reliability of photovoltaic power prediction.
[0092] In this embodiment, the calculation model of the linear interpolation method includes:
[0093]
[0094] Where y is the interpolated output, x is the interpolation node, x1 and y1 are the horizontal and vertical coordinates of the first set of data, respectively; x2 and y2 are the horizontal and vertical coordinates of the second set of data, respectively.
[0095] Through a clear linear interpolation calculation model, accurate interpolation results can be provided, reducing information loss caused by insufficient data resolution, thereby improving data accuracy.
[0096] Assuming that the meteorological data is X and the photovoltaic output is Y, the calculation model of the Spearman correlation coefficient includes:
[0097]
[0098] Where ρ is the Spearman correlation coefficient between X and Y, x i and i are the observed values ranks of X and Y respectively, and are the average ranks of X and Y respectively, and N is the total number of X.
[0099] By calculating the Spearman correlation coefficient, the correlation between meteorological data and photovoltaic output can be quantified, providing a scientific basis for feature selection and thus improving the accuracy of the model.
[0100] As a preference of the above embodiment, in step S20, feature extraction is performed on the preprocessed data based on the EMD and KPCA models, and the steps include:
[0101] S21: The processed meteorological and PV power characteristic data are decomposed using the EMD algorithm to enrich the diversity of input variables and highlight the local characteristics of environmental sequences at different time scales;
[0102] S22: Perform KPCA dimensionality reduction on the decomposed feature data and select the principal component with a cumulative contribution rate of 85%;
[0103] S23: Normalize the processed feature data samples to the interval [0,1], and the normalization calculation model is:
[0104]
[0105] In the formula, P′, P, P max and P min They are normalized data, power value, maximum power value and minimum power value respectively.
[0106] By using the EMD algorithm to decompose meteorological and photovoltaic power characteristic data, the local characteristics of the input variables at different time scales can be captured, thereby enriching the data diversity of the model input and helping to improve the model's ability to recognize complex patterns; using KPCA for dimensionality reduction and selecting the principal components with a cumulative contribution rate of 85% can effectively reduce the number of features and reduce the complexity of the model while retaining the main information, improving the training efficiency of the model and reducing the risk of overfitting; normalizing the processed feature data samples to the [0,1] interval helps to eliminate the influence of different feature dimensions and ensure that all input features are in the same range, thereby improving the stability and convergence speed of model training.
[0107] In this embodiment, in step S30, the Stacking model is used to perform deterministic prediction on the extracted features to generate preliminary photovoltaic power prediction results, and the generalization ability of the Stacking model is improved through cross-validation. The steps include:
[0108] S31: The meteorological data and photovoltaic power data with features extracted by EMD and KPCA are integrated and divided into N sub-datasets of the same size and a test set as the input data of the Stacking prediction model;
[0109] S32: Select N training algorithms, input the integrated data into the first-layer prediction model, select training algorithm A1, train the base learner through 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 the predicted values of N groups for the test set;
[0110] S33: Combine the N groups of predicted values for the validation set, i.e., T1 = [t1, t2, ..., t N ], and average the predicted values of N groups of test sets to obtain a set of predicted values b1;
[0111] S34: Repeat steps S32 to S33, and select training algorithms A2 to A N , and finally obtain the prediction value of the base learner [T1,T2,...,T N ] and the predicted values of the test set [b1,b2,...,b N ];
[0112] S35: The predicted values [T1, T2, ..., T N ] and the predicted values of the test set [b1,b2,...,b N ] are used as the training set and test set of the second layer respectively, and the meta-learner is trained using algorithm A' to obtain the final prediction results;
[0113] S36: In the Stacking framework, RF (Random Forest), SVM (Support Vector Machine) and KNN (K Nearest Neighbor) are selected as the training algorithms of the base learners, and Linear Regression is selected as the training algorithm of the meta-learner to form a prediction model based on Stacking.
[0114] By selecting N different training algorithms, the advantages of different algorithms can be fully utilized, the robustness and adaptability of the model can be enhanced, and thus the prediction performance can be improved; cross-validation is used to train the base learners, which can effectively evaluate the performance of the model on unseen data, reduce the risk of overfitting, and ensure that the model has good generalization ability; combining the prediction values of N groups of validation sets and taking the average of the prediction values of the test set can reduce the uncertainty of single model predictions, and enhance the accuracy and stability of prediction results through ensemble methods; by using the prediction values of the first-layer base learners as the input of the second layer and using meta-learners for training, complex patterns and relationships can be better captured, thereby improving the quality of the final prediction results; random forest (RF), support vector machine (SVM), k-nearest neighbor (KNN) are selected as base learners in the stacking framework, and linear regression is selected as the meta-learner. This flexible algorithm combination can make full use of the characteristics of each algorithm and further improve the overall performance of the model; by dividing the data into multiple sub-datasets and a test set, multiple base learners can be trained in parallel, improving the efficiency of model training and shortening the prediction time.
[0115] Wherein, in step S40, the photovoltaic power prediction result is evaluated, and the steps include:
[0116] S41: firstly perform a denormalization process on the photovoltaic power prediction result;
[0117] S42: RMSE, MAE, MAPE and R 2 ) to evaluate the performance of model prediction, the model includes:
[0118]
[0119] In the formula, RMSE is the relative mean square error, MAE is the mean absolute error, MAPE is the mean absolute percentage error, R 2 is the coefficient of determination, N is the number of prediction samples, y i is the predicted value, is the true value, is the average of the true values.
[0120] By using a variety of evaluation indicators (such as RMSE, MAE, MAPE and R 2 ), which can comprehensively measure the predictive ability of the model from different angles and ensure that the prediction results are more objective and reliable.
[0121] The deterministic prediction results of the above data are used to study the performance of PI, and a new adaptive boundary optimization strategy is proposed to establish a prediction interval with high comprehensive performance. By comprehensively considering the reliability and comprehensive performance of the prediction interval, the quality of prediction error analysis is improved. The proposed probabilistic prediction process is as follows:
[0122] As a preference of the above embodiment, in step S50, based on the prediction result, an adaptive boundary optimization strategy is used to correct the deterministic prediction result, and the steps include:
[0123] S51: The reliability and overall performance of the prediction interval (PI) are evaluated based on the deviation between the prediction interval coverage probability (PICP) and the prediction interval nominal confidence (PINC) and the interval score;
[0124] S52: Considering the offset (OPOPI) of the points outside the prediction interval (PI), the cost function of the optimization problem is used to describe it;
[0125] S53: Based on the cost function, the extreme learning machine and the traditional linear quantile regression method are combined to optimize the boundaries of the prediction interval to improve the accuracy of the boundary quantiles.
[0126] By evaluating the coverage probability (PICP) and nominal confidence (PINC) of the prediction interval, we can ensure that the prediction interval is set more reasonably, thereby improving the reliability and effectiveness of the model; combining the deviation and interval score to evaluate the overall performance of the prediction interval makes the evaluation more comprehensive, and the multi-dimensional evaluation method can more accurately reflect the performance of the model and provide a scientific basis for subsequent optimization; considering the offset of the points outside the prediction interval (OPOPI) helps to identify the shortcomings of the model and thus perform targeted optimization. By accurately quantifying the prediction deviation, the accuracy of the final prediction result can be significantly improved; by combining the extreme learning machine with the traditional linear quantile regression method, we can take advantage of the advantages of different models, improve the flexibility and adaptability of the prediction interval, and enable the model to better cope with different data characteristics and environments.
[0127] In this embodiment, in step S51, the model of prediction interval coverage probability (PICP) includes:
[0128]
[0129] Where, T p is the number of prediction samples, η i is a Boolean quantity, t i is the predicted value, I α is the prediction interval.
[0130] The PICP model provides a quantitative method to evaluate the coverage of the model prediction interval. Reliability assessment can help confirm the performance of the model in practical applications and ensure the credibility of the prediction results.
[0131] Among them, sharpness is an indicator used to measure the width of the prediction interval. The sharpness models include:
[0132]
[0133] In the formula, AW α is the width of the interval prediction interval, T p is the number of prediction samples, W(x i ) is the width of each prediction interval, is the upper boundary, q α is the lower boundary.
[0134] The sharpness model provides an intuitive indicator to measure the model's confidence in the prediction results by quantifying the width of the prediction interval. A smaller sharpness value indicates a narrower prediction interval and a more certain model.
[0135] As a preference of the above embodiment, in step S51, according to the deviation between the prediction interval coverage probability (PICP) and the prediction interval nominal confidence (PINC) and the interval score, in order to comprehensively evaluate the performance of the PI, including sharpness and interval score, the model includes:
[0136]
[0137]
[0138] In the formula, S α (x i ) is the bandwidth deviation of the prediction interval of the i-th iteration, W(x i ) is the width of each prediction interval, q α is the lower boundary, is the upper boundary, t i is the target value, α is the quantile, T p is the number of prediction samples.
[0139] By comprehensively considering the prediction interval coverage probability (PICP), the deviation of the prediction interval nominal confidence (PINC), and the interval score, the reliability and accuracy of the prediction interval can be comprehensively evaluated to ensure the effectiveness of the model.
[0140] As mentioned above, the interval score is an important criterion for measuring the overall performance of PI. α In the model, the interval score is quantified by the average score of all PIs; for example, in model S α (x i ), when the actual point is outside the PI, the greater the actual point deviates from the PI, the lower the score. Therefore, in order to evaluate the overall performance, not only reliability and sharpness but also the offset of the points outside the PI (OPOPI) should be considered in the cost function of model training. The traditional prediction interval construction method based on prediction error mainly focuses on reliability, which limits the optimization of the comprehensive performance of the prediction interval. Therefore, for the construction of PI, the comprehensive performance and reliability of PI need to be considered.
[0141] In this embodiment, in step S52, the cost function of the optimization problem is adopted, and the model includes:
[0142]
[0143] In the formula, x i and i are the sample input and measurement value to be predicted, T is the number of prediction samples, and α is the quantile; and a are the percentages of the upper and lower quantiles, respectively, w α is the mapping model parameter, and w a are the output coefficients in nonlinear quantile regression, g is the output of the extreme learning machine, ξ i,α and is an intermediate variable.
[0144] This study is based on the direct quantile method and considers the combination of extreme learning machine and traditional linear quantile regression.
[0145] The traditional PI quantifies the nominal proportion of boundary quantiles according to:
[0146]
[0147] As a preferred embodiment of the above, in step S53, the nominal proportion of the upper percentile is adaptively optimized by a meta-heuristic algorithm, and the nominal proportion of the lower percentile is quantified, and the model includes:
[0148]
[0149] 0≤ α ≤α;
[0150] In the formula, α is the quantile; anda are the percentages of the upper and lower quantiles, respectively.
[0151] By using a metaheuristic algorithm to adaptively optimize the nominal proportion of the upper percentile, the model can dynamically adjust the quantile setting according to the characteristics of different data sets, thereby improving the adaptability of the prediction interval; quantifying the nominal proportion of the lower percentile provides a clear boundary setting for the model, so that the prediction interval can more accurately reflect the actual distribution of the data and reduce prediction errors; at the same time, optimizing the nominal proportion of the upper and lower quantiles ensures that the width of the prediction interval is reasonable, which can minimize the prediction interval while ensuring reliability and improve the overall performance of the model.
[0152] Embodiment 2:
[0153] To verify the performance of the present invention, 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 1 hour. 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 photovoltaic power and 12 meteorological characteristic parameters are calculated by Spearman correlation coefficients in pairs. Finally, 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. RF, SVM, and KNN algorithms are used to train base learners, and Linear Regression is used to train meta-learners to form a prediction model based on Stacking. Data from April 2012 are selected for comparative experiments. The training set and the test set are divided into a ratio of 7:3. In order to ensure the accuracy of the experimental results, each experiment is performed 5 times. Finally, the prediction results ranked in the median of prediction accuracy are taken for subsequent analysis and comparison. The deterministic prediction result indicators are summarized in Table 1.
[0154] Table 1 Summary of various deterministic prediction indicators
[0155]
[0156] It can be seen from Table 1 that the model proposed in this invention is superior to other models in each evaluation index and has a better prediction effect. Among them, the RMSE value is 0.022275MW, which is 11.6%, 13.1%, and 60.99% lower than the other three models respectively; the MAPE value is 0.014598NW, which is 35.3%, 37.8%, and 75% lower than the other three models respectively; the MAPE value is 5.4039%, which is 1.62%, 1.87%, and 6.41% lower than the other three models respectively; the determination coefficient R 2It is also the highest among the four. In summary, compared with other models, the EMD-KPCA-Stacking model of the present invention has a significant increase in prediction accuracy and a significant decrease in prediction error, and the prediction results have a higher degree of fit with the true value, which shows that the photovoltaic power deterministic prediction model proposed in the present invention has a significant improvement in performance compared with other compared prediction models.
[0157] The deterministic prediction results of the above data are used to study the performance of PI. The performance comparison of the traditional prediction interval based on normal distribution, the prediction interval based on quantile regression, and the proposed prediction interval based on adaptive boundary quantile optimization is shown in Table 2.
[0158] Table 2. Comparison of probability prediction interval performance
[0159]
[0160]
[0161] As shown in Table 2, since the photovoltaic power prediction error usually does not satisfy the normal distribution, the prediction method based on quantiles has better performance. Compared with the traditional prediction method, the proposed prediction interval calculation method is significantly better than the prediction interval based on normal distribution and quantile regression, and has the best reliability and comprehensive performance overall.
[0162] The present invention also includes a photovoltaic power short-term probability prediction device, using the above method, such as Figure 3 As shown, including:
[0163] A data processing module, used for processing the raw data, including data interpolation and data selection, to obtain pre-processed data;
[0164] Feature extraction module, used to extract features from preprocessed data based on EMD and KPCA models, including relevant features of photovoltaic power and meteorological data, so as to extract key factors affecting photovoltaic power generation;
[0165] The prediction model module is used to use the Stacking model to perform deterministic prediction on the extracted features, generate preliminary PV power prediction results, and improve the generalization ability of the Stacking model through cross-validation;
[0166] An evaluation module is used to evaluate the photovoltaic power prediction results, calculate the prediction error and perform performance analysis to obtain the prediction results;
[0167] The optimization module is used to modify the deterministic prediction results based on the prediction results by using an adaptive boundary optimization strategy, so as to generate short-term probabilistic prediction results of photovoltaic power.
[0168] See also Figure 4 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.
[0169] 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.
[0170] 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.
[0171] 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.
[0172] 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.
[0173] 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.
[0174] 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.
[0175] 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, a "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 of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic devices), 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), a fiber optic 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.
[0176] 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, a plurality of 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.
[0177] 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.
[0178] 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 probability prediction method, characterized in that: The steps include: S10: processing the original data, including data interpolation and data selection, to obtain preprocessed data; S20: extracting features of the preprocessed data based on EMD and KPCA models, including relevant features of photovoltaic power and meteorological data, so as to extract key factors affecting photovoltaic power generation; S30: using a Stacking model to perform deterministic prediction on the extracted features, generating a preliminary photovoltaic power prediction result, and improving the generalization ability of the Stacking model through cross-validation; S40: Evaluate the photovoltaic power prediction result, calculate the prediction error and perform performance analysis to obtain a prediction result; S50: Based on the prediction result, an adaptive boundary optimization strategy is used to correct the deterministic prediction result, thereby generating a short-term probabilistic prediction result of photovoltaic power.
2. The photovoltaic power short-term probability prediction method according to claim 1 is characterized in that: In step S10, the raw data is processed, including data interpolation and data selection, to obtain preprocessed data, including: S11: performing interpolation processing on the original data using a linear interpolation method to convert low-resolution data into high-resolution data to improve the integrity and continuity of the data; S12: Based on the interpolation processing results of the data, a Spearman correlation analysis is performed on the interpolated multi-source meteorological data and the photovoltaic output to evaluate the correlation between the meteorological data and the photovoltaic output, and influencing factors with a high correlation with photovoltaic power generation are selected to optimize the data set and calculate the Spearman correlation coefficient.
3. The photovoltaic power short-term probability prediction method according to claim 2 is characterized in that: The calculation model of the linear interpolation method includes: Where y is the interpolated output, x is the interpolation node, x1 and y1 are the horizontal and vertical coordinates of the first set of data, respectively; x2 and y2 are the horizontal and vertical coordinates of the second set of data, respectively.
4. The photovoltaic power short-term probability prediction method according to claim 2, characterized in that: Assuming that the meteorological data is X and the photovoltaic output is Y, the calculation model of the Spearman correlation coefficient includes: Where ρ is the Spearman correlation coefficient between X and Y, x i and i are the observed values ranks of X and Y respectively, and are the average ranks of X and Y respectively, and N is the total number of X.
5. The photovoltaic power short-term probability prediction method according to claim 1, characterized in that: In step S20, feature extraction is performed on the preprocessed data based on the EMD and KPCA models, and the steps include: S21: The processed meteorological and PV power characteristic data are decomposed using the EMD algorithm to enrich the diversity of input variables and highlight the local characteristics of environmental sequences at different time scales; S22: performing KPCA dimensionality reduction on the decomposed feature data, and selecting a principal component whose cumulative contribution rate reaches 85%; S23: normalize the processed feature data samples to the interval [0,1], and the normalization calculation model is: In the formula, P′, P, P max and P min They are normalized data, power value, maximum power value and minimum power value respectively.
6. The photovoltaic power short-term probability prediction method according to claim 1, characterized in that: In step S30, the Stacking model is used to perform deterministic prediction on the extracted features to generate preliminary photovoltaic power prediction results, and the generalization ability of the Stacking model is improved through cross-validation. The steps include: S31: Integrate the meteorological data and photovoltaic power data whose features are extracted by EMD and KPCA, and divide them into N sub-datasets of the same size and a test set as input data of the Stacking prediction model; S32: Select N training algorithms, input the integrated data into the first-layer prediction model, select training algorithm A1, train the base learner through 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 the predicted values of N groups for the test set; S33: Combine the N groups of predicted values for the validation set, i.e., T1 = [t1, t2, ..., t N ], and average the predicted values of the N test sets to obtain a set of predicted values b1; S34: Repeat steps S32 to S33, and select training algorithms A2 to A N , and finally obtain the prediction value of the base learner [T1,T2,...,T N ] and the predicted values of the test set [b1,b2,...,b N ]; S35: The predicted values [T1, T2, ..., T N ] and the predicted values of the test set [b1,b2,...,b N ] are used as the training set and test set of the second layer respectively, and the meta-learner is trained using algorithm A' to obtain the final prediction results; S36: Under the Stacking framework, RF, SVM and KNN are selected as the training algorithms of the base learner, and LinearRegression is selected as the training algorithm of the meta learner to form a prediction model based on Stacking.
7. The photovoltaic power short-term probability prediction method according to claim 1, characterized in that: In step S40, the photovoltaic power prediction result is evaluated, and the steps include: S41: firstly perform a denormalization process on the photovoltaic power prediction result; S42: The relative mean square error, mean absolute error, mean absolute percentage error and coefficient of determination are used to evaluate the performance of the model prediction. The model includes: In the formula, RMSE is the relative mean square error, MAE is the mean absolute error, MAPE is the mean absolute percentage error, R 2 is the coefficient of determination, N is the number of prediction samples, y i is the predicted value, is the true value, is the average of the true values.
8. The photovoltaic power short-term probability prediction method according to claim 1, characterized in that: In step S50, based on the prediction result, an adaptive boundary optimization strategy is used to correct the deterministic prediction result, and the steps include: S51: Evaluate the reliability and overall performance of the prediction interval based on the deviation between the prediction interval coverage probability and the nominal confidence of the prediction interval and the interval score; S52: Considering the deviation of the points outside the prediction interval, a cost function of the optimization problem is used to describe it; S53: Based on the cost function, the boundary of the prediction interval is optimized by combining the extreme learning machine with the traditional linear quantile regression method to improve the accuracy of the boundary quantile.
9. The photovoltaic power short-term probability prediction method according to claim 8, characterized in that: In step S51, the model of the prediction interval coverage probability includes: Where, T p is the number of prediction samples, η i is a Boolean quantity, t i is the predicted value, I α is the prediction interval.
10. The photovoltaic power short-term probability prediction method according to claim 8, characterized in that: Sharpness is an indicator used to measure the width of the prediction interval. The sharpness model includes: In the formula, AW α is the width of the interval prediction interval, T p is the number of prediction samples, W(x i ) is the width of each prediction interval, is the upper boundary, q α is the lower boundary.
11. The photovoltaic power short-term probability prediction method according to claim 8, characterized in that: In step S51, based on the deviation between the prediction interval coverage probability and the prediction interval nominal confidence and the interval score, including the sharpness and the interval score, the model includes: In the formula, S α (x i ) is the bandwidth deviation of the prediction interval of the i-th iteration, W(x i ) is the width of each prediction interval, q α is the lower boundary, is the upper boundary, t i is the target value, α is the quantile, T p is the number of prediction samples.
12. The photovoltaic power short-term probability prediction method according to claim 8, characterized in that: In step S52, the cost function of the optimization problem is adopted, and the model includes: In the formula, x i and i are the sample input and measurement value to be predicted, T is the number of prediction samples, and α is the quantile; and a are the percentages of the upper and lower quantiles, respectively, w α is the mapping model parameter, and w a are the output coefficients in nonlinear quantile regression, g is the output of the extreme learning machine, ξ i,α and is an intermediate variable.
13. The photovoltaic power short-term probability prediction method according to claim 8, characterized in that: In step S53, the nominal proportion of the upper percentile is adaptively optimized by a meta-heuristic algorithm, and the nominal proportion of the lower percentile is quantified. The model includes: 0≤ α ≤α; In the formula, α is the quantile; and a are the percentages of the upper and lower quantiles, respectively.
14. A photovoltaic power short-term probability prediction device, characterized in that: Use of the method according to any one of claims 1 to 13, comprising: A data processing module, used for processing the raw data, including data interpolation and data selection, to obtain pre-processed data; A feature extraction module, used to extract features of the pre-processed data based on EMD and KPCA models, including relevant features of photovoltaic power and meteorological data, so as to extract key factors affecting photovoltaic power generation; A prediction model module, used to use a Stacking model to perform deterministic prediction on the extracted features, generate preliminary photovoltaic power prediction results, and improve the generalization ability of the Stacking model through cross-validation; An evaluation module, used to evaluate the photovoltaic power prediction result, calculate the prediction error and perform performance analysis to obtain the prediction result; The optimization module is used to modify the deterministic prediction result based on the prediction result by using an adaptive boundary optimization strategy, so as to generate a short-term probabilistic prediction result of photovoltaic power.
15. 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 13 is implemented.
16. 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 13 is implemented.