A Probabilistic and Value-Based Planning Approach to Assess the Competitiveness between Gas-Fired and Renewables in Hydro-Dominated Systems: A Brazilian Case Study

: The main challenge with the penetration of variable renewable energy (VRE) in thermal-dominated systems has been the increase in the need for operating reserves, relying on dispatchable and ﬂexible resources. In the case of hydro-dominated systems, the cost-effective ﬂexibility provided by hydro-plants facilitates the penetration of VRE, but the compounded production variability of these resources challenges the integration of baseload gas-ﬁred plants. The Brazilian power system illustrates this situation, in which the development of large associated gas ﬁelds economically depends on the operation of gas-ﬁred plants. Given the current competitiveness of VRE, a natural question is the economic value and tradeoffs for expanding the system opting between baseload gas-ﬁred generation and VRE in an already ﬂexible hydropower system. This paper presents a methodology based on a multi-stage and stochastic capacity expansion model to estimate the optimal mix of baseload thermal power plants and VRE additions considering their contributions for security of supply, which includes peak, energy, and operating reserves, which are endogenously deﬁned in a time-varying and sized in a dynamic way as well as adequacy constraints. The presented model calculates the optimal decision plan, allowing for the estimation of the economical tradeoffs between baseload gas and VRE supply considering their value for the required services to the system. This allows for a comparison between the integration costs of these technologies on the same basis, thus helping policymakers and system planners to better decide on the best way to integrate the gas resources in an electricity industry increasingly renewable. A case study based on a real industrial application is presented for the Brazilian power system.


