Modeling and analysis method for carbon emission flow in integrated energy systems considering energy quality

While proposing dual carbon strategy goals, research on carbon reduction in integrated energy systems (IESs) has become a focus of attention. Traditional IES carbon emission flow is mostly based on energy flow, without considering the differences in energy quality. Exergy can be used as a reasonable measure of energy quality. Combining the theory of exergy flow and carbon emission flow, a modeling and analysis method for IES carbon emission flow considering energy quality is proposed. First, exergy flow models for electric and natural gas systems, equivalent exergy flow models for heat systems, and exergy hub models are introduced. Afterward, the exergy branch losses are allocated to the nodes at both ends. A networked modeling method for the carbon emission flow of energy stations is proposed. A unified matrix calculation model for IES carbon emission flow considering energy quality is established. On this basis, an IES carbon emission flow calculation method considering energy quality is proposed. Finally, this method is applied to the test IES, and the results show that the carbon emission flow calculation results reflect the distribution of carbon emissions borne by the effective energy supplied by the source and consumed by the load in the system, taking into account both the quantity and quality of energy. The reasonable allocation of new energy is conducive to synchronously improving the energy efficiency, exergy efficiency, and cleanliness of the system.

The measurement and analysis of carbon emissions are the foundation and prerequisite for achieving lowcarbon transformation and deep decarbonization in the energy system. 7The traditional carbon emission analysis method starts from the perspective of the total carbon emissions of the system, converts carbon indicators into economic indicators for optimization, and ignores the distribution characteristics of carbon emissions in the energy network, making it difficult to distinguish high carbon elements in various links within the system.In response to the limitations of the above analysis, Zhou et al. 8 defines the carbon emission flow of the electric system as a virtual flow attached to the power flow based on the principle of proportional sharing, making carbon emissions have the characteristics of network flow.On this basis, Zhou et al. 9 combines advanced power network analysis methods with power flow calculation methods to propose a matrix-based calculation method for carbon emission flow in the electric system.Cheng et al. 10 extends the theory of carbon emission flow in electric systems to IESs, defining the carbon emission flow of IES as a virtual network flow dependent on energy flow.Based on the theory of carbon emission flow, a planning method for supplying hydrogen gas to the integrated electric hydrogen system of hydrogenpowered vehicles considering carbon emission flow is proposed by Wei et al. 11 A carbon emission flow model attached to the electricity gas heat flow in the energy hub model is introduced, and an IES optimization scheduling method that considers seasonal carbon trading mechanisms is proposed by Yan et al. 12 The carbon emission flow in the above studies is modeled based on energy flow, only considering the quantity of energy and not the differences in energy quality in different forms.The quality of energy can be high or low.For example, from the perspective of doing work, all electricity can be converted into work, while only a portion of heat can be converted into work.Therefore, it is considered that the quality of electricity is higher than that of heat. 13Combining the first and second laws of thermodynamics, exergy is defined as the portion of energy that can be converted into any other form of energy under surrounding environmental conditions, taking into account both the quantity and quality of energy and can be used as a reasonable parameter to measure the quality of energy. 14Traditional IES exergy analysis research is mostly based on energy quality coefficient calculation of system input and output exergy and then takes exergy efficiency or total exergy loss as optimization goals.For example, Wang et al. 15 recommends the exergy efficiency that considers both the quantity and quality of energy and constructs a dual-level planning model for the IES.An IES operation optimization method based on exergy analysis and adaptive genetic algorithm is proposed by Chen et al., 16 with system exergy loss as the optimization objective.
The above IES exergy analysis research mostly regards the system as a black box model, without considering the flow characteristics of exergy in the energy network, making it difficult to reveal the distribution and depreciation mechanism of effective energy in the system.Considering that effective energy flows with the medium in the energy network, based on the concept of flow, a modeling method for the exergy flow mechanism of the energy system network is proposed by Li et al. 17 Based on the mechanism model of exergy flow, two IES exergy flow matrix calculation models suitable for different scenarios are established by Li et al. 18 Based on the above research, Li et al. 19 proposes a modeling method for heat system exergy flow based on equivalent transformation, which makes the heat system exergy flow model have a single-layer structure similar to other energy systems.Then, a unified calculation model for IES exergy flow is established to solve the distribution of exergy supplied by the source and consumed by the load in the system.
The above IES fire modeling method provides good theoretical support for solving the effective energy distribution in the energy network.Considering that the existing research on carbon emission flow in IES only considers the quantity of energy and does not take into account the differences in energy quality in different forms.This work combines carbon emission flow theory with exergy flow theory and proposes an IES carbon emission flow modeling and analysis method that considers energy quality.The solved system carbon emission flow distribution takes into account both the quantity and quality of energy.The main innovations of this work are as follows: 1.A carbon emission flow modeling method based on the equivalent exergy flow model of heat systems is proposed, which makes the carbon emission flow model of heat systems have a single-layer structure similar to other energy systems.2. A networked modeling method for the carbon emission flow of energy stations is proposed, making it easy to combine with other energy networks to construct a unified calculation model for carbon emission flow.This model comprehensively considers the output exergy flow and exergy loss of the energy station.

