You are on page 1of 9

Electric Power Systems Research 213 (2022) 108649

Contents lists available at ScienceDirect

Electric Power Systems Research


journal homepage: www.elsevier.com/locate/epsr

Research on multi-microgrid power transaction process based on


blockchain Technology
Zixiao Xu , Yufeng Wang , Run Dong , Weilin Li *
Automation engineering college, Northwestern Polytechnical University, Xi’an 710072, China

A R T I C L E I N F O A B S T R A C T

Keywords: As a new distributed generation system, multi-microgrid is an important part of Energy Internet. There are a
Blockchain series of problems in the selection of generation resources and power trading which includes obvious concen­
Multi-microgrid tration, fairness and low credibility. Aiming at the shortcomings of microgrid in real-time electricity trade, a
Power trading
multi-microgrid electricity bidding trading model based on blockchain technology is proposed. A competitive
Ant colony algorithm
spot market with distributed "multi-seller and multi-buyer" is constructed to realize the integration of "source-
sale". This paper compares the traditional trading mode with the power trading mode supported by blockchain
technology. In addition, this paper establishes a blockchain-based multi-microgrid power trading model, and
uses ant colony algorithm random bidding matching to achieve multi-objective optimization. Through the whole
process, the unification of energy flow, information flow and currency flow are realized. Finally, the reasonable
allocation of power resources and the openness and transparency of power trading are ensured.

utilization ratio of renewable energy has become a problem that must be


solved to promote the construction of multi-micro grid systems. There­
1. Introduction fore, studying the multi-microgrid power transaction model has
important theoretical and practical significance for the development of
At present, the acceleration of primary energy consumption, serious distributed energy consumption and Energy Internet technology.
environmental degradation and low utilization rate of new energy are Blockchain technology is a new application mode of computer tech­
important challenges facing the global energy economy [1]. The emer­ nology [5], such as distributed data storage, point-to-point transmission,
gence of Energy Internet provides the possibility of access and consensus mechanism, encryption algorithm and so on. It has the ad­
large-scale use of all kinds of energy [2]. The multi-microgrid system vantages of decentralization, transparency and high credibility. At pre­
composed of multiple microgrids is considered as a typical sub network sent, blockchain technology is widely used in the fields of finance,
of Energy Internet. In addition, the multi-microgrid system is also an economy, technology, and politics. At the same time, its development
important prerequisite and necessary way to realize the development of and application in the power industry have gradually attracted attention
Energy Internet technology. With the rise of microgrid technology, it is [6,7] . The TransActive Grid project in the United States was completed
particularly important to study the scenario of microgrid power trading. by the cooperation of US energy company LO3 Energy and Bitcoin
With the development of energy storage technology and the advance­ development company Consensus Systems. This project is the first
ment of smart grid technology, multi-micro grids will inevitably application of blockchain technology to energy payment. The project
generate new market entities in the power market. The types of market has successfully realized an energy transaction between two Brooklyn
entities are no longer fixed, and each entity is both a producer and a residents [6]. Reference [8] first proposed a distributed electronic cash
consumer. Thus, competition in the electricity market will become settlement method, that is, using blockchain technology to create a
increasingly complex [3]. From the perspective of the microgrid, the distributed intelligent value transfer and payment method. Reference
energy trading mechanism has a series of advantages in large-scale [9] proposed the application prospect of blockchain in the field of En­
distributed renewable energy due to its strong adaptability, wide ergy Internet. Reference [10] proposed an idea of using blockchain
application, high social benefits, low construction cost, and distributed technology to settle accounts in multi energy complementary system. In
structure [4]. Under the new situation, how to fully guarantee the bal­ reference [11], typical applications of blockchain technology in Energy
ance of the interests of various market entities and increase the

* Corresponding author.
E-mail address: wli907@nwpu.edu.cn (W. Li).

https://doi.org/10.1016/j.epsr.2022.108649
Received 13 January 2021; Received in revised form 19 October 2021; Accepted 14 July 2022
Available online 30 July 2022
0378-7796/© 2022 Elsevier B.V. All rights reserved.
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

Nomenclatures CMO
buy (t) Power purchase cost of microgrid operators
RMO
bonus (t) Extra bonus of microgrid
Acronyms
PCMO
extra (t) Extra punishment of microgrid
MOs Microgrid operators
minCPC (t) The objective function of large power consumers
DGAs Distributed generation aggregators
CMtoP
buy (t) The cost of large power users purchasing electricity from
PCs Large power consumers
microgrid operators
Parameters CDtoP
buy (t) The cost of large power users purchasing electricity from
YPublickey Public key used by Y distributed generation aggregators
YPrivatekey Private key used by Y maxΠDGA (t) The objective function of distributed generation
Y
Taddress Information transmission address aggregators
InforY Information set broadcast by market entityYto the PDGA
sell (t) The revenue of distributed generation aggregators from
blockchain selling electricity to other market entities
QYsell , PYsell The electricity sales and price released by market entityYin CDGA The cost of buying electricity from other market entities for
buy (t)
period [t, t + Δt] distributed generation aggregators
Y
|YPublickey |Taddress The node address calculated by the public key of pik− g (t) Transfer probability
entity Y
Inputnum The block header content of the transaction initiator
ΣXi (t) The objective function value of the entityX Outputnum The version content in the block head of the power
Variables selling user MO1
Cbuy (t) Unit cost of purchasing electricity Pi,MO1 , Ci,MO1 , Ti,MO1 The transaction power, price and transaction
time data of MO1 participating in the transaction
ηMsell Bidding strategies of microgrid operators
sign(ipublickey ) The public key information signed by the system
ηPbuy Bidding strategies of large power consumers
participant after the transaction order certification is
ηDsell Bidding strategies of distributed generation aggregators passed
maxΠMO (t) The objective function of microgrid operators maxΠMO (t) The objective function of microgrid operators
PMO
sell (t) The profit of microgrid operators

