Quick response control method and system for virtual power plant

By collecting multi-source data and using particle swarm optimization algorithm and LSTM model to build profit and target models, the rapid response and efficient optimization problems faced by virtual power plants in optimization scheduling are solved, and the global optimal regulation strategy is achieved.

CN119443693AActive Publication Date: 2025-02-14SHENZHEN HUAMAO NENGLIAN TECH CO LTD

Patent Information

Application Number
CN202411564362.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-14
Estimated Expiration
2044-11-05

AI Technical Summary

Technical Problem

Virtual power plants face a large number of uncertain factors and complex constraints in optimized scheduling, making it difficult for the existing technology to achieve rapid response and efficient optimization.

Method used

By collecting multi-source data on the power generation side, grid side and user side, using particle swarm optimization algorithm and long-term short-term memory network (LSTM) model, a profit model and target model are constructed to optimize the regulation strategy of virtual power plants.

Benefits of technology

It improves the optimization efficiency of virtual power plants, realizes rapid response and global optimal regulation strategies, and meets the physical constraints and operation requirements of the power grid.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119443693A_ABST
    Figure CN119443693A_ABST
Patent Text Reader

Abstract

The invention discloses a quick response control method and system for a virtual power plant, and relates to the technical field of virtual power plants, and the method comprises the steps: collecting power generation side data, power grid side data and user side data; constructing a demand prediction model based on LSTM by using user side data; predicting the electricity demand of each time period; constructing a profit model according to the power generation side data, the power grid side data and the power consumption demand; setting a game model in the profit model for balancing the benefits of the power generation side and the power grid side; constructing a target model, taking the power consumption demand and the output of the profit model as the input, and taking the power grid topological structure data as a constraint condition; and solving the target model by adopting a particle swarm optimization algorithm, and generating a global optimal virtual power plant regulation and control strategy. In view of the problem of low optimization efficiency of the virtual power plant in the prior art, the method takes the predicted power consumption demand, the output of the profit model and the power grid constraint condition as the input, and adopts the particle swarm optimization algorithm to solve the target model, thereby improving the optimization efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of virtual power plants, and in particular to a rapid response control method and system for virtual power plants. Background Art

[0002] A virtual power plant is a virtual and controllable "power plant" that aggregates and optimizes the scheduling of distributed power sources, renewable energy, energy storage equipment, controllable loads and other resources through advanced information and communication technologies. Unlike traditional power plants, virtual power plants do not own physical equipment, but coordinate the operation of various distributed resources through intelligent algorithms and control strategies to provide power generation, frequency regulation, peak regulation and other services similar to traditional power plants. Virtual power plants can effectively improve the utilization efficiency of distributed energy, enhance the flexibility and reliability of the power grid, and provide users with more economical, clean and high-quality power services.

[0003] However, the optimal scheduling of virtual power plants involves a large number of uncertainties and complex constraints, such as the intermittent and random nature of renewable energy, the volatility of power loads, and the power flow constraints of the power grid, which poses a huge challenge to the real-time control of virtual power plants. Traditional optimization scheduling methods, such as mixed integer programming and dynamic programming, often fail to meet the needs of rapid response of virtual power plants and have low optimization efficiency. In addition, most existing virtual power plant control systems adopt a hierarchical distributed architecture, lacking the ability of global optimization, making it difficult to maximize the overall benefits of virtual power plants.

[0004] In the related technology, for example, Chinese patent document CN116645169A provides a power trading system and method based on a virtual power plant, the system includes: a trading model generation module, a trading model optimization module, a trading decision module, a trading execution module, and a trading monitoring module; wherein the trading model generation module constructs a power generation side benefit and user benefit model; the trading model optimization module optimizes the power generation side benefit and user benefit model; the trading decision module determines the power trading price range through game theory; the trading execution module conducts power trading according to the power trading price range; the trading monitoring module supervises the security of the power trading process. However, this scheme only considers the two aspects of power generation side benefit and user benefit. The imperfection of the optimization model may cause the optimization result to not meet the actual operation requirements, affecting the optimization efficiency of the virtual power plant. Summary of the invention

[0005] In response to the problem of low optimization efficiency of virtual power plants in the prior art, the present application provides a method and system for rapid response control of virtual power plants, which takes the predicted electricity demand, the output of the profit model and the grid constraints as input, and improves the optimization efficiency by using a particle swarm optimization algorithm to solve the target model.

[0006] The purpose of this application is achieved through the following technical solutions.

[0007] One aspect of the present specification provides a method for rapid response control of a virtual power plant, including: data collection stage: collecting output data and power generation cost data of the generator set from the power generation side as input for building a profit model; collecting power grid topology data and on-grid electricity price data from the power grid side, wherein the power grid topology data is used to build the constraint conditions of the target model, and the on-grid electricity price data is used to build the profit model; collecting user power consumption history data from the user side as input for building a demand forecasting model. Profit model construction stage: using the collected power generation side data, power grid side data and predicted power demand data as input to build a profit model; setting a game model in the profit model to balance the interests of the power generation side and the power grid side; the output of the profit model as one of the inputs of the target model. Target model construction and solution stage: using the predicted power demand data and the output of the profit model as inputs to the target model; converting the collected power grid topology data into constraint conditions as constraint condition inputs of the target model; using the particle swarm optimization algorithm to solve the constructed target model; the result obtained from the solution is used as the output of the global optimal virtual power plant control strategy. First, multi-source heterogeneous data is collected from different sides, and then the user-side data is input into the demand forecasting model to obtain the predicted electricity demand; at the same time, the power generation side data, the grid side data and the predicted demand are input into the profit model, and the interests of all parties are balanced through game theory; then the predicted demand, profit model output and grid constraints are input into the target model, and finally the global optimal control strategy is obtained through the optimization algorithm.

[0008] Preferably, the collected user-side data is used to build a demand forecasting model based on the long short-term memory network LSTM, and the electricity demand in each period is predicted by the model. Using the LSTM model to process time series data: User electricity demand has obvious time series characteristics and has a long-term dependency relationship with historical data. The LSTM model is a special recurrent neural network. By introducing a gating mechanism and a memory unit, it can effectively capture and learn the long-term dependency relationship in time series data, and is suitable for processing electricity demand forecasting problems. Constructing a multivariate LSTM forecasting model: When constructing the LSTM forecasting model, not only the single variable of the historical data of electricity demand is considered, but also other related variables are introduced, such as weather, temperature, holidays and other external factors that affect electricity demand. By constructing a multivariate LSTM model, the changing law of electricity demand can be more comprehensively characterized and the prediction accuracy can be improved. In order to further enhance the ability of the LSTM model to process long sequence data, an encoder-decoder structure is used to construct a demand forecasting model. The encoder part encodes the historical electricity demand sequence into a feature vector of a fixed length, and the decoder part generates a future electricity demand forecast value based on the feature vector. This structure can better capture the information in historical data and enhance the expressiveness of the model. On the basis of the encoder-decoder structure, the attention mechanism is introduced so that the decoder can adaptively focus on the key information in the historical sequence when generating the predicted value. Through the introduction of the attention mechanism, the model can handle dependencies of different time scales more flexibly and further improve the prediction accuracy. Preferably, in order to predict the electricity demand in each time period, a sliding window method is adopted, with a fixed length of historical data window as input to predict the electricity demand for several steps in the future. Through the sliding window, the information of historical data can be fully utilized while ensuring the continuity and stability of the prediction.

[0009] Specifically, in step four, a target model is constructed, the predicted power demand and the output of the profit model are used as input, the grid topology data is used as a constraint, the target model is solved by a particle swarm optimization algorithm, and a global optimal virtual power plant control strategy is generated. When solving the target model to obtain the control strategy, the present application includes: constructing a multi-objective optimization model: the target model is a multi-objective optimization problem, which needs to take into account the interests of the power generation side and the grid side while satisfying the grid constraints. Therefore, when constructing the target model, the minimization of power generation costs and the minimization of grid operation costs are used as two optimization goals to form a multi-objective optimization model. By setting the target weights reasonably, the importance of different goals can be balanced. Convert the grid topology into linear constraints: The grid topology data describes the connection relationship and electrical parameters of nodes and branches in the grid. In order to use the grid topology as a constraint for the optimization problem, it is necessary to convert it into a constraint equation in mathematical form. The present application adopts linearization technology to convert the power flow equation and operation restrictions of the grid into linear equality constraints and linear inequality constraints, which simplifies the complexity of solving the optimization model. Introducing virtual power plant flexibility modeling: Virtual power plants provide flexibility services by coordinating and optimizing the operation of distributed energy. In order to reflect the flexibility of the virtual power plant in the target model, the flexibility modeling of the virtual power plant is introduced. By establishing the output regulation model and response time model of the virtual power plant, the flexibility of the virtual power plant is incorporated into the target model as an optimization variable, so that the generated control strategy can give full play to the flexibility advantages of the virtual power plant. Solving with particle swarm optimization algorithm: The target model is a nonlinear, non-convex complex optimization problem, and traditional mathematical programming methods are difficult to solve effectively. This application uses particle swarm optimization (PSO) algorithm to solve the target model. PSO algorithm is a heuristic intelligent optimization algorithm that searches for the global optimal solution in the solution space by simulating the foraging behavior of bird flocks and using the particle position and velocity update formula. When applying the PSO algorithm to solve the target model, it is necessary to design a suitable fitness function to evaluate the pros and cons of the particles. The fitness function is usually constructed according to the optimization objectives and constraints, taking into account factors such as power generation cost, grid operation cost and grid safety. At the same time, it is also necessary to design a constraint processing mechanism to reasonably handle particles that violate the constraints, such as penalty function method, repair method, etc., to ensure that the obtained solution meets all constraints. Through the iterative optimization process, the PSO algorithm searches for the global optimal solution of the target model, that is, the optimal control strategy of the virtual power plant. This control strategy includes the output dispatch plan and response instructions of each distributed energy source in the virtual power plant in each period, which can minimize the power generation cost and grid operation cost under the premise of meeting the constraints of grid safe operation, and realize the economical and efficient operation of the virtual power plant.

