Two-Stage Stochastic Scheduling of Integrated Electricity and Natural Gas Systems Considering Ramping Costs With Power-to-Gas Storage and Wind Power

Power-to-gas (P2G) facilities and natural gas fired power units provide flexibility to integrated electricity and natural gas systems (IENGS) for wind power accommodation and ramp deployment. This paper proposes a stochastic coordinated scheduling model for IENGS considering ramping costs with P2G storage and wind power. The operation model of natural gas system with P2G is presented, and the benefits of P2G integration are analyzed. To address the uncertainties of wind power and energy loads, multiple representative scenarios are generated. The flexible ramping requirements and costs are incorporated and analyzed, and flexible ramp can be provided by P2G in this work. The coordinated scheduling model for IENGS is formulated as a two-stage stochastic programming problem, in which day-ahead scheduling for electricity systems is modeled in the first stage model and scheduling of natural gas systems is carried out in the second stage model. Numerical case studies on a modified PJM 5-bus electricity system with a 7-node natural gas system and the IEEE 118-bus system with a 20-node Belgian natural gas system verify that P2G can help accommodate wind power, provide additional flexible ramping capacities, and reduce the gas supply from gas suppliers and gas load shedding.


INTRODUCTION
In the last decade, the use of natural gas for power generation has increased significantly throughout the world (Zhang et al., 2020). The growth of natural gas-fired generation increases the interaction between electricity systems and natural gas systems Chaudry et al., 2014), and, together with renewable generation, makes the operation of electricity systems more environmentally friendly (Zhang et al., 2016).
In integrated electricity and natural gas systems (IENGS), the integration of large-scale intermittent and uncertain renewable energy brings major challenges to the operation of the electricity system. Curtailment of renewable energy frequently occurs due to the lack of system flexibility. As the variability increases, fastramp thermal units can provide flexible ramp deployment to maintain power balance (Wang et al., 2008). The fast ramping capacities of gas-fired generation units can provide operational flexibility (Baldick, 2014).
In (Zhang et al., 2016) and , stochastic day-ahead scheduling and security-constrained unit commitment models are proposed, respectively, and the flexibility and quick ramping capability of gas-fired generation units demonstrate the possibility of firming the variability of wind power when it is constrained by the natural gas network.
Power-to-gas (P2G) technology can achieve the conversion of electric energy to hydrogen or synthetic natural gas (SNG). Gas-fired generation units and P2G facilities realize bidirectional coupling of IENGS (Clegg and Mancarella, 2016;He et al., 2017). P2G technology is treated as a promising approach to realize high penetration of renewables and low carbon emission in (Li et al., 2017a;Yang et al., 2019). The electricity consumption of P2G can reshape the load profile, reducing wind power curtailment in valley periods and the load difference between peak and valley periods. The SNG produced as a result can then be stored or utilized in the gas network. Some existing publications have studied the operation strategy for P2G. Day-ahead scheduling of P2G storage is studied in (Khani and Farag, 2018), in which P2G storage is optimally scheduled in both electricity and gas markets. In (Clegg and Mancarella, 2015), a methodology to investigate various P2G processes is proposed and their impacts on electricity and gas networks are analyzed. In (Alkano and Scherpen, 2018), the coordination of supply from P2G facilities is studied based on a model predictive control approach. The above works verify that P2G with storage can reduce renewable energy curtailment and that P2G can play a role in the operation of natural gas systems. P2G can also help ramp by regulating the amount of consumed electricity energy. However, the benefit of P2G on flexible ramp deployment has not been considered in the existing works.
Variability and uncertainty of large-scale wind power can be handled by ramping capacities of thermal units, including gas-fired generation units. The fast ramping capability of gas-fired units makes them an important resource for providing flexibility and addressing uncertainties in a power system. Thus, the natural gas network needs to be optimally scheduled to ensure an available fuel supply for the gas-fired units to address any realization of uncertain scenarios. Moreover, the ramping costs should be included. The existing works on coordinated optimal operation of IENGS mainly focus on integrated planning Zhang et al., 2016), day-ahead scheduling (Liu et al., 2010;Alabdulwahab et al., 2015;Bai et al., 2016;He et al., 2017), unit commitment (Wang et al., 2008), and reserve scheduling (Liu et al., 2019). However, the optimal scheduling of natural gas system is barely considered.
To bridge these gaps, a coordinated stochastic scheduling model of IENGS with P2G and wind power is proposed in this paper. The primary goal of this work is to carry out coordinated stochastic optimal scheduling of IENGS utilizing P2G storage to promote wind power integration and reduce ramping costs for electricity systems. The major contributions are summarized as below.
(1) Compared to the work in (Li et al., 2017b), the coordinated scheduling model is formulated as a two-stage stochastic programming problem. Uncertainties of wind power, electricity loads, and natural gas loads are considered. Dayahead stochastic scheduling of electricity systems is carried out in the first stage to determine the gas loads of gas-fired generation units and produced SNG of P2G for all scenarios, which are utilized in the second stage optimization model. Stochastic scheduling of natural gas systems is modeled in the second stage model to check the feasibility of natural gas transmission for all scenarios and optimally schedule the gas supply and P2G storage. The two stage models are formulated as a linear programming (LP) problem and a mixed-integer linear programming (MILP) problem, respectively. (2) The benefits of the integration of P2G storage for IEGNS are analyzed in this paper. For electricity systems, a P2G facility can regulate its power consumption to change the electricity load profile to reduce wind power curtailments and ramping costs. For natural gas systems, the produced SNG in P2G storage can participate in the operation of natural gas systems to reduce the gas consumption from natural gas suppliers and help reduce gas load shedding, especially for loads of gasfired generation units under uncertain scenarios. (3) Flexible ramping requirements and costs are analyzed and presented. Ramping costs are considered, and flexible ramps can be provided by P2G storage. Natural gas network constraints with P2G storage are considered, and an evaluation of the optimal scheduling of gas suppliers and storage is conducted.
The rest of this paper is organized as follows. In Natural Gas Networks Model With Power-to-Gas Storage, a model of a natural gas network with P2G is presented. Uncertainties of Wind Power Sources and Energy Loads and Flexible Ramp presents the uncertainties of wind power, energy loads, and flexible ramps. In Stochastic Coordinated Scheduling Model, the stochastic day-ahead scheduling model is formulated, and the solution approach is proposed. In Case Studies, case studies are conducted to demonstrate the effectiveness of the model. Concluding remarks are presented in Conclusion.

