1 Introduction

Natural gas has become an important and promising alternative fuel for power systems, as compared to traditional fossil fuels such as coal or oil, owing to low pollutant emission, high energy conversion efficiency, and technology improvements of gas turbines. Indeed, the total installed capacity of natural gas generators has been continually increasing since the 1980s, which accounts for over 70% of total installed generation capacity in Qatar and Malaysia, about 40%–60% in Holland and Argentina, and about 20%–40% in Britain, Japan, and Italy now [1, 2].

Consequently, natural gas network plays an increasingly significant role in the power system, and the growing reliance of the electricity grid on the natural gas network brings new challenges on the secure operation of such an integrated electricity-natural gas system (IEGS) [2]. Indeed, in traditional security-constrained optimal operation of the electricity grid, fossil and/or oil fuel supplies to generation units are considered sufficient; however, in the IEGS, the availability and adequacy of just-in-time natural gas delivery are critical to ensure power system reliability [3,4,5]. To this end, the coordinated security-constrained scheduling problem while considering interdependence of the two systems is in urgent need for the reliable and economic operation of the IEGS.

In recent years, some studies on the interdependence and coordination scheduling strategy of the IEGS have been carried out. A coordinated operation strategy for the short-term scheduling of IEGS was introduced in [6] while considering demand response and wind uncertainty. A coordinated stochastic model was proposed in [7] to study the interdependence of IEGS and analyze the impact of random contingencies on power system operations. A short-term robust operation model of IEGS was proposed in [8], in which the electricity generation and natural gas allocation were co-optimized while providing robust feasible controls over a range of possible contingency scenarios. A robust scheduling model for the wind-integrated IEGS was developed in [9], with the considerations of both gas pipeline and power transmission N − 1 contingencies. A security-constrained economic dispatching for IEGS was introduced in [10], in which economic supplies for both natural gas and electricity systems were dispatched simultaneously due to their firm interconnections. A security-constrained optimal power flow and natural gas flow model was formulated in [11], in which a contingency analysis for natural gas system was developed via linear sensitivity factors. It is noteworthy that above existing researches on the security-constrained coordination scheduling for IEGS only consider steady-state network constraints of the natural gas network, while neglecting distinct time constants of the electricity and natural gas systems. Thus, they may result in suboptimal or even infeasible coordination scheduling of the IEGS.

Indeed, the significant difference in response speed between electricity and gas energy infrastructures, varying from millisecond to hours [5], imposes great challenges in exploring their interdependency. On one hand, time dynamic of electricity power is negligible since transiting from one steady state to another can be accomplished at the speed of light, i.e. a new electricity steady state can be reached almost instantaneously from a previous one [12]. On the other hand, the change in steady-state operation of the electricity system may be propagated to the gas network [13, 14] through coupling components, such as gas-fired generators, which would cause slow dynamic changes of mass flow rates and pressures within gas pipelines. Consequently, dynamic models of the natural gas network are needed to simulate transient flow characteristics once a new electricity steady state arises, and dynamics of different time-scales for the gas and electricity networks need be considered properly.

Recently, the impacts of gas dynamics such as linepack on the short-term operation have attracted widespread attention. The linepack is defined as the total mass of gas contained in gas pipelines, resulted from the compressibility of natural gas as the energy transmission media. Indeed, different from the electricity transmission network, pipelines of the gas network not only deliver gas, but also play the role of storage due to the compressibility and storability of gas. In this paper, when gas supply and demand mismatch happened, the gas demand could be potentially satisfied by consuming linepack. A coordination scheduling model of IEGS with transient-state formulation of the natural gas network was proposed [5]. The transient gas flow and steady-state power flow were adopted in [15] to formulate dynamic optimal energy flow of IEGS. By analyzing both steady-state and transient gas flows, a methodology was proposed in [16] to quantify flexibility of the gas network brought to the power system. A mixed-integer linear programming (MILP) formulation of IEGS was developed in [17] while considering gas traveling velocity and adequacy of gas for assuring power system reliability. In fact, as gas dynamics are quite complex and usually described by partial differential equations, various simplifications and approximations have been applied to analyze gas dynamics, attempting to solve the coordinated gas and power networks via more efficient linear models [18,19,20].

To the best of the authors’ knowledge, very limited publications present solutions to the security-constrained scheduling of IEGS with N − 1 contingencies of the electricity network, where the dynamic model based gas transmission scheduling is integrated to ensure adequate gas supply to gas-fired generators.


In order to bridge the gap, this paper develops a general linear programming (LP) based coordinated optimal scheduling framework for IEGS, in which economic steady-state operations in terms of power outputs of electricity generators and mass flow rates at gas source nodes are scheduled at hour-based timescale, while considering supply and demand balance of electricity and gas energy as well as electricity transmission N − 1 contingencies. Moreover, in the natural gas network, in addition to mass flow rates of gas sources, gas pressures at gas source nodes are also optimized at second-based timescale to maintain required outlet pressure ranges at gas load nodes, in which gas dynamics are represented by Wendroff difference approximation [21]. That is, the optimal gas source pressure scheduling problem covers the time period between two consecutive steady-state schedules, to accurately describe slow gas transient characteristics.