Internet trading system, distributed energy industry and electric vehicle data transparency and reliability that make it suitable for data analysis
industry were introduced. It can be seen that the current research on the and decision-making in a decentralized system structure [16]. The
application of blockchain in the Energy Internet is still at the level of market economy ecological environment based on blockchain technol­
integration concept and function analysis. Research on the application ogy does not require third-party supervision, and the data is safe and
of blockchain technology has not been fully implemented. In addition, transparent. Based on the advantages of blockchain, it not only can
reference [12] considered the problem of direct bilateral transactions greatly reduce the cost of reconstruction or trust maintenance between
when large numbers of producers and consumers were connected to the different market entities, but also effectively prevent rent-seeking
Energy Internet. Based on blockchain technology, a power transaction behavior in the market [7].
method with weak centralization management was established, which This paper proposes a multi-microgrid power transaction process
solved the trust problem between traders in the power market. In based on blockchain technology. Blockchain technology is used to solve
addition, the original distributed security checking method was the problem of multi-agent peer-to-peer transactions in multi-
improved. However, the whole transaction process still needed the microgrids. The established model fully takes into account the
participation of the central agencies. The decentralization in a real sense competitive relationship and respective goals between multiple parties.
has not been realized. Reference [13] introduced blockchain technology Through the combination of blockchain technology and ant colony al­
from many aspects. On this basis, how to introduce blockchain tech­ gorithm, specific examples are used to prove the rationality of the built
nology into large user direct power purchase was preliminarily model, which can realize the local optimization of each target entity and
explored. A blockchain framework for large user direct power purchase conform to the laws of the market. The paper provides reference value
transactions in market access transaction and settlement was con­ for the study of peer-to-peer transactions in multi-microgrids.
structed. In addition, the formulation of intelligent contracts in the The remainder of this paper is organized as follows: In Section 2, the
transaction process was completed. However, the papers only studied feasibility of blockchain technology and multi-microgrid power trans­
the trading framework from the macro level. The technical details need action is analyzed. The traditional transaction mode and blockchain
to be improved. In [14], the characteristics of decentralization, intelli­ mode are compared in Section 3. Multi-microgrid power transaction
gent contract and collaborative autonomy of blockchain technology model and transaction process are established based on blockchain
were considered. It was reasonable and effective to apply it to the technology in Section 4. The rationality of the transaction model and
automatic demand response project of energy local area network. process is proved by concrete examples in Section 5. Section 6 summa­
However, the construction and improvement of Energy Internet trading rizes the main conclusions and contributions of this study.
mechanism still need to be further solved.
The above-mentioned researches have achieved good results, but 2. Feasibility analysis of blockchain technology and multi-
they have not yet involved the research on competitive transactions microgrid electricity trade
among multiple entities in the multi-microgrid system. Since the multi-
microgrid system contains multiple types of market entities, if a third 2.1. Blockchain technology
party intervenes or regulates market economic activities, it will hinder
market competition, resulting in rent-seeking behaviors such as mo­ In essence, blockchain is a distributed, chained-connection shared
nopoly or a small number of privileged persons obtaining excess income database which has the characteristics of decentralization, transparent
[15]. As a distributed accounting system, blockchain technology has information security and etc. Blockchain technology can realize point-

2
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

Table 1
Value analysis of the blockchain technology to electricity trading.
Technical items Analysis of technical value in electricity
trading

Asymmetric cryptography Ensure the safety and reliability of data


transmission
Decentralization Support peer-to-peer transactions between
complex market entities
complete disclosure of information All information of market transactions can
and time-stamping technology be recorded to reduce rent-seeking behavior
in the market

to-point communication. Asymmetric cryptography technology of


blockchain ensure that data cannot be forged and tampered with [14].
The blockchain has a transformable programming system, and each Fig. 1. Power transaction flow of multi microgrid based on block­
node can establish an efficient smart contract mechanism that meets the chain Technology.
execution conditions of both entities to the transaction. Both entities to
the transaction can automatically execute the contract without super­
vision, and complete the transaction anonymously when the execution
conditions are met. Moreover, the blockchain has a "time stamp" tech­
nology. All recorded transactions and data are encoded with time in­
formation. Any transaction has a transaction time to ensure the
verifiability of the information recorded on the database [7]. Blockchain
technology has been successfully applied to Brooklyn Microgrid, which
is the first energy market based on blockchain technology in the world.
The microgrid project has realized P2P power transactions between
community residents [17].

2.2. Feasibility analysis

Blockchain technology can play a role in different links of energy