Natural Gas Network
In natural gas systems, the network consists of gas wells (gas suppliers), pipelines, storage, and compressors. The majority of natural gas is produced from gas wells. The gas supply S j from gas wells is limited by upper and lower boundaries S j,max and S j,min , as shown in Eq. 1: The pipeline flow F mj relates to pressures of node m and j in Eq. 2 and the nodal pressure is constrained in Eq. 3: where sgn () represents sign function, which shows gas flows from a high pressure node to a low pressure node. The compressor can be driven by power from the electricity power grid (Li et al., 2017b). The power consumption is: Power-to-Gas Process P2G facilities are suppliers in natural gas systems and loads in electricity systems. SNG produced by P2G facilities can be stored for use in later scheduling periods. Faster ramping rates of P2G facilities with the technology of a proton exchange membrane (PEM) can better follow power fluctuations (Grond et al., 2013;Clegg and Mancarella, 2015). In this paper, the motivation behind studying P2G and the benefits of considering P2G can be summarized as follows: (1) From the perspective of wind power accommodation, P2G can reduce wind power curtailment by increasing electricity load. In valley electricity load periods, thermal power units cover a large portion of the power load due to lower output limits and spinning reserve constraints, resulting in a heavy curtailment of wind power. P2G can utilize the surplus wind power to generate SNG.
(2) The power consumption regulating ability of P2G can provide additional flexible ramping capacities to account for power fluctuations and uncertainties. During periods in which thermal units should ramp down dramatically to follow power load and wind power fluctuation and uncertainty, P2G can increase load values and hence reduce ramping requirements. (3) The SNG generated by P2G can be utilized in a natural gas system to reduce gas consumption from natural gas suppliers and may help to reduce gas load shedding when the P2G storage is integrated at certain nodes. The operation constraints of P2G are stated as Eqs 6-8 S P2G,t,gas E P2G,t,gas HHV gas (7) 0 ≤ S P2G,t,gas ≤ S max P2G,gas The energy conversion process of P2G can be described by Eq. 6, and volumetric quantity is calculated by Eq. 7. The hourly produced SNG should be positive and limited by the upper bounds in Eq. 8.

