This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

An Architecture for Distributed Energies Trading in Byzantine-Based Blockchain

Jianxiong Guo, Xingjian Ding, Weili Wu J. Guo and W. Wu are with the Department of Computer Science, Erik Jonsson School of Engineering and Computer Science, Univerity of Texas at Dallas, Richardson, TX, 75080 USA; X. Ding is with the School of Information, Renmin University of China, Beijing, CHN E-mail: [email protected] received April 19, 2005; revised August 26, 2015.
Abstract

With the development of smart cities, not only are all corners of the city connected to each other, but also connected from city to city. They form a large distributed network together, which can facilitate the integration of distributed energy station (DES) and corresponding smart aggregators. Nevertheless, because of potential security and privacy protection arisen from trustless energies trading, how to make such energies trading goes smoothly is a tricky challenge. In this paper, we propose a blockchain-based multiple energies trading (B-MET) system for secure and efficient energies trading by executing a smart contract we design. Because energies trading requires the blockchain in B-MET system to have high throughput and low latency, we design a new byzantine-based consensus mechanism (BCM) based on node’s credit to improve efficiency for the consortium blockchain under the B-MET system. Then, we take combined heat and power (CHP) system as a typical example that provides distributed energies. We quantify their utilities, and model the interactions between aggregators and DESs in a smart city by a novel multi-leader multi-follower Stackelberg game. It is analyzed and solved by reaching Nash equilibrium between aggregators, which reflects the competition between aggregators to purchase energies from DESs. In the end, we conduct plenty of numerical simulations to evaluate and verify our proposed model and algorithms, which demonstrate their correctness and efficiency completely.

Index Terms:
Distributed energies trading, Smart city, Consortium blockchain, Byzantine consensus, Stackelberg game.

I Introduction

The deployment of distributed energy stations (DESs) based on the internet built by the development of smart cities has been a hot topic because of its great potential to reduce the consumption of fossil fuels and curb greenhouse gas emission [1]. Consider a smart community equipped with a DES, it is used to supply residents in this community with multiple energies, such as electricity and heat. DES existing in the community can reduce residents’ dependence on the centralized supply of energies, such as electricity from power grid and heat from heat station, thus save resources and reduce the cost of using energies. Moreover, it can sell surplus electricity and heat to the aggregators of power grid and heat station for making revenue. DESs can trade their surplus energies with aggregators that are responsible for collecting energies from their communities in a peer-to-peer (P2P) manner, thereby the multiple energies trading problem discussed in this paper is formulated.

Traditional P2P energies trading is performed on the centralized energy management platform, however, such a mechanism has many drawbacks. Traders often worry that their payment security and privacy protection when trading in an untrusted and opaque third centralized platform. This intermediary needs to verify and manage transactions between aggregators and DESs. If troubled by some damages such as single point of failure, it will lead to privacy leakage and transaction loss [2]. Thus, it is urgent to create a secure energies trading system to guarantee trading among the distributed internet of energy can be executed effectively. It encourages the DESs to sell their energies to aggregators without worry, which promotes the rational use of energies.

Blockchain is a public and distributed database that is designed to store verified transactions among all valid participants without a trusted intermediary. Here, a new transaction is required to be validated by a group of authorized participants, and then it can be added into the blockchain in a permanent and tamper-resistant manner. It can be used to construct a secure and reliable energies trading system because of its decentralization, security, and anonymity [3] [4]. Consider a smart city, it consists of a number of communities, each of which is equipped with a DES. There are two aggregators, electricity aggregator (EA) and heat aggregator (HA), trading with DESs in this city. The aggregators of different cities are interconnected to form a wide area network. Based on that, we propose a blockchain-based multiple energies trading (B-MET) system, where all aggregators are authorized participants required to store the blockchain and complete the consensus process. Thus this is a consortium blockchain as well, which is a little different from the classical public blockchain used in Bitcoin and Ethereum. Here, consortium blockchain is more convenient and flexible to achieve trading functions.

Based on such an architecture, we design a smart contract that ensures energies trading to be performed automatically when the trading conditions are satisfied. However, the proof-based consensus mechanism such as proof-of-work that is adopted by the most of blockchain applications is not suitable to our consortium blockchain in B-MET system because of its high latency, low throughput, and demanding computing power requirement. To finish the task of energies trading, it needs low latency and high throughput consensus mechanism. Thereby we design a new byzantine-based consensus mechanism (BCM) based on node’s credit, which reflects the performance of this node in the previous experience of participating in consensus. After each round of consensus, each node’s credit should be updated according to its voting result. If its voting is consistent with the result of consensus, its credit will be increased; otherwise will be decreased. Their credits affect directly their probabilities of being chosen as the leader and voting weight in the next round. This not only motivates participants to make the right decision, but also speeds up the consensus process.

In the aforementioned contract, there is an interaction between aggregator and DES before initiate a new energies trading, where the aggregator offers a unit price to purchase a kind of energy from DES, then DES decides the amount of energy they are willing to sell. In this paper, we take combined heat and power (CHP) system as an instance of DES, and aggregators are EA and HA. In a smart city, for each DES in this city, its utility consists of two parts: one is to serve the residents living in the community for satisfying their Daily consumption, and the other is sold to the aggregators for gaining revenues. For the aggregators in this city, their gains come from buying energies from DESs at a lower price and selling them at the retail price. To motivate the DESs to sell more energies, the aggregators should offer a higher price to them, but doing so raises costs and may result in lower overall profits. Since the multilevel decision-making processes between aggregators and DESs in a city, we formulate a novel multi-leader multi-follower (MLMF) Stackelberg game to model this bargain between them. Here the aggregators are leaders and DESs are followers. Their goals are to maximize their utilities or profits respectively. This MLMF Stackelberg game is analyzed and solved thoroughly in this paper, and we prove the Nash equilibrium (NE) among aggregators exists and is unique. Because the DESs are always able to respond aggregators with the optimal strategy according to their offered prices, the Stackelberg equilibrium (SE) exists and is unique as well. We propose a distributed algorithm that is guaranteed to reach the unique SE by limited information interactions. Finally, we conduct extensive numerical simulations to test the B-MET system, verify the correctness of our proposed utility functions and feasibility of our proposed algorithm.

The rest of this paper is organized as follows: Sec. II discusses the-state-of-art work. Sec. III introduces the architecture of B-MET system, describes CHP system, and defines utility functions. Sec. IV presents smart contract and byzantine-based blockchain. Sec. V introduces the Stackelberg game and discuess the solving process. Sec. VI conducts numerical simulations. Sec. VII is conclusion.

II Related Work

Distributed energy systems have been applied widely in many different forms, such as DES [5] and vehicle-to-grid [6] [7], to curb greenhouse gas and save cost. Integrating DESs into a smart grid [8] has attracted more and more researchers to participate in recently. This rouse the problems of energy management and energy trading problem. Cecati et al. [9] exploited DES to make the cost of power delivery minimized by use of an efficient smart grid management system. Georgilakis et al. [1] summarized the optimally distributed generation placement problem systematically, classified and analyzed current and future research about it. Zhang et al. [10] considered microgrid as a local energy supplier for domestic buildings by utilizing DES, and studied optimal scheduling of energy consumption through mixed-integer programming. However, they only focused on electricity trading between grid and DESs, in this paper we consider multiple energies trading due to the diversity of energy forms.

In P2P energy trading, blockchain technology has been introduced to address transaction security issues. Kang et al. [11] put forward a localized P2P electricity trading pattern based on consortium blockchain among plug-in hybrid electric vehicles. Li et al. [12] proposed a P2P energy trading architecture based on consortium blockchain for the industrial internet of things relied on a credit-based payment scheme. zhou et al. [7] considered the scenario of vehicle-to-grid, and developed a secure energy trading mechanism based on consortium blockchain. Guo et al. [13] studied a blockchain-based energy management system that guarantees secure electricity trading between grid and DESs. However, they lose sight of low throughput and high latency in their proof-based consensus process, in this paper we try to address it by proposing a new byzantine-based consensus mechanism.

Stackelberg game is an effective tool to model the interactions in energies trading. Maharjan et al. [14] studied the demand response management by establishing a Stackelberg game between multiple utility companies and customers to maximized their utilities respectively. Bu et al. [15] proposed a four-stage Stackelberg game to consider a real-time pricing problem for the electricity retailer in the demand-side management. Yao et al. [16] modeled the interactions between cloud server and mines by Stackelberg game, and solved it by multiagent reinforcement learning algorithm. Chen et al. [17] proposed a Stackelberg game-based framework to simulate the multiple resources allocation between cloud server and end users, and found an equilibrium solution by a backward induction process. However, most of these models have only one leader, in this paper the interactions between aggregators and DESs are MLMF, more complex and realistic.

III System Architecture

Consider a smart city, it consists of a number of disjoint smart communities, each of which is equipped with a distributed energy station (DES) responsible for supplying multiple energies, such as electricity and heat, to these residents living in this community. In this city, there are several aggregators, which represent different companies respectively, collecting different kinds of energies from all DESs appertained to this city. The architecture of blockchain-based multiple energies trading (B-MET) system is shown in Fig. 1. In the B-MET system, given a smart city Si{\rm S}_{i}, the entities in this smart city can be shown as follows:

Refer to caption
Figure 1: The architecture of blockchain-based multiple energies trading system.

1) Aggregators: There are two aggregators, electricity aggregator (EAi{\rm EA}_{i}) and heat aggregator (HAi{\rm HA}_{i}), associated with this smart city Si{\rm S}_{i}. The EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) is delegated by power grid (resp. heat station) as a monopoly of the energy market. They purchase electric energy (resp. heat energy) generated by DESs in those communities that belong to this smart city.

2) DESs: The city Si{\rm S}_{i} can be partitioned into an uncertain number of disjoint smart communities, denoted by set {Ci1,Ci2,,Cij,}\{{\rm C}_{i1},{\rm C}_{i2},\cdots,{\rm C}_{ij},\cdots\}. In community Cij{\rm C}_{ij}, there is a distributed energy station DESij{\rm DES}_{ij} supplying electricity and heat to the residents living in this community. Besides, DESij{\rm DES}_{ij} is able to sell surplus electric energy (resp. heat energy) to the corresponding EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) in order to make revenues.

3) Smart meters: It is a built-in component installed in each aggregator that monitors the energy flow transferred by each DES in this city in real-time, and decide whether the transaction has been accomplished.

Then, consider a larger ecosystem, such as a country, it is composed of a number of smart cities. This ecosystem 𝕊\mathbb{S} can be denoted by 𝕊={S1,S2,,Si,}\mathbb{S}=\{{\rm S}_{1},{\rm S}_{2},\cdots,{\rm S}_{i},\cdots\}. Here, each Si𝕊{\rm S}_{i}\in\mathbb{S} is a smart city in this ecosystem, and Si={{EAi,HAi},{Ci1,Ci2,,Cij,}}{\rm S}_{i}=\{\{{\rm EA}_{i},{\rm HA}_{i}\},\{{\rm C}_{i1},{\rm C}_{i2},\cdots,{\rm C}_{ij},\cdots\}\}. For convenience, the notation DESij{\rm DES}_{ij} can be considered equivalent to Cij{\rm C}_{ij}. Our B-MET system is established on such an ecosystem, in which all aggregators, including EAs and HAs, are interconnected each other to form a peer-to-peer (P2P) network called “blockchain network”, shown in the upper half of Fig. 1. In order to support secure energy trading between aggregators and DESs, we adopt consortium blockchain to construct our B-MET. In traditional blockchain, the consensus process is carried out by all participants. But the blockchain in the B-MET takes all aggregators in the ecosystem as authorized participants, and they are charged with storing the whole blockchain and performing the consensus process. Each aggregator manages and records those transactions between it and DESs in its city. The transactions are packaged into blocks and added into blockchain when the consensus among aggregators is reached, thus stored in all aggregators permanently.

III-A Combined Heat and Power System

Here, the aforementioned DES is implemented by the combined heat and power (CHP) system. The CHP system consumes natural gas to generate electricity and heat that serve its community or sell to the aggregators of its corresponding city, shown in Fig. 2. The gas is fed into the gas turbine (GT) which will generate electricity EgE_{g} and emit high-temperature waste heat QwQ_{w}. The heat QwQ_{w} can be recovered by heat recovery system that can generate heat QrQ_{r}. Here, EuseE_{use} (resp. QuseQ_{use}) is used to supply electricity (resp. heat) to community, and EexcE_{exc} (resp. QexcQ_{exc}) is sold to EA (resp. HA).

Refer to caption
Figure 2: The structure of combined heat and power (CHP) system.

