Generalized energy storage-based power grid-building collaborative optimization operation method

By constructing a grid-building double-layer coupling framework and a dynamic node marginal electricity price feedback mechanism, efficient coordinated optimization of the grid and building energy storage is achieved, solving the problems of delayed dynamic electricity price response and low efficiency of heterogeneous energy storage coordination, and improving the system's renewable energy absorption and economic benefits.

CN120671922APending Publication Date: 2025-09-19HOHAI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510790336.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

The technical defects of the existing grid-building collaborative optimization, such as the delayed response of dynamic electricity prices and the low efficiency of heterogeneous energy storage collaboration, lead to poor interaction between the grid and building-side energy storage resources, making it difficult to effectively absorb and regulate a high proportion of renewable energy.

Method used

A two-layer coupling framework of the power grid AC power flow model and the building DC power flow model is constructed, a dynamic node marginal electricity price feedback mechanism is adopted, and a unified modeling of generalized energy storage is achieved through the Lagrange multiplier dynamic correction algorithm. It is compatible with the heterogeneous characteristics of battery energy storage and thermal energy storage, and optimizes unit output and energy storage arbitrage.

Benefits of technology

It has improved the operational flexibility of the power grid and resource utilization on the building side, enhanced the source-load-storage coordination capability, and significantly improved the renewable energy absorption capacity and system economy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671922A_ABST
    Figure CN120671922A_ABST
Patent Text Reader

Abstract

The invention provides a power grid-building collaborative optimization operation method based on generalized energy storage. Through multi-time scale management of energy in the building, a support strategy of the building for the power grid is excavated, a strategy of minimizing the operation cost of the power grid and maximizing the all-day earnings of the building is accurately given on the basis of considering heterogeneous energy storage of the building, and a power grid-building cooperative optimal strategy is realized. And an energy general expression mode of the heterogeneous energy storage medium is constructed. Constraint conditions and objective functions of the power grid and the building are considered, and the generalized energy storage-based power grid-building collaborative optimization operation method is constructed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of power grid-building collaborative optimization, and in particular relates to a power grid-building collaborative optimization operation method based on generalized energy storage. Background Art

[0002] As new power systems accelerate their penetration into high proportions of renewable energy, the coordinated optimization of power grids and building energy systems faces multiple technical challenges. The traditional power grid dispatch model is centered on the economic dispatch of centralized units, using node marginal electricity prices as price signals to guide demand-side responses. However, the increasingly popular distributed photovoltaic, battery energy storage, and thermal energy storage systems on the building side constitute multiple types of generalized energy storage resources, and their spatiotemporal flexibility has not yet formed a two-way interaction with the power grid through an effective market mechanism. Existing research usually adopts a hierarchical optimization architecture to decouple the calculation of the optimal power flow of the power grid from the scheduling of building energy storage, resulting in two limitations: First, the update of the node marginal electricity price on the grid side lags behind the dynamic response of the building energy storage, and cannot accurately reflect the spatiotemporal regulation value of generalized energy storage; second, the scheduling of energy storage on the building side is based on fixed electricity prices or day-ahead forecast electricity prices, which fails to respond to changes in the supply and demand situation of grid nodes in real time, easily leading to power limit violations at local nodes and the abandonment of renewable energy.

[0003] At the optimization level, existing collaborative scheduling methods mostly use static game models or single-time-scale rolling optimization, which are difficult to adapt to the heterogeneity of generalized energy storage in terms of charging and discharging rates, capacity attenuation characteristics, etc. In particular, thermal energy storage systems have characteristics such as large thermal inertia and high coupling between charging and discharging, and traditional electric energy storage scheduling models cannot directly be compatible with their thermodynamic constraints. In addition, the non-convexity of the AC power flow equation of the power grid leads to low efficiency in solving the response strategy on the building side, which restricts the engineering application of minute-level real-time collaborative optimization. Therefore, it is urgent to build a grid-building bidirectional iterative optimization mechanism to achieve collaborative optimization of heterogeneous energy storage resources at multiple time scales through dynamic node marginal electricity price feedback and generalized energy storage mixed integer modeling. This is of great practical significance for improving the operational flexibility and comprehensive energy efficiency of new power systems. Summary of the Invention

