Coordinated Operation of Gas and Electricity Systems for Flexibility Study

The increased interdependencies between electricity and gas systems driven by gas-fired power plants and gas electricity-driven compressors necessitates detailed investigation of such interdependencies, especially in the context of an increased share of renewable energy sources. In this paper, the value of an integrated approach for operating gas and electricity systems is assessed. An outer approximation with equality relaxation (OA/ER) method is used to deal with the optimization class of the mixed-integer non-linear problem of the integrated operation of gas and electricity systems. This method significantly improved the efficiency of the solution algorithm and achieved a nearly 40% reduction in computation time compared to successive linear programming. The value of flexibility technologies, including flexible gas compressors, demand-side response, battery storage, and power-to-gas, is quantified in the operation of integrated gas and electricity systems in GB 2030 energy scenarios for different renewable generation penetration levels. The modeling demonstrates that the flexibility options will enable significant cost savings in the annual operational costs of gas and electricity systems (up to 21%). On the other hand, the analysis carried out indicates that deployment of flexibility technologies appropriately supports the interaction between gas and electricity systems.


INTRODUCTION
The share of variable Renewable Energy Sources (RES) in the power generation mix is increasing significantly in Great Britain (GB) to meet de-carbonization targets (National Grid Plc, 2016). Gas plants are expected to contribute to the management of the variability of renewable energy generation, which consequently will increase the interaction between gas and electricity systems and increase challenges associated with the management of gas storage and linepack in the gas transmission system. Therefore, operating the gas and electricity systems as an integrated energy system is increasingly important.
Battery storage, Demand-Side Response (DSR), power-to-gas (P2G), and flexible compressors can enhance the system flexibility needed to support more cost-effective balancing of electricity demand and supply. Furthermore, these options can participate in the provision of various ancillary services, including reserve and frequency regulation (Qadrdan et al., 2017b). Battery storage facilitates the integration of wind into the grid through managing variation of the peak plants, such as gas-fired plants. The employment of DSR helps to deal with the variability of RES better, as energy consumption can be shifted, which can act as a virtual power plant (Ameli et al., 2017a,b). Furthermore, P2G technologies would make use of a surplus of renewable electricity by producing hydrogen via electrolyzers that would be injected into the gas system or stored in hydrogen storage facilities. Afterward, the hydrogen can be transported to the demand centers or provided to Combined Cycle Gas Turbines (CCGTs) to produce free-carbon electricity. In the gas system, flexible gas compressors improve gas delivery to the demand centers through changing the gas flow direction. Several studies, such as Troy et al. (2012) and Pudjianto et al. (2014), have evaluated the role of flexibility options in addressing the electricity balancing challenges caused by RES. From whole energy system perspectives, by taking flexibilities into account, the interaction of gas and electricity systems was studied in Correa-Posada and Sanchez-Martin (2015), He et al. (2017), Zlotnik et al. (2017), Qadrdan et al. (2017a), Ameli et al. (2017c,d), and Wu et al. (2019). Zlotnik et al. (2017) developed coordinated modeling of interdependent gas and electricity systems for day-ahead scheduling of power dispatch and gas compressor operation. The efficiency of the model was validated by improvement in system operation and cost reduction. In Ameli et al. (2017d), the role of multi-directional compressors as one of the options in making the gas system more flexible was investigated in different operation methodologies of gas and electricity systems. It was demonstrated that increased flexibility in the gas system is beneficial for the whole energy system. In Sheikhi et al. (2015), an integrated demand-side response framework as a part of a smart energy hub was proposed. In this framework, the customer can modify the use of gas or electricity based on the gas and electricity prices. It was shown that this approach offers benefits for both customers and utilities in terms of costs and profits. In Yang et al. (2019), the coordination of different P2G conversions, including electrolysis and Steam Methane Reforming (SMR), and gas-fired plants in an integrated operation of gas and electricity networks was proposed. It was shown how this combined model can improve energy efficiency and reduce carbon emissions compared to the power-to-hydrogen-to-methane-to-pipeline approach. From a modeling point of view, it was not mentioned in detail how this optimization problem may be solved. In He et al. (2017), coordinated scheduling of gas and electricity systems considering P2G was investigated. Furthermore, another study (Akhtari and Baneshi, 2019) showed how the excess electricity generated by renewables can be used in the electrolysis process to produce hydrogen. The proposed method was tested in five different cities, and a decrease in carbon emissions was reported. In Wu et al. (2019), a hybrid multi-objective optimization approach was developed for the operation of integrated energy systems considering gas and electricity. In this approach, the price of electricity and cooling demands are considered. The results indicated fair treatment for all the players in the integrated energy system. In Zeng et al. (2016), a bi-directional energy flow between gas and electricity systems was proposed to realize high penetration of renewables and an increase in system flexibility. The effectiveness of the proposed method (i.e., solved by the Newton-Raphson method) was analyzed on an IEEE-9 test system and a 7-node gas system. In Correa-Posada and Sanchez-Martin (2015), a coupled model of natural gas and power systems aimed at providing energy adequacy was presented. Non-linear equations and constraints were linearized to solve a Mixed-Integer Linear Programming (MILP) problem. A weak point of this study was that linearizing the non-linearities piecewise causes a significant increase in the probability of data loss. In Gil et al. (2016), two coupling methodologies for gas and electricity markets in a European regulatory framework were presented. The first methodology was based on maximizing the profit of the electricity market, and the second approach was based on minimizing the operational cost of the natural gas system. It was demonstrated that if the modeling is accurate, the difference between these two methodologies may be negligible. In addition, in Zlotnik et al. (2017), different coordinated scheduling scenarios of natural gas and power systems were presented. The Unit Commitment (UC) problem of the generation units was not considered. This was done in order to reduce the model complexity by preventing binary variables in the optimization procedure, which may lead to inaccuracy. The authors of Deane et al. (2017) built and applied an integrated electricity and gas model for the European Union system. In this research, gas supply interruption scenarios were derived to examine the impacts on power system operation. As an example, it was shown that interruption of the Russian gas supply to the EU enhanced the average gas price by 28% and the electricity price by 12%. In Sardou et al. (2018), the role of microgrid aggregators in a coordinated operation strategy for gas and electricity systems was investigated. In Zhang et al. (2016), the role of demand response in providing energy balance was considered. A coordinated MILP strategy for natural gas and power systems was proposed. In this strategy, the power system was optimized, and then the natural gas constraints were checked for the feasibility of the solution. It was shown that this model increased the social welfare of the scenarios. However, through linearizing the gas flow equation piecewise, the complexity of the model is reduced, and accuracy may be lost. In the literature, different methods have been applied to linearize the general gas flow and propose a MILP formulation for the operation of a gas network (Correa-Posadaa and Sanchez-Martin, 2014;He et al., 2017;HU et al., 2017;Sirvent et al., 2017). Although piecewise linearization affects the time required to solve the problem considerably, the accuracy of each method (i.e., ability to find the optimal solution) significantly relies on the generating segments. On the other hand, some methods are not scalable and can only be used for a problem of a predetermined size (Correa-Posadaa and Sanchez-Martin, 2014).
The coupling of the binary variables representing the On/Off states of generating units and non-linear equations of gas flow in pipes and compressor power consumption makes the optimization of the integrated operation of gas and electricity systems a Mixed-Integer Non-Linear Programming (MINLP) problem, which is complex and challenging to solve from the computational perspective (Floudas, 1995). In order to deal with the aforementioned complexity in solving the MINLP problem, several algorithms, such as Generalized Benders Decomposition (GBD), Outer Approximation (OA), Outer Approximation with Equality Relaxation (OA/ER), and generalized cross decomposition, have been developed (Floudas, 1995). Deterministic methods, such as Lagrangian Relaxation (LR) (Ongsakul and Petcharaks, 2004) and Benders Decomposition (BD) (Nasri et al., 2016), and also heuristic methods, such as an evolutionary algorithm (Chung et al., 2011) have been applied to solve MINLP problems in power systems. In Shabanpour-Haghighi and Seifi (2015), a solving technique based on a modified teaching-learning method for optimal power flow taking electricity, gas, and heat into account was proposed. This method was evaluated and compared with conventional evolutionary algorithms to highlight the effectiveness of the method. In He et al. (2017), co-optimization scheduling of gas and electricity systems was proposed. A decomposition method was applied to solve the electricity system sub-problem and gas system sub-problem separately.
The OA approach, which is the fundamental technique in this study, has been implemented in a few studies for dealing with the Unit Commitment (UC) problem (Yang et al., 2017) with AC power flow (Castillo et al., 2016) as well as security-constrained UC (Dai et al., 2016). The OA/ER decomposition method solves a binary relaxed primal problem [Non-Linear Problem (NLP)] and a relaxed master problem (MILP). The OA/ER decomposition method copes with non-linear inequalities and consequently creates sequences of lower and upper bounds. In the OA/ER approach, the non-linear equalities are converted to linear inequalities based on their associated Lagrangian multipliers. It is worth mentioning that the integrated operation of gas and electricity systems is solved by Successive Linear Programming (SLP) (Default solver of Xpress FICO, 2013) and investigated from different aspects in a few papers, such as Qadrdan et al. (2017a) and Ameli et al. (2017d). The MINLP problem of integrated operation of gas and electricity is non-convex, which implies the potential existence of multiple local optima.
Hence, in this paper, in order to deal with the complexity of the above-mentioned model, a solution algorithm is implemented based on the OA/ER approach to model the integrated operation of gas and electricity systems. The efficiency of this decomposition method is validated by comparing the computational performance in terms of optimization time and objective function with the SLP method. Furthermore, the role and value of the flexibility options, including DSR, electricity storage, flexible gas plants, P2G, and multi-directional compressors, in the cost-effective operation of the integrated systems for intact and contingency configurations (i.e., gas supply interruption) on a 2030 GB system are investigated. In this regard, to evaluate the sensitivity of the renewable penetration level to the flexibility options, different renewable generation and gas supply development scenarios in the presence of different installed capacities of flexibility options are defined to quantify the operation of the energy systems. To model the entire year, a demand clustering method is developed to reduce the size of the optimization problem, so that, through this method, the entire year is represented by 12 days.

