A bi-level model for co-expansion planning of generation and energy storage system (ESS) with contract pricing

In co-expansion planning of generation and storage systems, the investor aims to determine the time, location, and capacity of the generation energy storage units. The main challenge is to install these systems in a way that the investor’s proﬁt is maximized. In addition, market-clearing must take place in order to optimize social welfare. This paper studies a co-expansion planning problem as a bi-level model that involves the expansion of generation and energy storage units. Generating units include wind and gas turbines and the energy storage system (ESS) is compressed air. This paper addresses the upper-level problem of increasing investor proﬁts and the lower-level problem of increasing social welfare. Simulation results show that an investor can achieve the highest possible proﬁt by simulta-neously investing in the wind and gas turbine as well as the storage systems using strategic behaviour (price offer/bid close to market price) and participating in the spot market and guaranteed purchase contract. In addition, improving the load growth rate and guaranteed purchase contracts increase the investment in the generation-storage units. The simulation results of this study are compared with other studies for validation purposes.


INTRODUCTION
Environmental concerns, increasing the need for energy, and decreasing fossil fuel consumption have led to the use of renewable energy sources in electric power generation. Today, wind energy is one of the most important sources of renewable energy production in many countries, replacing conventional fossil power plants [1][2][3]. In studies [4,5], WT and PV combinations have been used to meet the grid load. Studies [6,7] have been conducted to use wind energy to cope with greenhouse gas emissions from fossil fuels. The [6] uses life-cycle assessment (LCA) to analyse the life-cycle greenhouse gas (GHG) emissions of onshore and offshore wind turbines with a nominal capacity of 2 MW. The later objective of this study was to advance understanding of onshore and offshore wind energy and to inform policy, planning, and investment decisions for the future growth of wind power. They also performed a sensitivity analysis to further show that the distance from wind turbine factory to wind farm site has a more significant influence on the life-cycle GHG emission. Authors in [7] present a new method that assesses a range of CO 2  Their results show that the annual displacement emission factor by wind energy may vary from about 422 to 741 t CO 2 /GWh in 2015 to around 222-515 t CO 2 /GWh in 2050 [7]. The aforementioned studies highlight the great importance of the expansion planning of wind resources. Authors of [8] proposed a sizing model (expansion planning) for the construction of a wind-solar production unit as a renewable energy expansion planning. In [9], optimal generation expansion planning of renewable energy through the use of the 6-Bus Garver network was studied. By participating in competitive markets, the above studies can put their aim increasing of investor profit instead of reducing costs, and propel investment from the government to the non-government sector. In [10][11][12], the authors presented a solution to feed the grid load with renewable energy with the aim of reducing costs. In these studies, eight different types of renewable energy have been proposed to meet global electricity needs. These studies claim that renewable sources can meet all of the world's energy needs at a low cost. The authors in [13] have used a combination of wind turbine, solar photovoltaic, and energy storage systems for powering a large-scale grid in Pakistan. There are two core motivations for choosing such arrangements. First, the same type of renewable resources located at a single site have high fluctuation, so we model various types of renewable resources located at various locations to have lesser fluctuations accompanied by relatively compact energy storage systems. The second incentive is to find the true minimum cost combination, excluding subsidies and relaxation in taxes for governments. It is found that the least cost combinations require excessive generation capacity, diverse renewable generation resources, and energy storage techniques, which would meet the load requirements and have less carbon emissions.
In recent decades, electricity markets have been restructured in many countries and have become vertically integrated into competitive structures. The purpose of these changes was to encourage people to participate in the electricity market and provide incentives for the better performance of the electricity industry [14][15][16][17]. The objective of offering incentives is to encourage investors to invest more in the renewables industry [18,19]. In competitive markets, prices are determined by suppliers and consumers with regard to the constraints of transmission networks [20]. For the ideal market, the market would be in perfect competition when participants bid/offer for their marginal costs [21]. But because of the limitations of the market players in the electricity market, it is difficult to reach the market with complete competition. One of these limitations is the producer's greed that they offer maximum price instead of marginal price [9,22]. In [23,24], a nodal pricing approach was used. Applying nodal pricing to a model distribution network was resulted in reducing the amount of power loss and voltage improvement. In [26], the locational marginal price (LMP) approach was used. In [26], the optimal contract price approach was used. Such an approach is designed for a market environment in which the distribution company (DisCo) can buy energy either from the wholesale energy market or from the DG units within its network. In [27,28], bi-level planning is used to solve the expansion problem. In these references, the bi-level problem is transformed into a mathematical program with equilibrium constraint (MPCE) and then solved.
When the competitive market debate is in the midst of it, the role of the storage system is significant. One of the importance of a storage system is that it stores (or buys) electrical energy at low-prices and sells it at high-prices. So many studies have been devoted to investigating the application of the storage systems in the electric power network [29][30][31][32][33][34][35][36]. Two different types of storages including electrically and non-electrically were considered in different studies. In electrical storage, the use of batteries as a conventional method is discussed in [30], which can be used on a small scale. In the non-electrical method, conversion of electrical energy to other energies and storage on a large scale is possible, including upstream water storage and compressed air energy storage (CAES) in discharged mines, which has been used in different studies [31][32][33]. CAES is a less expensive storage method that stores energy generated at one time for use at another time using compressed air demand is low and the power plant is over-produced. At peak hours of energy consumption, compressed air passes through the turbine and produces double energy. In fact, CAES is an "electricity-compressed airelectricity" conversion system [34]. Depending on geographical conditions, hard-rock caves, underground dredged mines, and artificial underground cavities can be used as CAES [35]. The use of clean compressed air can extend the life of turbine storage systems [36]. The authors in [37,39] examined a small system including photovoltaics, wind turbines, storage, and diesel generators. In these studies, the amount of electricity storage capacity has been calculated. In [38] an optimal power grid system including PV, WT, and ESS is proposed that examines the cost of the system. Table 1 compares the differences between the studied articles.
This study presents a new framework for solving the coexpansion planning problem in a transmission network by considering an investment in wind, gas, and storage units in a bilevel model. The transmission network transfers the candidate points to the CAES storage builder, which will be selected at the end of the program, and is optimally profitable. It is worth noting that atmospheric conditions for wind turbines are also considered for each candidate. In the upstream problem, the complex investor profits are maximized and in the downstream problem, social welfare is maximized. Investment incentives include bilateral contracts to guarantee power purchase. The bi-level problem is transformed into an MPEC singlelevel problem using the mathematical programming method of equilibrium constraints, which is achieved by applying the Karush-Kuhn-Tucker (KKT) conditions. The contributions of this study are as follows: Considering the candidate points for the energy complex (WT, GT, and CAES) in a transmission network. The contract price is obtained strategically as an internal variable to increase investor profits. Proposing a new algorithm to solve the Co-Generation Expansion Planning (C-GEP) problem.
The rest of this paper is organized as follows. In Section 2, the proposed model features are presented. Section 3 demonstrates the formulation of mathematical. Section 4 presents the linearization. Section 5 presents the numerical studies. The conclusion is demonstrated in Section 6. Figure 1 shows the flowchart of the proposed model. The proposed model is a bi-level model that includes both upper and lower-level with objectives and constraints. The goal of the upper level of the proposed model is to minimize the cost (fixed and variable) of wind turbines, gas turbines, and compressed air energy storage systems and maximize their profits (selling) by presenting a strategic offering, while at the lower-level, there is an independent system operator (ISO) which runs the marketclearing equations with the purpose of increasing social welfare. The output variables are energy storage system (ESS) capacity (power and energy), GT capacity, WT capacity, installation time, installation location, contract price, and market price. Between these outputs, the capacity of WT, GT, ESS, their time, and   Figure 2. To solve the problem, GAMS software, CPLEX solver, and MIP method were used.

