Edinburgh Explorer Effect of P2G on Flexibility in Integrated Power-Natural Gas-Heating Energy Systems with Gas Storage

: The low carbon transition requires the high growth of renewable generation penetration in energy systems to ultimately achieve net-zero carbon target. To ensure the reliable operation of energy systems with high intermittent renewable output, it is critical to have sufﬁcient ﬂexible resources to avoid curtailment. Therefore, the integrated power-natural gas-heating energy systems with power to gas (P2G) and gas storage has attracted great research interest especially on the combined operation method to enhance the ﬂexibility provision between each other. In this paper, taking heating demand, P2G and gas storage into consideration, a multi-objective optimal operation strategy of integrated power-natural gas-heating energy systems is presented to obtain the maximum economic and environmental beneﬁts. Furthermore, a novel model of ﬂexibility metric is proposed based on redundant linepack and gas storage. Case studies without P2G and with P2G are carried out on integrated IEEE 39-bus power and Belgian 20-node gas system. Simulation results demonstrate that P2G not only can be beneﬁcial for operation of the integrated energy systems in terms of total operational cost decline from M$2.510 to M$2.503, CO 2 emission reduction from 62,860 ton to 62,240 ton and wind curtailment decrease from 25.58% to 4.22% but also has signiﬁcant effect on ﬂexibility improvement of a 71.72% increase.


