A method for optimizing multi-stage energy regulation of a virtual power plant

By employing a multi-stage energy regulation method for virtual power plants, utilizing scheduling models, MPC methods, and penalty allocation mechanisms, the problem of balancing the interests of virtual power plants under renewable energy fluctuations was solved, thereby improving producer-consumer revenue and the market competitiveness of VPPs.

CN121813370BActive Publication Date: 2026-07-21STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
STATE GRID ZHEJIANG ELECTRIC POWER CO MARKETING SERVICE CENT
Filing Date
2026-03-06
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

When faced with fluctuations in renewable energy output, virtual power plants struggle to balance the interests of producers and consumers (VPPs), leading to increased market assessment costs and impacting producer and consumer revenue as well as the market competitiveness of VPPs.

Method used

A method for optimizing the multi-stage energy regulation of virtual power plants is adopted. This method balances the interests of all parties and reduces market assessment costs by using a day-ahead scheduling model and producer-consumer iterative contracts, a real-time MPC method to adjust the electricity consumption curve and energy storage strategy, and a penalty allocation mechanism in the future stage.

Benefits of technology

Effectively coordinate the economic dispatch needs of producers and consumers with VPPs, reduce imbalanced power adjustments, increase the enthusiasm of producers and consumers to participate, incentivize the accuracy of forecast output, reduce market assessment costs, and enhance the market competitiveness of VPPs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121813370B_ABST
    Figure CN121813370B_ABST
Patent Text Reader

Abstract

The application discloses a kind of for optimizing virtual power plant multistage energy regulation and control method, to solve the fluctuation caused by power supply uncertainty, impact producer, VPP and power market, the insufficient of affecting the benefits of all parties.The present application includes day-ahead stage, real-time stage and day-after stage, adopts internal electricity price based on supply-demand relationship and carbon emission difference period, combined with the cost source and CVaR of each producer and consumer, carries out controlled risk bidding, based on scheduling model, according to the MPC method of reducing time window, regulation and control strategy, and in day-after stage, to the producer and consumer who is excessively large deviation is punished, can overall plan the advantage between each producer and consumer, smooth the fluctuation of renewable energy actual output, better balance the interests of each producer and consumer and VPP operator, reduce market assessment fee, improve the income of producer and consumer and the market competitiveness of VPP.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of virtual power plant technology, and more specifically, to a method for optimizing the regulation of multi-stage energy in a virtual power plant. Background Technology

[0002] A virtual power plant (VPP) is a power system composed of multiple production units (such as generation units, energy storage units, and load units). Its goal is to meet electricity demand and optimize costs by coordinating the production and consumption of different units. VPPs play an important role in the electricity market, providing users with a stable power supply.

[0003] Currently, new power system operators, represented by virtual power plants (VPPs), have a strong desire to participate in market transactions. On the one hand, the resources within their jurisdictions are typically complementary and flexible, allowing them to reduce their operating costs by rationally formulating market participation strategies. On the other hand, the market regulates its operation through a series of rules to ensure the stability and reliability of both supply and demand sides of the system. Although various methods can be used to anticipate and characterize market uncertainties, VPPs still need to address the uncertainties arising from fluctuations in actual renewable energy output during actual operation. Considering the cooperative relationship between VPPs and aggregated prosumers, these uncertainties will impact the real-time operation plans of prosumers and indirectly affect the real-time electricity trading between intermediary VPPs and the electricity market, ultimately leading to market assessment fees for VPP operators due to unbalanced electricity volumes.

[0004] Based on this, this application aims to provide a method for optimizing the multi-stage energy regulation of virtual power plants, smoothing out fluctuations in the actual output of renewable energy, better balancing the interests of various prosumers and VPP operators, reducing market assessment costs, and improving the revenue of prosumers and the market competitiveness of VPPs. Summary of the Invention

[0005] This invention overcomes the shortcomings of fluctuations caused by power supply uncertainty in the benefits of producers, consumers, virtual power plants (VPPs), and the electricity market. It provides a method for optimizing the multi-stage energy regulation of virtual power plants, which can smooth out fluctuations in the actual output of renewable energy, better balance the interests of various producers and consumers and VPPs, reduce market assessment costs, and improve the benefits of producers and consumers and the market competitiveness of VPPs.

[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0007] A method for optimizing multi-stage energy regulation in a virtual power plant includes the following time-series steps:

[0008] A. Day-ahead phase: Establish a scheduling model, iteratively reach contracts with producers and consumers based on the scheduling model, formulate bidding strategies based on the total electricity purchase and sale demand of producers and consumers generated by the contracts, and submit bids to the electricity trading market.

[0009] B. Real-time stage: Accept the unbalanced electricity reported by producers and consumers, establish an MPC method based on a reduced time window, and adjust the actual electricity consumption curve and the charging and discharging strategy of its own energy storage system with the goal of minimizing real-time costs in order to minimize the deviation between real-time electricity consumption and bidding.

[0010] C. Subsequent Stages: When the deviation between real-time power consumption and the bid exceeds the threshold. At that time, a portion of the real-time costs generated are allocated to the prosumers. The real-time operating cost is the difference between the actual operating cost and the simulation cost generated based on the prosumers' performance of the electricity purchase and sale contract.

[0011] As a preferred option, the scheduling model includes modeling the cost sources for each producer and consumer. The modeling includes the costs and constraints of the cost sources, which include power generation and energy storage equipment, load, and electricity and carbon trading costs.

[0012] As a preferred option, the dispatch model includes establishing an internal electricity price based on the external electricity price and the supply and demand relationship, wherein the supply and demand relationship includes the supply and demand relationship between various producers and consumers within the virtual power plant and the supply and demand relationship between the virtual power plant and the electricity market.

[0013] As a preferred option, internal electricity prices are also affected by differences in carbon emissions at different times.

[0014] As a preferred approach, contracts reached iteratively with prosumers based on scheduling models include:

[0015] Step 1: Generate an initial internal electricity price based on the scheduling model and distribute it to each producer and consumer;

[0016] Step 2: Each producer and consumer formulates the day-ahead optimal dispatch plan based on the issued internal electricity price, and then reports the electricity trading plan for each time period.

[0017] Step 3: Receive electricity trading plans reported by each producer and consumer, update internal electricity prices, and reissue them;

[0018] Step 4: Iterate through Step 1 and Step 2 until a contract is reached with each producer and consumer.

[0019] Compared with the prior art, the beneficial effects of the present invention are:

