 Original research
 Open Access
 Published:
Bilevel optimization based twostage market clearing model considering guaranteed accommodation of renewable energy generation
Protection and Control of Modern Power Systems volume 7, Article number: 30 (2022)
Abstract
The existing electricity market mechanisms designed to promote the consumption of renewable energy generation complicate network participation in market transactions owing to an unfair market competition environment, where the low cost renewable energy generation is not reflected in the high bidding price of high cost conventional energy generation. This study addresses this issue by proposing a bilevel optimization based twostage market clearing model that considers the bidding strategies of market players, and guarantees the accommodation of renewable energy generation. The first stage implements a dualmarket clearing mechanism that includes a unified market for trading the power generations of both renewable energy and conventional energy units, and a subsidy market reserved exclusively for conventional generation units. A readjustment clearing mechanism is then proposed in the second stage to accommodate the power generation of remaining renewable energy units after first stage energy allocations. Each stage of the proposed model is further described as a bilevel market equilibrium problem and is solved using a coevolutionary algorithm. Finally, numerical results involving an improved IEEE 39bus system demonstrate that the proposed twostage model meets the basic requirements of incentive compatibility and individual rationality. It can facilitate the rational allocation of resources, promote the economical operation of electric power grids, and enhance social welfare.
Introduction
China continues to promote the development of renewable energy in response to the two goals of carbon neutrality and peak carbon emissions proposed by President Xi Jinping [1,2,3]. As a result, installed wind power capacity has reached 280 GW by the end of 2020 with an annual power generation of 466.5 TWh. It is expected that the share of renewable energy generation in China's primary energy supply will increase to 67% by 2050 [4]. Accordingly, the momentum to promote the participation of renewable energy generation in electricity market transactions has become unstoppable [5].
The abovediscussed efforts have motivated considerable research to facilitate the integration of a high proportion of renewable energy generation into electric power grids. For example, the challenges to grid operation posed by increased renewable energy penetration and associated technical solutions have been investigated in [6]. Researchers have also proposed the use of energy storage systems to balance the volatility and intermittency of renewable energy generation [7]. Other studies have investigated the implementation for the participation of renewable energy generation in market transactions. For example, the impact and challenges associated with largescale wind power penetration on the Australian electricity market have been investigated [8], while the impact of wind power forecasting errors on the Nordic electricity market have been analyzed [9]. Further analysis has suggested that the incremental power in wind and solar generation would reduce the daily zonal market price in the Italian electricity market [10].
The gradually increased participation of renewable energy generation in electricity markets has led to the development of appropriate modeling methods for electricity markets in a number of recent studies. Among these, the impact of renewable energy generation participation in the market on the market equilibrium and the bidding game strategy of renewable energy generation has been investigated. For example, an equilibrium model was proposed for the participation of largescale wind power generation in the shortterm electricity market, and the Nash equilibrium problem of the electricity market was solved by means of game theory and a diagonalization algorithm [11]. Similarly, changes in equilibrium electricity market prices have been investigated with different power generation proportions [12]. The development of operational schemes for electric power systems and energy markets is no longer limited to optimization models involving topdown unified dispatch, but now also consider the decisionmaking behaviors of independent market players. For example, the bidding strategy behaviors and decisions of market players have been considered in a bilevel optimization model of electricity markets [13] while [14] has investigated the optimal bidding strategy for wind power generation to achieve maximum profits under conditions of uncertain power generation and clearing price. Similarly, in [15], the impacts of the strategic behaviors of electric power generation companies and the proportion of renewable energy generation on the locational marginal price of electricity have been studied. These studies have demonstrated that market players have an incentive to bid strategically.
However, the penetration rate of renewable energy generation is increasing, and the marginal cost of renewable energy is close to zero [16]. Therefore, the participation of renewable energy generation in the electricity market will seriously reduce the market clearing price and greatly decrease the profit of conventional energy generation. Nonetheless, another study has demonstrated that current operating electricity markets require considerable improvement to ensure that renewable energy generation offers reflect the true cost of the generation [17]. Addressing these issues relies on the implementation of a market mechanism suitable for the participation of renewable energy generation in electricity markets.
Market mechanisms better suited to renewable energy generation have been implemented in some countries. For example, feedin tariffs can promote the development of renewable energy [18]. However, this mechanism cannot promote technological innovation in renewable energy enterprises. Subsequently, Germany has proposed the feedin premium to enable renewable energy and conventional energy generation to participate equally in electricity markets [19]. However, this mechanism requires that electricity derived from uncertain renewable energy and conventional energy sources be cleared at the same price, which is obviously unfair for conventional energy generation. The U.S. has proposed a renewable portfolio standard to promote the accommodation of renewable energy generation by setting standards for its accommodation [20]. Nevertheless, individual regions will accommodate renewable energy generation locally, and thereby interfere with interprovincial electric energy trading. Similarly, the green certificate mechanism obtains environmental benefits by trading green certificates [21]. Nonetheless, this mechanism requires a high sense of social responsibility from market players, who are currently motivated more by other incentives. Therefore, the design of an incentivecompatible market mechanism that can promote the consumption of renewable energy generation is still urgently required.
This issue is addressed herein by proposing a twostage market clearing model, including a dualmarket clearing mechanism and a readjustment market clearing mechanism. These guarantee the accommodation of renewable energy, encourage the implementation of renewable energy generation prices that reflect the true cost of generation, and create a fair market competition environment. The main contributions of this paper are as follows:

The dualmarket clearing mechanism includes a unified market for trading the power generation of both renewable and conventional energy sources, and a subsidy market reserved exclusively for generations derived from the latter. This can decrease the clearing price of renewable energy generation and assure conventional energy generation of reasonable market share and profits.

The readjustment clearing mechanism can accommodate remaining renewable energy generation, and thereby support the accommodation of available renewable energy resources.

Each stage of the proposed market clearing model is formulated as a bilevel market equilibrium problem, and is solved using a coevolution algorithm, which provides an equilibrium solution, while enabling the game behaviors of market players to be fully studied.
The remainder of this paper is structured as follows: Sect. 2 presents the process and analysis of the twostage market clearing model, while Sect. 3 proposes a mathematical model for defining the participation of highcost conventional energy generation in the dualmarket, and for the readjustment market clearing of abandoned renewable energy generation. Section 4 outlines the coevolutionary algorithm for solving the mathematical models, and Sect. 5 simulates the numerical computations involving an improved IEEE 39bus system. Finally, conclusions are provided in Sect. 6.
Twostage market clearing model
The current spot market clearing mechanism is illustrated in Fig. 1, where bids from renewable energy generation and conventional energy generation are applied within the same electricity market. The market organizer sorts bids from low to high, and the winning electric energy P and market clearing price A are obtained at the intersection with the demand curve. This is the equilibrium point. Accordingly, increased renewable energy penetration will result in a lower market clearing price [22], which makes conventional energy generation less profitable or even lossmaking.
Dualmarket clearing operation in the first stage
In the proposed dualmarket clearing mechanism, conventional energy generation receives additional subsidies, which are shared equally by users. This means that the price of conventional energy generation is divided into two parts: (1) participating in the subsidized market and receiving a subsidized price; and (2) participating in the unified market and bidding with renewable energy generation. Then, conventional energy generation will have a lower bid price in the unified market and be able to compete with renewable energy generation at the same price level. All electrical energy from conventional energy generation should be subsidized to ensure the profitability of these resources. At the same time, the impact of fluctuations in fuel costs and differences in energy management levels on the cost of conventional energy generation is accurately reflected by introducing a marketbased competition mechanism to achieve a reasonable declaration of subsidy prices among conventional energy bids.
The proposed dualmarket clearing mechanism introducing both a unified market and a subsidy market is illustrated in Fig. 2. It should be noted that all conventional energy bids include not only a unified market price but also a subsidized market price that must be declared. Therefore, the combined price of conventional energy generation is the sum of the subsidy price and the unified market price. The combination is reflected in the order of the bids from low to high. The subsidy is established in a competitive market to ensure that the subsidy price is reasonable. It is clear that the subsidy of the generation cost for conventional energy sources makes the market clearing price A' less than the spot market clearing price A. Therefore, the dualmarket operation avoids the negative impact of applying the clearing price of renewable energy generation to conventional energy generation with its higher cost.
Readjustment market clearing operation in the second stage
Available conventional energy generation is consumed more in the fair competitive environment provided by the dualmarket mechanism applied in the first stage. This ensures a certain level of profitability for conventional energy generation. However, this leads to a reduction in the consumption of renewable energy, so this paper proposes a readjustment market clearing mechanism to increase the consumption of renewable energy generation while ensuring significant revenues for conventional energy generation at the same time. The proposed readjustment market clearing mechanism is illustrated in Fig. 3. When the unconsumed renewable energy generation rebids with a revised strategy, the market clearing price is A'' and the clearing electric energy is P''. It should be noted that the bidding price of renewable energy generation in the readjustment market clearing operation should be less than the dualmarket bidding price; otherwise, it is impossible to win the bid for the unconsumed renewable energy generation. Therefore, the market clearing price A'' in the readjustment market is less than the dualmarket clearing price A'. It should be noted that the value of P' for renewable energy generation is settled according to A', the value of P'' for renewable energy generation is settled according to A'', and the value of P'' for conventional energy generation is settled according to A' under the subsidy.
Combined twostage market clearing model
A flow chart illustrating the full process of the proposed twostage market clearing model is presented in Fig. 4. As is conducted in the spot market clearing process, the unified market bid prices of renewable energy generation and conventional energy generation are arranged in the order from low to high, in which the combined unified and subsidized market bid prices of conventional energy generation are also arranged in the order from low to high, while actual participation in the unified market clearing process is conducted solely according to the order associated with the unified market bid prices of both energy generation types. The average price of electricity in the spot market should be consistent with that in the combined unified and subsidized markets, and the probability of clearing conventional energy generation in the unified market should be higher than the spot market. At the same time, the possibility of conventional energy generation bids in the subsidy market being excessively high is avoided by applying a penalty to bids in the subsidy market that extend beyond the upper limit of the subsidy. In this way, both renewable and conventional energy generation will bid based on the true cost of electricity generation as far as possible.
In the readjustment market clearing process, part of the electrical energy derived from conventional energy sources is transferred to that of renewable energy sources to ensure their maximum use. Therefore, conventional energy generation participants must receive corresponding compensation for the transferred electricity. Here, the transferred electric energy is the difference between P' and P'' for conventional energy generation, and the corresponding compensation price is the difference between A' and A''. This compensation effectively encourages the transfer of power generation rights from conventional to renewable energy generation participants. In addition, while A'' is less than A', the total renewable energy generation consumption increases, while renewable energy generation participants are still profitable. In the meantime, the reduction in electrical energy from conventional energy sources is also compensated such that they are also profitable. Therefore, this mechanism accords well with the incentive compatibility principle, and the proposed mechanism is consistent with the properties of mechanism design theory [23, 24].
Mathematical formulation of the twostage market clearing model
Mathematical model of participation in dualmarket clearing
The dualmarket clearing mechanism is for the traditional energy to participate in the unified market bidding and the subsidy market bidding, and needs to declare based on two priceelectricity curves. The optimization of the market clearing model needs to consider an appropriate objective function and constraints. The objective function should consider the strategic nature of market bids for maximizing the profit of the market players. However, the clearing process also includes the objective of maximizing social welfare. The optimization process of market clearing will influence the next decisionmaking behavior of the market players. This master–slave structure with distinct, interlinked, and constrained upper and lower objectives can be described by the bilevel market equilibrium problem. The optimal decision process for market players in the upper level of the model relies on the locational marginal prices and winning electrical energy in the lower level of the model, while the market clearing process conducted in the lower level relies on the optimal priceelectricity curve obtained in the upper level [25]. A schematic illustrating the functioning of the bilevel optimization model is presented in Fig. 5.
Upper level optimization process
The objective function F applied in the optimization model based on the profit maximization of each power generation enterprise obtains its optimal bidding strategy according to the locational marginal price \(\lambda_{t,n}\) of bus \(n\) at time interval \(t\), and the winning electric energy \(P_{i,t,k}^{G}\) obtained from the lower level clearing model for the ith generation unit in set G during the kth bidding segment. Neglecting the startup cost of wind power units, the specific optimization process in the upper level is given as:
where N and M are the total numbers of conventional and renewable generation units, respectively. \(T\) is the total number of time intervals, \(K\) is the total number of bidding segments, \(\overline{\beta }\) is the final subsidy price established in the subsidy market, and \(\lambda_{i,t}^{G}\) is the unit marginal cost of generation.
Reasonable locational marginal prices can facilitate optimal electricity system operation [26]. Therefore, the locational marginal price is defined in this paper as the average of the marginal electricity consumption benefit \(F_{{}}^{{\text{D}}}\) on the electricity consumption side and the marginal generation cost \(F_{{}}^{{\text{G}}}\) on the generation side per unit load increment, as:
where \(\alpha_{i,k}\) is the unit bidding price, \(\lambda_{t}^{D}\) is the marginal benefit on the customer side, and \(P_{t}^{D}\) is the demand for electricity on the customer side. Accordingly, \(\lambda_{t,n}\) is defined as:
The constraints applied in the upper level of the optimization model are defined as follows:
(1) Bidding electric power constraints
Equation (5) prevents power generation enterprises from holding reserve electrical energy in an effort to increase the price. It does this by requiring that the sum of the declared maximum electrical energy of each generation unit (i.e., \(P_{i,k}^{{{\text{Gmax}}}}\)) over all bidding segments is equal to its upper bidding electrical energy limit \(P_{i}^{{{\text{Gmax}}}}\). Equation (6) ensures that the declared maximum electrical energy of each generation unit must be greater than or equal to a specified proportion \(\varsigma\) of its upper bidding electrical energy limit.
(2) Bidding price constraint
Equation (7) ensures that the unit priceelectricity curve must be monotonically increasing, with \(\alpha_{{}}^{\max }\) representing the upper unit bidding price limit.
(3) Subsidy bidding price constraint
Here, \(\beta_{i}\) is the bidding price of unit \(i\) in the subsidy market and \(\beta_{\max }\) is the upper limit of the subsidy bidding price. This is based on the difference between the longterm average marginal costs of conventional and renewable energy generation units.
Lower level optimization process
First, the generation unit start and stop plan is obtained using the security constraint unit commitment procedure based on the power generation enterprise bidding strategy obtained from the upper level of the model. Then, the winning electrical energy and locational marginal price are calculated in the lower level process. As mentioned above, the market clearing process is conducted in the lower level, with the objective of maximizing social welfare. The specific optimization model is given as:
The constraints applied in the lower level process are given as follows:

1)
System power flow balance constraints
$${\mathbf{A}} \times P^{G}  {\mathbf{B}} \times P^{D}  {\mathbf{S}} \times PL = 0$$(10)$$PL = {\mathbf{X}}^{  1} {\mathbf{S}}^{\rm T} \theta$$(11)Here, A is the busgenerator association matrix, B is the busload association matrix, S is the busbranch association matrix, \(PL\) is the transmission line power flow, X is the branch reactance matrix, and θ is the bus voltage phase angle.

2)
Line power flow constraint
$$ P_{n,m}^{\max } \le PL \le P_{n,m}^{\max } ,\forall n\forall m$$(12)Here, \(P_{n,m}^{\max }\) is the upper limit of the line transmission power from bus \(n\) to bus \(m\).

3)
Bus voltage phase angle constraints
$$ \pi \le \theta_{n,t} \le \pi$$(13)$$\theta_{n} = 0,n = 1,\forall t$$(14)Here, expression (14) assigns the bus 1 to be the reference bus.

4)
Unit output constraints
$$0 \le P_{i,k}^{{\text{G}}} \le P_{i,k}^{{{\text{Gmax}}}} { ,}\forall i \,$$(15)$$u_{i,t} P_{i}^{{{\text{Gmin}}}} \le \sum\limits_{k}^{{}} {P_{i,k}^{{\text{G}}} } \le u_{i,t} P_{i}^{{{\text{Gmax}}}} { ,}\forall i \, \forall t \,$$(16)Equation (15) ensures that the winning electrical energy of each unit during bidding is less than the declared electrical energy, while (16) applies a similar constraint to the sum of the winning electrical energies for each unit over the entire bidding process, and ensures that this sum resides somewhere between \(P_{i}^{{{\text{Gmax}}}}\) and the minimum electrical energy \(P_{i}^{{{\text{Gmin}}}}\), where \(u_{i,t}\) is the binary startup (u_{i,t} = 1) and shutdown (u_{i,t} = 0) variable of each unit.