Introduction
With the acceleration of low carbon transition in energy system, the renewable energy generation is growing quickly worldwide. However, due to intermittency and variability of renewable generations, the operation of energy systems faces unprecedent challenges. The curtailment issue of renewable generation caused by the lack of system flexibility to provide additional reserves and ramping capability is expected to be worse in the future. Therefore, it is critical to explore additional flexible resources to support the high level of renewable integration and ultimately achieve the net-zero carbon target.
Flexibility in energy systems is the ability to provide supply-demand balance, maintain continuity in unexpected situations and cope with uncertainty on supply-demand sides [1]. For power systems, gas turbines as traditional flexibility providers play an important role in meeting variable and unpredicted changes in net demand [2,3]. Driven by flexibility support required by renewable generation, the interaction between power systems and natural gas network is expected to increase [4]. Furthermore, some heating requirements are provided by natural gas which leads to high gas demand in winter when heating demand is increased obviously. In particular, gas demand would rise in winter with high ramp rate, which could lead to lack of linepack and low gas node pressure. Meanwhile the shortage of pipeline linepack in natural gas network could also cause the decline of power out of gas turbines which are the main flexibility provider in power systems. As such, both power systems and natural gas systems face flexibility challenges and the linepack of pipelines in gas network is the key factor affecting the flexibility of both power systems and natural gas network. It is essential to analyze flexibility of integrated power-natural gas-heating energy systems.
Many studies have been carried out on quantifying the energy system flexibility. Lannoye E. and et al. used the insufficient ramping resource expectation metric to measure power system flexibility in long-term planning [5]. Guo Z.Y. and et al. proposed flexibility metrics of power systems based on flexibility definition and physical mechanism [6]. Xu X. D. et al. developed a three-stage methodology to quantify the maximum flexibility of a district heating sector for power grid [7]. Huo Y. C. et al. designed a spatio-temporal flexibility management scheme in low-carbon power systems [8]. Impram S. et al. investigated flexibility measurement studies and evaluated methods of providing flexibility in power systems [1]. The influence of gas network on flexibility of power systems is not considered in these studies. Generally, integrated power-natural gas energy systems with renewable generation and power to gas (P2G) [9][10][11][12][13] are recognized to have a crucial role in delivering affordable low-carbon energy and exhibits significant potential to unlock more flexibility in planning [14][15][16][17][18][19][20][21][22][23][24]. More specifically, P2G converting renewable energy to gas to increase gas supply for both gas turbines and gas network will increase power output of gas turbines and replenish linepack of pipelines and thus enhance the flexibility of both power systems and natural gas network. Ameli H. et al. emphasized the important role of gas network infrastructure flexibility in efficiently accommodating the expected expansion of intermittent renewable energy sources in future power systems. Moreover, the benefits of employing flexible multi-directional compressor stations and adopting a fully integrated approach to operate gas and electricity networks were investigated [25]. Clegg S. and et al. presented a novel integrated electricity-heat-gas transmission network model that considers electrical and gas network flows coupled with heating sector [26,27], quantified flexibility of gas network and discussed effect of gas network constraints on electricity system operation [4]. Chicco G. and et al. provided a comprehensive overview of technical flexibility assessment of multi-energy systems and distributed multi-energy systems, with a focus on their potential to provide support to a low-carbon grid [28]. These studies described flexibility of power systems, gas network and multi-energy systems and provided good enlightenment for further research on flexibility assessment of multi-energy systems. While, a systematic methodology to assess flexibility of integrated power-natural gas-heating energy systems with P2G and gas storage has not been given.
With regards to the significant benefit of P2G on the integrated power-natural gas energy systems in terms of reducing renewable curtailment and providing additional gas supply for gas network [16,17,24], P2G will increase flexibility of the integrated powernatural gas energy systems. In particular, P2G generates methane (synthetic natural gas, SNG) through electrolysis and methanation [16,17,24] and replenishes linepack of pipelines, raises gas pressure and strengthens the ability to deal with high ramp caused by gas demand/heating demand particularly in winter. In addition, gas storage affects flexibility directly, which can absorb excess gas when a lot of SNG is injected into a natural gas network and can supply gas when gas demand or heating demand increases. Moreover, sufficient natural gas can guarantee power output of gas turbines and improve flexibility of power systems. Therefore, it is of importance to analyze flexibility of integrated powernatural gas-heating energy systems with P2G and gas storage.
This work here developed a framework for evaluating the flexibility in integrated power-natural gas-heating energy systems with P2G and gas storage based on a multiobjective economic/environmental optimal operation strategy. Both linepack of pipelines and volume of gas storage are modelled as the sources of system flexibility and their capability are evaluated. More specifically, at first, output of renewable generations, output of thermal units, gas flow of P2G, volume of gas storage, linepack of each pipeline and gas pressure of each gas node are obtained using the proposed optimal operation strategy. Then the flexibility of the integrated power-natural gas-heating energy systems can be evaluated using the proposed flexibility assessment model. Case studies are carried out on Energies 2021, 14,196 3 of 15 a hybrid IEEE 39-bus power system and Belgian 20-node gas system [9,16,23] in a period of 24 h to investigate effects of P2G on operation results, cost, emissions, wind curtailment and flexibility.

Optimal Operation Model of Integrated Power-Natural Gas-Heating Energy Systems with P2G and Gas Storage
In the integrated power-natural gas-heating energy systems, heating supplied by gas affects gas demand and gas ramp. P2G and gas turbines coupled with power system and natural gas system are flexibility providers. P2G is both the gas source and power load. Similarly, gas turbines are power sources and gas load. In addition, the flexibility analysis framework relies on operation of the integrated power-natural gas-heat energy systems.

Gas Supplied for Heating and Gas Turbines
Gas flow supplied for heating demand at time t, Q HD (t) (MSm 3 /h) and gas flow of gas turbines, Q GT (t) ((MSm 3 /h)), can be calculated as presented below.

Gas Flowing out of P2G
P2G can produce methane whereby electrolysis process and methanation process [16,17,24]. More specifically, the curtailed renewables are used by P2G to generate methane which directly injects into natural gas network. The relationship between gas flowing out of P2G, Q P2G (t) (MSm 3 /h) and power consumed by P2G, P P2G (t) (MW), can be expressed as presented below.

Relationship between Gas Flow of Pipelines and Gas Pressure of Gas Nodes
The natural gas network follows the mass conservation law of fluid dynamics and can be modelled using Bernoulli equation [17]. In the tth time period, for the pipeline ij between gas node i and gas node j, the gas flow of the pipeline ij, Q ij (t) (MSm 3 /h), is related to gas pressure of gas node i and j, M i (t) (bar) and M j (t) (bar). The relationship among Q ij (t), M i (t) and M j (t) is presented below [23].

