Game-Theoretic Optimization of Bilateral Contract Transaction for Generation Companies and Large Consumers with Incomplete Information

Bilateral contract transaction among generation companies and large consumers is attracting much attention in the electricity market. A large consumer can purchase energy from generation companies directly under a bilateral contract, which can guarantee the economic interests of both sides. However, in pursuit of more profit, the competitions in the transaction exist not only between the company side and the consumer side, but also among generation companies. In order to maximize its profit, each company needs to optimize bidding price to attract large consumers. In this paper, a master–slave game is proposed to describe the competitions among generation companies and large consumers. Furthermore, a Bayesian game approach is formulated to describe the competitions among generation companies considering the incomplete information. In the model, the goal of each company is to determine the optimal bidding price with Bayesian game; and based on the bidding price provided by companies and the predicted spot price, large consumers decide their personnel purchase strategy to minimize their cost. Simulation results show that each participant in the transaction can benefit from the proposed game.


Introduction
With the development of the smart grid and the deep reform of electricity market, the market is becoming more and more active.Many kinds of transaction models among generation companies and consumers have appeared in the market.The practice of direct power purchase transaction by large consumers demonstrates that the electricity market is transforming from a single generation side market to a bilateral market [1].Compared with other electricity market mechanisms, the bilateral market has its unique advantages.Bilateral contracts are crucial to the functioning of electricity markets, because they allow both parties to have the price stability and certainty necessary to perform long-term planning and to make rational and socially optimal investments.The revenue and cost certainty associated with bilateral contracts presents a number of benefits to sellers and buyers.Ranked roughly from near-term to longer-term, these benefits include: less volatile retail prices, mitigation of market power, support for the development of new resources, and more cost-effective, environmentally attractive resources in the long-term.In recent years, many countries have concentrated on the bilateral market, such as Portugal, India, Spain, Turkey [2][3][4][5][6].
In the direct purchase transaction, bilateral contract transactions have become a research hotspot in the electricity market field [7][8][9].Many researchers have proposed different methods to formulate optimal bilateral contracts among retailers and generators, such as mathematical program with equilibrium constraints [10] and stochastic linear programming [11].Specifically, game-theoretic methods have been employed extensively to solve this problem.Based on game theory, players in the game must take other players' strategies into consideration when making their own strategy in order to maximize their profits.Since each participant in the bilateral contract transaction must consider other participants' strategies when optimizing its strategy, the application of game-theoretic methods in the transaction is very reasonable.Generally, game-theoretic methods can be divided into complete information game and incomplete information game (=also called Bayesian game) according to the degree of disclosure of player's information [12].Each player in the complete information game shares its own information with other players, while in Bayesian game, some private information of players is not shared, such as the player's payoff [13,14].
At present, the majority of existing literature on bilateral contract transactions focuses on game theory with complete information.The authors in [15] studied the optimal strategies of a bilateral contract based on a cooperative game among retailers and generators.The work of [16,17] proposed a two-level game model to optimize purchasing and selling strategies of power retailers in the spot market and bilateral contract market.While in [18], the authors developed a programming model to maximize the profit of generation companies and large consumers by finding a game relationship among companies and users.Reference [19] provided a high-low matching auction mechanism based on the secondary trade of a bilateral contract so that each participant's profit can be maximized by constantly modifying strategies of price and energy amount.Authors in [20] proposed a master-slave game model to optimize bidding price for multiple generation companies and purchase strategy for large consumers.However, in reality, many players refuse to share private information with their opponents; for example, the generation cost of a generator is a trade secret, and it is unrealistic to assume such information is public.Therefore, it is necessary to study the optimization of bilateral contract transactions with Bayesian game.Presently, the research on the electricity market with incomplete information is mainly about the bidding strategies of generating companies [21][22][23][24], while few studies focus on the bilateral contract transaction considering the situation of incomplete information.Literature [21] found a bilevel optimization problem to determine the optimal bidding strategies of generating companies considering the incomplete information of participants about cost coefficients of opponents and their forecast errors.The author in [22] used the combination of PSO (particle swarm optimization) and simulated annealing to achieve the optimal bidding strategies of generating companies in an electricity market when the available information of generating companies about their opponents is incomplete; a method proposed in [23] analyzes the competition among transmission-constrained generating companies with incomplete information.Furthermore, reference [24] studied the optimal strategy of generation expansion based on its incomplete information on other generating companies.
In an open electricity market, there exist multiple generation companies and large consumers.A generation company can sign the contract with multiple consumers, and consumers can also sign with multiple generation companies.Accordingly, there is incentive competition among generation companies for contract quantity.That is, each generation company wants to obtain appropriate contract quantity to maximize their profit by competing contract price with other companies.In order to solve the competition problem, a game model is proposed in this paper.Generation companies can employ such a model to obtain their most appropriate bidding prices to optimize their trading profits.However, since the bidding price and generation cost of each generation company is private information.That is, any company only knows its profit function but does not know the profit functions of other companies.Thus, each company must estimate its opponents' information to optimize its profit with Bayesian theory.For large consumers, according to the bidding price of companies and predicted spot price, each consumer decides the contract quantity of electricity with different generation companies.Based on the above analysis, the main contributions of this paper can be summarized as follows: (1) according to the transaction process among generation companies and large consumers, a master-slave game model is proposed, in which a Bayesian game is applied to describe the competition among companies; (2) the existence and uniqueness of Bayesian Nash equilibrium is proved mathematically; (3) a co-evolution algorithm is proposed to search Bayesian Nash equilibrium, and simulations are conducted to confirm the effectiveness and efficiency of the proposed algorithm.
The remainder of this paper is organized as follows.In Section 2, a system model of generation companies and large consumers is described in detail.Section 3 found the Bayesian game model with incomplete information, proved the existence and uniqueness of Bayesian Nash equilibrium, and proposed a co-evolution algorithm for the equilibrium.In Section 4, a numerical simulation is carried out.Finally, conclusions are provided in Section 5.