[0020] (1) Prosumers can benefit from cooperation with VPP operators, and their economic dispatch needs and source-load uncertainties can be resolved through the proposed internal electricity price method and VPP operators’ real-time imbalance electricity compensation; (2) VPP operators’ day-ahead bidding strategy effectively coordinates day-ahead and real-time electricity price scenarios. By utilizing the internal purchase and sale price difference and the complementary nature of prosumers’ energy consumption characteristics, the adjustment amount of VPP’s overall imbalance electricity is reduced, the real-time operation of prosumers is simplified, and the enthusiasm of prosumers to participate in VPP aggregation is increased; (3) The internal electricity price is adjusted by combining SDR with equivalent carbon emissions, and under the influence of internal electricity price and dynamic grid carbon emission factor, it tends to achieve self-supply and demand balance; (4) The penalty allocation mechanism protects the interests of VPP operators and incentivizes prosumers to improve the accuracy of their source-load forecast output. Attached Figure Description

[0021] Figure 1 This is a diagram illustrating the relationship between the electricity market, VPP, and producers / consumers according to the present invention.

[0022] Figure 2 This is a framework diagram of the day-real-time-after-day control method of the present invention;

[0023] Figure 3 This is a flowchart of the allocation of fines according to the present invention;

[0024] Figure 4 These are four simulated wind and solar power output and load information graphs on typical days in the verification examples of this invention;

[0025] Figure 5 This is a classic power grid carbon emission factor curve of the present invention;

[0026] Figure 6 This is a graph showing the changes in operating costs during the day-ahead clearing process under different day-ahead market electricity price scenarios in the simulation examples of this invention;

[0027] Figure 7 This is an internal electricity price clearing diagram under different day-ahead market electricity price scenarios in the simulation examples of this invention;

[0028] Figure 8 and Figure 9 This is a scheduling plan diagram of four producers and consumers in the simulation example of this invention when settling accounts based on internal electricity prices and market electricity prices;

[0029] Figure 10 This is a day-ahead bidding curve of VPP operators in the simulation example of this invention, considering different market participants and the supply and demand of producers and consumers;

[0030] Figure 11 This is a diagram showing the expected real-time power consumption of VPP operators under four real-time electricity price scenarios in the simulation examples of this invention.

[0031] Figure 12 This is a schematic diagram of the real-time scheduling results of the VPP operator in the simulation example of this invention;

[0032] Figure 13 This is a schematic diagram illustrating the impact of different MPC runtime windows on VPP in the simulation example of this invention;

[0033] Figure 14 This is a graph showing the total electricity demand and supply curves of producers and consumers under different grid carbon emission factors in the simulation examples of this invention. Detailed Implementation

[0034] The present disclosure will be further described below with reference to the accompanying drawings and embodiments.

[0035] It should be noted that the following detailed descriptions are illustrative and intended to provide further explanation of this application. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains.

[0036] Example:

[0037] like Figure 2 As shown, a method for optimizing multi-stage energy control in a virtual power plant is divided into a day-ahead stage, a real-time stage, and a post-day stage, and includes the following steps performed along time:

[0038] A. Day-ahead phase: Establish a scheduling model, iteratively reach contracts with producers and consumers based on the scheduling model, formulate bidding strategies based on the total electricity purchase and sale demand of producers and consumers generated by the contracts, and submit bids to the electricity trading market.

[0039] B. Real-time stage: Accept the unbalanced electricity reported by producers and consumers, establish an MPC method based on a reduced time window, and adjust the actual electricity consumption curve and the charging and discharging strategy of its own energy storage system with the goal of minimizing real-time costs in order to minimize the deviation between real-time electricity consumption and bidding.

[0040] C. Subsequent Stages: When the deviation between real-time power consumption and the bid exceeds the threshold. At that time, a portion of the real-time costs generated are allocated to the prosumers. The real-time operating cost is the difference between the actual operating cost and the simulation cost generated based on the prosumers' performance of the electricity purchase and sale contract.

[0041] Corresponding to the day-ahead phase, a scheduling model is established, contracts are iteratively reached with producers and consumers based on the scheduling model, and bidding strategies are formulated based on the total power purchase and sales demand of producers and consumers generated by the contracts, and bids are submitted to the power trading market.

[0042] In the current phase, internal producer-consumer clearing and iterative trading contracts are implemented, while bidding is conducted in the external electricity market. The sequence in this embodiment is as follows: first, iterative trading contracts are implemented until the VPP reaches an electricity trading contract at the internal electricity price, and then bidding is conducted in the external electricity market.

[0043] The scheduling model is based on total cost, which includes all costs incurred by prosumers and consumers.

[0044] VPP knows the sources of prosumers' costs. VPP categorizes prosumers' costs into three types and models each one individually:

[0045] (1) Costs of power generation equipment and energy storage

[0046] Non-renewable energy generation, hereinafter referred to as MT, refers to equipment that generates electricity from non-renewable energy sources: The non-renewable energy generation output considered in this application is controllable.

[0047] Its cost expression is constructed as follows:

[0048]

[0049] And establish its constraints:

[0050]

[0051] In the formula This represents the MT operating cost of the nth prosumer (n in subsequent n-th n-th prosumer terms, which will not be explained further). For natural gas prices; Let t be the output power of the nth producer-consumer at time t (similarly, t hereafter refers to time t, and will not be explained in detail one by one). The time interval is 15 minutes in this embodiment; The efficiency of MT in converting natural gas into electricity; This represents the maximum output power of the MT. These represent the minimum and maximum ramp power of MT, respectively.

[0052] Energy storage systems experience wear and tear during the charging and discharging of energy. Energy storage batteries, for example, have a limited lifespan due to cycle life; both charging and discharging incur degradation costs.

[0053] Its cost expression is constructed as follows:

[0054]

[0055] And establish its constraints:

[0056]

[0057] This represents the ESS operating cost for the nth prosumer; The battery degradation cost factor for ESS per unit charge and discharge capacity; The charging and discharging power of the ESS of the consumer at time t; The definition is the same as above (the same symbols in the following text are assumed to have the same meaning, and those with different meanings will be specifically explained). This indicates the upper limit of the charging and discharging power of the nth ESS; ESSs cannot charge and discharge simultaneously (their product is 0). This represents the state of charge of the nth ESS; These represent the lower and upper limits of the ESS SoC, respectively; and These represent the charge and discharge efficiencies of the ESS. This represents the total energy storage capacity of the energy storage system. The state of charge (SoC) of the energy storage system (ESS) of the nth producer-consumer must be equal to its state of charge at the end of the scheduling period (t=T).

[0058] Electric vehicles:

[0059] Its cost expression is constructed as follows:

[0060]

[0061] And establish its constraints:

[0062]

[0063] In the formula The charging fees collected by consumers from EV owners through this model are negative;

