Market Trading Model of Urban Energy Internet Based on Tripartite Game Theory

As an important driving force to promote the energy revolution, the emergence of the energy internet has provided new ideas for the marketization and flexibility of multi-energy transactions. How to realize multi-energy joint trading is a key issue in the development of the energy market. An urban energy internet market trading model among energy suppliers, energy service providers and the large users in the urban area, based on tripartite game theory, is established in this paper. Considering the cost–income function of each market entity and the basic market trading mechanism, a new game-tree search method is proposed to solve the Nash equilibria for the game model. The Nash equilibria of the tripartite game can be obtained, and the market transaction status corresponding to the Nash equilibria is analyzed from the perspective of the market transactions. The multi-energy joint transaction and market equilibria can be easily implemented for the bids and offers of the multiple energy entities in the urban energy internet market.


Introduction
Energy consumption is an important basis for socio-economic development. As traditional fossil energy sources are gradually depleted, how to achieve efficient energy use has become a major problem all over the world. Combining the use of electricity, heat and natural gas may be a promising way to deal with the energy consumption efficiency issue. Therefore, the concept of energy internet was proposed [1,2]. Energy internet is a complex multi-energy flow system that has a power system as the core, the internet and other cutting-edge information technologies as the foundation and distributed renewable energy as the main energy source, and is closely coupled with thermal systems, natural gas networks, transportation networks and other systems [3]. Based on the basic characteristics of multi-energy-coupled energy internet, the main goal of the energy internet market is to achieve multi-energy comprehensive transactions. In order to better realize complementary use of multiple energy sources and improve energy efficiency, it is particularly important to establish a multi-time scale, multi-energy, energy internet market trading model [4]. Compared with the pure electrical energy trading in the traditional electricity market, other energy sources such as thermal energy will also be included in the multi-energy market, and the trading behavior of market entities will affect the entire trading mechanism [5].
Up to the present, the pure electricity market [6][7][8][9] has been relatively mature, and the research on the multi-energy market trading models has also been gradually carried out. A real-time and dayahead level equilibrium model of the electricity and natural gas markets was established, and a special diagonalization algorithm was proposed in [10]. A day-ahead market settlement framework considering the uncertainty of renewable energy was presented in [11]. Few studies have been conducted on the trading of multiple energy types, considering the competition strategies among multiple market entities. In particular, the trading models of multi-market entities such as energy suppliers, energy service providers and large users within an urban level energy internet have not yet been well resolved [12].
As a commonly used method in the field of economics, game theory [13][14][15] has become an important means to solve the strategies for competing market entities related to the Nash equilibria. For example, an electricity market game model between the microgrid and distribution network was proposed in [16], in which the entities within a microgrid formed a cooperative alliance to conduct the electricity transactions with the distribution network. [17] grouped many independent microgrids together and conducted a price-bidding game with the remaining power-surplus microgrids. A distributed demand-side energy management system was established in [18], and the interaction between users and power sales agents was analyzed through game theory for the future smart grid. As mentioned above, many references [19][20][21][22] regarded electrical energy as the main energy supply of the system and mainly focused on the electricity market trading models, without involving other energy types such as thermal energy [23]. In addition, a trading mode of power generation rights between traditional energy and new energy based on cooperative game theory was discussed in [24], and the profits of market entities and market equilibria are analyzed. [25] established a three-party, non-cooperative-game trading model with energy operators, distributed photovoltaic users and electric-vehicle-charging agents as market entities. [26] considered the marginal node price of demand response and analyzed the Nash equilibria of integrated energy system market with thermal and electrical energy. Despite much effort so far, research on tripartite games in multi-energy markets is still lacking. The multi-energy market models established in the above references begin to include other energy types in addition to electrical energy. However, thermal energy and other energy sources are not directly involved in the market transactions, and they are mainly used to help analyze the transaction mode between the supplier and user in the electricity market. The competitive behavior of the energy internet in relation to the cost-income models of multi-market entities still needs further study. The main contribution of this paper is to establish a tripartite game model for multi-energy transactions in the urban energy internet market; the urban energy internet is restricted to the energy systems that realize the efficient conversion among multiple energy sources within urban areas.
The structure of the paper is as follows. Section 2 establishes a tripartite game model for urban energy internet market transactions, including multiple game entities with their game strategies and payoff functions, and a new game-tree search solution to obtain the Nash equilibrium of the game model is also introduced. Section 3 derives the Nash equilibrium results of the tripartite game model and analyzes the transactions realized among multiple market entities under various trading scenarios. Section 4 discusses the different trading scenarios for the three gaming entities based on the case study. Finally, Section 5 concludes the paper.