System Model
This paper focuses on the bilateral contract transaction with multiple generation companies and large consumers.Suppose that there are H time slots in a bilateral contract transaction.The transaction contains I generation companies and J large consumers.Assume that the bidding price of company i is a i,j , b i for consumer j [25], where a i,j is initial price and b i is a growth factor about contract quantity of electricity.That is, when consumer j signs contract quantity q h i,j from company i in time slot h (h= 1, 2, • • • , H), the bidding price is p h i,j = a i,j + b i q h i,j .After getting the bidding price, large consumers decide the contract quantities with different companies.Note that b i in the paper is constant for company i, and the decision variable is only a i,j .The decision relationship for the master-slave game among multiple generation companies and large consumers is shown in Figure 1.In the figure, a i = a i,1 , a i,2 , • • • , a i,J represents generation company i's bidding price set for all large consumers, a −i represents other companies' bidding price except company i, a −i,j = a 1,j , a 2,j , . . ., a i−1,j , a i+1,j , . . ., a I,j represents other companies' bidding price for large consumer j except company i, and a i,−j = a i,1 , a i,2 , . . ., a i,j−1 , a i,j+1 , . . ., a i,J represents the bidding price of company i for all large consumers except consumer j. q i,j = q 1 i,j , q 2 i,j , . . ., q H i,j T represents contract quantity purchased by large consumer j from company i in H time slots, and q S,j = q 1 S,j , q 2 S,j , . . ., q H S,j T represents energy quantity purchased by large consumer j in spot market in H time slots.

Generation 1 Generation i
Spot market Master-slave game S,1 q S , j q S , k q Information Energy Figure 1.Decision relationship for master-slave game among generators and large consumers.

Purchase Cost Model of Large Consumers
Based on the scenario we proposed, large consumers purchase energy from generation companies and the spot market.That is, the purchase cost of large consumers includes two parts: one is paid to companies; the other is paid to the spot market.Accordingly, consumer i's purchase cost from generation companies is where where p h S is predicted spot price in time slot h.Therefore, the total purchase cost of consumer j can be expressed as: Large consumers are the followers of generation companies and have to passively accept the bidding price of companies.However, the purchase strategies of consumers have a great influence on the profit of generation companies.According to the bidding price of companies and spot price, the goal of each consumer is to minimize its purchase cost by optimizing purchase strategies.Therefore, the optimization model of large consumer j can be expressed as minimize where D h j represents energy demand of consumer j in time slot h.Generally, large consumers trading in the spot market will influence the spot price, and thus will cause a game behavior among large consumers, which will lead to a more complex scenario.Consequently, this paper assumes that the spot price has no relationship with the behavior of large consumers in the spot market.Hence, for large consumers, the game-based problem of multi-objective optimization is simplified, and it can be transformed into a single objective optimization problem aiming at the minimization of purchasing cost.Actually, the spot price adopted in this paper is not accurate because there are prediction errors according to historical data.Furthermore, historical data about spot price has covered the transaction information among companies and consumers.Therefore, it is reasonable to neglect the influence of purchase strategies on spot price.Additionally, this paper assumes that a generation company has a unique bidding price for each large consumer.That is, bidding price between a company and one consumer is only affected by this consumer's purchase strategy, which is irrelevant to other large consumers.Accordingly, game behavior among large consumers for contract quantity is not existent, so the complexity of the bilateral contract transaction can be simplified.