A unified calculation model and method for carbon
emissions in an IES considering energy quality are proposed to solve the distribution of carbon emissions borne by available energy supplied by the source and consumed by the load in the system.
The remainder of the article is then structured as follows: Section 2 introduces the exergy flow modeling method for IES.Section 3 proposes a matrix-based unified calculation model for carbon emissions considering energy quality.Section 4 proposes an IES carbon emission flow calculation method that considers energy quality.Section 5 validates and analyzes this work through test IES.Finally, Section 6 provides the main conclusions obtained from this study.

| EXERGY FLOW MODEL OF IES
This section establishes exergy flow models for electric systems, natural gas systems, heat systems, and energy stations to determine the distribution of exergy in the IES for source supply and load consumption.

| Exergy flow model of the electric system
Electric energy is a high-quality energy source that can be fully considered as exergy. 20Therefore, the active power distribution in the electric system is the distribution of exergy flow and the active power loss is the exergy loss.The exergy flow model of the electric system can be expressed as 18 : where e e and e e ∆ are the power line exergy flow and exergy loss vectors, respectively.P e and P e ∆ are the power line active power flow and active power loss column vectors, respectively.

| Exergy flow model of the natural gas system
The energy of natural gas is measured by the product of calorific value and gas volume, 21,22 and the fuel energy of natural gas can be expressed as the product of natural gas exergy potential and flow rate. 17,18Under the conditions of ignoring gas losses, the exergy flow model of natural gas systems can be expressed as 18 : where e g and e g ∆ are the vectors of the exergy flow and exergy loss of the natural gas pipeline, respectively.diag( )  represents the diagonal matrix formed by the elements in the column vector.A g,-and A g are the outflow node-branch correlation matrix and node-branch correlation matrix of the natural gas system, respectively.The superscript T represents the transpose of the matrix.m g is the column vector of the gas flow rate of the pipelines.p g is the exergy-potential vector for natural gas.The exergy-potential p g of natural gas can be expressed as 17,18,23 : where T a and T b are the ambient temperature and the theoretical combustion temperature of natural gas, respectively.G is the calorific value of natural gas.

| Exergy flow model of heat system based on an equivalent transformation
As shown in Figure 1, the distribution of exergy flow in the heat system includes exergy flow in the supply and return pipes, exergy loss in the supply and return pipes, heat source exergy, heat load exergy, exergy flow into the heat source, exergy flow into the heat load, exergy flow out of the heat load, and heat load exergy loss.Unlike the single-layer structure in electric and natural gas system analysis, heat system analysis usually considers a double-layer structure that includes a symmetrical supply and return network, 24 making the heat system significantly different from other systems in flow analysis such as energy flow, exergy flow, and carbon emission flow.The exergy flow in the supply network not only includes the exergy flow that supplies the heat load but also the exergy flow that returns the heat source in the return network, making it difficult to reveal the distribution of heat exergy supplied by the heat source or consumed by the heat load in the system.Similarly, the carbon emissions in the supply network include both the carbon emissions borne by the heat load and the carbon emissions carried by the return network, making it difficult to reveal the correlation characteristics between carbon emissions from heat sources and heat loads.
In response to the dual layer structural characteristics of the heat system in flow analysis, as shown in Figure 1, this work uses the return network as a reference frame to perform equivalent transformations on the exergy flow model of the supply network, eliminating the impact of the return network exergy flow on the exergy flow of the supply network.The exergy flow model of the heat system after the equivalent transformation has the same single-layer structural characteristics as the electric and natural gas systems.After equivalent transformation, the exergy flow distribution of the heat system includes heat branch exergy flow, heat branch exergy loss, heat source exergy, heat load exergy, and heat node exergy loss, specifically represented as 19 : where p s , p r , p o , and U h are the supply exergy-potential, return exergy-potential, outlet exergy-potential, and exergy-voltage column vectors of the heat nodes, respectively.e h and e Δ h represent the heat branch exergy flow and exergy loss column vectors, respectively.e Δ h,S , e Δ h,L and e Δ h,Ll are the heat source exergy, heat load exergy, and heat node exergy loss column vectors, respectively.A h,-and A h are the outflow node-branch correlation matrices and node-branch correlation matrices of the supply network, respectively.m h , m h,S and m h,L are the water mass flow rate column vectors of heat branch, heat source, and heat load, respectively.The exergy-potential p T at the water temperature T position can be specifically expressed as 17,25 : where c p is the specific heat capacity of water.

| Exergy flow model of energy station
Based on the standardized form of the exergy hub, the energy station exergy flow model is modeled to solve the

| IES CARBON EMISSION FLOW MODEL CONSIDERING ENERGY QUALITY
The carbon emission flow theory of electric systems defines carbon emission flow as a virtual network flow that exists attached to the power flow and is used to represent the carbon emission of maintaining any branch power flow in the electric system. 8The carbon emission flow theory of the IES is extended on the basis of the carbon emission flow theory of the electric system.The carbon emission flow of IES is defined as a virtual network flow that is dependent on the energy flow and used to represent the carbon emissions of any branch energy flow in the comprehensive energy system. 10It only considers the quantity of energy, but ignores the differences in different energy qualities.Exergy flow is the effective part of energy flow, which takes into account the quantity and quality of energy. 27It can be used as a reasonable parameter to measure energy quality.Exergy flow is used as the carrier for IES carbon emission flow analysis, considering the differences in energy quality in different forms.Based on the exergy flow analysis of the IES, this chapter defines the carbon emission flow as the virtual network flow formed by the exergy flow and used to represent the carbon emission of maintaining any branch exergy flow in the IES.Under this definition, the IES carbon emission flow model takes into account both the quantity and quality of energy.