Bi-level model
Equation (1) is the upper-level objective function. The purpose of the objective function is maximizing investor profit and minimizing its costs. In this study, the investor wants to invest in the wind-gas-storage complex. The objective function includes two parts fixed and variable costs. The fixed costs are the investment cost that includes five terms. First-term is the investment cost of the storage reservoir, second and third terms are invest-ment costs of storage charge and discharge device, the fourth term is the investment cost of wind turbines, and the fifth term is the investment cost of gas turbines. The variable costs include seven terms. The first term is the cost paid by the storage system for power purchased from the market (charging). This term includes the cost of power and charge. Because this term is cost, it has a negative sign. The second to seventh terms are the money that comes from selling the storage system power on the market (discharging), the storage system with the bilateral contract (discharging), the wind turbine on the market, the wind turbine with the bilateral contract, the gas turbine on the market, and the gas turbine with the bilateral contract, respectively. The second/third term includes the cost of discharge with a negative sign and market/contract price with a positive sign. The sixth/seventh term includes the cost of gas turbine with The indices in the equations of this paper are introduced as follows: the index of the rival investor units is shown by k. The index of the existing generation units is shown by i. The indices of demands, target years and weeks, are shown by d, t, and w, respectively. r is an index for incidental conditions.
(2) of [22] (3) (4) of [22] (5) (7) of [22] (8) (9) of [22] (10) (11) of [22] In Equation (1): IC res s , IC ch s , IC dis s , IC wt and IC gt are the investment cost of a storage reservoir, charge device, discharge devices, wind turbine, and gas turbine, respectively. K res s , K ch s , K dis s , K wt and K gt are the capacity of the storage reservoir, charge devices, discharge devices, wind turbine, and gas turbine, respectively. a c(w,t ,r ) is the price of contract and (w.t .r ) is the price of the market. The marginal cost of the gas turbine, charge devices, and discharge devices are shown by MC gt , MC ch s and MC dis s , respectively. r is the probability of the scenario. P dis.m (w.t .r ) , P wt .m (w.t .r ) and P gt .m (w.t .r ) are supplied power to market by discharge devices, wind, and gas turbine, respectively. Supplied contract power by discharge devices, wind turbine, and gas turbine is is purchased power from the market by charge devices.
The upper-level problem in addition to the objective function has 11 Equations (2)- (12). Equation (2) is showing a limitation of investing in the wind turbine. Equation (3) is showing the limitation of investing in a gas turbine. Equations (4), (5) and (6) show the limitation of investing in charge devices, discharge devices, and reservoirs. Equation (7) indicates that the storage system at any time can only be in one of the moods of recharge, discharge, or unemployment. Equations (8) and (9) are showing limitations of hourly power charging. Equation (10) is showing the limitation of power discharging in each hour. Equation (11) is showing the limitation of power stored in a reservoir in each hour. Equation (12) depicts the calculation of the level of the reservoir in each hour, and it also signifies that the amount of power in the storage reservoir must be equal at the beginning and end of the week. In other words, the values of power charged and discharged during a week must be equal and the difference must be zero.
and K res.max s are the maximum capacity of a wind and gas turbine, charge and discharge devices, and storage reservoir, respectively.P ch (w.t .r ) andP dis (w.t .r ) are maximum power of charge and discharge devices. e (w.t .r ) is stored energy in storage.
Equation (13) represents the lower-level objective function of the problem. The purpose of this equation is to maximize social welfare by ISO. The lower-level objective function shows the funds received by selling energy with a negative sign and the funds for the purchasing energy with a positive sign. The lower-level objective function consists of eight terms. The first term is related to power charge by storage from the market. The second and third terms are costs paid to the storage for purchasing power from the spot market and guaranteed purchase contract, respectively. The fourth and fifth terms are costs paid for purchasing wind turbine power from the spot market and guaranteed purchase contract, respectively. The sixth and seventh terms are costs paid to the gas turbine for purchasing power from the spot market and guaranteed purchase contract, respectively. The eighth term indicates the cost paid to units existing in the generation network for purchasing power from them. The ninth term describes the cost paid to other new-generation units participating in the market intending to invest in the generation sector.
Price bid/offer of charging devices, discharging devices, wind turbine, gas turbine, existing units, rival investor units, and demands are shown by o ch (20) of [22] (23) Equations (14)- (24) indicate the constraints of the lowerlevel problem. It is essential to use KKT conditions to solve bi-level problems. In order to use KKT conditions, the constraints must be applied in both primary and dual forms of constraints. Equation (14) indicates the equilibrium constraint of power. The dual of this constraint is represented by λ. λ is the market-clearing price (MCP). Equation (15) shows a limitation of charged power in each hour for each scenario. In Equation (15), min ch is the dual of lower bound and max ch is the dual of the upper bound. Equations (16) and (17) are showing the limitation of power discharged by the storage in the spot and contract markets. In Equation (16) is the dual of lower bound and max dis,c is the dual of the upper bound.
Equations (18) and (19) are limitations of powers sold by a wind turbine in spot and contract markets. In Equation (18),

