Energy flow optimization of an electric-gas-heat integrated energy system based on the energy circuit theory

The energy flow optimization of the integrated energy system (IES) can not only decrease the operating cost of the IES but also maximize the utilization rate of renewable energy. To deal with the problem that the optimization results fall into the local optimal solution due to the over-limit of IES state variables, based on the IES energy circuit theory, this paper established an energy flow optimization model of the electric-gas-heat integrated energy system by taking the weighted sum of the operating cost, state variables over-limit penalty cost, and wind and light abandonment penalty cost as the optimization objective. The growth optimizer (GO) algorithm can avoid the local convergence of the optimization results and accelerate the solving speed of the model. Therefore, the effectiveness and feasibility of the model and the optimization method are confirmed by the simulation example.


Introduction
The integrated management and economic dispatch of different forms of energy, the economic efficiency of the IES operation, and the utilization rate of renewable energy can be effectively increased.Due to the increasing complexity of coupling between different energy sources and frequent load demand changes, how to ensure the economic benefits of system operation is the primary issue facing the IES optimization scheduling [1].
Aiming at the study on the optimal operation of the IES energy flow, a steady-state energy flow model of electric-heat coupling was established based on the operation mode of "thermal fixed power" of combined heat and power (CHP) and the coordinated optimal scheduling problem of the IES through Cplex solver was solved [2].Based on the principle of fluid mechanics, the power flow model of the power system was combined with the transient energy flow model of the natural gas system, thereby establishing a linear programming model for the optimal dynamic energy flow of gaselectricity IES [3].The above IES optimization operation research method has the characteristics of fast optimization speed and easy convergence when used to solve linear and convex optimization problems, but it has certain limitations for nonlinear and non-convex optimization problems.The optimization model for IES was established [4], the utilization rate of renewable energy is maximized by mixed integer programming and genetic algorithm.A two-stage stochastic programming model for IES was established [5], and the continuous and discrete optimization methods of real coded genetic algorithm (RCGA) and binary coded genetic algorithm (RCGA) were used to improve the optimization speed of multi-energy flow.
Therefore, based on the IES energy circuit theory, this paper establishes the energy flow network equation of natural gas and heat networks.The energy flow optimization model of the electric-gas-heat was established by introducing the state variables over-limit penalty variable and wind and light abandonment penalty variable, and the overall objective function is the weighted sum of IES operating cost, state variables over-limit penalty cost, and wind and light abandonment penalty cost.Based on the daily load demand data of different energy forms in typical scenarios and the active electric power output of wind turbines and photovoltaic arrays, the optimal energy flow was solved by the GO algorithm [6].Based on this, the superiority and feasibility of the model and the optimization method are confirmed by the simulation example.

Energy flow optimization model of IES
The energy coupling equipment of the IES can achieve the purpose of mutual conversion between different energy forms.The energy coupling equipment of IES studied in this paper includes electric energy storage (BES), power-to-gas unit (P2G), electric boiler (EB), and CHP.The energy flow optimization problem of IES is based on the energy flow supply and demand balance of electric power, natural gas, and heat network, and comprehensively coordinates the energy supply of each equipment, superior power grid, and natural gas network in each operating period, to reach the highest operation economic benefit of the IES.

Objective function
The optimization objectives of the energy flow optimization model of IES established in this paper include system operating cost 1 F , system state variables over-limit penalty cost 2 F , and wind and light abandonment penalty cost 3 F .The system operating cost consists of the cost of purchasing electricity and natural gas.
Where 1 w , 2 w , and 3 w are weight coefficient.X is a vector composed of the decision optimization variables of the ies.ele () Pt is the power purchased by the system from the power grid during the t period.gas () Mt is the amount of natural gas purchased by the system during the t period.ele p and gas p are the price of electricity and natural gas.t  and T are the scheduling duration and total scheduling period. 1 Y and 2 Y are state variables over-limit penalty variable and wind and light abandonment penalty variable, as shown in eq. ( 2) and (3). 1 C and 2 C are the corresponding penalty factors.
Where () qt is the value of each state variable in the system during the t period.max q and min q are the upper and lower boundary constraints of the corresponding state variable.U and L are the set and total of all state variables. is the utilization of active power generated by wind turbines and photovoltaic arrays.Y = and the utilization rate of active power generated by wind turbines and photovoltaic arrays reaches 100% when 2 1 Y = .