Gas Consumed by Compressors
Compressors in natural gas network is used to boost pressure and facilitate the gas transportation. Gas consumed by compressor s, Q con cs (t) (MSm 3 /h), relates to gas flowing through compressor s, Q cs (t) (MSm 3 /h), efficiency, η cs and gas pressure of gas nodes connected with compressor s [16].

Optimal Economic/Environmental Dispatch of Integrated Power-Natural Gas-Heating Energy Systems with P2G and Gas Storage
In this paper, the operation of integrated power-natural gas-heating energy systems is optimized as a multi-objective problem. Both operational cost and emissions are considered as objectives along with equality constraints and inequality constraints indicating the complex characteristics of integrated energy systems.

Objectives
The objectives include both the minimum operational cost and the minimum pollutant emissions of the integrated power-natural gas-heating energy systems which are presented as below. In the model, the valve point effect [29] of coal-fired units is considered to describe fuel cost more accurately.
In Equation (8), F well j (t) can be expressed as the product of gas well's flow and gas price, F gs m (t) can be expressed as the product of storage flow and storage cost and F P2G k (t) can be expressed as the product of power supplied to kth P2G and unit operational cost.

Constraints
(1) Equality constraints Equality constraints in the integrated power-natural gas-heating energy systems include power demand balance equation, dynamic gas flow balance equation of gas node i and linepack equation as shown below.
(2) Inequality constraints Inequality constraints mainly include limits of power output, ramp rate limits, gas flow limits of gas wells, gas storage and P2G, gas pressure limits of gas nodes and capacity limits of gas storage which can be described by the following unified form.

Flexibility Metric
The proposed flexibility model takes linepack of pipelines and volume of gas storage into consideration. Gas demand, heating demand and gas for gas turbines affect linepack Energies 2021, 14, 196 5 of 15 and further have influence on flexibility. In this paper, flexibility metric F is established respectively according to different types of pipelines as presented below.
From the model of flexibility metric, it can be seen the higher the flexibility metric is, the more gas redundancy it is. Redundancy of gas at time t is calculated in different cases as presented below.
3.1.1. Case 1: Only Gas Demand/Heating Demand at Pipeline k In case 1, F pk (t) is calculated as presented below.

Case 2: Only Gas Storage at Pipeline k
In case 2, F pk (t) is calculated as presented below.

Case 3: Only Gas Turbine at Pipeline k
In case 3, F pk (t) is calculated as presented below.
3.1.4. Case 4: Gas Demand/Heating Demand and Gas Storage at Pipeline k In case 4, F pk (t) is calculated as presented below.
3.1.5. Case 5: Gas Demand/Heating Demand and Gas Turbine at Pipeline k In case 5, F pk (t) is calculated as same as case 1.
3.1.6. Case 6: Gas Storage and Gas Turbine at Pipeline k In case 6, F pk (t) is calculated as presented below.
3.1.7. Case 7: Gas Demand/Heating Demand, Gas Storage and Gas Turbine at Pipeline k In case 7, F pk (t) is calculated as same as case 4.

Flow Chart
Flexibility capability is evaluated based on the proposed flexibility metric. The flexibility metric is calculated according to the presented optimal economic/environmental operation of integrated power-natural gas-heating energy systems with P2G and gas  (8)-(14)). This non-convex, coupled, non-linear, multi-objective and multi-constraint optimization problem is solved by the multi-objective improved black-hole particle swarm optimization algorithm (MOIBHPSO) [29,30] which has been applied to several optimal operation studies of power systems and integrated energy systems [16,24]. The equality and inequality constraints are handled using the method presented in References [16,24]. The overall flow chart is shown in Figure 1.

Description of Case Studies
The integrated power-natural gas-heating energy systems shown in Figure 2 is com-

