1 Introduction

Currently, owing to their low prices and environment-friendly properties, gas-fired units (GFUs) have been widely used worldwide. For example, they accounted for \(42\%\) of the total installed capacity in the United States in 2015 [1]. Meanwhile, the development of power electronics and DC transmission technology enhance the capability of long-distance energy transmission [2]. Accordingly, interconnections and interactions between power system, DC connections, and natural gas systems are increasing rapidly. As a result, modern power systems have become an AC/DC and multi-energy coupled system, and any of them can have significant effects on the security operations of the system. Thus, the efficiency improvement of power utilization, accurate modeling, and stability analysis of multi-energy coupling systems are ongoing efforts. This paper aims to propose a unified optimal power flow (OPF) framework to improve the efficiency of power usage and the reliability of this multi-energy coupling system.

To date, two types of OPF problems have been formulated and solved to handle either AC grids coupled with gas networks or AC/DC power systems. The relevant works on these formulations are as follows:

  1. 1)

    Power/gas flow modeling for the power-natural gas integrated system

The power flow and gas flow models for the power-gas coupled system have been addressed in [3,4,5,6,7,8,9,10,11]. The basic steady-state optimal power flow model for AC grids integrated with natural gas infrastructures was elaborated in [3, 7]. In [5], the temperature effect in natural gas constraints was considered. To improve the model accuracy for long time-interval applications, a multiperiod probabilistic OPF model was designed and the role of power-to-gas units was studied in [4]. The transient gas flow model was combined with the steady-state power flow model to study the operational characteristics of the dynamic energy flow model of coordinated systems in [6].

  1. 2)

    Power flow modeling for AC/DC grids

The unified power flow model of the AC/DC grid incorporating multiterminal voltage source converter-high voltage direct current (VSC-HVDC) was proposed in [2, 12, 13]. In [12], a quadratic loss model for converters in VSC stations was adopted, while in [2], a linear loss model was utilized. Since the VSC-HVDC technologies are advantageous for wind power integration, a hierarchical security-constrained OPF was proposed in [14] and the Benders decomposition (BD) was used to handle the intermittent property of wind power generation. In [15], a multiperiod OPF for AC/DC grids with wind power integration was presented and a scenario-based (SB) approach was adopted to handle the uncertainty of wind energy.

  1. 3)

    Solution method for OPF problem

The power flow equations are nonlinear and nonconvex, which pose challenges to the traditional deterministic OPF using the interior-point method. Recently, the convexity of the OPF problem has piqued great research interest [16,17,18,19,20]. The primary idea is to transform the initial nonlinear/nonconvex problem into a convex one by using convex relaxations, such as the semidefinite relaxation and second-order cone relaxation. In [18], the OPF problem for AC/DC grids was converted to a second-order cone programming (SOCP). However, the sufficient conditions that guarantee the exactness of this convex relaxation are not discussed. This was solved by using the semidefinite programming (SDP) approach [19]. Although the SDP formulation achieves a more accurate solution than the SOCP, its computation efficiency is too low to render the practical application capability. In this sense, the SOCP formulation of the OPF appears to be promising.

Table A1 in Appendix A shows a statistical study of different OPF formulations in the electricity-gas coupling system, where Y and N denote whether the subject is being considered. Most related works focus on the interdependency between AC grids and natural gas systems or the interconnection between the AC and DC power systems; none have studied the OPF problem for AC/DC grids integrated with gas systems. Since practical modern power systems are coupled with both DC grids and natural gas systems, neglecting any of them may yield suboptimal solutions. More importantly, according to a report [1], the gas supply of gas-fired generators could suffer shortages during winter peak hours in some American regions. This is because the gas supply of GFUs does not prioritize the natural gas loads and once the GFU generation is curtailed, the thermal generators need to increase their active power generation to compensate the decrease in the GFU generation. Thus, the gas-supply uncertainty plays an important role in the schedule of thermal generators.

To solve the aforementioned problems, this paper presents a unified OPF model (master-sub-OPF, denoted as MS-OPF in this paper) for the AC/DC grid coordinated with gas systems, considering gas-supply uncertainties. Specifically, a two-stage BD-based optimization problem is designed to handle data uncertainties. In the first stage, the nonlinear OPF model for AC/DC grids is reformulated as a master problem and solved by a large-scale nonlinear programming solver, i.e., the interior-point optimizer (IPOPT). Nevertheless, the SOCP formulation for a natural gas system is considered a subproblem and is solved by a convex optimization solver, i.e., the Gurobi. It is noteworthy that each subproblem represents a gas-supply scenario; as a result, the effects of gas-supply uncertainty on GFUs can be evaluated. In addition, owing to the SOCP formulation of the subproblems, the original nonconvex and nonlinear formulation is transformed to a convex optimization problem and can be solved in polynomial time.