[0010] Furthermore, the grid topology data is used as a constraint condition, including: obtaining grid topology data: obtaining grid topology data from a grid dispatching system or a grid database, including nodes, branches and connection relationship data between them; transmitting the obtained grid topology data to a data preprocessing module for further processing. Extracting nodes, branches and connection relationships in the grid topology data; the data preprocessing module receives the grid topology data, parses and extracts the data; identifying node information in the data, such as node number, node type (generation node, load node, intermediate node, etc.), node voltage, etc., and storing the extracted node information in a node data structure; identifying branch information in the data, such as branch number, start node, end node, branch resistance, reactance, etc., and storing the extracted branch information in a branch data structure; constructing an adjacency matrix or adjacency table of the grid topology structure according to the connection relationship between nodes and branches to represent the connectivity between nodes; transmitting the extracted node data structure, branch data structure and adjacency matrix or adjacency table to the constraint conversion module. The extracted nodes, branches and connection relationships are converted into linear inequality constraints and equality constraints; the constraint conversion module receives the extracted node, branch and connection relationship data; according to the physical laws and operation requirements of the power grid, the node and branch parameters and their connection relationships are converted into mathematical constraints; the converted linear inequality constraints and equality constraints are stored in the constraint data structure. The converted linear inequality constraints and equality constraints are used as the constraints of the target model and input into the target model: the constraint data structure is transmitted to the target model construction module; the target model construction module receives the predicted power demand, the output of the profit model and the constraint data structure; the linear inequality constraints and equality constraints are used as the constraints of the target model, together with the predicted power demand and the output of the profit model, to construct a complete target model; the constructed target model is transmitted to the optimization solution module, and the particle swarm optimization algorithm is used for solution; the optimization solution module generates a global optimal virtual power plant control strategy that meets the topological connection restrictions and power flow constraints of the power grid.

[0011] Furthermore, the extracted nodes, branches and connection relationships are converted into linear inequality constraints and equality constraints, including: constructing node power equality constraints: reading relevant information of each node i from the node data structure, including node number, node type, connected branch information, etc.; according to the branch information connected to node i, extracting the branch set I(i) with node i as the end point and the branch set O(i) with node i as the starting point; for each node i, reading the active power P of the branch ij connected to it from the branch data structure ij ; According to the node type, read the generator output active power P at node i from the node data structure Gi and load active power P Di ; Substitute the read data into the node power equation constraint:∑j∈I(i) P ij -∑ j∈O(i) P ij +P Gi -P Di =0, generate the power balance equation constraint of node i; repeat the above steps for all nodes to generate a complete set of node power equation constraints and store them in the constraint data structure.

[0012] Construct branch power flow inequality constraints: Read the relevant information of each branch ij from the branch data structure, including branch number, start node, end node, maximum transmission power limit P ijmax For each branch ij, read its active power P from the branch data structure ij ; Substitute the read data into the branch power flow inequality constraint: |P ij |≤P ijmax , generate the power flow limit inequality constraint of branch ij; repeat the above steps for all branches to generate a complete set of branch power flow inequality constraints and store them in the constraint data structure.

[0013] Construct node voltage amplitude inequality constraints: Read the relevant information of each node i from the node data structure, including the node number, the voltage amplitude lower limit V imin and upper limit V imax For each node i, read its voltage amplitude V from the node data structure i ; Substitute the read data into the node voltage amplitude inequality constraint:

[0014] V imin ≤V i ≤V imax , generate the voltage amplitude limit inequality constraint of node i; repeat the above steps for all nodes to generate a complete set of node voltage amplitude inequality constraints and store them in the constraint data structure.

[0015] Transmission and use of constraint data structure: Store the generated node power equality constraints, branch flow inequality constraints and node voltage amplitude inequality constraints in the constraint data structure; transmit the constraint data structure to the target model construction module as the constraint condition of the target model; the target model construction module integrates the constraint data structure with the output of the predicted power demand and profit model to build a complete target model; the optimization solution module reads the constraints in the target model and ensures that the generated virtual power plant control strategy meets these constraints during the solution process. This application utilizes the topological connection information of nodes and branches, and constructs constraints such as node power balance, branch flow limitation and node voltage amplitude limitation according to the physical laws and operation requirements of the power grid. By integrating these constraints and optimization objectives into the target model, it is ensured that the generated virtual power plant control strategy meets the requirements for safe and stable operation of the power grid.

[0016] Furthermore, in the process of constructing the profit model, the revenue function and cost function of the power generation side are constructed, including: constructing the revenue function of the power generation side: reading the actual output data P of each power generation unit i from the power generation side data Gi , as the input of the revenue function; read the benchmark on-grid electricity price λ of each generator set i from the power generation side data i 、Electricity price adjustment coefficient α i and reference output P Giref , as the parameter of the profit function; for each generator set i, substitute the read data into the profit function: R Gi (P Gi )=λ i ×P Gi +α i ×max(0,P Gi -P Giref ), calculate the revenue R of generator set i Gi ; The calculated revenue data R of each generator set Gi The power generation side revenue data structure is stored in the power generation side revenue data structure; the power generation side revenue data structure is transmitted to the profit model building module as a part of the profit model.

[0017] Construct the cost function on the power generation side: Read the actual output data P of each generator set i from the power generation side data Gi , as the input of the cost function; read the cost coefficient α of each generator set i from the power generation side data i 、b i and c i and d i , and the reference output P Giref , as the parameter of the cost function; for each generator set i, substitute the read data into the cost function:

[0018] Calculate the cost C of generator set i Gi ; The calculated cost data C of each generator set Gi The cost data structure of the power generation side is stored in the power generation side cost data structure; the power generation side cost data structure is transmitted to the profit model building module as a part of the profit model.

[0019] Profit model construction: The profit model construction module receives the power generation side revenue data structure and the power generation side cost data structure; for each generator set i, read its revenue data R from the power generation side revenue data structure Gi , read its cost data C from the power generation side cost data structure Gi ; Calculate the profit of each generator set i: Profit Gi =R Gi -C Gi , which is the revenue minus the cost of generator set i; the profit data Profit of each generator set calculated Gi The profit data structure of the power generation side is stored in the power generation side profit data structure; the power generation side profit data structure is used as the output of the profit model and transmitted to the target model construction module.

[0020] Construction and solution of the target model: The target model construction module receives the output of the profit model, that is, the profit data structure on the power generation side; integrates the profit data structure on the power generation side with other inputs (such as predicted electricity demand) and constraints to construct a complete target model; transmits the constructed target model to the optimization solution module; the optimization solution module reads the target model, uses the particle swarm optimization algorithm to solve the target model, and generates a globally optimal virtual power plant control strategy. This application utilizes information such as actual output data, electricity price parameters, and cost coefficients on the power generation side, and constructs accurate revenue functions and cost functions based on the revenue and cost characteristics of the generator set. By integrating these functions into the profit model, the economic benefits of the power generation side under different scheduling strategies can be evaluated, providing important decision-making basis for the optimal scheduling of virtual power plants.