Materials and Methods
Different from the transaction of pure electrical energy in the traditional electricity market, other energy sources will be included in the multi-energy market. Without loss of generality, the additional energy consumption is chosen as thermal energy in this study. Therefore, a typical urban energy internet has four types of entities, namely the energy supplier (thermal power plant that can provide both heat and electricity), the large users and two energy service providers, namely the power grid company and the heating company.

Market Trading Mechanism
The energy market transaction entities of urban energy internet mainly include energy suppliers, energy service providers (including the power grid company and the heating company) and the large users.
The basic market transaction setup is as follows. Large users first forecast the load consumptions based on historical data and other information and then submit load data to energy suppliers, the power grid company and the heating company. Then the energy suppliers, power grid company and heating company make bids to the large users at the same time according to the load demand. Large users then choose the party that needs to pay the least amount for the transaction.
More specifically, 1) the energy suppliers own the thermal power plants, and they are assumed to operate in a typical mode of "fixing heat based on power" to supply energy. Energy suppliers give priority to meeting the thermal needs of large users. At the same time, electricity is sold to the large users or power grid company in the role of energy service provider. 2) The power grid and heating companies purchase excess electricity and heat from energy suppliers and then sell electricity and heat to large users. 3) Large users can choose to purchase heat and electricity from energy suppliers and pay service fees to energy service providers at the same time, or directly purchase electricity from the power grid and then convert part of the electricity into heat energy through electric heating equipment, or purchase heat and electricity separately from the heating company and power grid company.
The structure of the transactions in the urban energy internet market is shown in Figure 1.  From the perspective of large users, how to maximize their benefits when purchasing heat and power has become the focus of the energy internet market. Faced with the quotations of energy service providers and energy suppliers, large users are likely to choose the transaction mode with the maximum revenue. In this paper, we introduce game theory to analyze the trading behavior of various market participants, as well as the transactions realized with other market participants in the urban energy internet.

Tripartite Game Model
Before establishing the game model, several assumptions should be clarified. 1) All participants are completely rational, and the game participants in the urban energy internet market, namely the energy suppliers, the large users and energy service providers, act independently under the market trading mechanism. 2) Within a short period of time, the energy consumption, or power and heat generation, of the participants do not change. 3) Only the impact of price and the amounts of electricity and heat are considered in the process of trading; other market factors that affect the trading behavior are neglected.
Therefore, in this non-cooperative static game with complete information, the general tripartite game model can be expressed as: The model contains three elements: 1) Game entities N : energy internet market entities include all of the energy suppliers j F , , energy service providers of both power grid companies G and heating companies H , and the large users U . 2) Game strategies S : in the energy internet market, the game strategy of each participant is its quotation price.
3) Game utilities u : every rational participant wants to make a deal and get a payoff under the Nash equilibrium.

Market Entities' Cost-Income Model
The game payoff function for each player in the market can be shown as [27]: where , , and denote the game payoffs of energy suppliers, power grid company, heating company, and the large user, respectively; , , and mean the transaction revenues of energy suppliers, power grid company, heating company and the large user, respectively; , , and mean the service fees of energy suppliers, power grid company, heating company and the large user, respectively; , , and ℎ mean the other benefits of energy suppliers, power grid company, heating company and the large user, respectively.