[0064] The negotiated EV charging price; These represent the EV number and total number, respectively; Let m be the battery capacity of the m-th EV; and These represent the expected SoC state when the EV is unplugged from the charging station and the SoC state when it is plugged into the charging station, respectively. , These represent the charging and discharging power of the EV, respectively. and These represent the charge and discharge efficiencies of the EV. and These represent the start and end times of charging the m-th EV, respectively.

[0065] (2) Load

[0066] The load here specifically refers to the load with adjustable electricity consumption. Producers and consumers will also incur costs when changing their load to adapt to regulation. These costs will be considered here.

[0067] Specifically, the load includes IL (interruptible load) and TL (transferable load).

[0068] A typical scenario for IL (Industrial Power Utilization) is to directly reduce electricity consumption during periods of high electricity prices or high carbon emissions (such as peak output of thermal power on the power grid) by shutting down non-essential industrial equipment or air conditioning, thereby reducing electricity costs by reducing load and alleviating pressure on the power grid.

[0069] Its expression is:

[0070]

[0071] Its constraints are

[0072]

[0073] In the formula For the IL scheduling cost of prosumers; Cost coefficient for calling a unit of IL; This indicates the amount of load that has been reduced; The percentage of the original base load that can be cut at any given moment; These represent the beginning and end times of the allowed IL (In-Loop) call period. By considering IL modeling, the costs of switching on and off corresponding devices can be fully compared, thus achieving a global optimum. This represents the original (baseline) active power demand of the nth user's load at time t.

[0074] TL utilizes time-of-use pricing differences (such as lower prices during nighttime when wind power is abundant) to shift load to lower-price periods to reduce total electricity costs. However, this load shifting also incurs costs, expressed as follows:

[0075]

[0076] Its constraints are:

[0077]

[0078] In the formula For producer-consumer TL scheduling costs; Cost coefficient for calling unit TL; These represent the loads transferred in and out at time t, respectively. The percentage of the original base load that can be transferred in or out at any given time. This represents the original (baseline) active power demand of the nth user's load at time t.

[0079] (3) Costs of electricity trading and carbon trading

[0080] When prosumers engage in internal electricity trading with VPPs, costs are incurred based on the purchase and sale prices. The prosumer electricity trading cost is expressed as follows:

[0081]

[0082] Its constraints are:

[0083]

[0084] In the formula, Electricity transaction costs for producers and consumers; , These represent the purchasing and selling power of prosumers at time t, respectively. Let represent the purchase price and sales price of electricity within time t, respectively; The maximum transaction power of a single consumer at any given moment.

[0085] The internal electricity sales price and purchase price have already undergone carbon offsetting. The subsequent description of internal electricity prices will address the impact of carbon emission differences. During peak carbon emission periods, the internal electricity purchase price... Rising prices suppress electricity consumption by producers and consumers; during periods of low carbon emissions, internal electricity prices... The rate will be lowered to incentivize the consumption of clean energy.

[0086] In summary, the power balance that each producer and consumer needs to satisfy for each cost source is as follows:

[0087]

[0088] In the formula, Indicates wind power output. Indicates photovoltaic power. Indicates the energy storage discharge power. This indicates that the electric vehicle is discharging. Indicates active power. Indicates the energy storage charging power. This indicates the power of the electric vehicle's energy storage.

[0089] The power balance constraints of producers and consumers are equivalently transformed using the opportunity constraint method to characterize their source-load uncertainty. Within the framework of the opportunity constraint method, this can be expressed as follows:

[0090] In the formula, These represent net power generation and net load power, respectively. The confidence level for the power balance opportunity constraint.

[0091] The expression is:

[0092]

[0093] in, This indicates the battery's basic charge and discharge power. Indicates power curtailment / power reduction. This indicates the amount of load change. This indicates the total load power. The confidence level for the power balance opportunity constraint.

[0094] To accelerate the solution of nonlinear optimization problems with opportunity constraints, the opportunity constraint formula can be equivalently transformed into a deterministic constraint formula, as shown in the following expression:

[0095]

[0096] In the formula, Represents random variables The inverse function of CDF at a confidence level The value at that location.

[0097] Based on this, optimize the scheduling model for the day-ahead phase:

[0098] In the current phase, VPP operators are required to determine and publish internal electricity prices based on the overall power purchase and sale curves and carbon emissions reported by prosumers, using the internal electricity price formula proposed in this application. The revenue obtained by VPP operators through internal transactions is as follows: This indicates the revenue that VPP receives as a result:

[0099]

[0100] VPP operators formulate day-ahead optimal bidding strategies according to the settlement rules of the electricity market. Here, based on the predicted day-ahead market price and real-time price scenario set, a stochastic programming model is established. Its goal is to minimize the total expected cost of the day-ahead bidding stage. Its decision variables include day-ahead decision variables independent of the real-time price scenario and real-time decision variables dependent on the scenario. The probabilities of the real-time decision variables under a specific scenario are formulated according to the scenario set, where the decision variables are in the defined feasible region.

[0101] The expression for the stochastic programming model of the bidding problem is:

[0102]

[0103]

[0104]

[0105]

[0106]

[0107]

[0108]

[0109] In the formula, This is the cost of the bid submitted before the date. These are the day-ahead market electricity costs, real-time market electricity costs, penalty costs due to imbalanced electricity consumption, ESS usage costs, and carbon emission trading costs, excluding... The rest are all in the expected form.

[0110] These are the time index, the total number of scheduling periods, and the scheduling interval (the scheduling interval in the electricity market is set to 15 minutes; if it changes, this embodiment will also change accordingly). and These represent the electricity purchased and sold by the VPP operator in the day-ahead electricity market at time t, respectively. These are the day-ahead market purchase price and sales price of electricity at time t, respectively. These are real-time electricity price scenarios and scenario sets, For the scene The probability of occurrence. For the scene The power imbalance between purchase and sale at time t, i.e. the difference between the actual power purchased and sold and the day-ahead bid value. The correspondence between scenes can be obtained based on the correlation using the LSTM model, or it can be specified manually; this application does not impose any restrictions on this. Scenes The real-time purchase price and sales price of electricity at time t. This is the threshold for the deviation assessment ratio. This represents the penalty coefficient. For ESS cost coefficient, Scenes The charging / discharging power at time t. For the scene CEPs purchased and sold by VPP operators The CEP purchase price and selling price in the external carbon market.

[0111] VPPs optimize carbon trading costs and electricity market costs by minimizing total costs, thereby providing the best CEP purchasing plan.

[0112] In summary, the objective function for the day-ahead phase of the stochastic programming (SP) VPP can be obtained as follows:

[0113]

[0114] Its constraints are:

[0115]

[0116]

[0117]

[0118]