Shown as Fig. 2, the total electricity generated by GT is Eg=Euse+EexcE_{g}=E_{use}+E_{exc}. Measured in days, the units of quantities denoted by EE and QQ are (J/day)({\rm J}/{\rm day}). The gas consumption per day FF (m3/day)({\rm m}^{3}/{\rm day}) can be defined as

F=Eg/(qηg)=Qw/(q(1ηg))F=E_{g}/(q\cdot\eta_{g})=Q_{w}/(q\cdot(1-\eta_{g})) (1)

where qq (J/m3)({\rm J}/{\rm m}^{3}) is the calorific value of natural gas, thereby the total energy generated by FF is qFq\cdot F definitely. The ηg\eta_{g} is the electric conversion of GT, percentage energy that transferred to electricity. Given a specific GT, its electric conversion can be considered as a constant. Besides, let ηr\eta_{r} be the thermal efficiency of heat recovery system, and ηh=1\eta_{h}=1 be the thermal efficiency of heat component. We have Qr=Qwηr=Qpre+QexcQ_{r}=Q_{w}\cdot\eta_{r}=Q_{pre}+Q_{exc} and Quse=QpreQ_{use}=Q_{pre} respectively.

As mentioned above, for a given CHP system, the electricity (resp. heat) generated by it can be divided into two parts: one is used to serve local residents, another is sold to EA (resp. HA). Thus, we define two dispatching factor α,β[0,1]\alpha,\beta\in[0,1] for this CHP, where α=Euse/Eg\alpha=E_{use}/E_{g} is the electric dispatching factor and β=Qpre/Qr\beta=Q_{pre}/Q_{r} is the heat dispatching factor. This DES needs to buy natural gas from the gas company. The company is for profit, thus it is valid to assume the gas company always supply enough gas that is able to meet the DES’s requirement. Given a smart city Si{\rm S}_{i} and a smart community CijSi{\rm C}_{ij}\in{\rm S}_{i}, the energy relationships in the CHP system of Cij{\rm C}_{ij} has been obtained, that is

Euseij\displaystyle E_{use}^{ij} =αijηg(qFij)\displaystyle=\alpha^{ij}\cdot\eta_{g}\cdot(qF^{ij}) (2)
Eexcij\displaystyle E_{exc}^{ij} =(1αij)ηg(qFij)\displaystyle=(1-\alpha^{ij})\cdot\eta_{g}\cdot(qF^{ij}) (3)
Quseij\displaystyle Q_{use}^{ij} =βij(1ηg)ηr(qFij)\displaystyle=\beta^{ij}\cdot(1-\eta_{g})\cdot\eta_{r}\cdot(qF^{ij}) (4)
Qexcij\displaystyle Q_{exc}^{ij} =(1βij)(1ηg)ηr(qFij)\displaystyle=(1-\beta^{ij})\cdot(1-\eta_{g})\cdot\eta_{r}\cdot(qF^{ij}) (5)

In this model, we assume all the CHP equipments in this ecosystem 𝕊\mathbb{S} has the same efficiency parameters ηg\eta_{g} and ηr\eta_{r}. Each CHPij{\rm CHP}_{ij} can determine the amount of electricity (resp. heat) that can be sold to EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) by adjusting its dispatching factor αij\alpha^{ij} (resp. βij\beta^{ij}) automonously. For example, when αij\alpha^{ij} is one, it means that CHPij{\rm CHP}_{ij} will not sell any electricity to EAi{\rm EA}_{i} for making revenue.

III-B Utility Functions

Consider a smart city Si{\rm S}_{i}, the EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) offers a unit price peip_{e}^{i} (resp. phip_{h}^{i}) to collect surplus electricity (resp. heat) generated by DESijSi{\rm DES}_{ij}\in{\rm S}_{i}, where the units of peip_{e}^{i} and phip_{h}^{i} are coin/J{\rm coin}/{\rm J}. For each DESijSi{\rm DES}_{ij}\in{\rm S}_{i}, it is a risk-averse agent in the energy market. If DESij{\rm DES}_{ij} chooses dispatching factor αij\alpha^{ij}, βij\beta^{ij}, and consume natural gas FijF^{ij}, that is

Uij(αij,βij,Fij)\displaystyle U^{ij}(\alpha^{ij},\beta^{ij},F^{ij}) =Weij(Euseij)+Whij(Quseij)\displaystyle=W_{e}^{ij}(E_{use}^{ij})+W_{h}^{ij}(Q_{use}^{ij})
+peiEexcij+phiQexcijcfFij\displaystyle+p_{e}^{i}\cdot E_{exc}^{ij}+p_{h}^{i}\cdot Q_{exc}^{ij}-c_{f}\cdot F^{ij} (6)

where WeijW_{e}^{ij} (resp. WhijW_{h}^{ij}) is the satisfaction function of community Cij{\rm C}_{ij} that provides electricity (resp. heat) to satisfy the usage of local residents in this community, and EuseijE_{use}^{ij}, EexcijE_{exc}^{ij}, QuseijQ_{use}^{ij}, and QexcijQ_{exc}^{ij} are defined from (2) to (5). Here, cfc_{f} (coin/m3)({\rm coin}/{\rm m}^{3}) is the unit cost of natural gas.

From our simplified CHP model, we denote the cost of electricity (resp. heat) produced from DESij{\rm DES}_{ij} by cec_{e} (resp. chc_{h}). Then, the cost (coin/J)({\rm coin}/{\rm J}) of electricity and heat can be quantified, that is ce=cf/qc_{e}=c_{f}/q and ch=cf/(qηr)c_{h}=c_{f}/(q\cdot\eta_{r}). Thus, we have cfFij=ηgce(qFij)+(1ηg)chηr(qFij)c_{f}\cdot F^{ij}=\eta_{g}\cdot c_{e}\cdot(qF^{ij})+(1-\eta_{g})\cdot c_{h}\cdot\eta_{r}\cdot(qF^{ij}). If the price peip_{e}^{i} (resp. phip_{h}^{i}) offered by EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) is less than the cost cec_{e} (resp. chc_{h}), this DESij{\rm DES}_{ij} will not sell any electricity (resp. heat) to them. It will reduce the gas intake FijF^{ij} such that only meet its local requirement. Like this, there is no energies trading between aggregators and DESs, and obviously, it is not what we want to see. Thus, it is reasonable to consider the prices offered by aggregators satisfy peicep_{e}^{i}\geq c_{e} and phichp_{h}^{i}\geq c_{h}. At this time, for each DESijSi{\rm DES}_{ij}\in{\rm S}_{i}, it will produce electricity and heat as much as possible, because of the fact that it is always profitable to sell them to the aggregators. For maximizing its utility, each CHP system will run at full capacity. Here, for each CHPij{\rm CHP}_{ij}, we define its maximum production capacity (maximum gas consumption) per day as FmijF_{m}^{ij}. Therefore, the utility Uij(αij,βij,Fmij)U^{ij}(\alpha^{ij},\beta^{ij},F_{m}^{ij}) can be denoted by Uij(αij,βij)U^{ij}(\alpha^{ij},\beta^{ij}), because FmijF_{m}^{ij} is considered as a constant.

Remark 1.

After here, we denote Xij=ηg(qFmij)X^{ij}=\eta_{g}\cdot(qF^{ij}_{m}) and Yij=(1ηg)ηr(qFmij)Y^{ij}=(1-\eta_{g})\cdot\eta_{r}\cdot(qF^{ij}_{m}) for convenience.

Based on [14] [18] [6], the natural logarithmic functions were adopted extensively in characterizing the satisfaction of comsuming energy. That is

Weij(Euseij)\displaystyle W_{e}^{ij}(E_{use}^{ij}) =keijln(1+beijEuseij)\displaystyle=k_{e}^{ij}\cdot\ln(1+b_{e}^{ij}\cdot E_{use}^{ij}) (7)
Whij(Quseij)\displaystyle W_{h}^{ij}(Q_{use}^{ij}) =khijln(1+bhijQuseij)\displaystyle=k_{h}^{ij}\cdot\ln(1+b_{h}^{ij}\cdot Q_{use}^{ij}) (8)

where keijk_{e}^{ij} (resp. khijk_{h}^{ij}) is a non-negative satisfaction coefficient for electricity (resp. heat) in community Cij{\rm C}_{ij}, and beijb_{e}^{ij} (resp. bhijb_{h}^{ij}) is a non-negative adaption coefficient electricity (resp. heat) in this community as well. The adaption coefficients were proposed in [13] first, which aimed to control the variation range of the term ln(1+)\ln(1+\cdot), avoid it growing infinitely. Generally, we let ln(1+beijEuseij)=1\ln(1+b_{e}^{ij}\cdot E_{use}^{ij})=1 (resp. ln(1+bhijQuseij)=1\ln(1+b_{h}^{ij}\cdot Q_{use}^{ij})=1) when we choose αij=1\alpha^{ij}=1 (resp. βij=1\beta^{ij}=1) by setting a valid adaption coefficient beijb_{e}^{ij} (resp. bhijb_{h}^{ij}) [13]. Base on that, thereby we can formulate beijb_{e}^{ij} and bhijb_{h}^{ij} as follows:

beij=(1/Xij)(e1)bhij=(1/Yij)(e1)b_{e}^{ij}=(1/X^{ij})\cdot(e-1)\text{; }b_{h}^{ij}=(1/Y^{ij})\cdot(e-1) (9)

For aggregators in this city, power grid and heat station are the retailers for electricity and heat, however they do not have pricing power, because the retail prices of electricity and heat subject to government’s regulation. Hence, we define a retail price rer_{e} (resp. rhr_{h}) of electricity (resp. heat). As a selfish participant, it requires that pei[ce,re]p_{e}^{i}\in[c_{e},r_{e}] and phi[ch,rh]p_{h}^{i}\in[c_{h},r_{h}]. From (6), if peip_{e}^{i} (resp. phip_{h}^{i}) offered by EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) is too low, each DESijSi{\rm DES}_{ij}\in{\rm S}_{i} will respond with raising its dispatching factor αij\alpha^{ij} (resp. βij\beta^{ij}), and sell less energy to aggregators. If the aggregators offer a high price to purchase energy, their profitable spaces are reduced even if DESs are willing to sell more energies to them. Both of these cases will cause aggregators’ profit to be cut down. Therefore, it is important for aggregators to offer a optimal price such that not only encourage DESs to sell more energies, but also ensure sufficient profitability. If EAi{\rm EA}_{i} (resp. HAi){\rm HA}_{i})) offers a price peip_{e}^{i} (resp. phip_{h}^{i}), its profit function can be defined as

Vei(pei,phi)\displaystyle V_{e}^{i}(p_{e}^{i},p_{h}^{i}) =(repei)CijSiEexcij\displaystyle=(r_{e}-p_{e}^{i})\cdot\sum\nolimits_{{\rm C}_{ij}\in{\rm S}_{i}}E_{exc}^{ij} (10)
Vhi(phi,pei)\displaystyle V_{h}^{i}(p_{h}^{i},p_{e}^{i}) =(rhphi)CijSiQexcij\displaystyle=(r_{h}-p_{h}^{i})\cdot\sum\nolimits_{{\rm C}_{ij}\in{\rm S}_{i}}Q_{exc}^{ij} (11)

where VeiV_{e}^{i} (resp. VhiV_{h}^{i}) is the profit function of the EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) that collects electricity (resp. heat) from DESs in its city, and EexcijE_{exc}^{ij} and QexcijQ_{exc}^{ij} are defined in (3) and (5).

IV Byzantine-Based Blockchain

In this section, we will introduce a smart contract used to perform energies trading, and design a novel byzantine-based consensus mechanism based on the B-MET system.

IV-A Smart Contract

A smart contract is a collection of programmable digital agreement that every participant commit to comply. Under our blockchain-based energies trading ecosystem, a transaction can only happen between aggregators and DESs in the same city. Thereby, consider a city Si{\rm S}_{i}, a smart contract can be decided together by its participants, which consist of an aggregator k{EAi,HAi}k\in\{{\rm EA}_{i},{\rm HA}_{i}\} and a DESijSi{\rm DES}_{ij}\in{\rm S}_{i}. We denote such a smart contract by Contract(k,DESij,STime)Contract(k,{\rm DES}_{ij},STime). Between anonymous and untrusted entities in a city, the smart contract is able to execute credible transactions without third institutions. Then, the procedure of its smart contract Contract(k,DESij,STime)Contract(k,{\rm DES}_{ij},STime) is presented as follows:

1) System initialization: At the beginning, each DESijSi{\rm DES}_{ij}\in{\rm S_{i}} needs to acquire a unique identification IDijID_{ij} by registering in the designated institution authorized by government. It will be assigned with its public/private key pair (PKij,SKij)(PK_{ij},SK_{ij}) and a AccountijAccount_{ij}. That is