[0004] Purpose of the Invention: This invention addresses the technical deficiencies of existing grid-building collaborative optimization, such as delayed dynamic electricity price response and low efficiency of heterogeneous energy storage coordination, by proposing a bidirectional dynamic iterative optimization method for grid-building based on generalized energy storage. Its core innovation lies in establishing a real-time interactive mechanism driven by dynamic node marginal electricity prices by constructing a two-layer coupling framework between the grid AC power flow model and the building DC power flow model. A unified modeling method for generalized energy storage is designed to map the dynamic characteristics of battery and thermal energy storage into a standardized constraint space, enabling time series coordination of heterogeneous energy storage in dimensions such as charge and discharge efficiency and thermodynamic response. An innovative Lagrange multiplier dynamic correction algorithm is introduced to feed back the marginal cost of grid-side active power constraints into the building-side optimization objective function in real time, thus overcoming the bottleneck of the timing mismatch between electricity price signals and energy storage actions in traditional hierarchical optimization. The technical advantage of this invention lies in the simultaneous optimization of unit output costs and generalized energy storage arbitrage returns through a bidirectional grid-building power-price closed-loop feedback loop, significantly improving the spatiotemporal precision and economic benefits of source-load-storage coordinated control in scenarios with a high proportion of renewable energy.

[0005] Technical solution: In order to solve the above technical problems, the present invention provides a method for grid-building coordinated optimization operation based on generalized energy storage, which includes the following steps:

[0006] Step 1: Obtain the grid network parameters and load node and unit node operating parameters; the building network parameters and load node and generalized energy storage system node operating parameters; initialize the node marginal electricity price and building interactive active power;

[0007] Step 2: Obtain the active power and reactive power data of the grid load node at time t; the active power of the building load node, the active power of the renewable energy node, and the state of charge data of the generalized energy storage system at time t;

[0008] Step 3: Based on the grid network parameters and load node and unit node operating parameters of step 2, the interactive active power of the building at time t; establish a grid operation model with AC power flow constraints and unit constraints as constraints and the minimum grid operation cost as the objective function; solve to obtain the minimum grid operation cost at time t, calculate the Lagrangian factor of the active power in the grid AC power flow constraint, and set it as the node marginal electricity price of the grid load node at time t;

[0009] Step 4. Based on the node marginal electricity price of the grid load node at time t in step 3, the active power and reactive power data of the building load node at time t in step 2, the active power data of the building renewable energy node, the charging and discharging power of the building generalized energy storage system at time t in step 4, and the building network parameters and load node and generalized energy storage system node operating parameters in step 1; establish a building operation model with DC power flow constraints and generalized energy storage constraints as constraints and the maximum building benefit in all time periods as the objective function; solve and obtain the building interactive active power at time t and the charge state of the building generalized energy storage system at time t+1.

[0010] Furthermore, in step 3, with AC power flow constraints and unit constraints as constraints, and minimizing grid operation costs as the objective function, the following is obtained:

[0011] Objective function:

[0012]

[0013] Among them, pd represents the power grid, F t pd represents the grid operation cost at time t, G represents the set of units, g represents the unit number, a g 、b g and c g They represent the quadratic coefficient, primary coefficient and constant term of the power generation cost of unit g, respectively. t g represents the power generated by unit g at time t, M represents the building set, m represents the building number, P t m represents the interactive active power between building m and the grid at time t, represents the marginal electricity price of node m in building at time t.

[0014] Furthermore, in step 3, the AC power flow constraints and unit constraints are as follows:

[0015] 1) AC power flow constraints:

[0016]

[0017] 2) Unit constraints:

[0018]