Formulation of Electricity System Operation
The constraints governing the electricity system over the time horizon (t ∈ T ) are represented by equations (1)-(11). These constraints include: minimum and maximum power generation limits for generators (1), Minimum Stable Generation (MSG) for thermal generators (2), maximum limit for power generation and provision of reserve by thermal generators (3), Minimum Up/Down Time (MUT/MDT) of generators (4)-(5), ramp up/down limits of generators (6), start-up cost of generators (7) (8), minimum reserve requirement (including the unserved reserve) (9) (Ameli et al., 2019), capacity of power transmission lines (10), and power balance at each time step (11).
where B set of Busbars

Formulation of Gas System Operation
The operation of the gas system over the time horizon (t ∈ T ) is modeled via constraints for gas flow along a pipe (12) (Osiadacz, 1987) (detailed formulation is presented in Ameli et al., 2019), power consumption by the compressors (14), changes in the gas system linepack (15), minimum and maximum pressure limits (16), and gas balance at each node and time step (17). In order to model a bi-directional gas flow, in the gas flow equation in (12), where C set of compressor nodes

Coupling Components
The gas and electricity systems are coupled via gas-fired generators and electrically driven compressors. The electric power consumption of electrically driven compressors and the gas required for power generation are calculated by (14) and (18), respectively.
Q gen where M conn x,i node-generator incident matrix at node x and generation unit i η i efficiency of generation unit i ν g energy conversion coefficient