field, such as power supply, power grid, load measurement. Specifically,
blockchain can be used in scenarios such as carbon emission certifica­
tion [18, 19], virtual generation rights trading [20], multi-energy Fig. 2. Multi-microgrid power market transaction flow based on blockchain.
collaboration and information management [21]. Among them, the
use of blockchain technology in power trading is one of the typical ap­ and blockchain technology will provide a robust data interaction
plications that can reflect the characteristics of blockchain technology. foundation for the electricity market [22].
Multi-microgrid electricity trade is different from traditional power (3) Blockchain technology can promote the fairness of competition in
transactions, which includes distributed new energy, energy storage and the multi-microgrid market. As a large distributed database, the
so on. The trading mode is no longer a grid-centric trading mode, but blockchain can record all the information of every market
autonomous, spontaneous and random matching. The characteristics of transaction. The complete disclosure of information and time-
blockchain technology are in good agreement with multi-microgrid stamping technology greatly reduces market rent-seeking
transactions [17]. The value analysis table of blockchain technology to behavior, allowing market entities to conduct standardized and
power transactions is shown in Table 1. reasonable market behaviors under market rules [23]. The ledger
characteristics and time characteristics of the blockchain have
(1) Blockchain technology can promote the security of transactions created competition between market entities under complete
in the multi-microgrid market. Blockchain uses asymmetric information conditions. Based on the blockchain characteristics,
cryptography principles to encrypt data. This mechanism can not fair market competition can be achieved.
only ensure the security and reliability of data transmission but (4) Blockchain technology can improve the reward and punishment
also provide security guarantee for the multi-microgrid trading mechanism of competition in the multi-microgrid market. The
market. competition among multiple microgrid market entities based on
(2) Blockchain technology can promote the decentralization of blockchain technology has added substantial incentive and pun­
competition in the multi-microgrid market. In traditional market ishment mechanisms [24]. The incentive mechanism based on
competition, the transaction information generated by each smart contracts can deepen the degree of marketization,
market entity needs to be fed back to the power grid trading encourage the improvement of clean energy utilization, and
center for unified release, and then the market entities will be effectively reduce carbon emissions to the external environment.
organized to bid. After the bid is successful, the dispatch center
will uniformly realize economic dispatch. This method increases 3. Multi-microgrid power transaction model based on
the links of information circulation and reduces the timeliness of blockchain technology
information. However, there is no central node in the blockchain
network, which can support peer-to-peer transactions in the 3.1. General process
electricity market. With the advancement of the electricity mar­
ket reform and the development of microgrids, more and more The power transaction process based on blockchain technology can
entities will participate in the electricity market in the future, and be divided into five stages, which can be represented as Fig. 1.
market transactions will become more frequent. Adaptive and
decentralized electricity trading will become the mainstream,

3
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

3.2. Multi-microgrid transaction system based on blockchain entityX adjusts the strategy to provide the secondary quotation strategy
or terminate the transaction to the entityY.
The power market structure of multi-microgrid based on blockchain
is studied in this paper as shown in Fig. 2. In the market structure of 3.2.2. Multi-microgrid electricity purchase transaction matching
multi-microgrid group, the market entities mainly include microgrid
operators (MOs), distributed generation aggregators (DGAs) and large (1) Price strategy space
power consumers (PCs). Each entity is independent and profitable. They
all hope to maximize their own interests through the process of trans­ Before the matching process of electricity trade in multi-microgrid,
action matching. As can be seen from the Fig. 2, each market module is each market entity will form a bidding strategy space, which includes
connected and interconnected by energy flow and information flow. The unit cost of purchasing electricity Cbuy (t)and unit price of selling elec­
energy flow realizes the conduction and transmission of energy at the tricitypsell (t). Each unit is yuan/(kW.h).
physical level. The information flow realizes the information trans­ According to their own profit maximization, each entity formulates
mission of each node in the form of blockchain. The highly merged of the electricity price as the bidding strategy space according to the spe­
information flow and energy flow strengthens the reliability of energy cific situation.
transfer among various entities and guarantees the timeliness of market Therefore, the bidding strategies of microgrid are as follows: ηM sell =
transactions. In this figure, each entity has its own functions. The {pMtoM (t), p MtoD
(t), pMtoP
(t)}. Distributed larger power user do not have
sell sell sell
microgrid operator is mainly responsible for generating and buying electricity sales, so their bidding strategies are aggregated into low
electricity. In the case of abundant electricity sales by microgrid oper­ power purchase costs: ηPbuy = {cMtoP DtoP
buy (t), cbuy (t)} . Bidding Strategies
ators and power shortage by other entities, microgrid sells electricity for
Space set of distributed generation aggregators: ηDsell = {pDtoM DtoP
sell (t),psell (t),
profit. The distributed generation aggregators operator collects the
DtoD
scattered electricity of distributed users. When the system is short of psell (t)}.
electricity, it can still play the role of sellers and earn profits through
price difference. While the large power users only act as consumers, (1) Objective function
buying electricity but not selling electricity. According to their own
conditions, the large power users obtain the maximum electricity at the The evaluation index of each entity choosing the trading object is the
minimum cost. In this model, the large power users do not sell electricity optimum value of its own objective function. For the entities who can
at all. buy and sell, the objective function includes the maximization of the
In this paper, each market entity is regarded as a block. Each market value of the sale income and the purchase expenditure. For the large
entity trades in different periods, then the block will complete the search power users, the optimization of the objective function is the minimum
for new blocks and link work. A large blockchain network is formed. In value of the purchase cost. The competition goal of microgrid operators
large energy blockchain network, each market entity publishes its own and distributed generation aggregators is to maximize their own profits.
unit ID, generation quota, energy type, electricity quotation and elec­ The goal of large power users is to achieve power demand at the mini­
tricity purchase and sale situation on the blockchain network. Then, the mum cost. The objective function of each entity is as follows:
information is broadcasted to the whole network. After checking and The objective function of microgrid operators (MOs):
reaching consensus, each node publishes the power supply information maxΠMO (t) = PMO MO MO MO
(2)
sell (t) − Cbuy (t) + Rbonus (t) − PCextra (t)
block. At the same time, the power buyer can read the sales information
of other main entities from the blockchain. The power buyer finds sellers Microgrid operators will sell the surplus power to the other entities
who can meet their own needs for transaction matching. Then the set­ who need electricity during such periods to obtain the profit PMO sell (t).
tlement is completed by intelligent contract. In addition, the transaction When the microgrid cannot be supplied by itself, electricity purchasing
information can be uploaded to the blockchain network, which can be is needed and the cost is CMO
buy (t). Besides, the strict punishment mecha­
queried at any time. nism is embedded in the incentive. Later, extra bonus RMO
bonus (t) will made
available when the clean energy utilization ratio increases, and extra
3.2.1. Encryption of purchasing electricity trading information punishment PCMOextra (t) will be applied when the pollutant emissions
Each market entity publishes purchase and sale information to the increase.
blockchain network according to its own needs. The objective function of large power consumers (PCs) is:
The market entityYuses public keyYPublickey and private keyYPrivatekey to
generate transaction authentication and information transmission
MtoP
minCPC (t) = Cbuy DtoP
(t) + Cbuy (t) (3)
Y
addressTaddress with time stamp. Then the market entityYbroadcasts
CMtoP
buy (t) is the cost of large power users purchasing electricity from
power purchase demand or power sale information to the whole
microgrid operators, and the cost of large power users purchasing
network:
( ) electricity from Distributed generation aggregators is CDtoP
buy (t).
QY orPYsell , [t, t + Δt] The objective function of distributed generation aggregators (DGA)
InforY = ⃒⃒ sell ⃒ Y (1)
YPublickey ⃒T
address
is:

WhereInforY is the information set broadcast by market entityYto the maxΠDGA (t) = PDGA DGA
sell (t) − Cbuy (t) (4)
blockchain; QYsell and PYsell are the electricity sales and price released by
PDGA the revenue of distributed generation aggregators from
sell (t)is
market entityYin period [t, t + Δt] respectively;|YPublickey |Taddress
Y
is the
selling electricity to other market entities, and the cost of buying elec­
node address calculated by the public key of entity Y. tricity from other market entities for distributed generation aggregators
When the market entity Xreceives the information sent by the market
is CDGA
buy (t).
entity Y, firstly, the private key YPublickey is used to decrypt the infor­
mation ofY. All the contents of InforY are obtained. Secondly, it extracts
(1) Constraint condition
the transaction information and compares the signature content to verify
a Constraint condition of MOs
the authenticity of the information released by the market entity Y.
According to the published information of Yand their own needs, the
Distributed generator output constraints:
objective function valueΣXi (t)of the entityXis calculated to determine
whether the objective function value satisfies the conditions. If not, the

4
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

0 < LαDGS (t) < Lmax


DGS (t) (5) distributed aggregators to microgrid operators, other distributed
aggregators and large power users is not greater than the difference
Where, LDGS (t) is the power output of the α-th distributed generator
α
between the total power generation of distributed generators and the
at time t; Lmax
DGS (t) is the maximum power output of the distributed electricity consumed by their own loads.
generator at time t. The constraint condition indicates that the power Electricity Price Constraints:
output of an arbitrary distributed generator will not be greater than the { }
maximum power output of the distributed generator. pmin (t) ≤ pDtoM DtoP DtoD
sell (t), psell (t), psell (t) ≤ pmax (t) (12)
Electricity Sales constraints:
Distributed aggregators sell electricity to other market entities at

n1 ∑
n2
MtoD
n3
∑ prices within their minimum and maximum electricity prices.
0≤ QMtoM i
sell (t) + Qsell j (t) + QMtoP k
sell (t)
i=1 j=1 k=1
[ ] (6) a System power balance

n4 ∑
n1
≤ LDGS (t) − LMO i
load (t) Δt ∑
n1 ∑
n4
α=1 i=1 D(t) = LMO i
sell (t) + LDGA α
sell (t) (13)
i=1 α=1
Where, LMO
is the load value of microgrid operator i at time t. At
i
load (t)
any time, the total amount of electricity sold by a microgrid operators
cannot be greater than the difference between its own power generation
and its own load consumption. Where, D(t) is the total demand of the system; LMO DGAα
sell (t) and Lsell (t)
i

Electricity Price Constraints: are the load capacity provided by microgrid operators and distributed
{ } generation aggregators, respectively. This equation indicates that the
pmin (t) ≤ pMtoM MtoD MtoP
sell (t), psell (t), psell (t) ≤ pmax (t) (7)
total system load demand is equal to the total system supply.
Where, pmin (t) and pmax (t) are the minimum and maximum power In the matching process of multi-microgrid power purchase trans­
selling prices of microgrid operators at time t, respectively. The price of actions, there are mainly the following parameters: the price of each unit
electricity sold by microgrid operators to other microgrid operators, of electricity sold by the sellerpsell (t) (the highest price of the seller’s
distributed aggregators and power users are between their minimum electricity purchase price is the electricity sale price); the highest
and maximum prices. transaction price of each unit of electricity in the transaction process by
the buyerCbuy (t); the power demand and power supply of the buyer and
a Constraint condition of PCs seller in each period.
The steps of using ant colony algorithm to solve the matching of
Purchasing electricity constraints: multi-microgrid power purchase transactions are as follows:
Step 1: Set up the initial set of strategies for each market entity to