[0119] In the formula, S's maximum charge and discharge power For the scene The SoC of ESS at time t. This is the upper limit of the SoC. The charge and discharge efficiency of ESS. For the capacity of ESS, P is the maximum bidding power at a single moment; For the scene Regarding carbon emissions, this application assumes that when a producer-consumer or VPP operator sells electricity, its carbon potential is consistent with the carbon emission factor of the external power grid. In this case, the equivalent carbon emissions borne by the entity receiving this electricity can be calculated based on the sold power and the carbon emission factor. Furthermore, the accounting and regulation of carbon emission rights are calculated on a full-day timescale. Indicates the previous moment; This indicates the intensity of carbon dioxide emissions per unit of energy generated during charging and discharging; This represents the carbon dioxide emission intensity per unit of electricity obtained from the power grid at time t.

[0120] The bidding model for VPP operators described above can be written in the following compact form.

[0121]

[0122]

[0123]

[0124] in, c is the decision variable for the current day. x represents the deterministic cost, and c represents the corresponding cost weight. This corresponds to the day-to-day market bidding curve. These are scenario-dependent real-time decision variables, such as expected real-time power consumption and ESS charging / discharging power. These decision variables are related to and affected by specific real-time electricity pricing scenarios. The impact. Among them, express and The feasible domains are specifically defined as techno-economic constraints and power balance, energy storage charging and discharging limitations, etc.

[0125] The solution shown in the model can yield the bidding decision curve that minimizes the expected cost for VPP operators under various real-time electricity price scenarios. However, as mentioned earlier, such a solution may be overly optimistic because it ignores the potential for high electricity costs in unfavorable scenarios. To formulate a more reasonable bidding curve to mitigate market uncertainty, this application also introduces the CVaR risk criterion into the VPP operator's bidding model to characterize and mitigate risk. Therefore, the objective function can be modified to the following format:

[0126]

[0127] In the formula, This is the revised VPP operator bidding function. The VaR value is used to calculate the conditional risk value. For risk preference coefficient; when This means risk neutrality; the higher the value, the more VPP operators focus on risk costs. For confidence level equal to The CVaR value at that time can be obtained from the following CVaR calculation formula based on relevant theories:

[0128]

[0129] In the formula Represents mapping Used for calculation Exceeding the threshold The loss is zeroed out due to the negative difference.

[0130] It also involves introducing auxiliary variables. The expressions and constraints are as follows:

[0131]

[0132]

[0133] The internal electricity price is set as follows:

[0134] The internal electricity price can be quickly calculated based on the external market electricity price and the supply and demand relationship (SDR) within the VPP, without involving the game of interests of multiple parties. The detailed derivation process will be given below.

[0135] The SDR-based approach makes the following assumptions:

[0136] (1) When the internal SDR (hereinafter referred to as) When ) equals 0 (i.e., when there is no main entity selling electricity internally), the internal electricity price equals the external market electricity purchase price; (2) when At that time, the internal electricity sales price is inversely proportional to the external market electricity sales price; (3) when At that time, the internal electricity sales price is always equal to the external market electricity sales price.

[0137] When the value is 0, it means neither buying nor selling. When the value is less than 1 and greater than 0, it means that buying exceeds selling and supply is less than demand. When the value is greater than 1, it means that selling exceeds buying and supply is less than demand.

[0138] At the same time, it is assumed that the internal electricity sales price is... If the relationship is an inverse proportional function, then the following relationship can be obtained:

[0139]

[0140]

[0141]

[0142] N represents the set of all producers and consumers; This represents the ratio of the power sold to the power bought by all producers and consumers at that moment. Let t be the internal electricity price at time t, and a and b be the undetermined coefficients in the inverse proportional function. Let a be the selling price of electricity in the external market. From this, we can obtain the values ​​of a and b.

[0143] In some embodiments, for different To further discuss this in more detail and better reflect the relationship between the supply-demand ratio and internal electricity prices:

[0144] when In scenario 1, no electricity trading occurs within the VPP, and the internal electricity price is equivalent to the external price. The expression is:

[0145]

[0146] when (Scenario 2), at this time:

[0147]

[0148] In the formula It is an intermediate variable.

[0149] when (Scenario 3): At this time, This indicates that supply is less than demand, meaning that electricity needs to be purchased from external markets. This application first derives... The calculation method was then derived based on the principle of economy. At the same time, assume that when hour, This is because at this point, all internal electricity demand needs to be purchased by the VPP operator from the external market. Based on Scenario 2, the calculation method for the internal electricity price in this scenario is derived as follows:

[0150]

[0151]

[0152] At this time, a portion of the total electricity purchases by producers and consumers is... Purchased from electricity retailers, another portion... Purchased from external markets, the equation can be derived from the total cost of electricity purchase equaling the total revenue from electricity sales. The calculation formula is as follows:

[0153]

[0154] when (Scenario 4): Similar to the previous situation, for the sake of similar expression, let's assume... for The reciprocal of, when At that time, excess electricity will be sold to the external market by the VPP operator. It can be deduced that... Then calculate based on cost conservation , This indicates that the producer-consumer has no internal electricity demand; the electricity sold by the electricity-selling producer-consumer to the VPP operator will be at the market electricity price. For external sale, the expression is:

[0155]

[0156]

[0157] At this point, a portion of the electricity is purchased by electricity-purchasing producers at internal electricity prices, while the other portion is sold to the market at market prices. The total cost of purchasing electricity equals the total revenue from selling electricity, expressed as:

[0158]

[0159] In summary, if the internal supply and demand ratios are the same across different time periods, and the grid's purchase and sale prices are the same, then the internal electricity price will be the same. However, carbon emissions also need to be considered. The carbon emissions from the corresponding amount of electricity consumed differ across different time periods, so this intermediate variable must be taken into account. This is a crucial dividing point in the internal electricity price function, incorporating the impact of carbon emissions on pricing into the positioning process, as shown below:

[0160]

[0161] In the formula, For the adjustment function, this application selects the form of a power function. The coefficients of the adjustment function; Let be the equivalent carbon emissions of all producers and consumers at time t. Carbon emission factors for thermal power generation, Let be the carbon emission factor of the power grid at time t; This represents the maximum carbon emissions per day for all producers and consumers. and These represent the carbon emission factors for photovoltaics and metallurgical processes, respectively. This is the median value of the external market electricity price.

[0162] The standardized form of the pricing formula is as follows:

[0163]

[0164]

[0165]

[0166]

[0167]

[0168] In the formula, γ is an adjustment coefficient used to control the intensity of price adjustments.

[0169] like Figure 2 As shown, based on this price, the day-ahead electricity clearing process between producers and consumers is as follows:

[0170] (1) The VPP operator will distribute the predicted day-ahead market electricity price as the initial internal electricity price to all producers and consumers;