[0021] Furthermore, in the process of constructing the profit model, a grid-side utility function is constructed, including: reading the actual output data of all generator sets from the grid-side data to form an actual output vector P G ; Read the power demand data of all users from the grid side data to form the power demand vector P D ; Read user set N from grid side data D and the generator set N G Information; for user set N D Each user i in the grid reads its electricity price β from the grid side data i and power demand P Di , calculate user utility For the generator set NG Each generator set i in the grid reads its benchmark on-grid electricity price λ from the grid side data i , Actual output P Gi , output adjustment penalty coefficient γ i and reference output P Giref , calculate the cost of electricity generation and output adjustment penalty Read the information of the transmission line set L from the grid-side data; for each transmission line ij in the transmission line set L, read its overload penalty coefficient η from the grid-side data ij 、Actual trend P ij and the rated transmission power upper limit P ijmax , calculate the overload penalty∑ (i,j)∈L (η ij ×max(0,P ij |-P ijmax ) ; Substitute the calculated user utility, power generation cost, output adjustment penalty and overload penalty into the grid side utility function: Calculate the utility U on the grid side G ; The calculated grid side utility data U G Stored in the grid-side utility data structure.

[0022] Profit model construction: The profit model construction module receives the revenue data structure of the power generation side, the cost data structure of the power generation side, and the utility data structure of the power grid side; reads the revenue data of the generator set from the revenue data structure of the power generation side, reads the cost data of the generator set from the cost data structure of the power generation side, and calculates the total profit of the power generation side; reads the utility data U of the power grid side from the utility data structure of the power grid side G ; The total profit of the power generation side and the utility data U of the grid side G Add them together to get the total profit data of the entire system; the total profit data is used as the output of the profit model and transmitted to the target model building module.

[0023] Construction and solution of the target model: The target model construction module receives the output of the profit model, i.e., the total profit data; integrates the total profit data with other inputs (such as predicted electricity demand) and constraints to construct a complete target model; transmits the constructed target model to the optimization solution module; the optimization solution module reads the target model, uses the particle swarm optimization algorithm to solve the target model, and generates a globally optimal virtual power plant control strategy. In this application, multiple factors such as user utility, power generation cost, output adjustment penalty, and overload penalty are comprehensively considered, and the economic benefits of different scheduling strategies are evaluated from the overall perspective of power grid operation. By integrating the utility function on the grid side and the profit function on the power generation side into the profit model, the interests of the power generation side and the grid side can be balanced to achieve coordinated and optimized scheduling of virtual power plants.

[0024] Furthermore, the game model is constructed, including: participant setting: reading the generator group identification data from the power generation side data, and taking each generator group identification as a power generation side participant in the game model; reading the grid company identification data from the grid side data, and taking the grid company identification as the grid side participant in the game model; storing the identification data of the power generation side participant and the grid side participant in the participant data structure. Strategy space setting: for each power generation side participant, read the output data P of the corresponding generator group from the power generation side data Gi ; Based on the output data P of each generator set Gi Based on the above, the strategy space of the participants on the power generation side is set to indicate the possible output decision range of the generator set; the strategy space of the participants on the power grid side is set to an empty set, indicating that the participants on the power grid side have no decision variables; the strategy space data of the participants on the power generation side is stored in the strategy space data structure.

[0025] Payment function setting: For each power generation party, read the revenue function R of the corresponding power generation unit from the power generation data Gi (P Gi );The revenue function R of the generator set Gi (P Gi ) as the payment function of the corresponding power generation side participants, representing their benefits under different output decisions; the grid side utility function U is read from the grid side data G (P G ,P D );The utility function U on the grid side G (P G ,P D ) is used as the payment function of the grid-side participants, which represents the utility of the grid under different power generation unit output combinations; the payment function data of the power generation side participants and the payment function data of the grid-side participants are stored in the payment function data structure.

[0026] Game model construction: The game model construction module receives the participant data structure, strategy space data structure and payment function data structure; constructs the game model based on the participants on the power generation side and the grid side in the participant data structure, the strategy space of the participants on the power generation side in the strategy space data structure, and the payment function of the participants on the power generation side and the payment function of the participants on the grid side in the payment function data structure; stores the constructed game model data in the game model data structure. Game model solution: The game model solution module reads the game model data structure and solves the game model; uses an appropriate algorithm (such as best response dynamics) to solve the Nash equilibrium solution of the game model and obtain the optimal output decision of the participants on the power generation side; transmits the solved Nash equilibrium solution as the output of the profit model to the target model construction module. Construction and solution of the target model: The target model construction module receives the output of the profit model, that is, the Nash equilibrium solution of the game model; integrates the Nash equilibrium solution with other inputs (such as constraints) to construct a complete target model; transmits the constructed target model to the optimization solution module; the optimization solution module reads the target model, uses the particle swarm optimization algorithm to solve the target model, and generates the global optimal virtual power plant control strategy. In this application, the game relationship between the power generation side and the power grid side is considered. By taking the generator set and the power grid company as the game participants, setting the corresponding strategy space and payment function, a game model reflecting the interests of all parties is constructed. By solving the Nash equilibrium of the game model, the optimal output decision of the participants on the power generation side can be obtained, and the balance of interests between the power generation side and the power grid side can be achieved. Using the solution result of the game model as the output of the profit model can provide a more reasonable and fair decision-making basis for the optimal scheduling of the virtual power plant.

[0027] Furthermore, the Nash equilibrium solution of the game model is solved, including: the optimization goal construction of the power generation side participants: for each power generation side participant, the corresponding power generation side profit function R is read from the game model data structure Gi (P Gi );Maximize the revenue function R Gi (P Gi ) is the optimization objective of the i-th generation side participant, and the decision variable is the output P of the corresponding generator set. Gi ; Read the upper and lower limit data of the output of the i-th generator set from the power generation side data as the constraint conditions of the optimization target; store the constructed optimization target data of the power generation side participants in the power generation side optimization target data structure.

[0028] Construction of the optimization goal of the grid-side participants: Read the grid-side utility function U from the game model data structure G (P G ,P D );Maximize the grid side utility function U G(P G ,P D ) is the optimization target of the grid-side participants, and the decision variable is the actual output vector P of all generators on the grid side. G ; Read branch flow data and node voltage amplitude data from the grid side data, construct branch flow inequality constraints and node voltage amplitude inequality constraints as constraints for the optimization target; store the constructed grid side participant optimization target data into the grid side optimization target data structure.

[0029] Solving the optimization objectives of the participants: The optimization solution module reads the optimization objective data structure of the power generation side and the optimization objective data structure of the power grid side respectively; for each participant on the power generation side, the optimization algorithm (such as the interior point method) is used to solve its optimization objective and obtain the optimal output decision P Gi , and store the solution results in the decision data structure on the power generation side; for the grid side participants, use the optimization algorithm (such as sequential linear programming) to solve their optimization goals and obtain the optimal output vector decision P G , and store the solution results in the grid-side decision data structure. Generation of Nash equilibrium solution: The Nash equilibrium solution generation module reads the generation-side decision data structure and the grid-side decision data structure; stores the optimal output decision P of the generation-side participants. Gi and the optimal output vector decision P of the grid-side participants G Combine into a complete decision vector as the Nash equilibrium solution of the game model; store the generated Nash equilibrium solution data in the Nash equilibrium solution data structure. Construction and solution of the target model: The target model construction module receives the Nash equilibrium solution data structure; integrates the Nash equilibrium solution with other inputs (such as constraints) to construct a complete target model; transmits the constructed target model to the optimization solution module; the optimization solution module reads the target model, uses the particle swarm optimization algorithm to solve the target model, and generates the global optimal virtual power plant control strategy. In this application, according to the participants, strategy space and payment function of the game model, the optimization objectives of the participants on the power generation side and the grid side are constructed, and the optimization algorithm is used to solve the optimal decision of each participant respectively. Combining the optimal decisions of each participant into the Nash equilibrium solution of the game model can achieve a balance of interests between the power generation side and the grid side, and provide a more reasonable and fair decision-making basis for the optimal scheduling of virtual power plants.

[0030] Furthermore, the optimization algorithm is used to solve the optimization objectives of the participants on the power generation side, including: Lagrangian function construction: for each participant on the power generation side, its optimization objective function R is read from the optimization objective data structure on the power generation side. Gi (P Gi ) and decision variables P Gi ; Read the output lower limit P of the i-th generator set from the power generation side data GiminAnd the output upper limit P Gimax ; Introduce the Lagrange multipliers μ Gi and ν Gi , corresponding to the lower and upper output constraints of the i-th generator set respectively; According to the formula

[0031] L Gi (P Gi , μ Gi , ν Gi ) = R Gi (P Gi ) + μ Gi ×(P Gi - P Gimin ) + ν Gi ×(P Gimax - P Gi ), construct the Lagrangian function of the power generation side participant corresponding to the i-th generator set; Store the constructed Lagrangian function data into the Lagrangian function data structure. Gradient descent method initialization: Set the iteration counter t = 0 of the gradient descent method, the maximum number of iterations T, the learning rate α, and the iteration termination error ε; Read the initial output decision P Giinitial of the i-th generator set from the power generation side data as the initial solution of the gradient descent method; Initialize the Lagrange multipliers μ Gi and ν Gi to 0; Store the initial solution and the initial Lagrange multiplier data into the optimization algorithm initialization data structure.

[0032] Gradient descent method iterative optimization: while (t < T) do: For each power generation side participant, read its Lagrangian function L Gi (P Gi , μ Gi , ν Gi ) from the Lagrangian function data structure; Calculate the gradient ▽P Gi (P Gi , μ Gi , ν Gi ) of the Lagrangian function L Gi with respect to the decision variable P Gi ; Calculate the gradients ▽μ Gi (P Gi , μ Gi , ν Gi ) and ▽ν Gi of the Lagrangian function L Gi with respect to the Lagrange multipliers μ Gi and ν Gi ; According to the gradient descent method update rule, update the decision variable P Gi : P Gi ' = P Gi + α × ▽P Gi; Update the Lagrange multiplier μ according to the gradient descent update rule Gi and ν Gi :μ Gi '=μ Gi +α×▽μ Gi , ν Gi '=ν Gi +α×▽ν Gi ; Update the decision variable P Gi and the Lagrange multiplier μ Gi and ν Gi Store into the optimization algorithm iteration data structure; calculate the current decision variable P Gi The distance dist between the decision variable of the previous iteration; if (dist < ε) then break; set the iteration counter t = t + 1; set the final decision variable P Gi As the optimal output decision P of the i-th generator set Giopt , stored in the decision data structure on the power generation side. In this application, power generation side data → power generation side optimization target data structure → Lagrangian function data structure → optimization algorithm initialization data structure → optimization algorithm iteration data structure → power generation side decision data structure. By introducing Lagrangian multipliers, the constrained optimization problem is transformed into an unconstrained optimization problem, which simplifies the difficulty of solving the problem; the gradient descent method is used to iteratively optimize the Lagrangian function, and the optimal solution is gradually approached by continuously updating the decision variables and Lagrangian multipliers; in the iterative process, the values ​​of the decision variables and Lagrangian multipliers are adjusted according to the gradient information to move in the direction of the optimal solution, thereby improving the convergence speed of the algorithm and the quality of the solution.

[0033] Preferably, the present application can also use sequential linear programming to solve the optimization objectives of the grid-side participants, including: Linearization of the objective function: Reading the grid-side utility function U from the grid-side optimization objective data structure G (P G ,P D ) ; Linearize the utility function on the grid side, perform first-order Taylor expansion or piecewise linear approximation on the nonlinear term, and obtain the linearized objective function U Glinear (P G ,P D) Store the linearized objective function data in the linearized objective function data structure. Linearize the constraints: Read the branch power flow inequality constraints and node voltage magnitude inequality constraints from the grid-side optimization objective data structure; Linearize the non-linear constraints, for example, perform Taylor expansion on the power flow equation or use the DC power flow model for approximation to obtain the linearized constraints; Store the linearized constraint condition data in the linearized constraint condition data structure. Generate the initial feasible solution: Read information such as the grid topology structure and electrical parameters from the grid-side data; Use heuristic algorithms or linear programming methods to generate the initial feasible solution P of the grid-side participants' decision variables under the premise of satisfying the linearized constraint conditions. G of the initial feasible solution P Ginitial ; Store the initial feasible solution data in the initial feasible solution data structure. Sequential linear programming iterative solution: Set the iteration counter t = 0, the maximum number of iterations T, and the iteration termination error ε; while (t < T) do: Set the current solution P Gcurrent as the initial feasible solution P Ginitial (if t = 0) or the optimal solution P of the previous iteration Goptimal (if t > 0); According to the current solution P Gcurrent , update the linearization parameters in the linearized objective function U Glinear (P G , P D ); According to the current solution P Gcurrent , update the linearization parameters in the linearized constraint conditions; Use the linear programming algorithm (such as the simplex method or the interior point method) to solve the updated linearized objective function and constraints to obtain the new optimal solution P Goptimal ; Calculate the distance dist between the current solution P Gcurrent and the new optimal solution P Goptimal ; if (dist < ε) then break; Set the iteration counter t = t + 1; Store the finally obtained optimal solution P Goptimal as the optimal output vector decision of the grid-side participants and store it in the grid-side decision data structure.

[0034] Furthermore, using the optimization algorithm to solve the grid-side participants' optimization objective also includes: Construct the barrier function: Read the grid-side utility function U G (P G , P D ), the decision variables P G and P D from the grid-side optimization objective data structure; Read the branch power flow inequality constraints and node voltage magnitude inequality constraints from the grid-side data to determine the number k of inequality constraints; Introduce the slack variable vector s = [s1, s2,......, s k, introduce a slack variable for each inequality constraint; set the initial value of the barrier factor μ to control the influence of the barrier term; according to formula B G (P G ,P D ,s) = U G (P G ,P D ) - μ × ∑lns i , construct the barrier function of the grid-side participants; store the constructed barrier function data in the barrier function data structure. Newton's method initialization: set the iteration counter t = 0 of Newton's method, the maximum number of iterations T, and the iteration termination error ε; read the initial output decision P Ginitial of the grid-side participants from the grid-side data as the initial solution of Newton's method; initialize the slack variable vector s to satisfy the inequality constraint; store the initial solution and the initial slack variable data in the optimization algorithm initialization data structure.

[0035] Newton's method iterative optimization: while (t < T) do: read the barrier function B G (P G ,P D ,s) of the grid-side participants from the barrier function data structure; calculate the first-order derivative vector ▽B G (P G ,P D ,s) with respect to the decision variable P G and the slack variable s, and the second-order Hesse matrix HB G ; use Newton's method to update the decision variable P G and the slack variable G ; Store the updated decision variable P G and the slack variable s in the optimization algorithm iteration data structure; calculate the distance dist between the current decision variable P G and the decision variable of the previous iteration; if (dist < ε) then break; set the iteration counter t = t + 1; update the barrier factor μ and decrease its value to weaken the influence of the barrier term; end while. Take the finally obtained decision variable P G as the optimal output decision vector P Gopt, stored in the grid-side decision data structure. In this application, grid-side data → grid-side optimization target data structure → barrier function data structure → optimization algorithm initialization data structure → optimization algorithm iteration data structure → grid-side decision data structure. By introducing slack variables and barrier functions, the optimization problem with inequality constraints is transformed into an unconstrained optimization problem, which simplifies the difficulty of solving the problem; the barrier function is iteratively optimized using Newton's method, and the optimal solution is efficiently searched through the first-order derivative and second-order Hesse matrix information; in the iterative process, by updating the barrier factor, the influence of the barrier term is gradually reduced, so that the solution approaches the optimal solution of the original problem.

[0036] Another aspect of the present specification also provides a fast response control system for a virtual power plant, which is used to execute a fast response control method for a virtual power plant provided in the present application, and a game model construction module, which constructs a game model according to the participant information, strategy space and payment function of the virtual power plant, and provides a basis for the subsequent solution of Nash equilibrium. The game model construction module receives the participant information, strategy space and payment function data from the virtual power plant database, and after constructing the game model, sends the game model data to the power generation side optimization module and the power grid side optimization module. Power generation side optimization module: According to the game model, the optimization target of the power generation side participants is constructed, and the optimal output decision of the power generation side participants is solved by the gradient descent method. The power generation side optimization module receives the game model data sent by the game model construction module, constructs the optimization target of the power generation side, and solves it by the gradient descent method, and sends the solved optimal output decision of the power generation side to the Nash equilibrium solution module. The power grid side optimization module: According to the game model, the optimization target of the power grid side participants is constructed, and the optimal output decision vector of the power grid side participants is solved by the interior point method. The grid-side optimization module receives the game model data sent by the game model construction module, constructs the grid-side optimization target, and solves it using the interior point method, and sends the solved grid-side optimal output decision vector to the Nash equilibrium solution module. The Nash equilibrium solution module combines the optimal output decision of the power generation side obtained by the power generation side optimization module and the optimal output decision vector of the power grid side obtained by the power grid side optimization module into the Nash equilibrium solution of the game model. The Nash equilibrium solution module receives the optimal output decision of the power generation side sent by the power generation side optimization module and the optimal output decision vector of the power grid side sent by the power grid side optimization module, combines them into a Nash equilibrium solution, and sends the Nash equilibrium solution to the virtual power plant scheduling optimization module. The virtual power plant scheduling optimization module uses the particle swarm optimization algorithm to generate the optimal scheduling strategy of the virtual power plant based on the Nash equilibrium solution obtained by the Nash equilibrium solution module, combined with other virtual power plant operation constraints and optimization objectives. The virtual power plant dispatch optimization module receives the Nash equilibrium solution sent by the Nash equilibrium solver module, and at the same time receives other operating constraints and optimization target data from the virtual power plant database, uses the particle swarm optimization algorithm to perform global optimization, generates the optimal dispatch strategy for the virtual power plant, and sends the dispatch strategy to the virtual power plant control system for execution.

[0037] 3. Beneficial effects

[0038] Compared with the prior art, the advantages of this application are:

[0039] By collecting multi-source data from the power generation side, the grid side, and the user side, and using LSTM to build a demand forecasting model, the electricity demand in each period can be accurately predicted, providing reliable input data for the optimization of the virtual power plant control strategy;

[0040] Convert the grid topology data into linear equality constraints and inequality constraints as the constraints of the target model to ensure that the generated virtual power plant control strategy meets the physical characteristics and operation constraints of the grid;

[0041] Constructing a profit model that includes the revenue function and cost function of the power generation side and the utility function of the power grid side, and setting up a game model in it, can effectively balance the interests of power generation companies and power grid companies and achieve a win-win situation for all parties;

[0042] Based on the game equilibrium, the optimization objectives of each participant are solved. Mathematical optimization algorithms such as Lagrange relaxation method, gradient descent method, interior point method and Newton method are used to efficiently solve the optimal decision-making of the power generation side and the power grid side, ensuring the rationality and feasibility of the profit model output;

[0043] The particle swarm optimization algorithm is used to solve the target model. The predicted electricity demand, the output of the profit model and the grid constraints are taken as input. The global optimal virtual power plant regulation strategy can be quickly searched to achieve rapid response control of the virtual power plant. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 is an exemplary flow chart of a method for rapid response control of a virtual power plant according to some embodiments of this specification;

[0045] Figure 2 is an exemplary flow chart of constructing a game model according to some embodiments of this specification;

[0046] Figure 3 is an exemplary flow chart of obtaining constraint conditions according to some embodiments of this specification;

[0047] Figure 4 It is an exemplary flow chart for obtaining the optimal strategy according to some embodiments of this specification. DETAILED DESCRIPTION

[0048] The method and system provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0049] Figure 1It is an exemplary flow chart of a method for rapid response control of a virtual power plant according to some embodiments of this specification, which collects data on the power generation side, including output data and power generation cost data of the generator set. Relevant data can be monitored and collected in real time by installing smart meters and sensors on the generator set. Grid-side data is collected, including grid topology data and on-grid electricity price data. Real-time grid operation status and electricity price information can be obtained by docking with the grid dispatching system. User-side data is collected, including user electricity consumption history data. The user's historical data such as electricity consumption, voltage, and power can be obtained by docking with the electricity consumption information collection system. The collected data is preprocessed, such as denoising and normalization, to improve data quality and provide accurate input for subsequent prediction and optimization.