Constraint condition
The constraints of the IES mainly include the operation constraints of P2G, CHP, EB, and ES, the upper and lower boundary constraints of the temperature of supply and return water at the nodes of the heat network, and the energy flow balance constraints of each energy network.The energy flow balance constraints of electricity, natural gas, and heat networks are shown in Eq. ( 5)-( 9), and the other constraints are detailed in [7].
Where P2G () Pt , CHP () Pt , BES () Pt , and Load () Pt are the active power utilized by P2G, the electric power generated by CHP, the charge and discharge active power of BES, and the load electric power in the power network during the t period.

Energy flow balance constraint of natural gas network
Where n P and n G are the node pressure vector and gas mass flow injection vector of the natural gas network.g A and g+ A are the node-branch association matrix and node-branch outflow matrix of the natural gas network.T is supply water or return water temperature of node n. Figure 1 shows the topology of the IES.Nodes 6, 7, and 9 of the power network are electrical load nodes, Nodes 2, 4, and 6 of the natural gas network are gas load nodes, and Nodes 5, 6, and 7 of heat network are heat load nodes.The remaining nodes are connected to the energy conversion equipment or are intermediate nodes.

Simulation results and analysis of examples
To confirm the effectiveness and feasibility of the IES energy flow optimization model established above, particle swarm optimization (PSO) and GO algorithm were utilized to solve the IES optimal energy flow.The optimization results obtained after 500 iterations of two different algorithms are shown in Figure 2. Cost/Yuan Comparison of PSO/GO optimization effect.According to the comparison of optimization effects of PSO and GO shown in Figure 2, the GO algorithm has faster global convergence, under the condition of the same number of iterations, each cost value obtained by the GO after solving the model is better than the result obtained by the PSO to a large extent, so the GO optimization algorithm adopted in this paper has certain advantages.The specific optimization results obtained after 500 iterations of the GO and PSO algorithm are shown in Table 1.
Table 1 1, the total target cost obtained by the GO algorithm is 161998 yuan, the operating cost of the IES is 161421 yuan, the system state over-limit penalty variable is 1.0115, and the penalty variable for abandoning wind and light is 1.0006.Compared with the results obtained by PSO optimization, the results were decreased by 11030 yuan, 8548 yuan, 0.0421, and 0.0094 respectively.1 1 Y  indicates that some state variables exceed their corresponding upper and lower limits, which is related to the upper and lower limit constraints of the node water supply and return temperature of the heat network. 2

1
Y  is caused by the upper and lower bound constraints of the charge and discharge power of BES, therefore, the active electric power generated by wind turbines and photovoltaic arrays is utilized at 99.94%.The optimization results of the IES energy flow are shown in Table 2 and Figure 3.
Table 2 2, the mass flow and water pressure of injection water at each heat load node in the hydraulic network are different, which is related to the different pipeline distance, diameter and resistance coefficient between each node and the heat source.3(a) shows the electric power balance of the power network.From 00:00 to 05:00, the output electric power of the wind turbine is much higher than the demand of the electric load.To improve the output electric power utilization of wind turbines, the ES, EB, and P2G all consume electric energy during this period.From 06:00 to 10:00, as the heat power of the load in Figure 3(c) decreases, the heating power of the CHP decreases.From 11:00 to 18:00, IES maintained the electric power balance of the power network through wind turbines, photovoltaic arrays, CHP, and ES.From 19:00 to 24:00, since there is no light intensity and the output electric power of the wind turbine is not enough to maintain the electrical load demand, the system ensures the electric power balance of the power network by purchasing power from the higher power grid.
Figure 3(b) shows the natural gas mass flow balance of the nodes of the natural gas network.To ensure the energy flow balance of the heat network, the CHP continues to consume natural gas to provide heat for the heat network.The natural gas required is mainly purchased from natural gas sources, and part of the natural gas is also obtained from the electricity consumed by P2G.
Figure 3(c) shows the heat power balance of the heat network.As the CHP is the main source of heat supply for the thermal network, the CHP is always in use, and the EB assumes part of the heat supply.During the period from 12:00 to 16:00, the heating power of the CHP is sufficient to maintain the operation of the heat network, so the heating power of the EB is 0.
Figure 3(d) shows the temperature changes of water supply and return at nodes of the heat network.Considering the heat energy loss and the thermal power transformation of each heat load node, the water supply temperature of heat load node 3 is slightly lower than its corresponding lower bound constraint, and the return water temperature of the heat source node and heat load node 1 is slightly higher than its corresponding upper bound constraint.