a) Transaction revenue function
: For each energy supplier , ∀ ∈ {1,2, … } , its transaction revenue by trading electricity and heat can be represented as where is the number of energy suppliers; and represent, respectively, the amount of heat and its price that the -th energy supplier trades with the large user; and mean the amount of electricity and its price that the -th energy supplier trades with large user, respectively; and mean the amount of heat and its price, respectively, that the j -th energy supplier trades with power grid company; and mean the amount of heat and its price, respectively that the j -th energy supplier trades with the heating company. b) Service fee function : Energy service providers charge service fees for transactions between energy suppliers and large user: where is the electricity service fee charged by the power grid company when the energy suppliers trade electricity directly with the large user and is the heat service fee charged by the heating company when the energy suppliers trade heat directly with the large user.

c) Other benefit function
: other benefits of energy suppliers are expressed only at cost. In order to show the relationship between energy suppliers' electricity and heat energy transactions and their respective costs, the electricity and heat energy costs are calculated separately in the cost model. Therefore, other benefit of energy suppliers can be expressed as where and are the power generation amount and unit power generation cost of the -th energy supplier and and are the heat production amount and unit heat production cost of the -th energy supplier.
The three types of game revenues of the -th energy supplier can be combined as:

Large User
Without loss of generality, the large users in the urban energy internet are considered as one load aggregator to participate in the energy market.

a) Transaction revenue function
: can be formulated as where and represent the amount of electricity and its price that the power grid company trades with the large, user as an energy service provider, and and represent the amount of heat and its price that the heating company trades with the large user, as an energy service provider.

b) Service fee function
: can be formulated as: c) Other benefit function ℎ : large users have no other benefits, which is assumed to be ℎ = 0, since the large user can use electric heating equipment to convert electrical energy bought from the grid company into heat so as to meet the heat demand.
The game payoff of the large user can be combined as

Power Grid Company as an Energy Service Provider
a) Transaction revenue function : c) Other benefit : Other benefits for the power grid company as an energy service provider are only related to its own costs: where is the unit cost of electricity sold by the power grid company. The game payoffs of the power grid company as an energy service provider can be combined into 2.2.4. Heating company as an energy service provider a) Transaction revenue : b) Service fee function : c) Other benefit function . Other benefits for the heating company as an energy service provider are only related to its own costs: where is the unit cost of heat sold by the heating company. The game payoffs of the heating company as an energy service provider can be combined into Therefore, in the urban energy internet market, the strategy of the energy suppliers is the electricity price , and the strategies of the energy service providers are the service fees and . According to the trading mechanism in Section 2.1.1, the large users choose to trade with the party that needs to pay the least amount based on their payoff functions. In other words, the large users do not need to participate directly with a specific strategy; thus, there will be only three game players out of the four market entities in our game model, which is then named as a tripartite game model. The strategy sets of the three game players are ], respectively. , and are the upper limits of strategies for the three game players, respectively.

