Analysis of Market Equilibrium Based on Co-evolution in Electricity Spot Market

By solving the Nash equilibrium of the electricity market, it is possible to observe the game process of market entities under different boundary conditions and predict the future trend of the market. In order to study the state of market equilibrium in the power spot market, firstly we constructed a bi-level equilibrium model. The upper layer is the problem of maximizing the profit of power generation enterprises under the bidding constraint, and the lower layer is the security constraint economic dispatch with the goal of maximizing social welfare. The traditional solution transforms the bi-level model into MPEC or EPEC through optimal conditions, but they are generally non-convex and difficult to solve. In this regard, the coevolution algorithm is used to solve the bi-level model, and it is proved that the result of co-evolution under a limited strategy set is equivalent to the Nash equilibrium. Finally, an example of PJM 5 machine with 5 nodes is used to analyse the power market equilibrium in the spot market.


Introduction
The electricity market equilibrium is a stable state reached after the dynamic evolution of the market between the supply and demand sides of the bidding game. By solving the equilibrium point of the electricity market, it is possible to observe the decision-making evolution process of the market entities, and also to predict and analyse the Nash equilibrium point under different market boundary conditions. In this way, suggestion for improvement of market rules and design can be come up with.
The game between market entities, and the process of information feedback through the clearance of the electricity market can be modelled as a bi-level model [1] [2]. In the method of solving the market equilibrium point, the classic equilibrium analysis method believes that the game party is completely rational and finds the equilibrium solution of the game under the premise of sufficient information (Cournot model) [3]. [4] solves the market equilibrium point by constructing an bi-level equilibrium model. The upper level is the profit maximization problem of power generation enterprises, and the lower level is the optimal flow problem of social welfare maximization. By replacing the lower-level problem with the first-order optimal conditions [5、6], the bi-level model is converted into a single-layer model [7], namely mathematical program with equilibrium constraints [8] (MPEC). Furthermore, an equilibrium program with equilibrium constraints (EPEC) is formed by combining the MPEC model of the optimal decisionmaking of multiple market entities to solve the equilibrium of the entire market. [9] discussed the market equilibrium of the natural gas and electric energy coupling market through EPEC. [10] studied the influence of market power and market power mitigation policies on market equilibrium through the MPEC model. [11] studied the impact of green certificates on market equilibrium in an oligopoly market through EPEC.
The above study of market equilibrium using the classic game theory method belongs to the research of static game, but this can only be applied to the mature stage of market development. In the electricity market, the cost function of participants and their competition information are generally confidential. Besides, the condition of complete rationality is difficult to satisfy, therefore, the use of traditional equilibrium theory to model the electricity market may cause problems. In addition, the mathematical process of MPEC and EPEC models is cumbersome and complex, and it is prone to be non-convex or difficult to solve when dealing with mathematical models with high-dimensional slack variables and complex constraints. Therefore, some scholars proposed to use heuristic algorithm [12] such as co-evolution algorithm [13] to solve the bi-level model. Co-evolutionary algorithms have been widely used since they were proposed, including solving power system reactive power optimization [14、15], robust scheduling [16] and market equilibrium [17]. Literature [18] uses coevolutionary algorithm to find the pure strategy equilibrium in the market, and proves that the algorithm has strong ability to search the Nash equilibrium [19].
In the current modelling of the electricity market, there are few considerations of multi-block bidding and safety constraints. In this regard, this article first constructed an upper and lower two-level equilibrium model of multiblock bidding for power generation companies and safeconstrained economic dispatch of power dispatch agencies in a spot environment, then uses a co-evolution algorithm to solve the market equilibrium point, and finally analyses the market equilibrium point in the spot environment Features.