[0019] Where, P i,t Indicates the active power input by node i at time t, F i represents the end node of the line starting from node i, T i represents the starting node of the line with node i as the terminal node, P ij,t represents the active power transmitted from node i to node j at time t, P ji,trepresents the active power transmitted from node j to node i at time t, I ji,t represents the square of the line current transmitted from node j to node i at time t, R ij represents the resistance of line ij, i and j represent the grid node numbers, B represents the grid node set, Q i,t Indicates that node i actively inputs reactive power at time t, Q ij,t represents the reactive power transmitted from node i to node j at time t, Q ji,t represents the reactive power transmitted from node j to node i at time t, X ij Represents the line ij reactance, V i,t represents the square of the voltage at node i at time t, V j,t represents the square of the voltage at node j at time t, I ij,t represents the square of the current transmitted from node i to node j at time t, ij represents the line from node j to node i, L represents the line set, represents the square of the maximum line transmission current of line ij, represents the square of the maximum voltage at node i, V i represents the square of the minimum voltage at node i, represents the maximum active power of node i, P i represents the minimum active power of node i, represents the maximum reactive power of node i, Q i represents the minimum reactive power of node i, Indicates the power generation of unit g at time t-1, RU g Indicates the maximum uphill value of the adjacent time interval of unit g, RD g Indicates the maximum downslope value of unit g in adjacent time intervals.

[0020] Furthermore, in step 4, with the DC power flow constraint and the generalized energy storage constraint as constraints, the objective function is to maximize the building benefit during the entire period:

[0021] Objective function:

[0022]

[0023] Among them, F m represents the full-time building m income, T represents the time interval set, t represents the time interval number, b e represents the unit charge and discharge power cost of the generalized energy storage system e, E represents the generalized energy storage system set, e represents the generalized energy storage system number, represents the charging and discharging power of the generalized energy storage system e of building m at time t, b re Represents the unit power generation cost of renewable energy re, RE represents the renewable energy set, re represents the renewable energy number, P tm,re Represents the power generated by renewable energy re in building m at time t.

[0024] Furthermore, in step 4, the DC power flow constraint and generalized energy storage constraint are:

[0025] 1) DC power flow constraints:

[0026]

[0027] 2) Generalized energy storage constraints:

[0028]

[0029] Where LO represents the load node set, lo represents the load node number, P t m,lo It represents the power consumption of load node lo in building m at time t, represents the state of charge of the generalized energy storage system e of building m at time t, represents the capacity of the generalized energy storage system e of building m at time t, represents the maximum capacity of the generalized energy storage system e of building m, represents the minimum capacity of the generalized energy storage system e of building m, represents the actual maximum charging power of the generalized energy storage system e in building m at time t, represents the actual minimum discharge power of the generalized energy storage system e of building m at time t, represents the self-loss coefficient of the generalized energy storage system e of building m at time t, represents the maximum charging power set for the generalized energy storage system e of building m, represents the minimum discharge power of the generalized energy storage system e in building m, Δt represents the length of the interval, represents the state of charge of the generalized energy storage system e of building m at time t+1;

[0030] Due to the differences in energy storage media, the relationships between generalized energy storage parameters and variables and those of battery and thermal energy storage are different, as follows:

[0031] 1) Relationship between generalized energy storage and battery energy storage parameters and variables:

[0032]

[0033] 2) Relationship between generalized energy storage and thermal energy storage parameters and variables:

[0034]

[0035] Where, be represents the battery energy storage system number, represents the capacity of the battery energy storage system be in building m at time t, represents the rated capacity of the battery energy storage system be in building m, ζ be represents the self-loss coefficient of the battery energy storage system be, It represents the charging and discharging power of the battery energy storage system be in building m at time t, Indicates the charging status of the battery energy storage system be in building m at time t, represents the discharge state of the battery energy storage system be in building m at time t, η ch represents the charging efficiency of the battery energy storage system, η dis represents the discharge efficiency of the battery energy storage system, te represents the number of the thermal energy storage system, represents the indoor temperature of the thermal energy storage system te in building m at time t, represents the maximum indoor temperature of the building's thermal energy storage system, represents the minimum indoor temperature of the building's thermal energy storage system, represents the heat capacity of the building's thermal energy storage system te, represents the passive thermal coefficient of the building m thermal energy storage system te, represents the outdoor temperature of the thermal energy storage system te of building m at time t, c p is the specific heat capacity of air, represents the mass flow of thermal energy storage system te in building m at time t, The outlet temperature of the thermal energy storage system te of building m at time t.