2.3.A New Nash Equilibrium Solving Method for the Tripartite Game Model
At present, there are many methods to solve the Nash equilibria in game problems. Traditional methods include the scribing method, definition method, iterative search method and method of eliminating unfavorable strategy sets [28]. In addition, there are some special Nash equilibrium solutions, such as the Lemke method for constrained affine generalized Nash equilibrium problem [29], the augmented Lagrangian method for generalized Nash equilibrium problems [30] and multi-Nash equilibrium solution algorithm based on learning theory. The game problem in this paper is solved by searching the entire strategy space, according to the definition of Nash equilibrium [31][32][33].
In the tripartite game model of energy internet market, the game payoffs of the energy suppliers are related to different strategy combinations of , and of all game players. The game payoff of the power grid company as an energy service provider is related to two game players' strategies of and . However, the game payoff of the heating company as an energy service provider is only related to its own strategy of . Therefore, we propose a new game-tree search method for the tripartite game model. The treediagram of the Nash equilibria solution for the tripartite game is shown in Figure 2, and the detailed solution process is described as follows. (1) Firstly, the existence of the Nash equilibria for the proposed tripartite game on the continuous strategy sets is demonstrated.
According to Nash's Existence Theorem, any n-player normal-form game with finite strategy sets for all players has a Nash equilibrium in mixed strategies [31][32][33]. Therefore, the Nash equilibria of the proposed tripartite game model will surely exist, due to the fact that the strategies of all three game players in the urban energy internet belong to mix strategies with finite value space.
In this game problem, the strategies for game players to participate in market competition are all continuous variables. The Nash equilibrium problem of continuous strategy game can be solved by analyzing the specific participant's best response function to other participants' strategy combinations. It can be seen from Section 2.2 that the game players' payoff functions are typically piecewise linear functions, so the best response function of each participant can be considered in segments, and the Nash equilibria of the game can be obtained by combining the segmented results together.
Since the payoff functions are not continuous, the conventional iterative search methods are not applicable. Therefore, the proposed tripartite game problem can be solved by searching the entire strategy space, according to the definition of Nash equilibrium. To solve the game model on a computer platform, it is necessary to discretize the game players' strategies. The formulas are as follows: where, for the energy supplier, the lower limit of its strategy is 0 and the upper limit is , with an incremental step size of and a total number of steps; for the grid company, its strategy has a lower limit of 0 and upper limit of , with an incremental step size of and a total number of steps. According to Nash's existence theorem [31][32][33], there is a Nash equilibrium solution for a game problem with finite strategy sets after discretization.
(2) Then, the Nash equilibria of the two-party game model can be obtained by searching the best payoffs of the two participants [31].
Since the game payoff of the heating company as an energy service provider is only related to its own strategy , we can reformulate the best response functions for the energy supplier and power grid company based on piecewise functions according to the variable . Then, the proposed tripartite game model can be simplified to a two-party game problem for each value of .
For the mixed strategy game problem, define * as the Nash equilibrium point of a game model; then, the following inequality condition holds: where is the number of game players; is the payoff of the game player ; is the strategy of the game player ; is the strategy set of the game player ; and * is strategy combination for the game players other than the player .
Considering the value range of the strategy of the heating company as an energy service provider, the optimal game payoff of the heating company can be reached under the Nash equilibrium constraint of the two-party game problem in each branch search scenario of the game tree.
(3) Lastly, through the above game-tree search method, the Nash equilibria of the tripartite game can be solved, and the flowchart for the solving process is shown in Figure 3.