Bi-level to MPEC
If KKT conditions are applied to the bi-level problem, the problem becomes a single-level problem (MPEC). MPEC involves one objective function and some constraints. The objective function of MPEC is the same as upper-level objective function and constraints of MPEC are the bi-level problem and the Lagrange equation. The Lagrange equation obtained as follow [28]: In equation 28 the characters h and g are equal and unequal constraints in bi-level problem, respectively.
(41) of [22] (54) In MPEC problem, Equations (14)- (27) will be present in the previous form and constraints of lower-level problem will be transformed by KKT conditions [28]. Equations (40)-(63) represent the constraints on the dual problem obtained by applying the KKT conditions.

Conditions of complementary
In conditions of complementary (in KKT): (48) of [22] To linearize Equation (65) the following is done: (49) of [22] (66) where X is obtained as follows: (68) M is a big fixed number [41]. In order to convert non-linear terms to linear terms in the high-level objective function, a strong duality theorem and coke terms are used [28]. The issue of strong duality is Equations (67), (68).

CASE STUDY DATA
In this section, a 6-buses test system is used as a case study (Figure 3). The specifications of the network and the data related to it are in [22]. The problem presented in this paper is solved in the GAMS software environment. A CPLEX solver is used to solve this problem. Details of the computer system that used to solve this problem are RAM: 16 GB, CPU: Core i7.