Description of Case Studies
The integrated power-natural gas-heating energy systems shown in Figure 2 is composed by 39-bus power system and Belgian 20-node gas system [9,16,23]. The integrated network has 5 coal-fired units, 3 gas-fired units, 2 wind power units, 2 P2G facilities, 24 pipelines, 2 gas wells, 3 gas storages and 2 compressors. Total power generation capacity is 3903 MW. Power demand, gas demand and heating demand are shown in Figure 3 where maximum power load is at 19:00 and maximum gas/heating load is at 20:00. The parameters of cost and emissions for power systems and gas network are shown in Tables 1-3. In addition, initial line pack is given as 0.952 MSm 3 and the initial capacity of gas storage is given as 0 MSm 3 , 0 MSm 3 and 0.003 MSm 3 . Predicted wind power generation is 29,335.399 MWh. Other parameters can be found in [16]. The optimal economic/environmental dispatch of the integrated power-natural gas-heating energy systems with P2G and gas storage is studied to illustrate behavior of the proposed model and calculate metric of flexibility in two case studies using MATLAB language programming. is 3903 MW. Power demand, gas demand and heating demand are shown in Figure 3 where maximum power load is at 19:00 and maximum gas/heating load is at 20:00. The parameters of cost and emissions for power systems and gas network are shown in Tables  1-3. In addition, initial line pack is given as 0.952 MSm 3 and the initial capacity of gas storage is given as 0 MSm 3 , 0 MSm 3 and 0.003 MSm 3 . Predicted wind power generation is 29,335.399 MWh. Other parameters can be found in [16]. The optimal economic/environmental dispatch of the integrated power-natural gas-heating energy systems with P2G and gas storage is studied to illustrate behavior of the proposed model and calculate metric of flexibility in two case studies using MATLAB language programming.

Effects of P2G on Operation of Integrated Power-Natural Gas-Heating Energy Systems
The optimal dispatch results are shown in Table 4. Wind power output and curtailed wind power without P2G and with P2G are given in Figures 4 and 5, respectively. The power output of coal-fired units and gas-fired units is shown in Figure 6. Besides, the linepack of pipelines and gas pressure of node 6 are given in Figures 7 and 8. Gas flow of gas wells and gas storage as well as volume of gas storage can be found in Figures 9-11.    Table 3. Cost parameters of gas network.

Items Cost
Gas