Results
In order to verify the effectiveness of the tripartite game model and the solving method for the urban energy internet market, case studies are conducted as follows. The thermal load demand of the large user is , the electrical load demand is , the thermoelectric ratio of energy supplier is r and the electrical-heat conversion efficiency of large user is . The basic system parameters are described in Table 1. The solution program is coded on the MATLAB platform to solve Nash equilibria of the tripartite game model, and the graphic result is shown in Figure 4.  It can be seen from Figure 4 that the thermoelectric ratio of energy supplier and other parameters will affect the transaction objects for the large user. If ≤ / , the large user has three bidding options: (1) large user trades both heat and electricity only with the energy supplier; (2) large user purchases electricity from the power grid company, and the energy supplier trades electricity with the power grid company and heat with the heating company; and (3) large user trades electricity with the power grid company and heat with the heating company, and the energy supplier trades electricity with the power grid company and heat with the heating company.
If > / , the energy supplier can provide thermal energy to meet the heat demand of the large user, while the produced electrical energy cannot meet the electricity demand of the large user. Under this condition, the large user needs to purchase additional electrical power from the power grid company.
The Nash equilibria critical condition of the tripartite game model can be obtained by analyzing the strategy variable of the heating company hser . Considering the heating company's strategy hser and other parameters, the Nash equilibria of the two-party game are shown in Figure 5. There are two types of transactions: one is between the large user and energy supplier; the other is between the large user and energy service providers. The latter includes two scenarios according to the numerical relationship between and . The large user will only trade with the power grid company when ≤ . For > , the large user will only trade with the heating company. In Figure  5, the line segment part represents the Nash equilibria of transactions between the large user and energy supplier. The rectangular area represents the Nash equilibria of transactions between the large user and energy service providers. More specifically, when ≥ , the tripartite game Nash equilibria change with the strategy of the third party. As goes from 0 to its maximum, the line segment will merge to the point , and the Nash equilibria critical point of the transaction between the large user and energy supplier will be , and the following equation will be satisfied: = − for the third-party strategy variable. Beyond this critical point, the line segment part disappears, and the large user is better off choosing to trade with the energy supplier. When < , similarly, the line segment will merge to the point , and the following equation will be satisfied: = / − for the third party strategy variable.
The parameters of electrothermal conversion efficiency , thermoelectric ratio , the heat and electricity costs and of energy service providers, the electricity price of power grid companies and heat price of heating companies, will affect the Nash equilibria distribution of the tripartite game. The simulation results of the tripartite game model include 10 scenarios. The analysis is carried out under the most complex Nash equilibria correspondence condition for one scenario under the condition of ≤ , ≤ and > > / ; the details of the Nash equilibria regions are shown in Figure 6. Other scenarios are supplemented in Appendix A. The Nash equilibria of the tripartite game will satisfy the expressions shown in (20) In Figure 6, the boundary line segment between the large user's transaction with the energy supplier and the energy service providers is + = + − + , namely the line segment in Figure 5.
On one straight line  Figure 6. Two-dimensional display of tripartite game Nash equilibria.
The trading modes for the four intervals can be expressed as follows. 1) When > > 0, the heating company will not have a dominant strategy no matter what strategy is under this scenario, and the line segment of the Nash equilibria part will disappear. The Nash equilibria will only contain the black shaded rectangular region in Figure 6, and the transaction will be realized between the large user and the power grid company. The results can also be derived by the first expression in (20).

2) When
> , the red line segment of the Nash equilibria part represents the transaction between the large user and the energy supplier; the red shaded rectangular region of the Nash equilibria represents the transaction between the large user and the power grid company, or the transaction between the large user and the heating company.

3) When
/ > > / , the blue line segment of the Nash equilibria part also represents the transaction between the large user and the energy supplier; the blue shaded region of the Nash equilibria shows that the transaction will only be realized between the large user and the power grid company in this case.

4) When
, the green shaded region of the Nash equilibria represents the transaction between the large user and the power grid company only. The detailed strategy combination and game payoffs for the market participants in the above scenario are shown in Table 2. It is worth noting that the Nash equilibrium is a continuous region and therefore contains multiple consecutive points related to different game strategy combinations. According to the market trading mechanism in Section 2.1.1, each game player will change its own strategy and choose the trading mode that maximizes its own revenue. For example, there will be two kinds of trading outcomes for the strategy combinations 1 and 2 when changing the energy supplier's . Although the revenue of the power grid company may increase from 2000 to 3000 yuan under the non-equilibrium strategy combination 1, the energy suppliers will not choose strategy 1 because its revenue will decrease from 0 to -500 yuan in that case. Similarly, the power grid company will not choose strategy 3 with revenue as low as 1000 yuan, and the heating company will not choose both strategy 1 and strategy 3, which bring itself the revenue of only 600 yuan. In other words, the game players compare their own income changes when choosing their own strategies, and avoid choosing their strictly disadvantaged strategies. Therefore, the proposed non-cooperative static tripartite game model will make all the market participants more rational. Table 2. Strategy combination and game payoffs for the market participants in the above scenario.