| Bidirectional allocation of network exergy losses in IES
There is exergy loss in the electric and heat branches in IES.Under conditions such as ignoring changes in gas quality and gas leakage, natural gas branches can be considered to have no exergy loss.Branch exergy loss is generated by the IES supplying exergy flow to the load.This part of exergy loss can be borne by the sources or loads at both ends of the branch, and the carbon emissions borne by this part of exergy loss can also be borne by the sources or loads at both ends of the branch.Based on the principle of bidirectional average allocation of losses, 28 the node exergy flow vector of the IES after loss allocation e N,nl can be expressed as: where e N is the node exergy flow column vector before allocation, and the direction of the injected node's exergy flow is selected as the positive direction.The corresponding elements of the source node, load node, and connection node in e N are negative, positive, and zero, respectively.abs( )  represents the absolute value of the elements in a matrix or vector.A is the node-branch correlation matrix of the IES.e Δ b is the branch exergy loss column vector of the IES.
After the bidirectional average allocation of exergy loss, the branch exergy flow column vector a of the IES e b,nl can be expressed as: where e b is the branch exergy flow column vector before allocation.
After the bidirectional average allocation of branch exergy losses through Equations ( 7) and ( 8), the exergy losses of each branch in the IES are 0, and the system can be considered as a lossless system.

| Carbon emission flow model for energy stations considering energy quality
Energy stations involve the conversion of various forms of energy such as electricity, gas, and heat, and energy conversion is accompanied by a large amount of exergy loss. 29Considering that energy stations are a key link in reducing energy quality in an IES, 30 it is necessary to establish a carbon emission flow model for energy stations that considers energy quality reduction.The energy station is composed of energy equipment and has a different model structure from the energy network. 31It is necessary to equivalently treat the carbon emission flow model of energy stations to have a model structure similar to that of energy networks, and then establish a unified IES carbon emission flow calculation model.This section first analyzes the carbon emission flow model of energy conversion devices, and on this basis, equivalently processes the energy station to establish a networked carbon emission flow model for the energy station.
From the above analysis, it can be seen that the large amount of exergy loss generated by energy stations during the energy conversion process determines that they must bear a portion of the carbon emission responsibility.This section allocates the carbon emissions corresponding to the exergy loss of energy conversion equipment to energy stations as their carbon emission responsibilities.Figure 2 shows the generalized expression of exergy flow and carbon emission flow in energy conversion equipment.In the figure , e The carbon emission flow balance equation for energy conversion equipment can be expressed as: out loss (10)   Based on the definition of carbon emission flow in this work, the carbon emission flow c j out carried by the exergy flow of the jth energy form output by the energy conversion equipment is allocated according to the proportion of this part of the exergy flow to the sum of the output exergy flow and exergy loss.The carbon emission flow c loss borne by the exergy loss is also allocated in proportion to the sum of the output exergy flow and the exergy loss.Based on the above allocation rules and Equations ( 9) and ( 10), it can be seen that c j out and c loss can be expressed as: Equation ( 11) can also be expressed as: where p out represents the carbon potential of the energy station's output exergy flow and exergy loss.
According to Equations ( 9)-( 12), the energy conversion equipment can be equivalent to a node.The exergy flow and carbon emission flow flowing into the equipment are equivalent to the exergy flow and carbon emission flow flowing into the node.The exergy flow and carbon emission flow flowing out of the equipment are equivalent to the exergy flow and carbon emission flow flowing out of the node.The equipment exergy loss and corresponding carbon emissions are equivalent to the node exergy flow loss and the carbon emissions flowing into the node.The specific equivalent process is shown in Figure 2. At this time, the carbon emission flow carried by exergy flows of jth energy form output by energy conversion equipment can be expressed as the product of exergy flow and node exergy potential.The carbon emissions borne by equipment exergy losses can be expressed as the product of exergy loss and node carbon potential.Based on the above analysis, the equivalent energy equipment nodes still meet the laws of exergy flow balance and carbon emission flow balance.
For energy stations containing multiple types of energy equipment, each energy equipment is equivalent to a node, and the exergy flow path between energy equipment is equivalent to a branch.At this time, the energy station is equivalent to a network where the F I G U R E 2 General expression of exergy and carbon emission flow in energy conversion devices.number of nodes is the number of energy equipment and the number of branches is the number of exergy flow paths.It has a similar topology structure to the energy network, which is conducive to establishing a unified IES carbon emission flow calculation model.

