Gateway electric quantity prediction method and system for virtual power plant
By preprocessing and feature filtering the historical multi-source data of virtual power plants, and using a dynamic weighted integration model to predict photovoltaic and load electricity consumption, the accuracy and interpretability issues of power generation prediction at the virtual power plant threshold are solved, thereby improving the decision-making efficiency of virtual power plants in grid dispatch and trading.
Patent Information
- Application Number
- CN202511011114.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-10-31
AI Technical Summary
Existing virtual power plant threshold power forecasting methods suffer from many common problems in terms of forecast accuracy, model generalization ability, application scenario adaptability, and interpretability, which seriously restrict the decision-making efficiency and operational stability of virtual power plants in key businesses such as grid dispatching and market power trading.
By preprocessing historical multi-source meteorological data and load electricity consumption data, a meteorological deviation correction model is trained. The weighted average method is used to fuse multi-source meteorological data, and a correlation measurement algorithm is used to screen features. Finally, a dynamic weighted ensemble model is used to predict photovoltaic power generation and net load electricity consumption, and the threshold electricity consumption is determined.
It improves data quality and meteorological input accuracy, enhances the model's generalization ability and interpretability, provides accurate power references, and supports virtual power plants in power trading decisions.
Smart Images

Figure CN120879552A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of photovoltaic power generation and load forecasting technology, specifically to a gate power forecasting method and system for virtual power plants. Background Technology
[0002] With the increasing proportion of renewable energy connected to the grid, virtual power plants, as an important means of coordinating distributed energy resources, have become a key factor affecting the stable operation of the power system due to their power forecasting capabilities. As an effective means of aggregating and coordinating distributed energy resources, virtual power plants are gradually becoming an important carrier for achieving coordinated regulation of power generation, grid, load, and storage in new power systems. At the same time, as emerging market players, they are increasingly participating in annual, quarterly, and multi-monthly power trading. In trading models where the subject matter is refined to the hourly level, the rationality of their declared power volume and the security of their performance are crucial to their market competitiveness.
[0003] In the actual operation of virtual power plants, the ability to predict threshold power directly affects their efficiency and accuracy in participating in grid dispatch, market transactions, and load management. Threshold power includes upstream power (grid-connected power) and downstream power (grid-off power), reflecting the energy interaction between the virtual power plant and the main grid. Currently, there are two main methods for predicting threshold power: direct prediction and indirect prediction. Indirect prediction directly predicts future threshold power by building a model using historical threshold power data. Although the modeling process is simple and does not require additional data on grid-connected generation and load consumption, it suffers from problems such as ignoring physical mechanisms, large prediction errors in special scenarios, and poor interpretability of prediction results. Direct prediction is based on the physical definition of threshold power, first predicting photovoltaic power generation and net load consumption separately, and then calculating the threshold power by the difference between the two. Although it considers the formation mechanism and has strong physical basis and interpretability, it suffers from problems such as high modeling complexity, large risk of error accumulation, and inability to flexibly adapt to dynamic changes in the internal resource structure of the virtual power plant. Therefore, there is an urgent need for an intelligent prediction method that can integrate multi-source information and dynamically adapt to the operating characteristics of the power plant. Summary of the Invention
[0004] In view of this, existing methods for predicting power generation at the threshold of virtual power plants suffer from numerous common problems in terms of prediction accuracy, model generalization ability, application scenario adaptability, and interpretability, which severely restrict the decision-making efficiency and operational stability of virtual power plants in key operations such as grid dispatching and market energy trading. This invention provides a method and system for predicting power generation at the threshold of virtual power plants, aiming to improve the intelligence level and operational efficiency of virtual power plants in key scenarios such as grid dispatching, energy trading, and load management.
[0005] In a first aspect, the present invention provides a method for predicting the threshold power generation of a virtual power plant, comprising:
[0006] The acquired historical multi-source meteorological data, photovoltaic power output data, and load power consumption data are preprocessed;
[0007] Based on preprocessed historical multi-source weather forecast data and corresponding historical measured data, a preset meteorological deviation correction model is trained, and the trained meteorological deviation correction model is used to correct the irradiance and temperature in future weather forecasts.
[0008] The corrected data from multiple meteorological sources are fused using a weighted average method to construct the meteorological input data;
[0009] The meteorological input data is subjected to feature derivation processing, and a preset correlation measurement algorithm is used to screen features that are strongly correlated with photovoltaic output and net load electricity consumption.
[0010] Based on the strong correlation between photovoltaic power output and net load electricity consumption, dynamic weighted integrated models are used to predict photovoltaic power generation and net load electricity consumption, respectively.
[0011] The threshold electricity volume is determined based on the difference between the predicted photovoltaic power generation and the predicted net load electricity consumption.
[0012] The present invention provides a method for predicting the threshold electricity consumption of virtual power plants. This method preprocesses historical multi-source meteorological, photovoltaic output, and load electricity consumption data, trains a meteorological deviation correction model to correct irradiance and temperature deviations in future weather forecasts, and integrates multi-meteorological source data. After feature selection using a correlation measurement algorithm, a dynamic weighted ensemble model is used to predict photovoltaic output and net load electricity consumption. Finally, the threshold electricity consumption is determined based on the difference. This method can improve data quality, meteorological input accuracy, and model prediction performance, enhance generalization ability and interpretability, and provide accurate electricity consumption references for virtual power plants participating in electricity trading. It solves the problems of low prediction accuracy and poor generalization ability of existing methods.
[0013] In one optional implementation, the step of training a preset meteorological deviation correction model based on preprocessed historical weather forecast data and corresponding historical measured data to correct irradiance and temperature in future weather forecasts includes:
[0014] For each meteorological source, input the irradiance and temperature from historical weather forecast data, and output the measured irradiance deviation and temperature deviation;
[0015] By predicting the deviation values at future moments using a trained XGBoost model, corrected irradiance and temperature data are obtained.
[0016] This invention utilizes the deviation between measured and predicted irradiance and temperature from historical data to train a model. This model can specifically correct systematic and random errors in numerical weather forecasts under scenarios such as complex terrain and cloudy weather, making the corrected irradiance and temperature data closer to the true values. This improves the accuracy of meteorological input and lays the foundation for high-precision prediction of photovoltaic power output and net load electricity consumption. It effectively solves the problem of large prediction deviations in special scenarios caused by meteorological data errors in existing methods.
[0017] In one optional implementation, the step of performing feature derivation processing on the meteorological input data and using a preset correlation measurement algorithm to filter features strongly correlated with photovoltaic output and net load electricity consumption includes:
[0018] Extract raw features from meteorological input data, including irradiance, temperature, humidity, and wind speed;
[0019] The original features are subjected to feature derivation processing to generate temporal features, cross features, and sliding window features;
[0020] The maximum information coefficient algorithm is used to calculate the MIC values of the correlation between all features and photovoltaic / net load;
[0021] Features with MIC values greater than a preset threshold are selected as those strongly correlated with photovoltaic and net load.
[0022] This invention extracts raw features such as irradiance and temperature and derives time features (e.g., hourly cycles, seasonal patterns), cross features (e.g., irradiance × temperature), and sliding window features (e.g., historical 7-day average). This allows for multi-dimensional mining of the potential correlation between meteorological data and photovoltaic / net load. The maximum information coefficient (MIC) algorithm effectively captures nonlinear correlations. By calculating the MIC value and filtering out strongly correlated features and eliminating redundant features, the model training efficiency is improved while enhancing the correlation between features and prediction targets. This enables the model to more accurately capture the impact of meteorological factors on photovoltaic output and net load, thereby improving the interpretability and accuracy of power generation prediction and solving the problem of insufficient prediction performance caused by unreasonable feature selection in existing methods.
[0023] In one optional implementation, the step of predicting photovoltaic power generation and net load electricity consumption using a dynamic weighted integrated model based on the strong correlation between photovoltaic power output and net load electricity consumption includes:
[0024] Based on the strong correlation with photovoltaic power output, linear regression, XGBoost and support vector regression models are used to predict photovoltaic power generation respectively, and the prediction results are optimized by least squares dynamic weighted ensemble model.
[0025] Based on the strong correlation with net load electricity consumption, Prophet, simple moving average and XGBoost models are used to predict net load electricity consumption respectively, and the prediction results are optimized by least squares dynamic weighted ensemble model.
[0026] This invention utilizes a combination of multiple models to capture patterns in different feature dimensions, reduces the accumulation of errors in a single model through least-squares dynamic weighted integration, and allows the model to adapt to changes in data distribution when the virtual power plant resource structure is dynamically adjusted, without the need for retraining. This effectively solves the problems of high modeling complexity, error accumulation, and poor generalization ability in existing methods.
[0027] In one alternative implementation, the least-squares dynamic weighted ensemble model optimizes the weights using the following objective function:
[0028]
[0029] in, Let y be the predicted value of the i-th model at time t. t w is the true value at time t. i The weights of the i-th model satisfy the following constraints: w i ≥0;
[0030] The optimal weight combination is obtained by solving using the Lagrange multiplier method.
[0031] This invention constructs an objective function based on historical prediction errors, with the goal of minimizing the sum of squared errors. By dynamically adjusting the weights of each model, the ensemble model can adapt to the prediction performance of each base model under different scenarios, effectively reducing the error amplification problem of a single model in atypical scenarios. Combining the Lagrange multiplier method to solve for the optimal analytical solution avoids the computational time of iterative algorithms such as gradient descent and prevents overfitting by introducing a regularization term. This makes the weight combination more closely match the dynamic changes in the virtual power plant's resource structure, while also improving the model's adaptability to changes in the virtual power plant's operating characteristics.
[0032] In one optional implementation, determining the cut-off power volume based on the difference between the predicted photovoltaic power generation and the predicted net load power consumption includes:
[0033] When the photovoltaic power generation forecast value Q PV Greater than the predicted net load electricity consumption value Q load At that time, the power consumption at the gate is the power consumption Q connected to the network. 上网 Then Q 上网 =Q PV -Q load ;
[0034] When the net load electricity consumption forecast value Q loadGreater than the predicted value of photovoltaic power generation Q PV At that time, the power level at the gate is the power level Q that is discharged from the grid. 下网 Then Q 下网 =Q load -Q PV .
[0035] The embodiments of this invention strictly follow the physical definition of the energy interaction difference between the virtual power plant at the threshold and the main power grid. By quantifying the dynamic balance between photovoltaic output and load power consumption, the abstract energy interaction process is transformed into a computable physical model. This avoids the shortcomings of direct prediction methods that ignore physical mechanisms. Furthermore, by decoupling the independent prediction processes of photovoltaic and load, the threshold power prediction results have clear physical interpretability, such as intuitively reflecting the impact of energy storage charging and discharging and user power consumption behavior on power interaction.
[0036] Secondly, the present invention provides a threshold power prediction system for virtual power plants, the system comprising:
[0037] The historical data preprocessing module is used to preprocess the acquired historical multi-source meteorological data, photovoltaic power output data, and load power consumption data;
[0038] The meteorological data correction module is used to train a preset meteorological deviation correction model based on preprocessed historical multi-source weather forecast data and corresponding historical measured data, and to use the trained meteorological deviation correction model to correct the irradiance and temperature in future weather forecasts.
[0039] The multi-source meteorological data fusion module is used to fuse corrected data from multiple meteorological sources using a weighted average method to construct meteorological input data.
[0040] The feature filtering module is used to perform feature derivation processing on the meteorological input data and use a preset correlation measurement algorithm to filter features that are strongly correlated with photovoltaic output and net load electricity consumption.
[0041] The prediction module is used to predict photovoltaic power generation and net load electricity consumption based on the characteristics that are strongly correlated with photovoltaic output and net load electricity consumption, respectively, using a dynamic weighted integrated model.
[0042] The threshold power calculation module is used to determine the threshold power based on the difference between the predicted photovoltaic power generation and the predicted net load power consumption.
[0043] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the gate power prediction method for virtual power plants described in the first aspect or any corresponding embodiment thereof.
[0044] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the gate power prediction method for a virtual power plant according to the first aspect or any corresponding embodiment described above.
[0045] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the gate power prediction method for a virtual power plant according to the first aspect or any corresponding embodiment described above. Attached Figure Description
[0046] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0047] Figure 1 This is a flowchart illustrating a gate power prediction method for virtual power plants according to an embodiment of the present invention.
[0048] Figure 2 This is a structural block diagram of a gate power prediction system for virtual power plants according to an embodiment of the present invention.
[0049] Figure 3 A schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0050] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0051] Existing direct and indirect forecasting methods have been applied in practical engineering for virtual power plant threshold power forecasting, but they still suffer from many common problems in terms of forecast accuracy, model generalization ability, application scenario adaptability, and interpretability. These problems severely restrict the decision-making efficiency and operational stability of virtual power plants in key operations such as grid dispatching and market energy trading. Specifically, these include:
[0052] 1. Limited prediction accuracy makes it difficult to meet practical engineering needs. Current mainstream prediction methods generally rely on historical data modeling, lacking a deep understanding of the energy flow mechanisms within virtual power plants. Specifically: direct prediction methods model only based on historical power generation sequences at critical points, failing to consider key driving factors affecting power generation at these points (such as fluctuations in photovoltaic output, changes in user behavior, and energy storage charging and discharging strategies), leading to significantly increased prediction errors in atypical scenarios such as sudden weather changes, holidays, and equipment maintenance; while indirect prediction methods incorporate physical mechanisms, the need to establish multiple sub-models (such as photovoltaic power generation prediction models and net load power consumption prediction models) makes it easy for prediction errors from each sub-model to accumulate, ultimately resulting in large deviations in the predicted power generation at critical points.
[0053] 2. Poor model generalization ability, making it difficult to adapt to dynamic adjustments in resource structure. A virtual power plant is essentially a dynamic aggregate containing various distributed energy resources (such as photovoltaics, wind power, energy storage, and controllable loads), and the access status and operating mode of these resources may change over time. However, existing prediction models mostly use static training methods, making it difficult to automatically adapt to new connected devices or devices shutting down after deployment; for different types of resource scenarios, the model needs to be retrained or even redesigned, lacking universality and transferability.
[0054] 3. The predictive results have poor interpretability, which is not conducive to decision support. Although the prediction models in the existing methods have certain predictive capabilities, they are "black box models" and it is difficult to explain the driving factors behind the prediction output. Even indirect prediction methods often only provide the final threshold power volume value and lack visualization and attribution analysis of how key variables such as photovoltaic power generation, load fluctuations, and energy storage strategies affect the threshold power volume.
[0055] 4. Insufficient modeling of the regulatory capacity of flexible resources such as energy storage. In virtual power plants containing multiple types of flexible resources (such as energy storage, electric vehicle charging piles, and adjustable loads), the threshold power is not only affected by power generation and load, but also significantly influenced by human regulation methods such as energy storage charging and discharging strategies and demand response mechanisms. However, most current prediction models treat resources such as energy storage as uncontrollable disturbances or ignore them, lacking the ability to model the operating strategies of controllable resources within the virtual power plant.
[0056] In summary, existing virtual power plant threshold power prediction methods generally suffer from low prediction accuracy, weak model generalization ability, poor adaptability to application scenarios, insufficient interpretability of prediction results, and lack of modeling for flexible resources when facing complex operating environments, multi-resource mixed scenarios, and the formulation of medium- and long-term plans. Therefore, there is an urgent need to propose a threshold power prediction method that can deeply integrate multi-dimensional information, support dynamic resource structure adjustment, and possess high accuracy and strong interpretability, in order to improve the intelligence level and operational efficiency of virtual power plants in key scenarios such as grid dispatching, energy trading, and load management.
[0057] This embodiment provides a gate power prediction method for virtual power plants to address the shortcomings of existing technologies. Figure 1 This is a flowchart of a gate power prediction method for virtual power plants according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:
[0058] Step S1 involves preprocessing the acquired historical multi-source meteorological data, photovoltaic power output data, and load power consumption data.
[0059] Specifically, firstly, outliers and abnormal values (such as unreasonable data like negative irradiance) are removed from the acquired historical multi-source meteorological data, photovoltaic power output data, and load electricity consumption data. For missing values, a judgment is made based on their missing rate: if the missing rate exceeds 20% of the total data length, the data is removed; if the missing rate is less than 20%, it is filled in using linear interpolation and then completed according to the missing timestamps. Finally, dimensionless normalization is performed to lay a reliable data foundation for subsequent predictions. The dataset used in this embodiment of the invention has a time granularity of hours.
[0060] Step S2: Based on the preprocessed historical multi-source weather forecast data and the corresponding historical measured data, a preset meteorological deviation correction model is trained, and the trained meteorological deviation correction model is used to correct the irradiance and temperature in future weather forecasts.
[0061] Specifically, numerical weather prediction data has certain systematic and random errors in practical applications, especially in scenarios with complex terrain and cloudy weather, where the predicted values may deviate significantly from the actual values. To improve the accuracy of power generation prediction at virtual power plants, a meteorological deviation correction model is trained by fusing historical measured data with forecast data from multiple meteorological sources, specifically correcting for two key parameters that significantly affect photovoltaic output and load: irradiance and temperature.
[0062] This invention selects three meteorological sources: ECMWF, GFS, and Qiyun. For each meteorological source, an XGBoost model is trained to correct the irradiance and temperature prediction errors for that source. Taking the EC meteorological source as an example: the input feature X is the irradiance from historical weather forecast data. and temperature The output target Y is the irradiance deviation. Temperature deviation Where G and T are the measured irradiance and temperature, respectively. When it is necessary to correct the forecast data for a future time t, the future irradiance forecast value is... The predicted temperature is Predict irradiance deviation using a trained XGBoost model. and temperature deviation value The final calculated and corrected irradiance and temperature data are as follows: and
[0063] Step S3: The corrected data from multiple meteorological sources are fused using a weighted average method to construct meteorological input data.
[0064] Specifically, this invention utilizes the advantages of multiple meteorological sources (ECMWF, Qiyun, GFS) to construct more accurate meteorological input data, enhancing the robustness and adaptability of meteorological input. Through multi-source complementarity, it reduces the prediction uncertainty caused by a single meteorological source and enhances the model's adaptability to different geographical regions and climatic conditions. This invention's multi-meteorological source fusion strategy uses a weighted average method to fuse data from multiple meteorological sources. The fused meteorological data is: F W =w1F EC +w2F Qiyun +w3F GFS , where w1, w2, w3 are the weights of each meteorological source, satisfying w1+w2+w3=1.
[0065] Step S4: Perform feature derivation processing on the meteorological input data, and use a preset correlation measurement algorithm to screen features that are strongly correlated with photovoltaic power output and net load electricity consumption.
[0066] Specifically, the first step is to extract the original features of the meteorological input data, including irradiance, temperature, humidity, and wind speed. Then, feature derivation processing is performed on the original features to generate time features (such as hourly cycles and seasonal patterns), cross features (such as irradiance × temperature), and sliding window features (such as historical 7-day average). The maximum information coefficient algorithm (MIC algorithm) is used to calculate the MIC value of the correlation between all features and photovoltaic / net load. Finally, features with MIC values greater than a preset threshold are selected as features that are strongly correlated with photovoltaic and net load.
[0067] The MIC algorithm used in this invention is a nonlinear correlation measurement method. Compared to the Pearson correlation coefficient, which can only measure linear relationships, the MIC algorithm can capture the nonlinear relationships between complex variables, eliminate redundant features, improve model training efficiency, and enhance the correlation between features and prediction targets. This allows the model to more accurately capture the impact of meteorological factors on photovoltaic output and net load, improving model interpretability and predictive performance. Based on mutual information theory, it uses data grid partitioning and normalization to ensure comparability across different data distributions. Mutual information measures the dependency between two variables X and Y, and its mathematical formula is as follows:
[0068]
[0069] Where x represents the feature, and y represents the target to be predicted (PV output and net load); P(x,y) is the joint probability density distribution, and P(x) and P(y) are the marginal probability density distributions. A two-dimensional Cartesian coordinate system is established, and the scatter plot formed by vectors x and y is divided into a certain number of grids. The distribution of scatter points in each grid is then examined to obtain the joint probability.
[0070] The formula for calculating the MIC value is as follows:
[0071]
[0072] Where G represents all possible m×n grid partitioning methods, m and n are the number of bins for X and Y respectively, I(X,Y|G) is the mutual information under grid G, and logmin(m,n) is the normalization factor to ensure that MIC≤1.
[0073] Step S5: Based on the strong correlation between photovoltaic power output and net load electricity consumption, a dynamic weighted integrated model is used to predict photovoltaic power generation and net load electricity consumption, respectively.
[0074] This invention employs a multi-model combined prediction method for both photovoltaic (PV) and net load forecasting, and dynamically adjusts model weights using the least squares method to achieve optimal fusion of prediction results from each sub-model, thereby improving prediction accuracy. Specifically:
[0075] 1. In most industrial and commercial distributed photovoltaic (PV) scenarios, PV output is significantly affected by weather factors. Therefore, to more accurately predict PV output, this invention employs multiple prediction models for comparative analysis, including linear regression, XGBoost, and support vector regression (SVR) models. Among them:
[0076] (1) Linear regression is a classic supervised learning algorithm used to establish a linear relationship model between a dependent variable (target variable) and one or more independent variables (feature variables). Its core idea is to predict continuous numerical results by fitting a straight line (or hyperplane), and it is suitable for exploring the correlation between variables and performing predictive analysis.
[0077] (2) Extreme Gradient Boosting (XGBoost) is a synthetic tree technique based on gradient boosting. It creates a powerful learner by repeatedly adding weak decision trees; that is, iteratively adding the output of the previous decision tree to the input variable of the next decision tree to increase the gradient and align the residuals of previous predictions. To prevent overfitting, XGBoost introduces a minimum objective function, embedding a regularization term into the objective function, followed by a second-order Taylor expansion. XGBoost ultimately predicts the average output of all decision trees. The loss function of XGBoost is defined as follows:
[0078]
[0079] In the formula, y i Let i be the true value of the i-th sample. f represents the predicted value of the i-th sample in the (t-1)-th iteration. t (x i ) represents the new decision tree for the i-th sample x in the t-th iteration. i The predicted value, This represents the regularization term.
[0080] Next, by expanding the objective function using the second-order Taylor series, we can obtain:
[0081]
[0082] In the formula, g i Indicates the first sample x i The first derivative of the predicted value, h i Indicates the first sample x i The second derivative of the predicted value, This represents a second-order term, used to capture second-order changes in the objective function.
[0083] (3) The goal of Support Vector Regression (SVR) is to find a function f(x) = W T The objective function is to calculate x+b, making the predicted value f(x) as close as possible to the true value y, while controlling the model complexity.
[0084]
[0085] In the formula, W is the weight vector, b is the bias term, and ξ is the bias term. k , is a slack variable, and C is a penalty factor. To ensure that the error between the predicted and actual values is within an acceptable range, SVR introduces the following constraints:
[0086]
[0087] Where ε represents the deviation, and ε>0, y k Given the true value of the k-th sample, and combining the objective function and constraints, the SVR problem can be transformed into a constrained convex optimization problem. In the solution process, the Lagrange multiplier method is introduced to transform the original optimization problem into a dual form, and a kernel function is introduced into the dual problem to complete the final solution. SVR finds the optimal regression function by constructing a constrained optimization problem and transforms the nonlinear problem in low-dimensional space into a linear problem in high-dimensional space through the kernel function, thereby achieving more accurate predictions.
[0088] Based on the characteristics that are strongly correlated with photovoltaic power output, the embodiments of the present invention use linear regression, XGBoost and support vector regression models to predict photovoltaic power generation respectively, and optimize the prediction results through a least squares dynamic weighted ensemble model.
[0089] 2. Load typically exhibits periodicity and seasonality, and is also influenced by user behavior. Therefore, it is first necessary to identify the periodicity and seasonality of load data. Based on the different characteristics of periodicity and seasonality, appropriate prediction methods are adopted for load sequences of varying complexity, such as simple mathematical methods or more advanced statistical learning methods. To more accurately predict net load electricity consumption, considering periodicity and seasonality, this embodiment of the invention employs multiple prediction models for comparative analysis, including Prophet, simple moving average, and XGBoost models to predict net load electricity consumption.
[0090] (1) Prophet is an additive regression model based on time series, particularly suitable for time series forecasting problems with obvious periodicity and holiday effects. The core idea of Prophet is to decompose the time series into the following main components: y(t)=g(t)+s(t)+h(t)+ε t Where y(t) is the observed value at time t, g(t) is the trend term, s(t) is the seasonal term, h(t) is the holiday effect term, and ε t This is the error term. Prophet is easier to use and more interpretable for modeling periodic and seasonal load variations, making it suitable for rapid modeling and deployment in engineering practice.
[0091] (2) Simple Moving Average (SMA) is often used for time series forecasting. Its core idea is to average historical data periodically using a sliding window, thereby smoothing short-term fluctuations and revealing long-term trends. Its mathematical expression can be expressed as:
[0092]
[0093] Where t is the current time, n is the length of the sliding window, and x t-i+1 This is the actual value at the i-th time point counting backwards from the current time t.
[0094] Based on the strong correlation between net load electricity consumption and the characteristics of net load electricity consumption, this invention uses Prophet, simple moving average and XGBoost models to predict net load electricity consumption respectively, and optimizes the prediction results through a least squares dynamic weighted ensemble model.
[0095] Traditional photovoltaic power generation and net load electricity consumption forecasting mainly rely on fixed weight combination and average weight combination forecasting. Although these methods combine algorithm models, the weight allocation is not optimal.
[0096] Therefore, this invention automatically adjusts the weight coefficients of each model based on historical prediction errors, minimizing the sum of squared errors in the final integrated prediction result, thereby improving overall prediction performance. Specifically, there are N basic prediction models used for predicting photovoltaic power generation and net load electricity consumption, and their objective function is:
[0097]
[0098] in, Let y be the predicted value of the i-th model at time t. t w is the true value at time t. i The weights of the i-th model satisfy the following constraints: w i ≥0.
[0099] Based on the above, a least squares optimization problem is constructed. This embodiment of the invention introduces the Lagrange multiplier method. Taking the partial derivative with respect to w and setting it equal to 0 yields a system of linear equations with respect to w and λ. Solving these equations gives the optimal weights w1, w2, ..., w N The weights sum to a value of 1 and are non-negative. The final result of the integrated prediction of photovoltaic output and net load is calculated based on these weights, using the following mathematical formula:
[0100] This invention constructs an objective function based on historical prediction errors, with the goal of minimizing the sum of squared errors. By dynamically adjusting the weights of each model, the ensemble model can adapt to the prediction performance of each base model under different scenarios, effectively reducing the error amplification problem of a single model in atypical scenarios. Combining the Lagrange multiplier method to solve for the optimal analytical solution avoids the computational time of iterative algorithms such as gradient descent and prevents overfitting by introducing a regularization term. This makes the weight combination more closely match the dynamic changes in the virtual power plant's resource structure, while simultaneously improving the model's adaptability to changes in the virtual power plant's operating characteristics and its generalization ability in complex scenarios.
[0101] Step S6: Determine the threshold power based on the difference between the predicted photovoltaic power generation and the predicted net load power consumption.
[0102] Specifically, when the predicted value of photovoltaic power generation Q PV Greater than the predicted net load electricity consumption value Q load At that time, the power consumption at the gate is the power consumption Q connected to the network. 上网 Then Q 上网 =Q PV -Q load When the net load electricity consumption forecast value Q load Greater than the predicted value of photovoltaic power generation Q PV At that time, the power level at the gate is the power level Q that is discharged from the grid. 下网 Then Q 下网 =Q load -Q PV Strictly adhering to the physical definition of the energy interaction difference between the virtual power plant at the gateway and the main grid, this method quantifies the dynamic balance between photovoltaic output and load consumption, transforming the abstract energy interaction process into a calculable physical model. This avoids the shortcomings of direct prediction methods that ignore physical mechanisms, and by decoupling the independent prediction processes of photovoltaics and loads, the gateway power prediction results have clear physical interpretability, such as intuitively reflecting the impact of energy storage charging and discharging and user electricity consumption behavior on power interaction.
[0103] The method provided in this invention can be applied to medium- to long-term (e.g., predicting electricity demand at critical junctures within the next month to one year) forecasting, supporting virtual power plant scheduling and trading decisions, filling the technological gap in medium- to long-term electricity demand forecasting, and providing strong support for virtual power plants to participate in electricity market transactions and grid dispatch planning. It can also be applied to short-term (predicting electricity demand within the next 15 minutes to 72 hours) forecasting, assisting virtual power plants in participating in the electricity spot market (e.g., adjusting power purchase / sales strategies in real time), or optimizing the real-time output allocation of distributed energy resources within microgrids. Combined with short-term electricity demand forecasting, it guides industrial users to stagger their electricity consumption (e.g., triggering interruptible load resources to reduce electricity consumption when the afternoon load peak is predicted), reducing the cost of purchasing electricity at critical junctures. In practical applications, historical data of appropriate time lengths are selected and processed according to the application scenario requirements to achieve accurate forecasting.
[0104] This embodiment also provides a gate power prediction system for virtual power plants, which is used to implement the above embodiments and preferred embodiments, and will not be repeated as already described. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the system described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0105] This embodiment provides a threshold power prediction system for virtual power plants, such as... Figure 2 As shown, it includes:
[0106] Historical data preprocessing module 21 is used to preprocess the acquired historical multi-source meteorological data, photovoltaic power output data and load power consumption data;
[0107] The meteorological data correction module 22 is used to train a preset meteorological deviation correction model based on preprocessed historical multi-source weather forecast data and corresponding historical measured data, and to use the trained meteorological deviation correction model to correct the irradiance and temperature in future weather forecasts.
[0108] The multi-source meteorological data fusion module 23 is used to fuse corrected data from multiple meteorological sources using a weighted average method to construct meteorological input data.
[0109] The feature filtering module 24 is used to perform feature derivation processing on meteorological input data and to use a preset correlation measurement algorithm to filter features that are strongly correlated with photovoltaic output and net load electricity consumption.
[0110] Prediction module 25 is used to predict photovoltaic power generation and net load electricity consumption based on the characteristics that are strongly correlated with photovoltaic output and net load electricity consumption, respectively, using a dynamic weighted integrated model.
[0111] The threshold power calculation module 26 is used to determine the threshold power based on the difference between the predicted value of photovoltaic power generation and the predicted value of net load power consumption.
[0112] In some alternative implementations, the meteorological data correction module 22 includes:
[0113] The meteorological deviation data acquisition unit is used to input the irradiance and temperature from historical weather forecast data for each meteorological source and output the measured irradiance deviation and temperature deviation.
[0114] The meteorological data modification unit is used to predict the deviation values at future times using the trained XGBoost model, and obtain the corrected irradiance and temperature data.
[0115] In some alternative implementations, the feature filtering module 24 includes:
[0116] The raw data extraction unit is used to extract the raw features of meteorological input data, including irradiance, temperature, humidity, and wind speed.
[0117] The feature derivation processing unit is used to perform feature derivation processing on the original features to generate temporal features, cross features, and sliding window features;
[0118] The correlation calculation unit is used to calculate the MIC value of the correlation between all features and photovoltaic / net load using the maximum information coefficient algorithm;
[0119] The feature filtering unit is used to filter features with MIC values greater than a preset threshold as features that are strongly correlated with photovoltaic and net load.
[0120] In some alternative implementations, the prediction module 25 includes:
[0121] The photovoltaic power generation prediction unit is used to predict photovoltaic power generation based on characteristics that are strongly correlated with photovoltaic output, using linear regression, XGBoost and support vector regression models respectively, and optimizes the prediction results through a least squares dynamic weighted ensemble model.
[0122] The net load electricity consumption prediction unit is used to predict net load electricity consumption based on features that are strongly correlated with net load electricity consumption, using Prophet, simple moving average and XGBoost models respectively, and optimize the prediction results through a least squares dynamic weighted ensemble model.
[0123] In some alternative implementations, the least-squares dynamically weighted ensemble model optimizes the weights using the following objective function:
[0124]
[0125] in, Let y be the predicted value of the i-th model at time t. t w is the true value at time t. i The weights of the i-th model satisfy the following constraints: w i ≥0;
[0126] The optimal weight combination is obtained by solving using the Lagrange multiplier method.
[0127] In one optional implementation, the gate power calculation module 26 includes:
[0128] The grid-connected power calculation unit is used when the predicted photovoltaic power generation value Q... PV Greater than the predicted net load electricity consumption value Q load At that time, the power consumption at the gate is the power consumption Q connected to the network. 上网 Then Q 上网 =Q PV -Q load ;
[0129] The offline power consumption calculation unit is used when the net load power consumption forecast value Q is... load Greater than the predicted value of photovoltaic power generation Q PV At that time, the power level at the gate is the power level Q that is discharged from the grid. 下网 Then Q 下网 =Q load -Q PV .
[0130] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0131] In this embodiment, the gate power prediction system for virtual power plants is presented in the form of functional units. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0132] This invention also provides a computer device having the above-described features. Figure 2 The diagram shows a gate power prediction system for a virtual power plant.
[0133] Please see Figure 3 , Figure 3 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 3As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 3 Take a processor 10 as an example.
[0134] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0135] The memory 20 stores instructions executable by at least one processor 10 to cause at least one processor 10 to perform the method shown in the above embodiments.
[0136] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0137] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0138] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.
[0139] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0140] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0141] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A method for predicting gate power volume for virtual power plants, characterized in that, include: The acquired historical multi-source meteorological data, photovoltaic power output data, and load power consumption data are preprocessed; Based on preprocessed historical multi-source weather forecast data and corresponding historical measured data, a preset meteorological deviation correction model is trained, and the trained meteorological deviation correction model is used to correct the irradiance and temperature in future weather forecasts. The corrected data from multiple meteorological sources are fused using a weighted average method to construct the meteorological input data; The meteorological input data is subjected to feature derivation processing, and a preset correlation measurement algorithm is used to screen features that are strongly correlated with photovoltaic output and net load electricity consumption. Based on the strong correlation between photovoltaic power output and net load electricity consumption, dynamic weighted integrated models are used to predict photovoltaic power generation and net load electricity consumption, respectively. The threshold electricity volume is determined based on the difference between the predicted photovoltaic power generation and the predicted net load electricity consumption.
2. The method according to claim 1, characterized in that, The pre-trained meteorological deviation correction model, based on preprocessed historical weather forecast data and corresponding historical measured data, corrects irradiance and temperature in future weather forecasts, including: For each meteorological source, input the irradiance and temperature from historical weather forecast data, and output the measured irradiance deviation and temperature deviation; By predicting the deviation values at future moments using a trained XGBoost model, corrected irradiance and temperature data are obtained.
3. The method according to claim 1, characterized in that, The process of performing feature derivation processing on the meteorological input data and using a preset correlation measurement algorithm to screen features that are strongly correlated with photovoltaic output and net load electricity consumption includes: Extract raw features from meteorological input data, including irradiance, temperature, humidity, and wind speed; The original features are subjected to feature derivation processing to generate temporal features, cross features, and sliding window features; The maximum information coefficient algorithm is used to calculate the MIC values of the correlation between all features and photovoltaic / net load; Features with MIC values greater than a preset threshold are selected as those strongly correlated with photovoltaic and net load.
4. The method according to any one of claims 1-3, characterized in that, Based on the strong correlation between photovoltaic power output and net load electricity consumption, a dynamic weighted integrated model is used to predict photovoltaic power generation and net load electricity consumption, including: Based on the strong correlation with photovoltaic power output, linear regression, XGBoost and support vector regression models are used to predict photovoltaic power generation respectively, and the prediction results are optimized by least squares dynamic weighted ensemble model. Based on the strong correlation with net load electricity consumption, Prophet, simple moving average and XGBoost models are used to predict net load electricity consumption respectively, and the prediction results are optimized by least squares dynamic weighted ensemble model.
5. The method according to claim 4, characterized in that, The least-squares dynamic weighted ensemble model optimizes the weights using the following objective function: in, Let y be the predicted value of the i-th model at time t. t w is the true value at time t. i The weights of the i-th model satisfy the following constraints: w i ≥0; The optimal weight combination is obtained by solving using the Lagrange multiplier method.
6. The method according to claim 1, characterized in that, The determination of the threshold electricity volume based on the difference between the predicted photovoltaic power generation and the predicted net load electricity consumption includes: When the photovoltaic power generation forecast value Q PV Greater than the predicted net load electricity consumption value Q load At that time, the power consumption at the gate is the power consumption Q connected to the network. 上网 Then Q 上网 =Q PV -Q load ; When the net load electricity consumption forecast value Q load Greater than the predicted value of photovoltaic power generation Q PV At that time, the power level at the gate is the power level Q that is discharged from the grid. 下网 Then Q 下网 =Q load -Q PV .
7. A gate power prediction system for virtual power plants, characterized in that, include: The historical data preprocessing module is used to preprocess the acquired historical multi-source meteorological data, photovoltaic power output data, and load power consumption data; The meteorological data correction module is used to train a preset meteorological deviation correction model based on preprocessed historical multi-source weather forecast data and corresponding historical measured data, and to use the trained meteorological deviation correction model to correct the irradiance and temperature in future weather forecasts. The multi-source meteorological data fusion module is used to fuse corrected data from multiple meteorological sources using a weighted average method to construct meteorological input data. The feature filtering module is used to perform feature derivation processing on the meteorological input data and use a preset correlation measurement algorithm to filter features that are strongly correlated with photovoltaic output and net load electricity consumption. The prediction module is used to predict photovoltaic power generation and net load electricity consumption based on the characteristics that are strongly correlated with photovoltaic output and net load electricity consumption, respectively, using a dynamic weighted integrated model. The threshold power calculation module is used to determine the threshold power based on the difference between the predicted photovoltaic power generation and the predicted net load power consumption.
8. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the gate power prediction method for a virtual power plant as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the gate power prediction method for a virtual power plant as described in any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes computer instructions for causing a computer to execute the gate power prediction method for a virtual power plant as described in any one of claims 1 to 6.
Citation Information
Cited By
Flexible regulation and control system and method based on distributed photovoltaic power generation
CN121642970A