{IDij,PKij,SKij,Accountij}register(DESij)\{ID_{ij},PK_{ij},SK_{ij},Account_{ij}\}\leftarrow\text{register}({\rm DES}_{ij})

where each account is associated with its wallet address and balance, Accountij{Addressij,Balanceij}Account_{ij}\leftarrow\{Address_{ij},Balance_{ij}\}. Then, for each aggregator k{EAi,HAi}k\in\{{\rm EA}_{i},{\rm HA}_{i}\} in this city, it has those necessary information {IDk,PKk,SKk,Accountk}\{ID_{k},PK_{k},SK_{k},Account_{k}\} as well. But there is a credit value CreditkCredit_{k} that represent the reputation of aggregator kk, thereby we have Accountk{Addressk,Balancek,Creditk}Account_{k}\leftarrow\{Address_{k},Balance_{k},Credit_{k}\}. Here, technologies of asymmetric encryption are usually adopted by current blockchain system for the sake of security, privacy, and data integrity. Given a massage msgmsg encrypted by DESij{\rm DES}_{ij}, we have Hash(msg)=PKij(SKij(Hash(msg)))Hash(msg)=PK_{ij}(SK_{ij}(Hash(msg))), where the unforgeability and integrity is guaranteed.

2) Creation: An aggregator k{EAi,HAi}k\in\{{\rm EA}_{i},{\rm HA}_{i}\} offers a price pkp_{k} to buy energy from communities in its city, then DESij{\rm DES}_{ij} responds it with the amount of energy x{Eexcij,Qexcij}x\in\{E_{exc}^{ij},Q_{exc}^{ij}\} that can be sold to kk. Like this, a new smart contract Contract(k,DESij,STime)Contract(k,{\rm DES}_{ij},STime) is generated by signing with their private key respectively. Then, this contract will be broadcasted to all authorized participants (aggregators) in the ecosystem 𝕊\mathbb{S}. After reaching a consensus, this smart contract will be deployed and executed automatically. Each smart contract between aggregator and DES, Contract(k,DESij,STime)Contract(k,{\rm DES}_{ij},STime), is associated with several variables, which include account information (Accountk,Accountij)(Account_{k},Account_{ij}), offered price pkp_{k}, amount of energy xx, expected transaction time TransTimeTransTime, and timestamp STimeSTime. To guarantee this contract can be executed successfully, it needs to verify whether aggregator kk has sufficient balance such that Balancekpkx{\rm Balance}_{k}\geq p_{k}\cdot x and whether DESij{\rm DES}_{ij} has enough production capacity to supply xx amount of corresponding energy on time.

3) Execution: The Contract(k,DESij,STime)Contract(k,{\rm DES}_{ij},STime) will be executed if current time tTransTimet\geq{\rm TransTime} after reaching a consensus among aggregators in blockchain network. From now on, it begins to trade energy and finish payment. The smart meter in aggregator kk verifies whether the amount of energy has been transported to the designated location. Then, fed this result from smart meter into the smart contract, if yes, it will execute the payment process automatically, that is

(k,Balancekpkx)(DESij,Balanceij+pkx)(k,Balance_{k}-p_{k}\cdot x)\text{; }({\rm DES}_{ij},Balance_{ij}+p_{k}\cdot x)

Here, we design a mechanism that the balance is permitted to be negative. At the moment of payment, the smart contract will complete payment as usual if the kk’s balance is not enough to pay. In this way, the kk’s balance will become negative. Then, any contract that aggregator kk participants in will not be executed until its balance back to be positive.

Generally speaking, the energies trading between aggregators and DESs can be summarized as follows: In a smart city, a DES begins a smart contract with an aggregator by responding it according to its offered price. This contract needs to be verified by the consensus process in blockchain network. Then, it will execute the predefined procedure automatically once the trading conditions are met, which achieves the digital currency and energy exchange specified by contract between participants in a secure manner.

IV-B Byzantine-based Consensus mechanism

As mentioned early, a consensus process is necessary to be performed so as to ensure the consistency of blockchain stored in every authorized node. Castro et al. [19] proposed a practical byzantine fault tolerance (PBFT) algorithm, which has been used in consortium blockchain system widely. Based on it and combined with the characteristics of energies trading, we design a new byzantine-based consensus mechanism (BCM). Our consensus process is performed among all aggregators in the ecosystem 𝕊\mathbb{S}, and each of them has a local transaction pool (LTP) to store all transactions it receives. The consensus process is executed round by round, and the time interval of block generation is given by ΔT\Delta T. There are three main stages, shown in Fig. 3, that is pre-prepare, prepare, and commit.

Refer to caption
Figure 3: The consensus process of BCM.

First, let us introduce the credit model, which will be used in leader election and to decide whether to reach a consensus. Let M={EA1,HA1,EA2,HA2,}M=\{{\rm EA}_{1},{\rm HA}_{1},{\rm EA}_{2},{\rm HA}_{2},\cdots\} be the collection of consensus nodes. We have known that there is an attribute Creditk[0,1]Credit_{k}\in[0,1] for each kMk\in M, where a larger CreditkCredit_{k} implies node kk is more trustworthy. We denote by Creditk(i)Credit_{k}(i) the credit of node kk after finishing the ii-th round consensus. Then, we can define Creditk(i+1)Credit_{k}(i+1) according to the result of consensus in the (i+1)(i+1)-th round, where this result is whether to add the leader’s block into the blockchain. That is: (1) when kk is the leader, we have Creditk(i+1)=min{1,Creditk(i)+Δ1}Credit_{k}(i+1)=\min\{1,Credit_{k}(i)+\Delta_{1}\} if its block is accepted to be added into the blockchain, else Creditk(i+1)=max{0,Creditk(i)Δ1}Credit_{k}(i+1)=\max\{0,Credit_{k}(i)-\Delta_{1}\} if its block is rejected; and (2) when kk is not the leader, we have Creditk(i+1)=min{1,Creditk(i)+Δ2}Credit_{k}(i+1)=\min\{1,Credit_{k}(i)+\Delta_{2}\} if its decision is consistent with consensus result; else Creditk(i+1)=max{0,Creditk(i)Δ2}Credit_{k}(i+1)=\max\{0,Credit_{k}(i)-\Delta_{2}\} if it disagrees with the majority. We usually give Δ1>Δ2>0\Delta_{1}>\Delta_{2}>0 and initialize the credit of each consensus node as creditk(0)=0.5credit_{k}(0)=0.5. Consider entering the (i+1)(i+1)-th round consensus, the detailed process of BCM is represented as follows:

1) Leader election: The first step in this round is to select a leader from all consensus nodes. This leader election is based on node’s credit. Generally speaking, the better the credit value of a node, the more likely it is to be elected as the leader. Thus, the result of leader selection is unpredictable. For a node kMk\in M, the probability that it is elected as the leader of the (i+1)(i+1)-th round consensus is Pr[L(i+1)=k]\Pr[L(i+1)=k],

Pr[L(i+1)=k]=Creditk(i)jMCreditj(i)\Pr[L(i+1)=k]=\frac{Credit_{k}(i)}{\sum_{j\in M}Credit_{j}(i)} (12)

where L(i+1)L(i+1) represents the leader of the (i+1)(i+1)-th round consensus. Obviously, there is no chance to select a node whose credit is zero as the leader.

2) Broadcast: Each aggregator in MM broadcasts all transactions which happen in current Δt\Delta t and co-signed with a DES in its city to the blockchain network. All the consensus nodes will verify whether their received transactions are valid. Those valid transactions will be stored in their LTP, and invalid transactions will be discarded.

3) Pre-prepare: After all non-leader consensus nodes in M\L(i+1)M\backslash L(i+1) have completed above verification process for received transactions, the leader will package those selected valid transactions in its LTP into a block BLB_{L}. Then, the leader signs this block and broadcasts pre-prepare message SKL(SKL(BL),preSK_{L}(SK_{L}(B_{L}),pre-prepare)prepare) to the blockchain network.

4) Prepare: For each non-leader node kM\L(i+1)k\in M\backslash L(i+1), it will check the identity of leader and verify the pre-prepare message from the leader. The block verification needs to confirm the pointer to the previous block, mercle root is correct and compare the transactions in BLB_{L} with the corresponding transactions in its LTP. If node kk believes BLB_{L} is valid, it broadcasts this prepare message SKk(SKL(BL),prepare)SK_{k}(SK_{L}(B_{L}),prepare) to the blockchain network. All consensus nodes must make decisions in this step, whether to agree or disagree with adding block BLB_{L} into the blockchain. Then for each node kMk\in M, it gathers all prepare massages from other consensus node, checks their identities and counts the weighted sum of received prepare messages. Let Ak(i+1)MA_{k}(i+1)\subseteq M be the set of nodes from which node kk receives prepare messages, including itself. If satisfying the following inequality

aAk(i+1)Pr[a](2|M|13+1)1|M|\sum_{a\in A_{k}(i+1)}\Pr[a]\geq\left(2\left\lfloor\frac{|M|-1}{3}\right\rfloor+1\right)\frac{1}{|M|} (13)

where Pr[a]=Credita(i)/jMCreditj(i)\Pr[a]={Credit_{a}(i)}/{\sum_{j\in M}Credit_{j}(i)}, we say node kk will accept block BLB_{L} and broadcast commit message SKk(SKL(BL),commit)SK_{k}(SK_{L}(B_{L}),commit) to the blockchain network.

5) Commit: After sending their commit messages, they should waiting commit messages from other consensus node. For each node kMk\in M, its consensus process is completed until it recieve sufficient commit messages such that aBk(i+1)Pr[a](2(|M|1)/3+1)/|M|\sum_{a\in B_{k}(i+1)}\Pr[a]\geq(2\lfloor(|M|-1)/{3}\rfloor+1)/|M|, where Bk(i+1)MB_{k}(i+1)\subseteq M is the set of nodes from which node kk receives commit message, including itself.

5) Add a block and update credits: If a consensus node accepts the new block BLB_{L}, it will be appended into the blockchain in a linear and chronological order, which includes a pointer to the previous block. Any failure occurs in these three stages will terminate the consensus of current round (do not add the new block). Besides, before finishing this round, we need to update the credits of all the consensus nodes according to the credit model. In next round, the consensus process will perform based on their new credits.

Failures that terminate the current round and do not add a new block mainly include the following reasons: (1) the leader sends invalid block or do not send its packaged block before the deadline; and (2) too many malicious nodes do not breadcast prepare messages even though this block is valid. Shown as node HA1{\rm HA}_{1} in Fig. 3, it is a faulty node. The credit of those nodes that make mistakes in this consensus process will be reduced. Let ff be the number of malicious nodes. According to [19], supposing f(|M|1)/3f\leq\lfloor(|M|-1)/3\rfloor, the faults can be tolerated by the consensus system with |M||M| nodes. In our BCM, each consensus node’s credit is initialized as a constant, thereby 2(|M|1)/3+12\lfloor(|M|-1)/3\rfloor+1 good nodes can make sure that (13) is satisfied. As the consensus process performs more and more times, the good nodes’ credit increase but malicious nodes’ credit decrease gradually. Therefore, the credits in system will be more accumulative in good nodes. According to (13), the number of prepare message and commit message required to reach a consensus declines, which helps reduce latency and improve throughput. In summary, secure and traceable energies trading and digital currency exchange can be guaranteed by our proposed B-MET system.

V Multiple Energies Trading: A Stackelberg Approach

A non-cooperative Stackelberg game generally refers to the multilevel decision making processes of a number of independent decision-makers in response to the decision taken by the leading player of the game [20]. In this section, we put forward a multi-leader multi-follower (MLMF) Stackelberg game to model the interactions in above smart contract between aggregators and DESs. Consider a smart city Si{\rm S}_{i}, the MLMF Stackelberg game 𝔾\mathbb{G} can be defined as

𝔾={Si,,𝔻,{Vei,Vhi},{Uij}CijSi}\mathbb{G}=\left\{{\rm S}_{i},\mathbb{P},\mathbb{D},\{V_{e}^{i},V_{h}^{i}\},\{U^{ij}\}_{{\rm C}_{ij}\in{\rm S}_{i}}\right\} (14)

where the components are shown as follows:

1) Players set Si{\rm S}_{i}: The aggregators HAi{\rm HA}_{i} and EAi{\rm EA}_{i} act as leaders, and offer a price respectively to the DESs. Then, DESijSi{\rm DES}_{ij}\in{\rm S}_{i} act as followers, and decide on the amount of electricity and heat they want to sell respectively according to the offered prices.