Profit Model of Generation Companies
Generation companies are the leader in the bilateral contract transaction.One generation company can choose an optimal bidding price to maximize its profit by forecasting the purchase strategies of large consumers.Here, owing to the difficult prediction of a generation company's revenue in the spot market, and because their bidding strategy can be made on the basis of the bilateral contract, this paper only considers the company's profit in the bilateral contract transaction.Company i's income is the total purchase cost of all large consumers who purchase electricity from company i: where q i,j = [q 1 i,j , q 2 i,j , • • • , q H i,j ] T , E 1J is unit matrix with 1 × J. Company i's generation cost can be expressed with a quadratic function; that is, where A i and B i are coefficients of generation cost.Consequently, the profit of generation company i can be calculated as: In (7), based on the forecasted information about large consumers' purchase strategies, generation i optimizes the combination of bidding price a i = a i,1 , a i,2 . . ., a i,J for all large consumers to maximize its profit.For any strategy (a i,j , a −i,j ), each large consumer will have a corresponding optimal strategy q * (a i,j , a −i,j ).Accordingly, the profit of generation company i can be written as where ) represents the bidding price set of all generation companies except i.Therefore, the problem of maximal profit for generation companies can be expressed as: maximize where A min and A max represents the lower and upper limit of bidding price, respectively.

Bayesian Game Formulation
Bayesian game theory-put forward by Harsanyi [26]-is an important method of modeling a game with incomplete information.In this paper, information about the energy demand of large consumers is known to all generation companies.However, the bidding price and generation cost of each company are private information.Compared with three essential factors (players, strategies, and payoffs) of the complete game, a Bayesian game mainly has two more specific factors: the types of players and the probability distribution of the types.In order to facilitate the following discussion, we divide generation companies into different types according to the generation cost.Each company has a type space which contains all possible types, and one type represents a kind of generation cost.Furthermore, the probability of each type in the combination is known to other companies.
Based on the above analysis, we assume that the type space of generation i is T i with a generic type t i ∈ T i .Then, T = T 1 × T 2 • • • T I represents the type space combination for all generation companies with a generic type combination Company i knows its type t i , but does not know other companies' types.Therefore, company i will estimate its opponents' types according to the probability distribution of the each type.We employ p i (t −i |t i ) to express the conditional probability about type combination under the circumstance of company i with type t i .According to the Bayesian formula, the following equation is given: where the type space combination for company i's opponents and p i (t −i , t i ) = p i (t) denotes a joint probability distribution of all communities with type combination t.According to the Bayesian game theory, the incomplete game can be translated into the complete games with imperfect information by players estimating the type combination of other players and corresponding joint probability distribution.Therefore, a generation company's profit is the expected value of all profits for these complete games.Based on the profit function of a generation company, the expected profit of company i with type t i can be calculated as: where a t i i,j and q t i i,j are bidding price and contract quantity matrix corresponding to type t i , respectively.A t i i and B t i i are coefficients of generation cost for company i with type t i .Our target is to schedule strategy of bidding price a is called Bayesian Nash equilibrium, which can be defined as follows: Bayesian Nash equilibrium a is such that for any generation company i, EP i a Once the equilibrium is reached, the expected payoff for any generation company i will be reduced by changing from a t i * i .Since the function is concave with respect to a t i i , Bayesian Nash equilibrium exists [27,28].To obtain the equilibrium a t i * i of Function (11), we can translate it into the optimal problem for searching the optimal solution of the following problem: maximize The corresponding constraint is A min ≤ a i,j ≤ A max .

Karush-Kuhn-Tucker (KKT) Conditions for Large Consumers
Before searching the Bayesian Nash equilibrium, purchase strategies of large consumers need to be ascertained, which is regarded as the input data in the Bayesian game among generation companies.Suppose that companies' bidding price for consumer j is a j = [a 1,j , a 2,j , . . ., a I,j ] T at time slot h and the corresponding spot price is p h S .Then, the purchase cost of large consumers is minimize Since problem ( 14) is a nonlinear optimization problem, the optimal solution of such a problem must satisfy the conditions of first-order optimization, called KKT (Karush-Kuhn-Tucker) conditions.The KKT conditions of optimization problem (14) are S,j ≥ 0, λq h S,j = 0 q h 1,j + . . .+ q h I,j + q h S,j = D h j (15) where λ and u are Lagrange multipliers.To solve problem (15), we introduce the NCP (nonlinear complementarity problem) function [29,30].Accordingly, (15) can be rewritten as follows: where ε is slack variable.Consumer j's optimal purchase strategy Q h * j corresponding to a h j can be obtained by solving equation (16).Similarly, the optimal purchase strategies of other large consumers can also be obtained.