| Unified modeling of carbon emission flow in IES considering energy quality
Based on the equivalent method of carbon emission flow for energy equipment shown in Figure 2, the entire IES forms a unified network structure, which is expanded on the basis of the carbon emission flow calculation model for the electric system to obtain the carbon emission flow calculation model for the IES.Analogous to the carbon emission flow theory of electric systems, the IES carbon emission flow considering energy quality follows the principle of proportional allocation of exergy flow.The density of carbon emissions injected into the node and the density of carbon emissions flowing out of the node branch are both equal to the node carbon potential, where the carbon flow injected into the node includes load exergy and node exergy loss.Given the known node carbon potential and exergy flow, the carbon emission distribution of the entire system can be solved, calculating node carbon potential as the primary goal of carbon emission flow calculation.
Analogous to the correlation matrix in the carbon emission flow model of the electric system, 9 the IES carbon emission intensity vector at the source, branch exergy flow distribution matrix, source exergy flow distribution matrix, and distribution matrix of exergy flow consumed by nodes are defined.The carbon emission intensity vector at the source c S is the vector composed of the carbon emissions per unit of exergy supplied by the source, and the number of elements is the number of energy supply sources n S .In practical analysis, the carbon emissions per unit of energy supplied by the source can be approximately set using a carbon emission factor.On this basis, the carbon emissions per unit of exergy supplied by the source c S can be expressed as: where f S and λ S are the carbon emission factors and energy quality coefficients of the energy at source, respectively.The branch exergy flow distribution matrix E B is a n N -order square matrix, where n N is the sum of the number of electric, natural gas, heat nodes, and internal energy conversion equipment in the energy station.When the exergy flow of a branch flows from node i to node j, the element in the ith row and jth column of E B is the corresponding flow value, while the other elements are 0. The source exergy flow distribution matrix E S is a n n × S N -order matrix.If the i-th source node is node j, the ith row and jth column elements in the E S are the values of the exergy flow from the source to the node, and the other elements are 0. Similarly, the distribution matrix of exergy flow consumed by nodes E C is n n × C N -order matrix, and n N is the number of nodes that consume exergy flow, including the equivalent nodes of load nodes and energy stations.When the connecting nodes are connected to branches with exergy loss, after the bidirectional allocation of branch exergy loss, some branch exergy losses can be considered as node exergy loss, and this node is also considered as consuming exergy flow.If the i-th node consuming the exergy flow is node j, the ith row and jth column elements in E C are the values of the exergy flow consumed by the node, and the other elements are 0.
The node exergy flow flux matrix E N is defined to describe the contribution of the source node to other nodes in the IES.E N is a diagonal matrix of order n N , and the diagonal elements in the ith row are the sum of the exergy flow injected into the ith node by the source and surrounding branches, which can be represented as follows: where The node carbon potential column vector c N with dimension n N is defined, and its element means the carbon emissions carried by the unit exergy flow near the node.The carbon emission intensity of the source node is the node carbon potential.c N can be expressed as: After obtaining the node carbon potential through Equation ( 15), the carbon emission flow distribution of the IES can be calculated.Analogous to the branch carbon flow distribution matrix, the branch carbon emission flow distribution matrix C B in the n N -order square matrix is defined.When the carbon emission flow of a branch flows from node i to node j, the element in the ith row and jth column of C B is the corresponding carbon emission flow value, and the other element is 0. C B can be expressed as: Based on the distribution matrix of exergy flow consumed by nodes, the n C -dimensional column vector of carbon emission flow consumed by nodes c C is defined, whose element means the carbon emissions generated by the exergy flow consumed by the node supplied by the source, reflecting the carbon emission responsibility of nodes such as loads and energy stations per unit time.c C can be expressed as:

| CARBON EMISSION FLOW CALCULATION METHOD FOR IES CONSIDERING ENERGY QUALITY
The power of nonequilibrium nodes is usually a known quantity in the analysis of IES. 32In this scenario, the multi-energy power flow calculation method is used to calculate parameters such as power flow, gas flow rate, water flow rate, and water temperature. 33Based on this, the exergy flow distribution of the system is solved by the exergy flow calculation model, 19 and then the carbon emission flow distribution is solved using the carbon emission flow calculation model considering energy quality.Figure 3 shows the carbon emission flow calculation method for the IES considering energy quality under the operation mode of "heat to electricity." The specific process is as follows: 1. Input data: The basic data such as the topology of the IES grid, multi-energy loads, pipeline parameters, operation mode, energy station parameters, and carbon emission factors of the source are input.2. Calculate multi-energy power flow: In the scenario of known nonequilibrium node power, the parameters of the heat system such as water flow rate and water temperature are solved through the alternating iteration method of the hydraulic and thermal model.
Based on the energy hub model, the input and output energy flows of the energy station are calculated, and Calculation method for carbon emission flow of IES considering energy quality.
then the source and load power of the corresponding electric and natural gas network nodes of the energy station are updated.Based on methods such as the Newton-Raphson method or forward and backward substitution method, the power flow of the electric system is solved.Based on the Newton node method, the gas flow distribution in the natural gas system is solved.3. Calculate the exergy flow distribution: The heat system flow model based on equivalent transformation is used to solve the parameters of branch exergy flow, branch exergy loss, source and load exergy, and node exergy loss in the heat system.Based on the exergy standardized hub model, the exergy flow and exergy loss distribution inside the energy station are solved.Based on the electric system exergy flow calculation model, the distribution of exergy flow and exergy loss in the electric system is solved.Based on the natural gas system exergy flow calculation model, the distribution of exergy flow in the natural gas system is solved.