2) Strategy spaces \mathbb{P} and 𝔻\mathbb{D}: Let =[ce,re]×[ch,rh]\mathbb{P}=[c_{e},r_{e}]\times[c_{h},r_{h}] be the strategy space of two aggregators, where we say {pei,phi}\{p_{e}^{i},p_{h}^{i}\}\in\mathbb{P} is a feasible strategy of HAi{\rm HA}_{i} and EAi{\rm EA}_{i}. Then, let 𝔻=×CijSi{[0,1]×[0,1]}\mathbb{D}=\times_{{\rm C}_{ij}\in{\rm S}_{i}}\{[0,1]\times[0,1]\} be the strategy space of all DESs in this city, and we have {αij,βij}CijSi𝔻\{\alpha^{ij},\beta^{ij}\}_{{\rm C}_{ij}\in{\rm S}_{i}}\in\mathbb{D} is a feasible strategy of DESs.

3) Utility functions {Vei,Vhi}\{V_{e}^{i},V_{h}^{i}\} and {Uij}CijSi\{U^{ij}\}_{{\rm C}_{ij}\in{\rm S}_{i}}: Each player in this game aims to maximize its utility or profit, which reflects the quality of strategy that this player chooses. {Vei,Vhi}\{V_{e}^{i},V_{h}^{i}\} is the profits of aggregators, defined in (9) and (10); and {Uij}CijSi\{U^{ij}\}_{{\rm C}_{ij}\in{\rm S}_{i}} are the utilities of DESs in Si{\rm S}_{i}, defined in (6).

V-A DESs (Followers) Side Analysis

Given a price strategy {pei,phi}\{p_{e}^{i},p_{h}^{i}\}\in\mathbb{P} offered by two aggregators in city Si{\rm S}_{i}, each DESijSi{\rm DES}_{ij}\in{\rm S}_{i} decides the amount of electricity EuseijE_{use}^{ij} (resp. heat QuseijQ_{use}^{ij}) that sold to the EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) by adjusting its dispatching factor αij\alpha^{ij} (resp. βij\beta^{ij}). Thus, each DESijSi{\rm DES}_{ij}\in{\rm S}_{i} aims to choose its optimal dispatching factors {αij,βij}\{\alpha^{ij},\beta^{ij}\} according to {pei,phi}\{p_{e}^{i},p_{h}^{i}\} by solving the following optimization problem (OPDES{\rm OP_{DES}}), that is

max{αij,βij}Uij(αij,βij)\displaystyle\max\nolimits_{\{\alpha^{ij},\beta^{ij}\}}U^{ij}(\alpha^{ij},\beta^{ij}) (15)
s.t. Euseij+QuseijMminij{αij,βij}[0,1]×[0,1]\displaystyle\text{ s.t. }E_{use}^{ij}+Q_{use}^{ij}\geq M_{min}^{ij}\text{; }\{\alpha^{ij},\beta^{ij}\}\in[0,1]\times[0,1] (16)

where MminijM_{min}^{ij} is the minimum amount of energy that is required to maintain the basic life for those residents living in this community. The objective function, shown in (6), is strictly concave and continuously differentiable, this OPDES{\rm OP_{DES}} is a convex optimization problem, which will be proved later. Thus, the stationary solution is unique and optimal.

To ensure reasonableness, the EminijE_{min}^{ij} should be in a valid range, thus we have Mminij(max{Xij,Yij},Xij+Yij)M_{min}^{ij}\in(\max\{X^{ij},Y^{ij}\},X^{ij}+Y^{ij}). It means that this minimum requirement is larger than the production capacity of electricity or heat separately, which implies that αij\alpha^{ij} and βij\beta^{ij} are impossible to approach zero definitely. Hence, the restrictions on (16) can be converted equivalently to constraint (17), that is

Xijαij+YijβijMminijαij1βij1X^{ij}\cdot\alpha^{ij}+Y^{ij}\cdot\beta^{ij}\geq M_{min}^{ij}\text{; }\alpha^{ij}\leq 1\text{, }\beta^{ij}\leq 1 (17)

Then, its first-order derivatives is

Uijαij=Xij(keijbeij1+beijXijαijpei)\displaystyle\frac{\partial U^{ij}}{\partial\alpha^{ij}}=X^{ij}\cdot\bigg{(}\frac{k_{e}^{ij}b_{e}^{ij}}{1+b_{e}^{ij}X^{ij}\alpha^{ij}}-p_{e}^{i}\bigg{)} (18)
Uijβij=Yij(khijbhij1+bhijYijβijphi)\displaystyle\frac{\partial U^{ij}}{\partial\beta^{ij}}=Y^{ij}\cdot\bigg{(}\frac{k_{h}^{ij}b_{h}^{ij}}{1+b_{h}^{ij}Y^{ij}\beta^{ij}}-p_{h}^{i}\bigg{)} (19)

Let Uij/αij=0\partial U^{ij}/\alpha^{ij}=0 and Uij/βij=0\partial U^{ij}/\beta^{ij}=0, we have

αij=1Xij(keijpei1beij)βij=1Yij(khijphi1bhij)\alpha^{ij}_{\circ}=\frac{1}{X^{ij}}\bigg{(}\frac{k_{e}^{ij}}{p_{e}^{i}}-\frac{1}{b_{e}^{ij}}\bigg{)}\text{; }\beta^{ij}_{\circ}=\frac{1}{Y^{ij}}\bigg{(}\frac{k_{h}^{ij}}{p_{h}^{i}}-\frac{1}{b_{h}^{ij}}\bigg{)} (20)

Here, we need to note that the setting of parameter keijk_{e}^{ij} (resp. khijk_{h}^{ij}) must be in a valid range such that αij(0,1)\alpha^{ij}_{\circ}\in(0,1) (resp. βij(0,1)\beta^{ij}_{\circ}\in(0,1)) for any offered price pei[ce,re]p_{e}^{i}\in[c_{e},r_{e}] (resp. phi[ch,rh]p_{h}^{i}\in[c_{h},r_{h}]). Or else, this utility function is monotone, and it is meaningless to adjust its dispatching factors. Base on that, thereby we can restrict keijk_{e}^{ij} and khijk_{h}^{ij} as follows:

keij(reXije1,ceXij11/e)khij(rhYije1,chYij11/e)k_{e}^{ij}\in\left(\frac{r_{e}X^{ij}}{e-1},\frac{c_{e}X^{ij}}{1-1/e}\right)\text{; }k_{h}^{ij}\in\left(\frac{r_{h}Y^{ij}}{e-1},\frac{c_{h}Y^{ij}}{1-1/e}\right) (21)

where it assume re<ecer_{e}<e\cdot c_{e} (resp. rh<echr_{h}<e\cdot c_{h}), or else no such keijk_{e}^{ij} (resp. khijk_{h}^{ij}) can keep αij(0,1)\alpha^{ij}_{\circ}\in(0,1) (resp. βij(0,1)\beta^{ij}_{\circ}\in(0,1)) satisfied for any offered prices.

Sequentially, we use Lagrange’s multipliers λ1\lambda_{1}, λ2\lambda_{2} and λ3\lambda_{3} for constraint (17), thereby the OPDES{\rm OP_{DES}}, shown as (15) and (17), can be converted to the following form Lij(αij,βij,λ1,λ2,λ3)L^{ij}(\alpha^{ij},\beta^{ij},\lambda_{1},\lambda_{2},\lambda_{3}), that is

Lij\displaystyle L^{ij} =Uij(αij,βij)\displaystyle=U^{ij}(\alpha^{ij},\beta^{ij})
+λ1(Xijαij+YijβijMminij)\displaystyle+\lambda_{1}\left(X^{ij}\cdot\alpha^{ij}+Y^{ij}\cdot\beta^{ij}-M^{ij}_{min}\right)
+λ2(1αij)+λ3(1βij)\displaystyle+\lambda_{2}(1-\alpha^{ij})+\lambda_{3}(1-\beta^{ij}) (22)

where we denote Zij=Xij+YijMmaxijZ^{ij}=X^{ij}+Y^{ij}-M_{max}^{ij}. Then, Based on (22), the complementary slackness conditions (KKT conditions) of OPDES{\rm OP_{DES}} are demonstrated as follows:

Lijαij=Uijαij+λ1Xijλ2=0\displaystyle\frac{\partial L^{ij}}{\partial\alpha^{ij}}=\frac{\partial U^{ij}}{\partial\alpha^{ij}}+\lambda_{1}X^{ij}-\lambda_{2}=0 (23)
Lijβij=Uijβij+λ1Yijλ3=0\displaystyle\frac{\partial L^{ij}}{\partial\beta^{ij}}=\frac{\partial U^{ij}}{\partial\beta^{ij}}+\lambda_{1}Y^{ij}-\lambda_{3}=0 (24)
λ1(Xijαij+YijβijMminij)=0\displaystyle\lambda_{1}\left(X^{ij}\cdot\alpha^{ij}+Y^{ij}\cdot\beta^{ij}-M^{ij}_{min}\right)=0 (25)
λ2(1αij)=0\displaystyle\lambda_{2}(1-\alpha^{ij})=0 (26)
λ3(1βij)=0\displaystyle\lambda_{3}(1-\beta^{ij})=0 (27)
λ10λ20λ30, and constraints (15)\displaystyle\lambda_{1}\geq 0\text{, }\lambda_{2}\geq 0\text{, }\lambda_{3}\geq 0\text{, and constraints (15)} (28)

The optimal solutions of OPDES{\rm OP_{DES}}, shown as (15) and (17), can take one of the following four cases, that is

1) Case 1: For αij<1\alpha^{ij}<1 and βij<1\beta^{ij}<1, we have λ2=λ3=0\lambda_{2}=\lambda_{3}=0. Look at (25), if λ1=0\lambda_{1}=0, substitute it into (23) and (24), we can get a solution {αij,βij}\{\alpha^{ij}_{\circ},\beta^{ij}_{\circ}\} according to (20). Then, we need to check whether constraint (17) can be satisfied. If yes, the optimal solution is {αij,βij}\{\alpha^{ij}_{\circ},\beta^{ij}_{\circ}\}. If no, it means λ1>0\lambda_{1}>0 and Xijαij+YijβijMminij=0X^{ij}\cdot\alpha^{ij}+Y^{ij}\cdot\beta^{ij}-M_{min}^{ij}=0. At this time, by solving (23) and (24), we have

αij=1Xij(keijpeiλ11beij)\displaystyle\alpha^{ij}_{\Diamond}=\frac{1}{X^{ij}}\bigg{(}\frac{k_{e}^{ij}}{p_{e}^{i}-\lambda_{1}}-\frac{1}{b_{e}^{ij}}\bigg{)} (29)
βij=1Yij(khijphiλ11bhij)\displaystyle\beta^{ij}_{\Diamond}=\frac{1}{Y^{ij}}\bigg{(}\frac{k_{h}^{ij}}{p_{h}^{i}-\lambda_{1}}-\frac{1}{b_{h}^{ij}}\bigg{)} (30)

Substitute (29) and (30) into (25),

Aijλ12+Bijλ1+Cij=0A^{ij}{\lambda_{1}}^{2}+B^{ij}\lambda_{1}+C^{ij}=0 (31)

where Aij=Mminij+1/beij+1/bhijA^{ij}=M_{min}^{ij}+1/b_{e}^{ij}+1/b_{h}^{ij}, Bij=keij+khijAij(pei+phi)B^{ij}=k_{e}^{ij}+k_{h}^{ij}-A^{ij}(p_{e}^{i}+p_{h}^{i}), and Cij=AijpeiphikeijphikhijpeiC^{ij}=A^{ij}p_{e}^{i}p_{h}^{i}-k_{e}^{ij}p_{h}^{i}-k_{h}^{ij}p_{e}^{i}. By solving (31), we have two solutions, they are

λ1=Bij±Bij24AijCij2Aij\lambda_{1}=\frac{-B^{ij}\pm\sqrt{{B^{ij}}^{2}-4A^{ij}C^{ij}}}{2A^{ij}} (32)

Here, it is easy to verify Bij<0B^{ij}<0 and Cij>0C^{ij}>0 based on (9), (21), and Mminij(max{Xij,Yij},Xij+Yij)M_{min}^{ij}\in(\max\{X^{ij},Y^{ij}\},X^{ij}+Y^{ij}), thus it is possible that Δij=Bij24AijCij<0\Delta^{ij}={B^{ij}}^{2}-4A^{ij}C^{ij}<0. If Δij<0\Delta^{ij}<0, there is no real solution; else we need to check whether the λ1\lambda_{1} defined on (32) satisfies λ1>0\lambda_{1}>0. If λ1>0\lambda_{1}>0, substitute (32) into (29) and (30), we obtain a solution {αij,βij}\{\alpha^{ij}_{\Diamond},\beta^{ij}_{\Diamond}\}. If it is feasible, namely αij,βij<1\alpha^{ij}_{\Diamond},\beta^{ij}_{\Diamond}<1, the optimal solution can be determined by {αij,βij}\{\alpha^{ij}_{\Diamond},\beta^{ij}_{\Diamond}\}.