Conclusion
Based on the energy circuit theory of IES, an optimization model of electric-gas-heat steady-state energy flow is established, the optimization objective is the weighted sum of IES operating cost, state variables over-limit penalty cost, and wind and light abandonment penalty cost.Through the GO algorithm to solve the simulation example, the following three conclusions are confirmed.
1) The traditional energy flow model of natural gas and heat networks is used to model large-scale IES, and its model has a certain complexity.On the contrary, the energy flow model of IES based on the energy circuit theory can decrease the complexity of model building and promote the calculation efficiency while ensuring the solving accuracy.
2) The introduction of IES state variables penalty variable and wind and light abandonment penalty variable overcomes the problem of local convergence caused by improper selection of its penalty coefficient.Compared with the PSO, the operation cost of the IES optimized by the GO algorithm is decreased by 5%, the state over-limit penalty variable is decreased by 4%, and the wind and light abandonment penalty variable is decreased by 0.9%.Therefore, the GO algorithm used in this paper not only speeds up the optimization speed but also avoids the results falling into local minima.
3) The optimal operation of the energy flow of the IES can decrease the operating cost of the IES and enhance the utilization rate of renewable energy while ensuring different load demands.
Pt are the electric power output of the wind turbine and photovoltaic array used by ies during the t period.out WP () Pt and out PV () Pt are electric power generated by wind turbines and photovoltaic arrays during the t period.The value is 1 1 Y  and 2 1 Y  .All state variables of the ies satisfy the upper and lower bound constraints when 1 1

Figure 3 .
Figure 3. Energy flow optimization results of IES.Figure3(a) shows the electric power balance of the power network.From 00:00 to 05:00, the output electric power of the wind turbine is much higher than the demand of the electric load.To improve the output electric power utilization of wind turbines, the ES, EB, and P2G all consume electric energy during this period.From 06:00 to 10:00, as the heat power of the load in Figure3(c) decreases, the heating power of the CHP decreases.From 11:00 to 18:00, IES maintained the electric power balance of the power network through wind turbines, photovoltaic arrays, CHP, and ES.From 19:00 to 24:00, since there is no light intensity and the output electric power of the wind turbine is not enough to maintain the electrical load demand, the system ensures the electric power balance of the power network by purchasing power from the higher power grid.Figure3(b) shows the natural gas mass flow balance of the nodes of the natural gas network.To ensure the energy flow balance of the heat network, the CHP continues to consume natural gas to

Figure
Figure 3. Energy flow optimization results of IES.Figure3(a) shows the electric power balance of the power network.From 00:00 to 05:00, the output electric power of the wind turbine is much higher than the demand of the electric load.To improve the output electric power utilization of wind turbines, the ES, EB, and P2G all consume electric energy during this period.From 06:00 to 10:00, as the heat power of the load in Figure3(c) decreases, the heating power of the CHP decreases.From 11:00 to 18:00, IES maintained the electric power balance of the power network through wind turbines, photovoltaic arrays, CHP, and ES.From 19:00 to 24:00, since there is no light intensity and the output electric power of the wind turbine is not enough to maintain the electrical load demand, the system ensures the electric power balance of the power network by purchasing power from the higher power grid.Figure3(b) shows the natural gas mass flow balance of the nodes of the natural gas network.To ensure the energy flow balance of the heat network, the CHP continues to consume natural gas to 2.1.Electric power balance constraint of the power network.
+ are the node-inflow branch association matrix and transpose matrix of the weighted nodeoutflow branch association matrix of the heat network.t K is the diagonal matrix composed of heat transfer factors of each pipeline.
h are the heat flow vector of the pipe head, end, and node of the heat network.h- A and h ,w T A p C is the specific heat capacity of water.heat,n M is mass flow of water flowing into node n. n

.
Comparison of PSO/GO optimization result.
. Steady-state optimization results of water supply network.According to the optimization results of the state variables of the water supply network in Table