Battery Storage
The operational characteristics of battery storage are modeled using equations (19)-(23) (Pudjianto et al., 2014;Ameli et al., 2020). A round trip efficiency of 80% is assumed for the battery storage. In this case, the reserve requirements and power balance equations of (9) and (11) are changed to (24) and (25), respectively. It is worth mentioning that, since the model is a least-cost optimization and attempts to minimize the cost, when an optimal solution is achieved, no simultaneous charge and discharge is happening.

Demand-Side Response (DSR)
A set of generic DSR constraints are implemented in the proposed model: the maximum amount of load that could be shifted (26), the change in load profile due to DSR (27), and temporal shifting of demand while considering potential losses (28) through the presented efficiency, as shifting demand could require an increase in overall energy consumption (Pudjianto et al., 2014). In the presence of DSR, (11) is replaced by (29). In (30), the energy content of hydrogen production by electrolyzer to its equivalent natural gas volume is presented. The amount of electricity used for hydrogen production is limited to the capacity of the electrolyzer (31). The amount of hydrogen that can be injected into the gas pipelines cannot exceed the maximum allowance (32). In this case, (11) and (17) are changed to (33) and (34), respectively.
where FIGURE 1 | Rolling planning structure of the gas and electricity system model.   (35).

Temporal Structure of the Model
The operation of the gas and electricity systems is optimized using a day-ahead rolling planning approach. After solving the optimization problem for each iteration (i.e., 24 h), solutions representing the state of the system, e.g., On/Off states of the thermal generating units, linepack, and storage for the first 12 h of the iteration are saved (Figure 2). This is carried out in order to decrease the "end-of-optimization" effect and to model the storage facilities and unit commitment approach more realistically. Afterward, the solution of the state variables is used in time-dependent constraints when considering the following 24 h.