2) Case 2: For αij=1\alpha^{ij}=1 and βij<1\beta^{ij}<1, we have λ3=0\lambda_{3}=0. Look at (25), if λ1=0\lambda_{1}=0, substitute it into (24), we can get a solution {1,βij}\{1,\beta^{ij}_{\circ}\} according to (20). Then, we need to check whether constraint (17) can be satisfied and λ2=Uij/αij0\lambda_{2}={\partial U^{ij}}/{\partial\alpha^{ij}}\geq 0. If yes, the optimal solution {1,βij}\{1,\beta^{ij}_{\circ}\}. If no, it means λ1>0\lambda_{1}>0 and Yijβij+XijMminij=0Y^{ij}\cdot\beta^{ij}+X^{ij}-M_{min}^{ij}=0. According to (24), we have βij\beta^{ij}_{\square} which is shown as (30). Substitute (30) into (25),

(khijphiλ11bhij)+XijMminij=0\bigg{(}\frac{k_{h}^{ij}}{p_{h}^{i}-\lambda_{1}}-\frac{1}{b_{h}^{ij}}\bigg{)}+X^{ij}-M_{min}^{ij}=0 (33)

By solving (33), we have

λ1=phikhijbhijbhij(MminijXij)+1\lambda_{1}=p_{h}^{i}-\frac{k_{h}^{ij}b_{h}^{ij}}{b_{h}^{ij}(M_{min}^{ij}-X^{ij})+1} (34)

If λ1>0\lambda_{1}>0 and λ2=Uij/αij+λ1Xij0\lambda_{2}={\partial U^{ij}}/{\partial\alpha^{ij}}+\lambda_{1}X^{ij}\geq 0, substitute (34) into (30), we obtain a solution {1,βij}\{1,\beta^{ij}_{\square}\}. If we have βij<1\beta^{ij}_{\square}<1, the optimal solution can be determined by {1,βij}\{1,\beta^{ij}_{\square}\}.

3) Case 3: For αij<1\alpha^{ij}<1 and βij=1\beta^{ij}=1, we have λ2=0\lambda_{2}=0. Look at (25), if λ1=0\lambda_{1}=0, substitute it into (23), we can get a solution {αij,1}\{\alpha^{ij}_{\circ},1\} according to (18). Then, we need to check whether constraint (17) can be satisfied and λ3=Uij/βij0\lambda_{3}={\partial U^{ij}}/{\partial\beta^{ij}}\geq 0. If yes, the optimal solution is {αij,1}\{\alpha^{ij}_{\circ},1\}. If no, it means λ1>0\lambda_{1}>0 and Xijαij+YijMminij=0X^{ij}\cdot\alpha^{ij}+Y^{ij}-M_{min}^{ij}=0. According to (23), we have αij\alpha^{ij}_{\square} which is shown as (29). Substitute (29) into (25),

(keijpeiλ11beij)+YijMminij=0\bigg{(}\frac{k_{e}^{ij}}{p_{e}^{i}-\lambda_{1}}-\frac{1}{b_{e}^{ij}}\bigg{)}+Y^{ij}-M_{min}^{ij}=0 (35)

By solving (35), we have

λ1=peikeijbeijbeij(MminijYij)+1\lambda_{1}=p_{e}^{i}-\frac{k_{e}^{ij}b_{e}^{ij}}{b_{e}^{ij}(M_{min}^{ij}-Y^{ij})+1} (36)

If λ1>0\lambda_{1}>0 and λ3=Uij/βij+λ1Yij0\lambda_{3}={\partial U^{ij}}/{\partial\beta^{ij}}+\lambda_{1}Y^{ij}\geq 0, substitute (36) into (29), we obtain a solution {αij,1}\{\alpha^{ij}_{\square},1\}. If we have αij<1\alpha^{ij}_{\square}<1, the optimal solution can be determined by {αij,1}\{\alpha^{ij}_{\square},1\}.

4) Case 4: For αij=1\alpha^{ij}=1 and βij=1\beta^{ij}=1, we have λ1=0\lambda_{1}=0 because we have assumed MminijXij+YijM_{min}^{ij}\leq X^{ij}+Y^{ij} before. Substitute it into (23) and (24), we have

(αij=1)=1Xij(keijXijλ2+peiXij1beij)\displaystyle\left(\alpha^{ij}_{\Diamond}=1\right)=\frac{1}{X^{ij}}\bigg{(}\frac{k_{e}^{ij}X^{ij}}{\lambda_{2}+p_{e}^{i}X^{ij}}-\frac{1}{b_{e}^{ij}}\bigg{)} (37)
(βij=1)=1Yij(khijYijλ3+phiYij1bhij)\displaystyle\left(\beta^{ij}_{\Diamond}=1\right)=\frac{1}{Y^{ij}}\bigg{(}\frac{k_{h}^{ij}Y^{ij}}{\lambda_{3}+p_{h}^{i}Y^{ij}}-\frac{1}{b_{h}^{ij}}\bigg{)} (38)

By solving (37) and (38), we have

λ2=keijXijXij+1/beijpeiXijλ3=khijYijYij+1/bhijphiYij\lambda_{2}=\frac{k_{e}^{ij}X^{ij}}{X^{ij}+1/b_{e}^{ij}}-p_{e}^{i}X^{ij}\text{; }\lambda_{3}=\frac{k_{h}^{ij}Y^{ij}}{Y^{ij}+1/b_{h}^{ij}}-p_{h}^{i}Y^{ij} (39)

According to (9) (21), the maximum value of λ2\lambda_{2} can be obtained when giving keij=ceXij/(11/e)k_{e}^{ij}=c_{e}X^{ij}/(1-1/e). Substitute it into (39), we have λ2<cepei0\lambda_{2}<c_{e}-p_{e}^{i}\leq 0 because of pei[ce,re]p_{e}^{i}\in[c_{e},r_{e}]. By using the same way, we have λ3<chphi0\lambda_{3}<c_{h}-p_{h}^{i}\leq 0 because of phi[ch,rh]p_{h}^{i}\in[c_{h},r_{h}] as well. It does not satisfy (28), thus this solution {1,1}\{1,1\} is not feasible and cannot occur.

To sum up, offered a price strategy {pei,phi}\{p_{e}^{i},p_{h}^{i}\}\in\mathbb{P} by aggregators, the optimal response of each CijSi{\rm C}_{ij}\in{\rm S}_{i} will be obtained by above procedure. It is one of the three cases, except case 4, that depends on the offered prices, minimum requirement MminijM_{min}^{ij}, and choice of satisfaction cofficient keijk_{e}^{ij} and khijk_{h}^{ij}. Since the expressions of the solution is very complicated, we cannot give a unified formal expression to summarize the results that contains all cases.

V-B Aggregators (Leaders) Side Analysis

After receiving the responses EexcijE_{exc}^{ij} (resp. QexcijQ_{exc}^{ij}) of all Cij{\rm C}_{ij} in city Si{\rm S}_{i}, the profit gained by aggregators EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) can be determined according to (10) and (11). They assume each DESijSi{\rm DES}_{ij}\in{\rm S}_{i} will respond to them with the optimal strategy according to their offered price. Thus, EAi{\rm EA}_{i} and HAi{\rm HA}_{i} aim to choose its optimal prices {pei,phi}\{p_{e}^{i},p_{h}^{i}\} by solving the following optimization problem (OPAGS{\rm OP_{AGS}}), that is

max{pei}Vei(pei,phi) s.t. pei[ce,re]\displaystyle\max\nolimits_{\{p_{e}^{i}\}}V_{e}^{i}(p_{e}^{i},p_{h}^{i})\text{ s.t. }p_{e}^{i}\in[c_{e},r_{e}] (40)
max{phi}Vhi(phi,pei) s.t. phi[ch,rh]\displaystyle\max\nolimits_{\{p_{h}^{i}\}}V_{h}^{i}(p_{h}^{i},p_{e}^{i})\text{ s.t. }p_{h}^{i}\in[c_{h},r_{h}] (41)

where EAi{\rm EA}_{i} (resp. HAi{\rm HA}_{i}) attempts to select an optimal price peip^{i*}_{e} (resp. phip^{i*}_{h}) to maximize its profit given phip_{h}^{i} (resp. peip_{e}^{i}). The objective function, shown in (10) (resp. (11)), is strictly concave and continuous differentiable with respect to peip^{i}_{e} (resp. phip^{i}_{h}), which will be proved later.

First, we consider electricity aggregator EAi{\rm EA}_{i} alone. Feed a price peip_{e}^{i} into Vei(,phi)V_{e}^{i}(\cdot,p_{h}^{i}), the response αij(pei,phi)\alpha^{ij}(p^{i}_{e},p_{h}^{i}) of each DESijSi{\rm DES}_{ij}\in{\rm S}_{i} must be in one of the following four events: (1) αij=αij\alpha^{ij}=\alpha^{ij}_{\circ}; (2) αij=1\alpha^{ij}=1; (3) αij=αij\alpha^{ij}=\alpha^{ij}_{\Diamond}; and (4) αij=αij\alpha^{ij}=\alpha^{ij}_{\square}. Then, its first order derivatives is

αij/pei\displaystyle{\partial\alpha^{ij}}/{\partial p_{e}^{i}} =keij/(Xij(pei)2)\displaystyle=-k_{e}^{ij}/\left(X^{ij}(p_{e}^{i})^{2}\right) (42)
=0\displaystyle=0 (43)
=keij/(Xij(peiλ1)2)λ1=(31)\displaystyle=-k_{e}^{ij}/\left(X^{ij}(p_{e}^{i}-\lambda_{1})^{2}\right)\text{, }\lambda_{1}=\text{(31)} (44)
=keij/(Xij(peiλ1)2)λ1=(34)\displaystyle=-k_{e}^{ij}/\left(X^{ij}(p_{e}^{i}-\lambda_{1})^{2}\right)\text{, }\lambda_{1}=\text{(34)} (45)

where it is one-to one correspondences between (42)-(45) and event (1)-(4). Then, the first-order derivative of EAi{\rm EA}_{i}’s objective function is

Veipei=CijSiXij((1αij)+(repei)αijpei)\frac{\partial V_{e}^{i}}{\partial p_{e}^{i}}=-\sum_{{\rm C}_{ij}\in{\rm S}_{i}}X^{ij}\left((1-\alpha^{ij})+(r_{e}-p_{e}^{i})\frac{\partial\alpha^{ij}}{\partial p_{e}^{i}}\right) (46)

Combined with (42)-(45), let Vei/pei=0{\partial V_{e}^{i}}/{\partial p_{e}^{i}}=0, we can get a solution p^ei\hat{p}_{e}^{i} that maximizes Vei(,phi)V_{e}^{i}(\cdot,p_{h}^{i}) given phip_{h}^{i}. However, this p^ei\hat{p}_{e}^{i} is constrained on the range of [ce,re][c_{e},r_{e}], thus the optimal price strategy p¯ei\bar{p}_{e}^{i} of EAi{\rm EA}_{i} is shown as follows:

p¯ei={][c]lsre,ifp^_e^i≥r_ece,ifp^_e^i≤c_ep^ei,ifc_e¡p^_e^i¡r_e\bar{p}_{e}^{i}=\left\{\begin{IEEEeqnarraybox}[]{[}][c]{l^{\prime}s}r_{e},&if$\hat{p}_{e}^i\geq r_e$\\ c_{e},&if$\hat{p}_{e}^i\leq c_e$\\ \hat{p}_{e}^{i},&if$c_e<\hat{p}_{e}^i<r_e$\end{IEEEeqnarraybox}\right. (47)

Due to the fact that the profit function Vei(,phi)V_{e}^{i}(\cdot,p_{h}^{i}) given phip_{h}^{i} is strictly concave with respect to peip_{e}^{i}, it increases first and then decreases with the increase of peip_{e}^{i}. Thus, the maximum profit is obtained at the price of rer_{e} when p^eire\hat{p}_{e}^{i}\geq r_{e}; Similarly, the maximum profit is obtained at the price of cec_{e} when p^eice\hat{p}_{e}^{i}\leq c_{e}; else obtained at stationary point.

Then, we consider heat aggregator HAi{\rm HA}_{i} alone. Feed a price phip_{h}^{i} into Vhi(,pei)V^{i}_{h}(\cdot,p_{e}^{i}), the respone βij(pei,phi)\beta^{ij}(p^{i}_{e},p_{h}^{i}) of each DESijSi{\rm DES}_{ij}\in{\rm S}_{i} must be in one of the following four events: (1) βij=βij\beta^{ij}=\beta^{ij}_{\circ}; (2) βij=1\beta^{ij}=1; (3) βij=βij\beta^{ij}=\beta^{ij}_{\Diamond}; and (4) βij=βij\beta^{ij}=\beta^{ij}_{\square}. Then, its first order derivative βij/phi{\partial\beta^{ij}}/{\partial p_{h}^{i}} can be computed by replacing XijX^{ij} with YijY^{ij}, keijk_{e}^{ij} with khijk_{h}^{ij}, and peip_{e}^{i} with phip_{h}^{i} in (42)-(45), corresponding to event (1)-(4). Then, the first-order derivative of HAi{\rm HA}_{i}’s objective function is

Vhiphi=CijSiYij((1βij)+(rhphi)βijphi)\frac{\partial V_{h}^{i}}{\partial p_{h}^{i}}=-\sum_{{\rm C}_{ij}\in{\rm S}_{i}}Y^{ij}\left((1-\beta^{ij})+(r_{h}-p_{h}^{i})\frac{\partial\beta^{ij}}{\partial p_{h}^{i}}\right) (48)

Let Vhi/phi=0{\partial V_{h}^{i}}/{\partial p_{h}^{i}}=0, we can get a solution p^hi\hat{p}_{h}^{i} that maximizes Vhi(,pei)V_{h}^{i}(\cdot,p_{e}^{i}) given peip_{e}^{i}. Similar to (47), constrained on the range of [ch,rh][c_{h},r_{h}], the optimal price p¯hi\bar{p}_{h}^{i} of HAi{\rm HA}_{i} can be formulated similar to the analysis of (47) from its concavity.

V-C Stackalberg Equilibrium

The aggregators, EAi{\rm EA}_{i} and HAi{\rm HA}_{i} in a smart city Si{\rm S}_{i}, play a non-cooperative game with each other to offer the unit prices for electricity and heat. They all want to maximize their profit according to their profit function defined on (10) and (11). We denote this game between aggregators by 𝔸={{HAi,EAi},,{Vei,Vhi}}\mathbb{A}=\{\{{\rm HA}_{i},{\rm EA}_{i}\},\mathbb{P},\{V_{e}^{i},V_{h}^{i}\}\} and introduce the concept of the Nash equilibrium (NE) shown as follows:

Definition 1 (Nash Equilibrium).

Given a game 𝔸\mathbb{A} defined as above, a feasible price strategy {p~ei,p~hi}\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\}\in\mathbb{P} is the Nash equilibrium if no player can improve its profit by changing its strategy unilaterally, that is

Vei(p~ei,p~hi)Vei(pei,p~hi)Vhi(p~hi,p~ei)Vhi(phi,p~ei)V_{e}^{i}(\tilde{p}_{e}^{i},\tilde{p}_{h}^{i})\geq V_{e}^{i}(p_{e}^{i},\tilde{p}_{h}^{i})\text{; }V_{h}^{i}(\tilde{p}_{h}^{i},\tilde{p}_{e}^{i})\geq V_{h}^{i}(p_{h}^{i},\tilde{p}_{e}^{i}) (49)

There is a property that at the NE, no aggregator attempts to offer a new price again because they all achieve their mutually satisfactions respectively. Then, we need to study the existence and uniqueness of the NE of game 𝔸\mathbb{A} between two aggregators in a city.

Lemma 1.

The Nash equilibirum of game 𝔸\mathbb{A} between aggregators always exist and is unique.

Proof.

The strategy space in game 𝔸\mathbb{A} has been denoted by =[ce,re]×[ch,rh]\mathbb{P}=[c_{e},r_{e}]\times[c_{h},r_{h}], which is a convex, closed, and non-empty subset of the space 2\mathbb{R}^{2}. Take aggregate EAi{\rm EA}_{i} as an example, αij\alpha^{ij} is the responsive dispatching factor given the offered price {pei,phi}\{p_{e}^{i},p_{h}^{i}\}\in\mathbb{P} from community CijSi{\rm C}_{ij}\in{\rm S}_{i}. From (42)-(45), its second-order derivatives is

2αij/pei2\displaystyle{\partial^{2}\alpha^{ij}}/{\partial{p_{e}^{i}}^{2}} =2keij/(Xij(pei)3)\displaystyle=2k_{e}^{ij}/\left(X^{ij}(p_{e}^{i})^{3}\right) (50)
=0\displaystyle=0 (51)
=2keij/(Xij(peiλ1)3)λ1=(29)\displaystyle=2k_{e}^{ij}/\left(X^{ij}(p_{e}^{i}-\lambda_{1})^{3}\right)\text{, }\lambda_{1}=\text{(29)} (52)
=2keij/(Xij(peiλ1)3)λ1=(32)\displaystyle=2k_{e}^{ij}/\left(X^{ij}(p_{e}^{i}-\lambda_{1})^{3}\right)\text{, }\lambda_{1}=\text{(32)} (53)

where they correspond to event (1)-(4). Then, the second-order derivative of EAi{\rm EA}_{i}’s objective function is

2Veipei2=CijSiXij(2αijpei(repei)2αijpei2)\frac{\partial^{2}V_{e}^{i}}{\partial{p_{e}^{i}}^{2}}=\sum_{{\rm C}_{ij}\in{\rm S}_{i}}X^{ij}\left(2\cdot\frac{\partial\alpha^{ij}}{\partial p_{e}^{i}}-(r_{e}-p_{e}^{i})\frac{\partial^{2}\alpha^{ij}}{\partial{p_{e}^{i}}^{2}}\right) (54)

Here, observe that αij/pei0{\partial\alpha^{ij}}/{\partial p_{e}^{i}}\leq 0 from (42)-(45), and 2Vei/pei20{\partial^{2}V_{e}^{i}}/{\partial{p_{e}^{i}}^{2}}\geq 0 from (50)-(53), we have 2Vei/pei20{\partial^{2}V_{e}^{i}}/{\partial{p_{e}^{i}}^{2}}\leq 0. Thus, Vei(,phi)V_{e}^{i}(\cdot,p_{h}^{i}) is concave with respect to peip_{e}^{i}.

Consider aggregator HAi{\rm HA}_{i} and βij\beta^{ij} from community CijSi{\rm C}_{ij}\in{\rm S}_{i}, its second-order derivative 2βij/pei2{\partial^{2}\beta^{ij}}/{\partial{p_{e}^{i}}^{2}} can be computed by replacing XijX^{ij} with YijY^{ij}, keijk_{e}^{ij} with khijk_{h}^{ij}, and peip_{e}^{i} with phip_{h}^{i} in (48)-(51). Then, the second-order derivative of HAi{\rm HA}_{i}’s objective function is

2Vhiphi2=CijSiYij(2βijphi(rhphi)2βijphi2)\frac{\partial^{2}V_{h}^{i}}{\partial{p_{h}^{i}}^{2}}=\sum_{{\rm C}_{ij}\in{\rm S}_{i}}Y^{ij}\left(2\cdot\frac{\partial\beta^{ij}}{\partial p_{h}^{i}}-(r_{h}-p_{h}^{i})\frac{\partial^{2}\beta^{ij}}{\partial{p_{h}^{i}}^{2}}\right) (55)

By similar analysis, we have 2Vhi/phi20{\partial^{2}V_{h}^{i}}/{\partial{p_{h}^{i}}^{2}}\leq 0 and Vhi(,pei)V_{h}^{i}(\cdot,p_{e}^{i}) is concave with respect to phip_{h}^{i}. Thus, game 𝔸\mathbb{A} is a concave 2-person game. Because of their concavity, the Nash equilibrium exists and is unique according to [21]. ∎

In a smart city Si{\rm S}_{i}, the aggregators offer the price strategy {pei,phi}\{p_{e}^{i},p_{h}^{i}\}\in\mathbb{P} in the first stage, then each DESijSi{\rm DES}_{ij}\in{\rm S}_{i} decides its optimal dispatching strategy {αij,βij}\{\alpha^{ij},\beta^{ij}\} according to the offered prices in the second stage. It formulates a MLMF Stackelberg game 𝔾\mathbb{G} between aggregators and DESs, shown as (14). The optimal strategy set {{p~ei,p~hi},{γil}CilSi}\{\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\},\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}}\}, where {γil}\{\gamma^{il}\} is the optimal response of community CilSi{\rm C}_{il}\in{\rm S}_{i} based on its previous leaders’ prices, can be obtained at the Stackelberg equilibrium (SE), defined as follows:

Definition 2 (Stackelberg Equilibrium).

Given a game 𝔾\mathbb{G} defined as (14), a feasible strategy {{p~ei,p~hi},{γil}CilSi}\{\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\},\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}}\} is the Stackelberg equilibrium if no player, including leaders and followers, can improve its utility or profit by changing its strategy unilaterally, that is

Uij(p~i,{γil}CilSi)Uij(p~i,γ¯ij{γil}CilSi\Cij)\displaystyle\small{U^{ij}\left(\tilde{p}^{i},\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}}\right)\geq U^{ij}\left(\tilde{p}^{i},\bar{\gamma}^{ij}\cup\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}\backslash{\rm C}_{ij}}\right)} (56)
Vei(p~i,{γil}CilSi)Vei({pei,p~hi},{γil}CilSi)\displaystyle V_{e}^{i}\left(\tilde{p}^{i},\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}}\right)\geq V_{e}^{i}\left(\{p_{e}^{i},\tilde{p}_{h}^{i}\},\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}}\right) (57)
Vhi(p~i,{γil}CilSi)Vhi({p~ei,phi},{γil}CilSi)\displaystyle V_{h}^{i}\left(\tilde{p}^{i},\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}}\right)\geq V_{h}^{i}\left(\{\tilde{p}_{e}^{i},p_{h}^{i}\},\{\gamma^{il}\}_{{\rm C}_{il}\in{\rm S}_{i}}\right) (58)

where we denote prices p~i={p~ei,p~hi}\tilde{p}^{i}=\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\} and γ¯ij\bar{\gamma}^{ij} is any feasible strategy of DESij{\rm DES}_{ij}.

After reaching the SE, none of them tends to change its strategy again because they cannot improve their utilities or profits further by changing unilaterally. Then, we need to study the existence and uniqueness of the SE of game 𝔾\mathbb{G} between aggregators and DESs in a city.

Algorithm 1 Find NE
0:  Game 𝔾\mathbb{G} in a city Si{\rm S}_{i} and a small step Δ\Delta
0:  Price strategy {p~ei,p~hi}\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\}
1:  Initialize: {p~ei,p~hi}{ce,ch}\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\}\leftarrow\{c_{e},c_{h}\}
2:  while True do
3:     {x,y}{p~ei,p~hi}\{x,y\}\leftarrow\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\}
4:     // Consider aggregator EAi{\rm EA}_{i}
5:     if Vei(p~ei+Δ,p~hi)Vei(p~ei,p~hi)V_{e}^{i}(\tilde{p}_{e}^{i}+\Delta,\tilde{p}_{h}^{i})\geq V_{e}^{i}(\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}) and Vei(p~ei+Δ,p~hi)Vei(p~eiΔ,p~hi)V_{e}^{i}(\tilde{p}_{e}^{i}+\Delta,\tilde{p}_{h}^{i})\geq V_{e}^{i}(\tilde{p}_{e}^{i}-\Delta,\tilde{p}_{h}^{i}) then
6:        p~eimin{re,p~ei+Δ}\tilde{p}_{e}^{i}\leftarrow\min\{r_{e},\tilde{p}_{e}^{i}+\Delta\}
7:     else if Vei(p~eiΔ,p~hi)Vei(p~ei,p~hi)V_{e}^{i}(\tilde{p}_{e}^{i}-\Delta,\tilde{p}_{h}^{i})\geq V_{e}^{i}(\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}) and Vei(p~eiΔ,p~hi)Vei(p~ei+Δ,p~hi)V_{e}^{i}(\tilde{p}_{e}^{i}-\Delta,\tilde{p}_{h}^{i})\geq V_{e}^{i}(\tilde{p}_{e}^{i}+\Delta,\tilde{p}_{h}^{i}) then
8:        p~eimax{ce,p~eiΔ}\tilde{p}_{e}^{i}\leftarrow\max\{c_{e},\tilde{p}_{e}^{i}-\Delta\}
9:     end if
10:     // Consider aggregator HAi{\rm HA}_{i}
11:     if Vhi(p~hi+Δ,p~ei)Vhi(p~hi,p~ei)V_{h}^{i}(\tilde{p}_{h}^{i}+\Delta,\tilde{p}_{e}^{i})\geq V_{h}^{i}(\tilde{p}_{h}^{i},\tilde{p}_{e}^{i}) and Vhi(p~hi+Δ,p~ei)Vhi(p~hiΔ,p~ei)V_{h}^{i}(\tilde{p}_{h}^{i}+\Delta,\tilde{p}_{e}^{i})\geq V_{h}^{i}(\tilde{p}_{h}^{i}-\Delta,\tilde{p}_{e}^{i}) then
12:        p~himin{rh,p~hi+Δ}\tilde{p}_{h}^{i}\leftarrow\min\{r_{h},\tilde{p}_{h}^{i}+\Delta\}
13:     else if Vhi(p~hiΔ,p~ei)Vhi(p~hi,p~ei)V_{h}^{i}(\tilde{p}_{h}^{i}-\Delta,\tilde{p}_{e}^{i})\geq V_{h}^{i}(\tilde{p}_{h}^{i},\tilde{p}_{e}^{i}) and Vhi(p~hiΔ,p~ei)Vhi(p~hi+Δ,p~ei)V_{h}^{i}(\tilde{p}_{h}^{i}-\Delta,\tilde{p}_{e}^{i})\geq V_{h}^{i}(\tilde{p}_{h}^{i}+\Delta,\tilde{p}_{e}^{i}) then
14:        p~himax{ch,p~hiΔ}\tilde{p}_{h}^{i}\leftarrow\max\{c_{h},\tilde{p}_{h}^{i}-\Delta\}
15:     end if
16:     if {x,y}={p~ei,p~hi}\{x,y\}=\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\} then
17:        Break
18:     end if
19:     // Reduce Δ\Delta once for each iteration
20:     ΔδΔ\Delta\leftarrow\delta\cdot\Delta
21:  end while
22:  return  {p~ei,p~hi}\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\}