Test system 1 (6-bus Garver)
In this section, the behaviour of the energy complex and other market players is analysed. The behaviour of the energy complex includes strategic or non-strategic performance, presence or absence in competitive markets, selling of energy in the spot market, and selling of energy with the bilateral contract (guaranteed). The behaviour of other participants of the market is that they all declare their marginal price as the offer/bid. The simulation results are given in Tables 2, 3, and 4. Table 2 shows the simulation results of the proposed problem for the wind turbine. Table 3 presents the gas turbine capacity that can be built according to the simulation results of the proposed problem. In Table 4 can be observed the simulation results of the proposed problem for the storage system. In Tables 2, 3, and 4, the numbers in parentheses represent the bus-no. For example, 180(4) means that in bus 4, 180 MW capacity will be built.
This article covers all aspects of the issue of [9,22] and also has thorough case studies. This article examines eight case studies, each of which is discussed below.
Case study 1: In this case study, the power supply system is vertically integrated and there is no private company involved. In this system, from the production to the distribution sector, one organization (generally the government) is in control. In such a system, profit maximization is not considered, and  merely a reduction in production costs is considered. The model presented in this system is not capable of responding. Case study 2: In this case study, only the electricity market is studied. Generation-storage companies (energy complex) market their products and buy or sell their goods (electrical energy) in the market. By implementing the model presented in this system, the simulation results are 170 MW for WT, 210 MW for GT, and 414 MW for the energy storage system (ESS). The benefit from this case for energy complex is 342 M€ which include 190 M€ for WT, 120 M€ for GT, and 32 M€ for ESS.
Case study 3: In this case study, there are no studies of the electricity market and only the exchange of power between the integrated system and complex (as IPP) occurs. In this case study, the integrated system considers an incentive to invest in IPPs (guaranteed purchases of electricity). Existing a guaranteed purchase can encourage the investor in investing in generation and storage systems. By applying the model presented in this paper problem, the simulation results in this case study are 120 MW, 180 MW and 300 MW for WT, GT, and ESS, respectively. The profit for the total energy complex is 110 M€, 80 M€ and 18 M€ for WT, GT, and ESS, respectively.
Case study 4: In this case, in addition to participating in the electricity market, the energy complex can sell its products on a guaranteed contract. Guaranteed sales increase investment. According to the results presented in Tables 2 and 3, the wind turbine and gas turbine invest 440 MW and 530 MW which lead to a profit of 480 M€ and 320 M€. In Table 4, the profit of the storage system in this case study is approximately 92 M€. Consequently, the total profit of the energy complex is approximately 892 M€. It can be seen that with the addition of the guaranteed contract as an investment incentive, the volume of investment has increased significantly.
Case study 5: The strategic behaviour is offering after guessing the offers/bids of other market participants. In this case study, the complex's decision as an IPP is to bring the offered price of energy into the integrated system close to the consumer price to generate more profit. But because there is no real electricity market in this case study, this cannot be achieved. The following results were obtained in this case study: 120 MW for WT, 180 MW for GT, and 300 MW for ESS, which resulted in 110 M€ for WT, 80 M€ for GT, and 18 M€ for ESS.
Case study 6: In this case study, the energy complex can behave strategically in the electricity market. Due to the results in Tables 2 and 3, the sector of wind and gas turbines invest 858 MW and 600 MW which amounts to a profit of 605 M€ and 380 M€. As can be seen in Table 4, the profit of the storage system in this case study is approximately 96 M€. Consequently, the total profit of the energy complex is approximately 1081 M€. It can be seen that with the addition of the guaranteed contract as an investment incentive besides the electricity market, the volume of investment has increased significantly.
Case study 7: In this case study, the energy complex acts as an IPP without considering the energy market and exchange the required power with the integrated system. In this case study, we have considered both strategic behaviour and guaranteed energy purchases as an investment incentive. Due to the existing conditions, the energy complex can have greater capacity and more In this case study like case 4, participation in the market and the guaranteed contract is possible, with this difference that in case study 8 the investor behaves strategically. The existence of the three issues of the electricity market, guaranteed contracts, and strategic behaviour has significantly increased investment in the wind, gas, and storage sectors. Due to the Tables 2, 3 and 4, the energy complex in the sectors of WT, GT, and ESS has benefited 780 M€, 490 M€, and 108 M€, which the total benefit of this case study is 1378 M€. The details of the investment capacity and profitability of the units can be seen in Tables 2, 3, and 4. Market price and the guaranteed purchase contract price for a random hour in each period are presented in Table 5. In Tables 2, 3, and 4, the growth rate of the load and the coefficient of sales as contractually are 2% and 50%, respectively. Table 5 provides market prices and guaranteed purchase prices for each period (per random hour).