UNCERTAINTIES OF WIND POWER SOURCES AND ENERGY LOADS AND FLEXIBLE RAMP
In this section, uncertainties of wind power, electricity loads, and natural gas loads are represented by a set of scenarios. The flexible ramping requirements and costs are also analyzed.

Wind Power and Energy Loads Uncertainty and Sampling Method
Uncertainties of wind power, electricity loads, and natural gas loads with inevitable forecasting errors are modeled based on probability distribution functions. Normal distribution function has been utilized to obtain hourly wind power and energy load forecasting errors.
To simulate the uncertainties of wind power and electricity and natural gas loads, the Monte Carlo method is utilized to generate proper number of uncertain scenarios. Large numbers of scenarios would increase the computation burden, and scenario reduction techniques should be utilized. The scenario reduction algorithms would determine a scenario subset and assign new probabilities to the preserved scenarios. In this paper, the SCENRED tool in the General Algebraic Modeling System (GAMS) is executed for scenario reduction process, which contains several reduction algorithms. In this paper, fast backward reduction method is employed. The probabilities for all generated scenarios before reduction are assumed to be the same, with a cumulative sum equal to one (ΣPs 1). After reduction, smaller number of scenarios would be obtained with corresponding probabilities.

Flexible Ramping Requirements and Costs
Controllable thermal power units in traditional power systems are adjusted to follow load fluctuations. However, the integration of renewable energy sources (RES) increases variability in power system operation. The net load, which equals to total load minus total available RES generation, is more volatile and requires more ramping capability from thermal units between operating periods in case of power imbalance. Moreover, the forecasting errors of loads and RES should also be balanced by upward and downward flexible ramping of thermal units. Hence, the flexible ramping requirements of thermal units include the following two parts: • Flexible ramping requirements must follow hourly net load fluctuation. Thermal generation units ramp up/down to follow net load fluctuation between scheduling periods. The more volatile the net load is, the more ramping requirements are expected. The ramping capacity of a thermal generation unit is constrained by its ramping rate and minimum/maximum output limits. In the dayahead electricity market, the flexible ramping offer is included in a generator's offer and cleared at the bidding prices of up/down ramping together with the energy offer (Wu et al., 2015). The costs for flexible ramping between adjacent scheduling periods are calculated as: • Flexible ramping requirements must guarantee secure operation under uncertainties of load and RES, as represented in the uncertain scenarios. In each scenario, a ramping cost similar to that of the base case is considered. Moreover, flexible ramping can ensure a transition from the scheduled operation status of the base case to all possible scenarios. The feasible corrective dispatch of thermal units from the base case to all possible scenarios ensures the power balance, but the ramp offer should be optimally determined and allocated. The corrective ramping costs are calculated as: The bidding prices of flexible ramping are assumed to be the same as up and down ramping costs in the base case.
The total ramping costs are shown as: Remark 1: Natural gas-fired units can provide operational flexibility through their fast-ramp capacities. However, the power output of gas-fired units relates to natural gas consumption, which is constrained by the limits of the natural gas network. So the flexible ramp provided by natural gas-fired units is also constrained, especially in peak natural gas load periods. In these periods, heavy nodal loads lead to violations of the natural gas network, such as the nodal pressure of an end node of long pipeline falling below its lower limit.

STOCHASTIC COORDINATED SCHEDULING MODEL
In this section, the proposed two stage stochastic scheduling model is formulated.

First Stage Model
The objective function of the first stage stochastic scheduling model for electricity system is to minimize the expected operation cost of the electricity system, including electricity bidding costs, wind power curtailment costs, ramping costs and P2G operation costs, as shown in Eq. 12.

Objective Function
P i,t,gas η G2P GL m,t,gas GL m,t,gas ≤ GL m,max