n1 ∑
n2
QM i toP
buy (t) +
D toP
j
Qbup (t) ≥ QPbuy (t) (8) participate in competitive trading. For all market entitiesnparticipating
i=1 j=1 in the transaction, an initial set of quotations within their quotation
range is generated. Each ant k represents a set of quotation strategies,
Where, QPbuy (t) is the minimum demand of the large user entity at
and the set of price strategies at time t can be expressed as:
time t. At any time, the power users purchase from microgrid operators ⎡ ⎤
and distributed aggregators are greater than their minimum power p1− 1 (t) p1− 2 (t) ⋯ p1− n (t)
demand. ⎢ p2− 1 (t) p2− 2 (t) ⋯ p2− n (t) ⎥
ηk (t) = ⎢ ⎥ (14)
⎣ ⋮ ⋮ ⎦
Electricity Price Constraints: ⋮ ⋮
{ } pn− 1 (t) pn− 2 (t) ⋯ pn− n (t)
cMtoP DtoP P
buy (t), cbuy (t) ≤ cbuy (t) (9)
Where, ηk (t) represents the set of price strategies at time t corre­
sponding to ant k.
Where, cPbuy (t)
is the maximum price limit for large users to purchase
Step 2: Each market entity selects a certain market entity published
electricity at time t. At any time, the price of electricity purchased by
on the blockchain network as the transaction object according to its own
large power users from microgrid operators and distributed aggregators
demand. For example, when the market entity 2 receives the informa­
will not be greater than the maximum price limit for large users to
tion published by the market entity 1 on the network, it first uses the
purchase electricity.
private key2 − Privatekey to decrypt 1 to obtain all the information
published by the entity 1, including the purchase, sale volume and the
a Constraint condition of DGAs
electricity price; Secondly, the transaction information extracted and the
signature content are compared to verify the authenticity of the infor­
Energy storage battery power constraints:
mation published by the entity 1. According to the information released
Lmin max
ESS ≤ LESS (t) ≤ LESS (10) by entity 1 and its own needs, the objective function value of entity 2 can
be calculated to judge whether the objective function value meets the
Where, LESS (t) is the power output of the energy storage battery at conditions.
time t; Lmin
ESS and LESS are the minimum and maximum discharge power of
max
Step 3: If the objective function meets the condition, the ant jumps
the energy storage battery, respectively. In any period of time, the power out of the loop; If it is not satisfied, the ant isets off to the next target gby
output of the energy storage battery is between its minimum and calculating the transition probabilitypik− g (t) and judges whether it can be
maximum discharge power.
traded.
Electricity Sales constraints:
When all ants (that is, all quotation strategies) complete a cycle, the

n1 ∑
n2
AtoD
n3
∑ objective functions of all market entities are recorded. By comparison,
0≤ QAtoM i
sell (t) + Qsell j (t) + QAtoP k
sell (t) the current optimal individual and its objective function value are
i=1 j=1 k=1
[ ] (11) recorded. The transaction price in the transaction process corresponding
∑ ∑ to the optimal individual is the optimal quotation.
n4 n1
≤ LDGS (t) − LMO
load (t) Δt
i

α=1 i=1 Step 4: Update the pheromone concentration; set the number of it­
erations N = N + 1; ifN ≤ Nmax , go to step 2; otherwise, output the
In any period of time, the total amount of electricity sold by

5
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

Table 2
Bidding strategy intervals of various market entities.
Various market entities Bidding strategy space

Microgrid operators (MOs) 0.5~1.0 yuan/ (kWh)


Distributed generation aggregators (DGAs) 0.5~0.90 yuan/ (kWh)
large power consumers (PCs) 0.5~1.05 yuan/ (kWh)

Fig. 3. Multi-microgrid transaction settlement smart contract model.

optimal result.

3.2.3. Transaction authentication


