A photovoltaic power generation power prediction method
By combining probabilistic classification and multidimensional similarity evaluation with a temporal convolutional network and a TimesNet parallel prediction model, the problems of feature distortion, dependence on historical samples, and unidirectional information flow in photovoltaic power prediction are solved, achieving high-precision and robust photovoltaic power generation prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING UNIV OF INFORMATION SCI & TECH
- Filing Date
- 2026-04-28
- Publication Date
- 2026-05-29
AI Technical Summary
Existing photovoltaic power prediction methods are prone to feature distortion under extreme weather conditions, have limited model generalization ability, rely heavily on historical sample databases, and are prone to sharp drops in prediction accuracy. Furthermore, the unidirectional information flow of traditional models leads to error accumulation and fragmented feature extraction, making it difficult to achieve high-precision prediction.
By constructing a probabilistic classification model to classify weather types, introducing physical priors to guide feature enhancement, using a multidimensional similarity evaluation system to screen similar day data, and constructing a temporal convolutional network and a TimesNet parallel prediction model, a feature-level deep fusion of local perception and global modeling is achieved.
It significantly improves the accuracy and robustness of photovoltaic power generation prediction, reduces prediction errors, enhances the model's adaptability and generalization ability under complex weather conditions, and improves information utilization efficiency.
Smart Images