[0050] Based on the collected user-side data, a demand forecasting model is constructed. The long short-term memory network (LSTM) is selected as the architecture of the forecasting model, taking advantage of its advantages in modeling time series data. Feature engineering is performed on the user's historical electricity consumption data to extract features related to electricity demand, such as time features (season, month, weekday, etc.), weather features (temperature, humidity, etc.). The processed features are input into the LSTM model, and the nonlinear relationship between electricity demand and features is learned through training and optimization. The trained LSTM model is used to predict electricity demand in each future period to provide demand-side information for the regulation strategy of the virtual power plant.

[0051] The profit model of the virtual power plant is constructed based on the collected data on the power generation side, the grid side data and the predicted electricity demand. The profit model takes into account the power generation cost on the power generation side, the grid-connected electricity price on the grid side and the predicted electricity demand, and calculates the benefits of the virtual power plant under different control strategies. A game model is introduced into the profit model to balance the interests of the power generation side and the grid side. The game model can adopt methods such as Nash equilibrium and hierarchical analysis method to consider the strategies and benefits of all parties and solve the game equilibrium point. The results of the game model are used as part of the profit model, and the interests of all parties are comprehensively considered to obtain the optimal benefits of the virtual power plant.

[0052] The target model is constructed, and the predicted electricity demand and the output of the profit model are used as optimization targets, and the grid topology data is used as a constraint. The decision variable of the target model is the output dispatch strategy of each generator set in the virtual power plant, and the objective function is to maximize the comprehensive benefits of the virtual power plant. The particle swarm optimization (PSO) algorithm is used to solve the target model. The PSO algorithm searches for the optimal solution in the solution space by simulating the foraging behavior of bird flocks, and has a strong global optimization capability. The grid topology is used as a constraint to ensure that the generated control strategy meets the physical constraints and safe operation requirements of the grid. Through the iterative optimization of the PSO algorithm, the globally optimal virtual power plant control strategy is obtained to achieve rapid response and maximized benefits.