Co-Evolution Algorithm for Bayesian Nash Equilibrium
After knowing the optimal purchase strategies of all large consumers, the master-slave game degenerates into a Bayesian game.Bayesian Nash equilibrium can be searched with a co-evolution algorithm [31][32][33].The mapping relation between a co-evolution algorithm and a Bayesian game can be founded as: Nash equilibrium → ecosystem; players → species; strategy set → population; strategies → individuals.Based on the above mapping relation, the process for searching Bayesian Nash equilibrium is shown as follows: (1) Establish species z i corresponding to each generation company, and then establish population z t i according to each type of each company, where t represents type number of company i; assume that z tn i is a genetic individual in the population z t i .(2) Since species z i and population z t i only represent a part of the global solution, it is necessary to evaluate individual z tn i with information of other species z −i .Accordingly, we choose a special individual z tR i to represent the information of species z i in the global solution.Suppose that the present number of evolution is S, then the fitness function of individual z tn i in species z i can be designed as (3) As for the selection method of individual z tR i , the mechanism of elite is adopted in the paper.That is, z tR i for species z i in the Sth evolution is the individual who has the highest fitness value in the (S − 1)th evolution: (4) Run step ( 2) and ( 3) and obtain fitness values of each individual for each species via standard genetic algorithm, and then determine z tR i .(5) Repeat steps (2)-( 4) until the maximum number of evolution S max is reached or z tR i is unchanged.
When z tR i for all populations in all species is not changed any more, it demonstrates that the ecosystem has converged.Then, it can be considered that all possible combinations of all species has reached a optimal response and Bayseian Nash equilibrium is obtained.Accordingly, the flowchart of the above process is presented in Figure 2.