The electric power transaction matching authentication is divided
into two stages. The first stage is the confirmation of transaction order
data by both entities, which can be expressed as Eq. (15); In the second Fig. 4. Simplified structure of purchase and sale between the market entities.
stage, the execution of the transaction order is verified by running the
smart contract locally. The public key of the transaction order that
Num[sign(Fi , pass)]〉Num[sign(Fi , oppose)] (17)
passes the verification is shown in Eq. (16). For example, if the power
consumer is a microgrid operator (MO1), and the transaction originator Where, Num[sign(Fi ,pass)]is the number of nodes on the chain that the
is a distributed generation aggregator (DGA1), then the output expres­ authentication transaction has passed; Num[sign(Fi , oppose)]is the node
sion after signing the electricity sale is: on the chain that the authentication transaction does not pass.
⃒ ( )⃒
Fi = N − version|Inputnum| ⃒ , Ti,ES1 ⃒
⃒ ( Input Pi,ES1 , Ci,ES1)⃒ (15) 3.2.5. Transaction settlement
|Outputnum|⃒Output Pi,MS1 , Ci,MS1 , Ti,MS1 ⃒
In the microgrid energy transaction, when the buyer and the seller
∑ ( ) reach a transaction, the transaction fund settlement is needed. In order
Fpass = Fi sign ipublickey (16) to avoid the problems of untimely and unfair electricity settlement in
Where: Inputnum is the block header content of the transaction this process, smart contract can be used to complete the electricity fee
initiator; Outputnum is the version content in the block head of the power settlement between the power buyer and the electricity seller based on
selling user MO1; Output(Pi,MO1 , Ci,MO1 , Ti,MO1 )is the transaction function the blockchain technology. Smart contract is a kind of transaction pro­
signed by the private key of the matched successful power selling user tocol that uses computer to process executable contract terms. It can
MO1; Pi,MO1 , Ci,MO1 , Ti,MO1 is the transaction power, price and transaction cooperate well with blockchain technology to realize the unification of
time data of MO1 participating in the transaction; sign(ipublickey ) is the energy flow, information flow and capital flow in the process of power
public key information signed by the system participant after the transaction. Fig. 3 shows the model of transaction settlement smart
transaction order certification is passed. contract of microgrid, and the implementation steps are as follows [25]:
(1) Each electricity selling transaction node has pre-defined an
3.2.4. Transaction execution and certification electronic commitment, which encapsulates several states, transition
The electricity trading orders that have passed the certification will rules, trigger conditions and corresponding operations. Specifically, it
be distributed to all market entities. The execution of power transaction includes the electronic signatures of both parties, the amount of elec­
is strictly based on the power transaction order. The system monitoring tricity and virtual tokens required by the power exchange, power
equipment records the parameters of power transmission and distribu­ trading rules, and a complete state machine. The power transaction is
tion in real time, including voltage, frequency, electric quantity and spread through point-to-point network. After passing the consensus
corresponding time. The market transaction entities conduct distributed verification, it is written into the distributed ledger of each node of the
power transaction result authentication based on transaction execution blockchain;
list and transaction execution monitoring data. The authentication Regularly check the state machine and external data to judge
process is to calculate the monitoring data based on the smart contract whether a certain power transaction meets all trigger conditions;
algorithm. By checking the transaction order and clearing the trans­ If a certain power transaction meets the conditions, it will be taken
action data list, the transaction order that has passed the authentication out of the blockchain and pushed to the queue to be verified. When it is
is signed with the public key. verified and agreed by most nodes, the smart contract will be activated
The blockchain power trading platform collects the verification re­ and automatically executed to complete the capital settlement of the
sults of power trading instructions. If the platform liquidation execution transaction.
list is inconsistent with the results of the joint verification of market
entities, the results of the joint verification of market entities shall 4. Example analysis
prevail. The result of market participants participating in power trans­
action verification adopts the 51% consensus mechanism, that is, when The transaction model of multi-microgrid designed in this paper is
more than 51% of the nodes in the market subject pass the verification, composed of two microgrid operators (MOs), two distributed generation
the verification result is a valid result, as shown in Eq. (17). aggregators (DGAs) and two large power consumers (PCs).
In order to simplify the setting of bidding strategy matrix, it is

6
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

Table 3
Optimal bidding strategy of 12:00.
Two trading Electricity Price Two trading Electricity Price
entities (yuan/kWh) entities (yuan/kWh)

p(MS→MS) 0.90 p(MS→ES) 0.84


p(MS→PC) 0.85 p(ES→MS) 0.84
p(ES→ES) 0.84 p(ES→PC) 0.69
p(PC←MS) 0.90 p(PC←ES) 0.80

Fig. 5. 24-hour power demand of each market entity.

Fig. 8. Optimal electricity quotation of each entity.

In the trading process of the model, the maximum number of itera­


tions is Nmax = 100; the total number of market entities is n = 6, each
entity randomly generates the number of ants in the bidding strategy
range m = 10(10 bidding strategies); Set the minimum evaporation
coefficientρmin = 0.1, constantQ = 1. Since the model belongs to multi-
objective and multi-stage optimization problem, this paper takes
microgrid operators and energy storage providers as examples to verify
Fig. 6. 24-hour power supply of microgrid operators and distributed genera­ the feasibility of the transaction mechanism. The practice of large power
tion aggregators. consumers is similar, so we do not repeat it.

4.1. Example analysis 1

Example 1 is to run the simulation system with the maximum profit


of microgrid operators as the objective function. The bidding strategy
results of each entity in different periods are shown in Fig. 7.
Fig. 7 shows the optimal bidding strategy retained between tradable
entities after 100 iterations. Taking t = 12 : 00 as an example, the
optimal bidding strategy in this period is obtained through competition,
as shown in Table 3.
As shown in Fig. 7, not all market entities will have the near global
optimum bidding within 24 h, which means that smart contracts are not
generated between any two market players within 24 h. It shows that the
trading partner selection is not random pairing blind selection. Ac­
cording to the objective function of each entity, the trading mechanism
uses the optimization of ant colony algorithm, selects the optimal mar­
ket quotation to match the most suitable trading partner. The unsuitable
will be automatically eliminated. The electricity price at t = 12:00 when
Fig. 7. Optimal electricity quotation of each entity. large power consumers purchase electricity from two major market
entities is taken as an example. In the Table 3, the electricity price
stipulated that the purchase price is consistent with the selling price. The purchased by power consumers from microgrid operators is p(PC←MS) =
bidding strategy intervals of various types of market entities are shown 0.90, and the power bidding from energy storage vendor to power
in Table 2 [7]. consumers is p(PC←ES) = 0.80. Microgrid operators sell electricity to
Large power consumers only buy but not sell. The simple structure of power consumers at high prices to gain their own interests.
purchase and sale between the market entities is shown in Fig. 4. The 24-
hour power demand of each entity is shown in Fig. 5 through prediction. 4.2. Example analysis 2
Fig. 6 shows the 24-hour power supply of microgrid operators and
distributed generation aggregators. Example 2 is based on the maximum profit of the energy storage