The major contributions of this work are twofold:


  1. 1)

    Considering the inertia of gas transmission network, the dynamic model of gas transmission system together with electricity transmission N − 1 contingencies is included in the security-constrained scheduling of IEGS, aiming at guaranteeing the adequacy of gas supply when N − 1 transmission contingency occurs. Indeed, in the IEGS, the change in states of the electricity network will propagate to the gas network through coupling components. However, due to the inertia of gas transmission, the induced state evolution process in the gas network could last for a non-ignorable longer time period. Thus, dynamic model of the gas transmission system can accurately describe the transition process when an electricity transmission N − 1 contingency occurs.

  2. 2)

    Minimizing pressures at gas source nodes is considered via an LP problem in the second optimization stage of the IEGS security-constrained scheduling framework with electricity transmission N − 1 contingencies, which would derive optimal linepack to ensure the required inlet pressures of gas-fired generators at terminal nodes of pipelines. Indeed, as natural gas flow through a gas pipeline is driven by the pressure difference between two adjacent nodes, a same mass flow rate could correspond to various pairs of gas source pressures as long as the relationship between the mass flow rate and the squared pressure drop is satisfied. Thus, this LP problem calculates optimal pressures of source nodes at second timescale, while satisfying pressure constraints of non-generation and gas-fired generators nodes.

The remainder of the paper is organized as follows. The integrated coordination scheduling framework of IEGS considering N − 1 contingencies of the electricity network and gas dynamics is presented in Section 2. Section 3 describes detailed formulations of the hour-based optimal steady-state economic scheduling and the second-based optimal gas pressure scheduling while considering slow gas dynamics between two consecutive steady-state points. Simulation results and discussions are given in Section 4, and the conclusions are drawn in Section 5.

2 Integrated coordination scheduling framework considering transmission N − 1 contingencies and gas dynamics

When an N − 1 contingency in the electricity transmission network occurs, the transition process in the electricity system can be finished instantaneously, i.e., time duration of the transition process can be neglected. However, due to large inertia of the gas transmission network, the relatively long transition process should be considered to describe how the gas system gradually evolves from one state to another, induced by electricity transmission N − 1 contingencies. To this end, a second-based scheduling is necessary for analyzing and optimizing the transition process of gas network. Therefore, in order to investigate the integrated coordination scheduling in IEGS with electricity transmission N − 1 contingencies, the scheduling framework including hour and second timescales is proposed to solve the problem.

The proposed integrated coordination scheduling framework for IEGS while considering electricity transmission N − 1 contingencies and gas dynamics is depicted in Fig. 1, which includes two optimization models at hour and second resolutions. Specifically, the upper section of Fig. 1 describes the coordination scheduling optimization model of IEGS considering electricity transmission N − 1 contingencies, through which the optimal steady-state operating points, including power outputs of electric generators and mass flow rates of gas sources, are derived. The objective of this hour-based steady-state coordination scheduling optimization model is to minimize the total operation costs, while considering unit commitment constraints, electricity network security constraints with electricity transmission N − 1 contingencies, and constraints of mass flow rates of natural gas.

Fig. 1
figure 1

Flowchart of proposed integrated coordination scheduling framework

The steady-state solutions of gas source mass flow rates acquired from the hour-based model of Fig. 1 are the inputs to the second-based model of Fig. 1, acting as initial values at the beginning of the hour. The second-based model further optimizes gas source pressures for the time period between two consecutive steady-state schedules, with the consideration of the slow gas transient characteristics. In the natural gas network, pressure is also an important variable besides mass flow rate. Indeed, natural gas flow through a gas pipeline is driven by the pressure difference between two adjacent nodes, while a same mass flow rate could correspond to various pairs of gas source pressures as long as the relationship between mass flow rate and the squared pressure drop is satisfied. Moreover, gas pressure loss occurs along the pipeline, while certain gas loads, especially gas-fired generators, require a certain gas pressure range to sustain their normal operations. Thus, gas source pressure optimization also plays a critical role in the IEGS operation, including maintaining desired outlet pressures and gas flow characteristics. Consequently, after gas mass flow rates are optimized via the steady-state security-constrained coordination scheduling to guarantee the optimal operation of gas-fired generators, another scheduling is implemented to ensure that inlet pressures of gas-fired generators at terminal nodes of pipelines are within required pressure ranges. Specifically, in optimizing gas source pressures, gas transmission dynamics are considered to ensure that gas-fired generators can be supplied with adequate natural gas and under required operational pressures at any time between two consecutive IEGS steady-state schedules.

Linepack storage in gas network infrastructure can provide major flexibility and reliability to the natural gas system. Thus, gas source pressures can be raised to increase the linkpack, which can be used later to supply the desired mass flow rate within the required pressure range of load nodes even when the supply/demand balance of mass flow rates cannot be achieved. Consequently, if the coordination scheduling optimization is infeasible due to limited mass flow rate constraints of the gas source, the constraints are relaxed to derive the steady-state points of the electricity system. As a result, the gas source pressure optimization maybe is infeasible because of the violation on gas source pressure limits. If this happens, we could shorten the scheduling horizon of the gas source pressure optimization problem to make it feasible, and repeat it multiple times over the entire time period between two consecutive steady-state schedules.