The remainder of this paper is organized as follows. In Section 2, the detailed nonlinear OPF model for the AC/DC grid is presented and an SOCP formulation of the natural gas system constraints is proposed. The solution method for the MS-OPF is elaborated in Section 3. In Section 4, the details of the simulation results performed on a modified AC/DC grid-natural gas coupled system is presented. Finally, Section 5 draws the relevant conclusions.

2 Problem formulation

In this section, the steady-state power (gas) flow models of AC/DC grids and the natural gas systems are introduced to determine the real-time schedule of both thermal power plants and gas-fired generators. Meanwhile, the gas loads and power demands are satisfied during the scheduling horizon. The following assumptions are made in our proposed formulation:

  1. 1)

    The steady-state model is adopted in both power systems and natural gas systems.

  2. 2)

    To convert nonlinear gas system constraints into SOCP forms, the natural gas systems are considered to be lossless, i.e., compressors are not considered. This is primarily because the gas consumption of compressors only accounts for a very small fraction of the total gas loads.

  3. 3)

    The power demands are unchangeable during the dispatch interval, which means only the uncertainty of natural gas systems was considered. It is noteworthy that uncertainties exist in both power systems and natural gas systems. However, if the power system and gas system uncertainties are considered simultaneously, the sensitivity of the optimal solution to gas system uncertainties may not be evaluated.

2.1 OPF model of AC/DC grids

2.1.1 Objective function

The OPF formulation for AC/DC grids aims at finding an optimized operational point by minimizing the following total generation costs:

$$\begin{aligned} \begin{aligned} \min {\left( \sum \limits _{i=1}^{N_t}{f_{i}^{G}}P_{i}^{G}+\sum \limits _{i=1}^{N_g}{f_{i}^{R}P_{i}^{R}}\right) } \end{aligned} \end{aligned}$$
(1)

where \({N_t}\) and \(N_g\) are the number of thermal generators and gas-fired generators,respectively; \(f_{i}^{G}\) is a quadratic function that represents the fossil-fuel cost function of thermal power plants; \(f_{i}^{R}\) is a linear function that represents the natural-gas forced cost function of GFUs; \(P_{i}^{G}\) is the active power generation of thermal generator i; \(P_{i}^{R}\) is the active power generation of gas-fired generator i. It is noteworthy that the gas-fired generators are supplied with low-priced natural gas.

2.1.2 Power flow models of AC/DC grids

Two couplings are present in the AC/DC grids: coupling between the AC grid and voltage source converter (VSC) stations, and coupling between the DC grid and VSC stations. Hence, the AC/DC grid power flow models can be divided into three interconnected parts: AC grid constraints, VSC station constraints, and DC grid constraints. The AC grid constraints can be expressed in the following rectangular form:

$$\begin{aligned}&P_{i}^{G}+P_{i}^{R}-P_{i}^{D}-P_{i}^{S} \nonumber \\&\quad = \sum \limits _{j=1}^{N_{\text {AC}}}{\left[ {{G}_{ij}}\left( {{e}_{i}}{{e}_{j}}+{{f}_{i}}{{f}_{j}} \right) -{{B}_{ij}}\left( {{e}_{i}}{{f}_{j}}-{{e}_{j}}{{f}_{i}} \right) \right] } \end{aligned}$$
(2)
$$\begin{aligned}&Q_{i}^{G}-Q_{i}^{D}-Q_{i}^{S}\nonumber \\&\quad =-\sum \limits _{j=1}^{N_{\text {AC}}}{\left[ {{B}_{ij}}\left( {{e}_{i}}{{e}_{j}}+{{f}_{i}}{{f}_{j}} \right) +{{G}_{ij}}\left( {{e}_{i}}{{f}_{j}}-{{e}_{j}}{{f}_{i}} \right) \right] } \end{aligned}$$
(3)
$$\begin{aligned}&P_{i,{\text {min}}}^{G}\le P_{i}^{G}\le P_{i,{\text {max}}}^{G} \end{aligned}$$
(4)
$$\begin{aligned}&Q_{i,{\text {min}}}^{G}\le Q_{i}^{G}\le Q_{i,{\text {max}}}^{G} \end{aligned}$$
(5)
$$\begin{aligned}&P_{i,{\text {min}}}^{R}\le P_{i}^{R}\le P_{i,{\text {max}}}^{R} \end{aligned}$$
(6)
$$\begin{aligned}&{{\left( {{V}_{i,{\text {min}}}} \right) }^{2}}\le e_{i}^{2}+f_{i}^{2}\le {{\left( {{V}_{i,{\text {max}}}} \right) }^{2}} \end{aligned}$$
(7)