[0171] (2) Producers and consumers formulate day-ahead optimal dispatch plans based on internal electricity prices, and then report the electricity trading plans for each time period to the VPP operator;

[0172] (3) The VPP operator updates the internal electricity price according to the final form of the pricing formula and distributes the updated electricity price to each producer and consumer;

[0173] (4) Producers and consumers repeat steps (2) and (3).

[0174] (5) After multiple volume-price iterations between VPP operators and producers and consumers, producers and consumers can finally determine the scheduling plan for the next day, and the two parties can reach an agreement on an electricity trading contract.

[0175] The above steps generate the corresponding bids and ideal scheduling plans.

[0176] In the real-time phase, this embodiment establishes an MPC method based on a reduced time window. It accepts the unbalanced electricity consumption reported by producers and consumers, and adjusts the actual electricity consumption curve (ideal scheduling plan) and the charging and discharging strategy of its own energy storage system with the goal of minimizing real-time costs to minimize real-time electricity consumption and bidding deviations. Specifically, a day is divided into T scheduling time periods. At the k-th time period, the input to the real-time scheduling model is the real-time electricity price curve issued by the market, the VPP's own day-ahead bidding curve, and the short-term net load forecast value reported by producers and consumers. The model outputs a sequence of optimal scheduling decision variables for the remaining Tk time periods, but only the decision value of the first time period is executed. As k increases, the above process is repeated until k=T. This method has the advantages of fast convergence and high speed, enabling rapid adjustment of the actual electricity consumption curve and the charging and discharging strategy of its own energy storage system.

[0177] At time k, the VPP operator's objective function includes real-time electricity costs. Unbalanced electricity charges ESS usage cost CEP transaction costs The expression is:

[0178]

[0179]

[0180]

[0181]

[0182] in,

[0183]

[0184] The electricity market displays real-time electricity prices for the remaining time slots of the day, therefore, in the above formula... and This is known to the VPP operator. At time k during the real-time operation phase, the time window that the VPP operator considers when making decisions is... The operational constraints during this period are as follows:

[0185]

[0186]

[0187]

[0188]

[0189] In the formula, The net load deviation value reported by producer-consumer n is the predicted value at all times except for the current time when it is the actual value. Carbon emissions resulting from the real-time electricity costs of VPP. This is the carbon emission factor of ESS. These refer to the carbon allowances that VPPs can purchase and sell in the real-time market.

[0190] In later stages, this embodiment will address situations where the deviation between real-time power consumption and the bid exceeds a threshold. At that time, a portion of the real-time costs generated are allocated to the prosumers. The real-time operating cost is the difference between the actual operating cost and the simulation cost generated based on the prosumers' performance of the electricity purchase and sale contract.

[0191] like Figure 3 As shown, the allocation scheme references the idea of ​​the Shapley value-based allocation method, using bidirectional Shapley values ​​for fast approximate calculation. The detailed steps include:

[0192] Step 1: Initialize the matrix (dimension is) The matrix elements The meaning is the unbalanced electricity of the nth producer-consumer at time t. Let t=1, which is the net load prediction error, and establish the same matrix. ;

[0193] Initialize matrix zero matrix (dimension is) The matrix elements represent whether producer-consumer n needs to be allocated a penalty at time t, where 1 indicates allocation and 0 indicates no allocation; the actual real-time operating cost of the VPP operator on that day is... .

[0194] Step 2: Calculate the total unbalanced electricity volume of all producers and consumers at time t. If the ratio of this value to the total day-ahead transaction volume of producers and consumers at that time is within the range... If the condition is met, proceed to step 4; otherwise, proceed to step 3. Specifically, in this embodiment, The value is designed to be 0.05.

[0195] Step 3: Select as few as possible m prosumers, such that the ratio of the total unbalanced electricity of the remaining Nm prosumers to the total day-ahead transaction electricity of prosumers is within a certain range. Between; the matrix Set the corresponding values ​​of these m producers and consumers to 0, and set the matrix... Set the corresponding value of these m producers and consumers to 1; proceed to step 4.

[0196] Step 4: If If t = t + 1, proceed to step 2; otherwise, proceed to step 5.

[0197] Step 5: Assume the unbalanced electricity generated by producers and consumers in real time is a matrix. The element value in the table is used to execute the VPP real-time optimal scheduling method and calculate the actual real-time running cost at this time, denoted as . ; Proceed to step 6.

[0198] Step 6: Calculate the matrix and The Hadamard product is expressed as a matrix. Its elements The meaning is the unbalanced electricity that producer-consumer n needs to be fined at time t, matrix The sum of the absolute values ​​of each column element represents the total unbalanced electricity for which the producer-consumer needs to be fined; the total amount of fines received by the producer-consumer is... and The difference can be used to calculate the weighted average of the total unbalanced electricity to obtain the amount of fine allocated to each producer and consumer.

[0199] Verification example:

[0200] In this validation example, the effectiveness of the proposed method is verified through case studies and numerical simulations. The optimization models for prosumers and VPP operators are both written in the Python 3.7 programming language environment and solved by the commercial solver Gurobi 9.1. The GBRT-based quantile prediction method is implemented using the scikit-learn third-party toolkit in the Python environment.

[0201] For simulation parameter settings, this verification example considers four prosumers with different resource endowments for simulation, and their resource configurations are shown in the table below. The upper and lower limits of the ESS's SoC are set to 0.9 and 0.1, respectively.