Second Stage Model
In the second stage, the stochastic scheduling for natural gas systems is carried out based on the scheduling results of the first stage model. The hourly gas loads (including those of gas fired power units) are optimally allocated among different gas suppliers according to various bidding prices. Moreover, P2G storage can participate in the optimal operation of natural gas systems. The storage can charge gas flow from the P2G process and gas network and discharge it as gas supply.

Objective Function
The objective function of the stochastic scheduling model of natural gas systems is to minimize the expected purchasing costs. The objective function is formulated as: min Ns s 1 Ps × T t Nj j C j,gas S j,t + C ls Ls t (23)

Constraints
Constraints Eqs 1-5 in each scenario s: Natural gas balance: Eq. 25 gives the calculation of state of charge (SOC) of P2G storage. S s P2G,t is the exchanged gas flow of P2G storage to the natural gas network. The positive values correspond to discharging flow and the negative values correspond to charging flow. 26 and 27 state the upper and lower limits of the SOC and charging and discharging flow, respectively. ST Res P2G,t is added to set the lower and upper bounds of the SOC at a value that leaves reserves. Eq. 28 gives the initial SOC of P2G storage. The SOC of t 24 should meet or exceed the initial SOC if it is to be used in the next scheduling horizon.
To handle the nonlinear constraints of natural gas pipeline flow, the linearization method of our previous work (Li et al., 2017b) is introduced in this paper, and the second stage scheduling model can be formulated as a MILP problem.

Solution Approach
The flow chart of the solution approach for the proposed stochastic scheduling model is shown in Figure 1. Major steps of this method are summarized as follows.
Step 1: Input data of networks, wind power and energy loads in IENGS. The initial stochastic scenarios are generated by Monte Carlo. In this paper, the SCENRED tool in the GAMS is applied to perform scenario reduction to reduce computation burden (GAMS/SCENRED Documentation, 2002), and the fast backward reduction method is employed.
Step 2: Solve the first stage stochastic scheduling model of the electricity system considering P2G and ramping costs, which is formulated as a LP problem and solved to obtain gas demand of gas-fired power units and SNG produced by P2G.
Step 3: Solve the second stage stochastic optimal scheduling model of natural gas systems, which is formulated as a MILP problem and the variable of virtual load shedding of natural gas is introduced to ensure that the second stage scheduling problem is feasible. Step 4: Given the results, if the load shedding results of gas-fired units are not equal to 0, the gas demand of gas-fired units would be modified based on the load shedding results and added into the first stage model with fixed values.
Step 5: The first stage model would be resolved until the load shedding results of gas-fired units in the second stage model equal to 0, and the results would be output and analyzed.
Remark 2: It's noted that the modified gas demand of gas-fired units would lead to different scheduling results of P2G. To ensure the operation feasibility of P2G storage in a natural gas network, the created reserve margin ST Res P2G,t is utilized to balance the gas flow mismatches.
The scheduling model is implemented in GAMS, and the LP and MILP optimization models are solved utilizing CPLEX.

CASE STUDIES
In this section, the proposed day-ahead stochastic scheduling model is performed on a PJM 5-bus power system integrated with a 7-node natural gas system and on the IEEE 118-bus power system with the Belgian natural gas system.

PJM 5-Bus System
Figure 2 provides a diagram of the utilized IENGS network including a PJM 5-bus power system integrated with a sevennode natural gas system, in which the generation capacities and bidding prices are also shown. The ramping bids factor is 20%, which means ramping bids are 20% of bidding prices of thermal units. A wind farm with a capacity of 400 MW is installed at Bus A, and the bidding cost is set to $8 per MW. The P2G operation cost coefficient is $2 per MW and the wind power curtailment cost coefficient is $60 per MW. Unit one and two at Bus A are assumed to be gas-fired power units, which are integrated at NG one and three in the natural gas network. The residential and industrial natural gas load is distributed to three load buses. The detailed parameters of the natural gas system can be found in (Liu et al., 2009). The initial state of P2G storage is 2300 kcf. The up and down spinning reserve requirements are 0.1 of hourly forecasting electricity load. The forecasted output of wind power and energy loads (including residential natural gas loads and electricity loads) are shown in Figure 3. The wind power and energy loads forecasting errors are simulated by 1,000 scenarios generated by Monte Carlo simulation. The number of scenarios is reduced to seven in GAMS. To verify the impact of P2G on the scheduling results of IENGS, the following two cases are conducted: Case 1: Stochastic scheduling with P2G and storage. Case 2: Stochastic scheduling without P2G but with storage. The gas storage is integrated in the natural gas system.
The scheduling results of the two cases are compared to illustrate the impact of P2G on the electricity system and the natural gas system, respectively.