5)
Ramping constraints
$$\begin{aligned} &\sum\limits_{k}^{{}} {P_{i,t,k}^{{\text{G}}} }  \sum\limits_{k}^{{}} {P_{i,t  1,j}^{{\text{G}}} } \le u_{i,t  1} R_{i}^{{\text{U}}} + \left( {u_{i,t}  u_{i,t  1} } \right)P_{i}^{{{\text{Gmin}}}} \hfill \\ &\quad+ \left( {1  u_{i,t} } \right)P_{i}^{{{\text{Gmax}}}} { ,}\forall t\forall i \hfill \\ \end{aligned}$$(17)$$\begin{aligned} \sum\limits_{k}^{{}} {P_{i,t,k}^{{\text{G}}} }  \sum\limits_{k}^{{}} {P_{i,t  1,j}^{{\text{G}}} } \le u_{i,t} R_{i}^{{\text{D}}}  \left( {u_{i,t}  u_{i,t  1} } \right)P_{i}^{{{\text{Gmin}}}} \hfill \\ &\quad+ \left( {1  u_{i,t  1} } \right)P_{i}^{{{\text{Gmax}}}} { ,}\forall t\forall i \hfill \\ \end{aligned}$$(18)Here, \(R_{i}^{{\text{U}}}\) and \(R_{i}^{{\text{D}}}\) are the respective upward and downward ramping rates of each unit.

6)
Spinning reserve constraints
$$\min \left\{ \begin{gathered} \sum\limits_{i}^{{}} {R_{i}^{U} } ,\sum\limits_{i = 1}^{M} {\left[ {(1  e_{i} )P_{i}^{{{\text{Gmax}}}}  \sum\limits_{k}^{{}} {P_{i,k,t}^{{\text{G}}} } } \right]} + \hfill \\ \sum\limits_{i = M}^{M + N} {(P_{i}^{{{\text{Gmax}}}} } \,  \sum\limits_{k}^{{}} {P_{i,k,t}^{{\text{G}}} )} \hfill \\ \end{gathered} \right\} \ge S_{t}^{{\text{U}}}$$(19)$$\min \left\{ \begin{gathered} \sum\limits_{i}^{{}} {R_{i}^{D} } ,\sum\limits_{i = 1}^{M} {e_{i} P_{i}^{{{\text{Gmax}}}} } + \hfill \\ \sum\limits_{i = M}^{M + N} ( \sum\limits_{k}^{{}} {P_{i,k,t}^{{\text{G}}}  P_{i}^{{{\text{Gmin}}}} )} \hfill \\ \end{gathered} \right\} \ge S_{t}^{D}$$(20)Here, \(S_{t}^{{\text{U}}}\) and \(S_{t}^{{\text{D}}}\) are the upward and downward spinning reserve requirements, respectively. The spinning reserve constraints ensure that the gridconnected electrical energy can meet demand loads in the event of fluctuations or failures in uncertain renewable energy generation [27].