Effects of P2G on Operation of Integrated Power-Natural Gas-Heating Energy Systems
The optimal dispatch results are shown in Table 4. Wind power output and curtailed wind power without P2G and with P2G are given in Figures 4 and 5, respectively. The power output of coal-fired units and gas-fired units is shown in Figure 6. Besides, the linepack of pipelines and gas pressure of node 6 are given in Figures 7 and 8. Gas flow of gas wells and gas storage as well as volume of gas storage can be found in Figures 9-11.   From these obtained results, when P2G is considered, it has obvious advantages in many aspects which can be described in details as below.
(1) The total operational cost declined by $7000 and SOx emissions decreased by 790 kg.
The main reasons for the decrease in operational cost are the injection of gas produced by P2G to gas network and thus the reduction of gas from gas wells. The main reason for the reduction of SOx emissions is the decrease of power output of coalfired units. More specifically, the power output of coal-fired units is increased by 25.895MW at 20:00 but decreased by 39.938 MW and 9.760 MW at 19:00 and 21:00, respectively. In general, the power output of coal-fired units is declined when P2G is taken into account and thus SOx emissions are decreased accordingly. (2) CO2 is reduced by 620 ton due to the reduction of gas flow of gas wells and absorption From these obtained results, when P2G is considered, it has obvious advantages in many aspects which can be described in details as below.
(1) The total operational cost declined by $7000 and SO x emissions decreased by 790 kg.
The main reasons for the decrease in operational cost are the injection of gas produced by P2G to gas network and thus the reduction of gas from gas wells. The main reason for the reduction of SO x emissions is the decrease of power output of coal-fired units. More specifically, the power output of coal-fired units is increased by 25.895MW at 20:00 but decreased by 39.938 MW and 9.760 MW at 19:00 and 21:00, respectively. In general, the power output of coal-fired units is declined when P2G is taken into account and thus SO x emissions are decreased accordingly. (2) CO 2 is reduced by 620 ton due to the reduction of gas flow of gas wells and absorption of CO 2 by methanation process. (3) Wind power output is increased by 6266.742 MWh as well as the rate of wind power accommodation is raised from 74.42% to 95.78%. It is noted that increased wind power is converted to methane to be stored in natural gas network which can be used to supply peak gas load or heating load later. (4) As both gas load and heating load are peaked at 20:00, linepack is not sufficient at the time and gas pressure of gas node (for example node 6) may below its minimum pressure which will affect normal operation of natural gas network. In order to solve this problem, gas consumption for gas-fired units is decreased and accordingly power output of coal-fired units is also adjusted, which can be seen from Figure 6. Due to gas produced from P2G inflowing to natural gas network, linepack as well as node pressure are increased significantly which can be found from Figures 7 and 8. (5) Due to the increased gas from P2G to supply gas demand and heating demand, there has been a certain decline in the gas flow of gas wells and gas storage as well as an obvious increase in the volume of gas storage which can be seen from Figures 9-11.  From these obtained results, when P2G is considered, it has obvious advantages in many aspects which can be described in details as below.
(1) The total operational cost declined by $7000 and SOx emissions decreased by 790 kg.
The main reasons for the decrease in operational cost are the injection of gas produced by P2G to gas network and thus the reduction of gas from gas wells. The main reason for the reduction of SOx emissions is the decrease of power output of coalfired units. More specifically, the power output of coal-fired units is increased by 25.895MW at 20:00 but decreased by 39.938 MW and 9.760 MW at 19:00 and 21:00, respectively. In general, the power output of coal-fired units is declined when P2G is taken into account and thus SOx emissions are decreased accordingly. (2) CO2 is reduced by 620 ton due to the reduction of gas flow of gas wells and absorption of CO2 by methanation process. (3) Wind power output is increased by 6266.742 MWh as well as the rate of wind power accommodation is raised from 74.42% to 95.78%. It is noted that increased wind  power is converted to methane to be stored in natural gas network which can be used to supply peak gas load or heating load later. (4) As both gas load and heating load are peaked at 20:00, linepack is not sufficient at the time and gas pressure of gas node (for example node 6) may below its minimum pressure which will affect normal operation of natural gas network. In order to solve this problem, gas consumption for gas-fired units is decreased and accordingly power output of coal-fired units is also adjusted, which can be seen from Figure 6. Due to gas produced from P2G inflowing to natural gas network, linepack as well as node pressure are increased significantly which can be found from Figures 7 and 8. (5) Due to the increased gas from P2G to supply gas demand and heating demand, there has been a certain decline in the gas flow of gas wells and gas storage as well as an obvious increase in the volume of gas storage which can be seen from Figures 9-11.   power is converted to methane to be stored in natural gas network which can be used to supply peak gas load or heating load later. (4) As both gas load and heating load are peaked at 20:00, linepack is not sufficient at the time and gas pressure of gas node (for example node 6) may below its minimum pressure which will affect normal operation of natural gas network. In order to solve this problem, gas consumption for gas-fired units is decreased and accordingly power output of coal-fired units is also adjusted, which can be seen from Figure 6. Due to gas produced from P2G inflowing to natural gas network, linepack as well as node pressure are increased significantly which can be found from Figures 7 and 8. (5) Due to the increased gas from P2G to supply gas demand and heating demand, there has been a certain decline in the gas flow of gas wells and gas storage as well as an obvious increase in the volume of gas storage which can be seen from Figures 9-11.

