A method and device for multi-energy flow calculation of an energy system based on topological partitioning, and a storage medium
By performing topological partitioning and type identification on the IES mathematical model, and using the forward-backward substitution method and the finite element method to solve the multi-energy flow of sub-blocks, the problems of low efficiency and poor convergence in multi-energy flow calculation in integrated energy systems are solved, and efficient calculation under complex topologies is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING GUODIAN NANZI POWER GRID AUTOMATION CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-06-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing multi-energy flow calculation methods in integrated energy systems suffer from problems such as ill-conditioned Jacobian matrix, iterative divergence, long computation time, high sensitivity to initial values, and inability to adapt to complex hybrid topologies, resulting in low computational efficiency and poor convergence.
The IES mathematical model is decomposed into radial or annular minimum sub-blocks using a topology partitioning method. The multi-energy flow of the sub-blocks is solved by forward substitution and finite element method respectively. Convergence independence is ensured by mapping the equivalent topology and connecting nodes.
It improves computational efficiency and convergence stability, is suitable for complex hybrid topology integrated energy systems, quickly locates non-convergent sub-blocks, and ensures the physical validity of the results.
Smart Images

Figure CN122154358A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of integrated energy system operation and planning technology, and in particular to a multi-energy flow calculation method, device and storage medium for energy systems based on topology partitioning. Background Technology
[0002] Integrated Energy Systems (IES) achieve multi-energy synergy by coupling electricity, natural gas, and heat systems, which can improve energy utilization efficiency and reduce renewable energy curtailment rates. Multi-Energy-Flow (MEF) computation, as the core foundation for IES operation optimization and planning, directly determines the reliability of system analysis through its convergence, efficiency, and initial value adaptability. Current mainstream MEF computation methods have significant drawbacks: unified computation methods require the construction of complex hybrid energy flow equations, and the Jacobian matrix is prone to ill-conditioned behavior when dealing with large-scale IES, leading to iteration divergence; decomposition computation methods, while decoupling IES into subsystems, suffer from coarse-grained sub-block partitioning, long computation time, reliance on a single algorithm to adapt to all topologies, extremely high initial value accuracy requirements, repeated adjustments of initial values are necessary during non-convergence, and the convergence of subsystems is interconnected, making it difficult to locate non-convergent sub-blocks, thus failing to meet the computational needs of complex hybrid topology IES. Summary of the Invention
[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, device and storage medium for multi-energy flow calculation of energy systems based on topology partitioning, which can alleviate the technical problem that the prior art cannot meet the calculation requirements of complex hybrid topology IES.
[0004] To achieve the above objectives, the present invention is implemented using the following technical solution:
[0005] In a first aspect, the present invention provides a multi-energy flow calculation method for energy systems based on topology partitioning, executed based on the energy system, including:
[0006] The subsystems of the pre-built IES mathematical model are topologically partitioned, and each subsystem is decomposed into the smallest sub-blocks containing only radial or ring sub-network topologies.
[0007] Determine the connection nodes of adjacent sub-blocks and aggregate them to form an equivalent topology;
[0008] For each sub-block, a balancing node is set. Based on the balancing node, the sub-network topology type is determined by the forward-backward substitution method for radial sub-network topology and by the finite element method for ring sub-network topology.
[0009] Based on the state variables of the connected nodes, the calculation results of each sub-block are mapped to the original IES topology according to preset rules, and the multi-energy flow calculation results are output.
[0010] Furthermore, the IES mathematical model includes a power system model, a natural gas system model, a thermal system model, and a multi-energy coupling device model.
[0011] Furthermore, the subsystems of the pre-constructed IES mathematical model are topologically partitioned, decomposing each subsystem into the smallest sub-blocks containing only radial or ring sub-network topologies. The connection nodes between adjacent sub-blocks are determined and aggregated to form an equivalent topology, including:
[0012] Based on the correlation matrix A between the subsystems in the IES mathematical model, the subnetwork topology type is identified by rank analysis and loop detection. The identified subnetwork topology types are radial subnetwork topology or ring subnetwork topology.
[0013] The connection nodes between adjacent sub-blocks are determined based on the topology type of each sub-block;
[0014] Each sub-block is aggregated into an equivalent node, while the connecting nodes are retained as boundaries;
[0015] Based on the aggregated equivalent nodes and connecting nodes, construct an equivalent topology that retains only the association between equivalent nodes and connecting nodes, and the cross-sub-block branches between connecting nodes.
[0016] Furthermore, the multi-energy flow of each sub-block is solved, including:
[0017] When the subnetwork topology is radial, the forward-backward substitution method is used:
[0018] Based on the law of conservation of nodal loads, the branch flow rates of the thermal system, power system and natural gas system are calculated in reverse from the end load node to the source point.
[0019] The node state variables are calculated based on the branch flow of the thermal system, power system, and natural gas system. The node state variables include node voltage, node temperature, and node pressure.
[0020] Calculate the iteration error of each node's state variable separately until the maximum value of the iteration error of different node's state variables is less than the pre-set judgment threshold;
[0021] When the subnetwork topology is a ring subnetwork topology, the finite element method is used:
[0022] Linearize the nonlinear flow-pressure relationship in the natural gas system to obtain the linearized pressure drop-flow relationship;
[0023] Pipe admittance is constructed based on the linearized pressure drop-flow relationship;
[0024] Construct the overall admittance matrix based on the pipeline admittance;
[0025] By combining the overall admittance matrix with the nodal flow continuity model in the natural gas system, the pressure correction equation is obtained;
[0026] Solve the pressure correction equation to obtain the pressure correction value, update the nodal pressure based on the pressure correction value, and obtain the updated nodal pressure;
[0027] The pressure iteration error is calculated based on the updated node pressure and the node pressure before the update. The iteration is completed when the maximum absolute value of the pressure iteration error is less than the preset pressure threshold.
[0028] The branch flow of the natural gas system is updated based on the last updated node pressure and the linearized pressure drop-flow relationship;
[0029] The solutions of each subsystem obtained by the forward-backward substitution method and the finite element method are combined as the multi-energy flow results of the sub-block. The multi-energy flow results include the branch flow and node state quantities of the thermal system, the power system and the natural gas system.
[0030] Furthermore, in the process of solving the multi-energy flow of each sub-block, if the maximum value of the iteration error of different node state variables is greater than or equal to a pre-set judgment threshold, and a compressor with a constant outlet pressure exists within that sub-block, the following is also included:
[0031] Compressor nodes with equal outlet pressure and the same pressure ratio coefficient are merged into a new isobaric node;
[0032] Replace the original compressor node with the new isobaric node, reconnect the branches originally connected to the compressor to the new isobaric node, and update the node-branch association matrix;
[0033] Based on the updated node-branch correlation matrix, the solution is recalculated until the sub-blocks converge.
[0034] Furthermore, the preset rules include:
[0035] The state variables of the connected nodes in different sub-blocks must be consistent. If there is a deviation, the multi-energy flow calculation result of the sub-block with the smaller iterative residual shall be taken.
[0036] For non-connected nodes in the original IES topology, the calculation results of their respective sub-blocks are directly used without adjustment;
[0037] The branch flow and branch power calculated in the original IES topology directly adopt the calculation results of their respective sub-blocks without adjustment;
[0038] If there is a deviation in the flow across sub-block branches, the multi-energy flow calculation result of the sub-block with better convergence should be taken.
[0039] Secondly, the present invention provides a multi-energy flow computing device for energy systems based on topology partitioning, comprising:
[0040] The partitioning module is used to perform topological partitioning on each subsystem of the pre-built IES mathematical model, decomposing each subsystem into the smallest sub-block containing only radial or ring sub-network topologies.
[0041] The aggregation module is used to determine the connection nodes of adjacent sub-blocks and aggregate them to form an equivalent topology;
[0042] The solution module is used to set a balancing node for each sub-block. Based on the balancing node, and the equivalent topology of the sub-network topology, the radial sub-network topology is solved by the forward-backward substitution method, and the ring sub-network topology is solved by the finite element method.
[0043] The output module is used to map the calculation results of each sub-block to the original IES topology according to a preset rule based on the state variables of the connected nodes, and output the multi-energy flow calculation results.
[0044] Thirdly, the present invention provides an electronic terminal, including a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the steps of the method described in any of the preceding claims are performed.
[0045] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0046] Compared with the prior art, the beneficial effects achieved by the present invention are as follows:
[0047] This invention first proposes a multi-energy flow calculation method for energy systems based on topological partitioning. This method first constructs a comprehensive IES mathematical model, then partitions the topology of each subsystem of the IES mathematical model into minimal sub-blocks containing only radial or annular structures, and aggregates equivalent topologies. For different topological sub-blocks, it matches forward substitution and finite element methods respectively. Furthermore, it sets upstream equilibrium nodes for sub-blocks to achieve convergence independence. For non-convergent sub-blocks containing compressors with constant outlet pressure, it merges isobaric nodes, reconstructs the topology, and recalculates. Finally, it maps the sub-block results to the original topology and outputs the calculation results. This invention eliminates convergence interference from mixed topologies, broadens the feasible initial value range, improves computational efficiency and convergence stability, enables rapid location of non-convergent sub-blocks, ensures the physical validity of the results, and is applicable to multi-energy flow solutions for complex mixed topology integrated energy systems. It solves the problems of poor convergence, high initial value sensitivity, low computational efficiency, and inability to adapt to radial + annular mixed topologies in existing methods. Attached Figure Description
[0048] Figure 1 This is a flowchart of a multi-energy flow calculation method for an energy system based on topology partitioning, provided by an embodiment of the present invention. Detailed Implementation
[0049] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments and specific features in the embodiments are detailed descriptions of the technical solution of the present application, rather than limitations thereof. In the absence of conflict, the embodiments and technical features in the embodiments can be combined with each other.
[0050] In this invention, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B together, or B alone. Additionally, in this invention, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0051] Example 1:
[0052] Figure 1 This is a flowchart of the energy system multi-energy flow calculation method based on topology partitioning in Embodiment 1 of the present invention. The energy system multi-energy flow calculation method based on topology partitioning provided in this embodiment can be executed based on an energy system, which here refers to the integrated energy system in the background art. Figure 1 The flowchart in this embodiment only illustrates the logical order of the method described in this embodiment. Provided there are no conflicts, other possible embodiments of the invention may use different methods. Figure 1 Complete the steps shown or described in the order indicated.
[0053] Step 1: Perform topological partitioning on each subsystem of the pre-built IES mathematical model, decomposing each subsystem into the smallest sub-block containing only radial or ring sub-network topologies; the IES mathematical model includes a power system model, a natural gas system model, a thermal system model, and a multi-energy coupling device model;
[0054] The power system model adopts an AC power flow model based on nodal power conservation. Its core expression is the active and reactive power balance formula at each node, describing the power exchange relationship between bus nodes in the power system. Here, a node is a bus, and a branch is a transmission line / transformer. The expression is:
[0055] ;
[0056] in, For power system nodes active power, For power system nodes reactive power, and Power system nodes , voltage amplitude, The total number of nodes in the power system. and Power system nodes , phase angle, For power system nodes and voltage phase angle difference, The power system node admittance matrix Line number The conductivity of the column, The nodal admittance matrix of the power system Line number The column's electrical susceptance.
[0057] The thermal system model includes a hydraulic model, a thermal model, a pipe heat dissipation correction model, a node mixing temperature balance model, and a total heat loss balance model of the heating network, which comprehensively characterizes the water flow, heat transfer and energy loss characteristics of the thermal system. Among them, nodes are heat exchange stations / load points, and branches are thermal pipelines.
[0058] The expression for the hydraulic model is as follows:
[0059] ;
[0060] in, The node-branch correlation matrix of the thermal system. The mass flow rate of each branch of the thermal system. For heat pipes in a heating system The injected traffic at each node;
[0061] The expression for the thermodynamic model is:
[0062] ;
[0063] in, thermal nodes heat load, The specific heat capacity of water at constant pressure. thermal nodes Heat load mass flow rate, thermal nodes water supply temperature, thermal nodes The return water temperature;
[0064] The expression for the pipe heat dissipation correction model is:
[0065] ;
[0066] in, For heating pipes The terminal temperature, in °C. For heating pipes The starting temperature, in °C. This refers to the ambient temperature, expressed in °C. For heating pipes heat transfer coefficient, For heating pipes Length, For heating pipes The mass flow rate of the internal medium; in this embodiment, the thermal pipeline is actually the water supply pipeline of the thermal system, and is uniformly abbreviated as thermal pipeline.
[0067] The expression for the nodal mixing temperature equilibrium model is:
[0068] ;
[0069] in, thermal nodes Total outflow mass flow rate, via heating pipes Inflow to thermal nodes mass flow rate thermal nodes The mixing temperature, i.e., the thermal node The outlet water temperature, For heating pipes The end temperature of the heat pipe Input thermal nodes The temperature of the medium, For all incoming heat nodes The set of upstream pipeline numbers;
[0070] The expression for the total heat loss balance model of the heating network is:
[0071] ;
[0072] in, The total heat loss of the water supply network of the heating system. The total heating power of the heat source. For the set of all thermal nodes; thermal nodes The heat load;
[0073] The natural gas system model adopts the modified Weymouth model suitable for medium-pressure pipelines. It is applicable to medium-pressure pipelines and includes a pipeline flow-pressure relationship model, a node flow continuity model, and a simplified pipeline pressure drop model. It reflects the flow and pressure change of natural gas in the pipeline, where nodes are gas valves / compressor stations and branches are gas transmission pipelines.
[0074] The expression for the pipeline flow-pressure relationship model is as follows:
[0075] ;
[0076] in, For natural gas pipelines Traffic, For natural gas pipelines Pipeline constant, This serves as an indicator of the direction of natural gas flow. hour ,otherwise , and These are the starting nodes in the natural gas pipeline. End point The pressure;
[0077] The expression for the node traffic continuity model is:
[0078] ;
[0079] in, This is the node-branch correlation matrix of a natural gas system without a balancing node. For the flow vectors of each branch of the natural gas system, This represents the load vector of each node in the natural gas system, excluding the source node.
[0080] The simplified expression for the pipeline pressure drop model is:
[0081] ;
[0082] in, For natural gas pipelines The difference in squared pressure at both ends For natural gas pipelines Pipe impedance.
[0083] The multi-energy coupling equipment model includes an electric boiler model, a gas boiler model, and a gas storage tank model. The electric boiler and gas boiler models represent the electric-heat and gas-heat conversion relationships based on energy conversion efficiency, respectively. The gas storage tank model is modeled as a source node or load node of the natural gas system according to the operating state, which is gas storage or gas release. Its flow rate is directly included in the natural gas system flow rate calculation.
[0084] The expression for the electric boiler model is:
[0085] ;
[0086] in, For the electric boiler to output heat power, The rated power supply for the electric boiler, For the thermal efficiency of electric boilers;
[0087] The expression for the gas-fired boiler model is:
[0088] ;
[0089] ;
[0090] in, For the output heat power of the gas boiler, The rated gas supply power of the gas boiler, For the thermal efficiency of gas-fired boilers, This refers to the natural gas consumption of the gas-fired boiler. It has a low calorific value for natural gas;
[0091] The gas storage tank model is modeled as a source node or load node according to the operating status, and its flow is included in the natural gas system calculation.
[0092] Specifically, the subsystems of the pre-constructed IES mathematical model are topologically partitioned, and each subsystem is decomposed into the smallest sub-blocks containing only radial or ring sub-network topologies, including:
[0093] Node-branch association matrices are constructed for each subsystem, with the matrix dimensions matching the actual number of nodes and branches. The connection relationships between nodes and branches are clearly defined through matrix elements, providing a foundation for topology identification.
[0094] Based on the node-branch correlation matrix between subsystems in the IES mathematical model, the subnetwork topology type is identified through rank analysis and loop detection. The identified subnetwork topology types are radial subnetwork topology or ring subnetwork topology.
[0095] Specifically, when the rank of the node-branch association matrix is There is only one path between any two nodes, where The order of the node-branch correlation matrix indicates a radial subnetwork topology, signifying no redundant connections and no loops. The absence of non-zero vectors indicates no closed paths.
[0096] When the rank of the node-branch association matrix is less than If there is at least one closed loop between any two nodes, it is determined to be a ring subnetwork topology;
[0097] When the flow in a natural gas system is balanced, it is a ring subnetwork topology; otherwise, it is a radial subnetwork topology.
[0098] Step 2: Based on the topology type of each adjacent sub-block, determine the connection nodes between adjacent sub-blocks:
[0099] Connecting nodes are the core hubs for energy transfer between sub-blocks. Connecting nodes are common nodes of adjacent sub-blocks and must meet the following conditions: they belong to at least two sub-blocks of different topologies; their node degree, i.e., the number of associated branches, is greater than or equal to two, and different branches belong to different sub-blocks. The grid nodes to be determined... The condition for determining whether a node is connected is that it exists. and , making satisfy:
[0100] ;
[0101] It is a radial sub-block. It is a ring-shaped sub-block; These are the power grid nodes to be determined. The elements of the node-branch correlation matrix represent the power grid nodes to be determined. and branch road Topological relationships; For coverage nodes The total number of branches in all sub-blocks, including radial sub-blocks. With ring sub-blocks ; For the power grid node to be determined The node degree, which is the sum of the absolute values of the number of associated branches, ensures that a node connects to multiple child blocks;
[0102] Each sub-block is aggregated into an equivalent node, while retaining the connecting nodes as boundaries. The aggregation follows the principle of preserving physical properties and reducing computational dimensionality.
[0103] Load aggregation: The loads of all nodes within a sub-block are summed to form an equivalent load, reflecting the overall load demand;
[0104] Parameter equivalence: The branch parameters within the sub-block are merged into equivalent parameters. In this embodiment, the equivalent impedance of parallel pipelines is calculated for the natural gas sub-block, and the equivalent heat loss of pipelines within the sub-block is calculated for the thermal sub-block.
[0105] For natural gas sub-blocks, the load of the equivalent node after aggregation. The sum of the loads of all nodes within the sub-block is expressed as:
[0106] ;
[0107] in, The set of nodes within the sub-block. For natural gas nodes Natural gas load.
[0108] The equivalent impedance of a natural gas pipeline is such that the total flow rate of parallel pipelines is the sum of the flow rates of each branch, and the pressure drop characteristics remain consistent after equivalence.
[0109] Based on the aggregated equivalent nodes and connecting nodes, an equivalent topology is constructed that retains only the association relationships between equivalent nodes and connecting nodes, as well as the cross-sub-block branches between connecting nodes. The association matrix of the equivalent topology is then calculated. Defined as:
[0110] ;
[0111] Equivalent topological incidence matrix The dimension is much smaller than the original matrix. Furthermore, it fully preserves the key connections between sub-blocks to ensure calculation accuracy.
[0112] Step 3: Set a balancing node for each sub-block. Specifically, assign an upstream node as the balancing node for each sub-block. Using the balancing node as the reference, radial sub-blocks take the node closest to the source point, and annular sub-blocks take any connecting node. Fix its core state variables as the calculation reference to ensure the independence of sub-block iterative convergence.
[0113] Based on ensuring the independence of sub-block iteration convergence, and considering the sub-network topology types based on equivalent topology, the radial sub-network uses the forward-backward substitution method to solve the sub-block multi-energy flow, while the ring sub-network topology uses the finite element method to solve the sub-block multi-energy flow. The core is to embed the fixed state variables of the balancing nodes into the iterative process.
[0114] 1) Calculation using the forward-backward substitution method:
[0115] When the subnetwork topology is radial, the forward-backward substitution method is used:
[0116] Based on the law of conservation of nodal loads, the branch flow rates of the thermal system, power system and natural gas system are calculated in reverse from the end load node to the source point.
[0117] The node state variables are calculated based on the branch flow of the thermal system, power system, and natural gas system. The node state variables include node voltage, node temperature, and node pressure.
[0118] In this embodiment, initialization processing can be performed first, and the sub-block may include:
[0119] Power sub-block, slack node voltage amplitude Phase angle with equilibrium node fixed, , Using a per-unit value of 1.0 as a baseline, the phase angle is set to 0 to simplify phase calculations and serve as a reference point for voltage and power iteration within the sub-block.
[0120] Natural gas sub-blocks, balancing node pressure Fixed, take the gas source pressure or the upstream pipeline pressure. ;in Natural gas sub-block balancing node pressure, This is the rated pressure for the natural gas system. Maintaining a fixed upstream pressure ensures the directionality of downstream pressure calculations and prevents pressure divergence in annular sub-blocks.
[0121] Thermal sub-block, equilibrium node temperature and balancing node traffic fixed, ,in heat source The supply water temperature refers to the temperature of the hot water delivered from the source of the heating system, where the heat source is the facility that converts energy into hot water for heat transfer. A fixed heat source temperature and flow rate ensure the monotonicity of downstream temperature calculations, conforming to the unidirectional flow characteristics of the heating network.
[0122] Step 1: Forward calculation.
[0123] Specifically, in power systems, for power flow calculations, the active or reactive power of distribution network branches is accumulated from downstream loads. The formula for accumulating downstream loads includes:
[0124] ;
[0125] ;
[0126] In the formula: , Branch roads Active and reactive power Represents power system nodes child nodes, Represents power system nodes The set of downstream child nodes, using express, For power system nodes active power, For power system nodes reactive power, and Representing branch roads Resistance, reactance loss, and branch losses current Associated with the balancing node and other nodes, , For power system nodes The voltage amplitude can be substituted into the aforementioned downstream load accumulation formula to eliminate the branch. current Three things were obtained about , , The equation, and the voltage amplitude at the equilibrium node. Calculate the voltage amplitude of the remaining nodes.
[0127] Step 2: Back-substitution calculation.
[0128] Based on the active and reactive power of each branch calculated in step 1, the power system voltage is back-substituted, and the node voltage is calculated based on the branch power loss:
[0129] ;
[0130] in, and Representing power system nodes and The voltage amplitude.
[0131] Specifically, in a heating system, for the calculation of water flow in a heating system, the injection flow at the load node is determined by the heat load, and the branch flow is the sum of the flow rates of all downstream loads. The specific calculation formula is as follows:
[0132] ;
[0133] ;
[0134] in, The specific heat capacity of water at constant pressure. thermal nodes Heat load mass flow rate, thermal nodes water supply temperature, thermal nodes The return water temperature Indicates heat pipe Mass flow rate of the internal medium Indicates heat pipe The set of downstream child nodes, in the radial subnetwork topology, nodes have a clear parent-child relationship.
[0135] The terminal temperature is calculated based on the branch flow rate of the thermal system, and the node temperature is calculated based on the terminal temperature. Simultaneously, the node temperature satisfies energy conservation. The expressions include:
[0136] ;
[0137] ;
[0138] in, For heating pipes The end temperature of the heat pipe Input thermal nodes The temperature of the medium, in °C. For heating pipes The starting temperature, in °C. This refers to the ambient temperature, expressed in °C. For heating pipes heat transfer coefficient, For heating pipes Length, For heating pipes Mass flow rate of the internal medium. thermal nodes Total outflow mass flow rate, via heating pipes Inflow to thermal nodes mass flow rate thermal nodes The mixing temperature, i.e., the thermal node The outlet water temperature, For all incoming heat nodes The set of upstream pipeline numbers;
[0139] Specifically, in a natural gas system, for flow calculation, based on the continuity of node flow, the branch flow is the sum of the loads of downstream nodes. This means that in a radial gas network without loops, the upstream pipeline flow is equal to the sum of all downstream loads and the branch flow.
[0140] ;
[0141] In the formula, For natural gas pipelines Traffic; For downstream nodes Natural gas load, For downstream nodes Flow to Node Traffic, Indicates downstream node The child nodes.
[0142] Calculating node pressure based on branch flow in a natural gas system: In a radial gas network, pressure decreases monotonically along the flow direction, with no loop interference, allowing for direct forward calculation. The expressions include:
[0143] ;
[0144] in, The starting pressure of the natural gas pipeline. For natural gas pipelines The final pressure, For natural gas pipelines The pipe impedance is determined by the pipe parameters; For natural gas pipelines Traffic.
[0145] Then, convergence is determined by calculating the iteration error of each node's state variable until the maximum value of the iteration error among different node state variables is less than a pre-set threshold. The expression includes:
[0146] ;
[0147] in, The iteration error is the node temperature. The iteration error represents the node pressure. The iteration error of the node voltage is denoted as . To determine the threshold;
[0148] 2) Finite element method calculation
[0149] When the subnetwork topology is a ring subnetwork topology, the finite element method can be used for both thermal and natural gas systems, while the forward-backward substitution method is still used for power systems.
[0150] Based on the natural gas system, the nonlinear flow-pressure relationship in the natural gas system is linearized at the current iteration point to obtain the linearized pressure drop-flow relationship;
[0151] Linearization can transform nonlinear equations into difference forms, reducing the difficulty of solving them;
[0152] The pipeline admittance is constructed based on the linearized pressure drop-flow relationship, and the expression includes:
[0153] ;
[0154] in, For natural gas pipelines Pipe admittance, For natural gas pipelines After the first The linearized pipeline flow rate obtained in the next iteration;
[0155] The overall admittance matrix is constructed based on the pipe admittance, and its expression includes:
[0156] ;
[0157] in, The diagonal matrix formed by the pipe admittance. This is the overall node admittance matrix, reflecting the overall topological characteristics of the annular sub-block; and These are the node-branch correlation matrix of a natural gas system without a balancing node and its transpose.
[0158] By combining the overall admittance matrix with the nodal flow continuity model of the natural gas system, the pressure correction equation is obtained, the expression of which includes:
[0159] ;
[0160] in, This represents the vector of squared corrections for nodal pressure. This represents the load vector of each node in the natural gas system, excluding the source node. For the first The flow vectors of each branch of the natural gas system in the next iteration;
[0161] Solve the pressure correction equation to obtain the pressure correction value, update the nodal pressure based on the pressure correction value, and obtain the updated nodal pressure;
[0162] The pressure iteration error is calculated based on the updated node pressure and the node pressure before the update. The iteration continues until the maximum absolute value of the pressure iteration error is less than the preset pressure threshold. The branch flow of the natural gas system is updated based on the last updated node pressure and the linearized pressure drop-flow relationship. The results are then combined with the solutions of other subsystems to form a multi-energy flow result.
[0163] Multi-energy flow results include: 1) power system nodes in the power system Injected active power reactive power and power system nodes , voltage amplitude , and phase angle , branch road current ;2) Thermal nodes in a thermal system water supply temperature Thermal nodes return water temperature heating pipes starting temperature heating pipelines terminal temperature 3) The pressure at the starting point and the pressure at the ending point of the natural gas system, as well as the branch flow rate. Here, the branch flow rate of the natural gas system refers to the natural gas pipeline flow rate. Traffic .
[0164] Step 4: Based on the state variables of the connected nodes, map the calculation results of each sub-block to the original IES topology according to preset rules, and output the multi-energy flow calculation results.
[0165] Based on the state variables of the connected nodes, the computation results of each sub-block are mapped to the original IES topology, restoring the complete state variable distribution of the global topology. The core is to ensure that the state variables of the connected nodes are consistent in different sub-blocks, and to deduce the state of other nodes in the original IES topology through the association relationships.
[0166] The mapping follows the principle of state consistency to ensure the integrity and accuracy of the original IES topology data. Specifically, the preset rules include:
[0167] The state variables of the connected nodes in different sub-blocks must be consistent. If there is a deviation, the multi-energy flow calculation result of the sub-block with the smaller iterative residual shall be taken.
[0168] Internal nodes: Non-connected nodes in the original IES topology will directly use the calculation results of their respective sub-blocks without adjustment;
[0169] The branch flow and branch power calculated in the original IES topology directly adopt the calculation results of their respective sub-blocks without adjustment;
[0170] If there is a deviation in the flow across sub-block branches, the multi-energy flow calculation result of the sub-block with better convergence should be taken.
[0171] Specifically, connecting nodes The state variables within the corresponding sub-block must satisfy the following:
[0172] ;
[0173] Among them, superscript , These represent the calculation results for radial and annular sub-blocks, respectively. and Representing the connection nodes respectively In radial sub-blocks and ring-shaped sub-blocks The result of stress; and Representing the connection nodes respectively In radial sub-blocks and ring-shaped sub-blocks The voltage results; and Representing the connection nodes respectively In radial sub-blocks and ring-shaped sub-blocks Temperature results;
[0174] For internal nodes that are not part of the connection nodes in the original IES topology, the calculation results of their respective sub-blocks are used directly without adjustment;
[0175] In the original IES topology, the flow / power of a branch is directly calculated using the results of its sub-block. For branches spanning sub-blocks (i.e., branches connecting different sub-blocks), the flow should remain equal. The flow of a branch spanning sub-blocks is calculated in both sub-blocks, so the results are consistent because they share the connection node. If the deviation exceeds the limit, the result of the iterative convergence of the sub-block is taken.
[0176] The multi-energy flow calculation method for energy systems based on topology partitioning provided in this embodiment, in the process of solving the multi-energy flow of each sub-block, if the maximum value of the iteration error of the state variables of different nodes is greater than or equal to a pre-set judgment threshold, and a compressor with a fixed outlet pressure exists within that sub-block, further includes:
[0177] A constant outlet pressure compressor refers to a compressor with a fixed outlet pressure; in this case, the inlet pressure... Import flow satisfy ,in, It is a fixed pressure ratio coefficient, and the flow rate is ≤ the compressor's maximum flow rate;
[0178] Compressor nodes with equal outlet pressure and the same pressure ratio coefficient are merged into a new isobaric node. The total flow rate is the sum of the flow rates of all compressors, and the equivalent inlet pressure is determined by the inlet pressure. Import flow Reverse deduction of the relational formula;
[0179] Replace the original compressor node with the new isobaric node, reconnect the branches originally connected to the compressor to the new isobaric node, and update the node-branch association matrix;
[0180] Based on the updated node-branch correlation matrix, the solution is recalculated until the sub-blocks converge.
[0181] Based on all the foregoing, let the sum of the active power of all generators in the entire system equal the sum of the active power of all loads and network losses:
[0182] ;
[0183] In the formula: and These represent the generator set index and the generator set set, respectively. and These represent the electrical load index and the electrical load set, respectively. and These represent the route index and the route set, respectively. To output active power to the generator; Active power is consumed by electrical loads; For the line Active power loss, For the line The current, For the line The resistance.
[0184] The total gas supply of the entire system is equal to the sum of all gas load consumption, changes in gas storage tank capacity, and pipeline losses.
[0185] ;
[0186] In the formula: and These represent the gas source index and the gas source set, respectively. and These represent the gas load index and the gas load set, respectively. and These represent the gas tank index and the gas tank set, respectively. and These represent the gas source pipeline index and the gas source pipeline set, respectively. gas source The gas supply For gas storage tank Gas supply volume; For gas load Consumption amount; For gas storage tank Changes in gas storage capacity, when the gas storage tank gas storage If positive, when the gas storage tank venting Negative; Gas source pipeline Leakage loss.
[0187] The total heat supply from the heat source equals the sum of all heat load consumption, heat loss from pipelines, and changes in the heat storage device:
[0188] ;
[0189] In the formula: and These represent the heat source index and the gas source set, respectively. and These represent the heat load index and the heat load set, respectively. and These represent the thermal storage device index and the thermal storage device set, respectively. and These represent the heat source pipeline index and the heat source pipeline set, respectively. heat source Heating supply, Indicates heat source The quality flow rate, Indicates heat source The return water temperature heat source The water supply temperature; For heat load Consumption amount; For heat source pipeline Heat loss; For heat storage devices The change in heat, when the heat storage device Heat storage The value is positive when the heat storage device is positive. Exothermic Negative;
[0190] For energy conversion devices such as electricity-to-gas and electricity-to-heat, in this embodiment, the energy conversion device can be a gas turbine and an electric boiler, and the input energy and output energy must meet the conversion efficiency requirement. For gas turbines:
[0191] ;
[0192] In the formula: For the power generation efficiency of gas turbine electro-gas conversion, Natural gas has a high calorific value. To consume gas power, For gas turbine 'output electrical power' For gas turbine index, Mechanical wear and tear;
[0193] For electric boilers:
[0194] ;
[0195] In the formula: For heating efficiency, For electric boilers Input electrical power, Index for electric boilers For electric boilers The output heat, This is for heat power loss.
[0196] If the errors of all the calculated conservation equations are within the allowable range, output the complete multi-energy flow result of the original IES topology.
[0197] Example 2:
[0198] Embodiment 2 of the present invention provides a multi-energy flow computing device for energy systems based on topology partitioning, comprising:
[0199] The partitioning module is used to perform topological partitioning on each subsystem of the pre-built IES mathematical model, decomposing each subsystem into the smallest sub-block containing only radial or ring sub-network topologies.
[0200] The aggregation module is used to determine the connection nodes of adjacent sub-blocks and aggregate them to form an equivalent topology;
[0201] The solution module is used to set a balance node for each of the sub-blocks, using the balance node as a reference.
[0202] Based on the equivalent topology of the subnetwork topology, the radial subnetwork uses the forward-backward substitution method and the ring subnetwork topology uses the finite element method to solve the subblock multi-energy flow.
[0203] The output module is used to map the calculation results of each sub-block to the original IES topology according to a preset rule based on the state variables of the connected nodes, and output the multi-energy flow calculation results.
[0204] The energy system multi-energy flow computing device based on topology partitioning provided in Embodiment 2 of the present invention can execute the energy system multi-energy flow computing method based on topology partitioning provided in Embodiment 1 of the present invention, and has the corresponding functional modules and beneficial effects of the method execution.
[0205] Example 3:
[0206] Embodiment 3 of the present invention also provides an electronic terminal, including a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and the processor is used to perform operations according to the instructions to execute the steps of the method described in Embodiment 1.
[0207] The electronic terminal provided in Embodiment 3 of the present invention can execute the energy system multi-energy flow calculation method based on topology partitioning provided in Embodiment 1 of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0208] Example 4:
[0209] Embodiment 4 of the present invention also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements the steps of the method described in Embodiment 1, and has the corresponding functional modules and beneficial effects of the method.
[0210] Those skilled in the art will understand that embodiments of this application can be provided as methods, apparatus, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0211] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0212] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0213] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0214] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A multi-energy flow calculation method for an energy system based on topology partitioning, characterized in that, Based on energy system execution, including: The subsystems of the pre-built IES mathematical model are topologically partitioned, and each subsystem is decomposed into the smallest sub-blocks containing only radial or ring sub-network topologies. Determine the connection nodes of adjacent sub-blocks and aggregate them to form an equivalent topology; For each sub-block, a balancing node is set. Based on the balancing node, the sub-network topology type is determined by the forward-backward substitution method for radial sub-network topology and by the finite element method for ring sub-network topology. Based on the state variables of the connected nodes, the calculation results of each sub-block are mapped to the original IES topology according to preset rules, and the multi-energy flow calculation results are output.
2. The multi-energy flow calculation method for energy systems based on topology partitioning according to claim 1, characterized in that, The IES mathematical model includes a power system model, a natural gas system model, a thermal system model, and a multi-energy coupling device model.
3. The multi-energy flow calculation method for energy systems based on topology partitioning according to claim 1, characterized in that, The pre-built IES mathematical model is used to perform topological partitioning of each subsystem, decomposing each subsystem into the smallest sub-blocks containing only radial or ring sub-network topologies. The connection nodes between adjacent sub-blocks are determined and aggregated to form an equivalent topology, including: Based on the correlation matrix between subsystems in the IES mathematical model, the subnetwork topology type is identified through rank analysis and loop detection. The identified subnetwork topology type is either radial subnetwork topology or ring subnetwork topology. The connection nodes between adjacent sub-blocks are determined based on the topology type of each sub-block; Each sub-block is aggregated into an equivalent node, while the connecting nodes are retained as boundaries; Based on the aggregated equivalent nodes and connecting nodes, construct an equivalent topology that retains only the association between equivalent nodes and connecting nodes, and the cross-sub-block branches between connecting nodes.
4. The multi-energy flow calculation method for energy systems based on topology partitioning according to claim 2, characterized in that, Solve for the multi-energy flow of each sub-block, including: When the subnetwork topology is radial, the forward-backward substitution method is used: Based on the law of conservation of nodal loads, the branch flow rates of the thermal system, power system and natural gas system are calculated in reverse from the end load node to the source point. The node state variables are calculated based on the branch flow of the thermal system, power system, and natural gas system. The node state variables include node voltage, node temperature, and node pressure. Calculate the iteration error of each node's state variable separately until the maximum value of the iteration error of different node's state variables is less than the pre-set judgment threshold; When the subnetwork topology is a ring subnetwork topology, the finite element method is used: Linearize the nonlinear flow-pressure relationship in the natural gas system to obtain the linearized pressure drop-flow relationship; Pipe admittance is constructed based on the linearized pressure drop-flow relationship; Construct the overall admittance matrix based on the pipeline admittance; By combining the overall admittance matrix with the nodal flow continuity model in the natural gas system, the pressure correction equation is obtained; Solve the pressure correction equation to obtain the pressure correction value, update the nodal pressure based on the pressure correction value, and obtain the updated nodal pressure; The pressure iteration error is calculated based on the updated node pressure and the node pressure before the update. The iteration is completed when the maximum absolute value of the pressure iteration error is less than the preset pressure threshold. The branch flow of the natural gas system is updated based on the last updated node pressure and the linearized pressure drop-flow relationship; The solutions of each subsystem obtained by the forward-backward substitution method and the finite element method are combined as the multi-energy flow results of the sub-block. The multi-energy flow results include the branch flow and node state quantities of the thermal system, the power system and the natural gas system.
5. The multi-energy flow calculation method for energy systems based on topology partitioning according to claim 4, characterized in that, In the process of solving the multi-energy flow of each sub-block, if the maximum value of the iteration error of different node state variables is greater than or equal to a pre-set judgment threshold, and a compressor with a constant outlet pressure exists within that sub-block, the following also applies: Compressor nodes with equal outlet pressure and the same pressure ratio coefficient are merged into a new isobaric node; Replace the original compressor node with the new isobaric node, reconnect the branches originally connected to the compressor to the new isobaric node, and update the node-branch association matrix; Based on the updated node-branch correlation matrix, the solution is recalculated until the sub-blocks converge.
6. The multi-energy flow calculation method for energy systems based on topology partitioning according to claim 1, characterized in that, The preset rules include: The state variables of the connected nodes in different sub-blocks must be consistent. If there is a deviation, the multi-energy flow calculation result of the sub-block with the smaller iterative residual shall be taken. For non-connected nodes in the original IES topology, the calculation results of their respective sub-blocks are directly used without adjustment; The branch flow and branch power calculated in the original IES topology directly adopt the calculation results of their respective sub-blocks without adjustment; If there is a deviation in the flow across sub-block branches, the multi-energy flow calculation result of the sub-block with better convergence should be taken.
7. A multi-energy flow computing device for energy systems based on topology partitioning, characterized in that, include: The partitioning module is used to perform topological partitioning on each subsystem of the pre-built IES mathematical model, decomposing each subsystem into the smallest sub-block containing only radial or ring sub-network topologies. The aggregation module is used to determine the connection nodes of adjacent sub-blocks and aggregate them to form an equivalent topology; The solution module is used to set a balancing node for each sub-block. Based on the balancing node, and the equivalent topology of the sub-network topology, the radial sub-network topology is solved by the forward-backward substitution method, and the ring sub-network topology is solved by the finite element method. The output module is used to map the calculation results of each sub-block to the original IES topology according to a preset rule based on the state variables of the connected nodes, and output the multi-energy flow calculation results.
8. An electronic terminal, characterized in that, It includes a processor and a memory connected to the processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, it performs the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program performs the steps of the method according to any one of claims 1 to 6.