[0202] like Figure 4 As shown, ( Figure 4 The ad values ​​represent the load, photovoltaic power generation, wind power generation, and net load, respectively. The cost sources (equipment) for each producer and consumer are configured as follows:

[0203] Prosumer equipment configuration: Prosumer 1: PV (Photovoltaic), WT (Wind), MT, ESS; Prosumer 2: PV, WT, MT, IL; Prosumer 3: PV, WT, IL, TL, EV; Prosumer 4: PV, WT, ESS. The simulation parameters are shown in the table below:

[0204]

[0205] The parameters and cost sources described above represent several typical prosumer profiles. The four prosumers have different operating characteristics: Prosumer 1 has a high daytime load and is equipped with ESS and MT to ensure power reliability; Prosumer 2 has a high nighttime load and is equipped with MT to ensure power supply; Prosumer 3 has two peak electricity consumption periods (midday and night) and is equipped with various flexible resources (such as EV and adjustable load); Prosumer 4 has relatively abundant renewable energy generation resources and a relatively small electricity load. Figure 5 The dynamic carbon emission factor on the grid side is demonstrated. To verify the effectiveness of the proposed pricing method, this verification example conducts internal pricing clearing experiments under four external market day-ahead electricity price scenarios. Figure 6 This diagram illustrates the changes in operating costs during the clearing process of electricity trading among producers and consumers in various scenarios. Figure 6 In the text, a to d correspond to consumers 1 to 4 respectively. Figure 6 Let 'ad' represent prosumers 1 through 4. Taking prosumer 1 as an example, its operating cost converges after approximately four iterations in each scenario. Simultaneously, there are two equilibrium states for the operating cost, attributed to the inverse relationship between the internal electricity price and the SDR (Sales-to-Demand Ratio). Specifically, when the internal electricity price decreases, prosumers tend to reduce the amount of electricity sold. This leads to a smaller SDR, which in turn causes the electricity price to rise. Therefore, the internal electricity purchase price and electricity sales price alternate between these two states according to the aforementioned pattern. In this verification example, the VPP operator can independently choose one of the two equilibrium states as the final clearing curve.

[0206] like Figure 7 The image shows the final internal electricity price curves under four day-ahead market electricity price scenarios. It can be seen that the internal purchase and sale electricity prices are more economical than market electricity prices. Figure 7 a to d represent day-ahead electricity price scenario 1, day-ahead electricity price scenario 2, day-ahead electricity price scenario 3, and day-ahead electricity price scenario 4, respectively.

[0207] like Figure 8 and Figure 9 As shown, the day-ahead dispatch plans of various producers and consumers are displayed, and a dispatch plan under a market electricity price settlement scenario is used for comparison. Figure 8 Subgraphs a to b represent the internal and market electricity price settlements for producer-consumer 1, respectively. Figure 8 Subgraphs c to d represent the internal and market electricity price settlements for producer-consumer 2, respectively. Figure 9 Subgraphs e to f represent the internal and market electricity price settlements for producer-consumer 3, respectively. Figure 9 Subgraphs g to h represent the internal and market electricity price settlements for producer-consumer 3, respectively. (Legend in the figure) This represents the electricity traded between the producer / consumer and the VPP operator. A value greater than 0 indicates that the producer / consumer purchased electricity from the VPP operator, while a value less than 0 indicates that the producer sold electricity to the VPP operator. For the operating power of ESS, This represents the actual load, i.e., the load value after considering IL reduction and TL transfer.

[0208] As a producer-consumer primarily engaged in electricity-consuming production, producer-consumer 1 makes appropriate adjustments to its optimal scheduling plan using its own resources. Figure 8 As shown in subgraph a, producer-consumer 1 prefers to purchase electricity during periods of low electricity prices (such as 2:00-3:00, 9:00-11:00, and 23:00-0:00) and store excess electricity in the ESS. Subsequently, producer-consumer 1 releases the electricity stored in the ESS during periods of high electricity prices to meet load demand.

[0209] For consumer 2, from Figure 8 As can be seen from subgraph c, the higher internal electricity prices encourage increased electricity sales, especially during the peak renewable energy generation period from 12:00 to 16:00. And... Figure 8 In subgraph d, when purchasing electricity directly from the electricity market, producer-consumer 2 implements a load-cutting strategy to reduce operating costs during the high purchase price period from 16:00 to 19:00. However, such an operation may reduce the satisfaction of load users. Conversely, such a load-cutting strategy does not occur when settling with internal electricity prices.

[0210] In Prosumer 3, the charging periods for EVs are distributed across various low-electricity-price periods to reduce costs. Simultaneously, the more economical internal electricity price allows Prosumer 3 to leverage the advantages of EVs as virtual energy storage. Figure 9 The subgraph shows that producers and consumers used EVs to sell electricity during periods of high electricity prices.

[0211] For Prosumer 4, although the difference in the amount of electricity sold is not significant under the two electricity pricing methods, the higher internal electricity price allows them to profit more. Furthermore, the price difference can be used for arbitrage, whereby Prosumer 4 purchases more electricity than currently needed and stores it in the ESS (Electric Power Savings Account), then sells it during periods of high electricity prices to profit.

[0212] In summary, intraday power clearing can reduce the operating costs of producers and consumers while preserving their unique characteristics. Furthermore, VPP operators leverage the diverse electricity consumption and generation characteristics of producers and consumers to indirectly facilitate cooperation among them.

[0213] Analysis of the two-stage scheduling results of VPP operators: As an aggregator of various distributed resources, VPP can conduct bidirectional power trading in the market. Figure 10 The results of VPP operators’ day-ahead tenders are shown under different market participant roles (role 1: both buyer and seller; role 2: buyer only) and different prosumer supply and demand scenarios. Figure 10a and b are schematic diagrams of roles 1 and 2 in supply and demand scenario 1, respectively; Figure 10 c and d are schematic diagrams of roles 1 and 2 in supply and demand scenario 2, respectively.

[0214] like Figure 10 As shown, the AD subgraphs correspond to scenarios 1-4 respectively. To more clearly illustrate the bidding strategy, four typical electricity purchase price curves from the real-time electricity price scenario are selected for explanation, namely: low price (example shown in the figure). ), mid-range price (example shown) High price (example shown) ) and extremely high prices (example shown) In addition, the market assessment threshold ratio parameter in the bidding model. The value was set to 0 during the simulation, and its impact will be discussed later. The figure also shows the expected power consumption curves under the above four real-time electricity price scenarios to further illustrate the bidding strategy of VPP operators.

[0215] The difference between the current daytime electricity price and the real-time electricity price directly affects the bidding results. Figure 10 In subgraph 'a', the day-ahead bid volume is equal to the net demand within the VPP for most periods, such as 19:00-2:00 and 7:00-11:00, when the day-ahead price is lower than most possible real-time prices. During the period of 2:30-3:00, when the day-ahead price is lowest, the VPP operator chooses to increase the bid volume to the upper limit and store it in the ESS. Furthermore, when there is additional supply from producers and consumers but the day-ahead selling price is low, the VPP operator prefers to sell some of the volume and store the remainder in the ESS. When the day-ahead price is higher than most possible real-time prices, the VPP operator releases the volume stored in the ESS (e.g., during 16:00-18:00) or directly purchases volume in the real-time market to ensure supply and demand balance (e.g., during the period of 18:00-19:00 when the day-ahead bid volume is 0). The lower real-time price during the 18:00-19:00 period incurs a certain amount of imbalance penalty, but this is acceptable to the VPP operator. Similarly, given the higher day-ahead electricity price, VPP operators' bid volume for electricity is zero during the 4:45-6:00 time period. Figure 10 In subgraph b, VPP operators, acting as pure electricity buyers, adjusted their bidding strategies. For example, at 5:30, VPP operators reduced their electricity consumption in the real-time market to avoid penalties for imbalanced electricity supply. Overall, due to the relatively low net electricity supply from producers and consumers, VPP operators were unable to sell large quantities of electricity in either role, resulting in similar electricity bidding costs in both scenarios (1992.02 for Role 1 and 2002.76 for Role 2).