OA/ER Decomposition Method
The MINLP problem of the integrated operation of gas and electricity systems is solved using the OA/ER method. The structure of the OA/ER approach is presented in Figure 3. This structure represents the block "Total operational costs minimization" in Figure 1.
In each iteration, an upper bound and a lower bound of the objective function are generated to solve the MILNP problem. The upper bound is obtained from the primal problem, and the lower bound is obtained from the master problem. In the primal problem, the binary variables are fixed. The upper bound and the Lagrangian multipliers associated with the non-linear equality constraints are provided from the primal as input to the master problem. The master problem is derived through relaxing the non-linear equalities to linear inequalities via the use of the Lagrangian multipliers obtained in the primal problem. The master problem provides information about the lower bound and the updated values for binary variables that will be used in the next iteration of the primal problem. The lower bound and upper bound sequences converge as the iterations proceed. A detailed description of this approach is presented in Ameli et al. (2019).
For the sake of simplification, the sets of continuous variables and integer variables in the objective function of the electricity system are defined as: the sets of variables in the objective function of the gas system are defined as: ∀x ∈ M, l ∈ L g , t ∈ T. and the sets of variables in (12) and (14) are presented by: In this regard, in the objective function, f (X) is representing the cost of the continuous variables in the electricity system, g(Y) is representing the cost of the integer variables in the electricity system, h(U) is representing the cost of the continuous variables in the gas system, q(S) is representing the gas flow equation, and r(T) is representing the compressor power consumption.

Primal Problem
In the primal problem, the binary variables of w su i,t are given as fixed values. Therefore, the MINLP function in (35) is converted to NLP (36). For the first iteration, initial values based on the optimization (using Xpress SLP solver FICO, 2013) described in Ameli et al. (2017d), were given as the values for g(Y * ) (1) . The * represents the values that are input to the problem. This selection of initial values makes the convergence process faster. For the next iteration of the primal problem, the fixed values of binary variables are provided subsequently by the master problem.
where F is the total number iterations. At iteration ρ, if the primal problem is feasible, then information on the continuous variables in the gas system h(U * (ρ) ) and in the electricity system f (X * (ρ) ) is provided as input to the master problem. Additionally, the Lagrangian multipliers of the non-linear equations λ

Master Problem
The master problem formulation is presented by equations (38)-(43). In (38), the objective function of the master problem is presented. In (39), variable ξ is introduced to constrain the linearized objective function of the primal at the solution points of continuous variables. However, since the objective function is linear, it can be expressed as in (39).
The non-linear equalities of gas flow equation (12) and compressor power consumption (14) are relaxed to inequalities of (40) and (41), respectively.
In each iteration, the objective function of the master problem should be between the current objective function of the primal (upper bound) and the previous objective value of the master (lower bound) in order to proceed with convergence of the problem (42). The optimization is terminated when (43) is met or the master problem is infeasible, where ǫ is the convergence bound.