where \(P_i^D\) and \(Q_i^D\) are the active/reactive power loads at bus i; \(P_i^S\) and \(Q_i^S\) are the active/reactive power transformed from AC grid to the \(i^{\text {th}}\) VSC station; \(Q_i^G\) is the reactive power generation of thermal generator i; \({N_{{\text {AC}}}}\) is the number of AC buses; \({G_{ij}}\) and \({B_{ij}}\) are the real/imaginary part of the AC grid admittance matrix; \({e_i}\) and \({f_i}\) is the real/imaginary part of the AC voltage.

If no generator is connected to bus i, the values of \(P_i^G\) and \(Q_i^G\) are 0 in (2) and (3). Rectangular coordinates are chosen because the Hessian matrix of the equality or inequality constraints will be constant, which is convenient for the interior-point-method-based solver.

To yield a more accurate power flow formulation, a precise steady-state VSC model is adopted. A VSC station includes a coupling transformer, an AC filter, a phase reactor, and a converter, as shown in Fig. 1 [21]. The converters are based on insulated gate bipolar transistor values that are controlled with pulse-width modulations. For simplicity, the VSC stations are assumed to have unified parameters of the transformer, the AC filter, and the phase reactor. Finally, a \({\text {Y-}}{\Delta }\) transformation is used to obtain the power flow formulations [12]. Thus, we can obtain a modified VSC station model as shown in Fig. 2.

Fig. 1
figure 1

VSC station model

Fig. 2
figure 2

Equivalent circuit of VSC station

The buses that connect the AC grid and VSC stations are called the points of common connections (PCCs). Using the notations in Fig. 2, an AC grid is assumed to inject active and reactive powers, \(P_i^S\) and \(Q_i^S\), respectively, into the VSC station. The converter can either absorb or inject active (reactive) power to the AC grid [18]. Moreover, the VSC can control \(P_i^S\) and \(Q_i^S\) by adjusting the modulation factor \({m_a}\) and the converter output voltage \(U_i^{\text {DC}}\). The power flow models of the VSC stations can be written into the following constraints:

$$\begin{aligned} \begin{aligned} P_{i}^{S}&=\left( e_{si}^{2}+f_{si}^{2} \right) \left( {{G}_{1c}}+{{G}_{2c}} \right) \\&\quad -\left[ {{G}_{1c}}\left( {{e}_{si}}{{e}_{ci}}+{{f}_{si}}{{f}_{ci}} \right) -{{B}_{1c}}\left( {{e}_{si}}{{f}_{ci}}-{{e}_{ci}}{{f}_{si}} \right) \right] \end{aligned} \end{aligned}$$
(8)
$$\begin{aligned} \begin{aligned} Q_{i}^{S}&=-\left( e_{si}^{2}+f_{si}^{2} \right) \left( {{B}_{1c}}+{{B}_{2c}} \right) \\&\quad +\left[ {{B}_{1c}}\left( {{e}_{si}}{{e}_{ci}}+{{f}_{si}}{{f}_{ci}} \right) +{{G}_{1c}}\left( {{e}_{si}}{{f}_{ci}}-{{e}_{ci}}{{f}_{si}} \right) \right] \end{aligned} \end{aligned}$$
(9)
$$\begin{aligned} \begin{aligned} P_{i}^{C}&=-\left( e_{ci}^{2}+f_{si}^{2} \right) \left( {{G}_{1c}}+{{G}_{3c}} \right) \\&\quad +\left[ {{G}_{1c}}\left( {{e}_{si}}{{e}_{ci}}+{{f}_{si}}{{f}_{ci}} \right) +{{B}_{1c}}\left( {{e}_{si}}{{f}_{ci}}-{{e}_{ci}}{{f}_{si}} \right) \right] \end{aligned} \end{aligned}$$
(10)

where \({{Y}_{1c}}\), \({{Y}_{2c}}\), and \({{Y}_{3c}}\) are the sets according to the \({\text {Y-}}{\Delta }\) transformation of the components in the VSC station. Their calculations can be found in Appendix B. In addition, the operating constraints are enforced as:

$$\begin{aligned}&e_{ci}^{2}+f_{si}^{2}\le {{\left( {{m}_{a}}U_{i}^{\mathrm {DC}} \right) }^{2}} \end{aligned}$$
(11)
$$\begin{aligned}&m_{a,{\mathrm {min}}}\le {{m}_{a}}\le m_{a,{\mathrm {max}}} \end{aligned}$$
(12)
$$\begin{aligned}&P_{i,{\mathrm {min}}}^{S}\le P_{i}^{S}\le P_{i,{\mathrm {max}}}^{S} \end{aligned}$$
(13)
$$\begin{aligned}&Q_{i,{\mathrm {min}}}^{S}\le Q_{i}^{S}\le Q_{i,{\mathrm {max}}}^{S} \end{aligned}$$
(14)
$$\begin{aligned}&{{\left( P_{i}^{S} \right) }^{2}}+{{\left( Q_{i}^{S} \right) }^{2}}\le S_{i,conv}^{2} \end{aligned}$$
(15)

where \({m_a}\) is the modulation factor; \(U_i^{\mathrm {DC}}\) is the DC voltage; \({S_{i,conv}}\) is the maximum capacity of VSC station.

In general, converters have active power losses. Since the VSC stations are installed with reactive power compensators, a quadratic function of the AC current magnitude to represent the active power losses of converters is proposed in [22]. Herein, a simplified power loss model shown in [2] is adopted, yielding

$$\begin{aligned} \begin{aligned} P_{i}^{C}-\beta P_{i}^{C}=P_{i}^{\mathrm {DC}} \end{aligned} \end{aligned}$$
(16)

where \(\beta\) is a constant represents the coefficient of active power loss in VSC station. To elucidate the coupling between the VSC station and the DC grid, we consider the linear equivalent circuit of a DC grid shown in Fig. 3. Using the notations adopted in the figure, the calculation of real power \(P_i^{\mathrm {DC}}\) and DC voltage \(U_i^{\mathrm {DC}}\) can be expressed as:

Fig. 3
figure 3

Equivalent circuit of DC grid

$$\begin{aligned}&P_{i}^{\mathrm {DC}}=U_{i}^{\mathrm {DC}}\sum \limits _{j=1}^{N_{\mathrm {DC}}}{\frac{U_{j}^{\mathrm {DC}}}{R_{ij}^{\mathrm {DC}}}} \end{aligned}$$
(17)
$$\begin{aligned}&U_{i}^{\mathrm {DC}}=U_{j}^{\mathrm {DC}}-\frac{P_{j}^{\mathrm {DC}}}{U_{j}^{\mathrm {DC}}}R_{ij}^{\mathrm {DC}} \end{aligned}$$
(18)
$$\begin{aligned}&P_{ij}^{loss}={{\left( \frac{P_{j}^{\mathrm {DC}}}{U_{j}^{\mathrm {DC}}} \right) }^{2}}R_{ij}^{\mathrm {DC}} \end{aligned}$$
(19)

It is noteworthy that the real power \(P_i^{\mathrm {DC}}\) of all DC buses are injections; thus, the power balance of DC grids can be expressed as:

$$\begin{aligned} \sum \limits _{i=1}^{N_{\mathrm {DC}}}{P_{i}^{\mathrm {DC}}}-\sum \limits _{\left( i,j \right) \in {{L}_{\mathrm {DC}}}}{P_{ij}^{loss}}=0 \end{aligned}$$
(20)

where \({N_{\mathrm {DC}}}\) is the number of DC buses; \({L_{\mathrm {DC}}}\) is the set of DC lines.

2.2 Natural gas system formulations considering gas-supply uncertainty

2.2.1 SOCP formulation of natural gas systems

A general natural gas system consists of gas producers, storage facilities, compressor stations, pipelines, and customers [7, 23]. In the steady state, pipelines and compressor stations can be modeled by branches, and the interconnection points can be represented by nodes in a network graph [23]. Furthermore, the steady-state gas flow through a pipeline is assumed to be the functions of the upstream and downstream pressures. Gas typically flows from the upstream node to the downstream node. For example, if the gas flows from node i to node j, we obtain:

$$\begin{aligned} {\left( {f_{ij}^k} \right) ^2} = C_{ij}^2\left[ {{{\left( {p_i^k} \right) }^2} - {{\left( {p_j^k} \right) }^2}} \right] \quad \quad f_{ij}^k > 0 \end{aligned}$$
(21)

otherwise,

$$\begin{aligned} {\left( {f_{ij}^k} \right) ^2} = C_{ij}^2\left[ {{{\left( {p_j^k} \right) }^2} - {{\left( {p_i^k} \right) }^2}} \right] \quad \quad f_{ij}^k < 0 \end{aligned}$$
(22)