[0036] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0037] The technical solution of the present invention achieves the following core advantages by constructing a two-way dynamic collaborative optimization mechanism between the power grid and the building: adopting a hybrid modeling architecture of AC power flow constraints on the grid side and DC power flow models on the building side, taking into account both operational safety and computational efficiency; opening up a two-way information interaction channel between the grid operating cost and the building energy storage scheduling through the real-time transmission mechanism of the dynamic node marginal electricity price, significantly improving the renewable energy absorption capacity and system economy; proposing a unified modeling method for generalized energy storage, compatible with the heterogeneous characteristics of battery energy storage and thermal energy storage, and realizing the spatiotemporal collaborative optimization of multiple types of energy storage; innovatively introducing a cross-period value quantification model, incorporating the long-term benefits of energy storage actions into the decision-making system, and effectively avoiding short-sighted scheduling strategies. This method has significant engineering application value in improving the operational flexibility of the power grid, tapping the potential of flexible resources on the building side, and enhancing the source-load coordination capability. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 It is a training flow chart of the method of the present invention;

[0039] Figure 2 This is an example diagram of a power grid model for power grid-building collaboration;

[0040] Figure 3 This is a comparison chart of the total power of the power grid under different electricity prices. DETAILED DESCRIPTION

[0041] The present invention is further illustrated below with reference to the accompanying drawings and specific embodiments. It should be understood that these embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention. After reading the present invention, various equivalent modifications of the present invention by those skilled in the art fall within the scope defined by the claims attached to this application.

[0042] like Figure 1 As shown, the present invention provides a method for power grid-building collaborative optimization operation based on generalized energy storage, the method comprising the following steps:

[0043] Step 1: Obtain the grid network parameters and load node and unit node operating parameters; the building network parameters and load node and generalized energy storage system node operating parameters; initialize the node marginal electricity price and building interactive active power;

[0044] Step 2: Obtain the active power and reactive power data of the grid load node at time t; the active power of the building load node, the active power of the renewable energy node, and the state of charge data of the generalized energy storage system at time t;

[0045] Step 3: Based on the grid network parameters and load node and unit node operating parameters of step 2, the interactive active power of the building at time t; establish a grid operation model with AC power flow constraints and unit constraints as constraints and the minimum grid operation cost as the objective function; solve to obtain the minimum grid operation cost at time t, calculate the Lagrangian factor of the active power in the grid AC power flow constraint, and set it as the node marginal electricity price of the grid load node at time t;

[0046] Step 4. Based on the node marginal electricity price of the grid load node at time t in step 3, the active power and reactive power data of the building load node at time t in step 2, the active power data of the building renewable energy node, the charging and discharging power of the building generalized energy storage system at time t in step 4, and the building network parameters and load node and generalized energy storage system node operating parameters in step 1; establish a building operation model with DC power flow constraints and generalized energy storage constraints as constraints and the maximum building benefit in all time periods as the objective function; solve and obtain the building interactive active power at time t and the charge state of the building generalized energy storage system at time t+1.

[0047] Furthermore, in step 3, with AC power flow constraints and unit constraints as constraints, and minimizing grid operation costs as the objective function, the following is obtained:

[0048] Objective function:

[0049]

[0050] Among them, pd represents the power grid, F t pd represents the grid operation cost at time t, G represents the set of units, g represents the unit number, a g 、b g and c g They represent the quadratic coefficient, primary coefficient and constant term of the power generation cost of unit g, respectively. t g represents the power generated by unit g at time t, M represents the building set, m represents the building number, P t m represents the interactive active power between building m and the grid at time t, represents the marginal electricity price of node m in building at time t.

[0051] Furthermore, in step 3, the AC power flow constraints and unit constraints are as follows:

[0052] 1) AC power flow constraints:

[0053]

[0054]

[0055] 2) Unit constraints:

[0056]