[0216] exist Figure 10 In the scenario of subgraphs c and d, prosumers are configured to produce more electricity, which allows VPP operators to engage in related market arbitrage operations. For example... Figure 10 As shown in sub-diagram c, VPP operators do not always sell electricity when producers and consumers have surplus electricity. For example, during the 10:30-11:30 period, this surplus electricity is stored in the ESS and sold during the high-price period of 12:30-13:30. Figure 10 The d-subplot shows that when acting solely as a power purchaser, even during periods of lower electricity prices, VPP operators choose to bid for electricity volumes not exceeding net demand, aiming to free up some ESS capacity to store potential power supply from prosumers. In terms of bidding costs, the bidding cost under Role 1 is lower than that under Role 2.

[0217] The real-time electricity consumption plan curves of VPP operators under the above four real-time electricity pricing scenarios are as follows: Figure 11 As shown, the main difference is most evident during the 15:00-18:00 period. During this period, VPP operators choose to purchase electricity when electricity prices are low (e.g., 15:00-17:15 under real-time electricity price scenario 1, 17:00-18:00 under real-time electricity price scenarios 2 and 3, and 17:15-18:00 under real-time electricity price scenario 4), and use ESS discharge to meet electricity demand during the remaining time.

[0218] To illustrate the real-time scheduling results of VPP operators, Figure 12 shows the expected real-time power consumption curve during the day-ahead phase optimization as a reference. The total unbalanced power of producers and consumers is equal to the sum of their respective net loads. In the figure, positive values ​​of ESS power indicate discharging operations, and negative values ​​indicate charging operations. Figure 12 Subplot a represents the real-time power consumption curve, and subplot b represents the real-time charge and discharge curve of the ESS.

[0219] Considering the market's deviation assessment mechanism, this application will adjust the parameters during the simulation phase. Setting this to 0 allows for some margin in handling source-load uncertainty during the real-time phase. It can be seen that VPP operators can consume more electricity in the real-time market between 23:00 and 0:00 without incurring penalties, as the difference between real-time consumption and day-ahead bid electricity is within ±5% of the threshold. Furthermore, VPP operators can utilize this mechanism to consume more electricity than their day-ahead bid electricity and store the excess in the ESS without penalty, such as between 0:15 and 5:00, even though the total imbalance between producers and consumers is negative at this time. This excess electricity is then released between 5:15 and 11:30, because the imbalance is positive and the real-time price is higher, allowing VPP operators to avoid discrepancies between actual electricity consumption and day-ahead bid electricity.

[0220] Penalties incurred between 6:00 and 9:00 indicate that VPP operators increased actual power consumption to meet temporary loads from prosumers. The largest penalties occurred between 5:00 and 6:00 and at 16:45, as day-ahead bids were zero at these times. Simultaneously, VPP operators had to increase real-time market power consumption and incur penalties at 17:15 and 18:30, due to power imbalances between prosumers and their own ESS operations constrained by the SoC.

[0221] The above analysis highlights the importance and necessity of real-time rescheduling for VPP.

[0222] Based on this, the MPC method with a reduced time window allows VPP operators to dynamically adjust scheduling decisions to reduce overall costs.