where k is the index of scenarios; \(f_{ij}^k\) is the gas flow in pipeline \(\left( {i,j} \right)\); \(p_i^k\) is the gas pressure at node i; \({C_{ij}}\) is a constant determined by the length, diameter, absolute rugosity, and the gas composition of the pipeline [3]. Equations (21) and (22) are exactly in the form of a rotated quadratic cone by convex relaxations. For example, using convex relaxation, (21) can be rewritten as:

$$\begin{aligned} {{\left( f_{ij}^{k} \right) }^{2}}+{{\left( {{C}_{ij}}p_{j}^{k} \right) }^{2}}\le {{\left( {{C}_{ij}}p_{i}^{k} \right) }^{2}} \end{aligned}$$
(23)

Subsequently, we can obtain the SOCP formulation of gas flow models as follows.

If the gas flows from node i to node j, we have:

$$\begin{aligned} {{\left\| \begin{array}{ll} f_{ij}^{k} \\ {{C}_{ij}}p_{j}^{k} \\ \end{array} \right\| }_{2}}\le {{C}_{ij}}p_{i}^{k} \end{aligned}$$
(24)

otherwise,

$$\begin{aligned} {{\left\| \begin{array}{ll} f_{ij}^{k} \\ {{C}_{ij}}p_{i}^{k} \\ \end{array} \right\| }_{2}}\le {{C}_{ij}}p_{j}^{k} \end{aligned}$$
(25)

where \({\left\| {} \right\| _2}\) denotes the two norms. The gas-system nodal balance can be expressed as:

$$\begin{aligned} \sum \limits _{i = 1}^{{N_s}} {{\varvec{A}}{g_i}} - \sum \limits _{i = 1}^{{N_l}} {{\varvec{B}}L_i^k} - \sum \limits _{j \in \left( i \right) } {f_{ij}^k} = 0 \end{aligned}$$
(26)

where \(N_s\) is the number of gas suppliers; \(N_l\) is the number of gas loads; \({\varvec{A}}\) is the node-gas supplier incidence matrix; \({\varvec{B}}\) is the node-gas load incidence matrix; \({g_i}\) is the gas generation of gas supplier i; \(L_i^k\) is the gas load at node i.

Particularly, the gas loads at the nodes connected with gas-fired generators are stated as:

$$\begin{aligned} L_i^k = {\rho _g}P_{i}^{R,k} \end{aligned}$$
(27)

where \({\rho _g}\) is a constant represents the fuel function of gas-fired generator; \(P_{i}^{R,k}\) is the active power generated by the \(i^\mathrm{th}\) gas-fired generator in the kth scenario. Natural gas systems are also constrained by the operating limits:

$$\begin{aligned} f_{ij,{\mathrm {min}}}\,\le\, f_{ij}^{k}\,\le\, f_{ij,{\mathrm {max}}} \end{aligned}$$
(28)
$$\begin{aligned} p_{i,{\mathrm {min}}}\le p_{i}^{k}\le p_{i,{\mathrm {max}}} \end{aligned}$$
(29)
$$\begin{aligned} g_{i,{\mathrm {min}}}\le {{g}_{i}}\le g_{i,{\mathrm {max}}} \end{aligned}$$
(30)

2.2.2 Modeling of gas-supply uncertainty of GFUs

According to a report [1], the gas supply of GFUs could not be satisfied especially in areas where the gas demand occupies the major proportion of the total gas demand. In [11], the variability of gas pipeline capacities was adopted to represent the gas-supply uncertainty of GFUs. However, in practice, the gas pipeline capacities are typically fixed. Herein, the gas-supply uncertainties are represented by the day-ahead gas-load forecast errors. The latter is modeled by a normal distribution function, \({\varepsilon _L} \sim N\left( {0,{\sigma _L}} \right)\), where the standard deviation \({\sigma _L}\) is \(5\%\) for the gas-load forecast value. Subsequently, a set of possible scenarios representing gas-load variabilities can be generated by Monte Carlo simulations. Following that, the gas demands of the residential, commercial, and industrial customers (RCI) can be expressed as:

$$\begin{aligned} L_i^k = L_i^0 + \varepsilon _{L,i}^k \end{aligned}$$
(31)

where \(L_i^0\) is the day-ahead gas demand forecast; \(\varepsilon _{L,i}^k\) represents the forecast errors.

3 Solution methodology

The MS-OPF model proposed herein aims at finding an optimized schedule for thermal power plants and gas-fired generators under gas-load uncertainties. It is noteworthy that different scenarios of the natural gas system may affect the final solution of the MS-OPF. In this regard, the BD [24, 25] is adopted owing to its capability in handling uncertainties. Using the BD method, the MS-OPF is decomposed into a master problem, i.e., a nonlinear programming AC/DC OPF, and S subproblems, where each problem corresponds to a natural gas network load scenario.