Calculate the carbon emission flow distribution
considering energy quality: Based on the principle of bidirectional allocation of exergy losses, the branch exergy losses are evenly distributed to the nodes at both ends, forming a lossless network.The exergy flow path in the energy station is equivalent to a branch, and the energy conversion equipment is equivalent to a node to form a networked structure.The carbon emission intensity vector at the source, branch exergy flow distribution matrix, source exergy flow distribution matrix, and distribution matrix of exergy flow consumed by nodes are established.On this basis, the node exergy flow flux matrix is calculated.Then, the node carbon potential column vector is calculated.Finally, the branch carbon emission flow distribution matrix and the column vector of carbon emission flow consumed by nodes are solved.5. Output data: Parameters such as node carbon potential and node and branch carbon emission flow of the comprehensive energy system are output.

| CASE STUDY
To verify the rationality and effectiveness of the model in this work, a typical IES from Cao et al. 34 was selected for analysis, which includes electricity, natural gas, heat network, and a typical energy station.The electric system is a 33-node distribution network, adapted from the IEEE 33-node distribution network. 35The natural gas system is a 25-node gas distribution network, sourced from Lei et al. 36 The heat system is a regional heat network, derived from Liu et al. 37 The energy station operates in the "heat to electricity" mode, using the cogeneration units (CHP) and gas boiler (GB) for heating.The gas-toelectricity conversion efficiency and gas-to-heat conversion efficiency of the CHP are 0.35 and 0.45, respectively, and the gas-to-heat conversion efficiency of the GB is 0.85. 23The energy quality coefficients of electricity and natural gas are 1 and 0.7013, respectively. 19The carbon emission factors of coal and natural gas are 0.202 and 0.341 kg CO 2 /kWh, respectively. 38The coal to electricity conversion efficiency is 45%.Based on Equation ( 13), the carbon emission intensities of the substation and gas source considering the energy quality are 0.758 and 0.288 tCO 2 /MWh, respectively.

| Carbon emission flow of test IES considering energy quality
Under steady-state conditions, a typical operating scenario of the IES is selected for analysis, in which the heat production of the CHP and the GB are the same.Given the power of the multi-energy load, parameters such as power flow, gas flow rate, water flow rate, and water temperature are solved through the multi-energy power flow calculation method.On this basis, the electric and natural gas system exergy flow model, the heat system exergy flow model based on equivalent transformation, and the standardized exergy hub are used to solve the exergy flow distribution of the test IES, as shown in Figure A1.Later, after bidirectional allocation of branch exergy loss and equivalent treatment of energy stations, based on the IES carbon emission flow calculation method considering energy quality in this work, the node carbon potential of the test IES is shown in Table 1, and the carbon emission flow distribution is shown in Figure 4.
The node carbon potential characteristics of the IES are analyzed.From Table 1 and Figure 4, it can be seen that since the natural gas consumed by all gas loads, CHP, and GB comes from the only gas source in the gas distribution network, the carbon potential of all natural gas nodes, CHP, and GB is equal to the carbon emission intensity of the gas source.This can be shown by dividing the carbon emission factor of natural gas by its energy quality coefficient.Similarly, the heat exergy consumed by the heat load, whether supplied by CHP or GB, comes from natural gas node G8.Therefore, the node potential of the entire heat system is also equal to the carbon emission intensity of the gas source.The electrical exergy consumed by load nodes E8-E18 in the electric distribution network comes from CHP and ultimately from natural gas power generation.Therefore, the carbon potential of these nodes is equal to the carbon emission intensity of the gas source.The electrical exergy consumed by nodes E2-E6 and E19-E33 comes from substation E1, and the electrical exergy of the substation ultimately comes from coal-fired power generation.Therefore, the carbon potential of these nodes is equal to the carbon emission intensity of the substation.Considering that the energy quality coefficient of electricity is 1, the carbon emission intensity of the substation can be expressed by dividing the carbon emission factor of coal by the coal to electricity conversion efficiency.Part of the electric exergy consumed by node E7 comes from the substation and the other part comes from CHP, so the carbon potential of this node is between the carbon emission intensity of the substation and the gas source.
The carbon emission flow characteristics of the IES are further analyzed.Figures 4 and A1 show that all nodes in the IES meet the carbon emission flow balance law, that is, the carbon emission flow of the flow into and flow out of the node is equal.The entire system meets the carbon emission balance relationship, which means that the carbon emission flow generated by the source is equal to the sum of the carbon emissions borne by the multi-energy load, connecting nodes, and energy conversion equipment.All carbon emission flows flow out of nodes meet the principle of proportional allocation of exergy flow, which means that the carbon emission flow carried by the outflow node exergy flow is equal to the ratio of the proportion of this part of exergy flow to the sum of all outflow node exergy flows and node exergy losses, multiplied by the total amount of outflow node carbon emission flow.CHP and GB in the energy stations generate a large number of exergy loss during the energy conversion process, therefore CHP and GB bear a high responsibility for carbon emissions.The heat contains less exergy, so the heat system bears a lower responsibility for carbon emissions.In addition, there is exergy loss in the heat branch, and after bidirectional allocation to the nodes at both ends of the branch, there is also exergy loss in the connecting nodes.At this time, the connecting nodes also have carbon emission injection, which means they bear a portion of carbon emission responsibility.Under conditions such as neglecting changes in gas quality and gas loss, the natural gas system can be regarded as a lossless network, so connecting nodes do not need to share the branch exergy loss nor do they need to bear the responsibility for carbon emissions.

