Integrated Gas – Electricity Network-Combined Heat and Power Optimization with Associated Petroleum and Wet Gas Utilization Constraint

Aside from liquid hydrocarbon, oil exploration also produces associated petroleum gas and wet gas. The use of associated petroleum and wet gas adversely affects gas turbine performance and gas line operation in several ways such as low gas quality, unstable heating value, and high H2S content. This research develops an integrated gas – combined heat and power optimal power flow with associated petroleum and wet gas utilization constraint. Thermodynamic equations are used to model gas turbine and gas network operation when subjected to low-quality fuels. To meet the fuel quality standard, additional constraints are considered. These constraints include the Modified Wobbe Index, a critical parameter for gas turbines, and H 2S content, a critical parameter for pipelines. The results show that the proposed model can optimize combined heat and power cost by determining the most efficient power – steam dispatch, optimal fuel mixture and gas line pressure settings, while still meeting operational constraints. Keywords— integrated gas –power; optimal power flow; associated petroleum gas; interior point; sequential quadratic programming.


I. INTRODUCTION
Aside from liquid hydrocarbon, oil exploration also produces associated petroleum gas (APG) and wet gas. APG is extracted together with oil from the reservoir, while wet gas is coming from small, marginal gas reserve which is less economical to be processed as commercial natural gas [1]. Oilfield operation involves a combined heat and power (CHP) system which produces electricity from gas turbines (GT) and steam from the heat recovery steam generator (HRSG). HRSG is connected to the GT exhaust to produce steam by utilizing the hot exhaust gas. To reduce fuel cost, APG and wet gas can be mixed with natural gas as fuel for the oilfield's CHP system [2].
APG and wet gas are significantly different in quality compared to natural gas. APG heating value may not meet gas turbine fuel specifications. Furthermore, APG is very corrosive [3], due to the high content of hydrogen sulfide (H 2 S). Wet gas may not be fully compatible with gas turbines. It contains heavy hydrocarbon components which can cause gas turbine failures [4]. APG and wet gas utilization for power generation have been discussed in previous research. Anosike [2] undertook a study to observe gas turbine performance fueled by APG. The results highlight that to produce the same amount of electricity, gas turbine requires higher APG mass flow compared to natural gas. Rajovic [5] assessed the life cycle of an oilfield's combined heat and power utility fueled by APG. Vanadzina [6] proposed APG to be used in the reformed electricity market.
Pujihatma [7] conducted multi-objective optimization for APG combined with natural gas to be used as fuel in a CHP system.
Previous CHP studies use empirical models to represent objective functions and constraints. References [8] and [9] have included power transmission model, expanding the problem to become combined heat and power optimal power flow (CHP-OPF). A new method was proposed by Kim [10], who introduced thermodynamic equations to represent GT -HRSG.
Some researchers extended the optimization scheme to include the gas pipeline system. Aside from OPF, such a scheme can calculate the optimal pressure and volume from each gas well. Seungwon An [11] proposed a natural gas and electricity optimal power flow with an objective function to maximize social welfare. Martinez-Marez [12] included the effect of temperature and altitude change. Chaudry [13] conducted multi-time period integrated gas and electricity network optimization which considers line pack and gas storages. Shao [14] proposed an optimal power flow in a multicarrier energy system by utilizing a state variable-based linear energy hub model and solved the problem using mixed integer linear programming. Costa [15] used data mining to optimize an integrated power and natural gas network security dispatch. Correa-Posada [16] modeled line gas traveling velocity and compressibility to ensure shortterm power system reliability. Zlotnik [17] optimized generation scheduling on an integrated gas and power network by examining day ahead scheduling of electric generation and compressor operation dispatch. These studies use empirically modeled gas turbine objective functions and assume a constant value for several fuel gas thermodynamic parameters.
This research focuses on integrated CHP and gas network optimization with multiple fuel sources: associated petroleum, wet and natural gases. For convenience, we use the term "field gas" to represent APG and wet gas.
Previous studies use an empirical formula to calculate GT-HRSG power and steam output. Regarding gas distribution, previous studies use a constant value for gas compressibility factor, specific gravity, and heating value. Considering multiple fuel sources with a wide range of fuel quality, this research uses thermodynamic equations to model GT-HRSG and equation of state to model the gas flow in the pipeline.
This study addresses two critical fuel quality parameters as additional constraints: MWI and H 2 S content. These parameters are significantly affected by the use of low costlow-quality field gas. The optimization model will calculate the most economical gas, power, and steam dispatch while still meeting fuel quality criteria to ensure GT-HRSG reliability and safe operation of the gas distribution network.
The optimization model is implemented on a CHP system provided in reference [7].