7
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

Table 4 Writing – original draft. Yufeng Wang: Data curation, Methodology,


optimal bidding strategy of 12:00. Validation. Run Dong: Investigation, Software. Weilin Li: Resources,
Two trading Electricity Price Two trading Electricity Price Supervision, Writing – review & editing.
entities (yuan/kWh) entities (yuan/kWh)

p(MS→MS) 1.00 p(MS→ES) 0.84 Declaration of Competing Interest


p(MS→PC) 0.85 p(ES→MS) 0.79
p(ES→ES) 0.84 p(ES→PC) 0.69
The authors declare that they have no known competing financial
p(PC←MS) 0.91 p(PC←ES) 0.84
interests or personal relationships that could have appeared to influence
the work reported in this paper.
vendors as the objective function. Running the simulation system, the
results of the bidding strategy between entities that can trade at different Acknowledgement
times as shown in the Fig. 8.
Taking t = 12 : 00 as an example, the near global optimum bidding This work is supported: in part by the National Nature Science
strategy for this period is obtained through competition as shown in Foundation of China (Grant No. 51777169) and in part by the Funda­
Table 4. mental Research Funds for the Central Universities (Grant No.
In this transaction, maximizing the profit of the energy storage ZDHXYKYYW201914).
vendors should be first consideration. Similarly, the electricity price at t
= 12:00 when large power consumers purchase electricity from two References
major market entities is taken as an example. It can be seen from the
Fig. 8, the price of power consumers purchasing electricity from energy [1] M. Zeng, Y. Yang, Y. Li, B. Zeng, J. Cheng, X. Bai, The preliminary research for key
operation mode and technologies of electrical power system with renewable energy
storage vendors are higher than the price of electricity purchased from sources under energy internet, Zhongguo Dianji Gongcheng Xuebao/Proceedings
microgrid operators. That is, (p(PC←ES) = 0.91) > (p(PC←MS) = 0.80). Chinese Soc. Electr. Eng. 36 (2016) 681–691, https://doi.org/10.13334/j.0258-
Energy storage vendors use this bidding strategy to maximize their own 8013.pcsee.2016.03.011.
[2] K. Zhou, S. Yang, Z. Shao, Energy Internet: the business perspective, Appl. Energy.
interests. It is proved that the trading mechanism is not random 178 (2016) 212–222, https://doi.org/10.1016/j.apenergy.2016.06.052.
matching in the process of looking for trading objects, which reduces the [3] D. Liu, M. Zeng, R. Huang, L. Ji, Q. Chen, J. Duan, Y. Li, Business models and
blindness and randomness in the process of trading, and provides an market mechanisms of E-Net (2), Dianwang Jishu/Power Syst. Technol. 39 (2015)
3057–3063, https://doi.org/10.13335/j.1000-3673.pst.2015.11.007.
efficient trading environment for market participants.
[4] C. Li, X. Yu, N. Liu, G. Wen, Multi- microgrid based energy trading framework from
After the pairing is successful, the power buyer takes the public key game theoretic perspective, South. Power Grid Technol. 11 (2017) 96–102.
address as the flow account of electricity. In addition, the power buyer [5] M. Zhao, Q. Yu, Research of voltage control strategy for power management system
signs with the private key, and uploads the signed contract to the in DC microgrid, (2017). https://doi.org/10.1109/ICEI.2017.66.
[6] J. Kang, R. Yu, X. Huang, S. Maharjan, Enabling localized peer-to-peer electricity
blockchain. trading among plug-in hybrid electric vehicles using consortium blockchains, 13
The transaction is stored in a new block in the form of Merkle tree (2017) 3154–3164.
after security check and linked to the end of the blockchain. The [7] T. Ma, L. Peng, Y. Du, Q. Gou, C. Wang, X. Guo, Competition game model for local
multi-microgrid market based on block chain technology and its solution
unforgeability of Merkle tree ensures the security and credibility of algorithm, Power Autom. Equip. 38 (2018) 191–203.
transactions. [8] S. Nakamoto, Bitcoin: a peer-to-peer electronic cash system, Consulted (2009).
Through the above example analysis, it can be concluded that the [9] A. Wang, J. Fan, Y. Guo, Application of blockchain in energy interconnection,
Electr. Power Inf. Commun. Technol. 14 (2016) 1–6.
multi-microgrid competitive transaction model based on blockchain [10] M. Mihaylov, S. Jurado, N. Avellana, K. Van Moffaert, I.M. De Abril, A. Nowé,
technology is reasonable and effective based on the fully considering the NRGcoin: virtual currency for trading of renewable energy in smart grids, Int. Conf.
competitive relationship and respective goals between multiple entities. Eur. Energy Mark. EEM. (2014), https://doi.org/10.1109/EEM.2014.6861213.
[11] X. Sun, M. Chen, Y. Zhu, T. Li, Research on the application of blockchain
In view of the multiple and diversified characteristics of multi- technology in energy internet, in: 2nd IEEE Conf. Energy Internet Energy Syst.
microgrids, the decentralized peer-to-peer trading platform provided Integr. EI2 2018 - Proc, 2018, https://doi.org/10.1109/EI2.2018.8582599.
by blockchain technology is more suitable for trading markets where [12] X. Tai, H. Sun, Q. Guo, Electricity transactions and congestion management based
on blockchain in energy internet, Dianwang Jishu/Power Syst. Technol. 40 (2016)
multiple market entities coexist. The open and transparent characteris­
3630–3638, https://doi.org/10.13335/j.1000-3673.pst.2016.12.002.
tics also reduce rent-seeking behavior in the market and ensure the [13] X. Ouyang, X. Zhu, L. Ye, J. Yao, Preliminary applications of blockchain technique
trading market safe and fair. in large consumers direct power trading, Zhongguo Dianji Gongcheng Xuebao/
Proceedings Chinese Soc. Electr. Eng. 37 (2017) 3737–3745, https://doi.org/
10.13334/j.0258-8013.pcsee.170370.
5. Conclusion [14] X. Yang, Y. Zhang, J. Lu, B. Zhao, F. Huang, J. Qi, H. Pan, Blockchain-based
automated demand response method for energy storage system in an energy local
network, Zhongguo Dianji Gongcheng Xuebao/Proceedings Chinese Soc. Electr.
Aiming at the problems of obvious centralization and low fairness Eng. 37 (2017) 3703–3716, https://doi.org/10.13334/j.0258-8013.pcsee.170387.
and credibility in multi-microgrid power trading, this paper proposes a [15] Y. Lv, An economic analysis of rent-seeking behavior from the per-spective of game
way to combine power trading with blockchain technology. This paper [J], Modern Economic Information (17) (2013) 23–24.
[16] G. Wu, B. Zeng, R. Li, M. Zeng, Research on the application of blockchain in the
uses the "decentralization" of blockchain, the characteristics of asym­ integrated demand response resource transaction, Zhongguo Dianji Gongcheng
metric encryption and smart contract to realize point-to-point trans­ Xuebao/Proceedings Chinese Soc. Electr. Eng. 37 (2017) 3717–3728, https://doi.
action and "source sale" integration. Through the feasibility analysis and org/10.13334/j.0258-8013.pcsee.170284.
[17] C. Nguyen, An Indie, Off-the-grid, blockchain-traded solar power market comes to
comparison with the traditional trading mode, the advantages brought Brooklyn, motherboard techby vice. (2016). https://www.vice.com/en_us/article/
by the power exchange based on blockchain technology are highlighted. yp3pvm/the-plan-to-power-brooklyn-with-a-blockchain-based-microgrid-transacti
The whole process of power transaction based on blockchain technology ve-solar.
[18] L. Zhou, S. Zhang, F. Hou, L. Zhang, Construction of carbon trading pattern based
from uploading, matching, authentication, execution to settlement of
on blockchain, Sci. Soil Water Conserv. 18 (2020) 139–145, https://doi.org/
electricity purchase transaction information is introduced in detail. The 10.16843/j.sswc.2020.03.017.
example proves that the power transaction matching mechanism [19] Z. Yan, J. Li, Research on carbon emissions trading and moni-toring mechanism
based on blockchain technology, Enterp. Econ. 39 (2020) 31–37.
method based on blockchain technology is effective feasibility.
[20] Q. He, Q. Ai, The application prospects of blockchain technol-ogy in virtual power
plants, Electr. Appliances Energy Effic. Manag. Technol. (2017) 14–18.
CRediT authorship contribution statement [21] M. Zeng, J. Cheng, Y. Wang, Y. Li, Y. Yang, J. Dou, Primarily research for multi
module cooperative autonomous mode of energy internet under blockchain
framework, Zhongguo Dianji Gongcheng Xuebao/Proceedings Chinese Soc. Electr.
Zixiao Xu: Conceptualization, Methodology, Software, Validation, Eng 37 (2017) 3672–3681, https://doi.org/10.13334/j.0258-8013.pcsee.162432.

8
Z. Xu et al. Electric Power Systems Research 213 (2022) 108649

[22] W. She, Y. Hu, X. Yang, S. Gao, W. Liu, Virtual power plant operation and [24] Y. Yuan, F.Y. Wang, Blockchain: the state of the art and future trends, Zidonghua
scheduling model based on energy blockchain network, Zhongguo Dianji Xuebao/Acta Autom. Sin. 42 (2016) 481–494, https://doi.org/10.16383/j.
Gongcheng Xuebao/Proceedings Chinese Soc. Electr. Eng. 37 (2017) 3729–3736, aas.2016.c160158.
https://doi.org/10.13334/j.0258-8013.pcsee.170364. [25] Z. Xu, D. Yang, W. Li, Microgrid group trading model and solving algorithm based
[23] Y. Yan, J. Zhao, F. Wen, X. Chen, Blockchain in energy systems: concept, on blockchain, Energies 12 (2019), https://doi.org/10.3390/en12071292.
application and prospect, Dianli Jianshe/Electric Power Constr. 38 (2017) 12–20,
https://doi.org/10.3969/j.issn.1000-7229.2017.02.002.

You might also like