[0053] The optimal control strategy generated by the global optimization module is sent to each generator set and the power grid dispatching system. The generator set adjusts the operating status of the generator set in real time according to the received output command to achieve rapid response. The power grid dispatching system optimizes the operation mode of the power grid according to the received control strategy to ensure power balance and power supply reliability. Through the strategy execution module, the optimized control strategy of the virtual power plant is converted into specific control instructions to achieve real-time control and rapid response of the virtual power plant.

[0054] Data collection, data collection and storage on the power generation side: install smart meters and data collectors on each generator set to collect the output data of the generator set in real time, including active power, reactive power and electric energy; in the control system of the generator set, record the start and stop time, fuel consumption and operation and maintenance cost of the generator set as the power generation cost data; assign a unique identification code to each generator set as the generator set identification data; transmit the collected output data, power generation cost data and generator set identification data to the power generation side database of the virtual power plant in real time through a wired or wireless communication network; in the power generation side database, store and manage the data according to the generator set identification code and timestamp to form a structured power generation side data set.

[0055] Data collection and storage on the power grid side: Obtain power grid topology data from the power grid dispatching system, including information such as nodes, branches and connection relationships; obtain on-grid electricity price data from the power grid market management system, including information such as electricity prices and electricity consumption in different time periods; obtain power grid company identification data from the power grid enterprise information system, including the name, number and contact information of the power grid company; transmit the obtained power grid topology data, on-grid electricity price data and power grid company identification data to the power grid side database of the virtual power plant through the data interface; in the power grid side database, store and manage data according to data type and timestamp to form a structured power grid side data set.

[0056] User-side data collection and storage: Install smart meters at each user to collect the user's electricity consumption data in real time, including active power, reactive power and electric energy, etc.; Summarize and upload the collected user electricity consumption data at certain time intervals (such as 15 minutes) through the electricity consumption information collection system; Transmit the aggregated user electricity consumption data to the user-side database of the virtual power plant through the communication network; In the user-side database, store and manage the data according to the user identification code and timestamp to form a structured user electricity consumption history data set. For the data collection and transmission process on the power generation side, the power grid side and the user side, encryption technology and secure communication protocols are used to ensure the confidentiality and integrity of the data; In the power generation side, the power grid side and the user side database, access control and permission management mechanisms are used to prevent unauthorized data access and leakage; For data involving user privacy, such as electricity usage addresses and electricity bills, desensitization is performed to ensure that user privacy is protected.

[0057] Demand forecasting, data preprocessing: Read the user's electricity consumption history data from the user-side database, sort and aggregate it according to the user identification code and timestamp; clean and process the user's electricity consumption history data, and remove invalid or abnormal data points; normalize the user's electricity consumption history data, scale the data to the [0, 1] interval, and improve the convergence speed and stability of model training. Feature engineering: Extract relevant time features such as hours, days, weeks, months, and seasons based on the user's electricity consumption history data; calculate the statistical features of the electricity load, such as the average, maximum, minimum, and standard deviation, based on the user's electricity consumption history data; introduce external features such as user type, weather conditions, and holidays based on user attributes and environmental factors. Model construction: Use the long short-term memory network (LSTM) to build a demand forecasting model, set the structure and parameters of the input layer, hidden layer and output layer; input the preprocessed user electricity consumption history data and extracted features into the LSTM model for model training; use the error back propagation algorithm and gradient descent optimization algorithm to adjust the weight and bias parameters of the LSTM model to minimize the prediction error; use cross-validation and grid search techniques to tune the hyperparameters of the LSTM model to improve the generalization ability of the model. Demand forecasting: Apply the trained LSTM model to new input data to predict the electricity demand in each future period; for each period, input the historical data and external features into the LSTM model to obtain the electricity demand forecast value for that period; store and manage the prediction results according to the timestamp and user identification code to form a structured demand forecasting data set. Evaluation and optimization of forecast results: Use evaluation indicators such as root mean square error (RMSE) and mean absolute percentage error (MAPE) to evaluate the accuracy and reliability of the demand forecast model; for time periods or users with large forecast errors, analyze the causes of the errors, and adjust factors such as model structure, feature selection and data quality to optimize the model; regularly update user electricity consumption history data and external features, retrain and optimize the demand forecast model, and improve the real-time and adaptability of the forecast. Application of demand forecast results: Transmit the demand forecast data set to the scheduling optimization system and energy management system of the virtual power plant as input conditions for power scheduling and energy optimization; optimize the power generation plan, energy storage strategy and demand response plan of the virtual power plant based on the demand forecast results to improve the economy and reliability of the power system; compare and analyze the demand forecast results with the actual electricity consumption data, evaluate the actual effect of the forecast model, and continuously improve the demand forecast method and model.

[0058] Profit model construction, data reading and preprocessing: read the output data and power generation cost data of the generator set from the power generation side database, sort and aggregate according to the generator set identification code and timestamp; read the on-grid electricity price data from the grid side database, sort and aggregate according to the timestamp; read the predicted electricity demand data from the demand forecast database, sort and aggregate according to the timestamp; clean and process the read data, remove invalid or abnormal data points, and ensure the accuracy and consistency of the data.

[0059] Generation side revenue function: For each generator set i, its revenue function is defined as R Gi (P Gi ), indicating that the unit is at output level P Gi The profit function consists of two parts: benchmark profit and output adjustment profit. The benchmark profit is the benchmark on-grid electricity price λ_i of the generator multiplied by the actual output P Gi , represents the power generation income under the benchmark electricity price; the output adjustment income is the actual output of the generator set P Gi With reference output P Giref The difference is multiplied by the electricity price adjustment coefficient α i , indicating the additional benefits or costs obtained from output adjustment; when the actual output is greater than the reference output, the output adjustment benefit is positive, indicating additional benefits; when the actual output is less than or equal to the reference output, the output adjustment benefit is zero, indicating no additional benefits; the electricity price adjustment coefficient α_i reflects the enthusiasm and flexibility of the generator set to participate in the peak load regulation of the power grid, and can be set according to factors such as the unit type and peak load regulation capacity; the reference output P Giref It can be determined based on factors such as the historical operating data of the generator set and the results of optimized scheduling, and serve as a benchmark for evaluating the benefits of output adjustment.