Figure 2 further shows the rolling based implementation of the proposed integrated coordination scheduling framework for IEGS. That is, the coordination scheduling optimization model with N − 1 contingencies aims to derive hourly operating points for power outputs of electricity generators and mass flow rates at gas source nodes over the next NT hours, and the optimal scheduling of gas source pressures is further used to determine pressures at gas source nodes for every second of the next 1 hour. After both of them are executed, the integrated coordination scheduling framework is shifted forward by 1 hour.

Fig. 2
figure 2

Rolling based implementation of proposed integrated coordination scheduling framework

3 Formulation of integrated coordination scheduling framework considering electricity transmission N − 1 contingencies and gas dynamics

In this paper, the electricity and gas sub-systems are considered to be coupled via gas-fired generators to constitute an IEGS. That is, electricity demands in the IEGS are satisfied by gas-fired generators and coal-fired generators through the power network, while non-generation and generation gas demands are satisfied by gas sources through the gas network.

3.1 Hour-based coordination scheduling of IEGS considering electricity transmission N − 1 contingencies

For an IEGS, the proposed hour-based security-constrained coordination scheduling is implemented over a NT-hour time horizon to minimize total system operation costs while satisfying operation constraints and electricity transmission N − 1 contingencies. The objective is described in (1), including production costs, startup costs, and shutdown costs of coal-fired generators as well as natural gas production costs from gas source nodes.


$$\begin{aligned} & \hbox{min} \text{ }\left( {c_{\text{GAS}} \sum\limits_{T = 1}^{{N_{T} }} {\sum\limits_{s} {M_{s} (T)} } + \sum\limits_{T = 1}^{{N_{T} }} {\sum\limits_{{i \in S_{CG} }} {\beta_{i}^{\text{P}} } P_{i}^{\text{G}} (T)} } \right. \\ & \quad \quad \text{ }\left. { + \,\sum\limits_{T = 1}^{{N_{T} }} {\sum\limits_{{i \in S_{CG} }} {\beta_{i}^{\text{SU}} B_{i}^{\text{SU}} } (T)} + \sum\limits_{T = 1}^{{N_{T} }} {\sum\limits_{{i \in S_{CG} }} {\beta_{i}^{\text{SD}} } B_{i}^{\text{SD}} (T)} } \right) \\ \end{aligned}$$
(1)

where \(c_{\text{GAS}}\) is cost coefficient of natural gas mass flow rate; s is the index of gas source node; Ms is mass flow rate at gas source node; \(P_{i}^{\text{G}} (T)\) is the electric active power generation; \(S_{CG}\) is the set of coal-fired electricity generators; \(\beta_{i}^{\text{P}}\), \(\beta_{i}^{\text{SU}}\) and \(\beta_{i}^{\text{SD}}\) are the cost coefficients of electricity production, startup, and shutdown for coal-fired electric generator; \(B_{i}^{\text{SU}}(T)\)and \(B_{i}^{\text{SD}}(T)\) are the binary startup and shutdown variables for electricity generator.

Operation constraints are discussed as follows.


  1. 1)

    Unit commitment constraints


Minimum and maximum operation levels of coal-fired and gas-fired generators are presented as (2).

$$\begin {aligned} I_{i} (T)P_{i}^{{min} } \le P_{i}^{\text{G}} (T) &\le I_{i} (T)P_{i}^{max } \\ & i \in {S_{CG}} \cup {S_{GG}} {\text{, }}T = 1,2, \cdots ,N_{T} \end {aligned}$$
(2)

where Ii is the binary unit commitment variable for electricity generator; \(S_{GG}\) is the set of gas-fired electricity generators.

Minimum up and down time constraints are presented as (3) and (4).

$$\begin {aligned} \sum\limits_{{\tau = \hbox{max} \left\{ {1,\,T - T_{Ui} + 1} \right\}}}^{T} & {B_{i}^{\text{SU}} (\tau )} \le I_{i} (T)\\ & i \in S{}_{CG} \cup S_{GG} ,\text{ }T = 1,2, \cdots ,N_{T} \end{aligned}$$
(3)
$$\begin {aligned} \sum\limits_{{\tau = \hbox{max} \left\{ {1,\,T - T_{Di} + 1} \right\}}}^{T} & {B_{i}^{\text{SD}} (\tau )} \le 1 - I_{i} (T)\\ &i \in S{}_{CG} \cup S_{GG} ,\text{ }T = 1,2, \cdots ,N_{T} \end {aligned}$$
(4)

where TUi and TDi are the minimum up and down times of the electricity generator.

Ramping constraints are given in (5) and (6), including startup and shutdown ramp rates that might be different from ramp up/down rates.

