A virtual power plant load forecasting and transaction strategy optimization method and system
By detecting extreme events and using similar historical cases to correct the virtual power plant load forecasting model, the problem of insufficient forecasting accuracy under extreme events is solved, the load forecasting accuracy is improved and the trading strategy is optimized, ensuring the accuracy and security of the trading strategy.
Patent Information
- Application Number
- CN202611413905.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-11
- Publication Date
- 2026-11-27
AI Technical Summary
Existing virtual power plant load forecasting models lack sufficient accuracy under extreme events, making them unable to effectively cope with sudden extreme weather disasters. This leads to inaccurate trading strategies, affecting market competitiveness and economic benefits.
By acquiring diverse and heterogeneous data, detecting extreme event triggering conditions, generating deviation correction values and confidence intervals using historical similar cases, correcting the benchmark prediction curve, and constructing a constrained optimization model by combining the net load curve and its confidence interval, a trading strategy is generated.
It improves the accuracy of load forecasting under extreme events, avoids trading risks caused by inaccurate forecasts, and achieves a balance between maximizing trading profits and minimizing risks.
Smart Images

Figure CN123180441A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system forecasting technology, and in particular to a method and system for virtual power plant load forecasting and trading strategy optimization. Background Technology
[0002] Virtual Power Plants (VPPs), as a new type of power coordination and management system, aggregate and optimize distributed energy resources such as distributed power sources, energy storage systems, and controllable loads through advanced information and communication technologies and intelligent control technologies, forming an organic whole that participates in the operation of the electricity market. With the rapid advancement of my country's electricity spot market construction, VPPs, as important participants in the electricity market, have their market competitiveness and economic benefits directly affected by the accuracy of their load forecasting and the rationality of their day-ahead market trading strategies.
[0003] Currently, virtual power plants mainly rely on historical electricity load data for load forecasting, combined with meteorological factors and date type, to directly predict loads using machine learning models. However, this method typically extrapolates based solely on statistical patterns in historical data. When sudden extreme weather events such as typhoons occur during the forecast period, historical samples cannot adequately cover similar extreme conditions, and the model cannot accurately depict the impact of extreme events on electricity load, ultimately significantly reducing the accuracy of load forecasting. Summary of the Invention
[0004] To address the technical problems existing in the prior art, this invention provides a method for virtual power plant load forecasting and trading strategy optimization, comprising the following steps: S1. Obtain the first multi-dimensional heterogeneous data within the preset historical time window; S2. Based on the first multi-source heterogeneous data, generate a baseline electricity load forecast curve for the future forecast period using a preset baseline electricity load forecast model, and detect whether there are predefined extreme event triggering conditions in the future forecast period: If so, the type of extreme event triggered is obtained according to the existing extreme event triggering conditions. Candidate historical similar cases are matched from the historical prediction case library according to the matched extreme event type. Based on the candidate historical similar cases, deviation correction values and deviation confidence intervals are generated. Then, the benchmark electricity load prediction curve is corrected to obtain the final electricity load prediction curve and its confidence band. If not, the baseline electricity load forecast curve is used as the final electricity load forecast curve, and a confidence band is generated based on the historical forecast error distribution on the validation set of the baseline electricity load forecast model. S3. Obtain the net load curve and net load confidence interval for the future forecast period based on the final electricity load forecast curve and its confidence band. S4. Generate a day-ahead market trading strategy by using a constraint optimization model constructed based on the net load curve and its net load confidence interval, combined with the declared capacity constraint and deviation assessment risk constraint.
[0005] Furthermore, the first multi-dimensional heterogeneous data includes electricity load data and meteorological data.
[0006] Furthermore, the generation of the baseline electricity load forecast curve for the future forecast period specifically includes the following steps: The first multivariate heterogeneous data is preprocessed to form the input feature matrix; The input feature matrix is input into the baseline electricity load prediction model. The encoder performs forward calculation to obtain the hidden state sequence. The decoder uses the last hidden state in the hidden state sequence as the initial state and the hidden state sequence as the key-value pair of the attention layer to start recursively generating the predicted load value in the future prediction period. The predicted load values are de-standardized to obtain predicted load values with actual physical dimensions, forming a baseline electricity load prediction curve.
[0007] Furthermore, detecting whether predefined extreme events trigger the future forecast period also includes obtaining the day-ahead occurrence conditions for the future forecast period, specifically including the following steps: The system acquires a pre-built extreme event feature library and early warning information within a future prediction time window. The extreme event feature library contains triggering rules for various extreme event types. The early warning information includes meteorological disaster early warning information, power grid operation status alarm information, and user-side anomaly reporting information. The warning information is queried and matched with the triggering rules of each extreme event type in the extreme event feature library. If any triggering rule is successfully matched, it is determined that there are predefined extreme event triggering conditions in the future prediction period.
[0008] Furthermore, the step of generating deviation correction values and deviation confidence intervals based on candidate historical similar cases specifically includes the following steps: From the historical prediction case library, extract historical cases that are identical to the extreme events that match the future prediction period, and record them as the first similar cases. Each historical case in the historical case library contains the following fields: the matched historical extreme event, historical early warning information, and historical load prediction deviation curve. The structured similarity between the early warning information within the future prediction time window and the historical early warning information of each first similar case is analyzed, and the first similar case with the largest structured similarity is selected as the second similar case. The first weight of each second similar case is obtained by the ratio of the structured similarity corresponding to the second similar case to the sum of the structured similarities corresponding to all second similar cases; the mean deviation and standard deviation of each second similar case are obtained by the historical load prediction deviation curve corresponding to each second similar case. The deviation correction value is obtained by weighting and summing the first weight and mean deviation of each second similar case; the deviation confidence interval of the deviation correction value is calculated by combining the first weight and deviation standard deviation of each second similar case.
[0009] Furthermore, based on the final electricity load forecast curve and its confidence band, the net load curve and its net load confidence interval for the future forecast period are obtained, specifically including the following steps: Obtain the output forecast curve of distributed power sources and its output confidence interval for the future forecast period; The net load curve is obtained by subtracting the value at the corresponding time point from the value at each time point on the final electricity load forecast curve. The upper bound of the net load confidence interval is obtained by subtracting the lower bound of the output confidence interval from the upper bound of the confidence band of the final electricity load prediction curve, and the lower bound of the net load confidence interval is obtained by subtracting the upper bound of the output confidence interval from the lower bound of the confidence band of the final electricity load prediction curve.
[0010] Furthermore, obtaining the distributed generation output forecast curve and its output confidence interval for the future forecast period specifically includes the following steps: Obtain historical output data of each distributed power source in the virtual power plant within a preset historical time window; By constructing a pre-built power output prediction model for each distributed power source, and taking the historical power output data of the corresponding distributed power source as input, the model outputs the predicted power output value sequence and its predicted power output variance for the corresponding distributed power source in the future prediction period. The predicted power output sequences are superimposed at the same time point to obtain a comprehensive predicted power output sequence. A distributed power generation power output prediction curve is formed based on the comprehensive predicted power output sequence. At the same time, the power output confidence interval is obtained based on the comprehensive power output variance obtained by superimposing the variances of each predicted power output.
[0011] Furthermore, step S3 also includes obtaining the day-ahead market clearing price forecast sequence for the future forecast period, specifically: obtaining the historical day-ahead market clearing prices within a preset historical time window; The pre-built day-ahead market-clearing price model is used to predict and output the day-ahead market-clearing price forecast series for the future forecast period based on historical day-ahead market-clearing prices.
[0012] Furthermore, the objective function of the constrained optimization model is: ; The application capacity constraint is as follows: ; The deviation assessment risk constraint is as follows: ; ; Where T represents the number of transaction time points in the predicted future period. The market clearing price before the forecast date at the t-th trading time point in the future forecast period. The declared electricity volume at the t-th transaction time point within the predicted future period. The expected deviation assessment cost at the t-th transaction time point; The maximum electricity sales volume stipulated by the market. The maximum purchase volume stipulated by the market; The net load curve represents the predicted electricity consumption at the t-th transaction time point within the future forecast period. The confidence level quantiles of the standard normal distribution. To preset the credit level, B represents the uncertainty in the net load confidence interval, and B is the market-acceptable percentage of deviation. Based on the constraints of declared capacity and deviation risk, the objective function of the constraint optimization model is solved to obtain the optimal solution of the declared electricity volume at each trading time point in the future forecast period, thereby generating the day-ahead market trading strategy.
[0013] This invention also provides a virtual power plant load forecasting and trading strategy optimization system, comprising: The data acquisition module acquires the first multi-dimensional heterogeneous data within a preset historical time window; The prediction and correction module generates a baseline electricity load prediction curve for the future prediction period based on the first multivariate heterogeneous data using a preset baseline electricity load prediction model, and detects whether there are predefined extreme event triggering conditions in the future prediction period. If yes, the type of the triggered extreme event is obtained based on the existing extreme event triggering conditions. Candidate historical similar cases are matched from the historical prediction case library based on the matched extreme event type. Based on the candidate historical similar cases, a deviation correction value and a deviation confidence interval are generated. The benchmark electricity load prediction curve is then corrected to obtain the final electricity load prediction curve and its confidence band. If no, the benchmark electricity load prediction curve is used as the final electricity load prediction curve, and a confidence band is generated based on the historical prediction error distribution on the validation set of the benchmark electricity load prediction model. The net load assessment module obtains the net load curve and its net load confidence interval for the future forecast period based on the final electricity load forecast curve and its confidence band. The strategy generation module generates day-ahead market trading strategies by using a constraint optimization model constructed based on the net load curve and its net load confidence interval, combined with the declared capacity constraint and the deviation assessment risk constraint.
[0014] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention, based on the benchmark prediction curve generated by the benchmark electricity load prediction model, further adds an active detection mechanism for extreme event triggering conditions. By matching multi-source early warning information with a pre-built extreme event feature library, the system has the ability to identify extreme events that are "lacking sufficient representation in historical data" in advance. When an extreme event triggering condition is detected, the system matches the historical case most similar to the current extreme event type and early warning information from the historical prediction case library. Based on the historical prediction deviation curves of these cases, the system calculates the deviation correction value and deviation confidence interval by weighting, and quantitatively superimposes the correction value onto the benchmark prediction curve for correction. This effectively makes up for the technical defects of the prediction model in the prior art that the extrapolation ability under extreme scenarios is insufficient, and improves the prediction accuracy under extreme event scenarios. This invention further transforms the modified final electricity load forecast curve and its confidence band into a net load curve and its net load confidence interval, which are then used as input to a constrained optimization model. This model not only requires that the deviation between the declared electricity volume and the net load forecast value not exceed the market-allowed exemption ratio, but also introduces a statistical constraint that considers the probability distribution of prediction errors to account for the uncertainty of net load forecasting. When making a declaration decision, instead of simply setting the declared volume near the forecast value, an additional "safety margin" proportional to the prediction uncertainty is reserved on top of the forecast value. This ensures that even with a certain deviation in the forecast, the actual electricity consumption still has a high probability of falling within the exemption range, achieving an optimal balance between maximizing transaction revenue and minimizing deviation assessment risk. Attached Figure Description
[0015] The accompanying drawings, which are incorporated in and form part of this specification, are used to illustrate the implementation process of the invention and to fully explain the technical principles of the invention in conjunction with the specification.
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0017] Figure 1 This is a flowchart of a virtual power plant load forecasting and trading strategy optimization method according to the present invention; Figure 2 This is a flowchart illustrating the generation of the baseline electricity load prediction curve in the method of this invention. Figure 3 This is a flowchart illustrating the generation of the deviation correction value and the deviation confidence interval in the method of this invention. Figure 4 This is a structural block diagram of a virtual power plant load forecasting and trading strategy optimization system according to the present invention. Detailed Implementation
[0018] 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 a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0019] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative positional relationship and movement of each component in a certain specific posture (as shown in the figure). If the specific posture changes, the directional indication will also change accordingly.
[0020] Furthermore, the use of terms such as "first" and "second" in this invention is for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined with "first" and "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but only on the basis of being achievable by those skilled in the art. When the combination of technical solutions is contradictory or impossible to implement, such a combination of technical solutions should be considered non-existent and not within the scope of protection claimed by this invention.
[0021] Example 1 See Figure 1 As shown, the present invention provides a method for virtual power plant load forecasting and trading strategy optimization, which specifically includes the following steps: S1. Obtain the first multi-dimensional heterogeneous data within the preset historical time window; S2. Based on the first multi-source heterogeneous data, generate a baseline electricity load forecast curve for the future forecast period using a preset baseline electricity load forecast model, and detect whether there are predefined extreme event triggering conditions in the future forecast period: If so, the type of extreme event triggered is obtained according to the existing extreme event triggering conditions. Candidate historical similar cases are matched from the historical prediction case library according to the matched extreme event type. Based on the candidate historical similar cases, deviation correction values and deviation confidence intervals are generated. Then, the benchmark electricity load prediction curve is corrected to obtain the final electricity load prediction curve and its confidence band. If not, the baseline electricity load forecast curve is used as the final electricity load forecast curve, and a confidence band is generated based on the historical forecast error distribution on the validation set of the baseline electricity load forecast model. S3. Obtain the net load curve and net load confidence interval for the future forecast period based on the final electricity load forecast curve and its confidence band. S4. Generate a day-ahead market trading strategy by using a constraint optimization model constructed based on the net load curve and its net load confidence interval, combined with the declared capacity constraint and deviation assessment risk constraint.
[0022] This solution, based on the benchmark prediction curve generated by the benchmark electricity load prediction model, further detects whether there are predefined extreme event triggering conditions in the future prediction period. This enables the virtual power plant's load prediction system to have the ability to actively perceive extreme events, no longer relying solely on historical statistical patterns for extrapolation prediction. Instead, it can pre-identify extreme events that may occur in the future period but are not adequately represented in historical data. When extreme event triggering conditions are detected, the corresponding deviation correction value is calculated and the benchmark prediction curve is corrected. This quantitatively incorporates the expected impact of extreme events on future loads into the final prediction result. Compared with the technical defects of existing prediction models that cannot cope with extreme events, this invention realizes the correction of load prediction deviations under extreme scenarios, effectively improving the prediction accuracy under extreme event scenarios.
[0023] Meanwhile, the final electricity load forecast curve, corrected for extreme events, is used as the input for the day-ahead market trading strategy. Because the final electricity load forecast curve has higher accuracy under extreme event scenarios, it effectively avoids a series of trading risks caused by inaccurate load forecasts due to extreme events in existing technologies—including insufficient electricity purchases and resulting high real-time balancing costs due to underestimating load, and redundant electricity purchases and resulting revenue losses due to overestimating load.
[0024] In step S1, the virtual power plant needs to integrate data from different data sources, time scales, and formats to lay the foundation for subsequent prediction and optimization. The length of the preset historical time window is configurable; for example, historical data from the past 30 days can be used for day-ahead prediction.
[0025] Specifically, in step S1, the first multi-dimensional heterogeneous data includes, but is not limited to, electricity load data and meteorological data, etc.
[0026] Electricity load data refers to the active power, reactive power, and power factor consumed by the user side (including industrial, commercial, and residential users) covered by the virtual power plant during actual operation. It is the basis for load forecasting and a key basis for formulating electricity purchase / sale strategies.
[0027] Specifically, the electricity load data is acquired by using an electricity monitoring terminal installed on the user side to obtain the electricity load data within a historical time window at a preset sampling frequency. The electricity load data includes active load sequence, reactive load sequence, and power factor sequence.
[0028] Meteorological data is acquired by retrieving historical time-window meteorological data from external meteorological service systems via application programming interfaces.
[0029] In step S2, the baseline electricity load prediction model adopts a sequence-to-sequence model based on an encoder-decoder architecture and introduces an attention mechanism to capture key time point dependencies in long-term series.
[0030] The training steps for the baseline electricity load prediction model include: Training sample acquisition: After obtaining a continuous time interval of first multivariate heterogeneous data from the historical database and performing data preprocessing, the sliding window method is used to construct training samples, and the training samples are divided into training set, validation set and test set in time order. Forward propagation computation: An input sequence from the training set is input into the baseline electricity load prediction model, and then passes through the embedding layer, encoder layer, attention layer and decoder layer in the baseline electricity load prediction model in sequence to calculate the predicted load output sequence; Loss function calculation: The error between the predicted load output sequence and the corresponding actual load sequence is calculated using a preset loss function; Backpropagation and parameter update: Gradient descent optimization is performed using an adaptive moment estimation optimizer. In one training cycle, the entire training set is traversed, the average loss is calculated, and then backpropagation is performed to update the model parameters using the Adam algorithm. Training Stop: After each training cycle, calculate the model's loss value on the validation set. If the loss value does not decrease for a consecutive preset training cycle, stop training and select the model parameters corresponding to the training cycle with the smallest loss value.
[0031] See Figure 2 As shown, in step S2, the generation of the baseline electricity load forecast curve for the future forecast period specifically includes the following steps: Sa21. The first multivariate heterogeneous data is preprocessed to form the input feature matrix; Sa22. Input the input feature matrix into the baseline electricity load prediction model. The encoder performs forward calculation to obtain the hidden state sequence. The decoder takes the last hidden state in the hidden state sequence as the initial state and the hidden state sequence as the key-value pair of the attention layer to start recursively generating until the predicted load value in the future prediction period is generated. Sa23. The predicted load values are de-standardized to obtain predicted load values with actual physical dimensions, forming a baseline electricity load prediction curve.
[0032] The data preprocessing specifically includes: data cleaning (removing duplicate records and verifying data format and physical rationality); missing value handling (isolated missing points are filled with linear interpolation, and continuous missing segments are filled with cubic spline interpolation or discarded); outlier detection and correction based on the 3σ criterion and physical boundaries; scaling all numerical features to the [0,1] interval using min-max normalization; aligning and concatenating all preprocessed feature data with a uniform time resolution to form an input feature matrix of dimension [T,F], where T is the total number of sampling points within the historical time window and F is the total number of feature dimensions.
[0033] In step S2, it is detected whether there are predefined extreme event triggering conditions in the future prediction period, which specifically includes the following steps: Sb21. Obtain a pre-built extreme event feature library and obtain early warning information within a future prediction time window. The extreme event feature library contains triggering rules for various extreme event types. Sb22. The warning information is queried and matched with the triggering rules of each extreme event type in the extreme event feature library. If any triggering rule is successfully matched, it is determined that there are predefined extreme event triggering conditions in the future prediction period.
[0034] The early warning information includes, but is not limited to, meteorological disaster early warning information, power grid operation status alarm information, and user-side anomaly reporting information, etc.
[0035] Meteorological disaster early warning information is obtained by requesting meteorological disaster forecasts for the geographical area under the jurisdiction of this virtual power plant within the future forecast period window through the meteorological API interface.
[0036] Power grid operation status alarm information is obtained through the power dispatch data network to obtain abnormal operation status of the power grid within a future forecast period window.
[0037] Abnormal reporting information from the user side can be obtained by accessing the aggregated reporting information within the future forecast period window through the virtual power plant APP or user portal.
[0038] It should be noted that if the maintenance / abnormal period corresponding to a power grid alarm or user anomaly report falls within the target prediction window, then such alarm or report information will be included in the prediction window's early warning information category.
[0039] The extreme event types include, but are not limited to, typhoons, power grid failures, sudden drops in industrial load, and sudden increases in industrial load.
[0040] Each type of extreme event has a minimum qualifying condition, i.e., a triggering rule. If the minimum qualifying condition for a certain extreme event type is met based on the warning information within the future time window, then it matches the triggering rule for that extreme event type.
[0041] For example, the triggering rules for a typhoon passing through may include the meteorological warning level and the warning wind speed; the triggering rules for a power grid fault may include the fault level (such as a fault level issued by the power grid dispatching system reaching level two or above of the "Guidelines for the Safety and Stability of Power Systems"); the triggering rules for a sudden drop / surge in industrial load may include the load change rate, etc.
[0042] For example, in the extreme event feature database, the triggering rules for the extreme event type of typhoon passage are: 1. The meteorological warning level must be at least yellow; 2. The predicted wind speed on the typhoon path must be greater than or equal to 25 m / s. If the meteorological disaster warning information obtained through the meteorological data interface within the future forecast window contains the following information: warning type is typhoon warning, warning level is yellow, and the predicted maximum wind speed is 28 m / s, then it indicates that there are extreme event triggering conditions matching the extreme event type of typhoon passage within the future forecast period.
[0043] See Figure 3 As shown, in step S2, the generation of the deviation correction value and its deviation confidence interval specifically includes the following steps: Sc21. Extract historical cases from the historical prediction case library that are identical to the extreme events that match the future prediction period, and record them as the first similar cases. Each historical case in the historical case library contains the following fields: the matched historical extreme events, historical early warning information, and historical load prediction deviation curve. Sc22. Analyze the structured similarity between the early warning information within the future prediction time window and the historical early warning information of each first similar case, and select the first similar case with the largest structured similarity as the second similar case. Sc23. Based on the ratio of the structured similarity corresponding to the second similar case to the sum of the structured similarities corresponding to all second similar cases, obtain the first weight of each second similar case; based on the historical load prediction deviation curve corresponding to each second similar case, obtain the mean deviation and standard deviation of each second similar case. Sc24. The deviation correction value is obtained by weighting and summing the first weights and mean deviations of each second similar case; the deviation confidence interval of the deviation correction value is calculated by combining the first weights and deviation standard deviations of each second similar case.
[0044] The historical forecast case library records all historical load forecast cases. The historical load forecast deviation curve of each historical case is calculated by comparing the corresponding historical actual load curve and the historical forecast load curve, that is, the historical actual load minus the historical forecast load at the same time point.
[0045] In step Sc22, the structured similarity is calculated as follows: Where Sim represents the structured similarity. The warning information is for the future prediction period window. For the historical warning information of the j-th first similar case, , , These are semantic vectors derived from meteorological disaster early warning information, power grid operation status alarm information, and user-side anomaly reporting information, respectively, after semantic encoding. , , All are preset weighting coefficients. .
[0046] In step Sc22, the structured similarity between the early warning information within the future prediction period window and the historical early warning information of the first similar case is analyzed. Specifically, the first semantic similarity between the meteorological disaster early warning information within the future prediction period window and the historical meteorological disaster early warning information of the first similar case is analyzed, the second semantic similarity between the power grid operation status alarm information and the historical power grid operation status alarm information is analyzed, and the third semantic similarity between the user-side abnormality reporting information and the historical user-side abnormality reporting information is analyzed. Then, the first semantic similarity, the second semantic similarity, and the third semantic similarity are weighted and averaged to obtain the semantic similarity between the early warning information within the future prediction period window and the historical early warning information of the corresponding first similar case.
[0047] It should be noted that if the number of first similar cases is less than the preset number, all first similar cases will be directly treated as second similar cases.
[0048] Specifically, the first semantic similarity is obtained by encoding the text of meteorological disaster warning information within the future prediction period window and the text of historical meteorological disaster warning information of the first similar case using a semantic coding model (such as BERT, ERNIE, etc.) to obtain corresponding semantic vectors. Then, the cosine similarity between the semantic vector of the meteorological disaster warning information within the future prediction period window and the semantic vector of the historical meteorological disaster warning information of the first similar case is used as the first semantic similarity. The second and third semantic similarities can be obtained similarly.
[0049] In step Sc23, the mean deviation of each second similar case is obtained according to the historical load forecast deviation curve corresponding to each second similar case. That is, the mean deviation of the historical load forecast deviation at each time point on the historical load forecast deviation curve corresponding to the second similar case is calculated to obtain the mean deviation of the second similar case. The standard deviation of the deviation is the standard deviation of the historical load forecast at each time point on the historical load forecast deviation curve corresponding to the second similar case.
[0050] In step Sc24, the deviation confidence interval is calculated as follows: ; Where CI is the bias confidence interval of the bias correction value generated based on candidate historical similar cases; PX is the bias correction value; The confidence level quantiles of the standard normal distribution; To preset the credit level; is the standard uncertainty of the deviation correction value, which measures the overall uncertainty of the deviation correction value. The larger the value, the more inconsistent the deviation conclusions between different historical cases or the greater the fluctuation within a single case, resulting in a lower certainty about the deviation correction value; N is the number of second similar cases. The first weight is the weight of the j-th second similar case; Let be the standard deviation of the j-th second similar case. It reflects the degree of fluctuation of the prediction deviation at different time points within the second similar case. It measures the stability and representativeness of a single case. If the standard deviation of a case is large, its reference value for the current prediction will have large random noise, which will increase the uncertainty of the final correction value. Let be the mean deviation of the j-th second similar case.
[0051] and That is, the lower and upper confidence bounds of the bias confidence interval CI; It measures the degree of consistency among multiple selected second similar cases. If the mean deviation of all selected second similar cases is highly concentrated around the deviation correction value PX, it means that these cases corroborate each other, have high consistency, and reduce uncertainty. Conversely, if the mean deviation of each case differs greatly from each other, it means that there is serious disagreement between the cases, and the confidence level of the deviation correction value PX is relatively low.
[0052] In step S2, the baseline electricity load prediction curve is corrected, specifically by adding the deviation correction value to the predicted load at each point in the baseline electricity load prediction curve to obtain the corrected predicted load. In the presence of predefined extreme event triggering conditions, the upper and lower boundaries of the confidence band of the final electricity load prediction curve are respectively the upper confidence bound of the baseline electricity load prediction curve plus the deviation confidence interval and the lower confidence bound of the baseline electricity load prediction curve plus the deviation confidence interval.
[0053] In step S2, if no predefined extreme event triggering conditions are detected in the future prediction period, the baseline electricity load prediction curve is used as the final electricity load prediction curve, and a confidence band is generated based on the historical prediction error distribution on the validation set of the baseline electricity load prediction model. This validation set is the validation set used during the training of the aforementioned benchmark electricity load prediction model; Each sample in the validation set is input into the trained benchmark electricity load prediction model to obtain the predicted value. The error between the predicted value and the corresponding true value is calculated. Then, the standard deviation of the error for all samples in the validation set at the same prediction time point is calculated. Finally, the standard uncertainty is obtained by averaging the standard deviations of each error. ; The upper boundary of the confidence band is the baseline electricity load forecast curve plus... The lower boundary is the baseline electricity load forecast curve minus .
[0054] In some embodiments, the cold start construction method for the historical prediction case library is as follows: In the initial deployment phase, when the number of historical cases matching the target extreme event type in the historical prediction case library is lower than a preset threshold, a case generation method based on physics simulation is used to expand the case library: For the target extreme event type, a first multivariate heterogeneous data is set for simulation. The first multivariate heterogeneous data is used to obtain the corresponding benchmark electricity load prediction curve through the benchmark electricity load prediction model. The power system load physical model is constructed based on the load characteristic parameters of the virtual power plant's jurisdiction to produce the corresponding simulated electricity load curve according to the simulated first multivariate heterogeneous data. The load deviation curve under the current extreme event condition is obtained by using the simulated electricity load curve and the benchmark electricity load prediction curve.
[0055] As the system operates, real-world extreme event cases are continuously collected to achieve gradual updates to the case library.
[0056] In step S3, the net load curve and its net load confidence interval for the future forecast period are obtained based on the final electricity load forecast curve and its confidence band. This specifically includes the following steps: S31. Obtain the output prediction curve of distributed power sources and its output confidence interval for the future prediction period; S32. Subtract the values at corresponding time points on the distributed power generation output prediction curve from the values at each time point on the final power load prediction curve to obtain the net load curve. The upper bound of the net load confidence interval is obtained by subtracting the lower bound of the output confidence interval from the upper bound of the confidence band of the final electricity load prediction curve, and the lower bound of the net load confidence interval is obtained by subtracting the upper bound of the output confidence interval from the lower bound of the confidence band of the final electricity load prediction curve.
[0057] In step S31, obtaining the distributed power generation output prediction curve and its output confidence interval for the future prediction period specifically includes the following steps: Sa31. Obtain historical output data of each distributed power source in the virtual power plant within a preset historical time window; Sa32. By constructing a pre-built power output prediction model for each distributed power source, and taking the historical power output data of the corresponding distributed power source as input, the model outputs the predicted power output value sequence and the predicted power output variance of the corresponding distributed power source in the future prediction period. Sa33. Superimpose the predicted power output value sequences at the same time point to obtain the comprehensive predicted power output value sequence. Form the distributed power generation power output prediction curve based on the comprehensive predicted power output value sequence. At the same time, obtain the power output confidence interval based on the comprehensive power output variance obtained by superimposing the variances of each predicted power output.
[0058] Distributed power generation output data refers to the actual power generation recorded and uploaded at certain time intervals during the operation of various distributed power sources (such as distributed photovoltaic power stations, distributed wind farms, gas turbines, fuel cells, etc.) aggregated by the virtual power plant.
[0059] In step Sa32, the power output prediction model adopts a long short-term memory network prediction model, which is trained using a large amount of historical power output data of the corresponding distributed power source as training samples, and outputs a sequence of predicted power output values with the same window length as the input data.
[0060] The output prediction model adopts an encoder-decoder architecture, including an input layer, an LSTM encoder layer, an attention layer, an LSTM decoder layer, and an output layer. The LSTM encoder layer consists of two stacked LSTM units, used to encode the input sequence into a hidden state sequence. The attention layer uses the hidden state sequence output by the encoder as the key and value, and the current hidden state of the decoder as the query, calculating the context vector through a scaled dot product attention mechanism. The LSTM decoder layer consists of one LSTM unit, using the hidden state of the encoder at the last time step as the initial state, and recursively generating the prediction sequence by combining it with the context vector output by the attention layer. The output layer is a fully connected layer that maps the hidden state output by the decoder to the predicted output value.
[0061] The training method for the output prediction model corresponding to each distributed power source is as follows: The sliding window method is used to construct training samples from the historical output data of the corresponding distributed power sources. The original historical output data in the training samples were preprocessed as follows: First, missing values were filled using linear interpolation; second, outlier detection and correction methods based on the 3σ criterion were used to replace outliers that exceeded the mean ± 3 times the standard deviation; finally, all feature data were scaled to the [0,1] interval using the min-max normalization method. The preprocessed training samples are divided into training set, validation set and test set; The corresponding output prediction model is trained using supervised learning on the training set. In each training cycle, the average loss is calculated by traversing the entire training set. Then, backpropagation is performed to update the model parameters using the Adam algorithm. After each training cycle, the loss value of the model on the validation set is calculated. If the validation set loss does not decrease for a preset number of consecutive training cycles, training is stopped, and the model parameters corresponding to the training cycle with the smallest validation set loss are selected as the final model parameters of the corresponding output prediction model.
[0062] Step S3 also includes obtaining the day-ahead market-clearing price forecast sequence for the future forecast period, specifically including the following steps: Sb31, obtain the historical market clearing price within the preset historical time window; Sb32. Using a pre-built day-ahead market-clearing price model, the system predicts and outputs a series of day-ahead market-clearing prices for future forecast periods based on historical day-ahead market-clearing prices.
[0063] The day-ahead market clearing price model also uses a long short-term memory network prediction model, which is trained with a large number of historical day-ahead market clearing prices as training samples, and outputs a day-ahead market clearing price prediction sequence with the same window length as the input data.
[0064] The training method for the day-ahead market clearing price model is the same as the training method for the power output prediction model described above.
[0065] The recent market clearing price, simply put, is the unified transaction price that is ultimately formed when the electricity spot market conducts centralized bidding for the next day's electricity one day in advance.
[0066] In step S4, the objective function of the constrained optimization model is:
[0067] The application capacity constraint is as follows:
[0068] The deviation assessment risk constraint is as follows: ;
[0069] Where T represents the number of transaction time points in the predicted future period. The market clearing price for the t-th transaction within the future forecast period is the market clearing price for the forecast date at the t-th transaction time point within the future forecast period. The declared electricity volume at the t-th transaction time point within the predicted future period. The expected deviation assessment cost at the t-th transaction time point; The maximum electricity sales volume stipulated by the market. The maximum purchase volume stipulated by the market; The net load curve represents the predicted electricity consumption at the t-th transaction time point within the future forecast period. The confidence level quantiles of the standard normal distribution. To preset the credit level, B represents the uncertainty in the net load confidence interval, and B is the market-acceptable percentage of deviation. Based on the constraints of declared capacity and deviation risk, the objective function of the constraint optimization model is solved to obtain the optimal solution of the declared electricity volume at each trading time point in the future forecast period, thereby generating the day-ahead market trading strategy.
[0070] Deviation assessment is a key system in electricity market transactions. Deviation refers to the difference between actual electricity consumption and declared electricity consumption. An allowable deviation range is set, within which the deviation is exempt from assessment. The portion exceeding the exemption range will be subject to a fine. Therefore, the constraint optimization model in this invention incorporates deviation assessment risk constraints to avoid making declarations based solely on predicted values.
[0071] Example 2
[0072] See Figure 4 As shown, the present invention also provides a virtual power plant load forecasting and trading strategy optimization system, specifically including: The data acquisition module acquires the first multi-dimensional heterogeneous data within a preset historical time window; The prediction and correction module generates a baseline electricity load prediction curve for the future prediction period based on the first multivariate heterogeneous data using a preset baseline electricity load prediction model, and detects whether there are predefined extreme event triggering conditions in the future prediction period. If yes, the type of the triggered extreme event is obtained based on the existing extreme event triggering conditions. Candidate historical similar cases are matched from the historical prediction case library based on the matched extreme event type. Based on the candidate historical similar cases, a deviation correction value and a deviation confidence interval are generated. The benchmark electricity load prediction curve is then corrected to obtain the final electricity load prediction curve and its confidence band. If no, the benchmark electricity load prediction curve is used as the final electricity load prediction curve, and a confidence band is generated based on the historical prediction error distribution on the validation set of the benchmark electricity load prediction model. The net load assessment module obtains the net load curve and its net load confidence interval for the future forecast period based on the final electricity load forecast curve and its confidence band. The strategy generation module generates day-ahead market trading strategies by using a constraint optimization model constructed based on the net load curve and its net load confidence interval, combined with the declared capacity constraint and the deviation assessment risk constraint.
[0073] Example 3
[0074] The present invention also provides an electronic device, including: a processor, a transmitting device, an input device, an output device, and a memory. The processor may be implemented using a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit, or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application. The memory may be implemented using a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM), and is used to store computer program code. The computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes a method as described in any of the above possible implementation methods.
[0075] Example 4
[0076] The present invention also provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a processor of an electronic device, cause the processor to perform a method as described in any of the above possible implementations.
[0077] In the description of this specification, the references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0078] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0079] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for virtual power plant load forecasting and trading strategy optimization, characterized in that, Includes the following steps: S1. Obtain the first multi-dimensional heterogeneous data within the preset historical time window; S2. Based on the first multi-source heterogeneous data, generate a baseline electricity load forecast curve for the future forecast period using a preset baseline electricity load forecast model, and detect whether there are predefined extreme event triggering conditions in the future forecast period: If so, the type of extreme event triggered is obtained according to the existing extreme event triggering conditions. Candidate historical similar cases are matched from the historical prediction case library according to the matched extreme event type. Based on the candidate historical similar cases, deviation correction values and deviation confidence intervals are generated. Then, the benchmark electricity load prediction curve is corrected to obtain the final electricity load prediction curve and its confidence band. If not, the baseline electricity load forecast curve is used as the final electricity load forecast curve, and a confidence band is generated based on the historical forecast error distribution on the validation set of the baseline electricity load forecast model. S3. Obtain the net load curve and net load confidence interval for the future forecast period based on the final electricity load forecast curve and its confidence band. S4. Generate a day-ahead market trading strategy by using a constraint optimization model constructed based on the net load curve and its net load confidence interval, combined with the declared capacity constraint and deviation assessment risk constraint.
2. The virtual power plant load forecasting and trading strategy optimization method according to claim 1, characterized in that, The first multi-dimensional heterogeneous data includes electricity load data and meteorological data.
3. The virtual power plant load forecasting and trading strategy optimization method according to claim 1, characterized in that, The generation of the baseline electricity load forecast curve for the future forecast period includes the following steps: The first multivariate heterogeneous data is preprocessed to form the input feature matrix; The input feature matrix is input into the baseline electricity load prediction model. The encoder performs forward calculation to obtain the hidden state sequence. The decoder uses the last hidden state in the hidden state sequence as the initial state and the hidden state sequence as the key-value pair of the attention layer to start recursively generating the predicted load value in the future prediction period. The predicted load values are de-standardized to obtain predicted load values with actual physical dimensions, forming a baseline electricity load prediction curve.
4. The virtual power plant load forecasting and trading strategy optimization method according to claim 1, characterized in that, Detecting whether predefined extreme event triggering conditions exist in the future prediction period includes the following steps: The system acquires a pre-built extreme event feature library and early warning information within a future prediction time window. The extreme event feature library contains triggering rules for various extreme event types. The early warning information includes meteorological disaster early warning information, power grid operation status alarm information, and user-side anomaly reporting information. The warning information is queried and matched with the triggering rules of each extreme event type in the extreme event feature library. If any triggering rule is successfully matched, it is determined that there are predefined extreme event triggering conditions in the future prediction period.
5. The virtual power plant load forecasting and trading strategy optimization method according to claim 1, characterized in that, The process of generating bias correction values and bias confidence intervals based on candidate historical similar cases specifically includes the following steps: From the historical prediction case library, extract historical cases that are identical to the extreme events that match the future prediction period, and record them as the first similar cases. Each historical case in the historical case library contains the following fields: the matched historical extreme event, historical early warning information, and historical load prediction deviation curve. The structured similarity between the early warning information within the future prediction time window and the historical early warning information of each first similar case is analyzed, and the first similar case with the largest structured similarity is selected as the second similar case. The first weight of each second similar case is obtained by the ratio of the structured similarity corresponding to the second similar case to the sum of the structured similarities corresponding to all second similar cases; the mean deviation and standard deviation of each second similar case are obtained by the historical load prediction deviation curve corresponding to each second similar case. The deviation correction value is obtained by weighting and summing the first weight and mean deviation of each second similar case; the deviation confidence interval of the deviation correction value is calculated by combining the first weight and deviation standard deviation of each second similar case.
6. The virtual power plant load forecasting and trading strategy optimization method according to claim 1, characterized in that, The net load curve and its confidence interval for the future forecast period are obtained based on the final electricity load forecast curve and its confidence band, specifically including the following steps: Obtain the output forecast curve of distributed power sources and its output confidence interval for the future forecast period; The net load curve is obtained by subtracting the value at the corresponding time point from the value at each time point on the final electricity load forecast curve. The upper bound of the net load confidence interval is obtained by subtracting the lower bound of the output confidence interval from the upper bound of the confidence band of the final electricity load prediction curve, and the lower bound of the net load confidence interval is obtained by subtracting the upper bound of the output confidence interval from the lower bound of the confidence band of the final electricity load prediction curve.
7. The virtual power plant load forecasting and trading strategy optimization method according to claim 6, characterized in that, Obtaining the distributed generation output forecast curve and its output confidence interval for the future forecast period specifically includes the following steps: Obtain historical output data of each distributed power source in the virtual power plant within a preset historical time window; By constructing a pre-built power output prediction model for each distributed power source, and taking the historical power output data of the corresponding distributed power source as input, the model outputs the predicted power output value sequence and its predicted power output variance for the corresponding distributed power source in the future prediction period. The predicted power output sequences are superimposed at the same time point to obtain a comprehensive predicted power output sequence. A distributed power generation power output prediction curve is formed based on the comprehensive predicted power output sequence. At the same time, the power output confidence interval is obtained based on the comprehensive power output variance obtained by superimposing the variances of each predicted power output.
8. The virtual power plant load forecasting and trading strategy optimization method according to claim 6, characterized in that, Step S3 also includes obtaining the day-ahead market-clearing price forecast sequence for the future forecast period, specifically: Obtain the market clearing price of the previous historical date within a preset historical time window; The pre-built day-ahead market-clearing price model is used to predict and output the day-ahead market-clearing price forecast series for the future forecast period based on historical day-ahead market-clearing prices.
9. The virtual power plant load forecasting and trading strategy optimization method according to claim 1, characterized in that, The objective function of the constrained optimization model is: ; The application capacity constraint is as follows: ; The deviation assessment risk constraint is as follows: ; ; Where T represents the number of transaction time points in the predicted future period. The market clearing price before the forecast date at the t-th trading time point in the future forecast period. The declared electricity volume at the t-th transaction time point within the predicted future period. The expected deviation assessment cost at the t-th transaction time point; The maximum electricity sales volume stipulated by the market. The maximum purchase volume stipulated by the market; The net load curve represents the predicted electricity consumption at the t-th transaction time point within the future forecast period. The confidence level quantiles of the standard normal distribution. To preset the credit level, B represents the uncertainty in the net load confidence interval, and B is the market-acceptable percentage of deviation. Based on the constraints of declared capacity and deviation risk, the objective function of the constraint optimization model is solved to obtain the optimal solution of the declared electricity volume at each trading time point in the future forecast period, thereby generating the day-ahead market trading strategy.
10. A virtual power plant load forecasting and trading strategy optimization system, employing the virtual power plant load forecasting and trading strategy optimization method as described in any one of claims 1 to 9, characterized in that, include: The data acquisition module acquires the first multi-dimensional heterogeneous data within a preset historical time window; The prediction and correction module generates a baseline electricity load prediction curve for the future prediction period based on the first multivariate heterogeneous data using a preset baseline electricity load prediction model, and detects whether there are predefined extreme event triggering conditions in the future prediction period. If yes, the type of the triggered extreme event is obtained based on the existing extreme event triggering conditions. Candidate historical similar cases are matched from the historical prediction case library based on the matched extreme event type. Based on the candidate historical similar cases, a deviation correction value and a deviation confidence interval are generated. The benchmark electricity load prediction curve is then corrected to obtain the final electricity load prediction curve and its confidence band. If no, the benchmark electricity load prediction curve is used as the final electricity load prediction curve, and a confidence band is generated based on the historical prediction error distribution on the validation set of the benchmark electricity load prediction model. The net load assessment module obtains the net load curve and its net load confidence interval for the future forecast period based on the final electricity load forecast curve and its confidence band. The strategy generation module generates day-ahead market trading strategies by using a constraint optimization model constructed based on the net load curve and its net load confidence interval, combined with the declared capacity constraint and the deviation assessment risk constraint.