[0223] Regarding parameters Analysis; This application will analyze the different simulations performed at the current stage. The impact of value settings on the operating costs of VPP operators is shown in the table below. It should be noted that when the market performs deviation assessment calculations in the real-time phase... It is still set at 5%. As can be seen from the table, =5% of the time is the lowest bid cost, which is due to the market's bias assessment mechanism. For example, assuming the electricity demand at time k is 1000kWh, the VPP operator's bid electricity is 1000kWh ( =0) and 952.38kWh ( When ε = 5%, consuming 1000 kWh of electricity during the real-time phase will not incur penalties in either case, but the latter only requires paying the purchase cost of 952.38 kWh of electricity for the day-ahead bid. The operating cost table for VPP operators under different ε values ​​in its bidding model is as follows:

[0224]

[0225] like Figure 13 As shown, this application employs a reduced-time-window MPC method for real-time scheduling. Specifically, at time k, the optimization timescale covers the remaining Tk timeframes. As scheduling time k moves forward, the optimization timescale (window) continuously shrinks. To analyze the impact of the chosen time window length on MPC optimization performance, this application selects a series of fixed time windows H for simulation experiments and presents the operating costs and simulation computation times for VPP operators under these time windows. A fixed time window means that at scheduling time k, the VPP operator's optimization is geared towards the next H timeframes. As scheduling time k moves forward, the fixed-time-window MPC will eventually become a reduced-time-window method (because there are only 96 scheduling timeframes per day). Therefore, H=96 represents the result corresponding to the reduced-time-window MPC method used in this application.

[0226] Although H being between 48 and 72 is sufficient to balance operating costs and computation time, the overall computation time only increased from 10.6s to 15.4s, and the average time for each scheduling decision did not improve significantly, increasing from 0.11s to 0.16s. This is negligible for a daily scheduling timescale. Therefore, this application still adopts the MPC method of reducing the time window to minimize the operating costs of VPP operators.

[0227] When calculating the carbon emissions of prosumers, the carbon emission factor on the grid side is assumed to be a constant value, i.e., a static carbon emission factor. Therefore, this application analyzes the impact of static and dynamic carbon emission factors on prosumer scheduling. Figure 14 This diagram illustrates the total electricity purchase and sale demand of prosumers under two scenarios, along with the associated operating costs. Scenario 1 represents the static grid carbon emission factor, indicated by the purple horizontal line in the legend, while Scenario 2 represents the dynamic grid carbon emission factor, indicated by the green broken line in the legend. It is assumed that prosumers settle accounts at market electricity prices, and that these market prices are the same in both scenarios.

[0228] This shows that producers' electricity purchase and sale plans are directly influenced by the grid's carbon emission factor. During periods of high carbon emission factor, such as 11:00-18:00, producers reduced their electricity demand and increased their internal supply. Conversely, during periods of low carbon emission factor, such as 23:00-2:00, producers' adjustments were the opposite. These adjustments are similar to arbitrage in the electricity market, reducing their own carbon emissions or passing them on to downstream entities. This also indicates that when considering dynamic grid carbon emission factors, producers can save on carbon trading costs and overall operating costs.

[0229] As shown in the table below, from the perspective of the power grid, periods with high carbon emission factors typically indicate a higher proportion of thermal power generation and greater total load demand from users. Therefore, dynamic carbon emission factors can guide users' electricity consumption behavior, such as prosumers. Their scheduling adjustments can alleviate the power grid's supply pressure and reduce pollution from thermal power generation. During periods with low carbon emission factors, prosumers can help fill load troughs, reducing waste in electricity production. In summary, dynamic grid carbon emission factors should be considered and implemented to incentivize prosumers to adjust their electricity consumption not solely based on electricity price changes.

[0230] In the first phase, internal electricity pricing is based on both supply and demand and carbon emissions, with carbon costs already incorporated into the price and implicitly passed on through purchase and sale. Simultaneously, the dispatch model also handles the purchase and sale of carbon allowances, achieving explicit transmission. In the second phase, pricing is based on real-time carbon emission factors. This enables dynamic adjustments to electricity purchases and ultimately guides producers and consumers to prioritize the dispatch of internal renewable energy sources, reducing reliance on external high-carbon electricity. The following table compares the operating costs of producers and consumers under different grid carbon emission factor scenarios:

[0231]

[0232] This validation example compares the proposed method with two existing energy management frameworks to highlight its economic advantages. The two comparison scenarios are described below:

[0233] Comparison Method 1: The aggregator is responsible for energy sharing management and operational safety among multiple prosumers. During the day-ahead scheduling phase, prosumers develop their own optimal scheduling plans, including the amount of electricity shared with other prosumers. During the real-time scheduling phase, prosumers reschedule the output of each device based on actual conditions, and must ensure that the amount of electricity shared with other prosumers remains constant.

[0234] Comparison Method 2: In the day-ahead phase, internal electricity transactions between producers / consumers and VPP operators are settled using the time-of-use pricing set by the latter. In the real-time phase, the producer / consumer's scheduled output remains unchanged, and any imbalance in electricity generated by net load forecasting is fully compensated by the VPP operator.

[0235] The comparative experiments above demonstrate that the proposed internal pricing method and real-time imbalance power compensation can balance the interests of various prosumers and VPP operators while ensuring that the interests of VPP operators are not harmed. The following table compares the operating costs of prosumers and the profits of VPP operators under the three methods:

[0236]

Claims

1. A method for optimizing multi-stage energy control in a virtual power plant, characterized in that, This includes the following steps performed over time: A. Day-ahead phase: Establish a scheduling model, iteratively reach contracts with producers and consumers based on the scheduling model, formulate bidding strategies based on the total electricity purchase and sale demand of producers and consumers generated by the contracts, and submit bids to the electricity trading market. B. Real-time Phase: Establish an MPC method based on a reduced time window, accept the unbalanced electricity reported by producers and consumers, and adjust the actual electricity consumption curve and the charging and discharging strategy of the energy storage system with the goal of minimizing real-time costs to minimize the deviation between real-time electricity consumption and the bid. The unbalanced electricity is the difference between the net load forecast value reported by producers and consumers and the day-ahead bid curve. The unbalanced electricity causes the real-time electricity consumption of the virtual power plant to deviate from the bid. The deviation increases the real-time cost due to the bidding regulations. Through the MPC method, the actual electricity consumption curve and the charging and discharging strategy of the energy storage system are adjusted to minimize costs. C. Subsequent Stages: When the deviation between real-time power consumption and the bid exceeds the threshold. At that time, the real-time costs generated are allocated to the producers and consumers. The real-time operating cost is the difference between the actual operating cost and the simulation cost generated based on the producers and consumers' performance of the electricity purchase and sale contract.

2. The method for regulating multi-stage energy in a virtual power plant according to claim 1, characterized in that, The scheduling model includes modeling the cost sources for each producer and consumer. The modeling includes the costs and constraints of the cost sources, which include power generation and energy storage equipment, load, and electricity and carbon trading costs.

3. The method for regulating multi-stage energy in a virtual power plant according to claim 2, characterized in that, The scheduling model includes establishing an internal electricity price based on the supply and demand relationship from the external electricity price.

4. The method for regulating multi-stage energy in a virtual power plant according to claim 3, characterized in that, Internal electricity prices are also affected by differences in carbon emissions at different times.

5. The method for regulating multi-stage energy in a virtual power plant according to claim 1, characterized in that, The steps involved in reaching a contract based on a scheduling model and iterative prosumer-consumer interaction include: Step 1: Generate an initial internal electricity price based on the scheduling model and distribute it to each producer and consumer; Step 2: Each producer and consumer formulates the day-ahead optimal dispatch plan based on the issued internal electricity price, and then reports the electricity trading plan for each time period. Step 3: Receive electricity trading plans reported by each producer and consumer, update internal electricity prices, and reissue them; Step 4: Repeat Step 1 and Step 2 until all producers and consumers reach an agreement and a contract is reached.

6. The method for regulating multi-stage energy in a virtual power plant according to claim 1, characterized in that, Developing a bidding strategy involves: establishing a stochastic programming model with the goal of minimizing the total expected cost during the day-ahead bidding phase. Its decision variables include day-ahead decision variables independent of the real-time electricity price scenario and real-time decision variables dependent on the scenario. Based on the scenario set, the probabilities of the real-time decision variables under a specific scenario are determined, wherein the decision variables are within a defined feasible region.

7. The method for regulating multi-stage energy in a virtual power plant according to claim 6, characterized in that, Developing a bidding strategy also includes integrating conditional risk criteria and refining the model based on the confidence level of risk preference coefficients and CVaR.

8. The method for regulating multi-stage energy in a virtual power plant according to claim 1, characterized in that, Based on several scheduling times in the electricity trading market, with each scheduling time having the same time window length, an MPC method is established, and an objective is set to minimize the sum of real-time market electricity purchase and sale costs, imbalance electricity penalty costs, energy storage device loss costs, and carbon emission rights trading costs. Constraints are also established, including internal and external electricity balance, energy storage device operation constraints, and carbon emission constraints.

9. A method for regulating multi-stage energy in a virtual power plant according to claim 8, characterized in that, The MPC method only optimizes decisions for future scheduling moments.

10. The method for regulating multi-stage energy in a virtual power plant according to claim 1, characterized in that, Methods for allocating real-time costs incurred to prosumers include: Settle the actual operating costs of the virtual power plant and the simulation costs arising from the purchase and sale of electricity by producers and consumers according to contracts at a threshold. The base difference is used as the total penalty; Construct a responsibility matrix to record the unbalanced electricity consumption of each prosumer at each time point, evaluate the proportion of unbalanced electricity consumption to the total electricity consumption at each time point, and select the prosumer with the minimum number of prosumers. The proportion of unbalanced electricity generated by the remaining producers and consumers should be lower than the threshold. ; Mark these consumers m as targets for fines; The deviation amount for each producer-consumer to be fined is extracted based on the responsibility matrix, and the fines are borne proportionally.