Discussion
The results of the game model established in this study are the Nash equilibrium payoffs of all market participants, including the large user. The market transaction status of the Nash equilibrium state is that under the current market parameters and all possible strategies of other market participants, each market player's equilibrium strategy or best response tends to maximize its benefits or avoid greater losses. This best response is not the global optimal solution in the optimization theory. Sometimes, if a game player wants to choose the strategy to maximize its benefits, other players will definitely choose an anti-strategy to make it lose more.
In addition, the proposed energy market trading model was initially proposed for the urban energy internet. Typically, in a town/urban area, there may be only one energy service provider who owns the transmission/distribution power network and another one who owns the heat supply pipeline network. It is also assumed that the users do not participate in the market as demand response service providers. As for the energy suppliers, they usually have similar payoff functions, according to the revenue and benefit functions in Section 2.2.1. Therefore, the proposed energy market trading model based on tripartite game theory is feasible in practice. Future work can be extended to add some additional market participants, including the demand response service providers, multiple energy service providers (more than two), in order to implement the proposed energy trading model to a larger energy market.

Conclusions
There are many key transaction issues that need to be resolved in the energy internet market. A tripartite game model is established to solve the multi-energy joint trading problem and market equilibrium problem in this paper. A game-tree search method for solving the game model based on the Nash equilibrium definition is proposed by analyzing the cost-income function and market transaction mechanism of each market entity. We are able to analyze the market transaction status for the participants based on the corresponding market transactions in different Nash equilibria scenarios and prove the applicability of the tripartite game model for multi-energy joint trading problems. The results show that the established model can effectively realize market equilibria with the best responses for all the market participants in the urban energy internet.

Conflicts of Interest:
The authors declare no conflict of interest.

Appendix A
The Nash equilibria of the tripartite game can be obtained in the following 10 scenarios (also shown in 10 branches in the tree diagram of Figure 2), which depends on the bidding strategies of the three parties in the urban energy internet.
(1) When ≥ , there will be four scenarios: two for ≤ and the other two for > .
For ≤ , the Nash equilibria of the tripartite game are shown in Figure A1. a) Scenario 1: ≤ and ≤ . The payoffs of the heating company providing energy service will be 2 and 2 ≤ ( − ), respectively. The Nash equilibria of the threeparty game are shown in the black shaded part of Figure A2 and can also be expressed as As shown in Eq. (A-1), when < , the energy trading center will match transactions between the large user and energy service providers; when = , the energy trading center will match transactions between the large user and the energy supplier. Figure A3. The tripartite game Nash equilibria diagram for > .
When < , the energy trading center will match transactions between the large user and energy service providers; on the other hand, when = , the energy trading center will firstly match transactions between the large user and energy supplier and then match the electricity shortage of the large user with the power grid company as an energy service provider.
d) Scenario 4 ： > and + − ≥ > . The three-party game Nash equilibria are shown in the purple shaded part of Figure A4, which can also be expressed as: In this scenario, the energy trading center will match transactions between the large user and energy service providers.   is in this case. The black shaded rectangular area in Figure A6 represents the Nash equilibria, and the transactions will be realized between the large user and the power grid company. The results can also be derived from the first expression of Eq. (A-6).
Case 2): For / ≥ > , the red line segment of the Nash equilibria part represents the transactions realized between the large user and the energy supplier; the red shaded rectangular area of the Nash equilibria represents the transactions between the large user and the power grid company, or the transactions between the large user and the heating company. When ≤ , the Nash equilibria of tripartite game are shown in the black shaded area of Figure A7; when + − ≥ > , the large user will only trade with grid companies to maximize its benefits, and the Nash equilibria are shown in the purple shaded area of Figure A7.  Figure A8; when ≥ > , the Nash equilibria are shown in the red shaded area and red line segment in Figure A8; when + − ≥ > , the Nash equilibria are shown in the purple shaded area of Figure A8. When ≥ , the Nash equilibria are shown in the black shaded area of Figure A9; when > > , the Nash equilibria are shown in the red shaded area and the red line segment in Figure A9; when ≥ > , the Nash equilibria are shown in the purple shaded area and the purple line in Figure A9; when + − ≥ ℎ > ℎ , the Nash equilibria are shown in the yellow shaded area of Figure A9