Photovoltaic power prediction method based on meta-learning and time-varying copula
Patent Information
- Application Number
- CN202610740521.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-27
- Publication Date
- 2026-10-09
AI Technical Summary
[0005](1)传统静态参数模型难以捕捉高影响天气下气象要素与光伏出力的突变特性,无法响应气象要素对出力水平的瞬态影响,导致功率预测误差较大
[0017](1)通过元学习驱动的双步梯度更新策略,实现模型参数的动态优化,有效适配高影响天气下的参数突变,提升功率预测精度与响应时效性。与传统静态参数模型相比,本发明的参数优化机制能够快速响应气象要素的瞬态变化,在极端天气下有效降低功率预测误差;
Smart Images

Figure CN122890328A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic power generation prediction technology, and in particular relates to a photovoltaic power generation prediction method based on meta-learning and time-varying Copula. Background Technology
[0002] As the global energy structure shifts towards cleaner and lower-carbon energy, photovoltaic (PV) power generation, with its advantages of being renewable, pollution-free, and widely distributed, has become one of the fastest-growing new energy branches. The application of PV power generation can not only effectively reduce the environmental pressure caused by the consumption of traditional fossil fuels, but also alleviate the contradiction between energy supply and demand, which is of great significance for achieving the "dual carbon" goal.
[0003] However, photovoltaic (PV) power generation is characterized by significant intermittency, volatility, and randomness. Its output is highly susceptible to various meteorological factors such as sunlight intensity, temperature, humidity, wind speed, and cloud cover, as well as equipment-specific factors such as aging of PV modules and changes in line impedance. This complex influencing mechanism makes it difficult to accurately predict PV output, posing numerous challenges to power system power balance, voltage control, power quality assurance, and dispatch decisions. For example, under extreme or complex weather conditions such as cloudy skies, heavy rain, and strong winds, PV power generation may fluctuate significantly. If the trend of these fluctuations cannot be accurately predicted, it will lead to difficulties in power system dispatch and may even trigger grid frequency fluctuations, voltage exceedances, and other faults, seriously affecting the safe and stable operation of the power grid.
[0004] While various methods have been provided for photovoltaic power generation prediction in the existing technology, the following shortcomings still exist:
[0005] (1) Traditional static parameter models are difficult to capture the sudden change characteristics of meteorological elements and photovoltaic power output under high-impact weather conditions, and cannot respond to the transient impact of meteorological elements on power output level, resulting in large power prediction errors.
[0006] (2) The time resolution differences of observation data were not fully considered during the integration of multi-source data, and there was a lack of in-depth mining of the temporal correlation of data, making it difficult to effectively capture the complex dynamic relationship between meteorological elements.
[0007] (3) When faced with the high-dimensional feature space of multi-dimensional meteorological elements, traditional methods cannot effectively capture the complex nonlinear relationships between variables, the efficiency of hyperparameter optimization is low, and the generalization ability of the model is insufficient.
[0008] (4) Traditional static constraint integration modeling methods cannot use physical constraints to calibrate the deviation of the data-driven model in real time, and the independent operation of each module leads to a lack of coordination. Summary of the Invention
[0009] To address the shortcomings of the existing technologies, this invention provides a photovoltaic power generation prediction method based on meta-learning and time-varying Copula. This method can adapt to dynamic weather changes, accurately capture complex correlations, and take into account both physical constraints and data-driven advantages. It is of great significance for improving the reliability of photovoltaic power generation, optimizing power system operation, and promoting the efficient consumption of clean energy.
[0010] The method of the present invention includes the following steps:
[0011] S1: Obtain historical photovoltaic power generation data and corresponding meteorological data, perform preprocessing, divide meteorological scenarios and quantify similarity, and construct a multi-scenario meta-task library;
[0012] S2: Use the pre-trained meta-learning model of the multi-scenario meta-task library to obtain initial parameters, and then dynamically optimize them through a two-step gradient update strategy to map the initial values of time-varying parameters.
[0013] S3: Based on the initial values, combine the Clayton-Copula function and the time attention mechanism to dynamically calculate the weighted dependency parameters; construct a joint distribution model of meteorological elements and photovoltaic output, and iteratively output the weighted dependency parameter sequence;
[0014] S4: Construct a physical model predictor using the weighted dependency parameter sequence, and use a co-evolutionary mixed integer nonlinear programming framework to globally optimize its internal hyperparameters, outputting the optimal hyperparameter combination;
[0015] S5: Establish an efficiency feedback closed-loop mechanism to drive continuous iterative updates of model parameters; use the optimized model to predict photovoltaic output at future moments and output the final prediction results.
[0016] Compared with the prior art, the present invention has at least the following beneficial effects:
[0017] (1) By using a meta-learning-driven two-step gradient update strategy, the model parameters are dynamically optimized, effectively adapting to parameter mutations under high-impact weather conditions and improving power prediction accuracy and response timeliness. Compared with traditional static parameter models, the parameter optimization mechanism of this invention can quickly respond to transient changes in meteorological elements and effectively reduce power prediction errors under extreme weather conditions;
[0018] (2) The combination of time-varying parameter Clayton-Copula function and time attention mechanism breaks through the limitations of traditional static models and accurately captures the time-varying nonlinear correlation and cross-scale coupling relationship between meteorological elements and photovoltaic power output. The introduction of time-varying dynamic dependent parameters enables the model to consider the changing trend in the time dimension, which significantly improves the accuracy of correlation characterization;
[0019] (3) The co-evolutionary mixed-integer nonlinear programming framework achieves global optimization of hyperparameters, balancing prediction accuracy and operational safety, and improving model generalization ability and physical interpretability. This framework can effectively handle high-dimensional constraint problems, and the hyperparameter optimization efficiency is significantly improved compared with traditional stochastic search methods. Moreover, the optimized hyperparameter combination conforms to the physical mechanism of photovoltaic power generation.
[0020] (4) The performance feedback closed-loop mechanism enables the model to continuously iterate and optimize, adapt to long-term climate pattern changes, and significantly improve the prediction stability and reliability in complex scenarios. Through closed-loop optimization, the fluctuation range of prediction accuracy of the model in different regions and seasons is reduced, and the prediction performance required for engineering applications can be maintained in the long term. Attached Figure Description
[0021] Figure 1 This is a schematic diagram of the overall process of a photovoltaic power generation prediction method based on meta-learning and time-varying Copula according to an embodiment of this application;
[0022] Figure 2 for Figure 1 A schematic diagram of the algorithm structure;
[0023] Figure 3 for Figure 2 A schematic diagram of the two-step gradient update strategy;
[0024] Figure 4 for Figure 2 A schematic diagram of the structure of the time-based attention mechanism. Detailed Implementation
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] like Figure 1 As shown in the figure, this application provides a photovoltaic power generation prediction method based on meta-learning and time-varying Copula. It achieves high-precision prediction of photovoltaic power generation under complex meteorological scenarios through the fusion of multiple technologies. The specific steps are as follows:
[0027] S1: Data Preprocessing and Construction of a Multi-Scenario Meta-Task Library: Preprocess photovoltaic and meteorological data, classify typical meteorological scenarios and quantify their similarity, and construct a multi-scenario meta-task library within highly similar tasks and among strongly different tasks. Specifically:
[0028] Historical meteorological data (such as total radiation, direct radiation, diffuse radiation, ambient temperature, and relative humidity) and corresponding photovoltaic power output data of the photovoltaic power plant were acquired. Due to dimensional differences and missing values in the raw data, preprocessing was performed, including: using linear interpolation to fill in a small number of missing data points; and using Z-score normalization to normalize the data, mapping data with different dimensions to the same scale.
[0029] like Figure 2 As shown, to quantify the similarity between different meteorological scenarios, this application introduces a scenario similarity measurement method based on weighted Euclidean distance:
[0030] Define meteorological scene space Each scene consists of a set of meteorological feature vectors. The description, its weighted Euclidean distance is defined as:
[0031]
[0032] in, , For two different weather scenarios, This represents the meteorological feature vector of the scene. For the first determined by the entropy weight method The weights of each meteorological element are determined to ensure that elements with a greater impact on photovoltaic output receive higher weights.
[0033] Furthermore, the distance is mapped to similarity using an exponential function:
[0034]
[0035] in, This is a bandwidth parameter used to optimize and control the rate of similarity decay through cross-validation.
[0036] Based on the aforementioned similarity metric, the combination of power, voltage, and meteorological data of photovoltaic systems operating under different meteorological scenarios is defined as a meta-task. Each meta-task is represented as a dataset. ,in For the input sample, For output labels.
[0037] To build a high-quality meta-task library, we define in-task similarity metrics. Indicators of difference between tasks :
[0038]
[0039]
[0040] in, This represents the number of samples in the meta-task. and For meta-task The samples in.
[0041] A meta-task library is constructed using a dual-objective optimization function:
[0042]
[0043] in, For balancing parameters, This refers to all the preprocessed data.
[0044] S2: Meta-learning driven dynamic parameter optimization: Initial parameters are obtained based on the pre-trained meta-learning model of the multi-scenario meta-task library. Dynamic optimization is performed through a two-step gradient update strategy to map the initial values of time-varying parameters, so as to achieve progressive optimization that adapts to the current scenario and historical similar experience, thereby improving the prediction accuracy and response timeliness under high-impact weather.
[0045] like Figure 3 As shown, the specific implementation method of this step is as follows:
[0046] First, the meta-learning model is pre-trained using the multi-scenario meta-task library built with S1, and the initial parameters are obtained by minimizing the mean squared error loss function. The loss function is:
[0047]
[0048] in, For the first In the first meta-task The predicted photovoltaic power value for each sample This is the actual value. For meta-task The number of samples.
[0049] In the real-time prediction phase, a two-step gradient update strategy is adopted, which performs one step of gradient descent based on the current scene data: The meta-loss function is calculated by combining historical similarity meta-tasks. The parameters are updated a second time to enhance the model's generalization ability: .in, For current task data, , These are the learning rates updated in two steps. loss function Regarding initial parameters gradient, The number of historical meta-tasks selected. For historical meta-missions similar to the current mission, These are the final parameters after the second update.
[0050] from The output layer is mapped using a hyperbolic tangent function to obtain the initial values of the time-varying parameters. This is for subsequent use by S3.
[0051] In summary, the first step updates the model based on current task data, enabling it to quickly adapt to the current weather scenario; the second step updates incorporate historical similarity meta-analysis experience. This application's embodiment employs a progressive two-step update strategy to ensure the model's computational accuracy and stability under complex weather conditions.
[0052] S3: Construction of a time-varying Copula cross-scale correlation model: Combining the Clayton-Copula function and the time attention mechanism, the weighted dependency parameters are dynamically calculated; a joint distribution model of meteorological elements and photovoltaic power output is constructed, and the weighted dependency parameter sequence is iteratively output.
[0053] like Figure 4 As shown, the specific implementation method of this step is as follows:
[0054] Estimate the marginal distribution function of meteorological characteristics and photovoltaic output, and input the initial value. The dependent parameters of the Clayton-Copula function are extended to time-varying parameters. Its density function is:
[0055]
[0056] in, , The probability value of the marginal distribution function. Time indicates a positive correlation.
[0057] Perform maximum likelihood estimation optimization by optimizing the likelihood function. Obtain time-varying parameters The estimated value: ,in, and These represent the marginal distribution functions of meteorological characteristics and photovoltaic power output, respectively.
[0058] Furthermore, a time attention mechanism is introduced to dynamically calculate the importance weights of each meteorological feature, thus obtaining the attention weights in the time dimension: .in, For attention scoring function, For the moment The meteorological characteristics at that time were analyzed. Softmax normalization was applied to make the sum of all feature weights equal to 1, thus giving it a probabilistic interpretation.
[0059] The time-varying parameters are fused with the attention weights to obtain the weighted dependency parameters. .
[0060] Based on the weighted dependency parameters, a joint distribution model is constructed to characterize the cross-scale coupling relationship of multidimensional features. The training objective function is:
[0061]
[0062] Stochastic gradient descent and other optimization algorithms are used to optimize model parameters (including time-varying parameters). The parameters (including those in the attention mechanism) are iteratively updated, and the final output is a weighted time-varying sequence of dependent parameters. .
[0063] S4: Co-evolutionary Hyperparameter Optimization: Utilizing A physical model predictor is constructed, and its intrinsic hyperparameters are globally optimized using a co-evolutionary mixed-integer nonlinear programming (CE-MINLP) framework, outputting an optimal hyperparameter combination that balances accuracy and safety. This includes the following sub-steps:
[0064] S4.1: Obtained using S3 A physical model predictor is constructed. The predictor uses meteorological data (including total radiation) as its basis. Direct radiation Scattered radiation, ambient temperature )and For input.
[0065] Define piecewise efficiency function Temperature factor and direct radiation factor ;in, This indicates the percentage of direct sunlight. Calculate the theoretical power baseline value: .
[0066] against A correction factor is constructed to characterize the additional impact of the nonlinear dependence between weather and photovoltaic output on power: .in, Kendall's rank correlation coefficient. This represents the Copula influence coefficient. Furthermore, considering the systematic differences in prediction bias across different power ranges, a power range scaling factor is introduced. This factor corresponds to a set of discrete hyperparameters.
[0067] The final predicted value is obtained: .
[0068] In summary, this predictor will output S3. It is explicitly used to correct the initial physics estimate.
[0069] S4.2: The hyperparameters designed in the predictor are globally optimized using the CE-MINLP framework. Specifically:
[0070] S4.2.1: Transform the hyperparameter set optimization into a mixed-integer nonlinear programming problem, with the objective of minimizing the prediction error:
[0071]
[0072]
[0073] Among them, hyperparameter set , For continuous variables, These are discrete variables.
[0074] S4.2.2: Global optimization is performed using an evolutionary algorithm to encode the hyperparameter set into chromosomes. Continuous hyperparameters are encoded using real numbers, while discrete hyperparameters are encoded using integers. The random generation size is... initial population The fitness function is designed as follows:
[0075]
[0076] in, It should be a very small positive number to avoid cases where the denominator is zero. A higher fitness function value indicates better prediction accuracy.
[0077] S4.2.3: Use tournament selection to randomly select from the initial population. Each individual is compared for fitness, and the best individual is selected to enter the next generation, until the new population reaches a certain size. For continuous hyperparameters, an arithmetic crossover method is used: , ,in, The crossover coefficient is used. For discrete hyperparameters, a single-point crossover method is employed. A crossover point is randomly selected, and the discrete hyperparameter codes of the two parent chromosomes after that point are exchanged to create new hyperparameter combinations while preserving the desirable features of the parents.
[0078] S4.2.4: For continuous hyperparameters, using the mutation probability Mutate each continuous hyperparameter in the chromosome. The resulting continuous hyperparameters are as follows:
[0079]
[0080] in, These are the hyperparameter values before mutation. For variable asynchronous length, These are random numbers that follow a standard normal distribution.
[0081] For discrete hyperparameters, the same variation probability is used. Randomly select a discrete hyperparameter and replace its value with a random integer within the range of that parameter's values.
[0082] S4.3: Combine the constraint verification mechanism, iterate until convergence, and output the optimal hyperparameter combination.
[0083] S5: Performance Feedback Closed-Loop Optimization: Establish a performance feedback closed-loop mechanism to drive continuous iterative updates of model parameters; use the optimized model to predict future photovoltaic output and output the final prediction result. This includes the following sub-steps:
[0084] S5.1: Establish a performance feedback closed-loop mechanism, calculate the composite objective function value at fixed intervals, and rely on the hardware-in-the-loop platform to feed back error signals, driving continuous iterative updates of model parameters. Specifically:
[0085] The core performance indicators are the mean relative error and the root mean square error. ,in, To predict photovoltaic output, This is the actual value. This represents the number of samples.
[0086] Combine RMSE with the performance indicators to construct a composite objective function: ,in, , These are the weighting coefficients. Discrete variables are relaxed using a column generation algorithm, and hyperparameters are optimized by combining the chromosome encoding from the evolutionary algorithm in S4.
[0087] In each optimization cycle Then, based on the validation dataset Calculate the current value of the composite objective function:
[0088]
[0089] in, For the model in The set of hyperparameters at each time step; and These represent the hyperparameters as follows: At that time, the model is on the dataset The mean root mean square error and the mean relative error are calculated above.
[0090] The hyperparameter set is updated by approximating the gradient direction using an evolutionary algorithm: .in, To optimize the learning rate of the algorithm, the step size of parameter updates is controlled. For the objective function exist The approximate gradient with respect to the hyperparameters.
[0091] S5.2: Use the optimized model to predict photovoltaic power output at future times. Evaluate the model performance by calculating metrics such as mean square error (MSE), mean absolute error (MAE), and mean absolute percentage error (MAPE) to ensure that the prediction accuracy meets engineering application requirements.
[0092] In summary, this application significantly improves the accuracy and robustness of photovoltaic power output forecasting under high-impact weather conditions through the aforementioned multi-module collaborative forecasting framework, and is applicable to photovoltaic power plant power forecasting and grid dispatch optimization.
[0093] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention.
Claims
1. A photovoltaic power generation prediction method based on meta-learning and time-varying Copula, characterized in that, Includes the following steps: S1: Obtain historical photovoltaic power generation data and corresponding meteorological data, perform preprocessing, divide meteorological scenarios and quantify similarity, and construct a multi-scenario meta-task library; S2: Use the pre-trained meta-learning model of the multi-scenario meta-task library to obtain initial parameters, and then dynamically optimize them through a two-step gradient update strategy to map the initial values of time-varying parameters. S3: Based on the initial values, combine the Clayton-Copula function and the time attention mechanism to dynamically calculate the weighted dependency parameters; construct a joint distribution model of meteorological elements and photovoltaic output, and iteratively output the weighted dependency parameter sequence; S4: Construct a physical model predictor using the weighted dependency parameter sequence, and use a co-evolutionary mixed integer nonlinear programming framework to globally optimize its internal hyperparameters, outputting the optimal hyperparameter combination; S5: Establish an efficiency feedback closed-loop mechanism to drive continuous iterative updates of model parameters; use the optimized model to predict photovoltaic output at future moments and output the final prediction results.
2. The method according to claim 1, characterized in that, S1 includes: Historical data on photovoltaic power generation and corresponding meteorological data were obtained. Linear interpolation was used to fill in missing data. Data of different dimensions were mapped to the same scale using Z-score standardization, and outliers and duplicates were removed. We introduce a weighted Euclidean distance metric for scene similarity and combine it with a bi-objective optimization function to maximize intra-task similarity and inter-task differences, thus constructing a multi-scene meta-task library.
3. The method according to claim 2, characterized in that, In the weighted Euclidean distance metric, the weights of each meteorological element are determined by the entropy weight method to ensure that the weights correspond to their impact on photovoltaic output.
4. The method according to any one of claims 1-3, characterized in that, S2 includes: The meta-learning model is pre-trained using the multi-scenario meta-task library, and the initial parameters are obtained by constructing a loss function that minimizes the mean square error. A two-step gradient update strategy is adopted, which performs a gradient descent step based on the current scene data; and calculates the meta-loss function by combining the historical similarity task to update the parameters a second time. The initial values of time-varying parameters are obtained from the output layer of the final parameters after the second update through hyperbolic tangent function mapping.
5. The method according to claim 4, characterized in that, S3 includes: Estimate the marginal distribution function of meteorological characteristics and photovoltaic output, input the initial value, and extend the dependent parameters of the Clayton-Copula function to time-varying parameters; Maximum likelihood estimation optimization is performed to obtain the estimated values of the time-varying parameters; A time-varying attention mechanism is introduced to dynamically calculate the attention weights in the time dimension; the time-varying parameters are then fused with the attention weights to obtain weighted dependency parameters. A joint distribution model is constructed based on the weighted dependency parameters; an optimization algorithm is used for iterative updates, and a sequence of weighted dependency parameters is output.
6. The method according to claim 5, characterized in that, In S3, the time attention weight is calculated through Softmax normalization to dynamically adapt to the influence of meteorological characteristics under different time dimensions.
7. The method according to claim 5 or 6, characterized in that, S4 includes: S4.1: Construct a physical model predictor using the weighted dependency parameter sequence; calculate the theoretical power baseline value, and combine it with the correction coefficient and power segment scaling factor to obtain the final predicted value; S4.2: A co-evolutionary hybrid integer nonlinear programming framework is adopted to globally optimize the hyperparameter set in the predictor; an initial population is generated by combining real number encoding and integer encoding, and iterative optimization is performed through tournament selection, arithmetic crossover, and Gaussian mutation operations; S4.3: Combines constraint verification mechanism, outputs the optimal hyperparameter combination when evolution reaches convergence.
8. The method according to claim 7, characterized in that, S4.2 includes: S4.2.1: Transform the optimization of the hyperparameter set into a mixed-integer nonlinear programming problem with the objective of minimizing the prediction error; S4.2.2: Encode the hyperparameter set into chromosomes, using real numbers for continuous hyperparameters and integers for discrete hyperparameters, and randomly generate an initial population; S4.2.3: The tournament selection method is used to iteratively generate the offspring population; for continuous hyperparameters, the arithmetic crossover method is used; for discrete hyperparameters, the single-point crossover method is used. S4.2.4: Perform mutation operation on each continuous hyperparameter in the chromosome; randomly select a discrete hyperparameter with the same mutation probability and replace its value with a random integer within the range of values of that parameter.
9. The method according to claim 1, characterized in that, S5 includes: S5.1: Establish an efficiency feedback closed-loop mechanism, calculate the composite objective function value at fixed intervals, rely on the hardware-in-the-loop platform to feed back error signals, and drive the continuous iterative update of model parameters; S5.2: Use the optimized model to predict the photovoltaic output at future times, output the final prediction results, and use performance indicators to evaluate the prediction accuracy.
10. The method according to claim 1, 7, or 9, characterized in that, The performance feedback closed-loop mechanism includes: Using the mean relative error and root mean square error as performance indicators, and combining RMSE with the performance indicators, a composite objective function is constructed. After each optimization cycle, the current value of the composite objective function is calculated based on the validation dataset. The hyperparameter set is updated by approximating the gradient direction through an evolutionary algorithm.