[0060] Cost function on the power generation side: For each power generation unit i, its cost function is defined as C Gi (P Gi ), indicating that the unit is at output level P Gi The cost function consists of three parts: quadratic cost, linear cost and constant cost. The quadratic cost is the square of the output multiplied by the coefficient α i , reflecting the nonlinear characteristics of power generation costs; the primary cost is the output multiplied by the coefficient b i , reflecting the linear characteristics of power generation cost; the constant cost is the coefficient c i , which reflects the fixed cost of power generation; the cost function also includes an output adjustment cost, which is the actual output of the generator set P Gi With reference output P Giref The absolute value of the difference is multiplied by the output adjustment cost coefficient d i, which represents the additional cost caused by output adjustment; the output adjustment cost coefficient d_i reflects the difficulty and cost of adjusting the output of the generator set, which can be set according to factors such as the start-stop characteristics and climbing rate of the unit; refer to the output P Giref The setting of is consistent with the reference output in the benefit function and serves as the benchmark for evaluating the output adjustment cost.

[0061] There is a coal-fired generator in a virtual power plant, and its base grid-connected electricity price λ i The electricity price adjustment coefficient is 0.4 yuan / kWh. i 0.1 yuan / kWh, reference output P Giref is 200MW; the cost coefficient a_i of the generator set is 0.00001 yuan / MW^2, b i 0.1 yuan / MW, c i is 1000 yuan, and the output adjustment cost coefficient d i is 0.05 yuan / MW; when the actual output of the generator set P Gi When it is 250MW, its revenue function is: R_Gi(250)

[0062] =0.4×250+0.1×max(0,250-200)=105 yuan / h, that is, the base income is 100 yuan / h, and the output adjustment income is 5 yuan / h;

[0063] The cost function of the generator set is:

[0064] C_Gi(250)=0.00001×250^2+0.1×250+1000+0.05×|250-200|=1628.75 yuan / h, that is, the quadratic cost is 6.25 yuan / h, the primary cost is 25 yuan / h, the constant cost is 1000 yuan / h, and the output adjustment cost is 97.5 yuan / h; based on the comprehensive benefit function and cost function, the net profit of the generator set at an output level of 250MW is 105-1628.75=-1523.75 yuan / h, which means that at the current output level, the unit is in a loss state and needs to adjust the output or optimize the parameters to improve profitability.

[0065] Grid side utility function: Define the utility function on the grid side as U G (P G ,P D ), indicating the power vector P of the generator set G and the user's electricity demand vector P DUnder this condition, the comprehensive utility of the power grid company; the utility function contains four parts: electricity sales revenue, electricity purchase cost, power generation adjustment penalty and transmission line overload penalty. The electricity sales revenue is the sum of the electricity sales price of all users multiplied by the corresponding electricity demand, which represents the income obtained by the power grid company from selling electricity to users; the electricity purchase cost is the sum of the benchmark on-grid electricity price of all generators multiplied by the corresponding actual output, which represents the expenditure of the power grid company on purchasing electricity from power generation enterprises; the power generation adjustment penalty is the sum of the output adjustment range of all generators multiplied by the corresponding output adjustment penalty coefficient, which represents the economic penalty for the output deviation of the generator set from the reference value, prompting the generator set to operate according to the reference output and reduce the peak load cost; the transmission line overload penalty is the sum of the overload power of all transmission lines multiplied by the corresponding overload penalty coefficient, which represents the economic penalty for the degree of violation of the safety constraints of the transmission line, prompting the transmission line flow control to be within the rated transmission power range to ensure the safe and stable operation of the power grid; the electricity sales price β i , output adjustment penalty coefficient γ i and the overload penalty coefficient η ij It can be set according to the actual situation of power grid operation and management objectives, reflecting the utility preferences and constraints of the power grid company.

[0066] There are two generators and three users in a virtual power plant. The base grid-connected electricity prices of the generators are 0.4 yuan / kWh and 0.5 yuan / kWh, the output adjustment penalty coefficients are 0.1 yuan / MW and 0.2 yuan / MW, and the reference outputs are 200MW and 150MW. The electricity prices of the users are 0.6 yuan / kWh, 0.7 yuan / kWh and 0.8 yuan / kWh, and the electricity demands are 100MW, 150MW and 200MW. There are two transmission lines in the virtual power plant, with the upper limits of rated transmission power. When the actual output of the generator set is 250MW and 100MW, and the actual power flow of the transmission line is 280MW and 260MW, the utility function of the grid side is: U_G(P_G, P_D)=0.6×100+0.7×150+0.8×200-0.4×250-0.5×100-0.1×|250-200|-0.2×|100-150|-1×max(0,

[0067] |280-300|)-2×max(0,|260-250|)=60+105+160-100-50-5-10-0-20=140 yuan / h. The calculation result of the comprehensive utility function shows that under the current output and power flow status, the comprehensive utility of the power grid company is 140 yuan / h, of which the electricity sales revenue is 325 yuan / h, the electricity purchase cost is 150 yuan / h, the power generation adjustment penalty is 15 yuan / h, and the transmission line overload penalty is 20 yuan / h. The power grid company can maximize its comprehensive utility and achieve the economy and reliability of power grid operation by optimizing the output of generator sets and the power flow of transmission lines while meeting the power balance and safety constraints.

[0068] Figure 2 is an exemplary flow chart of building a game model according to some embodiments of this specification. The game model is built by extracting the generator set identification data from the power generation side data, taking each generator set as a power generation side participant in the game model, and forming a power generation side participant set N G ; Extract the grid company identification data from the grid side data, and use the grid company as the grid side participant in the game model; for each power generation side participant i, according to the output data P of its corresponding generator set Gi , set its strategy space to [P Gimin ,P Gimax ], indicating the output adjustment range of the generator set, where P Gimin and P Gimax are the minimum and maximum outputs of the i-th generator set, respectively; the strategy space of the grid-side participants is set to an empty set, indicating that the grid company does not directly participate in the output adjustment decision, but influences the decision of the generation-side participants through the utility function; for each generation-side participant i, the revenue function R of its corresponding generator set is Gi (P Gi ) as its payment function, which represents the economic benefits of the participant at different output levels; the grid-side utility function U G (P G ,P D ) is used as the payment function of the grid-side participants, which represents the comprehensive utility of the grid company under different combinations of power generation output and electricity demand. Based on the above-set participants, strategy space and payment function, a game model is constructed to form a multi-participant non-cooperative game problem.

[0069] Figure 3 is an exemplary flow chart for obtaining constraint conditions according to some embodiments of this specification. The game model is solved: the optimization target of the participants is constructed: for each power generation side participant i, its optimization target is constructed to maximize the power generation side profit function R Gi (P Gi ), the decision variable is the output P of the generator setGi , the constraints are the upper and lower limits of the output of the generator set [P Gimin ,P Gimax ]; For the grid-side participants, the optimization objective is to maximize the grid-side utility function U G (P G ,P D ), the decision variable is the actual output vector P of all generator sets G , the constraints are the branch power flow inequality constraints and the node voltage amplitude inequality constraints.

[0070] Optimization solution for power generation side participants: Convert the optimization objective of each power generation side participant i into an unconstrained optimization objective and introduce the Lagrange multiplier μ Gi and ν Gi , construct the Lagrangian function L Gi (P Gi ,μ Gi ,ν Gi );Use gradient descent method to iteratively update the decision variable P Gi and the Lagrange multiplier μ Gi and ν Gi , the process is as follows: Initialize P Gi , μ Gi and ν Gi , set the iteration step size α and the termination condition ε; calculate L Gi (P Gi ,μ Gi ,ν Gi ) Gi , μ Gi and ν Gi The gradient of P is updated according to the gradient direction: Gi '=P Gi +α×▽P Gi , μ Gi '=μ Gi +α×▽μ Gi , ν Gi '=ν Gi +α×▽ν Gi , determine whether the termination condition is met, P Gimin <P Gi <P Gimax , if satisfied, the iteration is terminated, otherwise it is returned; P at the end of the iteration Gi That is, the optimal output decision P of the power generation side participant i Giopt .

[0071] Optimization solution for grid-side participants: Introduce slack variables s to convert the inequality constraints of grid-side participants into equality constraints and construct the barrier function B G (P G ,PD ,s); use the interior point method to iteratively solve the maximization problem of the barrier function. The process is as follows: Initialize P G , s and the barrier factor μ, set the iteration step α and the termination condition ε; calculate B G (P G ,P D ,s) gradient and Hesse matrix, construct Newton equations: ▽ 2 B G ×Δ=-▽B G , where ▽B G and 2 B G are the gradient and Hesse matrix of the barrier function, respectively, and Δ is the Newton direction; solve the Newton equation, get the Newton direction Δ, and update the decision variables and slack variables: P G '=P G +α×ΔP,s'=s+α×Δs, where ΔP and Δs are the corresponding P in Δ G and s; update the barrier factor μ = β × μ, where β is the attenuation rate of the barrier factor, and its value is between (0, 1); determine whether the termination condition is met, such as |▽B G |<ε and s>0, if satisfied, the iteration is terminated, otherwise return to the step; P at the end of the iteration G That is, the optimal output decision P of the grid-side participants Giopt Determination of Nash equilibrium solution: The optimal output decision P of each power generation party is Giopt and the optimal output decision P of the grid-side participants Giopt Combination to form the Nash equilibrium solution of the game model (P G1opt ,P G2opt ,......,P Gnopt ); The Nash equilibrium solution is used as the output of the profit model to guide the actual operation and scheduling of the virtual power plant.