First, the natural gas system operators would determine the schedule of gas sources and storages according to the gas-load forecast. However, because of the low cost and the environmental friendly characteristics of gas-fired generators, the full use of gas turbines is preferred. In other words, gas-fired generators are run at the maximum power, yielding the gas consumption of gas-fired generators shown in (27). Nevertheless, the detailed formulations of the master problem and subproblems are shown as follows.

  1. 1)

    Master problem (NLP)

    $$\begin{aligned}&{\mathrm {min}} \ \sum \limits _{i=1}^{N_t}{f_{i}^{G}}P_{i}^{G}+\sum \limits _{i=1}^{N_g}{f_{i}^{R}P_{i}^{R}} \end{aligned}$$
    (32)
    $$\begin{aligned}&{\mathrm {s.t.}}\ (2)-(20) \end{aligned}$$
    (33)
  2. 2)

    Benders cut

    $$\begin{aligned} {\omega _k} +\sum \limits _{i=1}^{N_g}{{{\lambda }_{i}^k}}\left( P_{i}^{R}-P_{i}^{R,k} \right) \le 0 \end{aligned}$$
    (34)
  3. 3)

    The \(k^{\text {th}}\) subproblem (SOCP)

    $$\begin{aligned}&{\mathrm {min}} \ {\omega _k} =\sum \limits _{i=1}^{N_g}{\left( u_{i,+}^{R}+u_{i,-}^{R} \right) } \end{aligned}$$
    (35)
    $$\begin{aligned}&{\mathrm {s.t.}}\ (24)-(31) \end{aligned}$$
    (36)
    $$\begin{aligned}&P_{i}^{R,k}=P_{i,*}^{R}+u_{i,+}^{R}-u_{i,-}^{R}:{\lambda _{i}^k} \end{aligned}$$
    (37)

where \(P_{i,*}^R\) is the solution calculated from the master problem; \(u_{i, + }^R\) and \(u_{i, - }^R\) are the auxiliary variables; \({\lambda _i}\) is the Lagrangian coefficient of (37).

The detailed procedures of adopting the BD method to solve the proposed formulation can be summarized in the following steps.

Step 1: Solve the master problem, i.e., the real-time OPF problem for AC/DC grids. For a large-scale nonlinear programming (NLP) problem, this paper adopted the IPOPT [26] to obtain the solution of \(P_{i,*}^R\).

Step 2: Check the feasibility of subproblem 1, which is based on gas-load scenario 1, and substitute \(P_{i,*}^R\) into the subproblem (as referred to in (37)). Since the gas flow constraints have been transformed into SOCP formulations, we use the Gurobi [27] to calculate this convex optimization problem and obtain the optimized solution of \({\omega _1}\).

Step 3: If \({\omega _1} = 0\), go back to Step 2 and check the feasibility of the \(2{\mathrm {nd}}\) subproblem until the termination criteria is validated for all subproblems. Otherwise, add the Benders cut (34) constraint to the master problem and go to Step 1; subsequently, recalculate the solution of \(P_{i,*}^R\) and check the feasibility of the next subproblem.

Step 4: Once each of the total S subproblems is feasible, output the optimized schedule of the thermal generators and GFUs. It is noteworthy that the coordinated system is dispatched according to different gas demand scenarios.

The maximum order of constraints in the master problem is two, and they are calculated in parallel. If the bus number of the AC grids is n, the time complexity of the NLP model is \(\mathrm{O}( {{n^2}})\). Nevertheless, all the constraints in the subproblem are linear and can be calculated in parallel. If the gas node number is m, the time complexity of the SOCP model is \(\mathrm{O}( m )\). In summary, the time complexity of the solution algorithm is \(\mathrm{O}( {{n^2}} )\). Although the master problem can be simplified to be linear as well, the guarantee of computational accuracy for practical applications may be difficult.

4 Case studies

4.1 Test systems

The proposed MS-OPF was tested on a benchmark AC/DC grid coupled with a natural gas system. The overall system is shown in Fig. 4, which consists of a modified version of the IEEE 118-bus test system and the Belgium 20-node gas network. As shown in Fig. 4, some AC lines in the IEEE 118-bus system are substituted for the multi-terminal HVDC systems. There are 54 generators in total. To interconnect the two systems, thermal generators G10, G24, G25, G27, and G87 of the IEEE 118-bus system are replaced by gas-fired generators, and these generators are connected to nodes 16, 9, 6, 4, and 12 of the natural gas system, respectively. The total active power loads decreased to 2000 MW/h; the capacity of each gas-fired generator is 100 MW, while the remaining 49 thermal power generators’ maximum active power outputs are modified to 50 MW. In this condition, the GFUs account for approximately 1/6 of the total power generation capacity. The remaining detailed information of the IEEE 118-bus test system, including the power cost functions and the variables’ boundaries can be obtained from the MATPOWER library [28].