Theorem 1.

The Stackelberg equilibirum of game 𝔾\mathbb{G} between aggregators and DESs always exist and is unique.

Proof.

In this game 𝔾\mathbb{G}, the aggregators will offer prices to those DESs to purchase energies in their city first. From Lemma 1, a Nash equilibrium always exists and is unique between aggregators. According to the aforementioned analysis on DESs side, they are able to respond to aggregators with their optimal dispatching strategies based on the offered prices and their restrictions. Thus, the Stackelberg equilibrium always exists and is unique. ∎

V-D Distributed Algorithm

In order to find the NE between aggregators based on the optimal responses from DESs, we adopt the sub-gradient technique [22] [23] [24] for determining price strategies. It is shown in Algorithm 1. In Algorithm 1, each aggregators is assigned with its lowest price. At this time, the dispatching factors of each DES in this city is closest to one, which should be in feasible space defined on (17). Then, consider aggregator EAi{\rm EA}_{i}, in each iteration, it updates its price in manner of increasing by Δ\Delta or decreasing by Δ\Delta, where Δ\Delta is a given small step. According to current prices {p~ei,p~hi}\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\}, we compare the profits of EAi{\rm EA}_{i} by offering a price p~ei\tilde{p}_{e}^{i}, p~ei+Δ\tilde{p}_{e}^{i}+\Delta, and p~eiΔ\tilde{p}_{e}^{i}-\Delta, then choose the best one and update the price p~ei\tilde{p}_{e}^{i}. Consider aggregator HAi{\rm HA}_{i} similarly, we compare the profits of HAi{\rm HA}_{i} by offering a price p~hi\tilde{p}_{h}^{i}, p~hi+Δ\tilde{p}_{h}^{i}+\Delta, and p~hiΔ\tilde{p}_{h}^{i}-\Delta, then choose the best one and update the price p~hi\tilde{p}_{h}^{i}. At last, we update Δ\Delta with δΔ\delta\cdot\Delta where δ(0,1)\delta\in(0,1) is a attenuation factor.

Theorem 2.

Given an initial price strategy and step Δ\Delta, the Nash equilibrium of game 𝔸\mathbb{A} can be obtained by the sub-gradient algorithm, shown in Algorithm 1.

Proof.

Based on the conclusion of [22] [23], the sub-gradient algorithm can converge to an optimal solution in convex optimization. The objective functions of aggregators are concave, thus they cannot improve its profit by changing strategies unilaterally when reaching the optimal solution. ∎

VI Numerical Simulations

In this section, we conduct several experiments to model price competition and energies trading in a smart city.

VI-A Simulation Setup

Consider a city S={{EA,HA},{C1,C2,,Cn}}{\rm S}=\{\{{\rm EA},{\rm HA}\},\{{\rm C}_{1},{\rm C}_{2},\cdots,{\rm C}_{n}\}\}, we denote the number of communities in this city by nn. At the standard atmosphere, the calorific value of natural gas is q=3.6×107q=3.6\times 10^{7} J/m3{\rm J}/{\rm m}^{3} on average. The retail price of electricity in U.S. is 0.20.2 dollar/kwh{\rm dollar}/{\rm kw}\cdot{\rm h}. According to the conversion relationship of 11 kwh=3.6×106{\rm kw}\cdot{\rm h}=3.6\times 10^{6} J{\rm J}, it is 5.5×1085.5\times 10^{-8} dollar/J{\rm dollar}/{\rm J}. Equivalently, we regard it as re=5.5×108r_{e}=5.5\times 10^{-8} coin/J{\rm coin}/{\rm J} in our B-METS. The electric conversion of GT is ηg=0.5\eta_{g}=0.5. We define the maximum gas consumption Fm=200F_{m}=200 m3/day{\rm m}^{3}/{\rm day} and its unit price cf=1.08c_{f}=1.08 coin/m3{\rm coin}/{\rm m}^{3}. Thus, we have ce=3.00×108c_{e}=3.00\times 10^{-8} coin/J{\rm coin}/{\rm J} and pe[3.00×108,5.50×108]p_{e}\in[3.00\times 10^{-8},5.50\times 10^{-8}] for the EA definitely. The efficiency of heat recovery system is given by ηr=0.8\eta_{r}=0.8, thereby we have ch=3.75×108c_{h}=3.75\times 10^{-8} coin/J{\rm coin}/{\rm J}. The retail price of heat is rh=6.25×108r_{h}=6.25\times 10^{-8} coin/J{\rm coin}/{\rm J}. Thus, we have ph[3.75×108,6.25×108]p_{h}\in[3.75\times 10^{-8},6.25\times 10^{-8}] for the HA definitely. According to (9), we have be=4.773×1010b_{e}=4.773\times 10^{-10} and bh=5.966×1010b_{h}=5.966\times 10^{-10}. Then according to (21), we have ke[115.24,170.85]k_{e}\in[115.24,170.85] and kh[104.76,170.85]k_{h}\in[104.76,170.85].

Refer to caption
(a) EA’s profit VeV_{e} under k1k_{1}
Refer to caption
(b) HA’s profit VhV_{h} under k1k_{1}
Refer to caption
(c) DES’s utility UU under k1k_{1}
Refer to caption
(d) EA’s profit VeV_{e} under k2k_{2}
Refer to caption
(e) HA’s profit VhV_{h} under k2k_{2}
Refer to caption
(f) DES’s utility UU under k2k_{2}
Figure 4: The objective function of entities, including EA, HA, and DES, in city S{\rm S} under the setting k1k_{1} and k2k_{2}.

VI-B Simulation Results

1) Concavity of functions: Consider a city S{\rm S} that has only one community, we define this DES’s satisfaction coefficient under two settings k1=(ke,kh)=(143.05,137.81)k_{1}=(k_{e},k_{h})=(143.05,137.81) and k2=(ke,kh)=(159.73,117.98)k_{2}=(k_{e},k_{h})=(159.73,117.98). Fig. 4 draws the objective function of entities in city SS under the two settings, where we define the minimum energy restriction at OPDES{\rm OP_{DES}} as Mmin=0M_{min}=0. It means that there is no restriction on DES to choose their partition coefficients in order to demonstrate complete functional properties. Let us look at (a) (b) (c) in Fig. 4. Shown as (a), as pep_{e} increases, EA’s profit function increases first and then decreases under any price php_{h} offered by HA, and its objective value has nothing to do with php_{h}. There is no competitiveness between EA and HA because of no restriction. It proves the profit function Ve(,ph)V_{e}(\cdot,p_{h}) is concave with respect to pep_{e}. Similarly, shown as (b), we have HA’s profit function Vh(,pe)V_{h}(\cdot,p_{e}) is concave with respect to php_{h} as well. From (c), it is the utility function of this DES according to offered prices pe=ph=4.5×108p_{e}=p_{h}=4.5\times 10^{-8}, which prove the concavity of DES’s utility function. It shows that our previous analysis about DESs’ response is valid, and DESs are always able to respond aggregators with the optimal strategy according to the prices offered by aggregators. If a Nash equilibrium exists between aggregators, then a Stackelberg equilibrium among players in game 𝔾\mathbb{G} must exist definitely.

2) Effect of satisfaction coefficients: Shown as (d) (e) (f) in Fig. 4, under the setting k2k_{2}, shown as (d) (e) (f) in Fig. 4, we increase kek_{e} but decrease kbk_{b}. Shown as (d), as kek_{e} increases, the maximum point that obtains the maximum profit for EA moves toward the positive direction. It implies that the EA has to offer a higher price to buy electricity from DES in order to gain the maximum profit, because electricity used to serve community can contribute more utility than before. Similarly, shown as (e), as khk_{h} decreases, the maximum point that obtains the maximum profit for HA moves toward the negative direction. From (f), as kek_{e} increases and khk_{h} decreases, the maximum point that obtains the maximum utility for DES according to pe=ph=4.5×108p_{e}=p_{h}=4.5\times 10^{-8} moves from (α,β)=(0.301,0.481)(\alpha_{\circ},\beta_{\circ})=(0.301,0.481) in (c) to (0.404,0.328)(0.404,0.328) in (f). Thus, we have α\alpha_{\circ} (resp. α\alpha_{\circ}) increases with the growth of kek_{e} (resp. khk_{h}).

Refer to caption
(a) EA’s profit function Ve(,ph)V_{e}(\cdot,p_{h})
Refer to caption
(b) DES’s optimal response α\alpha
Refer to caption
(c) DES’s optimal response β\beta
Refer to caption
(d) HA’s profit function Vh(,pe)V_{h}(\cdot,p_{e})
Refer to caption
(e) DES’s optimal response α\alpha
Refer to caption
(f) DES’s optimal response β\beta
Figure 5: The objective functions of aggregators and DES’s optimal responses in city S{\rm S} under the setting M1M_{1}.
Refer to caption
(a) EA’s profit function Ve(,ph)V_{e}(\cdot,p_{h})
Refer to caption
(b) DES’s optimal response α\alpha
Refer to caption
(c) DES’s optimal response β\beta
Refer to caption
(d) HA’s profit function Vh(,pe)V_{h}(\cdot,p_{e})
Refer to caption
(e) DES’s optimal response α\alpha
Refer to caption
(f) DES’s optimal response β\beta
Figure 6: The objective functions of aggregators and DES’s optimal responses in city S{\rm S} under the setting M2M_{2}.