Simulation Results
Based on the proposed Bayesian game model, a simulation was carried out to verify the effectiveness of the game approach and the efficiency of the proposed algorithm.In simulation illustrations, the optimal bidding price of each generation company will be obtained, and the convergence of co-evolution algorithm will also be presented.By performing this simulation, it will be verified that the proposed game approach can solve the problem of bidding price for generation companies in the bilateral transaction.
In the simulation, assume that there are three generation companies and three large consumers.These large consumers need to make a bilateral contract transaction with generation companies for a month.Based on off-peak loads, mid-peak loads, and on-peak loads in a whole day, the classification of daily time spans is shown in Table 1 [34].The price in the spot market generally varies with the load level, which has high value in peak hours and low value in off-peak hours.Since the load can be predicted based on the historical data, we assume that the spot price in a month has been predicted, which is shown in Figure 3.For simplicity, we have divided a month into 90 time slots.Corresponding to the 90 time slots, we assume that three large consumers have forecasted their energy demand in these time slots, which is shown in Figure 4.All of the above-referred price is made up according to the current situation of China's electricity industry, and the energy demand of large consumers is based on the electricity consumption of the chlor-alkali industry and the electrolytic aluminum industry.Since the generation cost of a company is a trade secret, we assume that each generation company only knows their own generation cost but do not know their opponents' cost.In the case study, suppose that each company has a type space with three types according to generation cost.Coefficients of generation cost A and B are different with each type.Although generation cost is not public information, the probability of each type in the combination is known to other companies.Here, we assume that the probability of type 1 and 2 for any company is equal to 0.3, and the probability of type 3 is equal to 0.4.Consequently, the joint probability distribution of all communities with any type combination can be deduced.For example, when the types of three companies are type 2, type 1, and type 3, then the joint probability distribution for such a type combination is Other parameters related to the simulation are shown in Table 2.The parameters in the co-evolution algorithm are set as follows: the evolution of each population is based on the standard genetic algorithm; each population contains 50 individuals; crossover probability is 0.90 and mutation probability is 0.05; maximum number of evolution S max = 180.Based on the above parameters, the Bayesian game among generation companies and large consumers in the bilateral contract transaction can be solved with the proposed algorithm.After some calculations, we can obtain the Bayesian Nash equilibrium about bidding price of the generation companies.Consequently, the contract price of generation companies with different types is presented in Table 3.Since generation companies with different types have different cost models, contract price is different when the Nash equilibrium is reached.One can see that generation companies with different types have different bidding price strategies.Accordingly, large consumers will have different strategies for contract quantity.Since each generation company has a type space with three types, there are 3 3 type combinations.Under each type combination, every large consumer will have a specific purchase strategy.This means that there are total 27 kinds of optimal purchase strategies.We have given the results of optimal purchase strategies for three large consumers in Table A1 in Appendix A. In order to facilitate the analysis, the type combination (1, 2, 3) is taken as an example.Note that combination (1,2,3) means company a belongs to type 1, company b belongs to type 2, and company c belongs to type 3. From Table A1  Figure 5 shows the daily purchase strategies of three large consumers in a month.One can see that each consumer will purchase the majority of energy via bilateral contract transaction with generation companies because the bidding price is cheaper than spot price.Furthermore, since large consumer 2 has a higher demand than the other 2 consumers, it purchases more energy from spot market than other consumers.The reason is that bidding price increases linearly with the increasing of contract quantity, and the price will be more expensive than spot price if consumer 2 purchases more energy via contract transaction.Additionally, according to the bidding price and contract quantity, the profit of each generation company can be obtained.After some calculation, the profits of three companies are shown as follows: 1,085,865 yuan for company a; 750,980 yuan for company b; 1,014,123 yuan for company c.In the initial situation without game optimization, the profits of three companies are 1,054,800 yuan, 674,595 yuan, and 962,340 yuan, respectively.Comparing the results of two situations, one can see that the profit of company a has increased 2.9%, the profit of company b has increased 11.3%, and the profit of company c has increased 5.4%.Therefore, each generation company has obtained more profit when Bayesian game is employed to optimize the strategy of bidding price.
In order to analyze the difference between complete information game and Bayesian game, we take the case with complete information into consideration.That is, the type of each generation company is known to all companies.For the purposes of comparison, the generation cost of each company in the complete game is the same with the data of type 1 in the Bayesian game.The optimal strategies of bidding price under the case with complete information game are shown in Table 4.The contract quantities of each generation company with three large consumers are shown in Figure 6.From the figure, we can see that the contract quantities of generation company a with three large consumers are 4974.24MWh, 4513.58MWh, and 4110.63MWh, respectively; contract quantities of generation company b with three large consumers are 3890.30MWh, 3431.61MWh, and 3126.21MWh, respectively; contract quantities of generation company c with three large consumers are 4416.57MWh, 4513.10MWh, and 3928.38 MWh, respectively.After some calculation, the profits of the three companies are shown as follows: 1,109,395 yuan for company a; 772,444 yuan for company b; 1,021,038 yuan for company c.One can see that the profit of each generation company is reduced compared with the results of the complete game.The decrease rates are 2.2% for company a, 2.9% for company b, and 0.7% for company c.The results demonstrate that the incomplete information is a disadvantage for each generation company, just from the perspective of profit.However, since the generation cost function is a commercial secret which needs to be protected, each generation company would not unveil the function to other competitors.Thus, it has practical significance to study the competition among generation companies with incomplete information.
The convergence characteristic of the co-evolution algorithm is shown in Figure 7.It can be seen from the figure that a generation company with different types tends to be smooth when population is evolved to the 10th generation.When the population is evolved to 24th generation, the profit of each company is not changed any more and has reached an equilibrium (the Nash equilibrium) among three companies.

Conclusions
In this paper, we proposed a scenario in which generation companies and large consumers can have energy transaction directly via bilateral contract.Based on the scenario, we presented a master-slave game for generation companies and large consumers, and a Bayesian game for generation companies is also formulated.Generation companies in the Bayesian game lack the information about other companies' types, so each company needs to evaluate its opponents' information based on the type space combination and the corresponding probability distribution.Then, a co-evolution algorithm is employed to search the Bayesian Nash equilibrium.In the simulation, we have compared the bidding price strategy and profit of generation companies in three situations which are the case without game, the case with incomplete information, and the case with complete information.Simulation results demonstrated that the profit of generation companies was more than that in the initial situation.However, the profit of generation companies in the Bayesian game was influenced by the incomplete information compared to the situation of complete information.

Figure 5 .
Figure 5. Daily purchase strategies of large consumers.

Figure 6 .
Figure 6.Contract quantity of each generation company with three large consumers in the complete game.

Table 1 .
Classification of daily time spans.

Table 2 .
Type space of generation company and corresponding parameters.

min A max p ( /MWh) (( /MWh) 2 ) (( /MWh) 2 ) ( /MWh) ( /MWh)
, we can see that the contract quantities of generation company a with three large consumers are 5015.67MWh, 4767.08 MWh, and 4405.43MWh, respectively; contract quantities of generation company b with three large consumers are 2783.09MWh, 2257.09MWh, and 1888.22MWh, respectively; contract quantities of generation company c with three large consumers are 5484.05MWh, 5217.74MWh, and 4743.57MWh, respectively.

Table 4 .
The optimal strategies of bidding price with complete information ( /MWh).