As for the DC part of the modified system, six DC buses are available, namely DC1, ..., DC6, which are connected to AC buses 33, 39, 40, 62, 65, and 81 through the VSC stations, respectively. The nominal value of the DC voltage is assumed to be 320 kV and the resistances of all HVDC lines are 0.06 pu. The parameter settings of the VSC station are shown in Table 1. The slack bus of the DC network is DC3 and the reference DC voltage \(U_3^{\mathrm {DC}} = 0.98\); the reference bus of the AC grids is bus 69. Although the converters in the AC/DC grid can have various control modes, this paper only considers the boundary condition on the converter-controlling variables.

Table 1 Parameter settings of VSC station

Nevertheless, for simplicity, the parallel pipelines of the Belgian 20-node natural gas system are modeled as a single equivalent pipeline. The total forecasted RCI gas loads are changed to 50 \({\mathrm {mm}}^3/{\hbox {h}}\). The gas fuel capacities of gas suppliers at nodes 1, 2, 5, 8, 13, and 14 are 18, 16, 9, 27, 7.5, and 7.5 \({\mathrm {mm}}^3/{\hbox {h}}\), respectively. The gas fuel cost of gas storages at nodes 2, 5, 13, and 14 is 210 \({\$}\)/h and that of gas sources at nodes 1 and 8 is 250 \({\$}\)/h. \({\rho _g}\) shown in (27) is 0.05 in the simulation. The nodal pressure bounds and the pipeline maximum capacities can be found in [23]. All tests are carried out on a PC (Intel i5-4210 Quad Core CPU, 2.90 GHz, 4-GB RAM). The problems are conducted on the Yalmip [29] platform built in MATLAB.

4.2 Simulation results and analysis

Based on the test system information shown in Section 4.1, Case 1 is designed to demonstrate the computational performance of the SOCP formulation for gas systems. The effect of gas-load uncertainties on the coordinated systems’ operation is studied by comparing Case 2 with Case 3.

Fig. 4
figure 4

AC/DC grid coordinated with natural gas systems

Case 1: Optimizing gas flow (OGF) of the Belgian natural gas system to determine the most economical schedule of gas suppliers. The SOCP formulation of the OGF proposed herein is compared with the NLP formulation of the OGF model adopted in most published papers [3, 8]. The NLP formulation is solved by the IPOPT and the SOCP formulation is solved by the Gurobi. The simulation results are shown in Table 2 and Table 3.

Table 2 Simulation results of Case 1
Table 3 Gas suppliers output in Case 1

These results indicate that the computation time of the SOCP formulation is much shorter than that of the NLP models. In addition, we found that to obtain the lowest gas fuel cost, the gas storages of nodes 2, 5, 13, and 14 have to account for more gas supply. The mismatch in the gas suppliers’ generation schedule in the two formulations is primarily because the SOCP formulation transforms the initial NLP problem into a convex optimization problem, and the global optimal solution can be found. By contrast, the non-convex NLP problem only obtains the local optimal solution.

Case 2: The test for a deterministic OPF of the AC/DC grid integrated with the natural gas system, i.e., optimizing the schedule of generators and gas sources simultaneously but the gas-load uncertainties are not considered. This case was solved by the IPOPT solver.

Case 3: The test for the two-stage MS-OPF considering the gas-system uncertainty.

The optimized schedule of the gas suppliers and GFUs are shown in Table 4 and Table 5.

Table 4 Optimized generation of gas suppliers
Table 5 Optimized generation of GFUs (\(\mathrm{{MW/h}}\))

The total system operation cost is \(6.4045 \times {10^4}\,{{\$ /{\hbox {h}}}}\) and \(6.6888 \times {10^4}\,{{\$ /{\hbox {h}}}}\) for Case 2 and Case 3, respectively. This indicates that when the gas-load uncertainties are considered, the proposed MS-OPF offers a higher system operation cost than by optimizing the coordinated system simultaneously. This is because the gas-load variability may cause the supply shortage of gas-fired generators, and thermal generators are forced to provide more power to meet the electricity demands. As shown in Table 5 and Case 2, if the gas supply for GFUs is sufficient; as a result, gas-fired generators would run at their maximum capacities as their operation costs are much lower than those of thermal generators. In Case 3, the gas supply for the GFUs is constrained owing to the uncertainty of gas demands, resulting in the reduced generation of GFUs.