[0072] In a virtual power plant game model, there are three participants on the generation side and one participant on the grid side. The upper and lower limits of the output of the generator set are [50, 200], [80, 250] and [100, 300] respectively. The branch flow and node voltage amplitude constraints are given. The gradient descent method is used to solve the optimization objective of the participant 1 on the generation side, and its optimal output decision is P_G1_opt=180MW. Similarly, the optimization objectives of the participants 2 and 3 on the generation side are solved, and P_G2_opt=220MW is obtained. P_G3_opt=250MW; the interior point method is used to solve the optimization objectives of the grid-side participants. After 20 iterations, the termination conditions are met and the optimal output decision P_G_opt=[180, 220, 270]MW is obtained; P_G1_opt, P_G2_opt, P_G3_opt and P_G_opt are combined to obtain the Nash equilibrium solution of the game model (180, 220, 250, [180, 220, 270]), which is used as the output of the virtual power plant profit model.

[0073] Figure 4 This is an exemplary flow chart for obtaining the optimal strategy according to some embodiments of this specification. Step 4: Target model construction and solution, data reading and conversion: read the power grid topology data from the power grid side database, including node, branch and connection relationship information; extract the node set N, branch set L and connection matrix A in the power grid topology data, where A[i, j] = 1 indicates that there is a connection between nodes i and j, otherwise A[i, j] = 0; according to the nodes, branches and connection relationships, convert to the following constraints: Node power equation constraint: For each node i, there is ∑ j∈I(i) P ij -∑ j∈O(i) P ij +P Gi -P Di = 0, where i represents a node, I(i) represents the set of branches ending at node i, O(i) represents the set of branches starting at node i, and P ij represents the active power from node i to node j, P Gi represents the active power output of the generator at node i, P Di represents the active power of the load at node i; branch power flow inequality constraint: for each branch ij, |P ij |≤P ijmax , where P ijmax is the upper limit of the transmission capacity of branch ij; c. Node voltage amplitude inequality constraint: For each node i, V imin ≤V i ≤V imax , where V_i is the voltage amplitude of node i, V imin and V imaxare the voltage lower limit and upper limit of node i respectively; the predicted power demand data P is read from the demand forecast database D , represented as the node power demand vector; read the Nash equilibrium solution of the game model from the game model database, including the optimized output P of each power generation side participant Giopt and the optimal power purchase decision of the grid-side participants Gopt .

[0074] Target model construction: The predicted electricity demand data P D The Nash equilibrium solution of the game model P Giopt , P Gopt As the input of the target model, P Giopt represents the established output of the participants on the power generation side, P Gopt Represents the power purchase plan of the grid-side participants; takes the converted node power equality constraint, branch power flow inequality constraint and node voltage amplitude inequality constraint as the constraint conditions of the target model; constructs the target model, the objective function is to minimize the operating cost of the virtual power plant, and the decision variable is the actual output adjustment ΔP of each generator set Gi and the adjustment amount of power purchase plan ΔP G , of the following form:

[0075]

[0076]

[0077] Among them, C Gi and C G are the output adjustment cost coefficients of generator set i and the grid side, N G is the number of generating units, ΔP Gimin , ΔP Gimax and ΔP Gmin , ΔP Gmax They are the constraint ranges of generator set output adjustment and power purchase plan adjustment respectively.

[0078] Target model solution: The target model is solved using the particle swarm optimization algorithm. The specific steps are as follows: Initialize the particle swarm and set the number of particles N p , maximum number of iterations T max , learning factors c1 and c2, inertia weight w, randomly generate the initial position x and velocity v of each particle, where the dimension of the particle is ΔP Gi and ΔP GThe total number of particles; for each particle, calculate the objective function value corresponding to its position as the fitness value of the particle; take the current position of each particle as its individual optimal position p_best, and take the position with the best fitness in the particle group as the global optimal position g_best; iteratively update the speed and position of the particle, for the jth dimension of the ith particle, there are:

[0079] v ij (t+1)=w×v ij (t)+c1×r1×(p bestij -x ij (t))+c2×r2×(g bestj -x ij (t)),

[0080] x ij (t+1)=x ij (t)+v ij (t+1), where t is the current iteration number, r1 and r2 are random numbers between [0, 1]; according to the updated particle position, recalculate the fitness value and update the individual optimal position p best and the global optimal position g best ; Determine whether the termination condition is met, such as reaching the maximum number of iterations or the fitness value converges. If so, terminate the iteration, otherwise return; the global optimal position g at the end of the iteration best That is the solution of the particle swarm optimization algorithm, which is used as the global optimal control strategy of the virtual power plant (ΔP G1opt ,ΔP G2opt ,......,ΔP Gnopt ,P Gopt ).

[0081] A virtual power plant has 10 nodes and 12 branches, of which G1D7 is a power node. According to the grid topology, node power equality constraints, branch power flow inequality constraints and node voltage amplitude inequality constraints are constructed. The power demand forecast data for the next hour P_D = [50, 80, 60, 70, 90, 40, 30] MW is read from the demand forecast database. The game equilibrium solution is read from the game model database, and the optimized output of the power generation side is P_G1_opt = 180MW. , P_G2_opt=200MW, P_G3_opt=220MW, the optimized power purchase decision on the grid side P_G_opt=[180,200,240]MW; construct the target model, consider the output adjustment cost of the generator set and the grid side, constrain the output adjustment range of the generator set to [-20,20]MW, and the adjustment range of the power purchase plan to [-30,30]MW; use the particle swarm optimization algorithm to solve the target model, and set the number of particles N_p=50.

[0082] Strategy execution, sending the global optimal virtual power plant control strategy: the global optimal virtual power plant control strategy (ΔP G1opt ,ΔP G2opt ,......,ΔP Gnopt ,P Gopt ) is sent to the virtual power plant control system through the communication interface; after receiving the control strategy, the virtual power plant control system analyzes and verifies the strategy to ensure the effectiveness and executability of the strategy; the virtual power plant control system converts the analyzed control strategy into specific output adjustment instructions for each generator set and power purchase plan adjustment instructions on the grid side. Rapid response control of virtual power plants: The virtual power plant control system sends output adjustment instructions to each generator set through the communication network. The instructions include: the identification number of the generator set; the direction (increase or decrease) and amplitude (ΔP_Gi_opt) of the output adjustment; the start time and duration of the output adjustment; after receiving the output adjustment instruction, each generator set adjusts the output of the generator set according to the instruction requirements: if the instruction requires an increase in output, the generator set increases the output power of the generator set by increasing fuel input, adjusting the valve opening, etc.; if the instruction requires a decrease in output, the generator set reduces the output power of the generator set by reducing fuel input, adjusting the valve opening, etc.; the output adjustment process of the generator set needs to meet the technical constraints of the unit, such as climbing rate, maximum output and other restrictions.

[0083] After the generator set completes the output adjustment, it will feed back the adjustment results to the virtual power plant control system, including: the actual output adjustment of the generator set ΔP_Gi_actual; the start time and end time of the output adjustment; abnormal conditions during the adjustment process (if any); the virtual power plant control system collects the output adjustment feedback of each generator set and evaluates the actual response effect of the virtual power plant: calculates the actual total output adjustment of the virtual power plant ΣΔP_Gi_actual, and compares it with the planned total output adjustment ΣΔP_Gi_opt to evaluate the response accuracy of the virtual power plant; counts the response delay of the generator set and evaluates the response speed of the virtual power plant; records abnormal conditions during the regulation process, analyzes the causes and formulates improvement measures; the virtual power plant control system makes necessary corrections and optimizations to the regulation strategy based on the actual response effect, such as adjusting the output adjustment amplitude of the generator set, optimizing the calculation process of the regulation strategy, etc., to improve the control performance of the virtual power plant.

[0084] In this embodiment, the virtual power plant control system receives the global optimal control strategy (ΔP_G1_opt=15MW, ΔP_G2_opt=-10MW, ΔP_G3_opt=20MW, ΔP_G_opt=-30MW), analyzes and converts the strategy; the virtual power plant control system issues a power adjustment instruction to the generator set G1 "increase output by 15MW, duration of 1 hour", issues a power adjustment instruction to the generator set G2 "reduce output by 10MW, duration of 1 hour", and issues a power adjustment instruction to the generator set G3 "increase output by 20MW, duration of 1 hour"; after receiving the output adjustment instruction, the generator sets G1, G2, and G3 take corresponding measures to adjust the unit output: G1 increases fuel input within 10 minutes. The output of G1 is increased from 180MW to 195MW within 8 minutes; G2 reduces the output from 200MW to 190MW within 8 minutes by adjusting the valve opening; G3 increases the output from 220MW to 240MW within 12 minutes by increasing the fuel input; after the generator set completes the output adjustment, it feeds back the actual output adjustment amount, adjustment time and other information to the virtual power plant control system; the virtual power plant control system collects the feedback information of the generator set, calculates the actual total output adjustment amount to 25MW, which is consistent with the planned 25MW, and the response accuracy is 100%; the average response delay of the generator set is 10 minutes, which meets the response speed requirements of the virtual power plant; the virtual power plant control system records the execution of this regulation process, evaluates and optimizes the regulation strategy, and provides a reference for the next regulation.