[0057] Where, P i,t Indicates the active power input by node i at time t, F i represents the end node of the line starting from node i, T i represents the starting node of the line with node i as the terminal node, P ij,t represents the active power transmitted from node i to node j at time t, P ji,t represents the active power transmitted from node j to node i at time t, I ji,t represents the square of the line current transmitted from node j to node i at time t, R ij represents the resistance of line ij, i and j represent the grid node numbers, B represents the grid node set, Q i,t Indicates that node i actively inputs reactive power at time t, Q ij,t represents the reactive power transmitted from node i to node j at time t, Q ji,t represents the reactive power transmitted from node j to node i at time t, X ij Represents the line ij reactance, V i,t represents the square of the voltage at node i at time t, V j,t represents the square of the voltage at node j at time t, I ij,trepresents the square of the current transmitted from node i to node j at time t, ij represents the line from node j to node i, L represents the line set, represents the square of the maximum line transmission current of line ij, represents the square of the maximum voltage at node i, V i represents the square of the minimum voltage at node i, represents the maximum active power of node i, P i represents the minimum active power of node i, represents the maximum reactive power of node i, Q i represents the minimum reactive power of node i, Indicates the power generation of unit g at time t-1, RU g Indicates the maximum value of the upslope of the unit g in adjacent time intervals, RD g Indicates the maximum downslope value of unit g in adjacent time intervals.

[0058] Furthermore, in step 4, with the DC power flow constraint and the generalized energy storage constraint as constraints, the objective function is to maximize the building benefit during the entire period:

[0059] Objective function:

[0060]

[0061] Among them, F m represents the full-time building m income, T represents the time interval set, t represents the time interval number, b e represents the unit charge and discharge power cost of the generalized energy storage system e, E represents the generalized energy storage system set, e represents the generalized energy storage system number, represents the charging and discharging power of the generalized energy storage system e of building m at time t, b re Represents the unit power generation cost of renewable energy re, RE represents the renewable energy set, re represents the renewable energy number, P t m,re Represents the power generated by renewable energy re in building m at time t.

[0062] Furthermore, in step 4, the DC power flow constraint and generalized energy storage constraint are:

[0063] 1) DC power flow constraints:

[0064]

[0065] 2) Generalized energy storage constraints:

[0066]

[0067] Where LO represents the load node set, lo represents the load node number, P tm,lo It represents the power consumption of load node lo in building m at time t, represents the state of charge of the generalized energy storage system e of building m at time t, represents the capacity of the generalized energy storage system e of building m at time t, represents the maximum capacity of the generalized energy storage system e of building m, represents the minimum capacity of the generalized energy storage system e of building m, represents the actual maximum charging power of the generalized energy storage system e in building m at time t, represents the actual minimum discharge power of the generalized energy storage system e of building m at time t, represents the self-loss coefficient of the generalized energy storage system e of building m at time t, represents the maximum charging power set for the generalized energy storage system e of building m, represents the minimum discharge power of the generalized energy storage system e in building m, Δt represents the length of the interval, represents the state of charge of the generalized energy storage system e of building m at time t+1;

[0068] Due to the differences in energy storage media, the relationships between generalized energy storage parameters and variables and those of battery and thermal energy storage are different, as follows:

[0069] 1) Relationship between generalized energy storage and battery energy storage parameters and variables:

[0070]

[0071] 2) Relationship between generalized energy storage and thermal energy storage parameters and variables:

[0072]

[0073] Where, be represents the battery energy storage system number, represents the capacity of the battery energy storage system be in building m at time t, represents the rated capacity of the battery energy storage system be in building m, ζ be represents the self-loss coefficient of the battery energy storage system be, It represents the charging and discharging power of the battery energy storage system be in building m at time t, Indicates the charging status of the battery energy storage system be in building m at time t, represents the discharge state of the battery energy storage system be in building m at time t, η ch represents the charging efficiency of the battery energy storage system, η dis represents the discharge efficiency of the battery energy storage system, te represents the number of the thermal energy storage system, represents the indoor temperature of the thermal energy storage system te in building m at time t, represents the maximum indoor temperature of the building's thermal energy storage system, represents the minimum indoor temperature of the building's thermal energy storage system, represents the heat capacity of the building's thermal energy storage system te, represents the passive thermal coefficient of the building m thermal energy storage system te, represents the outdoor temperature of the thermal energy storage system te of building m at time t, c p is the specific heat capacity of air, represents the mass flow of thermal energy storage system te in building m at time t, The outlet temperature of the thermal energy storage system te of building m at time t.