| Carbon emission flow feature analysis of test IES considering energy quality
Traditional IES modeling considers a symmetrical structure, where the heat source and heat load transfer heat between the supply and return network.The exergy flow of the supply network includes both the exergy flow of the supply load and the exergy flow of the return network.It is difficult to reveal the distribution of heat exergy supplied by the source and consumed by the load in the network, and it is difficult to achieve unified analysis with electric and natural gas systems with single-layer modeling structures.The limitations of dual-layer structure-based exergy flow modeling also bring certain limitations to carbon emission flow modeling.Carbon emission flow modeling based on dual-layer structure is difficult to reveal the distribution of carbon emissions carried by the exergy supplied by the heat source and consumed by the load in the network, and it is also difficult to achieve a unified analysis with carbon emissions from electric and natural gas systems.As shown in Figure A1, the equivalent transformed heat system exergy flow model has a single-layer structure similar to that of electric and natural gas systems.The distribution of exergy flow in the IES reflects the distribution of exergy supplied by the source and consumed by the load in the system, which is conducive to achieving a unified analysis of various energy systems.As shown in Figure 4, the carbon emission flow distribution based on the equivalent transformation of the heat system reflects the distribution of carbon emissions carried by the exergy supplied by the source and consumed by the load in the system, which is conducive to establishing a unified calculation model for carbon emissions in an IES by combining the carbon emission models of electric, natural gas systems, and energy stations.| 2415 Whether to consider the impact of energy quality on the carbon potential and carbon emission flow distribution of the IES will be further analyzed.For the heat system energy flow model based on a symmetrical supply and return network structure, an equivalent transformation treatment is also adopted.Based on this, energy flow is used as the carrier of carbon emissions, and the node carbon potential distribution without considering energy quality is shown in Table 2.
Comparing Tables 1 and 2, it can be seen that there are differences in the carbon potential of some nodes under the two conditions of considering energy quality.Under the consideration of energy quality, the physical meaning of node carbon potential is the equivalent carbon emission value caused by the unit of effective energy, that is, exergy generated or consumed by the node, which is equivalent to the source.Without considering energy quality, the physical meaning of a node's carbon potential is the equivalent carbon emissions value caused by the unit of energy generated or consumed by the node at the source.All electrical energy can be converted into work and can be considered as exergy.The carbon emissions caused by the supply of unit electrical energy and exergy of substation node E1 are equal.Therefore, the carbon emission intensity of E1 is equal in both scenarios.The electricity and exergy consumed by nodes E2-E6 and E19-E33 come from E1, so the carbon potential of these nodes is the same in both scenarios.The natural gas energy is only partially converted into work, that is, only a portion can be considered as exergy.Gas source G1 requires more energy than the exergy value to supply a unit of energy.Therefore, the carbon emission intensity of gas source G1 considering energy quality is higher than that without considering energy quality.The exergy of all natural gas nodes, heat nodes, and electric nodes E8-E18 ultimately comes from gas source G1.Therefore, the carbon potential of these nodes considering energy quality is higher than that without considering energy quality.Similarly, the carbon consumption of node E7 comes from both nodes E1 and G1, so the carbon potential of nodes considering energy quality is higher.Based on the above analysis, the node carbon potential considering energy quality is established based on exergy flow analysis.Compared with the node carbon potential definition based on energy flow, it takes into account the quantity and quality of energy.
By comparing and analyzing Figures 4 and 5, it can be seen that there are similarities and differences in the distribution characteristics of carbon emissions based on exergy flow and energy flow in the test IES.Whether to consider energy quality mainly affects the allocation rules of carbon emissions, without affecting the sum of the source end carbon emissions.The exergy flow is the effective energy part of the energy flow.Therefore, the flow direction of exergy and energy is the same, and the direction of carbon emissions carried by them is also the same.Therefore, the proportion of natural gas exergy flowing out of the node to the total exergy flow of the node is equal to the proportion of energy flow flowing out of the node to the total energy flow flowing out of afeffective aprtthe node.The exergy consumed by the natural gas load in the test IES is derived from the unique gas source G1, so the carbon emission flow distribution of the natural gas system based on energy flow and energy flow is the same.Energy stations, as a key link in reducing energy quality, exhibit significant differences in the distribution of carbon emissions between the two scenarios.Electricity is high-quality energy, all of which is exergy, while heat is low-quality energy, with only a portion being exergy.The quality of natural gas is between the two.Without considering the energy quality scenario, energy equipment has less energy loss and only bears a small portion of carbon emission responsibility, while the heat system bears a larger carbon emission.GB has higher energy efficiency than CHP and in scenarios with the same heat generation, GB bears lower carbon emissions than CHP.In the scenario of considering energy quality, the exergy loss of energy stations not only considers the exergy loss in energy loss but also the exergy loss caused by quality reduction during energy conversion.The exergy loss of energy stations considers both the quantity and quality of energy, which is much greater than the energy loss.At this point, the carbon emissions borne by energy station exergy losses are much higher than those borne by energy losses.Heat energy is low-quality energy, only a portion of which can be converted into work.When the exergy is used as a measure for the unified analysis of various energy forms in the IES, the carbon emissions allocated by the heat system are lower than those based on energy allocation.Because electricity is of high quality, CHP has a higher carbon emission responsibility for the output of electricity after considering energy quality.Therefore, the carbon emission flow of nodes and branches affected by CHP injection is higher than that of scenarios without considering energy quality.GB and CHP convert natural gas into low-quality heat, while CHP generates higher-quality electrical energy while generating heat.Therefore, CHP's exergy loss is lower than GB, and the carbon emissions borne by CHP are also lower than GB.
Based on the above analysis, compared to the distribution of carbon emissions based on energy flow, the distribution of carbon emissions based on exergy flow comprehensively considers the depreciation mechanism of energy quantity and quality, achieving a unified analysis of heterogeneous energy carbon emissions, which is conducive to suppressing high-quality energy loss in the emission reduction process and achieving deep energy conservation.