CASE STUDIES
The operation of a GB gas and electricity system with large penetration of wind generation is modeled for twelve representative days characterizing possible conditions for net electricity demand within the year in 2030. The efficiency of the OA/ER decomposition method approach for solving the optimal operation problem of gas and electricity systems is assessed by comparing it to the commercial XPRESS SLP solver.
The efficacy of the flexibility options, namely (a) battery storage (EStor), (b) demand-side response (DSR), (c) Powerto-Gas (P2G), and (d) multi-directional compressors (Multi), to address electricity supply-demand balancing challenges is evaluated and compared to a reference (Ref ) case in which no particular measure was considered to facilitate efficient integration of a large penetration of renewable generation.

GB Gas and Electricity Systems
The power generation mix in this study is shown in Table 1 and is based on the year 2030 of the "Gone Green" scenario of the National Grid (National Grid Plc, 2016). For gas-fired plants, variation in the cost of electricity production (2.2 /MWh) depending on the fuel price is taken into account. The updated version of the GB 62-node National Transmission System (NTS) gas network (Qadrdan et al., 2010) and a 29-busbar electricity transmission system (Ameli et al., 2017d) are modeled. The data presented in Ameli et al. (2017d) are used as the base for hourly wind generation and non-electric gas demand in 2030. The gas demand for power generation is determined endogenously by (18). The electricity peak demand is assumed to be 85 GW, which is driven by the electrification of segments of the heat and transport sectors.
In the optimization problems of integrated operation of gas and electricity systems, about 43,000 variables including 3,500 binary variables are determined in each 24 h.

Demand Clustering Strategy
Due to the complexity of modeling the integrated operation of gas and electricity systems, it is computationally challenging to analyze the system for an entire year with an hourly time step (8,760 time steps in total). Instead, the net electricity demand profiles (i.e., renewable electricity generation deducted from electricity demand) for a number of characteristic days are selected, which represent the combination of electricity demand and renewable electricity generation. The clustering algorithm is presented in this section. At the beginning for each day, an equal weight of 1 365 is considered. The net demand clustering algorithm is described as follows.
• Step 1: Calculating the distance between different net demand profiles through (44), where k is the counter.
Step 2: Finding the two closest profiles. • Step 3: Comparing the frequency of occurrence of the profiles in order to delete the profile with less frequency. • Step 4: The frequency of the deleted profile is added to the closest profile, and k = k − 1. • Step 5: If k = N dp then terminate. Otherwise, return to step 1.
where,   In Figure 4, the net electricity demand profiles selected by the clustering algorithm are presented. The actual days in the year and the frequency of occurrence of the representative profiles are provided in Table 2. Some of the profiles that occur less frequently pose unique characteristics, e.g., Day 4 occurs only once in the whole year and represents a summer day in which a significant amount of electricity is generated by RES; therefore, net electricity demand is negative during most hours of the day.

Description of Flexibility Case Studies
To investigate the role and value of the flexibility options in supporting the cost-effective operation of gas and electricity systems, different combinations of available flexibility and level of wind generation penetration are considered. For each flexibility option, two different levels considered: low 4 GW installed capacity and high 12 GW installed capacity. For wind generation, three different levels of installed capacity, i.e., 23.6, 47.3, and 70.9 GW, are assumed.

Computational Performance of the OA/ER Approach
The optimization problem was run on a computer with a 3.20 GHz Intel(R) Xeon(R) processor and 16 GB of RAM. The computational performance of the proposed OA/ER decomposition method was benchmarked against the SLP algorithm of Xpress solver (FICO, 2013). The employment of the OA/ER decomposition method significantly improved the efficiency of the solution algorithm, achieving a nearly 40% reduction in the computation time compared to the SLP method.
In addition, the solution of the optimization (i.e., operational cost) was slightly improved. A summary of the computational characteristics for a day is presented in Table 3.