Market rules
In this article, the units are distributed on various nodes of the power network, and participate in the day-ahead market through bidding in the power trading centre. In the day-ahead market, units declare their willingness to trade capacity and price of power, and the declaration can be divided into multiple stages to reduce the risk of failure. The declared information will take effect within 24 hours of the next day and no modification of the declared information is allowed within the day. At the same time, in order to avoid the unit holding the remaining power generation capacity to manipulate the market, the sum of the bidding capacity should be the upper limit of the unit's bidding capacity.
For the demand sides, in order to ensure sufficient power supply, the marginal utility and the demand of electricity is declared at the same time, and the sum of the winning bidding electricity of all users at the same node is equal to the predicted load of the node.
After the power dispatching agency receives the declaration information from each market entity, it conducts a day-ahead market clearance program once a day. Market clearing uses the DC power flow model to construct network security constraints. The objective function of clearing is a social welfare maximization model that comprehensively considers the supply-side and demand-side declarations. The result of clearing is the amount of electricity purchased or sold by market entities per hour, and the system marginal price.
In the bidding declaration stage, all market entities make decisions with the goal of maximizing their own profits. After multiple rounds of bidding, the market will reach an equilibrium state, that is, no market subject can unilaterally change its strategy to increase profits. Since the best response strategy of market entities is related to the market clearing conditions shared by all market entities, it is a multi-leader-common-follower game problem.
This paper constructs a bi-level model to describe the bidding strategy behaviour and process of market entities [20]. The upper-level model is an optimization model for maximizing the profits of power generation companies, with the curve of bidding declaration as the optimization variable, and the restriction of bidding declaration in market rules as constraints. The lower-level model aims to describe the process of market clearing, with the maximization of social welfare as the objective function, and the constraints include unit operation constraints, network security constraints, and market rules constraints.
The upper and lower models are interconnected and restricted. The optimal decision-making process of the power generation company in the upper model depends on the lower node electricity price information and cleared bidding capacity, while the basic data for clearing of the lower market is the declaration generated by the optimal decision of the upper model curve. Details as follows:  (2) is the non-negative constraint on unit quotes; Formula (3) is the constraint on the upper limit of unit quotes and the monotonic increasing constraint of unit quote curves; Equation (4) is that the sum of all declared capacity of the unit is equal to the upper limit of the biddable capacity, so as to avoid the power generation companies holding capacity to raise electricity prices; formula (5) indicates that the declaration of each stage must be greater than the minimum declared proportion of biddable capacity.

Lower model
Where: t is the index of the clearing time, i is the index of the generator set, j is the index of the quotation stage of the generator set, d is the index of the demand, k is the index of the demand quotation stage, n and m are the indexes of the nodes.  (6) is the clearing objective function for maximizing social welfare; Equation (7) is that the sum of the bid-winning power of each unit must not exceed the maximum power generation capacity and be less than the minimum technical output; Equations (8) and (9) indicate that the amount of electricity purchased shall not exceed the upper limit of declared electricity; formula (10) is that the sum of the electric quantity of all users at the same node is equal to the predicted load constraint; formula (11) is the climbing rate constraint; formula (12) and formula (13) are the spinning reserve constraint ; Equation (14) is the node power balance constraint; Equation (15) is the upper and lower limit of the branch power flow; Equation (16) is the node voltage phase angle constraint; Equation (17) indicates that the node with the network node number 1 is set as the reference node . In the optimization model with the minimum power purchase cost as the objective function, the Lagrangian multiplier of equation (14) is the node marginal price, but in this model, the objective function of maximizing social welfare is adopted, Therefore, the node electricity price is defined as the average value of the marginal power utility increase on the power consumption side and the marginal power generation cost increase on the generation side under the unit load increment, namely: Where: G F is the power generation cost on the power generation side; D F is the power utility on the power consumption side. The settlement electricity price of formula (18) means that after the high and low matching of the declaration stages of the sender and the consumer, the average price of the last matching pair is the settlement price.

Co-evolutionary algorithm solution
For models (1)-(17), there are two classic solutions. One method replaces the lower-level model through the firstorder necessary conditions to form the original dual formula constraint, thereby transforming the bi-level model into a single-layer model. Since the feasible region of the lower-level model is a convex set, the first-order necessary condition is also a sufficient condition for the global optimization. Finally, MPEC or EPEC is formed and the market equilibrium point is obtained by solving mixed integer linear programming. The other is to directly solve the equilibrium point of the market through heuristic algorithms (such as co-evolutionary algorithms). Because the heuristic algorithm surpasses the complicated mathematical derivation, and directly seeks the equilibrium point of the market through the parameter transfer of the upper and lower bi-level models, it is significantly better than the equilibrium constraint programming in the accuracy and simplicity of the solution.