Figure CN122118689A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic prediction technology, and in particular relates to a method for predicting photovoltaic power generation. Background Technology
[0002] Photovoltaic power forecasting is a key technology for improving the utilization rate of renewable energy. Its research stems from the practical contradiction between the urgent needs of global energy transition and the inherent volatility and intermittency of photovoltaic power generation. With the explosive growth of photovoltaic installed capacity, its power output is subject to the complex influence of various meteorological factors such as solar irradiance, cloud cover, and temperature, exhibiting strong non-stationarity and randomness. Large-scale grid connection poses a severe challenge to the real-time balance, safe and stable operation, and dispatch planning of the power system. Therefore, developing high-precision, high-reliability photovoltaic power forecasting technology is not only a fundamental guarantee for grid planning and dispatch operation and improving power supply reliability, but also an important scientific support for promoting energy structure optimization.
[0003] Because photovoltaic power prediction is affected by the nonlinearity of meteorological factors and is constrained by the uncertainties in data acquisition and transmission, photovoltaic sequences typically exhibit significant nonstationarity and randomness. This characteristic places higher demands on information utilization efficiency; insufficient information mining often makes it difficult to effectively improve prediction accuracy and the quantification of uncertainty. Therefore, existing research mainly focuses on enhancing feature representation, reusing historical information, and deeply mining the relationships between variables to improve information utilization and enhance model prediction performance. However, existing research methods have three main shortcomings in these three areas of improvement. Regarding feature enhancement, most existing studies are limited to mining the inherent statistical structure of the data itself. The constructed features often lack clear physical meaning and are prone to data distortion under extreme weather conditions or sudden changes in equipment operating status, making it difficult to guarantee model robustness. While some studies have attempted to introduce weather type information to improve feature expression, their classification methods often rely on preset thresholds or traditional clustering algorithms, failing to fully consider the uncertainties in the weather type classification process, thus limiting the model's generalization ability and adaptability in complex scenarios such as sudden weather type changes. The second drawback is that prediction methods based on the reuse of historical information are highly dependent on the completeness of the historical sample database. When the historical database lacks samples highly similar to the date to be predicted, the prediction accuracy of such methods will decrease significantly. Some studies have attempted to construct input samples by combining multiple historical time periods or by directly splicing sequence fragments from different time periods; however, these methods still face accuracy bottlenecks when highly matching historical samples are lacking. Furthermore, directly splicing sequence fragments from different time periods can easily lead to discontinuities at the junctions, making it difficult to ensure that the constructed overall sequence maintains a high degree of consistency with the target time period in terms of temporal characteristics, thus affecting the input quality and final accuracy of the prediction model. Thirdly, most current prediction models used to mine relationships between variables and data structures adopt sequential structures, with a single information flow direction, which easily leads to error accumulation and information pollution. Although some models introduce branching structures, their low alignment in feature space often causes computational redundancy, making it difficult to achieve comprehensive mining of feature information from multiple perspectives. In addition, most existing models can only output point prediction results, and there are also significant deficiencies in the richness and diversity of prediction information expression. Summary of the Invention
[0004] To address the problems existing in the prior art, this invention proposes a method for predicting photovoltaic power generation.
[0005] The technical solution of the present invention is as follows:
[0006] A photovoltaic power generation forecasting method, executed after acquiring historical power generation data of a photovoltaic power plant and numerical weather forecast data corresponding to the time period of the historical power generation data, includes:
[0007] Historical power generation data and numerical weather forecast data are aligned in time to form several samples of power generation data and numerical weather forecast data at the same time.
[0008] Based on the similarity of numerical weather forecast data among different samples, the samples are divided into different weather type clusters, and each sample is assigned a corresponding weather type label; using the numerical weather forecast data as input and the weather type label as output, a probability classifier is trained, and the weather forecast data of the period to be tested is input into the probability classifier to obtain the confidence level of the period to be tested belonging to each weather type;
[0009] Historical samples with weather type labels that are the same as the weather type indicated by the highest confidence level are selected from the historical database. Considering the meteorological factor coupling, time non-stationarity and seasonal similarity of photovoltaic power generation, the meteorological similarity between each historical period and the period to be measured is evaluated. Based on the evaluation results, each historical period is assigned a weight and the power generation data of each historical period is weighted according to the weight to obtain a similar daily power generation sequence that matches the period to be measured.
[0010] The similar daily power generation sequence, the historical power generation data, and the numerical weather forecast data are used as input features and input into a pre-constructed interactive parallel prediction model for non-stationary photovoltaic time series. The model outputs point prediction results and interval prediction results of photovoltaic power generation during the period to be measured.
[0011] Furthermore, the interactive parallel prediction model for non-stationary photovoltaic time series is composed of a temporal convolutional network and TimesNet in parallel. The local convolutional features extracted by the temporal convolutional network are injected into the forget gate of TimesNet, and the long-term temporal state modeled by TimesNet is fed back to the subsequent convolutional layers of the temporal convolutional network as a bias term to guide the convolutional operation.
[0012] Furthermore, before inputting the input features into the interactive parallel prediction model for non-stationary photovoltaic time series, the method further includes multiplying the numerical features in the input features by the maximum value in the confidence scores for weighted calibration, and then concatenating the calibrated numerical features with the uncalibrated categorical features.
[0013] Furthermore, the specific method for weighted calibration by multiplying the numerical features in the input features by the maximum value in the confidence scores includes: for each sample, taking the maximum value of the calibration probabilities of the three types of weather as the confidence score weight of the sample, and multiplying all numerical features except for the weather unique heat code by the weight to perform weighted transformation.
[0014] Furthermore, the specific method for classifying samples into different weather type clusters based on the similarity of numerical weather forecast data among different samples includes using the Elkan K-Means clustering algorithm. By minimizing the objective function of the sum of squared distances between sample points and cluster centers, the samples are divided into three weather type clusters: sunny and efficient, cloudy and fluctuating, and rainy and inefficient.
[0015] Furthermore, the specific method for evaluating the meteorological similarity between each historical period and the period to be measured in the historical sample, considering the meteorological factor coupling, time non-stationarity, and seasonal similarity of photovoltaic power generation, includes using Mahalanobis distance to measure the meteorological factor coupling of photovoltaic power generation, using an exponentially decaying time weight function to measure time non-stationarity, using cyclic distance based on month and date to measure seasonal similarity, and integrating the measurement results of meteorological factor coupling, time non-stationarity, and seasonal similarity into the evaluation result.
[0016] Furthermore, the fused metric result is expressed as:
[0017] ;
[0018] In the formula, For the target time period; For the first Historical period; For the target time period With the Historical period The overall similarity;
[0019] For the target time period With the Historical period The square of the Mahalanobis distance in the feature space; For the target time period Meteorological feature vectors; For the first Historical period Meteorological feature vectors;
[0020] As a time decay weight; Weights based on seasonal similarity; , They represent the target time periods respectively. timestamp and the Historical period timestamp; Indicates the first Timestamps for historical periods;
[0021] The variance parameter of the characteristic Mahalanobis distance; Here, exp(*) represents the seasonal weighting adjustment coefficient; exp(*) indicates the calculation of the exponential function. This represents the number of candidate historical time periods.
[0022] Furthermore, the specific method for assigning weights to each historical period based on the evaluation results and weighting the power generation data of each historical period according to the weights to obtain a similar daily power generation sequence matching the period to be tested includes using a dynamic threshold method to select periods with similarity higher than a preset threshold, constructing a constrained nonlinear weight optimization model, using the normalized comprehensive similarity as the prior distribution, solving for the optimal weights, and then weighting and synthesizing the power generation data of each period.
[0023] Furthermore, the historical database consists of collected historical power generation data and corresponding numerical weather forecast data for different time periods, and is used to store historical samples under different weather type labels.
[0024] Furthermore, the numerical weather forecast data includes at least ambient temperature, solar cell module temperature, and solar radiation power.
[0025] Compared with the prior art, the present invention has the following beneficial effects:
[0026] This invention constructs a probabilistic classification model to categorize sample data into weather types. The uncertainties in these weather categories are used as confidence weights to calibrate the model's input features. This design utilizes physical priors to guide feature enhancement, addressing the problems of feature distortion and limited model generalization ability in existing methods under extreme weather conditions. Furthermore, by introducing physical priors to guide feature enhancement, the information in photovoltaic data is enriched, interference from noisy or ambiguous samples is suppressed, significantly improving information utilization efficiency, guiding the prediction model to focus on samples with high confidence, and enhancing the model's generalization ability.
[0027] This invention constructs a multi-dimensional similarity evaluation system, comprehensively assessing similarity from three dimensions: the coupling influence of meteorological factors, the temporal non-stationary characteristics of photovoltaic power, and the seasonal cycle of power output. It also introduces a synthetic control method, using the synthetic power characteristics of similar time periods as the basis for modeling. This design effectively overcomes the shortcomings of traditional similarity day selection methods, such as high dependence on historical databases, susceptibility to false similarities, and a sharp drop in prediction accuracy when similar time periods are lacking. It further improves the accuracy and robustness of the prediction model and reduces reliance on historical photovoltaic data.
[0028] This invention constructs a parallel interactive prediction model, which achieves deep feature-level fusion of local perception and global modeling through a combination of temporal convolutional networks and the TimesNet parallel architecture with a bidirectional feature injection mechanism. This scheme addresses the shortcomings of traditional sequential information flow (which leads to error accumulation) and simple parallel structures (which suffer from fragmented feature extraction and lagging decision fusion) by using multi-view parallel interactive mining. It enables the model to collaboratively optimize during training, thereby improving its ability to express complex temporal dynamics.
[0029] This invention establishes a strong correlation between synthetic similar daily power and target power. After introducing this correlation into the prediction model, it significantly reduces prediction errors and improves the overall prediction performance of the model, both in point and interval prediction. Experimental results show that the prediction method of this invention performs excellently in different scenarios, possessing strong robustness and adaptability, further demonstrating its value in practical applications.
[0030] In summary, this invention effectively addresses the shortcomings of existing photovoltaic (PV) forecasting methods in extracting physical information during weather classification by introducing a weather type division mechanism based on probability classification. Furthermore, it employs a synthetic similar day construction method to reduce the model's dependence on historical sample databases, generating similar day data that highly matches the prediction scenario from multiple perspectives, thus enhancing the specificity and adaptability of feature representation. Further, it utilizes confidence information obtained from probability classification to weight and calibrate input features, achieving full mining and effective utilization of uncertain information. Simultaneously, it introduces a multi-view parallel interactive modeling strategy, constructing a multi-channel parallel network structure to promote the cross-fusion and collaborative evolution of information across multiple paths, effectively improving information flow efficiency and the ability to extract deep features. These mechanisms work together to significantly enhance the modeling capability and prediction accuracy of the PV power forecasting model under complex meteorological conditions. Attached Figure Description
[0031] Figure 1 This is a flowchart illustrating the photovoltaic power generation prediction method.
[0032] Figure 2 A schematic diagram showing the power results of the test set corresponding to power plant 1 for similar time periods;
[0033] Figure 3 A schematic diagram showing the power results of the test set corresponding to power plant 2 for similar time periods;
[0034] Figure 4 This is a schematic diagram of the point prediction and interval prediction results for power station 1.
[0035] Figure 5 This is a schematic diagram of the point prediction and interval prediction results for power station 2. Detailed Implementation
[0036] The present invention will be further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are for illustrative purposes only and are not intended to limit the scope of the invention. After reading this invention, any modifications of the invention in various equivalent forms by those skilled in the art will fall within the scope defined by the appended claims.
[0037] Example 1:
[0038] The present invention provides a photovoltaic power generation prediction method, which is executed after acquiring historical power generation data of a photovoltaic power plant and numerical weather forecast data corresponding to the time period of the historical power generation data. Figure 1 As shown, it includes:
[0039] Data preprocessing involves aligning historical power generation data and numerical weather forecast data in time to form several samples of power generation data and numerical weather forecast data at the same moment.
[0040] Weather type probabilistic classification divides samples into different weather type clusters based on the similarity of numerical weather forecast data among different samples, and assigns a corresponding weather type label to each sample; using numerical weather forecast data as input and weather type labels as output, a probabilistic classifier is trained; the weather forecast data for the period to be tested is input into the probabilistic classifier to obtain the confidence level of the period to be tested belonging to each weather type;
[0041] Similar daily power generation sequence is obtained by selecting historical samples from the historical database whose weather type labels match the weather type indicated by the highest confidence level (the maximum value in the confidence level). Within these selected historical samples, the meteorological similarity between each historical time period and the target time period is evaluated, considering the meteorological factor coupling, temporal non-stationarity, and seasonal similarity of photovoltaic power generation, with a preset duration as the time granularity. Based on the evaluation results, weights are assigned to each historical time period, and the power generation data of each historical time period are weighted accordingly to obtain a similar daily power generation sequence matching the target time period. Generally, the preset duration can be selected according to actual conditions, such as 15 minutes.
[0042] The multi-view interactive parallel forecast takes similar daily power generation sequences, historical power generation data, and numerical weather forecast data as input features and inputs them into a pre-built interactive parallel forecast model for non-stationary photovoltaic time series. The output is the point forecast results and interval forecast results of photovoltaic power generation during the period to be measured.
[0043] Generally, in the initial stage of using an interactive parallel prediction model for prediction, the internal parameters of the model are randomly initialized; then, this invention uses an improved deep evidence regression loss function to optimize the parameters of the interactive parallel prediction model, and finally obtains a photovoltaic power generation prediction model.
[0044] Deep Evidence Regression (DER) parameterizes the neural network output, enabling simultaneous output of point prediction values and prediction intervals in photovoltaic (PV) forecasting, and utilizes evidence regularization terms to suppress unreasonable uncertainty accumulation. Based on the traditional DER loss function, this invention improves the DER loss function by considering PV power characteristics. It adds constraints on point prediction fidelity within the radiation period, PV interval width penalty constraints, and lower bound constraints on the degrees of freedom to the original DER loss function, aiming to optimize the accuracy of PV forecasting.
[0045] The improved deep evidence regression loss function of this invention as follows:
[0046] ;
[0047] In the formula, The loss is negative log-likelihood. A penalty constraint is imposed on the width of the photovoltaic range; This is a lower bound constraint on the degrees of freedom. For evidence regularization; For point prediction fidelity constraints within the radiation period; The weight of the photovoltaic range width penalty constraint; The weights of the lower bound constraints on the degrees of freedom; This is the penalty coefficient for the evidence regularization term; The weights for the point prediction fidelity constraint within the radiation period;
[0048] The following explains the in-cycle point prediction fidelity constraint, photovoltaic interval width penalty constraint, and lower degree of freedom constraint:
[0049] 1) Intra-period point prediction fidelity constraint:
[0050] The photovoltaic power curve exhibits a bimodal diurnal cycle and is subject to minute-level abrupt changes due to random cloud cover. Traditional DER models, when fitting the distribution, allow the mean prediction to deviate from the true value due to negative log-likelihood loss. In photovoltaic scenarios, this leads to a systematic underestimation or overestimation of power during peak periods, but the model masks this problem by increasing variance, resulting in a biased most probable power value received by the dispatcher. To address this issue, this invention introduces a point prediction fidelity constraint within the radiation cycle. The calculation method is as follows ;in, It is the point prediction value at time t output by the deterministic prediction head. To predict the step size, This represents the observed value at time t.
[0051] 2) Photovoltaic range width penalty:
[0052] The uncertainty of photovoltaic forecasts is non-stationary over time, but traditional DER (Digital Estimation and Variable Arrangement) relies solely on the negative log-likelihood for natural equilibrium, lacking a mechanism to actively tighten the interval during periods of low uncertainty. Therefore, this invention introduces a photovoltaic interval width penalty. The calculation method is as follows ;in, Let be the standard deviation of the t-distribution at time t.
[0053] 3) Lower bound constraint on degrees of freedom: The distribution of photovoltaic residuals changes dynamically with cloud cover. Under clear skies, the residuals are nearly symmetrical and unimodal; under abrupt changes in cloud cover, the residuals exhibit a long-tailed distribution. DER uses a t-distribution (Student's t-distribution) for fitting, which may excessively reduce the degrees of freedom during training, or be insufficiently large under cloudy conditions, resulting in overly wide intervals. Therefore, to fully utilize weather type classification information and establish an "on-demand heavy-tailed" mechanism for each weather type to ensure training stability, this invention introduces a lower bound constraint on degrees of freedom. Its calculation method is as follows ;in, For the preset threshold, for The degree of freedom at any time.
[0054] Example 2:
[0055] This embodiment, building upon Embodiment 1, further designs an interactive parallel prediction model for non-stationary photovoltaic time series. The model is constructed in parallel using a Temporal Convolutional Network (TCN) and TimesNet. The TCN focuses on extracting local temporal features, while TimesNet focuses on modeling global dependencies. To achieve deep fusion of local and global information, a bidirectional feature injection mechanism is introduced. Specifically, on one hand, the local convolutional features extracted by the TCN are injected into the forget gate of TimesNet. By adjusting the activation output of the forget gate, the retention and forgetting of historical information are regulated, enabling TimesNet to respond more sensitively to local changes when updating memory units. On the other hand, the long-term temporal state modeled by TimesNet is fed back to subsequent convolutional layers of the TCN as a bias term to guide convolutional operations, allowing the TCN to consider globally significant temporal intervals when extracting local features. Through this interactive mechanism, the two networks collaboratively optimize during training, mutually enhancing local awareness and global modeling capabilities, thereby improving the model's ability to express complex temporal dynamics.
[0056] Example 3:
[0057] This embodiment is further designed based on Embodiment 2. In this example, before inputting the input features into the interactive parallel prediction model for non-stationary photovoltaic time series, it also includes multiplying the numerical features in the input features by the maximum value in the confidence score for weighted calibration, and then concatenating the calibrated numerical features with the uncalibrated categorical features.
[0058] Example 4:
[0059] This embodiment is further designed based on embodiment three. The specific method for weighted calibration by multiplying the numerical features in the input features by the maximum value in the confidence score includes: for each sample, taking the maximum value of the calibration probability of the three types of weather as the confidence score weight of the sample, and multiplying all numerical features except for the weather unique heat code by the weight to perform weighted transformation.
[0060] The following example illustrates the calibration process in detail. In this example, the confidence level obtained in the weather type probability classification step is used as physical prior information, and physical prior knowledge calibration is performed on the numerical features.
[0061] Specifically, for each sample, the maximum value of the calibration probabilities of the three weather types is taken as the confidence weight of that sample. :
[0062] ;
[0063] In the formula, This indicates the confidence level that the sample belongs to weather type 1 after calibration; This indicates the confidence level that the sample belongs to weather type 2 after calibration; This indicates the confidence level that the sample belongs to weather type 3 after calibration. This indicates the weather data corresponding to the sample, including ambient temperature, solar cell module temperature, and solar radiation power.
[0064] Then, weighted transformations are applied to all numerical features except for weather-specific thermal codes:
[0065] ;
[0066] In the formula, This represents all numerical features of the sample except for the weather-specific thermal coding; These are the weighted numerical features.
[0067] The weighted numerical features and the unweighted categorical features are compared. The features are concatenated to form the final input feature matrix:
[0068] .
[0069] Example 5:
[0070] This embodiment is a further design based on embodiment four. The specific method for classifying samples into different weather type clusters based on the similarity of numerical weather forecast data between different samples includes using the Elkan K-Means clustering algorithm. By minimizing the objective function of the sum of squared distances between sample points and cluster centers, the samples are divided into three weather type clusters: sunny and efficient, cloudy and fluctuating, and rainy and inefficient.
[0071] Step 2.1: Preliminary classification of sample weather types using clustering algorithms. First, based on the characteristics of the sample data, the Elkan K-Means algorithm is used to initially classify the sample data into three types: sunny and efficient, cloudy and fluctuating, and overcast and rainy and inefficient. The Elkan K-Means algorithm utilizes the triangle inequality principle to reduce unnecessary distance calculations between sample points and cluster centers, thus improving convergence speed.
[0072] Step 2.2: Establish an XGBoost multi-class classification model, train it based on the weather type labels of the samples, and implement Platt probability calibration to obtain the calibration probability of each sample belonging to the three weather categories, providing physical priors for subsequent feature calibration. The probability output calculation formula is as follows:
[0073] ;
[0074] in, The multi-class classification model outputs that this sample belongs to the weather type. The probability of; For the original XGBoost classifier, the first... Output scores for weather-related data; These correspond to the sunny and efficient type, the cloudy and fluctuating type, and the rainy and inefficient type, respectively. It represents weather data, including ambient temperature, solar cell module temperature, and solar radiation power. For the original XGBoost classifier, the first... The output score for weather-related data. ;
[0075] Platt calibration uses the sigmoid mapping function to convert the output score of the original XGBoost classifier into a calibrated probability estimate. The specific calculation formula is as follows:
[0076] ;
[0077] in, The calibrated sample belongs to the weather type. The probability; and The optimal parameter values are obtained by minimizing the binary cross-entropy loss function, given the first and second calibration parameters learned through cross-validation.
[0078] ;
[0079] In the formula, For cross-validation folds, in this example , Indicates the first Fold the validation set, For the first Does the sample belong to the ? Real weather-like labels For the first After Platt calibration, the sample belongs to the [number]th [sample]. The probability estimate for weather-like conditions is calculated using the following formula: .
[0080] Example 6:
[0081] This embodiment, based on Embodiment 5, is further designed in that it considers the meteorological factor coupling, time non-stationarity, and seasonal similarity of photovoltaic power generation. The specific method for evaluating the meteorological similarity between each historical period and the period to be measured in the historical sample includes using Mahalanobis distance to measure the meteorological factor coupling of photovoltaic power generation, using an exponentially decaying time weight function to measure time non-stationarity, using cyclic distance based on month and date to measure seasonal similarity, and integrating the measurement results of meteorological factor coupling, time non-stationarity, and seasonal similarity into the evaluation result.
[0082] By employing fine-grained time segmentation, the aforementioned method constructs a multidimensional similarity metric, adaptively selects historically similar time periods, and optimizes the combined weights to generate the composite power value for the target time period. This method addresses the problems of traditional similarity-day methods in photovoltaic power prediction, such as high dependence on historical databases, neglect of time decay effects, and simplistic weight allocation, aiming to achieve accurate characterization of photovoltaic power generation.
[0083] Example 7:
[0084] This embodiment, based on Embodiment Six, further designs the following: When synthesizing similar days, historical data is first initially screened based on a time window and weather type. A maximum number of backtracking days is set, considering only historical data within this time window to ensure data timeliness while controlling computational complexity. Simultaneously, historical data with the same weather type as the target time period is strictly limited, as photovoltaic power characteristics differ fundamentally under different weather types. When there is insufficient historical data meeting the criteria, the time window restriction is automatically relaxed, searching for time periods with the same weather type in all historical data. The fused measurement result is expressed as:
[0085] ;
[0086] In the formula, For the target time period; For the first Historical period; For the target time period With the Historical period The overall similarity;
[0087] For the target time period With the Historical period The square of the Mahalanobis distance in the feature space; For the target time period Meteorological feature vectors; For the first Historical period Meteorological feature vectors;
[0088] As a time decay weight; Weights based on seasonal similarity; , They represent the target time periods respectively. timestamp and the Historical period timestamp; Indicates the first Timestamps for historical periods;
[0089] The variance parameter of the characteristic Mahalanobis distance; Here, exp(*) represents the seasonal weighting adjustment coefficient; exp(*) indicates the calculation of the exponential function. This represents the number of candidate historical time periods.
[0090] Furthermore, the following section introduces and analyzes the measurement of meteorological factor coupling, temporal nonstationarity, and seasonal similarity in this invention:
[0091] Mahalanobis distance, unlike traditional Euclidean distance which assumes features are independent and equally important, often fails to hold true in real-world photovoltaic data. This invention uses Mahalanobis distance to measure the coupling (feature similarity) of meteorological factors, automatically considering the correlation structure between features. Specifically, the covariance matrix is calculated based on historical feature data, and its inverse is solved. For any two normalized feature vectors, the Mahalanobis distance is defined as the quadratic form of their difference vector and the inverse covariance matrix.
[0092] The time decay factor addresses the significant time non-stationarity of photovoltaic power, where the reference value of historical data diminishes over time. This invention designs an exponentially decaying time weighting function to measure this time non-stationarity. This function uses the time interval between the target period and historical periods as the independent variable, and controls the rate of decay of historical information's importance through a decay factor. The calculation method is as follows:
[0093] ;
[0094] in, Indicates the time decay coefficient. Indicates a time interval.
[0095] Seasonal similarity is crucial because photovoltaic power exhibits significant seasonal variations, with different dates within the same season often displaying similar light and temperature patterns. This invention designs a seasonal similarity measurement method considering both month and date, measuring similarity weights by calculating the seasonal difference between the target date and historical dates. The calculation of seasonal differences employs the concept of cyclic distance: considering the periodicity of months, the difference between December and January should equal the difference between June and July; therefore, the minimum of the absolute difference and the cyclic difference is taken as the month difference. Date differences are calculated differently for both within and across months. Within the same month, the date difference is calculated directly; for cross-month differences, a fixed penalty value is used. Combining month and date differences yields a seasonal difference measure, which is then converted into seasonal similarity weights through an exponential transformation. The calculation method is as follows:
[0096] ;
[0097] in, Indicates the difference between months. The date difference is expressed using the following formula:
[0098] ;
[0099] ;
[0100] In the formula, Indicates the target time period The month to which it belongs Indicates historical period Month to which it belongs; Indicates the target time period Date of Origin Indicates historical period Date to which it belongs.
[0101] Example 8:
[0102] This embodiment, based on embodiment seven, further designs the following: In this example, the method of assigning weights to each historical period according to the evaluation results and weighting the power generation data of each historical period to obtain a similar daily power generation sequence that matches the period to be tested includes using a dynamic threshold method to select periods with similarity higher than a preset threshold, constructing a constrained nonlinear weight optimization model, using the normalized comprehensive similarity as the prior distribution, solving for the optimal weights, and then weighting and synthesizing the power generation data of each period.
[0103] Furthermore, the acquisition of similar daily power generation sequences will be explained in detail below:
[0104] This example defines a set of similar time periods. The construction process is as follows: ;in, A preset similarity threshold is set. When similar time periods are... The number of historical time periods does not meet the preset requirement; minimum number of similar historical time periods. Then select the one with the highest similarity. A time period. When similar time periods are set The number of historical time periods exceeds the preset maximum number of similar time periods. Only select the one with the highest similarity. The calculation involves several time periods. Then, a prior weight distribution is constructed based on the calculated comprehensive similarity, as follows:
[0105] ;
[0106] In the formula, Set of similar time periods Number of selected similar time periods; Let be the weight vector to be optimized; The weight vector to be optimized The Middle Weight;
[0107] To calculate the weights of historically similar time periods, the following nonlinear weight optimization model is constructed:
[0108] ;
[0109] ;
[0110] ;
[0111] in, Let be the objective function to be minimized; , For similar historical periods The weights; Upper limit of single weights to prevent overfitting; To prevent the value from overflowing for extremely small positive numbers; The L2 regularization coefficient is... Here is the KL divergence regularization coefficient. This is the entropy regularization coefficient;
[0112] Finally, the power of the composite similar time period is calculated according to the following formula:
[0113] ;
[0114] in, For the first Power values for each historical period This represents the composite power value for the target time period.
[0115] Furthermore, the acquisition of similar daily power generation sequences will be explained in detail below:
[0116] This invention sets a similarity threshold of 0.01 and a minimum number of similar historical time periods. The maximum number of similar historical periods is 8. The value is 20. Table 1 shows a set of similar time periods for the example target time period of 9:15 AM on June 11th.
[0117] Table 1
[0118] Serial Number date Time period Similarity 1 June 10 9:15 0.89 2 June 10 9:30 0.87 3 June 10 9:00 0.86 4 June 9 9:15 0.85 5 June 9 9:30 0.84 6 June 8 9:15 0.83 7 June 10 10:00 0.82 8 June 8 9:30 0.81 9 June 9 9:00 0.80 10 June 7 9:15 0.79 11 June 10 8:45 0.78
[0119] The minimum number of similar time periods is set to 8, while not exceeding the maximum number of similar time periods of 20. In the actual selection process, if the minimum number of similar time periods is not met, the top 8 similar time periods with the highest similarity are selected; if the maximum number of similar time periods is met, the top 20 similar time periods with the highest similarity are selected. Then, the sum of the sums ... This invention employs Sequential Least Squares Programming (SLSQP) to solve the nonlinear weight optimization model, obtaining the final weights as follows: Each weight is multiplied by the power generation power of the corresponding similar historical period to obtain the final composite similar power of 0.3072. This calculation is performed on all samples to obtain the composite power of similar periods, which is used as one of the input features for subsequent predictions.
[0120] Example 9:
[0121] This embodiment is a further design based on Embodiment 1, in which the historical database consists of collected historical power generation data and corresponding numerical weather forecast data for different time periods, and is used to store historical samples under different weather type labels.
[0122] Example 10:
[0123] This embodiment, based on Embodiment 1, further designs the numerical weather prediction data to include at least ambient temperature, solar cell module temperature, and solar radiation power. The solar cell module temperature can be obtained by converting data output from numerical weather prediction products. For example, it can be calculated using the ECMWF (European Centre for Medium-Range Weather Forecasts) HRES (High Resolution Forecast) or ENS (Entsequence Forecast) products, employing the 2-meter ambient temperature, downward shortwave solar radiation flux, and 10-meter wind speed, using the single-exponential temperature model in the Photovoltaic Library. The calculation method of the single-exponential temperature model is as follows:
[0124] ;
[0125] in, Indicates component temperature (°C). Indicates ambient temperature (°C). This indicates wind speed (m / s). This represents the total solar radiant power (W / m²). , These are empirical heat dissipation coefficients, with typical values of 25.0 W / m²K and 1.2 W / m³K, respectively.
[0126] Assuming an ambient temperature of 25.0℃, a wind speed of 2.0m / s, and a total solar radiation power of 800W / m², the component temperature can be estimated to be approximately 54.2℃ by substituting these values into the model above.
[0127] Furthermore, numerical weather prediction data can also include some meteorological features related to sunlight, such as wind speed and total cloud cover.
[0128] Application Examples:
[0129] This embodiment uses internationally available photovoltaic power generation datasets, selecting power generation data from two power plants (denoted as Power Plant 1 and Power Plant 2) from 00:00 on May 15, 2020 to 23:45 on June 17, 2020, along with corresponding numerical weather forecast data, to verify the method of this invention. The key parameter settings during implementation are as follows:
[0130] The XGBoost classifier has 200 base learners, a maximum tree depth of 6, a learning rate of 0.1, and 3 classes. The probability calibration module uses the Platt scaling method, with the calibrator base model using the same XGBoost classifier configuration. The cross-validation fold count is set to 5, and the calibrated classifier outputs calibrated probability estimates. The smoothing penalty coefficient for the synthetic similarity algorithm is set to 0.1 to control the strength of weight smoothing regularization. The time decay factor is set to 0.02 to control the exponential decay rate of historical period weights. The seasonal similarity weight is set to 0.3 to adjust the contribution of seasonal factors in the comprehensive similarity calculation. The singular value correction coefficient for the Mahalanobis distance covariance matrix is set to 1 × 10⁻⁻⁶. 4 This algorithm is used to handle singular covariance matrices. The adaptive similarity time window is set to 60 days, the minimum number of similar time periods is set to 8, the maximum number of similar time periods is set to 20, and the similarity threshold is set to 0.01. In weight optimization, the maximum weight limit is set to 0.3, the L2 regularization coefficient is set to 0.01, the KL divergence coefficient is set to 0.1, and the entropy regularization coefficient is set to 0.05. The maximum number of iterations for the optimization algorithm is set to 1000, and the convergence tolerance is set to 1×10⁻⁻⁴. 6 The standard deviation smoothing coefficient in the characteristic Mahalanobis distance calculation is set to 1×10⁻ 8 In the multi-view parallel interactive prediction model, the input sequence length of the TimesNet module is set to the number of historical time steps determined according to the actual data characteristics, the prediction length is set to the number of future time steps to be predicted, the encoder input dimension is set to the number of feature variables, the model dimension is set to 64, the feedforward neural network dimension is set to 128, the number of period selections is set to 5, the number of convolutional kernels is set to 6, the Dropout ratio is set to 0.1, and the number of encoder layers is set to 2. The hidden layer dimension of the temporal convolutional network module is set to 64, the number of network layers is set to 4, and the convolutional kernel size is set to 3. The number of interactive layers in the interactive fusion module is set to 2, and the number of training rounds is set to 50.
[0131] Taking Power Plant 1 as an example, the weather type classification results are shown in Table 2. Based on the numerical weather forecast data of the samples, the samples were divided into three types: sunny and efficient, cloudy and fluctuating, and overcast and rainy and inefficient. The distribution of the three types in the training set is relatively balanced, and their physical characteristics, such as average irradiance, average ambient temperature, average module temperature, and average power, all conform to the physical meaning of photovoltaics. This indicates that the weather type classification method proposed in this invention has clear physical interpretability and can effectively distinguish photovoltaic power generation scenarios under different illumination conditions, laying a reliable foundation for subsequent similar daily synthesis and feature physical prior calibration based on weather type.
[0132] Table 2
[0133] Weather type Sample proportion (training set) Average irradiance Average ambient temperature (°C) Average component temperature (°C) Average power (kW) Sunny and efficient 34.07% 0.79 30.60 53.76 22047.47 Cloudy and fluctuating 37.26% 0.45 28.98 42.34 13319.29 Inefficient type during rainy weather 28.67% 0.20 25.25 29.89 6018.72
[0134] Similar daily composite results are as follows Figure 2 and Figure 3 As shown, this invention calculates the comprehensive similarity between historical time periods and predicted days based on a multi-dimensional similarity evaluation system. It selects similar time periods through a dynamic screening mechanism and calculates the optimal weights based on the similarity to synthesize composite data that highly matches the weather characteristics of the predicted day. Results show that this invention can well reflect the changing characteristics of actual power in the overall trend. Especially at multiple time points, the composite power values are close to the actual power values, indicating that the time periods selected based on similar days have good representativeness. The composite data shows a high degree of consistency with the actual production power on the predicted day, providing high-quality feature input for subsequent power prediction models and effectively reducing the randomness bias caused by single historical data.
[0135] The evaluation results of point prediction and interval prediction for the two power plant test sets are shown in Table 3. The interval prediction results are those at a 95% confidence level. Figure 4 , Figure 5 As shown.
[0136] Table 3
[0137] Dataset MAE (Mean Absolute Error) RMSE (Root Mean Square Error) PICP (Predicted Interval Coverage) PIANW (Prediction Interval Average Normalized Width) Power Station 1 0.0900 0.1221 0.9807 0.6739 Power Station 2 0.1065 0.1335 0.9614 0.6908
[0138] The results show that the proposed method achieved good results in photovoltaic power prediction for two different power plants. Regarding point prediction accuracy, the MAE for power plant 1 was 0.0900 and RMSE was 0.1221, while for power plant 2 it was 0.1065 and RMSE was 0.1335. The error indices for both power plants were at low levels, indicating that the model can accurately track the changing trends of actual photovoltaic output. In terms of interval prediction performance, the PICP for power plant 1 reached 0.9807, and for power plant 2 it was 0.9614, both higher than commonly used confidence levels (e.g., 0.95), indicating that the prediction interval has high coverage of the actual power value and good interval reliability. Meanwhile, the PIANW for power plant 1 was 0.6739, and for power plant 2 it was 0.6908. The interval width was relatively moderate, without the problem of excessively wide intervals leading to reduced prediction information or excessively narrow intervals leading to insufficient coverage. This shows that the present invention can control the interval width within a reasonable range while ensuring high interval coverage, achieving an effective balance between reliability and accuracy. Empirical results show that the invention exhibits good generalization ability and predictive stability in different power plants, and has practical engineering application value.
[0139] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for predicting photovoltaic power generation, executed after acquiring historical power generation data of a photovoltaic power station and numerical weather forecast data corresponding to the time period of the historical power generation data, characterized in that, include: Historical power generation data and numerical weather forecast data are aligned in time to form several samples of power generation data and numerical weather forecast data at the same time. Based on the similarity of numerical weather forecast data among different samples, the samples are divided into different weather type clusters, and each sample is assigned a corresponding weather type label; Using the numerical weather forecast data as input and the weather type label as output, a probability classifier is trained. The weather forecast data for the period to be measured is input into the probability classifier to obtain the confidence level of the period to be measured belonging to each weather type. Historical samples with weather type labels that are the same as the weather type indicated by the highest confidence level are selected from the historical database. Considering the meteorological factor coupling, time non-stationarity and seasonal similarity of photovoltaic power generation, the meteorological similarity between each historical period and the period to be measured is evaluated. Based on the evaluation results, each historical period is assigned a weight and the power generation data of each historical period is weighted according to the weight to obtain a similar daily power generation sequence that matches the period to be measured. The similar daily power generation sequence, the historical power generation data, and the numerical weather forecast data are used as input features and input into a pre-constructed interactive parallel prediction model for non-stationary photovoltaic time series. The model outputs point prediction results and interval prediction results of photovoltaic power generation during the period to be measured.
2. The photovoltaic power generation prediction method according to claim 1, characterized in that, The interactive parallel prediction model for non-stationary photovoltaic time series consists of a temporal convolutional network and TimesNet in parallel. The local convolutional features extracted by the temporal convolutional network are injected into the forget gate of TimesNet, and the long-term temporal state modeled by TimesNet is fed back to the subsequent convolutional layers of the temporal convolutional network as a bias term to guide the convolutional operation.
3. The photovoltaic power generation prediction method according to claim 2, characterized in that, Before inputting the input features into the interactive parallel prediction model for non-stationary photovoltaic time series, the method further includes multiplying the numerical features in the input features by the maximum value in the confidence scores for weighted calibration, and then concatenating the calibrated numerical features with the uncalibrated categorical features.
4. The photovoltaic power generation prediction method according to claim 3, characterized in that, The specific method for weighted calibration by multiplying the numerical features in the input features by the maximum value in the confidence score includes: for each sample, taking the maximum value of the calibration probability of the three types of weather as the confidence score weight of the sample, and multiplying all numerical features except for the weather unique heat code by the weight to perform weighted transformation.
5. The photovoltaic power generation prediction method according to claim 4, characterized in that, The specific method for classifying samples into different weather type clusters based on the similarity of numerical weather forecast data among different samples includes using the Elkan K-Means clustering algorithm. By minimizing the objective function of the sum of squared distances between sample points and cluster centers, the samples are divided into three weather type clusters: sunny and efficient, cloudy and fluctuating, and rainy and inefficient.
6. The photovoltaic power generation prediction method according to claim 5, characterized in that, The specific method for assessing the meteorological similarity between each historical period and the period to be measured in the historical sample, considering the meteorological factor coupling, time non-stationarity, and seasonal similarity of photovoltaic power generation, includes using Mahalanobis distance to measure the meteorological factor coupling of photovoltaic power generation, using an exponentially decaying time weight function to measure time non-stationarity, using cyclic distance based on month and date to measure seasonal similarity, and integrating the measurement results of meteorological factor coupling, time non-stationarity, and seasonal similarity into the evaluation result.
7. The photovoltaic power generation prediction method according to claim 6, characterized in that, The fused metric result is expressed as follows: ; In the formula, For the target time period; For the first Historical period; For the target time period With the Historical period The overall similarity; For the target time period With the Historical period The square of the Mahalanobis distance in the feature space; For the target time period Meteorological feature vectors; For the first Historical period Meteorological feature vectors; As a time decay weight; Weights for seasonal similarity; , They represent the target time periods respectively. timestamp and the Historical period timestamp; Indicates the first Timestamps for historical periods; The variance parameter of the characteristic Mahalanobis distance; Here, exp(*) represents the seasonal weighting adjustment coefficient; exp(*) indicates the calculation of the exponential function. This represents the number of candidate historical time periods.
8. The photovoltaic power generation prediction method according to claim 7, characterized in that, The specific method for assigning weights to each historical period based on the evaluation results and weighting the power generation data of each historical period according to the weights to obtain a similar daily power generation sequence that matches the period to be tested includes using a dynamic threshold method to select periods with similarity higher than a preset threshold, constructing a constrained nonlinear weight optimization model, using the normalized comprehensive similarity as the prior distribution, solving for the optimal weights, and then weighting and synthesizing the power generation data of each period.
9. The photovoltaic power generation prediction method according to claim 1, characterized in that, The historical database consists of collected historical power generation data and corresponding numerical weather forecast data for different time periods, and is used to store historical samples under different weather type labels.
10. The photovoltaic power generation prediction method according to claim 1, characterized in that, The numerical weather forecast data includes at least ambient temperature, solar cell module temperature, and solar radiation power.