| Impact analysis of energy conversion equipment on carbon emissions flow
Three schemes are selected to analyze the impact of different energy equipment on the distribution of carbon emissions in the test IES, as shown in Table 3. Scheme A uses CHP and GB heating, with the same heat production for both devices.Scheme B uses GB and electric boilers (EB) for heating, with the same heat production as the two pieces of equipment and the electricity-to-heat conversion efficiency of EB is 0.95. 20Scheme C adds new energy based on Scheme B. In typical scenarios, the photovoltaic (PV) output at nodes E17, E21, E25, and E31 is 1500, 500, 700, and 700 kW, respectively, and the wind turbine (WT) output at node E10 is 500 kW.
Based on the calculation method of carbon emission flow for the IES considering energy quality in this work, the node carbon potential of the test IES in Scheme A is shown in Table 1, and the node carbon potential in Schemes B and C is shown in Table 4. Comparing Tables 1 and 4, it can be seen that the exergy consumed by all electrical loads comes from the E1 node of the substation.Therefore, the carbon potential of all electrical nodes is equal to the carbon emission intensity of the substation.The carbon potential of the electrical load nodes supplied by CHP in Scheme A increases after using Scheme B. The carbon potential of the heat nodes in Scheme A is equal to the carbon emission intensity of the gas source.The exergy consumed by the heat system in Scheme B comes from both substation E1 and gas source G1.The carbon potential of the nodes is between the carbon emission intensity of the substation and the gas source.And the carbon emission intensity of the substation is higher than that of the gas source.Thus, the carbon potential of the heat nodes in Scheme B is higher than that in Scheme A. Scheme C introduces new energy based on Scheme B, with a carbon emission intensity of 0. The carbon potential of the electric load node supplied solely by the new energy is 0. The carbon potential of the electric load supplied by the new energy and substation E1 is reduced compared to Scheme A and B. The exergy consumed by the heat system comes from both EB and GB.Unlike Scheme B, the exergy consumed by EB comes from new energy and corresponds to a carbon emission intensity of 0. Therefore, the carbon potential of the heat system nodes in Scheme C is lower than that in Schemes A and B. The exergy consumed by natural gas load in the three schemes all comes from gas source G1, so the carbon potential of natural gas nodes in the three schemes is equal.
Based on the above analysis, compared to CHP heat generation, EB heat generation increases the carbon potential of some electric and heat nodes, which is not conducive to the system's development toward lowcarbon trends.However, configuring new energy based on EB heat generation is beneficial for suppressing the impact of substations on node carbon potential, thereby reducing the carbon potential of some electric and heat nodes and leading the system to develop towards a lowcarbon trend.
The carbon emission flow distribution of the test IES under scenarios A, B, and C is shown in Figures 4, 6, and 7, respectively.Compared with Scheme A, Scheme B increases the exergy supply from substation E1 to the system after using EB heat generation.And providing electricity to EB increases the transmission of exergy flow on some electric lines, thereby increasing exergy loss and the exergy supplied by E1 further increases.The carbon emission intensity of substation E1 is higher than that of gas source G1, so the total carbon emissions generated by the source end of scheme B are higher than that of Scheme A. The increase in exergy consumption for supplying electricity to EB and the increase in exergy losses in the electric system have led to an increase in | 2419 carbon emissions from some branches.The carbon emissions distributed by some electrical load nodes after bidirectional allocation of branch exergy losses increase.The use of high-energy efficient EB heat generation is beneficial for improving system energy efficiency, but it converts a large amount of high-quality electricity into low-quality heat, which bears the majority of carbon emissions due to exergy losses.Affected by the large input carbon emission flow of the equipment, the carbon emission flow borne by EB heat generation is also large, and the carbon emission flow of each heat branch and node is also higher than that of Scheme A. Scheme C introduces new energy equipment such as PV and WT based on Scheme B, with a carbon emission intensity of 0. Therefore, compared to Scheme B, Scheme C greatly reduces the electricity supplied by substation E1, thereby reducing the total carbon emissions at the source end.The injection of new energy to generate electricity has reduced the carbon emissions of some electric branches and nodes, and the carbon emissions of all branches and nodes that come from new energy are zero, no longer responsible for carbon emissions.Although EB generates a large amount of exergy loss during the heat generation process, the electricity consumed by EB comes from PV.Therefore, the carbon emissions borne by the exergy loss and heat output of EB are both 0, that is, the carbon emission flow injected by EB into the heat system is 0. The carbon emission flow of heat branches and nodes greatly reduces.Therefore, compared to other schemes, the carbon emission flow of each branch and node of the heat system in Scheme C is lower.The introduction of new energy does not change the operating status of the natural gas system, so Schemes B and C have the same distribution of carbon emissions in the natural gas system.In terms of energy quality, new energy equipment inputs natural environmental resources such as wind and light, which are theoretically inexhaustible.Considering that the exergy in the natural environment is zero, the input exergy of new energy equipment is zero.The introduction of new energy is conducive to improving the energy efficiency of the IES.
Based on the above analysis, the introduction of EB improves the energy efficiency of the IES but reduces the system exergy efficiency and increases the system's carbon emissions.However, introducing new energy on this basis can effectively reduce the carbon emissions level of the system, achieving simultaneous improvement in energy efficiency, environmental efficiency, and cleanliness.