Introduction
The integration between electricity and gas started in the 90s as a consequence of a widespread construction of new gas-fired power plants, both combined-cycle and opencycle. As competitive, modular, and efficient, the technology was able to displace existing generation in many countries, mostly those already dominated by inefficient and more pollutant thermal generation. This had a perfect fit for investors with the creation of wholesale energy markets launched also in the 1990s: as baseload resources they could secure a volume in the energy spot markets and capture a revenue stream from spot-prices. The baseload dispatch of efficient gas plants also solved the commercial feasibility of the development of oil-gas fields, whose gas supply agreements demand take-or-pay clauses to secure a stable revenue stream to enable the financing of the new gas infrastructure. The combination of a large consumption market for power and non-power uses (industry, services in the system. This allows for a comparison between the integration costs of these technologies on the same basis, thus helping policymakers to better decide on the best way to integrate the gas resources in an electricity industry increasingly renewable. A case study based on a real industrial application is presented for the Brazilian power system.

The Brazilian Power System and Problem Description
Brazil is the largest country in Latin America with a power sector containing an installed capacity of 170,000 MW. In the 1990 s, hydro plants were responsible for more than 90% of power generation in. These plants had some important characteristics for supply reliability, such as flexible output and cheap ancillary services-which is fundamental to any power system in handling unexpected imbalances in real-time operation. On the other hand, a hydro-dominated system needs firm energy backup to deal with dry years, and the Brazilian strategy in the early 2000 s started to import natural gas from Bolivia with take-or-pay clauses to remunerate the gas infrastructure investments, while developing offshore natural gas fields.
This integration between natural gas and electricity faced some difficulties in the 2004-2006 period due to the thermal dispatch volatility [1,2,5] and, in 2007, the country started to import LNG to provide greater flexibility for the thermal power plants (TPP), enabling an energy backup during dry periods. This strategy was also adopted by other countries in Latin America, for geopolitical reasons and for a better integration between gas and power [1,4].
Well documented by the International Renewable Energy Agency (IRENA) [6], in the late 2000 s Brazil started a renewable auction program for long-term energy contracts, which was responsible for a massive penetration of wind plants. One of the reasons for the auction success was the hydro-domination of the system [7], which reduced the integration cost and ensured very competitive prices for wind generation. In 2014, Brazil started longterm contract auctions for solar energy with similar success and a pathway to integrated renewables to the grid was initiated.
However, due to environmental and social constraints, Brazil's hydro expansion in the last 20 years has only been based on run-of-river hydro plants. The storage capacity of the system compared to the total energy consumption [8] has thus decreased. Along with increasing transmission bottlenecks in the country, this has adversely affected the system operation, increasing the need for other dispatchable alternatives to accommodate the increasing flexibility needs due to the ongoing and expanding integration VRE. Figure 1 below depicts the evolution of the supply mix between 1990 and 2021 considering consolidated values.
In recent years, Brazil has been considering different alternatives to (re)introduce resources for flexibility in the power sector [9]. From alternatives of flexible power plants to the development of green hydrogen and increasing the transmission system in view of diminishing the variability from generation and demand sides and using the power reserves from distant areas, the planning studies focused on alternatives for integrating VRE into the power sector.
On the other hand, the country has giant offshore oil reserves, in the so-called pre-salt fields, with associated natural gas to the oil production. These are located up to 300 km from the coast and 3000 m below sea level. These gas and oil fields were discovered in 2008 and, in 2019, they contributed to 62% of Brazil's total oil production and 57% of natural gas production. The pre-salt is geographically highlighted in Figure 2.
the last 20 years has only been based on run-of-river hydro plants. The storage capacity of the system compared to the total energy consumption [8] has thus decreased. Along with increasing transmission bottlenecks in the country, this has adversely affected the system operation, increasing the need for other dispatchable alternatives to accommodate the increasing flexibility needs due to the ongoing and expanding integration VRE. Figure 1 below depicts the evolution of the supply mix between 1990 and 2021 considering consolidated values.   In recent years, Brazil has been considering different alternatives to (re)introduce resources for flexibility in the power sector [9]. From alternatives of flexible power plants to the development of green hydrogen and increasing the transmission system in view of diminishing the variability from generation and demand sides and using the power reserves from distant areas, the planning studies focused on alternatives for integrating VRE into the power sector.
On the other hand, the country has giant offshore oil reserves, in the so-called presalt fields, with associated natural gas to the oil production. These are located up to 300 km from the coast and 3000 m below sea level. These gas and oil fields were discovered in 2008 and, in 2019, they contributed to 62% of Brazil's total oil production and 57% of natural gas production. The pre-salt is geographically highlighted in Figure 2. The massive oil-gas production of these fields is expected to start sometime before 2030. Since natural gas is a byproduct of the oil production, it may be leveraged by oil production, creating an opportunity for Brazil to develop new competitive gas-fired plants to complement the VRE integration and meet its increasing load growth. Nevertheless, for the development of pre-salt oil fields, the utilization of the associated gas is required, that might be through consumption, reinjection or flaring. This problem has been addressed in past decades in [10] in Norway, that developed associated gas fields similar to those found in Brazilian coast. In terms of gas utilization, the power sector might become a relevant consumer in order to accommodate the gas production through power generation and baseload thermal dispatch, depending on its final cost. The needed flexibility in this case would be indirectly provided by increasing the hydroelectric reservoir levels, recovering the system's storage capacity and providing flexibility and ancillary services to accommodate VRE integration. The issue addressed in this technical article is to estimate maximum gas costs delivered to the power plants that still allows for its development regarding the construction of other alternatives. The uncertainties around the cost of pre-salt natural gas, which depend on the distance from the coast, the amount of CO2 concentration on the fields and the opportunity cost of the oil production will define the competitiveness of the gas-fired plants for new investments. The massive oil-gas production of these fields is expected to start sometime before 2030. Since natural gas is a byproduct of the oil production, it may be leveraged by oil production, creating an opportunity for Brazil to develop new competitive gas-fired plants to complement the VRE integration and meet its increasing load growth. Nevertheless, for the development of pre-salt oil fields, the utilization of the associated gas is required, that might be through consumption, reinjection or flaring. This problem has been addressed in past decades in [10] in Norway, that developed associated gas fields similar to those found in Brazilian coast. In terms of gas utilization, the power sector might become a relevant consumer in order to accommodate the gas production through power generation and baseload thermal dispatch, depending on its final cost. The needed flexibility in this case would be indirectly provided by increasing the hydroelectric reservoir levels, recovering the system's storage capacity and providing flexibility and ancillary services to accommodate VRE integration. The issue addressed in this technical article is to estimate maximum gas costs delivered to the power plants that still allows for its development regarding the construction of other alternatives. The uncertainties around the cost of pre-salt natural gas, which depend on the distance from the coast, the amount of CO 2 concentration on the fields and the opportunity cost of the oil production will define the competitiveness of the gas-fired plants for new investments.
In this sense, Brazilian policymakers, energy planners and oil-gas majors (that have concessions rights of those fields) are facing a debate regarding to what extent it is economic to introduce baseload gas-fired plants from these fields and enable their exploration and production. This is a very relevant policy decision for the country and for the owner of the concession rights of these fields, which are the major oil companies: Equinor, Shell, Galp and Exxon. This question is directly connected to a more general tradeoff faced by the power sector globally to address generation expansion: should new capacity be secured based mainly on VRE, apparently cheaper in pure $/MWh terms but that will increase the usage of existing sources (hydro, in Brazil's case) to provide security services and/or of building new costly flexible thermal plants, or should investments in baseload gas-fired plants which enable existing plants to provide flexibility to accommodate VRE integration be the choice of direction, or at least part of it?

Objectives of This Work
This work, then, addresses this practical research question by means of a methodology based on a multi-stage and stochastic capacity expansion model to estimate the optimal mix of baseload thermal power plants and VRE additions to the system expansion portfolio, considering their reliability contribution for the supply of peak, energy and operating (spinning) reserves. We represent the operating reserves as time-varying and dynamic requirements, endogenously defined by our proposed optimization model. This means that reserve requirements are not static, defined as, for example, a percentage of peak load, but vary per hour of the day and each hour may have different reserve requirements, sized based on renewable forecast-errors and on the portfolio of existing and candidate power plants. Our model, then, calculates the tradeoffs between baseload gas and VRE supply considering their value for these services in the system. For the sake of completeness, our model also considers a set of adequacy constraints, which represents the need of system planners to have a firm capacity margin to supply peak demand [11][12][13]. A case study based on a real industrial application is presented for the Brazilian power system.

Literature Survey and Paper Contributions
The literature on electricity and gas integration is vast. Most papers cover integration issues on the operation side [14][15][16][17][18][19]. Most of these papers discuss the representation of the gas supply and network in the electricity operations models aiming to an integrated schedule. Other papers discuss similar issues on the planning side [20][21][22][23] and the literature survey is also strong on risk management and market design [3][4][5]24] issues between these two industries. The literature on capacity expansion planning models is even vaster. The development of generation expansion planning in optimization process first started with [25], which considered linear programming as a tool to solve the expansion problem. [26][27][28] provide a detailed analysis of the generation expansion planning tools history and how they have evolved. In the most general form, the capacity expansion models minimize investment and operation costs and the incorporation of reliability constraints and security criteria, as discussed in [29][30][31][32][33]. This work considers the contribution value of each candidate to the criteria, which is reviewed in [33].
The development of VRE has brought new challenges for optimization tools, with requirements for a more granular representation of the timescale and a greater variability on the supply-side representation. More recently, a great effort has been made on the definition of operating reserves to couple with VRE integration for operations planning. Since the sizing of reserves depends on the renewable production, the dynamic sizing of reserves to reduce procurement's cost has gained momentum [34][35][36][37]. The authors in [34] show that the operating reserves costs might decrease by about 20% in German Energies 2021, 14, 7281 6 of 21 system. The same conclusions are reached by the authors of [37]. They presented a dynamic sizing method that determines the required capacity on a daily basis, using the estimated probability of facing a system imbalance during the next day. A gradual implementation of dynamic reserves in Belgium since 2020 has been decided based on the results of this study. This methodology is at the core of our work.
From generation expansion planning purposes, uncertainties have been considered in different ways: the authors of [28] focus on detailing the expansion planning regarding largescale renewable participation. Ref. [38] developed a stochastic, multistage optimization tool in order to obtain the optimal transmission and energy storage expansion. [39] solved the optimal placement of storage equipment in systems with a high penetration of wind power systems. Moreover, the integration of dynamic sizing of the spinning reserve in the generation expansion planning model was developed in [40], treating it as an endogenous variable. This is an important development that has formed the basis of the research in our work as it allows for the capacity planning model to dictate the generation expansion options that also minimizes reserves costs. This model considers the variability of the hourly differences of the production from each renewable scenario. Ref. [41] raised the importance of representing greater granularity characteristics in power system modelling, showing an underestimation of costs in the Belgian power system of up to 58% in case of neglecting the low temporal constraints [42].
Our work fits into the planning and investment sides and covers the specific application of valuing baseload gas-fired power plants in a hydro-dominated system with increasing penetration of renewables. The contributions of our work are threefold: (i) we develop a methodology to determine the breakeven gas prices that turn the baseload gas plants and renewables equivalent under the hydro-dominated system standpoint, that is, to satisfy the same set of constraints (providing equivalent economic value); (ii) for this, we utilize a capacity expansion planning model that addresses energy, peak and the endogenous definition of time-varying and dynamic operating reserves in a probabilistic way. Our model is based on multistage, multiarea, stochastic MIP problem with hourly timescale resolution with co-optimization between energy and reserves and adequacy constraints; (iii) we apply the methodology to real-life case studies for the Brazilian system, where this problem is current under discussion. To the best of our knowledge, this is the first time this type of analysis is conducted in the literature for a hydro-dominated system. With our analysis, we also expect to contribute to the discussion on how to compare renewables and gas-fired plants on the same basis, i.e., to supply the same set of system services (or "attributes") and of the value aggregated for them. This paper is structured as follows: Section 2 provides the overview of the proposed methodology. Section 3 presents a real case study addressing this problem in Brazilian power system. Section 4 discusses the observed results from the proposed methodology. Finally, Section 5 concludes the work's observations and analysis.

Methodology
The capacity expansion problem demands the selection of the generation and transmission options to meet future power load requirements at the least possible cost. Since different resources have different characteristics, the value of each project to the system depends on how the production profile and services provision match the system needs and on the correspondent cost. The Brazilian power system has many candidate options: a large resource potential for hydro is available, as it is for wind, solar and biomass. Gas-fired plants can be an alternative, with gas sourced from cross-border pipelines, LNG or from domestic the pre-salt fields. Each option has its own characteristic: distance to load centers, transmission investment needs, flexibility, intermittency, etc.
Our goal is to calculate the value of baseload gas-fired generation against other portfolio options when integrated into the Brazilian system. This paper uses an approach founded on the gas opportunity cost calculation by the point of view of the power sector. In other words, the attractiveness in terms of installed capacity of the pre-salt power plants depending on their natural gas cost and the maximum gas price that the power sector is willing to pay based on the other expansion alternatives. This is represented in the following procedure: Step 1: Start from an existing generation-transmission system configuration over a given horizon; Step 2: Define a load growth scenario and a set of generation expansion candidates, as well as their CAPEX & OPEX and technical characteristics; Step 3: for a given gas price delivered at the power plant, utilize the solution strategy defined in the capacity expansion planning model explained in the next section to determine the sizing of the gas-fired plants in the system to supply the load growth.  sector is willing to pay based on the other expansion alternatives. This is represented in the following procedure: Step 1: Start from an existing generation-transmission system configuration over a given horizon; Step 2: Define a load growth scenario and a set of generation expansion candidates, as well as their CAPEX & OPEX and technical characteristics; Step 3: for a given gas price delivered at the power plant, utilize the solution strategy defined in the capacity expansion planning model explained in the next section to determine the sizing of the gas-fired plants in the system to supply the load growth. Figure 3 depicts this procedure. Steps (1) to (3) can be repeated for a set of candidate gas prices for the pre-salt gas, depicting the attractiveness of the baseload power generation as a function of the natural gas price. The value that enables gas-fired plants to be selected by the optimal planning model defines how the power sector can breakeven. For gas prices higher than this value, the expansion based on greater amounts of VRE with other flexible options is more costeffective. This exercise can be repeated for different modeling features of the capacity expansion model and assess how the supply of different services affect the competitiveness of the gas-fired plants. For example, we can assess the competitiveness with respect to the energy supply and to the supply of other reliability constraints and reserves. In this paper, this exercise was conducted twice, representing different constraints in the expansion planning model.

Solution Strategy
For addressing the answers of the questions raised questions in this work, a generation, transmission and reserve requirements co-optimization model was developed, which aims to minimize the system total cost, represented by the sum of investment and the expected operating costs, satisfying a set reliability constraints (supply of energy, peak and endogenously-refined operating reserves) under uncertainty in water availability and wind and solar generation. This is conducted through a mixed integer programming (MIP) strategy, with hourly resolution.
Since power systems expansion planning is usually carried out over time spans of several years, some simplifying strategies are required to make its solution feasible, especially when representing the intraday operation. To do so, the current work uses some time-clustering assumptions. The first step of this process is clustering some of the months into seasons, which should be defined based on rainy and dry periods and the demand profiles. Once the seasons are defined, the representative days within each of them must be estimated, here referred to as typical days. Steps (1) to (3) can be repeated for a set of candidate gas prices for the pre-salt gas, depicting the attractiveness of the baseload power generation as a function of the natural gas price. The value that enables gas-fired plants to be selected by the optimal planning model defines how the power sector can breakeven. For gas prices higher than this value, the expansion based on greater amounts of VRE with other flexible options is more costeffective. This exercise can be repeated for different modeling features of the capacity expansion model and assess how the supply of different services affect the competitiveness of the gas-fired plants. For example, we can assess the competitiveness with respect to the energy supply and to the supply of other reliability constraints and reserves. In this paper, this exercise was conducted twice, representing different constraints in the expansion planning model.

Solution Strategy
For addressing the answers of the questions raised questions in this work, a generation, transmission and reserve requirements co-optimization model was developed, which aims to minimize the system total cost, represented by the sum of investment and the expected operating costs, satisfying a set reliability constraints (supply of energy, peak and endogenously-refined operating reserves) under uncertainty in water availability and wind and solar generation. This is conducted through a mixed integer programming (MIP) strategy, with hourly resolution.
Since power systems expansion planning is usually carried out over time spans of several years, some simplifying strategies are required to make its solution feasible, especially when representing the intraday operation. To do so, the current work uses some time-clustering assumptions. The first step of this process is clustering some of the months into seasons, which should be defined based on rainy and dry periods and the demand profiles. Once the seasons are defined, the representative days within each of them must be estimated, here referred to as typical days. This type of representation aims to reduce problem size, capturing the main characteristics within each common day in each season. The work developed in [43] uses a clustering concept to define the typical days to be used by the proposed generation expansion model. For the modelling presented in this work, two typical days were defined for each of the four seasons. The definition of the seasons was based on three-months clusters. For each season, the days were separated into two groups: weekdays and weekends. Figure 4 summarizes the discussed clustering strategy. This type of representation aims to reduce problem size, capturing the main characteristics within each common day in each season. The work developed in [43] uses a clustering concept to define the typical days to be used by the proposed generation expansion model. For the modelling presented in this work, two typical days were defined for each of the four seasons. The definition of the seasons was based on three-months clusters. For each season, the days were separated into two groups: weekdays and weekends. Figure 4 summarizes the discussed clustering strategy. The optimization developed in this paper also contemplates the operating reserve constraints as a variable of the decision process, which will depend on the generation variability of renewable energy sources. The endogenous sizing of the spinning reserve calculation considers, for each hour of each typical day, a convex combination between the average and Conditional Value at Risk (CV@R) of the differences between the real and the expected variation between hours of the production of renewable assets. For the linear programming problem of the CV@R, we refer to [44]. Figure 5 illustrates the process of Dynamic Probabilistic Reserve (DPR) sizing scheme, similar to the ones proposed by [34,35,40]. Therefore, this approach ensures that the reserve requirements will be sized for each specific hour, considering every scenario used in optimization problem. Since the spinning reserve requirement will be different for each hour, it is also considered as dynamic, as well as probabilistic once it uses different renewable production scenarios in its sizing.

Problem Formulation
The optimization model used in this simulation is based on [40] and can be formulated as follows: • Objective Function: The optimization developed in this paper also contemplates the operating reserve constraints as a variable of the decision process, which will depend on the generation variability of renewable energy sources. The endogenous sizing of the spinning reserve calculation considers, for each hour of each typical day, a convex combination between the average and Conditional Value at Risk (CV@R) of the differences between the real and the expected variation between hours of the production of renewable assets. For the linear programming problem of the CV@R, we refer to [44]. Figure 5 illustrates the process of Dynamic Probabilistic Reserve (DPR) sizing scheme, similar to the ones proposed by [34,35,40]. This type of representation aims to reduce problem size, capturing the main characteristics within each common day in each season. The work developed in [43] uses a clustering concept to define the typical days to be used by the proposed generation expansion model. For the modelling presented in this work, two typical days were defined for each of the four seasons. The definition of the seasons was based on three-months clusters. For each season, the days were separated into two groups: weekdays and weekends. Figure 4 summarizes the discussed clustering strategy. The optimization developed in this paper also contemplates the operating reserve constraints as a variable of the decision process, which will depend on the generation variability of renewable energy sources. The endogenous sizing of the spinning reserve calculation considers, for each hour of each typical day, a convex combination between the average and Conditional Value at Risk (CV@R) of the differences between the real and the expected variation between hours of the production of renewable assets. For the linear programming problem of the CV@R, we refer to [44]. Figure 5 illustrates the process of Dynamic Probabilistic Reserve (DPR) sizing scheme, similar to the ones proposed by [34,35,40]. Therefore, this approach ensures that the reserve requirements will be sized for each specific hour, considering every scenario used in optimization problem. Since the spinning reserve requirement will be different for each hour, it is also considered as dynamic, as well as probabilistic once it uses different renewable production scenarios in its sizing.

Problem Formulation
The optimization model used in this simulation is based on [40] and can be formulated as follows: • Objective Function: Therefore, this approach ensures that the reserve requirements will be sized for each specific hour, considering every scenario used in optimization problem. Since the spinning reserve requirement will be different for each hour, it is also considered as dynamic, as well as probabilistic once it uses different renewable production scenarios in its sizing.

Problem Formulation
The optimization model used in this simulation is based on [40] and can be formulated as follows:

•
Objective Function: • Operative Variables Limits: 0 ≤ g k,t,l,h,s + r k,t,l,h,s ≤ g k · x k , ∀b, t, l, h, s, ∀k ∈ K i (7) • Ramp-up and Ramp-down Limits: g k,t,l,h,s − g k,t+1,l,h,s ≤ ∆g i , ∀i, b, t, l, h, s r i,t,l,h,s ≤ ∆g i , ∀i, b, t, l, h, s • Operating Reserve and Adequacy Constraints: • Hydro Power Plants Constraints: v i,T+1,l,h,s = v i,1,l,h,s , ∀i, l, h, s u i,t,l,h,s + u i,t,l,h,s ≥ q i , ∀i, t, l, h, s g i,t,l,h,s = ρ i · u i,t,l,h,s , ∀i, t, l, h, s 0 ≤ θ + n,t,l,h,s , θ − n,t,l,h,s ≤ Θ n , ∀n, t, l, h, s v b n,T,l,h,s = v b n,1,l,h,s , ∀n, t, l, h, s • Dynamic Probabilistic Reserve Formulation: • Binary Variables: Equation (1) defines the objective function, which aims to minimize the total system cost, that contains two main parcels: the investment cost and the expected operational cost. The first parcel of the objective function formulated above comprises an investment cost decision. In this parcel, k represents a candidate from the set of available candidates, K, composed by generation candidates, K i , transmission candidates, K j , and energy storage equipment candidates, K n . For each of the candidates, there are defined the annualized investment cost, I k . Moreover, the decision of investing in each of available candidate is based on the binary decision variable, x k ∈ {0, 1}.
The second parcel represents the expected value of the operating costs. Hence, for each scenario, s, in the set of simulated scenarios, S, it is defined a probability, p s , that multiplies the total operational cost of this scenario. The seasons are represented by t and the set of seasons by T . The typical day is defined as l and the set of typical days as L. To represent the correct duration of each typical day, the variable β l indicates the weight of the typical day in its season. The variable g i,t,l,h,s represents the generation of an existing power plant, i, in the set of all existing power plants, which is multiplied by its operative cost, c i . Similarly, the cost of generation of each candidate is calculated by multiplying the generation, g k,t,l,h,s , by its operative cost, c k . Finally, the loss of load cost is represented by c d , while σ t,l,h, s indicates the depth of loss of load at each moment.
For each bus b, that belongs to the group of buses, B, the Equation (2) represents its load balance. It states that at every moment the load balance must be satisfied through generation of the assets connected in this bus, energy imports/exports, f + b,j,t,l,h,s , f − b,j,t,l,h,s , battery charge/discharge, θ + b,n,t,l,h,s , θ − b,n,t,l,h,s , and load-shedding. Equation (3) limits the load shedding at each bus to its own load.
Equation (4) indicates the maximum generation capacity of an existing power plant. This constraint limits the sum of generation and reserve, r i,t,l,h,s , that was allocated to the generation asset to its maximum generation, g i . It guarantees the generation asset will be able to produce the necessary energy if requested. The minimum generation of a power plant is defined as g i in Equation (5). The transmission capacity is limited by the Equation (6) in both directions. The right-hand side of this equation is the maximum flow through the circuits j that connect the bus b, thus represented by F b,j . Equations (7)-(9) have the same concept as Equations (4)-(6), however for candidates. It is noteworthy to mention that by multiplying the maximum generation by the decision variable of constructing the candidate will allow for the limitation of the maximum generation to zero in case of not deciding to construct it.
The maximum ramp-up and ramp-down are represented by ∆g i and ∆g i , respectively, and limit the output variation of generation assets in Equations (10) and (11). In order to accommodate the allocated spinning reserve and guarantee that the generator will be able to provide the expected production if necessary; the spinning reserve is also restrict to the ramp-up and ramp-down maximum values in Equation (12). Equation (13) represents the operating reserve balance per bus, allowing for the allocation of the reserve to the available generators, satisfying the reserve requirements, which are dynamically defined by the variable R b,t,l,h that will be further explained. Equation (14) represents adequacy constraint, which allows the possibility for the system planner to exogenously incorporate minimum volumes of firm capacity requirements on top of the peak loads. This has been of increasing interest in many systems all around the globe. The contribution of each power plant to the firm capacity is represented by φ and the minimum and maximum firm capacity requirements by Φ, Φ, respectively. The set of constraints comprised of Equations (13) and (14) reinforces the supply of operating reserves and system adequacy. Thus, hereafter, this set will be also referred to security constraints.
Equation (15) shows the water balance in each hydro reservoir. The variable v i,t+1,l,h,s is the reservoir level by the end of the hour h, while v i,t,l,h,s is the reservoir level on the beginning of the hour h. The inflow is a i,t,l,h,s , the water discharged into turbines u i,t,l,h,s , the spilled water u i,t,l,h,s and the water losses η i,t,l,h,s (necessary to represent the irrigation and evaporation, for example). The upstream reservoirs comprise the set M (only those right before the analyzed reservoir), and the sum of their discharged water is added to the current reservoir.
Equation (16) associates the final volume to the initial volume, representing a steady state strategy for the reservoir in this model. Its intention is to represent a steady-state operation, in which the initial point of operation does not matter, however, the net energy balance should be zero in the study horizon. Equation (17) limits the water discharged into turbines and Equation (18) the minimum and maximum reservoir levels, which are limited respectively by v i , v i . Equation (19) guarantees the river flow by adding a constraint that imposes the minimum outflow from reservoir, q i . Finally, the generation of this power plant is related to the discharged water by Equation (20), where ρ i is the energy production function of this power plant. In this case, the function is defined as a constant.
The operation of batteries is represented by Equations (21)- (25). Equation (21)  is the volume of the battery, represents the energy loss from one period to the other, θ + n,t,l,h,s , θ − n,t,l,h,s mean, respectively, the charging and discharging variables and µ the energy loss in charging process.
Equation (22) limits the range of charging and discharging variables to the maximum output capacity of the battery, Θ n . Equation (23) equalizes the initial volume of the final volume of the storage equipment. Finally, Equations (24) and (25) limit the volume of the batteries (both existing and candidates) to the maximum volume, v b n . Finally, the DPR representation in optimization problem is defined through Equations (26)- (30). The Equations (26) and (27) are used to calculate the expected generation,ĝ, of the existing and candidate renewable assets, respectively. Equation (28), then, calculates the difference between the observed renewable generation for each scenario to the expected generation. It is noteworthy to mention that, in case the renewable candidate is not selected, its contribution to the increment of this variable in null. Hence, the Equation (29) is used to calculate the absolute difference of the variation of the total renewable production between hours, ∆ b,s,t,l,h .
Since this optimization problem considers the convex combination of expected value and conditional value at risk of hourly difference variability to calculate the operations reserve requirement of the system, it is necessary to represent the CV@R as a linear programming problem in order to integrate it into the original problem. Therefore, we refer the linear formulation of the CV@R to [44]. Finally, the final spinning reserve requirement is defined in Equation (30). It is composed by the convex combination of the expected value and CV@R of the ∆ b,s,t,l,h added to the 5% of the load. In this equation, the λ represents the convex combination parameters, which provides the CV@R weight in convex combination function and α is the CV@R parameter corresponding to the percentile of the scenarios.
Based on this formulation, this model is able to capture the intermittency and correlation associated to VRE, since it represents the generation of power plants in hourly steps. Furthermore, due to the usual daily pattern of VRE, the spinning reserve requirements is also defined in hourly steps through this model.

Solution Approach
Our model is formulated as a mixed-integer linear program (MILP) and solved by commercially available optimization solvers.

Case Study: Assessing the Competitiveness of Base-Load Gas Generation from Pre-salt Gas Fields Assumptions
For the purpose of this paper, the natural gas opportunity cost of pre-salt projects is obtained through the calculation of the generation and transmission expansion optimization in order to supply the load growth for the 2024 to 2030 period. The expansion results are presented for the year 2030. Additionally, for the sake of simplicity, we represent this opportunity cost as a flat number along the year. Table 1 depicts the system's capacity breakdown per technology for the 2024 configuration of the study. The yearly average load consumption and yearly load peak projected for 2030 are, respectively, 1149 TWh and 174.5 GW. One can notice that the installed capacity of 2024 (211 GW) is much greater than the average energy demand of 2030 (131 average GW). This is typical from hydro systems, designed to supply load under very adverse hydrological conditions (dry seasons), which do not occur often. Hence, it is natural to have an excess capacity with respect to the energy load (the energy supply is limited by hydrological conditions). Renewables compound this challenge with their own intermittency, thus requesting more spare capacity to make up for the reserves.
For the purpose of this analysis, this model considers stochastic analysis for the energy production of renewable power plants (hydro, solar and wind). The hydro availability was modelled as periodic autoregressive model (PAR) [45], using the available monthly historical records from 1931 to 2018 from the Brazilian system operator dataset. For renewable power plants, the scenarios were created using a Bayesian network approach [46], which were correlated to the hydrological inflows in order to capture the real characteristics of the resources' availability. These renewable scenarios are considered in hourly timescale, which grants to capture the effect of hourly constraints in system expansion planning. Table 2 provides the capital expenditure (CAPEX) and operational expenditure (OPEX) costs for each candidate source used for this simulation, which is an input for the optimization model to economic evaluate the new capacity sources and build the least-cost energy portfolio, satisfying the adequacy requirements. Besides the investment costs, it is necessary to calculate the operating variable cost for those indicative TPP projects. Table 3 presents the assumptions for the operating variable cost and flexibility of each TPP project, considering the gas price of 3 USD/MMBtu for the pre-salt gas fields as an example. Table 3. Operating cost assumptions for candidates' gas-fired thermal powerplants (Source: PSR Energy Consulting and Analytics, using data from IRENA and IEA).

Results and Discussion
The value of the pre-salt gas fired plants was assessed for two different simulations: (i) competitiveness based only on the supply of energy needs in the capacity planning model and (ii) analysis also considering the need to supply reliability constraints (dynamic operating reserves and peak), in addition to the energy demand.
The CPU time for each simulation ranged from 656 s to 23,029 s, taking 7416 s on average, since this optimization model is based on MIP, which depends on heuristics and convergence methods to obtain its solution.

Value of Pre-Salt Natural Gas Power Plants: Energy-Only Cost Analysis
In the first analysis, the model does not consider the set of constraints defined in Equations (13) and (14) on peak and operating reserves in the model formulation. Consequently, the model calculates an optimal expansion plan based on a pure-economical tradeoff between building new capacity and using the existing system to meet the energy demand growth (with the purpose to reduce investments plus operative costs). Since transmission is also considered, there is another tradeoff (not explored in this paper) that is to build candidates close to the load center or to invest in new technology far away from it, which would require the construction of new transmission lines Figure 6 presents the amount of installed capacity for pre-salt gas-fired projects for a range of pre-salt gas prices, including all taxes, sector charges and gas distribution cost. transmission is also considered, there is another tradeoff (not explored in this paper) that is to build candidates close to the load center or to invest in new technology far away from it, which would require the construction of new transmission lines Figure 6 presents the amount of installed capacity for pre-salt gas-fired projects for a range of pre-salt gas prices, including all taxes, sector charges and gas distribution cost. As shown, the maximum price for base-loaded pre-salt natural gas that can charged to the power system and that would enable the economic construction of any volume is 3.9 USD/MMBTU. As expected, the reduction in natural gas price increases the attractiveness of these projects, as their volume is increased. While the decision for 3.9 USD/MMBTU gas price is to install 1 GW of those pre-salt power plants, the 3.3 USD/MMBTU and 2.9 USD/MMBTU gas prices increase this amount to 4 GW and 8 GWreaching approximately 40 Mm³/day of gas consumption in total.
Since pre-salt projects are only evaluated by their energy production, it is noticeable that their main competitors were renewable sources. The increment in baseload gas-fired plants implies a in reduction in other alternatives, as it is possible to observe in Figure 7, where the total VRE capacity is presented. Figure 7 shows total installed capacity for nonconventional renewable sources (which means solar, wind and biomass) considering different pre-salt natural gas prices.  As shown, the maximum price for base-loaded pre-salt natural gas that can charged to the power system and that would enable the economic construction of any volume is 3.9 USD/MMBTU. As expected, the reduction in natural gas price increases the attractiveness of these projects, as their volume is increased. While the decision for 3.9 USD/MMBTU gas price is to install 1 GW of those pre-salt power plants, the 3.3 USD/MMBTU and 2.9 USD/MMBTU gas prices increase this amount to 4 GW and 8 GW-reaching approximately 40 Mm 3 /day of gas consumption in total.
Since pre-salt projects are only evaluated by their energy production, it is noticeable that their main competitors were renewable sources. The increment in baseload gas-fired plants implies a in reduction in other alternatives, as it is possible to observe in Figure  7, where the total VRE capacity is presented. Figure 7 shows total installed capacity for non-conventional renewable sources (which means solar, wind and biomass) considering different pre-salt natural gas prices. transmission is also considered, there is another tradeoff (not explored in this paper) that is to build candidates close to the load center or to invest in new technology far away from it, which would require the construction of new transmission lines Figure 6 presents the amount of installed capacity for pre-salt gas-fired projects for a range of pre-salt gas prices, including all taxes, sector charges and gas distribution cost. As shown, the maximum price for base-loaded pre-salt natural gas that can charged to the power system and that would enable the economic construction of any volume is 3.9 USD/MMBTU. As expected, the reduction in natural gas price increases the attractiveness of these projects, as their volume is increased. While the decision for 3.9 USD/MMBTU gas price is to install 1 GW of those pre-salt power plants, the 3.3 USD/MMBTU and 2.9 USD/MMBTU gas prices increase this amount to 4 GW and 8 GWreaching approximately 40 Mm³/day of gas consumption in total.
Since pre-salt projects are only evaluated by their energy production, it is noticeable that their main competitors were renewable sources. The increment in baseload gas-fired plants implies a in reduction in other alternatives, as it is possible to observe in Figure 7, where the total VRE capacity is presented. Figure 7 shows total installed capacity for nonconventional renewable sources (which means solar, wind and biomass) considering different pre-salt natural gas prices.  For pre-salt natural gas price of 2.9 USD/MMBTU, the total renewable capacity expansion is about 8 GW. If the natural gas price were 3.7 USD/MMBTU, the total renewable expansion is duplicated (16 GW). After 4.0 USD/MMBTU, the natural gas price does not affect the system expansion since the pre-salt power plants would not be competitive anymore.
Accordingly, as expensive pre-salt natural gas is, more competitive non-conventional renewable sources are. It should be noted, however, that in terms of installed capacity, the displacement of pre-salt power plants by renewable projects would not be equal due to the differences between their dispatch factors.
Another important result of this model is the total system cost, which incorporates the investment and operating costs. For propose of this paper, the annualized total system cost was presented a range of pre-salt natural gas prices in Figure 8. Noticeably, the system increases its total cost accordingly to the growing profile of the pre-salt natural gas price, until the cost in which these baseload powerplants are not economical interesting to the power sector. For pre-salt natural gas price of 2.9 USD/MMBTU, the total renewable capacity expansion is about 8 GW. If the natural gas price were 3.7 USD/MMBTU, the total renewable expansion is duplicated (16 GW). After 4.0 USD/MMBTU, the natural gas price does not affect the system expansion since the pre-salt power plants would not be competitive anymore.
Accordingly, as expensive pre-salt natural gas is, more competitive non-conventional renewable sources are. It should be noted, however, that in terms of installed capacity, the displacement of pre-salt power plants by renewable projects would not be equal due to the differences between their dispatch factors.
Another important result of this model is the total system cost, which incorporates the investment and operating costs. For propose of this paper, the annualized total system cost was presented a range of pre-salt natural gas prices in Figure 8. Noticeably, the system increases its total cost accordingly to the growing profile of the pre-salt natural gas price, until the cost in which these baseload powerplants are not economical interesting to the power sector. It is important to highlight that since part of the renewable projects represents wind farms, which are mainly from Northeast region, the optimization model has also considered transmission system expansion reinforcements in its results, so each expansion includes the transmission cost in its tradeoff.

Pre-Salt Natural Gas Breakeven Price-Considering Security and Adequacy Constraints
This section presents results of simulations considering Equations (13) and (14), which are dynamic operating reserves and firm capacity constraints. In this alternative scenario, the optimization model needs to cope with those constraints, so demand growth is not the only driver for system expansion. The operating reserve requirements are dynamically and endogenously defined by the optimization model itself for each model run, that determines a new supply expansion scenario for each gas price hypothesis. The representation of the adequacy constraint (Equation (14) is, however, trickier. Each generation candidate has a different firm contribution for capacity, and it beyond the scope of this work to define their calculation, which is carried out in Brazil by the Ministry of Energy supported by the Energy Planning Company. All of the resources contribute in one way or the other for firm capacity. The typical values for the Brazilian power system are described below: The firm capacity contribution of each candidate is defined in Table 4. It is important to highlight that since part of the renewable projects represents wind farms, which are mainly from Northeast region, the optimization model has also considered transmission system expansion reinforcements in its results, so each expansion includes the transmission cost in its tradeoff.

Pre-Salt Natural Gas Breakeven Price-Considering Security and Adequacy Constraints
This section presents results of simulations considering Equations (13) and (14), which are dynamic operating reserves and firm capacity constraints. In this alternative scenario, the optimization model needs to cope with those constraints, so demand growth is not the only driver for system expansion. The operating reserve requirements are dynamically and endogenously defined by the optimization model itself for each model run, that determines a new supply expansion scenario for each gas price hypothesis. The representation of the adequacy constraint (Equation (14) is, however, trickier. Each generation candidate has a different firm contribution for capacity, and it beyond the scope of this work to define their calculation, which is carried out in Brazil by the Ministry of Energy supported by the Energy Planning Company. All of the resources contribute in one way or the other for firm capacity. The typical values for the Brazilian power system are described below: The firm capacity contribution of each candidate is defined in Table 4. We understand these constraints are exogenously defined and may be considered as rather arbitrary and determinant to influence the results. This is true, however, our practical work shows that system planners have had great interest for this type of representation in the planning models. However, inn our runs, these constraints were not binding. Figure 9 presents the total installed capacity of gas-fired TPPs using pre-salt natural gas for a range of gas prices.  We understand these constraints are exogenously defined and may be considered as rather arbitrary and determinant to influence the results. This is true, however, our practical work shows that system planners have had great interest for this type of representation in the planning models. However, inn our runs, these constraints were not binding. Figure 9 presents the total installed capacity of gas-fired TPPs using pre-salt natural gas for a range of gas prices. For this simulation, the breakeven price increases from 3.9 to 4.6 USD/MMBTU. In order to have at least 6 GW of new projects (an equivalent consumption of 30 Mm³ of natural gas per day), natural gas price must be lower than 4.0 USD/MMBTU. For a natural gas price of 3.5 USD/MMBTU, the added capacity grows from 3 GW in only energy evaluation analysis to 7 GW in the security-constrained simulation.
With a gas price higher than 4.6 USD/MMBTU, pre-salt is replaced by 2.2 GW of open cycle natural gas and 1 GW of TPPs using LNG.
Noticeably, the attractiveness of these thermal plants grows substantially due to three main reasons: 1. TPPs contribute for operating reserve (due to its small flexible portion) and firm capacity requirements; 2. The growth of VRE increases the operating reserve requirements; 3. The optimal volume of capacity additions of baseload dispatch increases the hydro storage levels, thus enabling hydro plants to supply, in a cost-effective way, the operating reserves dynamically defined. An interesting discussion-but out of the scope of this paper-is how to share the benefits associated to the reserves provision between hydro ("executers") and the base load gas plants ("enablers"). For this simulation, the breakeven price increases from 3.9 to 4.6 USD/MMBTU. In order to have at least 6 GW of new projects (an equivalent consumption of 30 Mm 3 of natural gas per day), natural gas price must be lower than 4.0 USD/MMBTU. For a natural gas price of 3.5 USD/MMBTU, the added capacity grows from 3 GW in only energy evaluation analysis to 7 GW in the security-constrained simulation.
With a gas price higher than 4.6 USD/MMBTU, pre-salt is replaced by 2.2 GW of open cycle natural gas and 1 GW of TPPs using LNG.
Noticeably, the attractiveness of these thermal plants grows substantially due to three main reasons:

1.
TPPs contribute for operating reserve (due to its small flexible portion) and firm capacity requirements; 2.
The growth of VRE increases the operating reserve requirements; 3.
The optimal volume of capacity additions of baseload dispatch increases the hydro storage levels, thus enabling hydro plants to supply, in a cost-effective way, the operating reserves dynamically defined. An interesting discussion-but out of the scope of this paper-is how to share the benefits associated to the reserves provision between hydro ("executers") and the base load gas plants ("enablers"). Figure 10 illustrates the installed capacity of VRE for different pre-salt natural gas prices.  Figure 10 illustrates the installed capacity of VRE for different pre-salt natural gas prices. Noticeably, the total amount of VRE reduces drastically when compared to the energy simulation, which is a consequence of their low contribution to firm capacity and increasing of spinning reserve requirements. Another consequence of both constraints is the need of other back-up sources, such as open cycle thermopower plants, to bring more flexibility to the system.
The total system cost is presented in Figure 11. Again, the growing cost of the natural gas for the power sector results in higher total cost. Besides that, the breakeven price for the attractiveness of the baseload thermopower in the Brazilian power system entailed a drastic increase in total investment cost.

Conclusions
This paper presented a methodology based on a multi-stage and stochastic capacity expansion planning model to determine the competitiveness of a given technology against an existing system considering its reliability contribution, for peak, energy, and ancillary services. Our work applies this methodology to calculate the tradeoffs between base- Noticeably, the total amount of VRE reduces drastically when compared to the energy simulation, which is a consequence of their low contribution to firm capacity and increasing of spinning reserve requirements. Another consequence of both constraints is the need of other back-up sources, such as open cycle thermopower plants, to bring more flexibility to the system.
The total system cost is presented in Figure 11. Again, the growing cost of the natural gas for the power sector results in higher total cost. Besides that, the breakeven price for the attractiveness of the baseload thermopower in the Brazilian power system entailed a drastic increase in total investment cost.
Energies 2021, 14, x FOR PEER REVIEW 17 of 21 Figure 10 illustrates the installed capacity of VRE for different pre-salt natural gas prices. Noticeably, the total amount of VRE reduces drastically when compared to the energy simulation, which is a consequence of their low contribution to firm capacity and increasing of spinning reserve requirements. Another consequence of both constraints is the need of other back-up sources, such as open cycle thermopower plants, to bring more flexibility to the system.
The total system cost is presented in Figure 11. Again, the growing cost of the natural gas for the power sector results in higher total cost. Besides that, the breakeven price for the attractiveness of the baseload thermopower in the Brazilian power system entailed a drastic increase in total investment cost.

Conclusions
This paper presented a methodology based on a multi-stage and stochastic capacity expansion planning model to determine the competitiveness of a given technology against an existing system considering its reliability contribution, for peak, energy, and ancillary services. Our work applies this methodology to calculate the tradeoffs between base- Figure 11. Total cost (sum of operating and investment) for different pre-salt natural gas prices-Reliability constraints analysis.

Conclusions
This paper presented a methodology based on a multi-stage and stochastic capacity expansion planning model to determine the competitiveness of a given technology against an existing system considering its reliability contribution, for peak, energy, and ancillary services. Our work applies this methodology to calculate the tradeoffs between base-loaded gas supply and VRE supply considering their value for these adequacy and operating services to the system. This allows for a comparison between the integration costs of these technologies on the same basis, thus helping policymakers to better decide on the best way to integrate the gas resources in an electricity industry which is increasingly renewable.