A. System Overview
The CHP system consists of 12 GTs, 8 HRSGs as shown in Table 1. Fig. 1 shows the electrical network. GT-HRSG and electrical network data is given in reference [7]. The green lines show the connection between the power and the gas system. Aside from GT-HRSG, ten gas boilers (GB) are available to provide additional steam. DG has an additional duct burner in HRSG to boost steam production. The gas network is shown in Fig. 2. Each gas source has a different gas composition and production volume, as shown in Appendix,  The values of formula (1) will be used to calculate power and steam output using a thermodynamic model [10].
b. Compressor outlet temperature (K): c. Turbine inlet temperature (K): d. Turbine outlet temperature (K): c. HRSG steam production volume (barrel cold water equivalent per hour): ' 22.644 (10) Gas fired boiler (GB) model is given in reference [10].  Fig. 3 shows that the sum of the incoming and outgoing flow in every node must be equal to zero [11]:

D. Pipeline Model
jk : M ,* 0 (11) A is the branch-nodal incidence matrix that connects gas nodes to gas pipeline branches. Matrix w in is a single column matrix which contains the gas node injection. Matrix f is also singla e column which contains the gas flow in each pipeline branch.
The flow for a branch f ka,b which connects node a and node b can be calculated using US customary units as [11]: k ,lm n lm o pn lm .q l r P q m r 5 (12) S ab is equal to 1 if π a > π b and -1if π a < π b . Variable M k is a function of pipeline length L k (in miles), pipeline efficiency ϵ (%) and diameter D k (in feet), formulated as follows [11]: Variables T 0 and π 0 are the reference temperature and pressure at 60.33 Fahrenheit and 14.7 psi, respectively. The above equations require the calculation of average gas temperature T ka (in Fahrenheit), specific gravity G and compressibility factor Z a . The compressibility factor can be calculated using the Peng-Robinson equation of state [18]. The pipeline temperature profile (in Fahrenheit) between point a and b is calculated as follows [19]: 7 m 7 l m : .7 l P 7 + 5• 2/ (14) T S is the average soil temperature in Fahrenheit. Variable θ depends on the pipeline outer diameter (D, in feet), pipeline thermal conductivity (U, in BTU/hr-feet 2 -F), length (ΔL, in feet), gas specific heat capacity C pg (in Btu/lb) and gas mass flow m g (in lb/hour), as formulated below [19]: Gas specific gravity is calculated using the following formula: … ,; ∑ † , o , ∈ , /28.8 (16) To calculate fuel mixture temperature, mixture specific heat must be calculated using the following formula: The value of C p,i is given by Table 10 and 11. The fuel mixture temperature can then be calculated as follows: The gas mixture must meet the Modified Wobbe Index limit, which is in the range of 42 -50 [20], formulated as [21]: o Š ,; F ' ‹,3 6 p 3 6 . 3 6 Lxyz.v{5 (19) The mixture must also meet acceptable H 2 S content, 100 ppmv [22], calculated using this formula:

E. Solver and Scenarios
The optimization model will use two solvers: Interior Point (IPOPT) [23] provided in Optitool [24], and Sequential Quadratic Programming [25], provided in Tomlab. Four scenarios are simulated: 1. Low steam demand at 100,000 barrel cold water equivalent per day (bowed) with fuel constraints: MWI and H 2 S 2. Low steam demand without fuel constraints 3. High steam demand at 350,000 bowed with fuel constraints 4. High steam demand without fuel constraints In all scenarios, the load is assumed constant at 450 MW. The load and steam demand is assumed constant during a one hour period, making this problem a "snapshot" optimization.