Claims

1. A rapid response control method for a virtual power plant, comprising: Step 1: Collect data from the power generation side, the power grid side and the user side; the power generation side data includes the output data and power generation cost data of the power generation unit; the power grid side data includes the power grid topology data and the on-grid electricity price data; the user side data includes the user's electricity consumption history data; Step 2: Using the collected user-side data, a demand forecasting model is constructed based on the long short-term memory network (LSTM); the electricity demand in each period is predicted through the demand forecasting model; Step 3: Build a profit model based on the collected data on the power generation side, the power grid side and the power demand; set up a game model in the profit model, and the game model is used to balance the interests of the power generation side and the power grid side; Step 4: Build a target model, take the predicted electricity demand and profit model output as input, and use the grid topology data as constraints; use the particle swarm optimization algorithm to solve the target model and generate the global optimal virtual power plant control strategy.

2. The rapid response control method for a virtual power plant according to claim 1, characterized in that: The grid topology data is used as constraints, including: Obtaining grid topology data; Extract nodes, branches and connection relationships in power grid topology data; Convert the extracted nodes, branches and connection relationships into linear inequality constraints and equality constraints; The converted linear inequality constraints and equality constraints are used as constraints of the target model and input into the target model so that the global optimal virtual power plant control strategy generated by the target model meets the restrictions of the grid topology connection and the power flow constraints.

3. The rapid response control method for a virtual power plant according to claim 2 is characterized in that: Convert the extracted nodes, branches, and connections into linear inequality constraints and equality constraints, including: Construct node power equality constraints: ∑ j∈I(i) P ij -∑ j∈O(i) P ij +P Gi -P Di =0 Where i represents a node, I(i) represents the set of branches ending at node i, O(i) represents the set of branches starting at node i, and P ij represents the active power from node i to node j, P Gi represents the active power output of the generator at node i, P Di represents the load active power at node i; Construct branch power flow inequality constraints: |P ij |≤P ijmax Among them, P ijmax represents the maximum transmission power limit of branch ij; Construct node voltage magnitude inequality constraints: In imin ≤V i ≤V imax Among them, V i Represents the voltage amplitude at node i, V imin and V imax They represent the lower and upper limits of the voltage amplitude at node i respectively.

4. The rapid response control method for a virtual power plant according to claim 2 or 3, characterized in that: The process of building a profit model includes: Construct the revenue function of the power generation side: R Gi (P Gi )=λ i ×P Gi +a i ×max(0,P Gi -P Giref ) Among them, R Gi represents the revenue of the ith generator unit, P Gi represents the actual output of the i-th generator set, λ i represents the benchmark on-grid electricity price of the i-th generator set, α i represents the electricity price adjustment coefficient of the i-th generator set, P Giref represents the reference output of the i-th generator set; Construct the cost function on the power generation side: Among them, C Gi represents the cost of the i-th generator set, P Gi represents the actual output of the i-th generator set, α i 、b i and c i represents the cost coefficient of the i-th generator set, corresponding to the quadratic term coefficient, the linear term coefficient and the constant term coefficient, d i represents the output adjustment cost coefficient of the i-th generator set, P Giref Represents the reference output of the i-th generator set.

5. The rapid response control method for a virtual power plant according to claim 4 is characterized in that: The process of building a profit model also includes: Construct the utility function on the grid side: Among them, U G represents the utility on the grid side, P G Represents the actual output vector of all generator sets, P D Represents the electricity demand vector of all users, N D represents the user set, N G represents the set of generators, β i represents the electricity price of the i-th user, P Di represents the electricity demand of the i-th user, λ i represents the benchmark on-grid electricity price of the ith generator set, P Gi represents the actual output of the i-th generator set, γ i represents the output adjustment penalty coefficient of the i-th generator set, P Giref represents the reference output of the ith generator set, L represents the set of transmission lines, η ij represents the overload penalty coefficient of transmission line ij, P ij represents the actual power flow of the transmission line ij, P ijmax Represents the rated transmission power upper limit of transmission line ij.

6. The rapid response control method for a virtual power plant according to claim 5, characterized in that: Construct a game model, including: The generator group identification data in the power generation side data is used as the power generation side participant in the game model; The grid company identification data in the grid side data is used as the grid side participant in the game model; According to the output data P of each generator set in the power generation side data Gi , setting the strategy space of the participants on the power generation side; The strategy space of the grid-side participants is set to an empty set; The revenue function of the power generation side R Gi (P Gi ) as the payment function of the generation side participant corresponding to the i-th generator set; The utility function U on the grid side G (P G ,P D ) as the payment function of the grid-side participants; Construct a game model based on the set power generation side participants, grid side participants, strategy space and payment function; Solve the Nash equilibrium solution of the game model and use the obtained Nash equilibrium solution as the output of the profit model.

7. The rapid response control method for a virtual power plant according to claim 6 is characterized in that: Solve the Nash equilibrium solution of the game model, including: Based on the participants on the power generation side, the participants on the grid side, the strategy space and the payment function of the game model, the optimization objectives of the participants are constructed, where: For the participants on the power generation side, the optimization goal is to maximize the power generation side revenue function R corresponding to the i-th power generation unit. Gi (P Gi ), the decision variable is P Gi , the constraints are the upper and lower limits of the output of the i-th generator set; For grid-side participants, the optimization goal is to maximize the grid-side utility function U G (P G ,P D ), the decision variable is the actual output vector P of all generators on the grid side G , the constraints are the branch power flow inequality constraints and the node voltage amplitude inequality constraints; The optimization algorithm is used to solve the optimization objectives of the constructed participants, and the optimal decision of each participant is obtained. The optimal decision combination of each participant is used as the Nash equilibrium solution of the game model; among them, the optimal decision of the participants on the power generation side is P Gi , the optimal decision of the grid side participants is P G .

8. The rapid response control method for a virtual power plant according to claim 7, characterized in that: The optimization algorithm is used to solve the optimization objectives of the constructed participants and obtain the optimal decision of each participant, including: The optimization objective of the participants on the power generation side is converted into an unconstrained optimization objective through the following formula: L Gi (P Gi ,m Gi ,n Gi )=R Gi (P Gi )+μ Gi ×(P Gi -P Gimin )+n Gi ×(P Gimax -P Gi ) Among them, L Gi (P Gi ,μ Gi ,ν Gi ) represents the Lagrangian function of the generating side participant corresponding to the i-th generating unit; P Gi represents the output decision variable of the i-th generator set; μ Gi represents the Lagrange multiplier corresponding to the lower limit constraint of the output of the i-th generator set; ν Gi represents the Lagrange multiplier corresponding to the upper limit constraint of the output of the i-th generator set; P Gimin represents the lower limit of the output of the ith generator set; P Gimax represents the upper limit of the output of the i-th generator set; P Giopt represents the optimal output decision of the i-th generator set; Use gradient descent method to iteratively update the decision variable P Gi and the Lagrange multiplier μ Gi and ν Gi , and obtain the optimal output decision P of the participants on the power generation side Giopt : P.S Giopt 1argmaxL Gi (P Gi ,µ Gi ,ν Gi ) Here, argmax represents the value of the independent variable for solving the maximization problem.

9. The rapid response control method for a virtual power plant according to claim 8, characterized in that: The optimization algorithm is used to solve the optimization objectives of the constructed participants and obtain the optimal decision of each participant, including: The interior point method is used to transform the optimal objectives of the grid-side participants into unconstrained optimization sub-problems and construct the barrier function: B G (P G ,P D ,s)=U G (P G ,P D )-μ×∑lns i Among them, B G (P G ,P D , s) represents the barrier function of the grid-side participants; P G Represents the actual output vector of all generator sets, P G =[P G1 ,P G2 ,......,P Gn ], where n is the number of generator sets; P_D represents the predicted electricity demand vector of all users, P D =[P D1 ,P D2 ,......,P Dm ], where m is the number of users; s represents the slack variable vector, s=[s1,s2,......,s k ], where k is the number of inequality constraints; μ represents the obstacle factor, which is used to control the influence of the obstacle term and is a positive number; Under the constraints of branch power flow inequality and node voltage amplitude inequality, the Newton method is used to iteratively solve the maximization problem of the barrier function and obtain the optimal power purchase decision P of the grid side participants. Gopt : P Gopt =argmaxB G (P G ,P D ,s) Here, argmax represents the value of the independent variable for solving the maximization problem.

10. A system for rapid response control of a virtual power plant based on any one of claims 1 to 9.

Citation Information

Patent Citations

  • Power transaction system and method based on virtual power plant

    CN116645169A

  • Virtual power plant optimal scheduling method, device and equipment based on big data, and medium

    CN114037191A

  • Multi-virtual power plant double-layer coordination control method based on non-cooperative game

    CN115085179A

  • Robust optimization virtual power plant optimization control system based on stochastic programming

    CN115422728A

  • Virtual power plant optimal scheduling method based on two-stage risk constraint

    CN115603317A

Cited By

  • Power system state analysis method based on large-scale distributed energy access

    CN120542739A