Co-evolutionary algorithm steps
The essence of the co-evolution algorithm to solve the market equilibrium is to set up bidding declaration information for each agent through agent simulation, and to observe the nature of the market by observing the agent's bidding behaviour. The basic ideas and steps of using co-evolutionary algorithms are as follows: Step 1: Giving basic parameters, such as typical daily load curve, unit parameters, network parameters, market rule parameters, marginal cost of power generation companies and marginal benefits of users, etc. Construct an upper and lower two-tier equilibrium model, and use marginal cost and marginal benefit as the first bid declaration information.
Step 2: Randomly generate an independent limited strategy population set . .
Step 5: Repeat steps 2, 3, and 4 so that population i N  can be evaluated and evolved one by one, and finally the t-generation market is cleared.
Where: ( ) F  is the electricity market clearing model with the maximization of social welfare as the objective function, that is, the lower model; clearing results G t P and D t P are the bidding power of the supply side and the demand side in the t round of bidding respectively;  t is the node electricity price vector.
Step 6: Repeat steps 3 to 5 until the algebra t reaches the value R set by the simulation or stops when the market converges.

Market Nash Equilibrium Determination 4 Examples
The network model adopts the PJM 5-machine 5-node model, the unit parameters are shown in Table 1, and the typical 24-hour load curve is shown in Table 2. On the user side, with loads at nodes 2, 3, and 4, the marginal utility is 1.5 yuan/kWh, and the three-stage quotation strategies for 3 users are 1, 0.9 and 0.8 yuan/kWh and remain unchanged in each round.

Market game and equilibrium analysis
As shown in Figure 1, after a fierce game, the market entered equilibrium after about 15 rounds of bidding. In terms of bidding strategy, compared with the initial bidding strategy, the units have adopted price reduction measures in multiple rounds of games. In the example settings of this article, since the supply-demand ratio is close to 2:1, it is in a buyer's market. Therefore, the demand side dominates. Competition on the power generation side is fierce, and more power generation can only be obtained through price reduction, and finally converges to a lower level in multiple rounds of bidding games.  As shown in Table 3, in the bidding strategies at the market equilibrium point, all units declare the largest proportion of bidding electricity in the first stage of the "three-stage" quotation, along with the willingness price close to the marginal generation cost. And in the second and third paragraphs, the bidding electricity will be reduced, while the bidding willingness price will be raised. Therefore, on the premise that most of its own capacity can be traded, the market's clearing electricity price should be raised as much as possible to maximize its own profits.
In the comparison between the equilibrium result of the game and the result of perfect competition, after the consideration of the game is added, the profit disparity between different units no longer changes, and smallcapacity units are not always at a disadvantage in bidding. In the case of perfect competition, all units are quoted at their marginal costs. Therefore, according to the social welfare maximization model, unit G1 has the smallest marginal cost and therefore has an absolute dominant position in the power generation market and has the highest profit. In the game equilibrium situation, although large-capacity units still maintain their advantages, their profits have dropped significantly. It can be seen that the influence of game strategy on the results of market bidding is very important. In terms of total profit, due to the influence of the market game, the unit raises the bidding price with the marginal power generation cost as the lower bound, thus raising the market clearing price, and the profit obtained by the power generation side has also been improved.

Conclusion
In this paper, the co-evolution algorithm is used to solve the upper and lower equilibrium model, and the market equilibrium result of the bidding game between power generation companies under the power spot environment is studied. The results show that under the limited strategy set, the application of co-evolution algorithm to solve the bi-level model can quickly converge to the equilibrium point of the market.
This article does not consider the impact of mediumand long-term contracts on the equilibrium of the spot market, which is also a question that needs to be studied in the next step.