## 1 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. [PERSON] and et al. used the insufficient ramping resource expectation metric to measure power system flexibility in long-term planning [5]. [PERSON] and et al. proposed flexibility metrics of power systems based on flexibility definition and physical mechanism [6]. [PERSON] et al. developed a three-stage methodology to quantify the maximum flexibility of a district heating sector for power grid [7]. [PERSON] et al. designed a spatio-temporal flexibility management scheme in low-carbon power systems [8]. [PERSON] 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. [PERSON] 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]. [PERSON] 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]. [PERSON] and et al.