$$\begin{aligned} P_{i} (T) - P_{i} (T - 1) & \le R_{i}^{ + } I_{i} (T - 1) + R_{i}^{\text{SU}} B_{i}^{\text{SU}} (T)\text{ } \\ & \quad \text{ }i \in S{}_{CG} \cup S_{GG} ,\text{ }T = 1,2, \cdots ,N_{T} \\ \end{aligned}$$
(5)
$$\begin{aligned} P_{i} (T - 1) - P_{i} (T) & \le R_{i}^{ - } I_{i} (T) + R_{i}^{\text{SD}} B_{i}^{\text{SD}} (T) \\ & \quad \text{ }i \in S{}_{CG} \cup S_{GG} ,\text{ }T = 1,2, \cdots ,N_{T} \\ \end{aligned}$$
(6)

where \(R_{i}^{ + }\) and \(R_{i}^{ - }\) are the maximum ramp up and down rates of electricity generator; \(R_{i}^{\text{SU}}\) and \(R_{i}^{\text{SD}}\) are maximum startup and shutdown ramp rates of electricity generator.

The logic constraints among binary unit commitment variables, startup variables, and shutdown variables are modeled as (7) and (8).

$$\begin {aligned} 0 \le B_{i}^{\text{SU}} (T) + B_{i}^{\text{SD}} &(T) \le 1\\ & i \in S{}_{CG} \cup S_{GG} ,\text{ }T = 1,2, \cdots ,N_{T} \end {aligned}$$
(7)
$$\begin{aligned} I_{i} (T) - I_{i} (T - 1) & = B_{i}^{\text{SU}} (T) - B_{i}^{\text{SD}} (T) \\ & \quad i \in S{}_{CG} \cup S_{GG} ,\text{ }T = 1,2, \cdots ,N_{T} \\ \end{aligned}$$
(8)
  1. 2)

    Electricity network security constraints

The supply and demand balance of electricity power is described as follows:

$$\sum\limits_{{b \in S_{ED} }} {P_{b}^{\text{D}} (T)} = \sum\limits_{{i \in S_{CG} \cup S_{GG} }} {P_{i}^{\text{G}} (T)} \, \quad \, T = 1,2, \cdots ,N_{T}$$
(9)

where \(P_{b}^{\text{D}}(T)\) is the electricity demand; \(S_{ED}\) is the set of nodes having electricity demand.

Binary parameter \(r_{l}^{k}\) is introduced to describe status of transmission line l in an electricity transmission N − 1 contingency k. That is, \(r_{l}^{k} = 0\) represents the outage of transmission line l, and \(r_{l}^{k} = 1\) indicates its normal operation state. For N − 1 contingency k in which the k-th transmission line fails, the parameters \(r_{l}^{k}\) are defined as:

$$r_{l}^{k} = \left\{ {\begin{array}{*{20}l} 0 \hfill & {\quad l = k,\text{ }l \in S_{EL} ,\text{ }k \in S_{CE} } \hfill \\ 1 \hfill & {\quad l \ne k,\text{ }l \in S_{EL} ,\text{ }k \in S_{CE} } \hfill \\ \end{array} } \right.$$
(10)

where \(S_{EL}\) is the set of electric transmission lines; \(S_{CE}\) is the set of electricity transmission N − 1 contingency events.

DC power flow \(P_{fl}^{k} (T)\) through transmission line l in an electricity transmission N − 1 contingency k is modeled as (11) and (12).

$$\begin {aligned} P_{fl}^{k} (T) - \frac{{\Delta \theta_{l}^{k} (T)}}{{x_{l} }}& - (1 - r_{l}^{k} )L \le 0\\ & l \in S_{EL} ,\text{ }k \in S_{CE} ,\text{ }T = 1,2, \cdots ,N_{T} \end {aligned}$$
(11)
$$\begin {aligned} P_{fl}^{k} (T) - \frac{{\Delta \theta_{l}^{k} (T)}}{{x_{l} }} & + (1 - r_{l}^{k} )L \ge 0\\ & l \in S_{EL} ,\text{ }k \in S_{CE} ,\text{ }T = 1,2, \cdots ,N_{T}\end{aligned}$$
(12)

where L is the “big M” value; xl is the reactance of an electricity transmission line; \(\Delta \theta_{l}^{k} (T)\) is the difference of the two bus voltage phase angles. When \(r_{l}^{k} = 1\), (11) and (12) degrade to an equality constraint, i.e. traditional power flow constraint through line; when \(r_{l}^{k} = 0\), the value of L is chosen large enough to ensure that (11) and (12) are satisfied regardless of \(\Delta \theta_{l}^{k} (T)\).

Power flow through transmission line l is subject to the thermal limits of transmission capacity.

$$\begin {aligned} - r_{l}^{k} P_{fl}^{\hbox{max} } & \le P_{fl}^{k} (T) \le r_{l}^{k} P_{fl}^{\hbox{max} } \\ &l \in S_{EL} ,\text{ }k \in S_{CE} ,\text{ }T = 1,2, \cdots ,N_{T} \end{aligned}$$
(13)

where \(P_{fl}^{\hbox{max} }\) represents the maximum DC power flow.

Voltage phase angles of electricity nodes are also constrained by their upper and lower limits.


$$\theta_{\hbox{min} } \le \theta_{b}^{k} (T) \le \theta_{\hbox{max} } \qquad b \in S_{EB} ,\;k \in S_{CE},\;T = 1,2, \cdots ,N_{T}$$
(14)

where \(\theta_{b}^{k}\) is the voltage phase angle of electricity node; \(S_{EB}\) is the set of electric buses; \(\theta_{\hbox{min} }\) and \(\theta_{\hbox{max} }\) are the minimum and maximum voltage phase angles of electricity nodes.


  1. 3)

    Gas supply-demand balance and mass flow rate limits