Impact of Power-to-Gas on Electricity System
The impact of P2G on electricity systems primarily assists in wind power accommodation and provides additional flexible ramping capacities to account for power fluctuations and uncertainties by increasing electricity load in certain periods. The results of scheduled wind power and the electricity consumed by P2G in Case 1 and 2 in the base case are compared in Figure 4. As depicted in Figure 4, more wind power is scheduled in Case 1 in periods 1, 2, 4-6 and 22 compared to Case 2. It can be seen that in those periods, which are off-peak hours, the P2G facility consumes power to increase electricity load and more wind power can be utilized in Case 1, while wind power would be curtailed in Case 2. The results verify that P2G can reduce wind power curtailments and aid wind power accommodation.
It should be noted that in periods 7 and 16 in Figure 4, the utilized wind power is the same in Case 1 and 2, but P2G facility consumes a certain amount of electricity. The reason is that the flexible ramping cost is considered in the proposed scheduling model, and in these periods P2G can provide additional flexible ramping capacities to reduce ramping costs. Moreover, electricity load by P2G can flatten the net load profile by reducing the difference between peak and valley net loads, which also reduces the ramping requirements across the scheduling horizon. A comparison of net load profiles in Case 1 and 2 is shown in Figure 5. Hourly net load in Case 1 equals to fixed electricity load plus the electricity load of P2G and minus wind power forecasting value, while Case 2 does not include a P2G electricity load. The net load curve in Case 1 fluctuates between a smaller range than the Case 2 curve. The difference between peak and valley loads is reduced from 842.86 to 642.86 MW. The above results show that a P2G facility can provide additional flexible ramping capacities and flatten the net load profile.
To further demonstrate the impact of P2G on the scheduling of electricity systems, a comparison of the scheduling results of Case 1 and 2 is shown in Table 1. Comparing Case 1 and 2, the expected total cost in Case 1 is reduced to $8.24 * 10 5 from $9.06 * 10 5 of Case 2. The expected ramping cost in Case 1 is lower than that of Case 2, which demonstrates that P2G can help reduce the ramping cost. The wind power utilization rate in Case 1 is increased 13.8% compared to Case 2.
The above results illustrate that integration of P2G facility can reduce wind power curtailment and provide additional flexible ramping capacities to reduce ramping costs for electricity systems.    Impact of Power-to-Gas Storage on Natural Gas Systems A P2G facility generates SNG utilizing electricity energy, and the obtained SNG can be stored in P2G storage. The storage can be scheduled as either load or supply. To verify the impact of P2G storage on natural gas systems, the following case (Case 3) is conducted: Case 3: Stochastic scheduling without P2G and storage.
The comparison of scheduling results of natural gas systems for Case 1-3 is listed in Table 2. It shows that the expected production cost in Case 1 will be decreased by almost $1,000, and the expected total supply from gas wells will be decreased 400 kcf if P2G is considered. SNG from P2G decreases the supply from gas wells. Note that the expected costs and supplies in Case 2 and 3 are almost the same because no other gas supply (P2G) is integrated, but more gas load shedding occurs in Case 3. Case 1 features the least gas load shedding, while Case 3 features the most because gas storage can regulate the gas load by charging and supply nodal loads by discharging during the scheduling horizon. SNG from P2G in storage can supply nodal gas loads, replacing gas from gas wells. The results in Table 2 suggest that the integration of P2G can reduce production cost and gas supply of natural gas system, and gas storage can help reduce load shedding, which is more effective with P2G. Natural gas storage can improve security by supplying additional gas reserves to gas-fired power units. It should be noted that the impact of gas storage on gas load shedding and operation cost relates to the location node of the storage, which can be included in the co-planning of an electricity system and natural gas system.