| CONCLUSIONS
Considering that the current analysis of carbon emissions in IES is mostly based on energy flow modeling, only accounting the quantity of energy and not the differences in energy quality.Combining the theory of exergy flow and carbon emission, this work proposes an IES carbon emission flow modeling and analysis method considering energy quality.The method is applied to an electricitygas-heat IES, and the conclusions obtained are as follows: 1.After considering energy quality, all nodes in the IES meet the carbon emission balance law, and the entire system meets the carbon emission balance relationship.The carbon emission flow out of the nodes meets the principle of proportional allocation of exergy flow.The establishment of a carbon emission flow model based on the equivalent exergy flow model of the heat system is conducive to the establishment of a matrix unified calculation model of carbon emission flow in combination with other energy systems.The calculation results reasonably reflect the distribution of carbon emissions carried out by the effective energy supplied by the source and consumed by the load in the system.2. Compared with the energy flow-based carbon potential, the exergy flow-based carbon potential of a node is defined as the equivalent carbon emission value caused by the unit of effective energy generated or consumed by the node, which takes into account both the quantity and quality of energy.Compared with the energy flow-based carbon emission flow, the exergy flow-based carbon emission flow is defined as the virtual network flow formed by the exergy flow and used to represent the carbon emissions of maintaining any branch of exergy flow in the IES.It comprehensively considers the depreciation mechanism of energy quantity and quality and realizes the unified analysis of heterogeneous energy carbon emissions.3. Compared with CHP, the configuration of EB improves the energy efficiency of the IES.However, the exergy efficiency of the whole system, carbon potential of some nodes and carbon emission flow of some branches decreases, which is not conducive to the development of the system toward high quality and low carbon.However, reasonable configuration of new energy based on EB can help reduce the carbon emission of the whole system, the carbon potential of some nodes, and the carbon emission flow of some branches, while energy efficiency, exergy efficiency, and cleanliness can be improved simultaneously so that the system can develop toward high efficiency, high quality, and low carbon at the same time.
In subsequent research, the following work will be carried out: 1.The dynamic characteristics of IES will be considered, and the time scale relationship between different exergy flows will be deeply analyzed.Based on this, a multi-time scale dynamic carbon emission modeling and analysis method for IES will be proposed.
2. A unified analysis model for energy-exergy-carbon emission flow will be established to achieve a coordinated analysis of the quantity and quality of energy in the IES at the carbon emission level.3.This work will be extended to different time scales, and the IES low-carbon planning and operation optimization method considering energy quality will be proposed.Research on carbon trading theory and market mechanisms will be carried out by combining methods such as thermoeconomics.Research on carbon reduction technologies will be carried out by combining exergy environmental analysis and other methods.
i in (i = 1, 2,…, m) represents the carbon emissions from the ith energy form input to the energy conversion equipment, and c i in represents the corresponding carbon emissions.e j out (j = 1, 2,…, n) represents the energy flow of the jth energy form output by the energy conversion equipment, and c j out represents the corresponding carbon emission flow.e loss and c loss , respectively, represent the exergy loss of energy conversion equipment and the carbon emissions borne by this part of the exergy loss.The exergy flow balance equation of energy conversion equipment can be expressed as:

F
I G U R E 4 Carbon emission flow of test IES considering energy quality.LI ET AL.

F
I G U R E 5 Carbon emission flow of test IES without considering energy quality.

F
I G U R E 6 Carbon emission flow of test IES in Scheme B.

F
I G U R E 7 Carbon emission flow of test IES in Scheme C.
Node carbon potential in the test IES considering energy quality (tCO 2 /MWh).
T A B L E 1 Node carbon potential in the test IES without considering energy quality (tCO 2 /MWh).
T A B L E 2 Energy equipment under different schemes.
T A B L E 3