F. Objective Function
The objective function is to minimize fuel cost:   (11) c. Power system constraints: voltage, transmission capability, gas turbine generator capability d. Gas distribution constraints, such as pressure limit ( Table 9, 12) and available field gas production ( Table  10,11). e. HRSG and GB steam production capability III. RESULT AND DISCUSSION Fig. 4 and fig. 5 show the real power and steam dispatch, respectively. Units DG 1-3 and AG 1-5 are capable of producing steam. Units DG 1-3 are base loaded at 295.7 MW on all scenarios, due to the lowest heart rate compared to other units. AG 1-5 real power output is high in high steam demand scenarios. The AG1-5 load is significantly reduced in low steam demand scenarios. During high steam demand, DG 1-3 steam production increases due to duct burners operation. The optimization scheme also recommends gas boilers operate and produce 1,129 barrel per hour steam. There is a correlation between steam production and power system loss, as shown in Table 2. When steam demand is high, the real power output from DG 1-3 and AG 1-5 is also high. The power system data in reference [7] shows that most of the loads are connected to F, G, H, I, J, K, L and M Substations, which are far from the AG and DG units. During low steam scenarios, MG 1 -4 real power output is high. These units are close to the F -M substations. Thus power system loss is also reduced. This phenomenon is reflected in Fig. 6. Voltages on F -M Substations are higher during low steam demand scenarios when compared to high steam demand scenarios. To improve voltage in high steam demand scenario, DG1-3 reactive power is increased, shown in Table  3.   Table 4 shows the optimal gas mixture for AG gas consumer node. Due to its low price, optimization scheme recommends all available B,P,T,G field gas production to be consumed by AG 1 -5. AG 1 -5 can produce steam with their HRSGs. When steam demand is low, AG 1 -5 will consume less natural gas fuel. When steam demand is high, AG 1 -5 must boost their real power output. Thus, these units require higher natural gas volume, up to 1,088 mscf/hour.  Table 5 shows optimal gas mixture for MGA and MGB consumer nodes. When fuel quality constraints MWI and H 2 S are introduced, the MGA and MGB fuel mixture contains higher natural gas and lower field gas volume. Without fuel quality constraints, field gas S becomes the primary fuel source for MGA. limit. Thus, when fuel quality constraint is introduced, its volume reduces and natural gas takes over. This condition also occurs on the MGB terminal. Without fuel quality constraints, primary source of fuel will be from L gas plant. Table 11 shows that the L gas plant MWI at standard condition value does not meet fuel quality specifications of 40 -52 MWI. To meet fuel quality, L gas consumption reduces and is replaced with natural gas. When fuel quality is not included as constraints, MWI values may drop below the minimum level of 40, as shown in Table 6. This is due to the fact that field gas G and L have low MWI values, as shown in Table 10 and 11. With fuel quality constraints included, all MWI values are within specification. Improving MWI will cause an increase in natural gas consumption. MGA, MGB MWI values are corrected exactly at 40 to achieve lowest cost while still meeting MWI limit.  Table 7 shows H 2 S values for fuel gas for AG, MGA and MGB. Without fuel quality constraints, H 2 S value for MGA is higher than the maximum level of 100 ppmv. S field gas acts as the main fuel source for MGA, with H 2 S content as high as 500 ppmv. To reduce H 2 S, a higher volume of natural gas must be used. With fuel quality constraints included, H 2 S content for MGA is kept exactly at the maximum limit 100 ppmv to achieve lowest cost while still meeting the H 2 S requirement.   Fig. 7 shows the gas pipeline pressure profile for each scenario. The optimization scheme calculates the most optimal pressure setting at each gas node in order to achieve optimal fuel mixture. The effect of steam demand on gas pressure is visible. The left and rightmost curves are the pressure profile for gas nodes that supply AG and DG, respectively. Both units are capable of producing steam. A high steam demand would require these units to consume more fuel. During high steam demand, the pressure profile is higher compared to low steam demand. The optimization scheme is able to determine the final pressure at the gas consumer nodes AG, MGA, MGB and DG. These values are still within the operating pressure limit as stated in Appendix, Table 9 and 12.
In scenarios without fuel quality constraint, field gas plants have higher nodal pressures compared to scenarios with fuel quality constraint. The high-pressure settings are required to maximize field gas flow. Table 8 shows fuel cost objective values obtained from Optitool and Tomlab. With different algorithms, both solvers are able to reach the same cost value. When fuel quality constraints are introduced, the fuel cost increases significantly. This cost increase is caused by higher natural gas fuel consumption to meet MWI and H 2 S content specification.

IV. CONCLUSION
This paper presented an optimization model which can calculate optimal composition between field and natural gas and determine the gas line pressure settings to achieve optimal fuel mixture with the following benefit: Ability to switch between natural and field gas. Without fuel constraints, field gas become the primary fuel. With fuel constraints, optimization model prioritizes natural gas to maintain fuel quality at minimum acceptable level. The optimization model is able to determine the appropriate field gas production volume to ensure fuel quality.
Calculate gas pressure settings to accommodate steam production and optimal fuel mixture. With high steam demand, gas lines towards GT-HRSG have higher nodal pressures compared to low steam demand scenario. In scenarios without fuel constraint, field gas plants have higher nodal pressures compared to scenarios with fuel constraint.
Ability to analyze cost with conflicting variables: steam production and power system. When steam demand is high, high losses is accepted as "consequence" to have low cost steam from HRSG operation.

Vcn, Vc
Nominal and actual compressor air flow (m 3 /s)

wf,GTn
Nominal gas turbine fuel mass flow (kg/s)

pr,NG, prk
Price for natural gas and gas from node k ($/mmbtu)

Tf, Te
Turbine inlet and outlet temperature (K) Vi, θi Voltage (kV) and angle (deg) at bus i Gij, Bij Conductance and susceptance between bus i -j (1/Ω) mk , ni Mass fraction and volume fraction (%) Pli, Qli Active and reactive load at substation i (MW, MVAR) NGPϵDB, NGPϵGB, NGPϵGT Number of gas producers which supply duct burners, gas boiler and gas turbine NHRSG, NGB,NGT Number of HRSG, gas boilers and gas turbines π Gas pipeline nodal pressure (psia) fka,b Gas flow from node a to b (scf/hour) wf,GTi,k Mass flow from gas producer k to gas turbine i (kg/s) wf,k Gas mass flow from k gas producer (kg/s) APPENDIX