Performance of Flexibility Options in the Electricity System
5.2.1. Impacts of Increased Flexibility on Generation Dispatch Figure 5 shows how the use of flexibility options affects the electricity outputs of different generation technologies through the change in electricity production with respect to the Ref Case. The application of flexibility options enhances the ability of the system to absorb more electricity from renewable sources. Consequently, due to more electricity being supplied from renewables, compared to the Ref case, the power from the expensive option (interconnection) as well as coal (i.e., characterized by high emissions) is reduced. Furthermore, the share of gas-fired plants increases to complement variable renewable generation. In Figure 5A, the significant role of high installation of DSR in accommodating more gas-fired plants is presented. This is due to the fact that, since the wind penetration is low, gas plants play the main part in supplying demand, and by shifting the demand optimally, around 5 TWh more electricity is provided by the gas-fired plants. Due to the small penetration of wind, electricity storage and P2G have a small impact on the electricity produced by different types of generators. In Figure 5B, although more electricity is absorbed by the grid, the gas plants are generating more. This is due to the fact that according to (23), the electricity storage is contributing to providing a reserve, and hence gas plants participate more in the supply-demand balance. Figure 5C shows that, due to the flexibility provided by electricity storage through optimal charging and discharging, the contribution of gas-fired plants and hydro is reduced. In P2G cases, the increased absorption of electricity from wind is primarily used for hydrogen production. Furthermore, to support the operation of the gas system during peak periods, up to 2.6 TWh/yr additional electricity, mainly from hydro (i.e., limited in the Ref case because of transmission congestion), is used for producing and injecting hydrogen into the gas system. As can be seen in Figures 5B,C, more electricity from hydrogen-based CCGTs is produced compared to the Ref case (up to 0.8 TWh/yr), which leads to less emissions from gas-fired plants.
It is shown that when increasing the penetration level of wind to the system, electricity storage plays a significant role in changing the power dispatch from different technologies. As presented in Figure 5A, this is demonstrated by integrating more wind into the system while decreasing the electricity from coal and interconnection and reducing the share of renewables, and there are decreases in all other generation technologies at higher shares of wind. For other flexibility options for all wind penetration levels, the generation from wind, gas-fired, and hydro plants increases, while the production of interconnectors and coal plants decreases. In P2G cases, the hydrogen produced through the excess of wind is injected into the gas pipelines as well as being used as a fuel for gas-fired plants.

Wind Curtailment
As expected, the increased level of flexibility reduces wind curtailment. The highest reductions in wind curtailment are achieved in the P2G and EStor cases. The annual reduction of wind curtailment is presented in Figure 6A.

Operational Costs
In Figure 6B, the annual gas and electricity operational cost savings compared to the Ref case are presented for different levels of wind penetration and the application of different flexibility options. The total operational costs of   Table 4. The value of flexibility options increases when the penetration of wind generation increases. In DSR cases, due to the flexibility provided, demand is shifted mainly from peaks to off-peaks, which results in a significant decrease in electricity importation ( Figure 5). As a result, the largest cost savings are achieved in DSR cases. Overall, the enhanced flexibility provided by DSR, electricity storage, and P2G increases the efficiency of system operation by reducing the challenges caused by RES.
It is worth mentioning that in the DSR modeling, the demand satisfaction constraints (i.e., related to customer behavior) is not taken into account (Pudjianto et al., 2014), and it is assumed that the part of demand that is flexible can be shifted when it is required by the system operator. In a case where demand satisfaction constraints should be considered, the cost savings would be lower.

Performance of Flexibility Options in the Gas System
If flexibility in the gas system is enhanced through multidirectional gas compressors, it is possible to deliver more gas to the gas plants. Consequently, the supply through coal decreases, and therefore the overall emissions and the total operational costs of the systems reduce. Figure 7 demonstrates that enhancing the flexibility of the gas infrastructure in the integrated operation of gas and electricity systems increases the generation by gas-fired power plants and reduce wind curtailment, while the production from coal characterized by high emissions reduces. This delivers prevention of about 300 kilotonnes of CO 2 production.
It is worth mentioning that since there is enough gas supply to the system, under normal conditions, the multi-directional gas compressors do not play a major role in improving the operation of the system. This flexibility can enhance the energy system resiliency. Therefore, to highlight the role of multi-directional gas compressors, a stressed condition of the energy system considering two characteristics is derived: (a) when an increase in demand in morning hours coincides with a reduction in wind generation, as presented in Figure 8A, and (b) when gas supply capacities in the St Fergus, Bacton, and Easington gas terminals are constrained (Figure 8B).