[0074] Case Analysis

[0075] The following example illustrates the superiority of the grid-building collaborative optimization method of the present invention. Figure 2 The improved IEEE 33-bus power system is shown. To compare the superiority of the proposed method, a single-period comparison was performed with the proposed method. Time-of-use electricity pricing was also compared with the node marginal electricity price used in the proposed method. The present invention was implemented using the Python platform and the Gurobi solver was used to solve the optimization problem.

[0076] Based on this example, the comparison of different optimized grid costs and building benefits is shown in Table 1; and the comparison of total grid power under different electricity prices is shown in Table 1. Figure 3 The present invention reduces grid costs and increases building revenue by considering incentives, see Table 1. Compared with time-of-use electricity prices, the present invention uses node marginal electricity prices to reduce peak loads and fill valleys in the grid, see Figure 3 .

[0077] Table 1 Comparison of grid costs and building benefits of different algorithms

[0078]

[0079] The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or replacements that can be easily thought of by any technician familiar with this technical field within the technical scope disclosed by the present invention should be covered by the scope of protection of the present invention.

Claims

1. A method for grid-building collaborative optimization operation based on generalized energy storage, characterized in that: The method comprises the following steps: Step 1: Obtain the grid network parameters and load node and unit node operating parameters; the building network parameters and load node and generalized energy storage system node operating parameters; initialize the node marginal electricity price and building interactive active power; Step 2: Obtain the active power and reactive power data of the grid load node at time t; the active power of the building load node, the active power of the renewable energy node, and the state of charge data of the generalized energy storage system at time t; Step 3: Based on the grid network parameters and load node and unit node operating parameters of step 2, the interactive active power of the building at time t; establish a grid operation model with AC power flow constraints and unit constraints as constraints and the minimum grid operation cost as the objective function; solve to obtain the minimum grid operation cost at time t, calculate the Lagrangian factor of the active power in the grid AC power flow constraint, and set it as the node marginal electricity price of the grid load node at time t; Step 4. Based on the node marginal electricity price of the grid load node at time t in step 3, the active power and reactive power data of the building load node at time t in step 2, the active power data of the building renewable energy node, the charging and discharging power of the building generalized energy storage system at time t in step 4, and the building network parameters and load node and generalized energy storage system node operating parameters in step 1; establish a building operation model with DC power flow constraints and generalized energy storage constraints as constraints and the maximum building benefit in all time periods as the objective function; solve and obtain the building interactive active power at time t and the charge state of the building generalized energy storage system at time t+1.

2. A method for coordinated optimization of power grid and building operation based on generalized energy storage according to claim 1, characterized in that: In step 3, with AC power flow constraints and unit constraints as constraints, the objective function is to minimize the grid operation cost: Objective function: Among them, pd represents the power grid, F t pd represents the grid operation cost at time t, G represents the set of units, g represents the unit number, a g 、b g and c g They represent the quadratic coefficient, primary coefficient and constant term of the power generation cost of unit g, respectively. t g represents the power generated by unit g at time t, M represents the building set, m represents the building number, P t m represents the interactive active power between building m and the grid at time t, Represents the marginal electricity price of node m in building at time t.

