User type virtual power plant power dispatching optimization method and device based on grey wolf algorithm
By constructing a power supply and demand model and adopting an improved gray wolf algorithm, the problem of not including green certificate costs in the power purchase decision of virtual power plants was solved, thereby minimizing power purchase costs and improving market competitiveness.
Patent Information
- Application Number
- CN202511040095.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-25
- Publication Date
- 2025-11-14
AI Technical Summary
Existing virtual power plant power purchase decision models fail to fully consider compliance costs such as green electricity certificates, resulting in non-globally optimal optimization results. This makes it difficult to truly minimize the total power purchase cost of virtual power plants, thus limiting their market competitiveness.
A power supply and demand model for a user-type virtual power plant is constructed, and the power purchase cost is decomposed into medium- and long-term contract costs, spot market costs, green certificate trading costs, and demand response revenue. An improved gray wolf algorithm is used to solve the power purchase decision model. By embedding the real-time change rate of demand response elastic load and adaptively adjusting the convergence factor, the optimal power purchase plan is output.
This approach achieves a significant reduction in the electricity purchase cost for user-based virtual power plants while fulfilling the responsibilities of real-time power balance and green energy consumption, thereby enhancing their market competitiveness.
Smart Images

Figure CN120955663A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of power dispatching technology, specifically to a user-type virtual power plant power dispatching optimization method and device based on the Grey Wolf algorithm. Background Technology
[0002] In participating in the electricity market, user-based virtual power plants (VPS) typically need to simultaneously engage with multiple trading instruments, including the medium- and long-term market and the spot market, while coordinating the intermittent output of distributed power sources such as photovoltaics and the volatility of user loads. To maximize economic benefits, existing technologies have proposed several collaborative bidding strategies. For example, some solutions suggest that VPS can collaboratively participate in the day-ahead electricity market, the real-time electricity market, and the demand response market, using optimization models to formulate the optimal bidding strategy. However, these existing solutions have significant shortcomings: when constructing cost models, they fail to comprehensively incorporate all key compliance costs into a unified optimization model. In particular, the transaction costs of green electricity certificates incurred to meet national or regional renewable energy consumption responsibilities are often ignored or handled independently of the power purchase decision. This incomplete cost accounting results in optimization decisions that are not globally optimal, making it difficult to truly minimize the total power purchase cost of the VPS, thus limiting its market competitiveness. Summary of the Invention
[0003] The purpose of this application is to provide a user-type virtual power plant power dispatch optimization method and device based on the Grey Wolf algorithm, which aims to solve the technical problem that the existing virtual power plant power purchase decision model fails to fully consider compliance costs such as green electricity certificates, resulting in non-globally optimal optimization results.
[0004] This application provides a user-based virtual power plant power dispatch optimization method based on the Grey Wolf algorithm, including:
[0005] Construct a power supply model and a power demand model for a user-type virtual power plant; wherein the power demand model includes: base load, green certificate demand, and demand response elastic load;
[0006] Based on the aforementioned power supply model and power demand model, the power purchase cost of the virtual power plant is decomposed into medium- and long-term contract costs, spot market costs, green certificate transaction costs, and demand response revenue.
[0007] Based on the power supply model and the power demand model, and with the goal of minimizing the total power purchase cost, a power purchase decision model is established that includes load balance constraints and demand response constraints.
[0008] An improved gray wolf algorithm is used to solve the electricity purchase decision model and output the optimal electricity purchase plan. The improved gray wolf algorithm includes: during the wolf pack position update phase, embedding the real-time change rate of demand response elastic load as a dynamic weight into the direction correction vector, and adaptively adjusting the convergence factor according to the degree of load fluctuation; and outputting the optimal electricity purchase plan.
[0009] In some embodiments, the power supply model includes: a photovoltaic power generation output unit and a photovoltaic generator operating cost unit.
[0010] In some embodiments, the formula for the photovoltaic power generation unit is as follows:
[0011]
[0012] In the formula, S represents the photovoltaic power output at time t; PV The area of the photovoltaic panel; Let η be the light intensity at time t; PV The average efficiency of the photovoltaic module; μ inv and μ sor The conversion rate and absorption rate of solar energy are denoted as ; loss represents photovoltaic power generation losses.
[0013] The unit formula for the operating cost of a photovoltaic power generation unit is as follows:
[0014]
[0015] In the formula, The operating cost of the photovoltaic unit during time period t; P represents the depreciation cost of the photovoltaic unit. t PV p represents the real-time power generation of the photovoltaic unit. PV The price for electricity generated by photovoltaic power generation.
[0016] In some embodiments, the formula for green certificate demand in the electricity demand model is as follows:
[0017] G=(g·LP PV ) / 1000
[0018] In the formula, G is the number of green certificates required for the virtual power plant; g is the renewable energy consumption responsibility weight ratio; and each green certificate represents 1 MWh of green electricity.
[0019] In some embodiments, the transaction costs of medium- to long-term contracts are expressed as:
[0020]
[0021] In the formula, C LTThe cost of purchasing electricity incurred by the virtual power plant in medium- and long-term transactions; The medium- and long-term electricity purchases allocated to the virtual power plant at time t; Let t be the contract price at time t for medium- to long-term contracts.
[0022] The spot market electricity purchase cost is:
[0023]
[0024] In the formula, C SM This refers to the cost of electricity purchased by the virtual power plant in the spot market. The spot purchase volume of the virtual power plant at time t; The average settlement price in the spot market at time t;
[0025] The transaction cost of green certificates is expressed as follows:
[0026] C G =G·p green
[0027] In the formula, C G This represents the cost of purchasing green certificates for virtual power plants; p green The price of a green certificate;
[0028] Demand response cost is expressed as:
[0029]
[0030] In the formula, C DR This represents the cost incurred by a virtual power plant participating in demand response; p 缝 p represents the compensation price for peak shaving. 谷 This indicates the preferential electricity price for peak seasons.
[0031] In some embodiments, the objective function formula of the electricity purchase decision model is as follows:
[0032] F = min C VPP =min(C LT +C SM +C G +C DR )
[0033] Among them, C SM C represents the electricity purchase cost of the virtual power plant in the spot market. G This represents the cost of purchasing green certificates for virtual power plants; C DR This represents the cost incurred by a virtual power plant participating in demand response; C LT C represents the electricity purchase cost incurred by the virtual power plant in medium- to long-term transactions. VP This represents the total cost of electricity purchase.
[0034] In some embodiments, the load balance constraint formula is as follows:
[0035]
[0036] The formula for balancing demand response electricity consumption is as follows:
[0037]
[0038] Among them, Q 峰 For the load shifted due to peak shaving; Q 谷 For loads transferred due to valley filling; P t PV This represents the real-time power generation of the photovoltaic unit. The medium- and long-term electricity purchases allocated to the virtual power plant at time t; Let t represent the spot purchase volume of the virtual power plant.
[0039] This application provides a user-type virtual power plant power dispatch optimization device based on the Grey Wolf algorithm, including:
[0040] The building module is used to construct the power supply model and power demand model of the user-type virtual power plant; wherein the power demand model includes: base load, green certificate demand, and demand response elastic load;
[0041] The decomposition module is used to decompose the electricity purchase cost of the virtual power plant into medium- and long-term contract costs, spot market costs, green certificate transaction costs, and demand response benefits based on the power supply model and the power demand model.
[0042] A module is established to create an electricity purchase decision model that includes load balance constraints and demand response constraints, based on the electricity supply model and the electricity demand model, with the goal of minimizing the total electricity purchase cost.
[0043] The solution module is used to solve the electricity purchase decision model using the improved Grey Wolf algorithm and output the optimal electricity purchase plan.
[0044] This application provides an electronic device, including:
[0045] A processor, and a memory for storing a processor-executable program;
[0046] The processor is used to implement the user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm described above by running the program in the memory.
[0047] This application provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program, which, when run by a processor, causes the processor to execute the user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm described above.
[0048] This application provides a user-type virtual power plant power dispatch optimization method based on the Grey Wolf algorithm. First, it constructs a power supply model and a power demand model for the user-type virtual power plant. The power demand model includes: base load, green certificate demand, and demand response elastic load. Based on the power supply and demand models, the power purchase cost of the virtual power plant is decomposed into medium- and long-term contract costs, spot market costs, green certificate trading costs, and demand response revenue. Based on the power supply and demand models, a power purchase decision model is established with the objective of minimizing the total power purchase cost, including load balance constraints and demand response constraints. An improved Grey Wolf algorithm is used to solve the power purchase decision model, outputting the optimal power purchase plan. The improved Grey Wolf algorithm includes: during the wolf pack position update phase, embedding the real-time change rate of the demand response elastic load as a dynamic weight into the direction correction vector, and adaptively adjusting the convergence factor according to the degree of load fluctuation; outputting the optimal power purchase plan. The proposed solution establishes a two-tiered framework of "power supply model + power demand model," comprehensively incorporating distributed photovoltaic power, rigid loads, flexible loads, green certificate demand, and demand response into a unified description. This avoids the error accumulation caused by the fragmented processing of source-load-certificate-response in traditional methods. The solution explicitly separates the four types of costs actually faced by the virtual power plant (medium- and long-term contracts, spot market, green certificate trading, and demand response revenue), directly mapping them to real market trading instruments such as spot, futures, certificates, and subsidies, providing a feasible economic boundary for subsequent optimization. Furthermore, the objective function simultaneously considers two types of hard constraints: "load balance" and "demand response balance," ensuring that the optimization results satisfy both real-time power balance and grid dispatch requirements for peak shaving / valley filling, thus overcoming the drawback of traditional algorithms that "only optimize costs and ignore feasibility." By embedding the "real-time change rate of demand response elastic load" as a dynamic weight into the direction correction vector of the gray wolf algorithm, the search direction of the wolf pack is adjusted in real time according to the user elasticity, which significantly accelerates the convergence speed. The optimization results satisfy the renewable energy consumption responsibility weight (green certificate constraint) while minimizing the overall electricity purchase cost, achieving both "saving money and reducing carbon emissions", and can be directly used in user-side scenarios such as smart buildings and industrial parks. Attached Figure Description
[0049] The above and other objects, features, and advantages of this application will become more apparent from the more detailed description of the embodiments of this application in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this application and form part of the specification. They are used together with the embodiments of this application to explain this application and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.
[0050] Figure 1This is a flowchart illustrating a user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm provided in one embodiment of this application.
[0051] Figure 2 This is a schematic diagram of the structure of a user-type virtual power plant power dispatch optimization device based on the gray wolf algorithm provided in one embodiment of this application.
[0052] Figure 3 This is a schematic diagram of an electronic device structure provided in one embodiment of this application. Detailed Implementation
[0053] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0054] This application proposes a complete power dispatch optimization solution centered around a "user-based virtual power plant." The core process is as follows: First, a "supply model" (distributed photovoltaic + operating costs) and a "demand model" (base load, green certificate demand, and demand response elastic load) are established to achieve an integrated description of source-load-certificate-response. The electricity purchase costs borne by the virtual power plant are subdivided into four categories: medium- and long-term contracts, spot market, green certificate trading, and demand response revenue, providing clear economic boundaries for optimization. With the objective of "minimizing total electricity purchase cost," two constraints—"load balancing" and "demand response balancing"—are added to form a solvable electricity purchase decision model. Two improvements are introduced into the standard GWO: using the "real-time change rate of demand response elastic load" as a dynamic weight to correct the wolfpack search direction; and adaptively adjusting the convergence factor based on the degree of load fluctuation to prevent premature convergence and improve the probability of global optimum. The algorithm directly outputs the medium- and long-term electricity purchase volume, spot market electricity purchase volume, green certificate purchase volume, and demand response adjustment volume, forming an optimal electricity purchase plan that can be directly implemented. Through the above steps, this application significantly reduces the electricity purchase cost of user-type virtual power plants while ensuring real-time power balance and green energy consumption responsibilities.
[0055] After introducing the basic principles of this application, various non-limiting embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0056] Figure 1 This is a flowchart illustrating a user-type virtual power plant power dispatch optimization method based on the Grey Wolf algorithm, provided in one embodiment of this application. Figure 1 As shown, the method includes the following:
[0057] Step S11 0: Construct the power supply model and power demand model of the user-type virtual power plant; wherein the power demand model includes: base load, green certificate demand, and demand response elastic load;
[0058] This step aims to clarify the power supply capacity and electricity demand characteristics of user-type virtual power plants, laying the foundation for subsequent cost accounting and decision-making model construction.
[0059] The power supply model primarily revolves around the power generation resources within a virtual power plant, with the core being a distributed photovoltaic (PV) power generation model. This model includes PV power output units and PV generator operating cost units. The PV power output unit considers factors such as PV panel area, irradiance, conversion efficiency, and losses to quantify power generation capacity at different times. The PV generator operating cost unit covers depreciation costs, real-time power generation, and electricity buyback prices, used to calculate the economic expenditures during the power generation process.
[0060] Electricity Demand Model: Focusing on the classification of electricity demand on the user side, specifically including: Base Load: The load that meets the user's daily stable electricity consumption, which can be predicted through historical load data; Green Certificate Demand: The number of green electricity certificates required to meet the renewable energy consumption responsibility weight requirements, which is directly related to the consumption ratio, with each green certificate corresponding to 1 MWh of green electricity; Demand Response Elastic Load: Flexible load that can participate in demand-side response adjustments, whose changes are affected by market price signals and policy incentives, manifested as peak shaving or valley filling load transfer.
[0061] Step S120: Based on the power supply model and power demand model, decompose the power purchase cost of the virtual power plant into medium- and long-term contract costs, spot market costs, green certificate transaction costs, and demand response revenue.
[0062] Based on the power supply and demand model, the power purchase cost of user-type virtual power plants is broken down into four categories, comprehensively covering all income and expenditure in market transactions:
[0063] Medium- and long-term contract costs: To meet the stable portion of the base load, the cost of purchasing electricity is locked in by signing medium- and long-term power contracts. The contract price and volume can be broken down into different time periods and calculated based on the purchased volume and contract price for the corresponding time period.
[0064] Spot market costs: Costs incurred from purchasing electricity in the spot market to make up for temporary load gaps or to cope with uncertainties in distributed generation, depending on the amount of electricity purchased in the spot market and the real-time settlement price.
[0065] Green certificate transaction cost: The expenditure for purchasing green electricity certificates to meet the renewable energy consumption responsibility weight is calculated by multiplying the required number of green certificates by the unit price of the green certificate.
[0066] Demand response benefits: The economic returns obtained by adjusting flexible loads to participate in demand response (such as peak shaving subsidies and valley filling incentives) can offset part of the electricity purchase cost, and are related to the amount of load transferred and the corresponding electricity price.
[0067] Step S130: Based on the power supply model and the power demand model, and with the goal of minimizing the total power purchase cost, establish a power purchase decision model that includes load balance constraints and demand response constraints.
[0068] With the core objective of minimizing total electricity purchase costs, a decision-making model with constraints is constructed by combining electricity supply and demand models to ensure the feasibility and economy of the decision.
[0069] Objective function: Total electricity purchase cost = medium- and long-term contract cost + spot market cost + green certificate transaction cost - demand response revenue. Cost optimization is achieved by minimizing this function.
[0070] The constraints include: Load balance constraints: ensuring that the total power supply of the virtual power plant (including distributed generation, medium- and long-term contract power purchases, and spot power purchases) matches the total demand (including base load and demand response adjustment loads) to guarantee power supply reliability. Demand response constraints: limiting the adjustment range of demand response flexible loads to avoid excessive adjustments affecting users' normal electricity consumption; typically, the maximum value of peak shaving and valley filling load transfers is set to not exceed the total flexible load.
[0071] Step S140: The improved gray wolf algorithm is used to solve the power purchase decision model and output the optimal power purchase plan; wherein, the improved gray wolf algorithm includes: in the wolf pack position update stage, the real-time change rate of demand response elastic load is used as a dynamic weight to embed the direction correction vector, and the convergence factor is adaptively adjusted according to the degree of load fluctuation; and the optimal power purchase plan is output.
[0072] By optimizing the traditional gray wolf algorithm, its adaptability to the dynamic load of virtual power plants is improved, and the power purchase decision model is solved efficiently to obtain the optimal power purchase plan.
[0073] The core optimization of the improved Grey Wolf algorithm:
[0074] Dynamic weight embedding: During the wolf pack position update phase, the real-time change rate of the demand response elastic load is used as a dynamic weight and embedded into the direction correction vector, making the algorithm more sensitive to fluctuations in the flexible load and improving the search targeting.
[0075] Adaptive adjustment of convergence factor: The convergence factor is adjusted according to the degree of load fluctuation (such as the standard deviation of load change). When the load fluctuation is large, the convergence speed is slowed down to avoid local optima, and when the load is stable, the convergence is accelerated to improve efficiency. The initial value of the convergence factor is 2, which decreases linearly to 0 with iteration.
[0076] Solution and Output: Initialize the wolf pack positions (each position represents a set of electricity purchase plans), and iteratively update the wolf pack positions (guided by α, β, and δ wolves) until the algorithm converges. The output of each gray wolf position corresponds to the optimal electricity purchase amount for each time period, which are combined to form a complete optimal electricity purchase plan, minimizing the total electricity purchase cost.
[0077] In some embodiments, the power supply model includes: a photovoltaic power generation output unit and a photovoltaic generator operating cost unit.
[0078] The photovoltaic power generation output unit and photovoltaic generator set operation cost unit included in the power supply model are constructed based on the characteristic that the power generation units in user-type virtual power plants are mostly distributed photovoltaics.
[0079] The output of a photovoltaic power generation unit mainly depends on the intensity of solar radiation. Its calculation formula takes into account factors such as the area of the photovoltaic panel, the light intensity at any time, the average efficiency of the photovoltaic module, the conversion rate and absorption rate of solar energy, and photovoltaic power generation losses, so as to quantify the photovoltaic output at different times.
[0080] The photovoltaic generator operating cost unit includes parameters such as the depreciation cost of the photovoltaic generator in time period t, the real-time power generation, and the recycling price of photovoltaic power generation, which are used to calculate the cost expenditure during the operation of the photovoltaic generator.
[0081] In practical applications, current virtual power plants mainly aggregate distributed resources and different types of loads, including distributed photovoltaic power generation, rigid loads, and flexible loads. Among them, rigid loads can be regarded as stable loads, while flexible loads can participate in demand response to obtain certain benefits.
[0082] Photovoltaic power generation output mainly depends on the intensity of solar radiation. Solar irradiance follows a Beta function, and photovoltaic power generation can be expressed as follows:
[0083]
[0084] In the formula, P t PV S represents the photovoltaic power output at time t; PV The area of the photovoltaic panel; Let η be the light intensity at time t; PV The average efficiency of the photovoltaic module; μ inv and μ sor represents the conversion rate and absorption rate of solar energy; loss represents the photovoltaic power generation loss.
[0085] Operating costs of photovoltaic power generation units
[0086]
[0087] In the formula, The operating cost of the photovoltaic unit during time period t; P represents the depreciation cost of the photovoltaic unit. t PV p represents the real-time power generation of the photovoltaic unit. PV The price for electricity generated by photovoltaic power generation.
[0088] The user electricity demand model is as follows: In the virtual power plant, the user electricity demand is divided into: basic demand, green certificate demand, and regulation demand.
[0089] In the basic electricity demand of users, the user's load curve has both rigid and flexible components. Most of it can be scientifically predicted based on historical load curves. The user's total load can be expressed as:
[0090]
[0091] In the formula, L represents the total load of the virtual power plant on a typical day; d t Let t represent the load demand of the virtual power plant at time t.
[0092] In the demand for green certificates, to meet the renewable energy consumption responsibility weights of various regions, users can purchase green electricity certificates to obtain green value. The user's green certificate demand model can be expressed as follows:
[0093] G=(g·LP PV ) / 1000
[0094] In the formula, G represents the number of green certificates required for the virtual power plant; g represents the renewable energy consumption responsibility weight ratio. Each green certificate represents 1 MWh of green electricity.
[0095] In demand response (load elasticity), users respond to price signals and related preferential policies released by the electricity market, actively participating in demand-side response by changing their consumption patterns. The larger the user's electricity capacity, the greater the benefits they can obtain in the demand response market.
[0096]
[0097] In the formula, Q DR Q represents the total absolute value of the load change after the virtual power plant participates in demand response; 峰 For the load shifted due to peak shaving; Q 谷 The load transferred due to filling the valley.
[0098] Break down the cost structure of virtual power plants participating in market transactions to address different electricity demands.
[0099] The electricity purchase costs for virtual power plants participating in market transactions include:
[0100] In medium- and long-term contract transaction costs: To meet the majority of stable loads in the load curve, virtual power plants can participate in medium- and long-term electricity transactions to obtain stable revenue from this portion of electricity. Typically, contract prices and quantities can be broken down into each time period; therefore, this portion of the electricity purchase cost can be expressed as follows:
[0101]
[0102] In the formula, C LT The cost of purchasing electricity incurred by the virtual power plant in medium- and long-term transactions; The medium- and long-term electricity purchases allocated to the virtual power plant at time t; Let t be the contract price at time t for medium- to long-term contracts.
[0103] In the spot market electricity purchase cost: Due to the significant short-term price volatility in the spot market, users need to lock in the price of most electricity in advance through medium- to long-term contracts to meet relatively stable electricity demand in order to hedge against spot price risk. The spot market only trades uncertain, temporary electricity demand. The spot market electricity purchase cost is...
[0104] In the formula, C SM This refers to the cost of electricity purchased by the virtual power plant in the spot market. The spot purchase volume of the virtual power plant at time t; This represents the average settlement price in the spot market at time t.
[0105] In the green certificate transaction cost, considering the demand for green certificates from virtual power plants, the green certificate transaction cost can be calculated as C. G =G·p green
[0106] In the formula, C G This represents the cost of purchasing green certificates for virtual power plants; p gree n represents the price of the green certificate.
[0107] In demand response costs, grid dispatching releases demand responses are categorized into peak-shaving demand and valley-filling demand. Responding to peak-shaving and proactive load reduction can receive certain electricity price subsidies, while responding to valley-filling demand can obtain lower electricity prices to reduce their own electricity costs. The cost of demand response can be expressed as follows:
[0108]
[0109] In the formula, C DR This represents the cost incurred by a virtual power plant participating in demand response; p 峰 p represents the compensation price for peak shaving. 谷 This indicates the preferential electricity price for peak seasons.
[0110] In the user-based demand response electricity purchase decision model, the user-based virtual power plant aims to minimize its total electricity cost without compromising its own interests when making electricity purchase decisions. Therefore, the objective function, which is to minimize the electricity purchase cost, can be expressed as follows:
[0111] F = min C VPP =min(C LT +C SM +C G +C DR )
[0112] The constraints are as follows:
[0113] Load balance
[0114]
[0115] Demand response to electricity fluctuation balance
[0116]
[0117] Combining the gray wolf algorithm, a solution approach for the model is proposed. The gray wolf algorithm is an intelligent algorithm that combines the social behavior and hunting habits of gray wolves to propose a solution approach for the optimal solution of a single objective function. Within the gray wolf population, a strict hierarchy exists, denoted as α, β, δ, and ω, where α is the highest rank and the α wolf can decide the actions of the pack. β and δ wolves are second only to α wolves and become the new α wolf when the α wolf becomes ineffective. ω wolves have no decision-making power and can only obey the commands of α, β, and δ wolves. After the α, β, and δ wolves issue a hunting command, the wolf pack will surround and attack the prey, which can be represented as...
[0118] D = |C·X p (l)-X(l)|
[0119] X(l+1)=X p (l)-A·D
[0120] A = 2a·r i -a
[0121] C = 2r²
[0122]
[0123] In the formula, D is the Euclidean distance between the gray wolf and its prey; l represents the current iteration number. max Indicates the maximum number of iterations; X p(l) represents the position vector of the prey; X(l) represents the position vector of the individual gray wolf; A represents the attack parameter. When |A|>1, the attack target is canceled, otherwise the target is locked and an attack is prepared; C represents the coordination coefficient matrix; a represents the convergence factor. During the iteration process, the convergence factor decreases linearly from 2 to 0; r1 and r2 are random vectors between 0 and 1.
[0124] After the encirclement is complete, the wolf pack will begin hunting under the commands of α, β, and δ wolves. Specifically, in each iteration, the three best-performing solutions are assigned to α, β, and δ, respectively. The other gray wolves will adjust their positions under the influence of α, β, and δ wolves, which can be expressed as follows:
[0125]
[0126]
[0127] In the formula, X1, X2, and X3 represent the movement directions of the wolf pack after being influenced by α, β, and δ, respectively. When convergence is achieved, the wolf pack stops moving, indicating the optimal solution has been reached.
[0128] The position of each gray wolf after output represents the amount of electricity purchased at each point in time. Combining these values yields the optimal electricity purchase plan for the virtual power plant.
[0129] The solution provided in this application retains the classic gray wolf algorithm's "Q, β, δ three-layer leader wolf + ω follower wolf" structure. During the wolf pack position update phase, only two improvements are added that are deeply integrated with the real-time operation of the user-type virtual power plant:
[0130] By turning the "real-time change rate of demand response elastic load" into a dynamic weight, the wolf pack's next search direction is directly affected; the convergence factor no longer shrinks at a fixed pace, but automatically adjusts its speed according to the magnitude of load fluctuations.
[0131] Arrange the electricity purchase decision variables into a long vector: first, arrange the medium- and long-term purchase volume for each time period, then the spot purchase volume, followed by the number of green certificates, and finally the peak shaving and valley filling volumes for each time period. The length of the vector is equal to the number of scheduling time periods multiplied by three plus one.
[0132] The total cost of the electricity purchase decision model is used directly as the "score" for each wolf; the lower the score, the higher the wolf's level.
[0133] Real-time change rate: The current value of the flexible load is read every fifteen minutes and compared with that of fifteen minutes ago to calculate a percentage change.
[0134] Weight mapping: Multiply the percentage by the elasticity coefficient in the user contract, and then add one to get a weight value greater than one.
[0135] Direction correction: This weight is used to amplify or reduce the original direction vector, so that the wolf pack takes large steps when the flexible load changes drastically and small steps when the change is gradual, always moving close to the user's actual response capability.
[0136] Volatility index: The standard deviation of the load over the most recent 24 periods is taken. The larger the standard deviation, the more volatile the fluctuation.
[0137] Convergence Rhythm: When fluctuations are large, the convergence factor decays more slowly, allowing the wolf pack to continue searching over a wide area; when fluctuations are small, the decay is accelerated, allowing the wolf pack to fine-tune its movements.
[0138] Implementation: The standard deviation is updated every fifteen minutes, and the convergence factor is adjusted online accordingly without manual intervention.
[0139] The algorithm stops after five consecutive generations when the score remains almost unchanged or after reaching the maximum number of iterations. The optimal wolf vector is directly translated as: how much medium- and long-term electricity should be contracted in each period; how much electricity should be declared in the spot market in each period; how many green certificates need to be purchased in total; and how many kilowatts of peak shaving or valley filling are needed in each period. The results are output in CSV or XML format and can be directly imported into existing energy management systems for execution.
[0140] Therefore, the user-type virtual power plant power purchase optimization method based on the Grey Wolf algorithm in the power market transaction proposed in this invention can effectively plan the power purchase cost of virtual power plants and improve their profitability.
[0141] The apparatus embodiments of this application can be used to execute the method embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of this application.
[0142] Figure 2 The diagram shown is a block diagram of a user-type virtual power plant power dispatch optimization device based on the gray wolf algorithm according to an embodiment of this application. Figure 2 As shown, the device includes:
[0143] Module 21 is used to construct the power supply model and power demand model of the user-type virtual power plant; wherein the power demand model includes: base load, green certificate demand, and demand response elastic load;
[0144] The decomposition module 22 is used to decompose the electricity purchase cost of the virtual power plant into medium- and long-term contract costs, spot market costs, green certificate transaction costs, and demand response revenue based on the power supply model and the power demand model.
[0145] Module 23 is established to create a power purchase decision model that includes load balance constraints and demand response procurement, based on the power supply model and the power demand model, with the goal of minimizing the total power purchase cost.
[0146] The solution module 24 is used to solve the power purchase decision model using the improved gray wolf algorithm and output the optimal power purchase plan; wherein, the improved gray wolf algorithm includes: in the wolf pack position update stage, embedding the real-time change rate of the demand response elastic load as a dynamic weight into the direction correction vector, and adaptively adjusting the convergence factor according to the degree of load fluctuation; and outputting the optimal power purchase plan.
[0147] Below, for reference Figure 3 This describes an electronic device according to embodiments of the present application. Figure 3 A block diagram of an electronic device according to an embodiment of this application is illustrated.
[0148] like Figure 3 As shown, the electronic device 300 includes one or more processors 310 and memory 320.
[0149] The processor 31 0 may be a central processing unit (CPU) or other form of processing unit with data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 300 to perform desired functions.
[0150] The memory 320 may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 310 may execute the program instructions to implement the user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm described in the various embodiments of this application above, and / or other desired functions. Various contents, such as category correspondence, may also be stored in the computer-readable storage medium.
[0151] In one example, the electronic device 300 may also include an input device 330 and an output device 340, which are interconnected via a bus system and / or other forms of connection mechanism (not shown).
[0152] In addition, the input device 330 may also include, for example, a keyboard, mouse, interface, etc. The output device 340 can output various information to the outside, including analysis results, etc. The output device 340 may include, for example, a display, speaker, printer, and communication network and its connected remote output devices, etc.
[0153] Of course, for the sake of simplicity, Figure 3Only some of the components of the electronic device relevant to this application are shown in this illustration; components such as buses, input / output interfaces, etc., are omitted. In addition, the electronic device may include any other suitable components depending on the specific application.
[0154] In addition to the methods and devices described above, embodiments of this application may also be computer program products, which include computer program instructions that, when executed by a processor, cause the processor to perform the steps in the user-type virtual power plant power dispatch optimization method based on the Grey Wolf algorithm according to various embodiments of this application as described in the "Exemplary Methods" section above.
[0155] The computer program product can be written in any combination of one or more programming languages to perform the operations of the embodiments of this application. The programming languages include object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0156] Furthermore, embodiments of this application may also be computer-readable storage media storing computer program instructions thereon, which, when executed by a processor, cause the processor to perform the steps in the user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm according to various embodiments of this application as described in the "Exemplary Methods" section above.
[0157] The computer-readable storage medium may be any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may, for example, include, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatuses, or devices, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0158] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of this application to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A user-based virtual power plant power dispatch optimization method based on the Grey Wolf algorithm, characterized in that... ,include: Construct a power supply model and a power demand model for a user-type virtual power plant; wherein the power demand model includes: base load, green certificate demand, and demand response elastic load; Based on the aforementioned power supply model and power demand model, the power purchase cost of the virtual power plant is decomposed into medium- and long-term contract costs, spot market costs, green certificate transaction costs, and demand response revenue. Based on the power supply model and the power demand model, and with the goal of minimizing the total power purchase cost, a power purchase decision model is established that includes load balance constraints and demand response constraints. The improved gray wolf algorithm is used to solve the electricity purchase decision model and output the optimal electricity purchase plan; The improved gray wolf algorithm includes: during the wolf pack location update phase, embedding the real-time change rate of demand response elastic load as a dynamic weight into the direction correction vector, and adaptively adjusting the convergence factor according to the degree of load fluctuation; and outputting the optimal power purchase plan.
2. The user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm according to claim 1, characterized in that, The power supply model includes: a photovoltaic power generation output unit and a photovoltaic generator set operating cost unit.
3. The user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm according to claim 1, characterized in that, The formula for the photovoltaic power generation output unit is as follows: In the formula, S represents the photovoltaic power output at time t; PV The area of the photovoltaic panel; Let be the light intensity at time t; η PV The average efficiency of the photovoltaic module; μ inv and μ sor The conversion rate and absorption rate of solar energy are denoted as ; loss represents photovoltaic power generation losses. The unit formula for the operating cost of a photovoltaic power generation unit is as follows: In the formula, The operating cost of the photovoltaic unit during time period t; This refers to the depreciation cost of photovoltaic units; p represents the real-time power generation of the photovoltaic unit. PV The price for electricity generated by photovoltaic power generation.
4. The user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm according to claim 1, characterized in that, The formula for green certificate demand in the electricity demand model is as follows: G=(g·L-P PV ) / 1000 In the formula, G denoted by , g represents the number of green certificates required for the virtual power plant; g represents the renewable energy consumption responsibility weight ratio; where each green certificate represents 1 MWh of green electricity.
5. The user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm according to claim 4, characterized in that, The transaction costs of the medium- and long-term contracts are expressed as follows: In the formula, C LT The cost of purchasing electricity incurred by the virtual power plant in medium- and long-term transactions; The medium- and long-term electricity purchases allocated to the virtual power plant at time t; Let t be the contract price at time t for medium- to long-term contracts; The spot market electricity purchase cost is: In the formula, C SM This refers to the cost of electricity purchased by the virtual power plant in the spot market. The spot purchase volume of the virtual power plant at time t; The average settlement price in the spot market at time t; The transaction cost of green certificates is expressed as follows: C G =G·p green In the formula, C G This represents the cost of purchasing green certificates for virtual power plants; p green The price of a green certificate; Demand response cost is expressed as: In the formula, C DR This represents the cost incurred by a virtual power plant participating in demand response; p 峰 p represents the compensation price for peak shaving. 谷 This indicates the preferential electricity price for peak seasons.
6. The user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm according to claim 1, characterized in that, The objective function formula for the electricity purchase decision model is as follows: F=min C IPP =min(C LT +C SM +C G +C DR ) Among them, C SM C represents the electricity purchase cost of the virtual power plant in the spot market. G This represents the cost of purchasing green certificates for virtual power plants; C DR This represents the cost incurred by a virtual power plant participating in demand response; C LT C represents the electricity purchase cost incurred by the virtual power plant in medium- to long-term transactions. VPP This represents the total cost of electricity purchase.
7. The user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm according to claim 1, characterized in that, The load balance constraint formula is as follows: The demand response electricity consumption balance formula is as follows: Among them, Q 峰 For the load shifted due to peak shaving; Q 谷 The load transferred due to valley filling; This represents the real-time power generation of the photovoltaic unit. The medium- and long-term electricity purchases allocated to the virtual power plant at time t; Let t represent the spot purchase volume of the virtual power plant.
8. A user-type virtual power plant power dispatch optimization device based on the Grey Wolf algorithm, characterized in that, include: The building module is used to construct the power supply model and power demand model of the user-type virtual power plant; The electricity demand model mentioned above includes: base load, green certificate demand, and demand response elastic load; The decomposition module is used to decompose the electricity purchase cost of the virtual power plant into medium- and long-term contract costs, spot market costs, green certificate transaction costs, and demand response benefits based on the power supply model and the power demand model. A module is established to create an electricity purchase decision model that includes load balance constraints and demand response constraints, based on the electricity supply model and the electricity demand model, with the goal of minimizing the total electricity purchase cost. The solution module is used to solve the power purchase decision model using the improved gray wolf algorithm and output the optimal power purchase plan. The improved gray wolf algorithm includes: in the wolf pack position update stage, embedding the real-time change rate of the demand response elastic load as a dynamic weight into the direction correction vector, and adaptively adjusting the convergence factor according to the degree of load fluctuation; and outputting the optimal power purchase plan.
9. An electronic device, characterized in that, include: A processor, and a memory for storing a processor-executable program; The processor is configured to implement the user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm as described in any one of claims 1 to 7 by running the program in the memory.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the user-type virtual power plant power dispatch optimization method based on the gray wolf algorithm as described in any one of claims 1 to 7.