Power Dispatch
The employment of flexibility options enables an effective balancing of electricity supply and demand during gas supply interruption and therefore reduces the need to import electricity (which is assumed to be at highest cost) or coal plants, which are characterized by high emissions. As seen in Figure 9, electricity from interconnectors and coal is reduced by up to 36 and 50 GWh compared to the Ref case in the two stress conditions, respectively. Hence, more accommodation of wind energy is facilitated, which leads to cost savings for both natural gas and power systems.

Gas Compressor Performance
Multi-directional compressors play a key role in mitigating the impacts of gas supply interruption by redirecting gas flows and maintaining gas supply to gas-fired power plants that would be otherwise be affected by the supply interruption. As is presented in Figure 10A, in the Multi case, especially in the morning hours when a demand increase and a sudden wind drop coincide, the compressors operate more frequently to redirect the gas flow direction. In other cases, the compressor performance is almost the same as the Ref case, as the changes are small. This is due to the fact that, in these cases, the flexibility of the gas system infrastructure is not enhanced.

Locational Marginal Price of Gas
As was discussed, the large penetration of RES increases the interaction of gas and electricity networks. Therefore, changes in the level of wind generation will significantly influence the operation of the gas system. In the case of no interruption of gas supply, since there is still enough gas to meet the demand, gas Locational Marginal Prices (LMP) are around the gas price (0.35 £/cm). The gas system security will be impacted, particularly during interruption in the gas supply system. The index considered for the gas system security is the amount of non-served gas demand. In the Ref case, the gas supply interruption causes a loss of 0.033 mcm of gas demand. This results in a significant increase in the gas LMP, especially in Scotland after 11:00 a.m., when both gas and electricity demand are high ( Figure 10B). The gas LMP in Scotland in the Ref case after 11 h is equal to the assumed Value of Lost Load (VoLL) (11.1 £/cm Chaudry et al., 2008). The use of flexibility options prevents gas load shedding during the supply interruption. As is shown in Figure 10B, the use of DSR and battery storage minimize the impact of the gas supply interruption on the gas LMP (0.46 £/cm). In the Multi case, the gas LMP is 0.72 £/cm, which indicates the efficacy of multi-directional compressors in gas delivery to demand centers. P2G prevents gas load shedding by producing hydrogen and injecting it into the gas system. However, the LMPs are high (3.4 £/cm) given that the wind generation is low and hydrogen injection therefore cannot help significantly to obviate the gas system congestion.
Overall, the modeling demonstrates that the investment in flexibility in gas infrastructure will be driven by increased requirements for flexibility in the electricity system. This will require closer coordination of operation and investment in both systems in order to facilitate cost-effective de-carbonization of the electricity system.
On the other hand, the case studies indicate that enhancing flexibility in gas and electricity networks could reduce the dependency between gas and electricity systems by addressing demand-supply balancing challenges as well as gas supply interruptions.

CONCLUSION
An outer approximation with equality relaxation method is proposed to effectively solve the optimization problem of the operation of integrated gas and electricity systems. The modeling approach developed is applied to demonstrate the benefits of an integrated approach to the operation of interdependent gas and electricity systems.
In addition, the modeling indicates that significant cost savings and corresponding emissions reduction can be achieved through enhancing the flexibility of the gas infrastructure. The value of different flexibility options (battery storage, demandside response, power-to-gas, and multi-directional compressors) for the operation of gas and electricity systems were investigated for various scenarios representing different levels of wind generation penetration. It was demonstrated that flexibility options would enhance the ability of the system to accommodate wind generation and simultaneously reduce the operating cost of the gas and electricity systems by up to 21%.
It was demonstrated that during sudden drops in wind generation as well as gas supply interruptions, the flexibility options play important roles in enhancing the efficiency of system operation and the security of gas supply. The ability of the flexibility options to reduce the interaction between gas and electricity networks in an integrated strategy highlights the importance of reforming the current regulatory and market framework to coordinate operation and investment in both systems for a cost-effective transition to lower-carbon energy systems.
Future work will involve modeling of investment in different flexibility options and emission constraints in order to identify the optimal portfolio of these technologies that would achieve carbon targets at minimum whole-system costs. Furthermore, integrated analysis of local and national infrastructures will be important for considering alternative evolution pathways of the gas and electricity infrastructures.

DATA AVAILABILITY STATEMENT
The datasets generated for this study are available on request to the corresponding author.