Natural gas-fired generators couple the two interdependent systems. Natural gas consumption of a gas-fired generator, represented by mass flow rate Mj(T), is represented as (15), including gas consumptions for startup, shutdown, and electricity production operations, where \(\alpha_{j}^{\text{P}}\), \(\alpha_{j}^{\text{SU}}\), and \(\alpha_{j}^{\text{SD}}\) are constant energy conversion coefficients of electricity production, startup, and shutdown for gas-fired generator.

$$\begin {aligned} M_{j} (T) = \alpha_{j}^{\text{P}} P_{j} (T) + \alpha_{j}^{\text{SU}} B_{j}^{\text{SU}} & (T) + \,\alpha_{j}^{\text{SD}} B_{j}^{\text{SD}} (T)\\ &j \in S_{GG} ,T = 1,2, \cdots ,N_{T}\end{aligned}$$
(15)

Supply and demand balance of gas mass flow rate at steady state is considered as follows:

$$\begin {aligned} \sum\limits_{{n \in S_{NGD} }} {M_{n} (T)} + \sum\limits_{{j \in S_{GG} }} {M_{j} (T)} = & \sum\limits_{s} {M_{s} (T)} \\ & T = 1,2, \cdots ,N_{T} \end {aligned}$$
(16)

where \(S_{NGD}\) is the set of non-generation gas demand nodes.

Mass flow rate at each gas source is constrained by its upper limit:

$$0 \le M_{s} (T) \le M_{s}^{\hbox{max} } \qquad T = 1,2, \cdots ,N_{T}$$
(17)

where \(M_{s}^{\hbox{max} }\) is the maximum mass flow rate.

In summary, the security-constrained coordination scheduling of IEGS considering electricity transmission N − 1 contingencies is formulated as a MILP problem, including objective (1) and constraints (2)–(17). By solving the MILP problem, the steady-state operation points of electricity generators as well as mass flow rates of natural gas sources are optimized.

3.2 Second-based optimal scheduling model of gas source pressures considering gas dynamics

The above IEGS coordination scheduling model with electricity transmission N − 1 contingencies optimizes gas mass flow rates required for the operation of gas-fired generators. In this section, based on the calculated gas mass flow rates, gas source pressures are further optimized to ensure that inlet pressures of gas-fired generators at terminal nodes of pipelines are within the required pressure range.

In the natural gas network, travelling time of gas mass from source nodes to load nodes is not negligible, and a much longer response time is needed to reach a new steady state. Indeed, when gas supply-demand mismatch arises due to the scheduled higher power outputs of gas-fired generators, the corresponding gas network operation status is not a steady state, and a gas dynamic model is needed.

In order to represent dynamic characteristics of the gas network more practically after a new steady-state electricity transmission is reached, the basic principles of the fluid dynamics is used to describe gas transmission within pipelines.

The material-balance equation describes the conservation of mass in a pipeline as follows [15]:

$$\frac{\partial \rho }{\partial t} + \frac{\partial M}{A\partial x} = 0$$
(18)

where \(\rho\) is the density; M is the mass flow rate; A is the cross-sectional area of a natural gas pipeline; x is the length scale of the pipeline.

The momentum equation, also known as Navier–Stokes equation, describes the momentum transport in the continuum of natural gas. With proper assumptions, the equation can be simplified as (19) [15], where the value of friction factor λ is taken as 0.015, the parameter d denotes the diameter of a natural gas pipeline.

$$\frac{\partial M}{A\partial t} + \frac{\partial \pi }{\partial x} + \frac{\lambda }{2d}\frac{{M^{2} }}{{\rho A^{2} }} = 0$$
(19)

Fluid dynamics (18) and (19) are partial differential equations, the solutions to which can be approximated by the Wendroff difference. Considering the relationship \(\pi = c^{2} \rho\) between pressure \(\pi\) and density \(\rho\), where \(c^{2} = RT_{\text{t}} Z\) with gas constant R = 500, temperature Tt = 273 K, and compressibility factor Z = 0.9, constraints (18) and (19) can be reformulated as (20) and (21), describing the dynamics of mass flow rates and pressures at two ends m and n of a pipeline mn, the length of which is denoted by lmn. It can be seen that the mass flow rates and pressures of natural gas within a pipeline are spatiotemporally coupled.