7)
Minimum startup and shutdown time constraints
$$T_{i,t}^{U}  (u_{i,t  1}  u_{i,t} )T_{U} \ge 0$$(21)$$T_{i,t}^{D}  (u_{i,t}  u_{i,t  1} )T_{D} \ge 0$$(22)
here \(T_{i,t}^{U}\) is the continuous startup time of each unit and \(T_{U}\) is its minimum value, while \(T_{i,t}^{D}\) is the continuous shutdown time of each unit and \(T_{D}\) is its minimum value.
Mathematical formulation of readjustment market clearing
The readjustment market clearing mechanism is also formulated as a bilevel market equilibrium problem. Again, the upper level selects the optimal bidding strategy for renewable energy generation enterprises that maximizes their profit according to the winning electrical energy and locational marginal price obtained in the lower level, while the lower level optimizes the social welfare of all market players based on customer benefits, power purchase costs, compensation costs, and the optimal bidding strategy obtained in the upper level. The upper level applies the same constraints in (6) and as those applied in the dualmarket clearing mechanism, while applying a new constraint on the bidding electrical energy, adding a further constraint to the bidding price, and omitting constraint (8). The lower level applies the same constraints in (10) that are used in the dualmarket clearing process, while omitting the startup and shutdown constraints.
Upper level optimization process
The objective function F applied in the upper level optimization model is given as:
here all terms with the superscript \({\text{Re}}\) applied in the readjustment market clearing formulation refer to the same terms applied in the dualmarket clearing formulation discussed above, and \((\lambda_{t,n}^{{\text{Re}}}  \lambda_{t,n}^{{}} ) \times (P_{i,t,k}^{G}  P_{i,t,k}^{{G{\text{Re}} }} )\) is the compensation applied to conventional energy generation providers for their transfer of electrical energy to renewable energy generation providers.
The new constraints applied in the upper level of the model are given as follows:
(1) Bidding electrical energy constraint
Constraint (24) replaces constraint (5) for renewable energy generation units, and ensures that the total maximum declared electrical energy is the unconsumed renewable energy generation after completion of the dualmarket clearing process.
(2) Bidding price constraint
This formulation augments constraint (7) to ensure that the readjustment bidding price \(\alpha_{i,k}^{{\text{Re}}}\) for renewable energy generation is less than its dualmarket bidding price.
Lower level optimization process
The objective function F applied in the lower level optimization model is given as:
Solution method with the coevolutionary algorithm
As discussed above, the market equilibrium problem involving multiple market players in each stage is formulated as a bilevel optimization problem. One potential way to obtain the Nash equilibrium is through a Karush–Kuhn–Tucker (KKT) transformation [11]. This replaces the lower level with the firstorder optimal conditions, thereby transforming the bilevel problem into a singlelevel problem, which is a mathematical program with equilibrium constraints [28]. However, the application of a KKT transformation is cumbersome and complex, and is prone to difficulties associated with nonconvexity or a situation where the solution cannot converge to the Nash equilibrium when dealing with highdimensional relaxation variables and complex constraints [29].
This issue was addressed in [30] through the development of a heuristic method denoted as the coevolutionary algorithm. Reference [31] illustrates the advantages of coevolution as a parallel and global search algorithm. Coevolutionary algorithms also provide good solutions from several viewpoints, such as computing speed, accuracy, and robustness [32]. A number of studies have applied coevolutionary algorithms to solve market equilibrium problems. For example, reference [33] has extended the algorithm to solve for multiple Nash equilibria and demonstrated the advantages of the evolutionary approach. The coevolutionary algorithm has also been applied to solve the purestrategy market equilibrium of an equilibrium program with an equilibrium constraints (EPEC) model and demonstrated the effectiveness of the algorithm [34]. Calculating the strategies of each agent at the Nash equilibrium with a competitive coevolutionary algorithm has been shown to ensure a maximum profit for each agent, demonstrating its ability to obtain optimal strategies in different market situations [35].
The process employed for solving the bilevel market equilibrium problem is illustrated by the flow chart in Fig. 6. The individual steps of the solution process are as follows:
Step 1 (Population initialization): randomly generate the initial set of strategies for each market player within the total population of x market players, where y bidding strategies are generated for each player. Accordingly, the set of market players is \(X_{{}}^{{}} = \left\{ {X_{1}^{{}} ,X_{2}^{{}} , \cdot \cdot \cdot X_{x}^{{}} } \right\}\) and the set of bidding strategies for player \(X_{1}^{{}}\) is \(X_{1}^{{}} = \left\{ {Y_{1,1}^{{}} ,Y_{1,2}^{{}} , \cdot \cdot \cdot Y_{1,y}^{{}} } \right\}\). The information contained in each strategy \(Y_{1,j}^{{}}\) is a threesegment priceelectricity curve, and the strategy is denoted as a chromosome.
Step 2 (Optimal strategy selection): at any iteration and for any player, the chromosome providing the highest profit of the applied objective function is recorded as the fittest chromosome for that player.
Step 3 (Convergence judgment): if the differences in social welfare between iteration r and r–1 are less than a predetermined threshold or if r is greater than or equal to the maximum number of iterations R, save the fittest chromosomes for all players as the optimal bidding strategies and end all steps; otherwise, proceed to Step 4.
Step 4 (Strategy update): according to the elite retention mechanism, retain the fittest chromosomes for all players except \(X_{i}^{{}}\) at iteration r–1, update chromosomes for \(X_{i}^{{}}\) at iteration r, and return to Step 2. In each iteration, each player needs to go through this update process, which will in turn help select the optimal strategies for all players after numerous iterations.
Numerical computational analysis
The basic characteristics of the improved IEEE 39bus system employed in the numerical computations are listed in Table 1. The example system includes five thermal power units and a high proportion of renewable energy generation in the form of three wind power units. The total installed capacity is 2950 MW, of which the installed thermal capacity is 2050 MW, accounting for 69.49% of the total capacity, while the installed wind power is 900 MW, accounting for 30.51% of the total generation capacity. The load forecast curve applied over a 24h period is presented in Fig. 7. The ratio of supply to demand is set as 2.34:1 to ensure that the generation units can engage in vigorous competition in the electricity market. The system is modeled by a twostage market clearing model, and the GUROBI solver is invoked through the YALMIP toolbox in MATLAB software to solve the bilevel market equilibrium problem using a coevolutionary algorithm.
The basic properties of the proposed methodology are demonstrated based on following four control scenarios:

Scenario 1 adopts the proposed twostage market clearing model. All energy generation providers first participate in the dualmarket to improve the competitiveness and profit of conventional energy generation, and then participate in the readjustment market to improve the consumption of renewable energy generation.

Scenario 2 merely adopts the dualmarket mechanism, in which conventional energy generation providers participate in the dualmarket while renewable energy generation providers participate in the unified market.

