A rapid response control method and system for virtual power plants
By constructing a virtual power plant regulation method based on LSTM and particle swarm optimization algorithm, the problem of difficult to respond quickly to the optimization scheduling of virtual power plants is solved, and the global optimal regulation strategy is realized, and the optimization efficiency and economic benefits of virtual power plants are improved.
Patent Information
- Application Number
- CN202411564362.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2044-11-05
AI Technical Summary
The optimization scheduling method of virtual power plants is difficult to meet the needs of rapid response, the optimization efficiency is low, and the existing control systems lack global optimization capabilities, making it difficult to maximize overall benefits.
By collecting data on the power generation side, grid side and user side, a demand prediction model and a profit model are constructed, the target model is solved using particle swarm optimization algorithm, and the global optimal virtual power plant regulation strategy is generated. Combining the power grid topological structure data as a constraint, LSTM and particle swarm optimization algorithm are used to optimize scheduling.
The optimization efficiency of virtual power plants has been improved, the interests of the power generation side and the grid side have been balanced, and the global optimal regulation strategy has been generated to meet the safe operation of the power grid, which has improved the cost-effective operation capability of the virtual power plants.
Smart Images

Figure CN119443693B_ABST
Abstract
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 (VPP) uses advanced information and communication technologies to aggregate and optimize the scheduling of distributed power sources, renewable energy, energy storage equipment, and controllable loads, forming a virtual, controllable "power plant." Unlike traditional power plants, VPPs do not own physical equipment. Instead, they coordinate the operation of various distributed resources through intelligent algorithms and control strategies, providing services similar to traditional power plants, such as power generation, frequency regulation, and peak load regulation. VPPs can effectively improve the utilization efficiency of distributed energy resources, enhance the flexibility and reliability of the power grid, and provide users with more economical, clean, and high-quality electricity services.
[0003] However, the optimal scheduling of virtual power plants involves numerous uncertainties and complex constraints, such as the intermittent and random nature of renewable energy, the volatility of power loads, and power grid flow constraints. These factors pose significant challenges to real-time control of virtual power plants. Traditional optimization scheduling methods, such as mixed integer programming and dynamic programming, often struggle to meet the rapid response requirements of virtual power plants and suffer from low optimization efficiency. Furthermore, existing virtual power plant control systems mostly employ a hierarchical, distributed architecture, lacking global optimization capabilities and making it difficult to maximize the overall benefits of virtual power plants.
[0004] In related technologies, 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. The trading model generation module constructs a power generation side revenue and user revenue model; the trading model optimization module optimizes the power generation side revenue and user revenue model; the trading decision module determines the power trading price range through game theory; the trading execution module conducts power trading based on the power trading price range; and the trading monitoring module supervises the security of the power trading process. However, this solution only considers two aspects: power generation side revenue and user revenue. The imperfection of the optimization model may cause the optimization results 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 existing technology, 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 solving the target model using the particle swarm optimization algorithm.
[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, comprising: a data collection phase: collecting output data and power generation cost data of generator sets from the power generation side as input for constructing 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 construct the constraint conditions of the target model, and the on-grid electricity price data is used to construct the profit model; collecting historical user electricity consumption data from the user side as input for constructing a demand forecasting model. A profit model construction phase: using the collected power generation side data, power grid side data, and predicted power demand data as input to construct 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. A target model construction and solution phase: using the predicted power demand data and the output of the profit model as input to the target model; converting the collected power grid topology data into constraint conditions as the constraint condition input of the target model; using a particle swarm optimization algorithm to solve the constructed target model; and the result obtained from the solution 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, a demand forecasting model based on a long short-term memory (LSTM) network (LSTM) is constructed using collected user-side data, and this model is used to predict electricity demand for each time period. Using the LSTM model to process time series data: User electricity demand exhibits distinct time series characteristics and exhibits long-term dependencies with historical data. The LSTM model is a specialized recurrent neural network that, through the introduction of gating mechanisms and memory units, can effectively capture and learn long-term dependencies in time series data, making it suitable for electricity demand forecasting. Constructing a multivariate LSTM forecasting model: When constructing the LSTM forecasting model, not only is historical electricity demand data considered as a single variable, but other relevant variables, such as weather, temperature, and holidays, that influence electricity demand, are also incorporated. By constructing a multivariate LSTM model, the changing patterns of electricity demand can be more comprehensively characterized, improving forecasting accuracy. To further enhance the LSTM model's ability to process long-sequence data, an encoder-decoder architecture is employed to construct the demand forecasting model. The encoder encodes the historical electricity demand sequence into a fixed-length feature vector, and the decoder generates future electricity demand forecasts based on the feature vector. This structure can better capture information from historical data and enhance the model's expressive power. Building on the encoder-decoder structure, an attention mechanism is introduced, enabling the decoder to adaptively focus on key information in the historical sequence when generating predictions. This attention mechanism allows the model to more flexibly handle dependencies across different time scales, further improving prediction accuracy. Preferably, to predict electricity demand for each time period, a sliding window approach is employed, using a fixed-length window of historical data as input to predict electricity demand several steps into the future. This sliding window approach fully utilizes information from historical data while ensuring the continuity and stability of the prediction.
[0009] Specifically, in step four, a target model is constructed, using the predicted electricity demand and profit model output as inputs and the grid topology data as constraints. A particle swarm optimization algorithm is used to solve the target model and generate a globally optimal virtual power plant control strategy. When solving the target model to obtain the control strategy, this application includes: Constructing a multi-objective optimization model: The target model is a multi-objective optimization problem that requires balancing the interests of both the power generation and grid sides while satisfying grid constraints. Therefore, when constructing the target model, minimizing power generation costs and grid operating costs are used as two optimization objectives, forming a multi-objective optimization model. By properly setting objective weights, the importance of different objectives can be balanced. Converting the grid topology into linear constraints: Grid topology data describes the connections between nodes and branches in the grid, as well as their electrical parameters. In order to use the grid topology as a constraint in the optimization problem, it must be converted into mathematical constraint equations. This application utilizes linearization techniques to convert the grid's power flow equations and operating constraints into linear equality and inequality constraints, simplifying 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 resources. In order to reflect the flexibility of the virtual power plant in the target model, virtual power plant flexibility modeling 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 fully utilize the flexibility advantages of the virtual power plant. The particle swarm optimization algorithm is used for solution: The target model is a nonlinear, non-convex and complex optimization problem, which is difficult to solve effectively by traditional mathematical programming methods. This application uses the particle swarm optimization (PSO) algorithm to solve the target model. The PSO algorithm is a heuristic intelligent optimization algorithm that simulates the foraging behavior of bird flocks and uses the particle position and velocity update formula to search for the global optimal solution in the solution space. When applying the PSO algorithm to solve the target model, it is necessary to design a suitable fitness function to evaluate the quality of the particles. The fitness function is usually constructed based on the optimization objective and constraints, taking into account factors such as power generation cost, grid operation cost and grid security. 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 an iterative optimization process, the PSO algorithm searches for the global optimal solution to the target model, which is the optimal control strategy for the virtual power plant. This control strategy includes the output scheduling plan and response instructions for each distributed energy resource in the virtual power plant during each time period. It minimizes power generation costs and grid operating costs while meeting grid safety constraints, achieving 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 data on nodes, branches, and the connection relationships between them; transmitting the obtained grid topology data to a data preprocessing module for further processing. Extracting nodes, branches, and connection relationships from 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, starting node, ending 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 based on the connection relationships 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 a 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. Based on the physical laws and operational 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 constraints of the target model and input into the target model. The constraint data structure is transferred 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 constraints of the target model and, together with the predicted power demand and the output of the profit model, construct a complete target model. The constructed target model is transferred to the optimization solution module and solved using the particle swarm optimization algorithm. The optimization solution module generates a global optimal virtual power plant control strategy that meets the power grid topology connection restrictions and power flow constraints.
[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 equality constraint: ∑j∈I(i) P ij -∑ j∈O(i) P ij +P Gi -P Di =0, generate the power balance equality constraint of node i; repeat the above steps for all nodes to generate a complete set of node power equality 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, starting node, ending 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, 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: the generated node power equality constraints, branch flow inequality constraints and node voltage amplitude inequality constraints are stored in the constraint data structure; the constraint data structure is transmitted to the target model construction module as the constraint conditions of the target model; the target model construction module integrates the constraint data structure with the output of the predicted electricity demand and profit model to construct 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 construction module as part of the profit model.
[0017] Construct the cost function of 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 construction module as 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 is 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 of the power generation side; integrates the profit data structure of 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 power generation unit. 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 the actual output vector P G ; Read the electricity demand data of all users from the grid side data to form the electricity 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 electricity 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 power generation cost and output adjustment penalties 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 power generation side income data structure, the power generation side cost data structure and the grid side utility data structure; reads the income data of the generator set from the power generation side income data structure, reads the cost data of the generator set from the power generation side cost data structure, calculates the total profit of the power generation side; reads the utility data U of the grid side from the grid side utility data structure G ; The total profit of the power generation side and the utility data U on 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 construction 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 grid-side utility function and the power generation side profit function into the profit model, the interests of the power generation side and the grid side can be balanced, and the coordinated optimization scheduling of the virtual power plant can be achieved.
[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 represent 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 are stored in the strategy space data structure.
[0025] Payment function setting: For each power generation side participant, read the revenue function R of the corresponding power generation unit from the power generation side data Gi (P Gi );The revenue function R of the generator set Gi (P Gi ) is used as the payment function of the corresponding power generation side participant, which represents its income 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 generator output combinations; the payment function data of the 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 power generation and grid-side participants in the participant data structure, the power generation participant strategy space in the strategy space data structure, and the power generation and grid-side participant payment functions in the payment function data structure; and stores the constructed game model data in the game model data structure. Game Model Solving: The game model solving 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 power generation participants; and 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 grid side is taken into account. By taking the power generation unit and the 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 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: constructing the optimization objectives of the power generation side participants: for each power generation side participant, read the corresponding power generation side profit function R from the game model data structure Gi (P Gi ); maximize the power generation side revenue function R Gi (P Gi ) is the optimization objective of the i-th power generation side participant, and the decision variable is the output P of the corresponding power generation unit. Gi ; Read the upper and lower limit data of the output of the i-th generator group from the power generation side data as the constraint conditions of the optimization target; store the constructed power generation side participant optimization target data into the power generation side optimization target data structure.
[0028] Optimization goal construction of 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 objective 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 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 power generation side decision data structure; for the grid side participants, use the optimization algorithm (such as sequential linear programming) to solve their optimization objectives 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 Combined into a complete decision vector as the Nash equilibrium solution of the game model; the generated Nash equilibrium solution data is stored 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; the Nash equilibrium solution is integrated with other inputs (such as constraints) to construct a complete target model; the constructed target model is transmitted 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, based on the participants, strategy space and payment function of the game model, the optimization objectives of the power generation side participants and the grid side participants 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 the virtual power plant.
[0030] Furthermore, the optimization algorithm is used to solve the optimization objectives of the power generation side participants, including: Lagrangian function construction: for each power generation side participant, its optimization objective function R is read from the power generation side optimization objective data structure. 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 output lower limit constraint and output upper limit constraint 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 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 power generation side decision data structure. 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, so that they move towards 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 into 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 into 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 decision variables of the grid-side participants on the premise of satisfying the linearized constraint conditions. G of the initial feasible solution P Ginitial ; Store the initial feasible solution data into the initial feasible solution data structure. Iteratively solve the sequential linear programming: 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 into the grid-side decision data structure.
[0034] Further, 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 ), 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 variables P G and the slack variable s, and the second - order Hesse matrix HB G ; use Newton's method to update the decision variables P G and the slack variable G ; Store the updated decision variables 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 in the previous iteration; if(dist < ε) then break; set the iteration counter t = t + 1; update the barrier factor μ, reducing 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 obstacle term is gradually reduced, so that the solution approaches the optimal solution of the original problem.
[0036] Another aspect of this specification also provides a rapid response control system for a virtual power plant, which is used to implement a rapid response control method for a virtual power plant provided in this application. The game model construction module constructs a game model based on the participant information, strategy space, and payment function of the virtual power plant, providing a basis for the subsequent solution of the Nash equilibrium. The game model construction module receives the participant information, strategy space, and payment function data from the virtual power plant database. After constructing the game model, it sends the game model data to the power generation side optimization module and the grid side optimization module. The power generation side optimization module: Based on the game model, it constructs the optimization objectives of the power generation side participants and uses the gradient descent method to solve the optimal output decision of the power generation side participants. The power generation side optimization module receives the game model data sent by the game model construction module, constructs the power generation side optimization objectives, and solves them using the gradient descent method. The resulting optimal power generation side output decision is sent to the Nash equilibrium solution module. The grid side optimization module: Based on the game model, it constructs the optimization objectives of the grid side participants and uses the interior point method to solve the optimal output decision vector of the grid side participants. The grid-side optimization module receives the game model data from the game model construction module, constructs the grid-side optimization objective, and solves it using the interior point method. The resulting grid-side optimal output decision vector is sent to the Nash equilibrium solution module. The Nash equilibrium solution module combines the optimal output decision vectors obtained by the generation-side optimization module and the grid-side optimal output decision vectors obtained by the grid-side optimization module into a Nash equilibrium solution for the game model. The Nash equilibrium solution module receives the optimal output decision vectors from the generation-side optimization module and the grid-side optimal output decision vectors from the 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 for the virtual power plant based on the Nash equilibrium solution obtained by the Nash equilibrium solution module, combined with other virtual power plant operating constraints and optimization objectives. The virtual power plant scheduling 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. It uses the particle swarm optimization algorithm to perform global optimization, generates the optimal scheduling strategy for the virtual power plant, and sends the scheduling strategy to the virtual power plant control system for execution.
[0037] 3. Beneficial effects
[0038] Compared with the existing technology, 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, we can accurately predict electricity demand in each time period and provide reliable input data for optimizing the virtual power plant control strategy.
[0040] Convert the grid topology data into linear equality and inequality constraints as constraints for the target model, ensuring that the generated virtual power plant control strategy meets the physical characteristics and operational constraints of the grid.
[0041] Constructing a profit model that includes the revenue function and cost function on the power generation side and the utility function on the grid side, and setting up a game model in it, can effectively balance the interests of power generation companies and 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 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 control strategy can be quickly searched and the rapid response control of the virtual power plant can be achieved. 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 This is an exemplary flowchart of obtaining an optimal strategy according to some embodiments of this specification. DETAILED DESCRIPTION
[0048] The methods and systems provided in the embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0049] Figure 1This 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 connecting to the grid dispatching system. User-side data is collected, including user electricity consumption history data. User historical data such as electricity consumption, voltage, and power can be obtained by connecting to 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] A demand forecasting model is constructed based on collected user-side data. The Long Short-Term Memory (LSTM) network is selected as the forecasting model architecture, leveraging its advantages in modeling time series data. Feature engineering is performed on historical user electricity usage data to extract features related to electricity demand, such as time characteristics (season, month, weekday, etc.) and weather characteristics (temperature, humidity, etc.). These processed features are input into the LSTM model, and through training and optimization, the nonlinear relationship between electricity demand and features is learned. The trained LSTM model is used to forecast electricity demand for each future time period, providing demand-side information for the virtual power plant's control strategy.
[0051] A profit model for the virtual power plant is constructed based on collected data from the power generation and grid sides, as well as predicted electricity demand. This profit model considers the generation cost on the power generation side, the grid-side on-grid electricity price, and predicted electricity demand, and calculates the virtual power plant's revenue under different regulation strategies. A game model is introduced into the profit model to balance the interests of the power generation and grid sides. The game model can employ methods such as Nash equilibrium and the analytic hierarchy process, taking into account the strategies and benefits of each party to determine the game equilibrium point. The results of the game model are incorporated into the profit model, comprehensively considering the interests of all parties and determining the optimal revenue of the virtual power plant.
[0052] A target model is constructed, with the predicted electricity demand and profit model outputs as optimization targets, and the grid topology data as constraints. The decision variables of the target model are the output scheduling strategies of each generator set in the virtual power plant, and the objective function is to maximize the overall benefits of the virtual power plant. A particle swarm optimization (PSO) algorithm is used to solve the target model. The PSO algorithm simulates the foraging behavior of bird flocks to search for the optimal solution in the solution space, and has strong global optimization capabilities. 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 iterative optimization using the PSO algorithm, a globally optimal virtual power plant control strategy is obtained, achieving rapid response and maximizing benefits.
[0053] The optimal control strategy generated by the global optimization module is distributed to each generator set and the grid dispatch system. Generator sets adjust their operating status in real time based on the received output commands, achieving rapid response. The grid dispatch system optimizes grid operation based on the received control strategy to ensure power balance and reliability. The strategy execution module converts the virtual power plant's optimized control strategy into specific control instructions, enabling real-time control and rapid response for the virtual power plant.
[0054] Data collection, power generation side data collection and storage: Install smart meters and data collectors on each generator set to collect the generator set's output data in real time, including active power, reactive power and electrical energy; in the generator set's control system, record the generator set's start and stop time, fuel consumption and operation and maintenance cost data as power generation cost data; assign a unique identification code to each generator set as generator set identification data; transmit the collected output data, power generation cost data and generator set identification data to the virtual power plant's power generation side database 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] Grid-side data collection and storage: Obtain grid topology data from the grid dispatching system, including information such as nodes, branches and connection relationships; obtain on-grid electricity price data from the grid market management system, including information such as electricity prices and electricity consumption in different time periods; obtain grid company identification data from the grid enterprise information system, including the name, number and contact information of the grid company; transmit the obtained grid topology data, on-grid electricity price data and grid company identification data to the grid-side database of the virtual power plant through the data interface; in the grid-side database, store and manage data according to data type and timestamp to form a structured grid-side data set.
[0056] User-side data collection and storage: Smart meters are installed at each user to collect the user's electricity consumption data in real time, including active power, reactive power, and electrical energy; the collected user electricity consumption data is aggregated and uploaded at certain time intervals (such as 15 minutes) through the electricity information collection system; the aggregated user electricity consumption data is transmitted to the user-side database of the virtual power plant through the communication network; in the user-side database, the data is stored and managed 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 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 grid side, and the user side databases, access control and permission management mechanisms are used to prevent unauthorized data access and leakage; data involving user privacy, such as electricity usage addresses and electricity bills, are desensitized to ensure user privacy is protected.
[0057] Demand forecasting and data preprocessing: Historical user electricity usage data is read from the user-side database, sorted, and aggregated according to user identification code and timestamp; historical user electricity usage data is cleaned and outlier processed to remove invalid or abnormal data points; historical user electricity usage data is normalized and scaled to the [0, 1] range to improve the convergence speed and stability of model training. Feature engineering: Based on historical user electricity usage data, relevant time features are extracted, such as hour, day, week, month, and season; based on historical user electricity usage data, statistical characteristics of electricity load are calculated, such as average, maximum, minimum, and standard deviation; external features are introduced based on user attributes and environmental factors, such as user type, weather conditions, and holidays. Model Construction: A long short-term memory (LSTM) network is used to construct a demand forecasting model, setting the structure and parameters of the input, hidden, and output layers. Preprocessed user electricity consumption history data and extracted features are input into the LSTM model for model training. Error backpropagation and gradient descent optimization algorithms are used to adjust the weights and bias parameters of the LSTM model to minimize prediction errors. Cross-validation and grid search techniques are used to tune the hyperparameters of the LSTM model and improve the model's generalization capabilities. Demand Forecasting: The trained LSTM model is applied to new input data to predict electricity demand for each future time period. For each time period, historical data and external features are input into the LSTM model to obtain the electricity demand forecast for that time period. The prediction results are stored and managed according to timestamps and user identification codes to form a structured demand forecast dataset. 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 virtual power plant's scheduling optimization system and energy management system as input conditions for power scheduling and energy optimization; Based on the demand forecast results, optimize the virtual power plant's power generation plan, energy storage strategy, and demand response plan to improve the economy and reliability of the power system; Compare and analyze the demand forecast results with actual electricity consumption data to 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 them according to the generator set identification code and timestamp; read the on-grid electricity price data from the grid side database, sort and aggregate them according to the timestamp; read the predicted electricity demand data from the demand forecast database, sort and aggregate them according to the timestamp; clean the read data and process outliers, eliminate invalid or abnormal data points, and ensure the accuracy and consistency of the data.
[0059] Power 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 , which represents 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 group 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 optimized scheduling results, and used as a benchmark for evaluating the benefits of output adjustment.
[0060] Cost function on the power generation side: For each generator set 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 , reflecting the fixed cost of power generation; the cost function also includes an output adjustment cost, which is the actual output P of the generator set Gi With reference output P Giref The absolute value of the difference is multiplied by the output adjustment cost coefficient d i, 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 ramp rate of the unit; reference 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 power generation unit in a virtual power plant, and its benchmark on-grid electricity price is i The electricity price adjustment coefficient is 0.4 yuan / kWh. i 0.1 yuan / kWh, reference output P Giref 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, 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, indicating 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 generator output vector P G and the user's electricity demand vector P DUnder this circumstance, the comprehensive utility of the power grid company; the utility function includes 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 regulation 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 constraint of the transmission line, prompting the transmission line flow to be controlled 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 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 on-grid electricity prices of the generators are 0.4 yuan / kWh and 0.5 yuan / kWh respectively, the output adjustment penalty coefficients are 0.1 yuan / MW and 0.2 yuan / MW respectively, and the reference outputs are 200MW and 150MW respectively; the electricity prices for the users are 0.6 yuan / kWh, 0.7 yuan / kWh and 0.8 yuan / kWh respectively, and the electricity demands are 100MW, 150MW and 200MW respectively; there are two transmission lines inside the virtual power plant, with the rated transmission power limits of The overload penalty coefficients are 1 yuan / MW and 2 yuan / MW respectively; when the actual output of the generator set is 250MW and 100MW respectively, and the actual power flow of the transmission line is 280MW and 260MW respectively, 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 conditions, the power grid company's comprehensive utility 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. By optimizing the output of generator sets and the power flow of transmission lines, the power grid company can maximize its comprehensive utility and achieve economic and reliable grid operation while meeting power balance and safety constraints.
[0068] Figure 2 This is an exemplary flow chart of building a game model according to some embodiments of this specification. The game model is constructed by extracting the generator group identification data from the power generation side data, taking each generator group 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 profit 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, representing the comprehensive utility of the grid company under different combinations of power generation output and electricity demand. Based on the above-mentioned participants, strategy space and payment function, a game model is constructed to form a multi-participant non-cooperative game problem.
[0069] Figure 3 This is an exemplary flow chart for obtaining constraint conditions according to some embodiments of this specification. Game model solution: Participant optimization goal construction: For each power generation side participant i, its optimization goal is 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 generator set's output [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 branch power flow inequality constraints and 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 The value of , set the iteration step α and the termination condition ε; calculate L Gi (P Gi ,μ Gi ,ν Gi ) Gi 、μ Gi and ν Gi Gradient, update the variable according to the gradient direction: P Gi '=P Gi +α×▽P Gi , μ Gi '=μ Gi +α×▽μ Gi , ν Gi '=ν Gi +α×▽ν Gi , judge whether the termination condition is met, P Gimin <P Gi <P Gimax , if satisfied, terminate the iteration, otherwise return; 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 value of the barrier factor μ, set the iteration step size α and the termination condition ε; Calculate B G (P G , P D , s) gradient and Hesse matrix, construct the Newton equation: ▽ 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 to obtain the Newton direction Δ, and update the decision variable and the slack variable: P G ' = P G + α × ΔP, s' = s + α × Δs, where ΔP and Δs are the parts corresponding to P G and s in Δ respectively; Update the barrier factor μ = β × μ, where β is the decay rate of the barrier factor, and the value is between (0, 1); Judge whether the termination condition is satisfied, such as |▽B G | < ε and s > 0, if satisfied, terminate the iteration, otherwise return to the step; The P G at the end of the iteration is the optimal output decision P Giopt of the grid - side participant. Determination of the Nash equilibrium solution: Combine the optimal output decision P Giopt of each generation - side participant and the optimal output decision P Giopt of the grid - side participant to form the Nash equilibrium solution (P G1opt , P G2opt ,......, P Gnopt ) of the game model; Use the Nash equilibrium solution 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 generator-side participants and one grid-side participant. The upper and lower limits of the generator output are [50, 200], [80, 250], and [100, 300], respectively. Branch power flows and node voltage amplitude constraints are given. The gradient descent method is used to solve the optimization objective of generator-side participant 1, and its optimal output decision is obtained as P_G1_opt = 180MW. Similarly, the optimization objectives of generator-side participants 2 and 3 are solved, and P_G2_opt = 220MW. 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 condition is 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 as (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 grid topology data from the grid side database, including node, branch and connection relationship information; Extract the node set N, branch set L and connection matrix A in the 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 node, branch and connection relationship, convert it into the following constraints: Node power equality 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, there is |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 , expressed as a 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 P of the grid side participants Gopt .
[0074] Target model construction: The predicted electricity demand data P D The Nash equilibrium solution P of the game model Giopt 、P Gopt As the input of the target model, where 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; the converted node power equality constraint, branch power flow inequality constraint, and node voltage amplitude inequality constraint are used as the constraint conditions of the target model; the target model is constructed, 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 power purchase plan adjustment Δ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 grid side, N G is the number of generator sets, Δ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: Use particle swarm optimization algorithm to solve the target model. 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 GFor 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 swarm as the global optimal position g_best; iteratively update the speed and position of the particle. For the j-th dimension of the i-th particle, we have:
[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]; based on 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 conditions are met, such as reaching the maximum number of iterations or fitness value convergence. 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-consuming node. Based on 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 on the power generation side (P_G1_opt = 180 MW) is obtained. , 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 of 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 its effectiveness and enforceability. 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 the virtual power plant: The virtual power plant control system issues power adjustment instructions to each generator set through the communication network. The instructions include: the generator set identification number; 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 its output according to the instruction requirements: if the instruction requires an increase in output, the generator set increases its output power by increasing fuel input and adjusting the valve opening; if the instruction requires a decrease in output, the generator set reduces its output power by reducing fuel input and adjusting the valve opening; the output adjustment process of the generator set must meet the technical constraints of the unit, such as the ramp rate and maximum output.
[0083] After the generator set completes the output adjustment, the adjustment result will be fed back to the virtual power plant control system, including: the actual output adjustment amount ΔP_Gi_actual of the generator set; 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 amount ΣΔP_Gi_actual of the virtual power plant, and compares it with the planned total output adjustment amount ΣΔ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 1 hour", issues a power adjustment instruction to the generator set G2 "reduce output by 10MW, duration 1 hour", and issues a power adjustment instruction to the generator set G3 "increase output by 20MW, duration 1 hour"; after receiving the output adjustment instruction, the generator sets G1, G2, and G3 respectively take corresponding measures to adjust the unit output: G1 increases the fuel input within 10 minutes, and the output of the generator set is reduced by 10MW. The output of G1 was increased from 180MW to 195MW within 8 minutes; G2 reduced the output from 200MW to 190MW within 8 minutes by adjusting the valve opening; G3 increased the output from 220MW to 240MW within 12 minutes by increasing the fuel input; after the generator set completed the output adjustment, it fed back the actual output adjustment amount, adjustment time and other information to the virtual power plant control system; the virtual power plant control system collected the feedback information of the generator set and calculated the actual total output adjustment amount to be 25MW, which was consistent with the planned 25MW, with a response accuracy of 100%; the average response delay of the generator set was statistically calculated to be 10 minutes, which met the response speed requirements of the virtual power plant; the virtual power plant control system recorded the execution of this regulation process, evaluated and optimized the regulation strategy, and provided 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 grid side, and the user side. The power generation side data includes the output data and power generation cost data of the generator set; the grid side data includes the grid topology data and on-grid electricity price data; and 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 demand forecasting model is used to predict the electricity demand in each time period. Step 3: Build a profit model based on the collected power generation data, grid data, and electricity demand; set up a game model in the profit model to balance the interests of the power generation side and the grid side; Step 4: Build a target model, taking the predicted electricity demand and profit model output as input and the grid topology data as constraints. Use a particle swarm optimization algorithm to solve the target model and generate a globally optimal virtual power plant control strategy. The process of building a profit model includes: Construct the revenue function of the power generation side: ; in, represents the profit of the i-th generator set, represents the actual output of the i-th generator set, represents the benchmark on-grid electricity price of the i-th generator set, represents the electricity price adjustment coefficient of the i-th generator set, represents the reference output of the i-th generator set; Construct the cost function on the power generation side: ; in, represents the cost of the i-th generator set, represents the actual output of the i-th generator set, 、 and 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, represents the output adjustment cost coefficient of the i-th generator set, represents the reference output of the i-th generator set; The process of building a profit model also includes: Construct the utility function on the grid side: ; in, represents the utility on the grid side, Represents the actual output vector of all generator sets, represents the electricity demand vector of all users, Represents a collection of users, represents a collection of generator sets, represents the electricity price of the i-th user, represents the electricity demand of the i-th user, represents the benchmark on-grid electricity price of the i-th generator set, represents the actual output of the i-th generator set, represents the output adjustment penalty coefficient of the i-th generator set, represents the reference output of the i-th generator set, L represents the set of transmission lines, represents the overload penalty coefficient of transmission line ij, represents the actual power flow of transmission line ij, represents the upper limit of the rated transmission power of the transmission line ij; Construct a game model, including: The generator 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 of each generator set in the power generation side data , set the strategy space of the participants on the power generation side; Set the strategy space of the grid-side participants to an empty set; The power generation side profit function As the payment function of the generation side participant corresponding to the i-th generator set; The utility function on the grid side As a payment function for 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.
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 from 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, characterized in that: Convert the extracted nodes, branches, and connections into linear inequality constraints and equality constraints, including: Construct node power equality constraints: ; Among them, i represents the node, represents the set of branches ending at node i, represents the set of branches starting from node i, represents the active power from node i to node j, represents the active power output of the generator at node i, represents the load active power at node i; Construct branch power flow inequality constraints: ; in, Indicates the maximum transmission power limit of branch ij; Construct node voltage magnitude inequality constraints: ; in, represents the voltage amplitude at node i, and 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 1, characterized in that: Solve the Nash equilibrium solution of the game model, including: Based on the power generation side participants, grid side participants, strategy space and 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 profit function corresponding to the i-th power generation unit , the decision variables are , the constraints are the upper and lower limits of the output of the i-th generator set; For grid-side participants, the optimization objective is to maximize the grid-side utility function , the decision variable is the actual output vector of all generators on the grid side , the constraints are branch power flow inequality constraints and 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 , the optimal decision of the grid side participants is .
5. The rapid response control method for a virtual power plant according to claim 4, characterized in that: Use the optimization algorithm to solve the optimization objectives of the constructed participants and obtain the optimal decision of each participant, including: The optimization objective of the power generation side participants is converted into an unconstrained optimization objective through the following formula: ; in, represents the Lagrangian function of the generation side participant corresponding to the i-th generator set; represents the output decision variable of the i-th generator set; represents the Lagrange multiplier corresponding to the lower limit constraint of the output of the i-th generator set; represents the Lagrange multiplier corresponding to the upper limit constraint of the output of the i-th generator set; represents the lower limit of the output of the i-th generator set; represents the upper limit of the output of the i-th generator set; represents the optimal output decision of the i-th generator set; Iteratively update decision variables using gradient descent and Lagrange multipliers and , and obtain the optimal output decision of the participants on the power generation side : ; Here, argmax represents the value of the independent variable for solving the maximization problem.
6. The rapid response control method for a virtual power plant according to claim 5, characterized in that: Utilize the optimization algorithm 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 subproblems and construct the barrier function: ; in, represents the barrier function of the grid-side participants; Represents the actual output vector of all generator sets, , where n is the number of generators; P_D represents the predicted electricity demand vector of all users, , where m is the number of users; s represents the slack variable vector, , where k is the number of inequality constraints; μ represents the barrier factor, which is used to control the influence of the barrier 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 to obtain the optimal power purchase decision of the grid side participants. : ; Here, argmax represents the value of the independent variable for solving the maximization problem.
7. A system for rapid response control of a virtual power plant based on any one of claims 1 to 6.
Citation Information
Patent Citations
Power transaction system and method based on virtual power plant
CN116645169A
Coordination control method of power grid system
CN117595391A
Virtual grid aggregation optimization control method and device considering grid multi-layer interaction and medium
CN118336828A