$$\begin{aligned} & \pi_{n,t + 1} + \pi_{m,t + 1} - \pi_{n,t} - \pi_{m,t} + \frac{{c^{2} \Delta t}}{{l_{mn} A_{mn} }} \\ & \quad \cdot \,\left( {M_{n,t + 1} - M_{m,t + 1} + M_{n,t} - M_{m,t} } \right) = 0 \, \qquad t = 1,2, \cdots ,N_{t} \\ \end{aligned}$$
(20)
$$\begin{aligned} & \frac{1}{{A_{mn} }}\left( {M_{n,t + 1} + M_{m,t + 1} - M_{n,t} - M_{m,t} } \right) + \frac{\Delta t}{{l_{mn} }} \\ & \quad \cdot \,\left( {\pi_{n,t + 1} - \pi_{m,t + 1} + \pi_{n,t} - \pi_{m,t} } \right)\text{ } + \frac{{\lambda \Delta t\varpi_{mn} }}{{4d_{mn} A_{mn} }} \\ & \quad \cdot \,\left( {M_{n,t + 1} + M_{m,t + 1} + M_{n,t} + M_{m,t} } \right) = 0\qquad \, t = 1,2, \cdots ,N_{t} \\ \end{aligned}$$
(21)

In (21), parameter \(\varpi_{mn}\) is the average gas flow rate and can be calculated as \(\varpi_{mn} = {{c^{2} \left( {{{M_{m,t} } \mathord{\left/ {\vphantom {{M_{m,t} } {\pi_{m,t} + {{M_{n,t} } \mathord{\left/ {\vphantom {{M_{n,t} } {\pi_{n,t} }}} \right. \kern-0pt} {\pi_{n,t} }}}}} \right. \kern-0pt} {\pi_{m,t} + {{M_{n,t} } \mathord{\left/ {\vphantom {{M_{n,t} } {\pi_{n,t} }}} \right. \kern-0pt} {\pi_{n,t} }}}}} \right)} \mathord{\left/ {\vphantom {{c^{2} \left( {{{M_{m,t} } \mathord{\left/ {\vphantom {{M_{m,t} } {\pi_{m,t} + {{M_{n,t} } \mathord{\left/ {\vphantom {{M_{n,t} } {\pi_{n,t} }}} \right. \kern-0pt} {\pi_{n,t} }}}}} \right. \kern-0pt} {\pi_{m,t} + {{M_{n,t} } \mathord{\left/ {\vphantom {{M_{n,t} } {\pi_{n,t} }}} \right. \kern-0pt} {\pi_{n,t} }}}}} \right)} {\left( {2A_{mn} } \right)}}} \right. \kern-0pt} {\left( {2A_{mn} } \right)}}\). In (20) and (21), time step Δt of the gas dynamics simulation is chosen as 100 s and \(N_{t}\) is the total number of time instants for optimizing gas source pressures, decided by Δt and the length of scheduling horizon.

In addition, at an intersection where multiple nodes m, m + 1, m + 2, … are connected, a consensus gas pressure and a balanced mass flow rate should be maintained. Thus, the boundary conditions are imposed as follows:

$$\pi_{m,t} = \pi_{m + 1,t} = \pi_{m + 2,t} = \cdots \qquad \, t = 1,2, \cdots ,N_{t}$$
(22)
$$\frac{{M_{m,t} }}{{A_{m} }} + \frac{{M_{m + 1,t} }}{{A_{m + 1} }} + \frac{{M_{m + 2,t} }}{{A_{m + 2} }} + \ldots = 0 \, \qquad t = 1,2, \cdots ,N_{t}$$
(23)

Mass flow rates at both generation and non-generation gas load nodes are assumed to be constant during the scheduling horizon as follows:

$$M_{n,t} = M_{n,t + 1} \, \qquad t = 1,2, \cdots ,N_{t} - 1,n \in S_{GD} \cup S_{NGD}$$
(24)

where \(S_{GD}\) is the set of generation gas demand nodes.

In the gas network, mass flows and pressures should meet their upper and lower limits (25) and (26). Constraint (26) also includes limits on gas inlet pressures to gas-fired generators.

$$- M_{m}^{\hbox{max} } \le M_{m,t} \le M_{m}^{\hbox{max} } \qquad t = 1,2, \cdots ,N_{t}$$
(25)
$$\pi_{m}^{\hbox{min} } \le \pi_{m,t} \le \pi_{m}^{\hbox{max} } \qquad \, t = 1,2, \cdots ,N_{t}$$
(26)

A higher gas source pressure could potentially raise the operation cost of preceding compressor. Consequently, the aim is to search for minimal gas source pressures implemented at the start of scheduling horizon, while ensuring that inlet pressures of gas-fired generators can be kept within the required range during the pressure optimization period. The objective is to minimize pressures at source nodes, as shown in (27), where parameter \(\gamma_{s}\) is cost coefficient, \(\pi_{s,1}\) is the pressure at source node at t = 1.

$$\hbox{min} \text{ }\sum\limits_{s} {\gamma_{s} \pi_{s,1} }$$
(27)