Comparison of case studies
To compare the case studies and understand their differences, Table 6 is provided. Table 6 examines the profit of each case study per MW. According to this table, we find that the profit-tocapacity ratio for case 8 (the proposed model of the problem) is better than for the others. Case 8 is the most complete proposed model in the field under study.

Changes in growth rates and contract participation
The results are presented in Tables 2, 3, and 4 with a load growth rate of 2%. To see the impact of the load growth rate on the simulation results, the load growth rates are considered as 2%, 4%, and 7%. The results are presented in Table 7. According to this table, increasing load growth rates will increase investment. It can be also seen that as load growth rates increase, investment capacities increase.
The results of the simulation are presented in Tables 2, 3, and 4 with a participation rate of 50%. To see the impact of the participation rate on the simulation results, the load growth rates are considered as 50%, 65%, and 80%. The results are presented in Table 8. According to this table, increasing participation rates will increase investment. Besides, as the participation rate increases, investment capacities increase.

Test system 2 (IEEE 24-bus RTS)
In this section, the proposed algorithm for validation in a larger network is simulated to determine the ability of the proposed problem-solving method. For this purpose, IEEE 24-bus test system has been used [43]. The specifications of the network and the data related to it are in [43]. In this network, all buses are candidates for installation of a generation-storage complex to make the dimensions of the problem bigger, but in reality, global networks are first zoned and then the problem is solved with a few numbers of buses.
The simulation results are shown in Tables 9 and 10. Table 9 shows the buses that generation-storage units will be installed in each period. Table 10 shows the installed capacity of wind turbines, gas turbines and storage systems during each period. Table 10 also shows the investor's profit.
Case study 1: In this case study, the power supply system is vertically integrated and there is no private company involved. In this system, from the production to the distribution sector,  M W )  --------Period 2 (MW)  -3, 15  10  3, 15, 18  10  3, 15, 18, 23  10  3, 15, 18, 23   Period 3 (MW)  -3, 9  9  3, 9, 17  9  3, 9, 13, 17  9  3, 9   Total profit (M€) -1480 520 3100 520 3820 520 5150 one organization (generally the government) is in control. In such a system, profit maximization is not considered, and merely a reduction in production costs is considered. The model presented in this system is not capable of responding. Case study 2: In this case study, only the electricity market is studied. Generation-storage companies (energy complex) participate in the market and buy or sell their goods (electrical energy) in the market. By implementing the model presented in this work, the simulation results are 760 MW for WT, 840 MW for GT and 1150 MW for the energy storage system (ESS). The benefit of this case for the energy complex is 1480 M€.
Case study 3: In this case study, there are no studies of the electricity market and only the exchange of power between the integrated system and complex (as IPP) occurs. In this case study, the integrated system considers an incentive to invest in IPPs (guaranteed purchases of electricity). Existing a guaranteed purchase can encourage the investor to invest in generation and storage systems. By applying the model presented in this paper problem, the simulation results in this case study are 260 MW, 420 MW and 710 MW for WT, GT, and ESS, respectively. The profit for the total energy complex is 820 M€.
Case study 4: In this case, in addition to participating in the electricity market, the energy complex can sell its products on a guaranteed contract. Guaranteed sales increase investment. According to the results presented in Table 16, the wind turbine, gas turbine and energy storage system invest 1230 MW, 1540 MW and 3600 MW, which lead to a profit of 3100. It can be seen that with the addition of the guaranteed contract as an investment incentive, the volume of investment has increased significantly.
Case study 5: The strategic behaviour is offering after estimating the offers/bids of other market participants. In this case study, The complex (as an IPP) decides to bring the proposed energy price closer to the consumer price in order to make more profit. But because there is no real electricity market in this case study, this cannot be achieved. The following results were obtained in this case study: 290 MW for WT, 380 MW for GT and 710 MW for ESS, which resulted to 820 M€.
Case study 6: In this case study, the energy complex can behave strategically in the electricity market. Due to the results in Table 10, in the sector of wind turbine, gas turbine and energy storage systems invest 1620 MW, 1770 MW and 4000 MW, respectively. Consequently, the total profit of the energy complex is approximately 3820 M€. It can be seen that with the addition of the guaranteed contract as an investment incentive besides the electricity market, the volume of investment has increased significantly.
Case study 7: In this case study, the energy complex acts as an IPP without considering the energy market and exchange the required power with the integrated system. In this case study, we have considered both strategic behaviour and guaranteed energy purchases as an investment incentive. Due to the existing conditions, the energy complex can have greater capacity and more profit. The applying of the model presented in this case study illustrates this issue. The results are in the form of 290 MW for WT, 380 MW for GT and 710 MW for ESS. The benefits include 820 M€.
Case study 8: In this case study like case 4, participation in the market and the guaranteed contract is possible, with this difference that in case study 8 the investor behaves strategically. The existence of the three issues of the electricity market, guaranteed contracts, and strategic behaviour has significantly increased investment in the wind, gas and storage sectors. Due to Table 10, the energy complex in the sectors of WT, GT and ESS has benefited 5150 M€. The details of the investment capacity and profitability of the units can be seen in Table 10. In Table 10, the growth rate of the load and the coefficient of sales as contractually are 2% and 50%, respectively.