3. The method for coordinated optimization of power grid and building based on generalized energy storage according to claim 2, characterized in that: In step 3, the AC power flow constraints and unit constraints are as follows: 1) AC power flow constraints: 2) Unit constraints: Where, P i,t Indicates the active power input by node i at time t, F i represents the end node of the line starting from node i, T i represents the starting node of the line with node i as the terminal node, P ij,t represents the active power transmitted from node i to node j at time t, P ji,t represents the active power transmitted from node j to node i at time t, I ji,t represents the square of the line current transmitted from node j to node i at time t, R ij represents the resistance of line ij, i and j represent the grid node numbers, B represents the grid node set, Q i,t Indicates that node i actively inputs reactive power at time t, Q ij,t represents the reactive power transmitted from node i to node j at time t, Q ji,t represents the reactive power transmitted from node j to node i at time t, X ij Represents the line ij reactance, V i,t represents the square of the voltage at node i at time t, V j,t represents the square of the voltage at node j at time t, I ij,t represents the square of the current transmitted from node i to node j at time t, ij represents the line from node j to node i, L represents the line set, represents the square of the maximum line transmission current of line ij, represents the square of the maximum voltage at node i, V i represents the square of the minimum voltage at node i, represents the maximum active power of node i, P i represents the minimum active power of node i, represents the maximum reactive power of node i, Q i represents the minimum reactive power of node i, Indicates the power generation of unit g at time t-1, RU g Indicates the maximum value of the upslope of the unit g in adjacent time intervals, RD g Indicates the maximum downslope value of unit g in adjacent time intervals.

4. A method for coordinated optimization of power grid and building operation based on generalized energy storage according to claim 3, characterized in that: In step 4, with DC power flow constraint and generalized energy storage constraint as constraints, the objective function is to maximize the building benefit during the entire period: Objective function: Among them, F m represents the full-time building m income, T represents the time interval set, t represents the time interval number, b e represents the unit charge and discharge power cost of the generalized energy storage system e, E represents the generalized energy storage system set, e represents the generalized energy storage system number, represents the charging and discharging power of the generalized energy storage system e of building m at time t, b re Represents the unit power generation cost of renewable energy re, RE represents the renewable energy set, re represents the renewable energy number, P t m,re Represents the power generated by renewable energy re in building m at time t.

5. A method for coordinated optimization of power grid and building operation based on generalized energy storage according to claim 4, characterized in that: In step 4, the DC power flow constraint and generalized energy storage constraint are: 1) DC power flow constraints: 2) Generalized energy storage constraints: Where LO represents the load node set, lo represents the load node number, P t m,lo It represents the power consumption of load node lo in building m at time t, represents the state of charge of the generalized energy storage system e of building m at time t, represents the capacity of the generalized energy storage system e of building m at time t, represents the maximum capacity of the generalized energy storage system e of building m, represents the minimum capacity of the generalized energy storage system e of building m, represents the actual maximum charging power of the generalized energy storage system e in building m at time t, represents the actual minimum discharge power of the generalized energy storage system e of building m at time t, represents the self-loss coefficient of the generalized energy storage system e of building m at time t, represents the maximum charging power set for the generalized energy storage system e of building m, represents the minimum discharge power of the generalized energy storage system e in building m, Δt represents the length of the interval, represents the state of charge of the generalized energy storage system e of building m at time t+1; Due to the differences in energy storage media, the relationships between generalized energy storage parameters and variables and those of battery and thermal energy storage are different, as follows: 1) Relationship between generalized energy storage and battery energy storage parameters and variables: 2) Relationship between generalized energy storage and thermal energy storage parameters and variables: Where, be represents the battery energy storage system number, represents the capacity of the battery energy storage system be in building m at time t, represents the rated capacity of the battery energy storage system be in building m, ζ be represents the self-loss coefficient of the battery energy storage system be, It represents the charging and discharging power of the battery energy storage system be in building m at time t, Indicates the charging status of the battery energy storage system be in building m at time t, represents the discharge state of the battery energy storage system be in building m at time t, η ch represents the charging efficiency of the battery energy storage system, η dis represents the discharge efficiency of the battery energy storage system, te represents the number of the thermal energy storage system, represents the indoor temperature of the thermal energy storage system te in building m at time t, represents the maximum indoor temperature of the building's thermal energy storage system, represents the minimum indoor temperature of the building's thermal energy storage system, represents the heat capacity of the building's thermal energy storage system te, represents the passive thermal coefficient of the building's thermal energy storage system te, represents the outdoor temperature of the thermal energy storage system te of building m at time t, c p is the specific heat capacity of air, represents the mass flow of thermal energy storage system te in building m at time t, The outlet temperature of the thermal energy storage system te of building m at time t.