In the gas source pressure optimization, the scheduling horizon is initially chosen to span the time period between two consecutive steady-state scheduling, i.e. 1 hour. If the pressure scheduling optimization is unfeasible, the scheduling horizon will be shortened to make the problem feasible, and the pressure optimization is repeated multiple times to cover the entire period of 1 hour.

Considering the natural gas dynamics, pressures and mass flow rates at the two ending nodes of a pipeline are different. Moreover, their values at time t may be different from those at time t + 1. Thus, 8 continuous variables \(\pi_{i,t}\), \(M_{i,t}\), \(\pi_{j,t}\), \(M_{j,t}\), \(\pi_{i,t + 1}\), \(M_{i,t + 1}\), \(\pi_{j,t + 1}\), and \(M_{j,t + 1}\) are needed to describe a pipeline with two end nodes i and j at two successive time points. The second-based scheduling optimization problem for the entire hour (i.e., 36 time points when considering 100 s for each time step) is formulated as an LP problem (20)–(27), which can be solved by CPLEX in one shot. For instance, for the test IEGS studied in Section 4, the second-based scheduling problem includes 4256 variables and 4218 equality constraints. The optimization problem calculates the minimal gas source pressures to ensure that inlet pressures of gas-fired generators will meet the operation requirements.

4 Simulation results

The IEGS shown in Fig. 3 is used to illustrate effectiveness of the proposed security-constrained integrated coordination scheduling framework. The IEGS is composed of a 15-node, 14-branch natural gas network and an IEEE 24-bus, 35-branch electricity network, as shown in Fig. 3. The natural gas system includes 2 sources at nodes 1 and 15, 4 non-generation sink at nodes 4, 7, 12, and 14, and 2 gas-fired generators (GG 1 and GG 2) at nodes 8 and 10. The natural gas network is coupled with electricity network by GG 1 and GG 2, in electricity network another 8 coal-fired generators CG 1-CG 8 are also included. The operating pressure range of gas-fired generators is [19.74, 20.00]bar. Active power flow limit of each transmission line is set as 250 MW.

Fig. 3
figure 3

Natural gas network and electricity network in IEGS

4.1 Case 1

In this study, the daily electricity demand peak occurs at 9th hour. Maximum mass flow rates of the two gas source nodes are set as 28 kg/s. The scheduling results of electricity generators during 8th–11th hour while considering electricity transmission N − 1 contingencies are given in Fig. 4. The balance between supply and demand of electricity power is kept strictly. The scheduling results of mass flow rates of natural gas are depicted in Fig. 5. Since upper limits on mass flow rates of gas sources are relative higher than the total gas demand, the balance between supply and demand of mass flow rates of natural gas can be well achieved.

Fig. 4
figure 4

Scheduling results of electricity generators considering transmission N − 1 contingencies in Case 1

Fig. 5
figure 5

Scheduling results of mass flow rates of natural gas considering transmission N − 1 contingencies and gas dynamics in Case 1

Figure 4 shows that due to higher electricity demand at 9th hour, power output of GG 2 at 9th hour has a sharp increase as compared to 8th hour. As a result, mass flow rates at gas source nodes are also raised significantly to meet the growing gas demand as shown in Fig. 5.

Figure 6 shows that at the beginning of each hour, the optimal pressure values at gas source nodes are reset. With the settings of scheduled gas source pressures, inlet pressures of gas-fired generators located at terminal nodes of pipelines can be maintained within the required range during the scheduled horizon and close to the required lower limits at the end of the horizon, which can ensure normal operation of gas-fired generators while also achieving the economic goal.

Fig. 6
figure 6

Scheduling results of natural gas pressures in Case 1

At 9th hour, among all the 35 electricity transmission lines, lines 24, 26, 28, and 29 are the top four heavily loaded lines in the normal operation. Active power flows through these four lines in individual N − 1 contingency scenarios are depicted in Fig. 7. It shows that in each of the four N − 1 contingency scenarios corresponding to outages of lines 24, 26, 28, and 29, power flow through one of these four top loaded lines approaches to its upper limit. This shows the effectiveness of the proposed security-constrained scheduling approach against N − 1 contingencies.

Fig. 7
figure 7

Active power flows through top four loaded lines at 9th hour in individual transmission N − 1 contingency scenarios in Case 1

4.2 Case 2

In this case, the maximum mass flow rate at gas source nodes is reduced to 26 kg/s. At 9th hour, this maximum gas source mass flow rate cannot meet the total generation and non-generation gas demands. As a result, no feasible solution can be achieved from the coordination scheduling model with electricity transmission N − 1 contingencies.

Considering that the linepack within gas pipelines can provide flexibility and reliability to the natural gas system, the scheduling of gas source pressures can help supply the desired mass flow rate to gas loads even when the balance between supply and demand cannot be achieved.