Fig. 5
figure 5

Active power generation of thermal generators

Fig. 6
figure 6

Gas flow in pipelines

It is noteworthy that once the gas suppliers’ schedule is determined, it is fixed for hours since the gas transmission is very slow. Hence, when gas loads are increased in a short time, such as during winter, the GFUs will experience supply shortages, yielding power system security problems. Furthermore, as observed from Fig. 5, the thermal generators in Case 3 increase their generation to provide additional power owing to the decrease in GFU generation compared to Case 2. These results indicate that if the gas-load uncertainty is not considered when the generator schedules are developed, once the GFU gas supply is not sufficient, the thermal generators would not satisfy the current power demand and the power system security is threatened. Thus, the proposed MS-OPF ensures the balance between the supply and demand of the integrated system and reduces the variability impact in natural gas systems on the safety of power systems.

In addition, Fig. 6 shows that the gas flow in pipelines is redistributed when the gas-load uncertainty is considered. It is noteworthy that the additional flexibility provided by VSC stations and DC connections does not vary consistently in the optimal solution of the two cases. This is primarily due to the action of the storage devices included in the gas network, which effectively decouples the gas operation from the power grid. Clearly, the higher the control capability of the electrical system, the lower the topological changes.

4.3 Sensitivity analysis

The sensitivity of the thermal generators’ active power generation with respect to the proportion of the GFUs’ generation in total active power generation, and the gas-load uncertainty is discussed in this section. The sensitivity index is defined as:

$$\begin{aligned} {\Delta } P = \left| {\frac{{{P_G} - {{{\bar{P}}}_G}}}{{{{{\bar{P}}}_G}}}} \right| \end{aligned}$$
(38)

where \({\Delta } P\) is the sensitivity index for the thermal generators; \(P_G\) is the total power generation of thermal generators considering the gas-load uncertainty; \({{{\bar{P}}}_G}\) is the total power generated by the thermal generators without considering gas-load uncertainty.

The simulation results are shown in Fig. 7, where the X-axis represents the proportion of the GFUs’ generation in the total power generation. The different-colored lines represent the different standard deviations of the gas-load forecast errors (i.e., the percent of gas-load forecast value). The greater the standard deviation, the higher is the degree of the gas system uncertainty. The amount of the thermal generators’ generation adjustment is found to be proportional to the gas system uncertainty level. Thus, the gas-load uncertainties are to be considered in the presence GFUs.

Fig. 7
figure 7

Sensitivity analysis

4.4 Evaluating robustness of proposed method

In this section, to evaluate the robustness of the solution obtained by the BD technique in Case 3, we utilize the scenario-based approach [15, 30] to solve the OPF problem of the test system considering gas-load uncertainty. The probability distribution function of gas load is assumed to be a normal distribution and the mean value of the RCI gas loads is 50 \({\mathrm {mm}}^3/{\hbox {h}}\), while its standard deviation is 2.5 \({\mathrm {mm}}^3/{\hbox {h}}\). We generate nine scenarios for comparison, and the results are shown in Table 6.

Table 6 Gas load scenarios

Table 6 shows that the expected value of the total system operation cost calculated by the SB approach is 64702 \({\$}\)/h, which is lower than 66888 \({\$}\)/h obtained by the BD method. Comparing with the SB method gives variable optimized solutions; the BD approach adopted in this paper gives an appropriate schedule plan for power system operators.

5 Conclusion

This paper presents a unified OPF model of AC/DC grids integrated with natural gas systems for real-time scheduling of power systems. The formulation is designed as a two-stage stochastic optimization problem to study the effect of gas-supply uncertainties on the final optimization solutions. The salient features of the proposed approach are summarized as follows:

  1. 1)

    The SOCP formulation of the OGF problem proposed herein can effectively improve the computational efficiency for solving the subproblem.

  2. 2)

    Although the total fuel cost poses a slight increase when the gas-load uncertainties are considered, thermal generators are able to increase their generation to mitigate the variability of gas demands. Thus, the proposed MS-OPF provides a tradeoff between economy and safety.

  3. 3)

    The thermal generators’ adjustment of power generation shows a positive correlation with the proportion of GFUs in the total power generation and the uncertainty degree of the gas supply.

The technological progress in power-to-gas (PtG) has made the power and natural gas systems more closely linked, while the integration of renewable energy resources causes security problems to the power system. For future work, the authors plan to study the static stability of power-gas bidirectional coupled systems with renewable resource penetration.