3) Effect of restrictions: From the definition of OPDES{\rm OP_{DES}}, we have a restriction that requires a feasible solution must satisfy Xα+YβMminX\cdot\alpha+Y\cdot\beta\geq M_{min} and Mmin(max{X,Y},X+Y)M_{min}\in(\max\{X,Y\},X+Y). Here, we all adopt satisfaction coefficient k1k_{1}. In this part, we consider two different settings, that is M1=0.7×max{X,Y}+0.3×(X+Y)M_{1}=0.7\times\max\{X,Y\}+0.3\times(X+Y) and M2=0.5×max{X,Y}+0.5×(X+Y)M_{2}=0.5\times\max\{X,Y\}+0.5\times(X+Y) where M1<M2M_{1}<M_{2}. In order to demonstrate the effect of restrictions clearly, we use 2D figures instead of 3D figures. Fig. 5 and Fig. 6 draw the objective functions of aggregators and optimal responses of DES according to aggregators’ offered prices in city S{\rm S} under the two settings. Let us discuss the typical black curve, shown as (a) with ph=3.75×108p_{h}=3.75\times 10^{-8} in Fig. 5. At the beginning, EA’s profit increases from pe=3×108p_{e}=3\times 10^{-8} to 3.13×1083.13\times 10^{-8} where DES’s α\alpha decreases but β\beta keeps constant. This response implies that DES’s optimal strategy can be obtained at (α,β)(\alpha_{\circ},\beta_{\circ}) where the first-order derivative is equal to zero. Then, the middle section is a smooth curve, where DES’s response is at the tight border Xα+Yβ=M1X\cdot\alpha+Y\cdot\beta=M_{1}. In this section, we can see DES’s response α\alpha decreases linearly and β\beta increases linearly. Finally starting from pe=4.5×108p_{e}=4.5\times 10^{-8}, EA’s profit decreases linearly because of β=1\beta=1. Let us look at the yellow curve, shown as (a) with ph=6.25×108p_{h}=6.25\times 10^{-8} in Fig. 5. At the beginning, EA’s profit is equal to zero since DES responds with (α=1,β=0.3)(\alpha=1,\beta=0.3). Due to the high price offered by EA and low price offered by EA, all electricity should be partitioned to meet the minimum energy restriction and only sell heat for making revenue. For Fig. 6, compared with Fig. 6, we find that these functions show some structural changes as MminM_{min} increases. The restriction M2M_{2} in Fig. 6 is larger than M1M_{1} in Fig. 5, which indicates the DES has to use more energy to serve its community. Shown as (a) (d) in Fig. 6, we can know that the DES’s optimal strategy cannot be obtained at stationary points (α,β)(\alpha_{\circ},\beta_{\circ}). All DES’s responses are at the tight border Xα+Yβ=M2X\cdot\alpha+Y\cdot\beta=M_{2}. Besides, the sections of α=1\alpha=1 or β=1\beta=1 are much larger than that under the restriction M1M_{1}. However, no matter what MminM_{min} is, the EA (HA) always needs to offer an increasing price in order to get its maximum profit as the price offered by HA (EA) increases. This reflects the competition between aggregators, which is different from that there is no restriction in Fig. 4. Therefore, the restriction settings in OPDES{\rm OP_{DES}} have significant effects on the objective functions of aggregators and optimal responses of DES.

Refer to caption
(a) Initialization: (re,rh)(r_{e},r_{h})
Refer to caption
(b) Initialization: (re,rh)(r_{e},r_{h})
Refer to caption
(c) Initialization: (ce,ch)(c_{e},c_{h})
Refer to caption
(d) Initialization: (ce,ch)(c_{e},c_{h})
Refer to caption
(e) Initialization: (ce+re2,ch+rh2)(\frac{c_{e}+r_{e}}{2},\frac{c_{h}+r_{h}}{2})
Refer to caption
(f) Initialization: (ce+re2,ch+rh2)(\frac{c_{e}+r_{e}}{2},\frac{c_{h}+r_{h}}{2})
Figure 7: The process of converging to Stackelberg equilibrium with different initializations under the restriction M1M_{1}.

4) Stackelberg Equilibrium: Consider a city S{\rm S} that has five communities, we define these DESj{\rm DES}_{j}’s satisfaction coefficients as kj=(kej,khj)k^{j}=(k_{e}^{j},k_{h}^{j}) where j{1,,5}j\in\{1,\cdots,5\}. We assume k1=(115.24,137.81)k^{1}=(115.24,137.81), k2=(129.14,137.81)k^{2}=(129.14,137.81), k3=(143.04,137.81)k^{3}=(143.04,137.81), k4=(156.94,137.81)k^{4}=(156.94,137.81), and k5=(170.85,137.81)k^{5}=(170.85,137.81) in this part. Fig. 7 draws the process of converging to Stackelberg equilibrium with different initializations under the restriction M1M_{1}. Here, the parameters defined in Algorithm 1 is given by Δ=1×1010\Delta=1\times 10^{-10} and δ=0.999\delta=0.999. The initialization (re,rh)(r_{e},r_{h}) implies to give {p~ei,p~hi}{re,rh}\{\tilde{p}_{e}^{i},\tilde{p}_{h}^{i}\}\leftarrow\{r_{e},r_{h}\} in line 3 of Algorithm 1. Take (a) (b) in Fig. 7 as an example, at the beginning, the aggregators offer the highest prices, thus they hardly gain any profit. By interacting with the five DES, the aggregators decrease their offering prices gradually in each iteration in order to improve profits. At approximately 100100-th iteration, they cannot improve their revenues by changing their strategies unilaterally, thus reaching the Nash Equilibrium. The DESs in S{\rm S} always respond aggregators with their optimal strategies, thus the Stackelberg equilibrium can be reached. From (a) (c) (e) in Fig. 7, we can see that they can reach the same equilibrium point regardless of what initialization is. However, the initialization affects the rate of convergence, and a good initialization can converge to the equilibrium point quickly. Fig. 8 draws the process of converging to Stackelberg equilibrium with different Δ\Delta under the restriction M2M_{2}. Here, we adopt the initialization (ce,ch)(c_{e},c_{h}) and δ=0.999\delta=0.999 as well. From (a) (c) in Fig. 8, they can quickly approach to equilibrium point when we adopt the larger Δ\Delta. Nevertheless, it has to wait for Δ\Delta to drop to a relatively low level in order to improve this solution further. Therefore, how to choose the value of Δ\Delta depends on your demand. If we do not require high accuracy but high speed, it is recommended to choose a large Δ\Delta; otherwise we should choose a small one.

Refer to caption
(a) Δ=1×109\Delta=1\times 10^{-9}
Refer to caption
(b) Δ=1×109\Delta=1\times 10^{-9}
Refer to caption
(c) Δ=1×1010\Delta=1\times 10^{-10}
Refer to caption
(d) Δ=1×1010\Delta=1\times 10^{-10}
Figure 8: The process of converging to Stackelberg equilibrium with different Δ\Delta under the restriction M2M_{2}.

5) Centralized vs. Distributed: For the aggregators, it is hard to know the complete information about all DESs in its city. Even if knowing partial coefficients, such as coefficient satisfactions, the settings of minimum energy restriction are very flexible, which will change with the fluctuations of the community population, season, and other factors. The optimal responses from DES are unpredictable. Thereby the aggregators can only obtain feedback information of DESs in a distributed manner, that is to update their offering price iteratively by interacting with DESs in their city.

VII Conclusion

In this paper, we studied multiple energies trading problem systematically. First, we proposed an architecture of B-MET system to address the security and privacy protection issues in distributed energy trading. In order to reduce latency and improve throughput, we introduce a credit model and design a new byzantine-based consensus mechanism based on it. Then, we model the interactions between aggregators and DESs in a smart city by MLMF Stackelberg game, which is more complex and realistic than the modes that have appeared before. We solve it step by step, show the existence and uniqueness of SE, and design a sub-gradient algorithm to find NE between aggregators. Finally, the results of numerical simulations indicated that our model is valid, and verify the correctness and efficiency of our algorithm.

Acknowledgment

This work is partly supported by National Science Foundation under grant 1747818 and 1907472.

References

  • [1] P. S. Georgilakis and N. D. Hatziargyriou, “Optimal distributed generation placement in power distribution networks: models, methods, and future research,” IEEE Transactions on power systems, vol. 28, no. 3, pp. 3420–3428, 2013.
  • [2] N. Z. Aitzhan and D. Svetinovic, “Security and privacy in decentralized energy trading through multi-signatures, blockchain and anonymous messaging streams,” IEEE Transactions on Dependable and Secure Computing, vol. 15, no. 5, pp. 840–852, 2016.
  • [3] M. Li, J. Weng, A. Yang, W. Lu, Y. Zhang, L. Hou, J.-N. Liu, Y. Xiang, and R. H. Deng, “Crowdbc: A blockchain-based decentralized framework for crowdsourcing,” IEEE Transactions on Parallel and Distributed Systems, vol. 30, no. 6, pp. 1251–1266, 2018.
  • [4] Y. Jiao, P. Wang, D. Niyato, and K. Suankaewmanee, “Auction mechanisms in cloud/fog computing resource allocation for public blockchain networks,” IEEE Transactions on Parallel and Distributed Systems, vol. 30, no. 9, pp. 1975–1989, 2019.
  • [5] D. Wu and R. Wang, “Combined cooling, heating and power: A review,” progress in energy and combustion science, vol. 32, no. 5-6, pp. 459–495, 2006.
  • [6] Z. Su, Y. Wang, Q. Xu, M. Fei, Y.-C. Tian, and N. Zhang, “A secure charging scheme for electric vehicles with smart communities in energy blockchain,” IEEE Internet of Things Journal, vol. 6, no. 3, pp. 4601–4613, 2018.
  • [7] Z. Zhou, B. Wang, M. Dong, and K. Ota, “Secure and efficient vehicle-to-grid energy trading in cyber physical systems: Integration of blockchain and edge computing,” IEEE Transactions on Systems, Man, and Cybernetics: Systems, vol. 50, no. 1, pp. 43–57, 2019.
  • [8] J. C. Vasquez, J. M. Guerrero, J. Miret, M. Castilla, and L. G. De Vicuna, “Hierarchical control of intelligent microgrids,” IEEE Industrial Electronics Magazine, vol. 4, no. 4, pp. 23–29, 2010.
  • [9] C. Cecati, C. Citro, A. Piccolo, and P. Siano, “Smart operation of wind turbines and diesel generators according to economic criteria,” IEEE Transactions on Industrial Electronics, vol. 58, no. 10, pp. 4514–4525, 2011.
  • [10] D. Zhang, N. Shah, and L. G. Papageorgiou, “Efficient energy consumption and operation management in a smart building with microgrid,” Energy Conversion and Management, vol. 74, pp. 209–222, 2013.
  • [11] J. Kang, R. Yu, X. Huang, S. Maharjan, Y. Zhang, and E. Hossain, “Enabling localized peer-to-peer electricity trading among plug-in hybrid electric vehicles using consortium blockchains,” IEEE Transactions on Industrial Informatics, vol. 13, no. 6, pp. 3154–3164, 2017.
  • [12] Z. Li, J. Kang, R. Yu, D. Ye, Q. Deng, and Y. Zhang, “Consortium blockchain for secure energy trading in industrial internet of things,” IEEE transactions on industrial informatics, vol. 14, no. 8, pp. 3690–3700, 2017.
  • [13] J. Guo, X. Ding, and W. Wu, “Combined cooling, heating, and power system in blockchain-enabled energy management,” arXiv preprint arXiv:2003.13416, 2020.
  • [14] S. Maharjan, Q. Zhu, Y. Zhang, S. Gjessing, and T. Basar, “Dependable demand response management in the smart grid: A stackelberg game approach,” IEEE Transactions on Smart Grid, vol. 4, no. 1, pp. 120–132, 2013.
  • [15] S. Bu and F. R. Yu, “A game-theoretical scheme in the smart grid with demand-side management: Towards a smart cyber-physical power infrastructure,” IEEE Transactions on Emerging Topics in Computing, vol. 1, no. 1, pp. 22–32, 2013.
  • [16] H. Yao, T. Mai, J. Wang, Z. Ji, C. Jiang, and Y. Qian, “Resource trading in blockchain-based industrial internet of things,” IEEE Transactions on Industrial Informatics, vol. 15, no. 6, pp. 3602–3609, 2019.
  • [17] Y. Chen, Z. Li, B. Yang, K. Nai, and K. Li, “A stackelberg game approach to multiple resources allocation and pricing in mobile edge computing,” Future Generation Computer Systems, vol. 108, pp. 273–287, 2020.
  • [18] W. Tushar, B. Chai, C. Yuen, D. B. Smith, K. L. Wood, Z. Yang, and H. V. Poor, “Three-party energy management with distributed energy resources in smart grid,” IEEE Transactions on Industrial Electronics, vol. 62, no. 4, pp. 2487–2498, 2014.
  • [19] M. Castro, B. Liskov et al., “Practical byzantine fault tolerance,” in OSDI, vol. 99, no. 1999, 1999, pp. 173–186.
  • [20] T. Başar and G. J. Olsder, Dynamic Noncooperative Game Theory, 2nd Edition.   Society for Industrial and Applied Mathematics, 1998.
  • [21] J. B. Rosen, “Existence and uniqueness of equilibrium points for concave n-person games,” Econometrica: Journal of the Econometric Society, pp. 520–534, 1965.
  • [22] S. Boyd, S. P. Boyd, and L. Vandenberghe, Convex optimization.   Cambridge university press, 2004.
  • [23] Y. Xiao, G. Bi, and D. Niyato, “A simple distributed power control algorithm for cognitive radio networks,” IEEE Transactions on Wireless communications, vol. 10, no. 11, pp. 3594–3600, 2011.
  • [24] H. Zhang, Y. Xiao, L. X. Cai, D. Niyato, L. Song, and Z. Han, “A multi-leader multi-follower stackelberg game for resource management in lte unlicensed,” IEEE Transactions on Wireless Communications, vol. 16, no. 1, pp. 348–361, 2016.