The scheduling results of natural gas pressures from 8th hour to 12th hour are depicted in Fig. 8. The scheduling results of mass flow rates of natural gas with N − 1 contingencies and gas dynamics are depicted in Fig. 9. At the beginning of 8th hour, 10th hour, and 11th hour, the increases in pressures at source nodes 1 and 15 are not very significantly, since the balance between supply and demand during those three periods can be achieved by solely scheduling mass flow rates at gas source nodes. On the other hand, as shown in Fig. 9, during the period 9th–10th hour, the total demand of mass flow rates is larger than its total supply. As a result, at the beginning of 9th hour, pressures at gas source nodes have to be raised to a much higher level to ensure the natural gas delivered to gas-fired generators with the required mass flow rates and pressure levels.

Fig. 8
figure 8

Scheduling results of natural gas pressures in Case 2

Fig. 9
figure 9

Scheduling results of mass flow rates of natural gas considering transmission N − 1 contingencies and gas dynamics in Case 2

Indeed, if improper scheduling of gas source pressures is implemented so that the required inlet pressures of gas-fired generators cannot be guaranteed, forced outages of gas-fired generators may occur. At 9th hour, when coal-fired generators work at their scheduled operating points while GG 1 is off due to the lower inlet pressure, active power flows through lines 1, 24, 28, and 29 in individual transmission N − 1 contingency scenarios are depicted in Fig. 10. As shown in Fig. 10, when line 24 fails, power flow through line 29 will significantly exceed its upper limit and the reliable operation of IEGS cannot be ensured.

Fig. 10
figure 10

Active power flows through top four loaded lines at 9th hour in individual transmission N − 1 contingency scenarios when gas-fired generator 1 is off

4.3 Case 3

In this case, the electricity demand at 9th hour is increased by 2% compared with Case 2. Owing to this, even if the pressures at gas source nodes are raised at the start of 9th hour to elevate the inlet pressure of gas-fired generator to its upper limit, inlet pressure of gas-fired generators cannot be maintained within its required range during the following 1 h due to the larger mass flow rate requirement. Consequently, in the gas source pressure scheduling optimization, the horizon is shortened to 0.5 h, i.e., the pressure scheduling optimization is repeated twice in this hour.

The scheduling results of natural gas pressures and mass flow rates are depicted in Figs. 11 and 12. As shown in Fig. 11, compared with Fig. 8, the gas source pressures become higher at the start of 9th hour to deal with the increased generation gas demand, and the pressure optimization scheduling is implemented twice during 9th–10th hour to ensure that inlet pressures of the two gas-fired generators are within the required range. The supply and demand imbalance of natural gas mass flow rate during 9th–10th hour still exists, and the mismatch is even larger than that in Case 2. Figure 13 further shows that power flows through all electric branches are kept within their safe ranges under individual transmission N − 1 contingencies.

Fig. 11
figure 11

Scheduling results of natural gas pressures in Case 3

Fig. 12
figure 12

Scheduling results of mass flow rates of natural gas considering transmission N − 1 contingencies and gas dynamics in Case 3

Fig. 13
figure 13

Active power flows through top four loaded lines at 9th hour in individual transmission N − 1 contingency scenarios in Case 3

5 Discussion

Detailed results of the three cases at 9th hour are listed in Table 1 for further discussion. In Case 1, the balance between supply and demand of mass flow rates can be achieved by adjusting mass flow rates of gas source nodes. In comparison, demand-supply mismatch occurs in both Cases 2 and 3, while the mismatch in Case 3 is more significant. Indeed, with a larger demand-supply mismatch, pressures at gas source nodes become higher. This phenomenon can be understood as follows. When the demand of mass flow rates from non-generation and generation cannot be satisfied due to the limit of mass flow rate on gas source, a higher pressure at the gas source node is needed in order to utilize the compressibility of natural gas for providing more linepack in the pipeline, aiming at maintaining pressures at gas-fired generator nodes within the required range. Moreover, in all the three cases, the maximum power flows through electricity transmission lines after N − 1 contingencies are within their limits, showing the effectiveness of the proposed approach.

Table 1 Comparison among three cases at 9th hour

6 Conclusion

In this paper, a coordination scheduling approach for IEGS is proposed, in which a security-constrained steady-state economic scheduling on power outputs of electricity generators and mass flow rates of natural gas sources with electricity transmission N − 1 contingencies is executed at hour timescale, followed by a second-based scheduling to optimize pressures of gas sources. The proposed scheduling approach can achieve the overall economic operation against electricity transmission N − 1 contingencies, while ensuring that the required natural gas pressures and mass flow rates can be supplied to gas-fired generators. The two optimizations represent distinguished time constants of the two systems. If the balance between supply and demand of mass flow rates cannot be achieved due to gas source flow constraints, pressure scheduling can be utilized to handle the mismatch while guaranteeing inlet pressures of gas-fired generators within the required operating range, which shows the flexibility provided by linepack to the IEGS. Otherwise, low inlet pressure of gas-fired generators can cause generator outages, and lead to unreliable operation of the IEGS by overloading electricity lines. In summary, the proposed approach offers a secure and economic solution to the coordination scheduling of IEGS with electricity transmission N − 1 contingencies.