Comparison of case studies
To compare the case studies and understand their differences, Table 11 is provided. Table 11 examines the profit of each case study per MW. According to this table, we find that the profit-tocapacity ratio for case 8 (the proposed model of the problem) is better than for the others. Case 8 is the most complete proposed model in the field under study (similar to Garver system).

CONCLUSIONS
This paper presents a bi-level planning model. The proposed model is decomposed into two general parts. The upper-level problem with the objective of increasing the investor's profit and related constraints, and the lower-level problem with the objective of increasing social welfare and related constraints. In addition to the general sections, the problem in this paper has details, too. These details include calculating the capacity and installation time of wind, gas, and storage units and obtaining contract prices as problem variables. Modelling results show that an investor can achieve the highest possible profit by simultaneously investing in wind turbines, gas turbines, and storage systems. In addition to making a profit by investing in the manufacturing sector, the investor has been able to greatly increase his profit by participating in a variety of markets and strategic behaviour in these markets. The important results of the simulation are as follows: • Guaranteed contracts offered by ISO have increased investment in the energy complex. • Strategic behaviour in offering against rival units has increased investment in the energy complex. • Increasing the load growth rate increases investment.
• The storage units increase investor profits. In addition, these units act as market price regulators. The investor can use the ESS to influence the market price for himself.