In Scenario 3, all energy providers first adopt the general spot market clearing mechanism, and then unconsumed renewable energy generation providers participate in the readjustment market, to guarantee the accommodation of renewable energy generation.

Scenario 4 adopts the spot market clearing mechanism, where thermal units and wind power units are allowed to bid only normal prices.
The market clearing results of the four scenarios are analyzed from four aspects: the bidding processes of market players, the winning energies of generator units, comparison of locational marginal prices, and cost–benefit comparison.
Bidding processes of market players
The bidding prices proposed by each generation unit in the dualmarket clearing process at each round of bidding are presented in Fig. 8a. It is noted that all generation units initially propose relatively low bidding prices. However, the thermal power units quickly approach high stable prices based on the maximum profit achieved by bidding in accordance to the real cost of generation. The bidding price curve of G4 is the highest because of its highest marginal generation cost. The market reached an equilibrium state in the 12th–15th rounds. The specific stable bidding prices obtained for the generation units during all three segments after 15 rounds of bidding under the dualmarket clearing process (i.e., Scenario 2) are presented in Fig. 9. Comparing Fig. 8a and b, after adopting the dualmarket clearing mechanism, the wind power units eventually reach a maximum profit after about 12 bidding rounds by bidding at about twice the real cost of generation, which is much lower than that in the normal spot market. These results show that the adoption of the proposed dualmarket clearing mechanism that enables thermal power units to participate in the subsidy market leads to rational bidding for wind power units.
Winning electrical energies of generator units
The winning electrical energy obtained for each unit over a 24h period under Scenario 1 is presented in Fig. 10, in which units G4 and G7 fail to win any bids. This is because G4 has posted the highest bidding price (Fig. 8), while despite G7 and G8 having posted almost the same price, G7 failed to win any bids owing to its much higher low output limit of 300 MW compared to 125 MW for G8. The minimum 300 MW output of G7 could not be used at the posted price at the available demand. The winning electrical energies obtained for each wind power unit under Scenario 2 (G1, G2, and G3) and Scenario 1 (G1', G2', and G3') are presented in Fig. 11. It can be seen that the consumption of wind power has increased greatly after the adoption of the guaranteed accommodation mechanism implemented in the readjustment market clearing process. The effect is most evident for G3, with the consumption rate increasing from 50 to 84% of its upper output limit (Table 1).
Comparison of locational marginal prices
The locational marginal prices obtained under the four scenarios over a 24h period are presented in Fig. 12. The spot market bidding process (Scenario 4) provides the highest locational marginal prices because the relatively high cost of conventional energy generation units enables the wind power units to win bids at much higher prices than their actual costs, which generates an unfair competitive environment. Accordingly, the adoption of the dualmarket clearing mechanism for conventional energy generation units (Scenario 2) yields significantly reduced locational marginal prices over the vast majority of the 24h period. This is because the applied mechanism subsidized part of the cost of conventional energy generation, making conventional and renewable energy generation compete at largely the same price level and thus creating a fairer competition environment. Based on the spot market clearing mechanism of Scenario 4, Scenario 3 adds the readjustment market clearing mechanism to achieve the maximum consumption of renewable energy generation. However, the drawbacks of this scenario are obvious because the greatly reduced locational marginal price arising from the high proportion of renewable energy generation makes the conventional energy generation units no longer profitable. The adoption of both the dualmarket clearing mechanism and the readjustment market clearing mechanism (Scenario 1) provides the lowest locational marginal price because the operation of these two mechanisms in sequence is equivalent to reducing the locational marginal price twice. However, unconsumed renewable energy generation is still profitable when it is settled at this price compared to being wasted entirely. In addition, conventional energy generation is also more profitable when the transferred electrical energy is compensated.
Cost–benefit comparison
The cost–benefit data obtained with the four scenarios are listed in Table 2. Comparing the profits of each generation unit under Scenarios 2 and 4, it can be seen that the participation of conventional energy generation units in the dualmarket mechanism reduces the profits of renewable energy generation units while it increases the profits of the conventional. This allows conventional and renewable energy units to compete at the same level in terms of generation costs. As a result, conventional energy generation units can secure greater market share while the profits of renewable energy generation units are restricted reasonably. The resulting promotion of fair competition makes electricity prices more reasonable and just, and increases overall social welfare.
Comparing the costs and profits of each generation unit under Scenarios 3 and 4, it can be seen that the adoption of guaranteed renewable energy consumption does indeed increase renewable energy consumption, and while the cost of generation increases, the profit also increases. At the same time, the transferred electrical energy of the conventional units is compensated. Therefore, while the allocated electrical energy of conventional energy generation units is reduced, their costs decrease and their profits increase. Moreover, the profits of conventional energy generation units increase with increasing transferred electrical energy. This is because the difference between the locational marginal prices obtained under the dualmarket and readjustment market clearing mechanisms increases with increasing unconsumed electric energy cleared in the readjustment market, and this compensates for the transferred electrical energy of conventional energy generation units. This effectively encourages conventional energy generation units to promote renewable energy consumption.
Comparing the social benefits obtained in the four scenarios, it can be seen that the current spot market mechanism does not enhance social welfare because it fails to support the participation of conventional energy generation units in market transactions. Comparing Scenarios 2 and 4, social welfare is enhanced by conventional energy generation units participating in the dualmarket mechanism. This increases their market competitiveness and reduces the locational marginal price. Comparing Scenarios 3 and 4, social welfare is also enhanced by adopting the readjustment market clearing mechanism to increase the consumption of renewable energy. Comparing Scenarios 1 and 4, when dualmarket and readjustment market clearing mechanisms are used continuously, it is equivalent to enhancing social welfare twice. Therefore, the twostage market proposed in this paper can obtain the greatest social welfare and is also the better choice for the current market.
Conclusion and outlook
This study has addressed the unfair market competition environment fostered by current electricity market mechanisms by designing a twostage market clearing model based on bilevel optimization that considers the bidding strategies of market players, and guarantees the accommodation of renewable energy generation. The first stage implements a dualmarket clearing mechanism that includes a unified market for trading the electric energy of both renewable and conventional energy units, and a subsidy market reserved exclusively for conventional energy generation units. This is followed by a readjustment clearing mechanism in the second stage to accommodate remaining renewable energy generation after first stage energy allocations. Finally, the model is solved using a coevolutionary algorithm. The results of numerical computation demonstrate that the proposed dualmarket mechanism ensures a fair market competition environment by supporting the profitability of relatively high cost conventional energy generation units. This ensures their share in market transactions, while the bidding of renewable energy generation is more reasonable. Meanwhile, the readjustment clearing mechanism increases the consumption of available renewable energy resources as much as possible, and supports the profitability of conventional energy generation units, which are compensated for their transferred electrical energy. This effectively encourages conventional energy generation units to promote renewable energy consumption. The results demonstrate that the proposed market mechanisms can facilitate the rational allocation of resources, promote the economical operation of electric power grids, and enhance social welfare. Directions for future research include consideration of the impact of a high proportion of renewable energy generation on the flexibility in the regulation ability of electric power systems and the continuous improvement of the calculation efficiency.
Availability of data and materials
Not applicable.
References
Zou, C., Xiong, B., Xue, H., Zheng, D., Ge, Z., & Wang, Y. (2021). The role of new energy in carbon neutral. Petroleum Exploration and Development Online, 48(2), 480–491. https://doi.org/10.1016/S18763804(21)600393
Garriga, S. M., Dabbagh, M., & Krarti, M. (2020). Optimal carbonneutral retrofit of residential communities in Barcelona. Spain Energy and buildings, 208, 109651. https://doi.org/10.1016/j.enbuild.2019.109651
Ming, H., Xia, B., Lee, K., & Adepoju, A. (2020). Prediction and assessment of demand response potential with coupon incentives in highly renewable power systems. Protection and control of modern power systems, 5(1), 1–14. https://doi.org/10.1186/s4160102000155x
International Renewable Energy Agency. (2019). Global energy transformation: A roadmap to 2050 (2019 edition), from https://www.irena.org/publications/2019/Apr/GlobalenergytransformationAroadmapto20502019Edition
Fan, W., Huang, L., Cong, B., Degejirifu, T., & Z.,... Xing, T. (2022). Research on an optimization model for wind power and thermal power participating in twolevel power market transactions. International journal of electrical power & energy systems, 134, 107423. https://doi.org/10.1016/j.ijepes.2021.107423
Erdiwansyah, M., Husin, H., Nasaruddin, Z., & Muhibbuddin, M. (2021). A critical review of the integration of renewable energy sources with various technologies. Protection and control of modern power systems, 6(1), 1–18. https://doi.org/10.1186/s41601021001813
Li, J., Wang, S., Ye, L., & Fang, J. (2018). A coordinated dispatch method with pumpedstorage and batterystorage for compensating the variation of wind power. Protection and control of modern power systems, 3(1), 1–14. https://doi.org/10.1186/s4160101700749
MacGill I F. (2012).Impacts and best practices of largescale wind power integration into electricity markets  Some Australian perspectives. IEEE.
Spodniak, P., Ollikka, K., & Honkapuro, S. (2021). The impact of wind power and electricity demand on the relevance of different shortterm electricity markets: The Nordic case. Applied energy, 283, 116063. https://doi.org/10.1016/j.apenergy.2020.116063
Hosseini Imani, M., Bompard, E., Colella, P., & Huang, T. (2021). Impact of Wind and Solar Generation on the Italian Zonal Electricity Price. Energies (Basel), 14(18), 5858. https://doi.org/10.3390/en14185858
Dai, T., & Qiao, W. (2017). Finding equilibria in the poolbased electricity market with strategic wind power producers and network constraints. IEEE Transactions on Power Systems, 32(1), 389–399. https://doi.org/10.1109/TPWRS.2016.2549003
Peng Zou, Q. C. Q. X. (2015). Modeling and algorithm to find the economic equilibrium for pool—based electricity market with the changing generation mix. IEEE power & energy society general meeting.
Ting Dai, W. Q. (2015). Optimal bidding strategy of a strategic wind power producer in the shortterm Market. IEEE transactions on sustainable energy.
Li, S., & Park, C. S. (2018). Wind power bidding strategy in the shortterm electricity market. Energy economics, 75, 336–344. https://doi.org/10.1016/j.eneco.2018.08.029
Poursalimi Jaghargh, M. J., & Mashhadi, H. R. (2021). An analytical approach to estimate structural and behavioral impact of renewable energy power plants on LMP. Renewable Energy, 163, 1012–1022. https://doi.org/10.1016/j.renene.2020.08.089
Cludius, J., Hermann, H., & Matthes, F. C. (2014). The merit order effect of wind and photovoltaic electricity generation in Germany 2008–2016: Estimation and distributional implications. Energy Economics, 44, 302–313.
Jing Hu, R. H. W. C. (2018). Identifying barriers to largescale integration of variable renewable electricity into the electricity market: A literature review of market design. Renewable and sustainable energy reviews.
Couture, T., & Gagnon, Y. (2010). An analysis of feedin tariff remuneration models: Implications for renewable energy investment. Energy Policy, 38(2), 955–965.
Yuqi, F. A. N. (2021). Review and cogitation for worldwide spot market development to promote renewable energy accommodation. Proceedings of the CSEE, 41(05), 1729–1752.
Daneshi H. (2018) Overview of Renewable Energy Portfolio in CAISO  Operational and Market Challenges. IEEE.
Cai, C., Dong, Li., Lin, Z., He, C., & Yang, L. (2019). Power Market Equilibrium under the joint FIPRPS renewable energy incentive mechanism in China. Sustainability, 11(18), 4964. https://doi.org/10.3390/su11184964
Quint, D., & Dahlke, S. (2019). The impact of wind generation on wholesale electricity market prices in the midcontinent independent system operator energy market: An empirical investigation. Energy (Oxford), 169, 456–466. https://doi.org/10.1016/j.energy.2018.12.028
Jianxiao, W. A. N. G., Haiwang, Z. H. O. N. G., Wenyuan, T. A. N. G., et al. (2018). Trilevel expansion planning for transmission networks and distributed energy resources considering transmission cost allocation. IEEE Transactions on Sustainable Energy, 9(4), 1844–1856.
Tang, W., & Jain, R. (2015). Market mechanisms for buying random wind. IEEE Transactions on Sustainable Energy, 6(4), 1615–1623.
Ruiz, C., Conejo, A. J., & Smeers, Y. (2012). Equilibria in an oligopolistic electricity pool with stepwise offer curves. IEEE Transactions on Power Systems, 27(2), 752–761. https://doi.org/10.1109/TPWRS.2011.2170439
Veeramsetty, V. (2021). Shapley value cooperative game theorybased locational marginal price computation for loss and emission reduction. Protection and Control of Modern Power Systems, 6(1), 1–11. https://doi.org/10.1186/s41601021002110
Poncelet, K., Delarue, E., & D’haeseleer, W. (2020). Unit commitment constraints in longterm planning models: Relevance, pitfalls and the role of assumptions on flexibility. Applied Energy, 258, 113843. https://doi.org/10.1016/j.apenergy.2019.113843
Li, R., Wei, W., Mei, S., Hu, Q., & Wu, Q. (2019). Participation of an energy hub in electricity and heat distribution markets: An MPEC approach. IEEE Transactions on Smart Grid, 10(4), 3641–3653. https://doi.org/10.1109/TSG.2018.2833279
X, D., A, M. K., & Q, W. (2021). Optimal pricemaker trading strategy of wind power producer using virtual bidding. Journal of Modern Power Systems and Clean Energy, 2021, 1–13.
Martinez, A., Osaba, E., Bilbao, M. N., et al. (2018). Let nature decide its nature: On the design of collaborative hyperheuristics for decentralized ephemeral environments. Future Generation Computer Systems, 88, 792–805.
Son, Y. S., & Baldick, R. (2004). Hybrid coevolutionary programming for Nash equilibrium search in games with local optima. IEEE Transactions on Evolutionary Computation, 8(4), 305–315.
Dreżewski, R., & Doroz, K. (2017). An agentbased Coevolutionary multiobjective algorithm for portfolio optimization. Symmetry, 9(9), 168. https://doi.org/10.3390/sym9090168
Zaman, F., Elsayed, S. M., Ray, T., & Sarker, R. A. (2018). Evolutionary algorithms for finding nash equilibria in electricity markets. IEEE Transactions on Evolutionary Computation, 22(4), 536–549. https://doi.org/10.1109/TEVC.2017.2742502
Fu, H., & Zhang, X. (2017). Market equilibrium in active distribution system With \mu VPPs: A coevolutionary approach. IEEE Access, 5, 8194–8204. https://doi.org/10.1109/ACCESS.2017.2691316
Ladjici, A. A., Tiguercha, A., & Boudour, M. (2014). Nash equilibrium in a twosettlement electricity market using competitive coevolutionary algorithms. International Journal of Electrical Power & Energy Systems, 57, 148–155.
Acknowledgements
Not applicable.
Funding
This work was supported by the National Natural Science Foundation of China 51937005, and the Natural Science Foundation of Guangdong Province 2019A1515010689.
Author information
Authors and Affiliations
Contributions
QH and ZL carried out theoretical analysis of the process and performed simulation and experiment to verify the proposed method, HC proposed the methodological framework and mathematical model, XD, YL and XZ offered help in theory and practice, read and put forward suggestions for the paper. All authors read and approved the final manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
He, Q., Lin, Z., Chen, H. et al. Bilevel optimization based twostage market clearing model considering guaranteed accommodation of renewable energy generation. Prot Control Mod Power Syst 7, 30 (2022). https://doi.org/10.1186/s4160102200253y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s4160102200253y
Keywords
 Market clearing
 Renewable energy
 Bidding strategy
 Guaranteed accommodation
 Bilevel optimization
 Fair competition