Impact of Ramping Cost Coefficient
In this subsection, we compare the following three cases with various ramping bid factors to illustrate the impact of the ramping cost coefficient on the scheduling of P2G.
Case 4.1: Ramping bid factor is 0; Case 4.2: Ramping bid factor is 20%; Case 4.3: Ramping bid factor is 50%; Hourly power consumption results of P2G in Cases 4.1-4.3 are shown in Figure 6. In Case 4.1, the flexible ramping cost is not considered. Total power consumptions of P2G in Cases 4. 1-4.3 are 7,148.11, 7644.69, 8,533.056 MW, respectively. The power consumption of P2G increases as we increase the ramping bid factor, especially in hours 14, 16 and 22 as shown in Figure 6. When the ramping cost coefficient increases, the P2G facility is operated to provide additional flexible ramping capacities and flatten the net load profile to reduce total costs. The results once again demonstrate the benefits of P2G on an electricity system for providing additional flexible ramping capacities and flattening the net load profile.

IEEE 118-Bus System
The IEEE 118-bus system integrated with the 20-node Belgian natural gas system, shown in Figure 7, is applied here to further demonstrate the applicability of the proposed model on large systems. The generator bidding data are similar to those in (Fang et al., 2015). The detailed data of Belgian natural gas system can be found in (Wolf and Smeers, 2000). Wind farms and P2G devices with the same parameters as the PJM 5-Bus system are connected at Buses 8 and 43 and node 16 and three in the natural gas network. Nine generators are assumed to be gas-fired units, and gas loads at nodes 3, 6, 7, 10, 15 and 16 are consumed by power units 7, 13, 16, 23, 42 and 29. Hourly residential gas loads are the 80% of those of the 7-node natural gas system and distributed at load nodes according to the proportion in (Fang et al., 2015). 1,000 initial scenarios are generated, and then reduced to five scenarios. Table 3 presents the scheduling results for the five uncertain scenarios. The operation cost for the base case of electricity system is $2.036 * 10 4 . The production cost of gas suppliers in Scenario one is the largest. The corrective ramping cost and utilized wind power in S5 are the largest. The reason is that greater corrective ramping capacities are required for greater utilization of wind power. The net load in S4 is the most fluctuant with the largest standard deviation of 998.8 MW, resulting in the largest ramping cost. The results verify the effectiveness of the proposed model on larger systems.

CONCLUSION
In this paper, a novel stochastic day-ahead scheduling model for IENGS considering ramping costs with P2G and wind power is proposed. The uncertainties of wind power and energy loads are represented in multiple scenarios. Natural gas network constraints are considered to ensure the availability of output of gas-fired units. P2G facility with storage is integrated to reduce wind power curtailment, provide ramping capacities, and reduce supply and load shedding in natural gas systems. The coordinated scheduling model is formulated as a two-stage stochastic programming problem, and the solution method is proposed. Numerical case studies on a modified PJM 5-bus electricity system with a 7-node natural gas system and the IEEE 118-bus system with the 20-node Belgian natural gas system demonstrate the rationality and effectiveness of the proposed model. The key findings of the case studies are summarized as follows.
(1) By utilizing abundant wind power, the integration of P2G can reduce wind power curtailment. The increment on wind power utilization rate can reach 13.8% in the test system. (2) P2G facility provides additional flexible ramping capabilities, smoothing the net load profile and reducing total ramping costs in electricity system. (3) The integration of P2G can reduce the total production cost, gas supply and load shedding of a natural gas system. It is more effective to reduce load shedding when gas storage works with P2G coordinately. (4) A larger ramping cost coefficient would result in increased P2G power consumption.
The impact and benefits of P2G integration with storage relate to its capacity and location in an IENGS. Therefore, future research will focus on studying the siting and sizing of P2G facilities with storage.

DATA AVAILABILITY STATEMENT
The original contributions presented in the study are included in the article/Supplementary Material, further inquiries can be directed to the corresponding author/s.

AUTHOR CONTRIBUTIONS
XS: data curation, writing and software. CL: supervision, writingreviewing and editing. RZ: conceptualization and methodology. TJ: software and formal analysis. HC: project administration.