Effects of P2G on Flexibility of Integrated Power-Natural Gas-Heating Energy Systems
The total gas redundancy and flexibility metric of integrated energy systems without P2G and with P2G are given in Table 5. Moreover, the hourly flexibility metric of integrated energy systems without P2G and with P2G are shown in Table 6.  Table 6. Hourly flexibility metric of integrated energy systems without P2G and with P2G. Owing to the gas injection from P2G, the gas redundancy of natural gas network is increased from 10.267 Mm 3 to 11.749 Mm 3 (increased by 14.43%) as well as flexibility metric is raised from 0.244 to 0.419 (raised by 71.72%). It is noted that the peak load of power, gas and heating almost appears at 20:00 and at this time there is no wind curtailment. The integrated power-natural gas-heating energy systems has great challenge in reliable operation and flexibility. If gas flow of gas turbines is not declined to decrease gas load of natural gas network, the simulated pressure of node 6 is below zero which means the natural gas network cannot operate normally. After the adjustment of gas flow of gas turbines, pressure of node 6 is still below its lowest value (10 bar) which can be found from Figure 8. Even though there is no wind curtailment at the time of peak load, this problem still can be solved through gas injection from P2G which can be stored, transported in natural gas network and supply gas and heating load when peak demand arrives. That is exactly why flexibility of the integrated power-natural gas-heating energy systems can be raised significantly by P2G.
The increase of flexibility metric from 0.244 to 0.419 greatly benefits the integrated power-natural gas-heating energy systems. More specifically, the ability to deal with high

Effects of P2G on Flexibility of Integrated Power-Natural Gas-Heating Energy Systems
The total gas redundancy and flexibility metric of integrated energy systems without P2G and with P2G are given in Table 5. Moreover, the hourly flexibility metric of integrated energy systems without P2G and with P2G are shown in Table 6.
Owing to the gas injection from P2G, the gas redundancy of natural gas network is increased from 10.267 Mm 3 to 11.749 Mm 3 (increased by 14.43%) as well as flexibility metric is raised from 0.244 to 0.419 (raised by 71.72%). It is noted that the peak load of power, gas and heating almost appears at 20:00 and at this time there is no wind curtailment. The integrated power-natural gas-heating energy systems has great challenge in reliable operation and flexibility. If gas flow of gas turbines is not declined to decrease gas load of natural gas network, the simulated pressure of node 6 is below zero which means the natural gas network cannot operate normally. After the adjustment of gas flow of gas turbines, pressure of node 6 is still below its lowest value (10 bar) which can be found from Figure 8. Even though there is no wind curtailment at the time of peak load, this problem still can be solved through gas injection from P2G which can be stored, transported in natural gas network and supply gas and heating load when peak demand arrives. That is exactly why flexibility of the integrated power-natural gas-heating energy systems can be raised significantly by P2G. The increase of flexibility metric from 0.244 to 0.419 greatly benefits the integrated power-natural gas-heating energy systems. More specifically, the ability to deal with high ramp caused by gas demand/heating demand is better, the linepack of pipelines is more adequate to maintain gas pressure of gas nodes and gas supplying for gas turbines in power systems is more abundant.

Conclusions
A multi-objective optimization model is presented to maximize both economic and environmental benefits from operating the integrated power-natural gas-heating energy systems with P2G and gas storage. The flexibility contribution of P2G is assessed using a novel flexibility metric based on redundant linepack and gas storage. The results of case studies demonstrate that economic/environmental benefit of P2G in cost saving ($7000), emissions reduction (790 kg of SO x and 620 ton of CO 2 ) and accommodation of wind power (from 74.42% to 95.78%). Moreover, P2G significantly improves the flexibility of integrated energy systems with a 71.72% increase. These contribution from P2G is critical in the operation performance of power system, gas network and heating sector in view of reducing decline of gas supply to power system, lessening dependance on gas wells and preventing large drop of node pressure when peak demand arrives.  The set of pipeline ij which lets gas node i as the input node Set_O(i) The set of pipeline ij which lets gas node i as the output node C Operational cost ($) E Emissions (lb or kg) The pth state variable