ArticlePDF Available

A Blockchain-Based Load Balancing in Decentralized Hybrid P2P Energy Trading Market in Smart Grid

Authors:

Abstract and Figures

Local energy generation and peer to peer (P2P) energy trading in the local market can reduce the energy consumption cost, emission of harmful gases (as renewable energy sources are used to generate energy at user's premises) and increase the smart grid resilience. However, local energy trading with peers can have trust and privacy issues. A centralized system can be used to manage this energy trading but it increases the overall cost of the system and also faces several issues. In this paper, to implement a hybrid P2P energy trading market, a blockchain-based system is proposed. It is fully decentralized and allows the market members to interact with each other and trade energy without involving a third party. Smart contracts play a very important role in the blockchain-based energy trading market. They contain all the necessary rules for energy trading. We have proposed three smart contracts to implement the hybrid electricity trading market. The market members interact with the main smart contract, which requests P2P and prosumer to grid smart contracts for further processing. The main objectives of this paper are to propose a model to implement an efficient hybrid energy trading market while reducing cost and peak to average ratio of electricity.
Content may be subject to copyright.
Date of publication xxxx 00, 0000, date of current version xxxx 00, 0000.
Digital Object Identifier 10.1109/ACCESS.2017.DOI
A blockchain based load balancing in
decentralized hybrid P2P energy trading
market in smart grid
RABIYA KHALID1, NADEEM JAVAID1, (Senior Member, IEEE), AHMAD ALMOGREN2, (Senior
Member, IEEE) MUHAMMAD UMAR JAVED1, SAKEENA JAVAID1and MANSOUR ZUAIR3
1Department of Computer Science, COMSATS University Islamabad, Islamabad 44000, Pakistan (email: rabiyakhalid672@gmail.com,
nadeemjavaidqau@gmail.com, sakeenajavaid@gmail.com, umarkhokhar1091@gmail.com)
2Chair of Cyber Security, Computer Science Department, College of Computer and Information Sciences, King Saud University, Riyadh 11633, Saudi Arabia
(email: ahalmogren@ksu.edu.sa)
3Chair of Cyber Security, Computer Engineering Department, College of Computer and Information Sciences, King Saud University, Riyadh 11543, Saudi Arabia
(email: Zuair@ksu.edu.sa)
Corresponding authors: Nadeem Javaid (nadeemjavaidqau@gmail.com) and Ahmad Almogren (ahalmogren@ksu.edu.sa).
The authors are grateful to the Deanship of Scientific Research, king Saud University for funding through Vice Deanship of Scientific
Research Chairs.
ABSTRACT Local energy generation and peer to peer (P2P) energy trading in the local market can reduce
the energy consumption cost, emission of harmful gases (as renewable energy sources are used to generate
energy at user’s premises) and increase the smart grid resilience. However, local energy trading with peers
can have trust and privacy issues. A centralized system can be used to manage this energy trading but it
increases the overall cost of the system and also faces several issues. In this paper, to implement a hybrid
P2P energy trading market, a blockchain-based system is proposed. It is fully decentralized and allows the
market members to interact with each other and trade energy without involving a third party. Smart contracts
play a very important role in the blockchain-based energy trading market. They contain all the necessary
rules for energy trading. We have proposed three smart contracts to implement the hybrid electricity trading
market. The market members interact with the main smart contract, which requests P2P and prosumer to grid
smart contracts for further processing. The main objectives of this paper are to propose a model to implement
an efficient hybrid energy trading market while reducing cost and peak to average ratio of electricity.
INDEX TERMS Blockchain, Consumers, Energy Trading, Load, PAR, Power, Prosumers.
I. INTRODUCTION
Electricity has become an analytical underpinning con-
stituent that is essential for the development of new technolo-
gies [1]. It has supported and given raise to the technologies
in several areas of human adequacy. It is the main driving
commodity for modern technologies and in its absence, they
are unusable [2], [3]. The role of electricity in the fields of
innovation, transportation, communication, education, busi-
ness, computation, etc., cannot be repudiated. The demand
for electricity is increasing drastically with each passing day
and its pattern is also dynamic. To meet this energy demand,
a utility needs to install backup power plants which result in
higher production cost, emission of harmful gasses, etc., as it
does not have any control over the demand pattern. The smart
grid (SG) has emerged as a modern form of the power grid. It
has two-way communication between energy consumers and
producers and enables efficient energy management. It elimi-
nates the requirement of thermal power plants and conserves
electricity. It also reduces the electricity consumption cost by
making the electric grid sustainable.
The evolution of the power grid has revolutionized the
electricity market, where new players have been introduced
to control, generate and distribute the electricity in the
market. Renewable energy sources (RESs) based distributed
energy generation (DEG) has acquired popularity because
of its environment-friendly method of electricity generation.
Declining costs of wind turbines and solar panels allow the
growth of DEG in microgrids and smart homes. Moreover,
smaller and cheaper sensors, smart devices and new com-
munication protocols are paving the way for hlthe peer to
peer (P2P) communication between electricity generators
and consumers in a market. This market reduces the elec-
VOLUME 4, 2016 1
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
tricity consumption cost. The amount of electricity generated
by RESs is highly affected by environmental factors e.g.
speed of the wind and amount of sunshine a solar panel and
wind turbines receive in a particular period. This intermittent
nature of RESs makes them unreliable, so, the connection of
energy consumers with the main grid is mandatory.
With the emergence of modern technologies, the smart
energy market is moving from being centralized to decen-
tralized. In a centralized P2P energy market, scalability,
robustness, security and privacy issues are the major con-
cerns. Moreover, the energy exchange between two peers
is controlled by a central entity that keeps track of all the
transactions and is responsible for the implementation of the
market mechanism. Both energy consumers and prosumers
have to pay some cost to this central entity which results
in higher energy consumption cost for consumers and less
revenue for the prosumers. Besides this, the participants of
the local energy market still get more benefits as compared to
energy trading with SG. The P2P energy coalition empowers
the small scale energy prosumers and encourages them by in-
centivizing the local generation. For the successful operation
of P2P trading in the local market, improved and innovative
mechanisms for trading are required. These mechanisms
should be secure, smart and trustworthy.
The blockchain has emerged as a promising, user-friendly
and efficient technology for the implementation of secure and
reliable decentralized P2P energy trading market. It enables
transparent communication of the local energy marketâ ˘
A´
Zs
participants and allows them to make decisions about en-
ergy coalitions in a decentralized and trustless environment.
Recently, it has gained the attention of several researchers
and became the new hot topic in the smart grid domain. The
blockchain is used to keep the energy coalition record regard-
ing the amount of energy and its price while maintaining a
healthy environment for energy consumers and prosumers.
Dang et al. [4] have proposed an energy market mechanism
where blockchain is used to balance the load of energy
consumption. Load management is done on a day-ahead
basis. Zanghi et al. [5] proposed a conceptual framework
for a distributed remote metering system for the SG. This
study aims to provide a smart monitoring system of elec-
tricity load using metering information for a more reliable
smart power grid environment. Lin et al. [6] have used the
blockchain in the P2P energy trading market on a small scale.
Auction based trading is implemented with different bidding
strategies. Motivated from the existing work and integration
of blockchain technology in the smart grid, in this paper, a
consortium blockchain-based hybrid P2P electricity trading
system is developed. This paper is extension of [7].
The rest of the paper is organized as follows. Related work
is presented in SectionII. In Section III problem statement
is defined and Section IV summarizes the proposed solution
and contributions of our work. The Section V contains the
information about the system, its market participants and
smart contracts. Simulation results are illustrated in Section
VI. In the end, the paper is concluded in Section VII.
II. RELATED WORK
Christidis et al. [8] explored the use of blockchain in the inter-
net of things (IoT) sector. Several smart contracts and scripts
of blockchain are studied and their impact on this sector is
analyzed. In this study, it is observed that the blockchain
technology is contributing positively in service sharing and
resource allocation. It allows us to automate workflows by
implementing crypto-graphical authentication. While, before
the implementation of blockchain, one needs to take care of
certain considerations e.g. transactional privacy and digitized
assets for trading. It is concluded that the emergence of
blockchain with IoT is paving new ways for new and secure
decentralized environments for the new industrial models.
It is a powerful technology which is paving new ways for
distributed applications.
An expert system shell with blockchain is proposed in
work by Carreno et al. [9]. The expert system works using
a neural network as its inference engine. A user accesses this
system with the help of a terminal and server with an internet
connection. The whole system is implemented in the form
of a smart contract. When a user enters some query in the
system, it costs them. The cost depends on the complexity of
the query, more complex query costs more.
Ferreira et al. [10] proposed a system which enables to
build an open energy market for a community of users.
For energy flow accounting, an IoT based system is used.
Blockchain is used to eliminate the requirement of a central
control entity by keeping track of distributed energy transac-
tions. These two approaches are used to create an energy trad-
ing market where the market participants have pre-defined
goals. The proposed market approach increases the possible
befits of participants which encourages more participants to
take part in it. Electrical vehicles are also included in this
model in addition to the in house energy-generating partici-
pants. Besides, gamification is used to control the usersâ ˘
A´
Z
behavior in the energy market and achieving its goals.
Silvestre et al. [11] proposed a blockchain-based model
to handle the technical issues in a microgrid. In addition
to the economic aspects of the market, the proposed model
is used to make the technical decisions for the distributed
operations of the market. The main focus of this study is to
keep the record of transmission line losses of energy transac-
tions between different entities. It is stated that the inclusion
of such information has a great effect on the information
gathering in real-time and the possible role of prosumer
and distributors of energy in the market. In a microgrid, the
physical power flow varies from the virtual power flow and
it creates mismatch and results in poor power loss allocation.
In this paper, authors have included the generator as well as
real-time attribution of power losses of each transaction along
with the reactive power generation. This model provides a
more accurate view of these losses.
Kang et al. [12] proposed a blockchain based P2P elec-
tricity trading model for plug-in hybrid electric vehicles
(PHEV). Instead of the traditional way of importing elec-
tricity from a distant source, this model works on demand
2VOLUME 4, 2016
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
response and attracts the consumers to participate in it by
providing them incentives. Each participant takes part in this
system and balances the electricity demand with supply to
get the maximum incentives. To address the challenges of
security and privacy, consortium blockchain is used. The
electricity pricing structure is very important in such P2P
trading. In this paper, a double auction-based system is
implemented to set the price for a specific amount of elec-
tricity. The simulation results depict the effectiveness of the
proposed P2P market model.
Gao et al. [13] proposed a model that enables users to
monitor their energy usage and their respective cost. It is
stated that in a smart grid the meter reading is obtained
online, so, there is a high chance of data tempering from an
unauthorized user. Moreover, users are not aware of their en-
ergy consumption patterns and energy consumed by different
appliances. A blockchain based solution is proposed in this
paper to tackles these issues. The smart contract is developed
to execute the procedure successfully and in an efficient
manner. Besides, the privacy and security issues are tackled
by using sovereign blockchain which ensures transparency
and feasibility of the system.
A P2P electricity sharing system is proposed in [14]. It
consists of two layers: a multi-agent system layer and a
blockchain-based transactions management layer. Former is
used to model the usersâ ˘
A´
Z behavior and make decisions
about trading as well as take part in the coalition process for
efficient and cost-effective trading. The second layer is used
to keep track of all the transactions between consumers and
prosumers securely. The proposed system is validated using
simulations. For this purpose, the Java agent development
environment has been used.
A P2P energy trading system for microgrids is proposed in
[15]. It is stated that renewable energy generation sources are
of intermittent nature and coalition between multiple micro-
grids can solve this problem. A blockchain-based coalition
formation method is proposed which is distributed in nature
and robust as compared to the legacy centralized methods.
Multiple coalition algorithms are executed in parallel which
reduces the computational time and allows the microgrids to
trade energy more frequently. The distributed nature of the
system makes it scalable and algorithms converge quickly.
As energy is traded locally, so, transmission losses are also
reduced and usage of blockchain makes the network secure.
Simulations are carried out to depict the effectiveness of
the proposed system. It is evident from the results that the
proposed model successfully achieves the desired objectives.
In paper [16], blockchain is implemented in the chemical
industry for machine to machine energy exchange. In the
given scenario, two electricity producers trade electricity
with one consumer. Blockchain is used to record the transac-
tions between these producers and consumers. Both energy
producers send their available energy and price information
to the market and energy consumer compares both offers to
accept the most suitable offer. Flowsheet model is used to
provide realistic data to the market participants and proof-of-
work is used for the implementation of a given scenario on
the blockchain. It is concluded that the machine to machine
communication along with blockchain technology has great
potential and enhances the efficiency and reliability of the
system.
Jiani et al. [17] provided a review of the application of
energy internet and blockchain. In this paper, the possible
applications of the mentioned technologies are also provided.
Additionally, the compatibility of both technology, as well as
the possible challenges, are also discussed. It is concluded
that the use of blockchain with energy internet solves its
many problems e.g. issue of proper control and management
of distributed forms of energy. The objective of this paper
is to provide the researchers with the current status of these
technologies and promote their practical implementation.
An electric vehicle charging scheme is proposed in [18].
These schemes play a very important role in the reduc-
tion of operational costs and improve the stability of the
grid. The objective of this paper is to decrease the possible
power fluctuations caused by the huge penetration of electric
vehicles. A decentralized electric vehicle charging scheme
based on blockchain is developed. The problem formulation
section of this paper includes the possible power fluctuations,
electric vehicle charging rate, battery capacity and behavior.
The charging and discharging schedules are obtained by
using the ice-burg algorithm. Simulations results depict the
effectiveness of the proposed model.
Tianyang et al. [19] proposed an incentives based system
for electric vehicle charging. The huge penetration of RESs
has increased the intermittency of the power grid and electric
vehicles can play a very important role to maintain its sustain-
ability as their load is shiftable. A blockchain based real time
system has been proposed which uses the concept of priority
and SMERCOIN. The electrical vehicle users who follow the
charging schedules of the system are provided incentives in
the form of SMERCOINS. They can later exchange them
with real currency or buy priority to buy more energy. On
the other hand, the users who do not follow the rules face
penalties. To evaluate the performance of this system, it is
implemented in a real-world scenario for 15 months. Results
depict that this system works great and it also increases the
use of solar energy.
In paper [20], it is stated that the integration of RESs has
created several challenges in maintaining the sustainability
and reliability of the smart grid. One of the major challenges
is to keep energy demand and supply balanced. Esther et
al. proposed a P2P based local energy trading system. It is
stated that energy prosumers should be able to exchange the
surplus energy with their energy deficit neighbors. In this
way, they will increase their profit while keeping the energy
within their local market. In this paper, a microgrid energy
market mechanism is proposed which is based on blockchain
technology. Brooklyn microgrid project is used to evaluate
the effectiveness of the proposed system. The results depict
the satisfactory performance.
The IoT is expanding rapidly and it is playing a very
VOLUME 4, 2016 3
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
important role in smart homes also. With the use of this
technology, several devices are connected and exchanging
data daily. The connectivity of devices on this platform also
has some security and privacy risks which need to be ad-
dressed efficiently. Chao et al. [21] have proposed a solution
for this issue by integrating blockchain technology with IoT.
As the smart devices in the IoT environment are lightweight
and have less storage and computational capacity, this issue
has been solved by these researchers by using hypergraphs.
The proposed model reduces both, storage and security,
issues. Storage nodes are organized using hyperedge and the
resultant network is part of network storage. Moreover, the
security issues and uses cases related to the model are also
discussed in detailed. The efficiency of the proposed model
is proved with the help of simulations. The simulation results
depict the effectiveness of the proposed system.
In IoT, another big concern nowadays is access control.
Several traditional access control mechanisms are available
but they are not sufficient to maintain the security and privacy
of the information over IoT. Another challenge is the cen-
tralized authorization system where a central server has full
authority. This server could face a performance bottleneck
or single point of failure issues. To address these issues,
Ronghua et al. [22] proposed a blockchain based solution.
In this system, everything is decentralized and there is no
central controlling authority. Smart contracts are used for the
registration process and this mechanism is made more secure
by introducing identity-based capability token. The nodes
are of two types: one type of node has high computational
powers while the other one is computationally less powerful
i.e. Raspberry PI nodes, and both machines use proof of
concept protocol. Simulations are carried out to evaluate the
performance of the proposed model. Results depict that the
proposed system has significant potential while there is still
room for improvement for security issues.
From literature review, it is observed that blockchain tech-
nology has evolved as a promising solution for the issues
being faced by centralized local energy trading. With the help
of this technology, an efficient blockchain-based P2P energy
trading market can be developed for local users to efficiently
trade energy with each other and main grid. This P2P trading
will have positive impact on sustainability of main grid by
reducing the power generation overhead from it in on-peak
hours. Market participants will also get benefits in the form
of low electricity prices. In this regard, we propose a P2P
energy trading mechanism, which is elaborated in Section V.
III. PROBLEM STATEMENT
With the rapid increase in energy demand and distributed
energy generation, new demand-side management methods
are developed. In these methods, monetary penalties and
incentives are defined that encourage users to take part in the
proposed demand response programs. To manage energy de-
mand and generation, a blockchain-based demand response
program is proposed [23], [24]. The electricity usersâ ˘
A´
Z
follow this signal to get incentives and avoid penalties. How-
ever, their load is balanced through load curtailment which
is not efficient for their comfort. To overcome this limitation,
P2P energy trading is a promising solution. In a blockchain-
based P2P energy market, electricity prosumers use RESs to
generate energy locally. After the fulfillment of their energy
demand, surplus energy is traded with energy deficit users
in the market. Energy trading prices in the local P2P market
are low as compared to the energy purchasing prices from the
main grid [25]-[27]. However, in an open book energy trading
market [25], [27], the energy trading prices between peers
vary and some buyers pay more energy prices than others.
This results in imbalanced energy prices in the market. In
[26], a P2P energy trading mechanism is proposed, where
energy trading prices for all market participants are fixed.
However, this fixed price mechanism is not beneficial for
prosumers as energy prices are considered 70% less than the
electricity pricing tariff of the main grid. In addition, RESs
have intermittent nature so, all market participants are also
dependent on the main grid. The effect of local P2P trading
on the main grid should also be observed to maintain its
sustainability.
IV. PROPOSED SOLUTION AND CONTRIBUTIONS
In this paper, our objectives are to reduce electricity con-
sumption cost at consumersâ ˘
A´
Z level, minimize PAR at
grid level (to make it stable) and implement hybrid energy
trading markets using the blockchain. We propose a hybrid
P2P energy trading market mechanism where both P2P and
prosumer to grid (P2G) energy transactions are implemented.
In comparison to [24], [26], [27], it is a decentralized market,
based on double closed book auction. Here, surplus energy
can be sold and deficit energy can be purchased from neigh-
bor prosumers or utility grid unlike [24]. The P2P energy
tradingâ ˘
A´
Zs effects on the main grid are also studied and
rules are defined to maintain the stability of the main grid
which is the limitation of [23]. The energy trading price for
the P2P scenario is determined the same for all transactions
in a specific time interval which sets this work apart from
[24]â ˘
A¸S[27]. Moreover, in P2P trading, suitable prosumers
are selected based on their distance from consumers to reduce
the possible transmission losses. Smart contracts are devel-
oped accordingly to implement this market scenario.
The main contributions of this paper are as follows:
Monopoly of the main grid is eliminated by the de-
centralization of the electricity trading market using a
blockchain-based hybrid P2P energy trading model and
a new bidding mechanism is proposed.
Self-enforcing smart contracts are designed for efficient
energy transactions between peers and the main grid.
The proposed smart contracts control P2P and P2G
energy transactions and reduce its demand from the
main grid during on-peak hours.
Peak to average ratio (PAR) and the cost of electricity
are reduced which benefits both utility grid and energy
consumers, respectively.
4VOLUME 4, 2016
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
Information flow
Power\information
flow
Smart
home1
PV pannels
Smart
appliances
Smart
meter
home2
Smart
home4
home n
Physical layer
Application layer
Virtual layer
User Interface
DApps
Distributed
ledger
send\receive
requests
send\receive
requests
smart contract
Market mechanism
Price mechanism
Records of
transactions
read\write
request
input\output
FIGURE 1: Three layered architecture of blockchain
The energy exchange between peers is done based on
the physical distance between them which reduces the
possible line losses up to some extent.
V. SYSTEM MODEL
In our work, a three-layered architecture of the blockchain-
based energy trading market is proposed. Figure 1 shows
these layers along with their respective components. On the
physical layer, the physical structure of the energy trading
market is depicted. Multiple smart homes are connected with
the utility grid and they also have a direct connection with
each other for information as well as energy transfer. The
electricity is transferred between smart homes using the same
power lines that are used to transfer energy from the grid to
smart homes. Smart homes are equipped with energy storage
systems (ESSs), PV panels, smart appliances and a smart
meter. ESS sends its current status information, PV panels
send their current energy generation data and smart appli-
ances send information related to their energy consumption
to the smart meter. Smart meter processes this data to acquire
knowledge about the current energy state of the smart home.
A smart home can have one of the following three states:
surplus energy, deficit energy or equilibrium state. Its owner
can act as both an energy prosumer as well as an energy
consumer, depending on smart home’s current energy state.
The state information of a smart home is sent from smart
meter to the virtual layer to participate in trading.
On the virtual layer, the blockchain is implemented. All
users in the market are nodes of the blockchain and have a
copy of the distributed ledger. An energy prosumer places
the bid to sell energy in the energy trading market through a
smart contract. The smart contract contains all the rules and
market mechanisms of energy trading between two parties. If
all the rules are fulfilled then a transaction is made, otherwise,
the transaction is reversed and an error message is sent to
the respective party. On the confirmation of a transaction,
a new block is created and added to the chain of previous
blocks. The header of the current block contains the hash of
the previous block, in this way the whole chain of blocks
is maintained. This layer contains all the necessary APIs
which are required to communicate with a smart contract.
The third layer of this architecture is the application layer.
It consists of user interface and decentralized applications
(DApps) through which the user interacts with the smart con-
tract and enters its information and keeps track of important
data. A network participant interacts with the system using
application layer. It uses DApps to enters data related to its
energy consumption (either he needs energy or he wants to
sell it) and requests for a transaction. This information is
sent to the smart contracts that are present on the second
layer. User’s request is processed at this layer and if all the
conditions of energy trading are fulfilled (discussed in sub-
section V-F) then the transaction is approved. The actual
energy transmission then takes place at the physical layer.
A. MARKET PARTICIPANTS
For the implementation of a hybrid P2P energy trading
market, energy consumption data of two types of market
VOLUME 4, 2016 5
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
participants is considered. To demonstrate their energy con-
sumption pattern, two types of appliances are considered:
shiftable and non-shiftable (detail can be found in [27]).
The identities of market participants are not revealed. Each
participant on the network has a public and private key pair.
Public keys of participants are shared with other participants
on the network and mathematically a user cannot guess the
private key of another user, using his public key. A hash
function is used to generate unique addresses for participants
from their public keys. These unique addresses are used to
identify them while trading on the network. In this way, their
real identities are kept secret. So, malicious nodes cannot
access the sensitive data of legit participants of the network
and privacy is ensured. The market participants are catego-
rized based on their energy consumption patterns and their
ability to produce energy locally using RESs. The following
subsections contain information regarding these participants.
1) Electricity prosumers
These market participants can produce electricity locally
using PV panels or wind turbines. They are called electricity
prosumers as they can both sell and buy energy to and from
the main utility. The electricity prosumers also have storage
devices to store the electricity when they are producing more
energy than their demand on a specific time interval. In
the case of surplus energy, they sell the additional energy
to either neighbor electricity consumers or the main grid.
For the load pattern of energy consumption, a house with
multiple family members is considered.
2) Electricity consumers
These market participents do not produce energy locally nor
they have storage devices. They are further divided into two
groups to simulate their energy consumption pattern: one
group is of single consumers and the other is students. The
energy consumption pattern of both groups vary from each
other.
Singles
These consumers generate energy demand in the morning
and after five in the evening. As they go to the office or
their workplace in the day time, so, their energy consumption
during these intervals becomes zero.
Students
Students have different energy demand patterns than singles
as they leave for their institute late and have irregular patterns
of sleep and going out. Mostly, their energy consumption in
the initial hours of the morning is flat or very basic and their
energy demand increases at midnight.
B. LOAD CONSUMPTION
The load consumption of electricity consumers depends on
the number of appliances they are using on a specific time
interval, their length of operational time and power rating.
Each electrical appliance has a different power rating and
length of operational time. The following equations are used
to compute the power consumption of electricity consumers
on an interval basis and their total energy consumption in a
day.
Loadc(t) =
n
X
a=1
P owc(a)×St(a)(t)(1)
Loadpro(t)=(
n
X
a=1
P owpro(a)×S t(a)(t)) Genres(t)
(2)
St(a)(t) = (1if appliance is on
0otherwise (2a)
T Load(t) = Loadc(t) + Loadpro(t)(3)
T Load =
24
X
t=1
(Loadc(t) + Loadpro(t)) (4)
Equation 1 shows the energy consumption of electricity
consumers. Here, Loadc(t)represents the load consumed
by all operating appliances at a time interval twhich is
equal to the power rating of consumers’ appliances P owc(a)
multiplied by their status St(a)(t). Equation 2 represents the
energy consumption of electricity prosumers at a specific
time interval t. In this equation the load consumption at
a time interval is calculated after subtracting local energy
generation Genres(t)form it. In both equations the value
of St(a)(t)depends on the on/off status of appliances. In
Equation 3, load of both consumers Loadc(t)and prosumers
Loadpro(t)is added to get the total load at time interval t.
Equation 4 is used to compute the total load consumed in a
day.
C. COST OF ELECTRICITY
For electricity cost, electricity price is categorized into two
types: price issued by utility grid and price set in local
market. To calculate the final cost, we need to compute it
according to both prices. The cost of electricity purchased
from grid is computed according to the price issued by
grid and cost of electricity purchased from local market is
determined according to the market price.
Costc(t) = GP ow erc(t)×PG+P P owerc(t)×PM(5)
CostP r o(t) = GP owerP r o(t)×PG+P P owerP ro (t)×PM
(6)
GP owerc/P ro (t) = (0if P P owerc/P ro (t) = Loadc/P ro(t)
>1otherwise
(6a)
P P owerc/P ro (t) = (0if GP owerc/P ro (t) = Loadc/P ro(t)
>1otherwise
(6b)
6VOLUME 4, 2016
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
P rof itP ro(t)=(GSell(t) + PS ell(t)) ×PM(7)
DP rof itpro =
24
X
t=1
P rof itpro(t)(8)
DCostc=
24
X
t=1
Costc(t)(9)
DCostPro =
24
X
t=1
CostP r o(t)(10)
MCostc=
31
X
d=1
(DCostc(d)(11)
MCostP ro =
31
X
d=1
(DCostPro (d)DP rof itP ro (d)) (12)
In Equation 5, GP owerP ro (t)is the amount of power pur-
chased from the grid and it is being multiplied by PGwhich
is the price of electricity issued by the utility. PP ow erc(t)
is the amount of power purchased from peers in the local
energy market and it is multiplied by cost set in local market
PM. Both costs are added to get the total cost Costc(t)of
electricity consumption on a specific time interval tfor con-
sumers. Equation 6 shows the electricity cost computation
for prosumers, both equations have the same parameters. In
both equations, GP owerc/P ro (t)would be equal to zero if
all demand is fulfilled by the local energy market. Simi-
larly, if the demand is only fulfilled by the main grid then
P P owerc/P ro (t)will be zero. For electricity prosumers, as
they sell surplus energy to other peers and utility, so, they
also get some profit from it and Equation 7 computes their
profit. Where, GSell(t)represents the amount of energy sold
to main grid and P Sel l(t)is the amount of energy sold in
local market, both are added up and final amount is multiplied
by electricity trading price in local market PMto get the
final profit P rof itP ro(t)at time interval t. Equation 8 shows
the profit of prosumers for one day. The Equations 9 and
10 are used to compute the per-day cost of both electricity
consumers and prosumers, respectively. The next Equation
11 is used to compute the monthly cost of electricity for
the consumer. In Equation 12, DP rof itP ro(d)is the daily
profit of selling surplus energy and it is being subtracted from
DCostP ro (d)which is the daily energy consumption cost of
energy purchased from peers and utility grid to give the final
monthly cost MCostP ro for prosumers.
D. PAR OF ELECTRICITY MARKET
PAR is an important factor in energy trading. It affects the
efficiency and reliability of the main grid. Following Equa-
tion 13 is used to compute the PAR of a hybrid P2P energy
trading market.
P AR =P24
t=1 T Load(t)
max(T Load)(13)
E. PRICING MECHANISM FOR LOCAL TRADING
The price of electricity trading is set between the upper and
lower limit of electricity prices issued by the utility grid. The
reason is that no prosumer wants to sell the electricity at a
lower price than this limit and no prosumer will be willing
to purchase electricity from its peers more expensive than the
main grid. Instead, it will prefer to purchase it from the main
grid. So, the electricity trading price is always set between
this limit. At market bidding time, all the prosumers place
their bid containing the amount of available surplus energy
and its cost.
P rices ={P ricep1, P ricep2, P r icep3, ..., P ricepn}(14)
PM=min(P rices)(15)
Equation 14 represents the price of electricity bids placed
by prosumers to sell their local electricity. P ricep1is the
price offered by the first prosumer and there are nnumbers
of prosumers, so, the last bid is represented as P ricepn.
After bids placement, the final price of electricity is selected.
Equation 15 shows that the minimum price offered from a set
of prosumers is selected as the electricity trading price in the
market.
F. BLOCKCHAIN SMART CONTRACTS
Blockchain was introduced as an enabling technology of
bit-coins (electronic currency) by Satoshi Nakamoto [28].
It was then later used in the field of smart grid in 2014
[29] and ever since it has grabbed the attention of several
researchers. It is a widely accepted technology but still lacks
a standard definition. It is a technical solution for a reliable
decentralized database that is transparently open and secured
[30].
Each block in the blockchain has two parts called header
and body. The former stores the hash value (address) of the
previous block and later contains the data. This data contains
the information and records of transactions. Each block can
store multiple transactions. The hashed value of the current
block is generated by using the hash value of the previous
block, information of the current block and a random number.
The integrity of the blockchain is ensured by connecting all
the blocks in a sequential manner. In a smart grid application
scenario, each block of data records the information related
to the transactions. A transaction can store data related to the
sender and receiver of energy, amount of energy, price, time
of the transaction, the current balance of both participants
and their status. After a block is created, it is broadcasted
over the network in real-time. After confirmation, the new
block is added to the chain. The consensus algorithms are
used to mine the key of this block which enables each node
on the network to add it to its chain. The miner node which
guesses the key first is awarded with reward. In this way, the
blocks on the blockchain become non-repudiation and hard
to temper as if some intruder tries to temper the information
of a block then it has to alter all the preceding blocks of 51%
VOLUME 4, 2016 7
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
of the network nodes. So, it becomes computationally very
expensive and not beneficial.
A smart contract in an essential component of blockchain
which contains all the necessary rules for a successful trans-
action. It can also be considered as a finite state machine
where predefined rules and instructions are executed when-
ever a specific event occurs. It checks the predefined condi-
tions before committing a transaction. In a smart grid energy
market, the smart contract controls the energy transactions
between two parties by following predefined rules. The rules
in a smart contract cannot be altered once it is deployed on
the network. It ensures a transparent energy trading market
for all participants. Moreover, market participants trust these
contracts for their energy and payments which eliminates the
requirement of central parties to control these trading activ-
ities. In this paper, we have developed three smart contracts
for efficient P2P and P2G energy trading in a smart energy
market. Details of these contracts are given in the following
subsections.
1) Main smart contract
A main smart contract is developed to control all the oper-
ations of energy trading in the local energy market. Market
participants interact directly with this smart contract. It first
checks the validity of the user and allows the registered users
to participate in the local trading. Algorithm 1 shows the
basic steps of the main contract. When a market participant
sends an energy surplus or deficit request, it checks the
status of both P2P and P2G smart contracts. It checks the
validity of the user if it is registered in the market or not.
If a participant is registered then it proceeds to the next
step, else it first registers the market participant and adds
the necessary information in the system. When an electricity
prosumer sends the power surplus request, main contracts
calls the seller function of the P2P smart contract and in case
of the buyer, it calls buyer function.
As the energy market is a closed auctioned market, so,
it checks the time and on reaching the marking clearance
it calls the clearM arket function of the P2P smart con-
tract. In this way, all the bids from electricity sellers are
matched with buyers and results are sent back to the main
contract. Now, it checks whether some buyers are still left
with deficit power or sellers with surplus energy. In both
cases, the additional power is bought and sold to the main
grid by calling buyEnergy and sellEnergy functions of
the P2G smart contract, respectively. Lines 25 to 35 contain
three functions. The first function is trading_result() which
stores the results and allows the electricity consumers and
prosumers to exchange energy. The second function returns
users’ information when called and the last function returns
the monthly billing report when called by the P2G smart
contract of a legal participant.
2) P2P smart contract
Algorithm 2 depicts the P2P smart contract. It is responsible
for the whole trading mechanism of the local energy market.
Algorithm 1 Main smart contract
1: Input request, requester
2: Check status of P2P and P2G contracts
3: Check market time
4: if requester == registered
5: Store input values
6: else
7: Register requester
8: Store input values
9: end if
10: if requester == seller
11: P2P.seller()
12: else if requester == buyer
13: P2P.buyer()
14: end if
15: Check market time
16: if time == finished
17: P2P.clearMarket()
18: if deficit energy
19: P2G.buyEnergy()
20: else if surplus energy
21: P2G.sellEnergy()
22: end if
23: trading_result()
24: end if
25: function trading_result(){
26: Start energy transaction
27: Store results
28: }
29: function billing(){
30: Return user’s information
31: }
32: function monthelyBilling(){
33: Calculate the bill
34: Return billing formation of one month
35: }
Market participants cannot invoke it directly. They access
it through the main smart contract. A P2P smart contract
receives the necessary inputs from the main contract and
information related to energy consumers and prosumers. The
seller function of this smart contract stores the sellers’
related data that is used afterward. It also checks the proposed
selling price of electricity by seller and compares it with
already proposed lowest electricity selling price. In the case
of the lowest price, it is set as the current electricity trading
price for the market unless another seller proposes a lower
price. In the case of the higher energy selling price, the new
price is discarded and the old price is kept as electricity
trading price of local market.
When the bidding time ends, the main contract calls the
clearM arket function (Lines 11-37). This function checks
the tag of each buyer and seller and trades energy according
to the minimum distance between electricity consumers and
prosumers to reduce the power losses and make trading more
8VOLUME 4, 2016
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
Algorithm 2 P2P smart contract
1: Input request, requester, sllers, buyers
2: function seller() {
3: if sellerPrice<MPrice
4: MPrice = sellerPrice
5: end if
6: Store seller in sellers
7: }
8: function buyer() {
9: Store buyer in buyers
10: }
11: function clearMarket() {
12: for i = 1:buyers.length
13: for j = 1:sellers.length
14: if (buyers[i].tag == sellers[j].tag)
15: matchBid(j,i)
16: end if
17: end for
18: end for
19: if sellers.length>0 && buyers.length>0
20: for i = 1:buyers.length
21: for j = 1:sellers.length
22: if (buyers[i].tag+1 == sellers[j].tag+1)
23: matchBid(j,i)
24: end if
25: end for
26: end for
27: end if
28: if sellers.length>0 && buyers.length>0
29: for i = 1:buyers.length
30: for j = 1:sellers.length
31: if (buyers[i].tag+2 == sellers[j].tag+2)
32: matchBid(j,i)
33: end if
34: end for
35: end for
36: end if
37: }
38: function matchBid(){
39: if sellers.length == 0 || buyers.length == 0
40: break
41: end if
42: if (sellers[j].amount - buyers[i].amount) >=0
43: remainder = sellers[j].amount - buyers[i].amount
44: calcAmount = sellers[j].amount - remainder
45: buyEnergy(calcAmount, buyers[j],sellers[i])
46: seller[j].amount = remainder
47: if remainder==0
48: removeSeller(j)
49: end if
50: removeBuyer(i)
51: else
52: remainder = buyers[i].amount - sellers[j].amount
53: calcAmount = buyers[i].amount - remainder
54: buyEnergy(calcAmount, buyers[j],sellers[i])
55: buyers[j].amount = remainder
56: if remainder==0
57: removeBuyer(i)
58: end if
59: removeSeller(j)
60: end if
61: }
62: function buyEnergy() {
63: Store transaction information
64: Main.trading_result(buyer,seller,MPrice)
65: }
66: function removeBuyer() {
67: Remove buyer from buyers
68: }
69: function removeSeller() {
70: Remove seller from sellers
71: }
72: function getBuyerCount() {
73: Return number of buyers
74: }
75: function getSellerCount() {
76: Return number of sellers
77: }
78: function getBuyerInfo() {
79: Return information of all buyers
80: }
81: function getSellerInfo() {
82: Return information of all sellers
83: }
efficient. The market is divided into three areas and each
participant is assigned a tag according to its area. Trading
between the participants of the same area is preferred. When
trading between the same area is not possible then trading
between adjacent areas is preferred. In this way, the whole
market is cleared and results are sent back to the main
smart contract. When tags of two participants match then
matchBid function is called to process requests. If the seller
has more surplus energy than its matched buyer then the
buyer is assigned energy and it is removed from buyers array
and the status of the seller is updated by remaining surplus
energy. In contrast, if a seller has less energy than the buyer’s
need then the seller is eliminated from sellers after giving
its energy and the power deficit status of the buyer is updated
with its current deficit power value. The buyEnergy function
is called and the value of the current amount of energy
exchange along with buyer and seller information is passed.
The buyEnergy function stores this information and
passes the buyer’s and seller’s information to the main smart
contract with the market price of electricity. The next two
functions (lines 66-71) are used to remove the buyers and
sellers from the market as their role in the market ends. The
getBuyerC ount and getSellerC ount functions are used to
check the number of participants in the market and the main
smart contract uses these functions to check the status of the
VOLUME 4, 2016 9
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
market. The last two functions (lines 78-83) are used to get
the information of all buyers and all sellers at once.
3) P2G smart contract
In this work, the main focus is to implement an efficient and
reliable local energy market where RESs are used to generate
energy locally and surplus energy of prosumers is traded with
neighbors. However, the RESs are of intermittent nature and
their performance depends on the weather conditions. So, the
connection with the main grid cannot be disconnected. In-spit
of having RESs, the prosumers also need connection with the
main grid. Algorithm 3 shows the smart contract designed
for P2G energy trading. Market participants buy energy from
the main grid when they are power deficit and prosumers sell
back the surplus energy after fulfilling their energy demand
and selling it to the power deficit neighbors. Market par-
ticipants request the main contract for energy. After market
clearance, if consumers still need energy then the main smart
contract sends a request to buyenergy function of the P2G
smart contract. Here, the price of electricity for the current
hour is determined and conditions are checked. In the case
of off-peak hours, the electricity is sold with a five percent
discount than the original prices. The price of electricity is
increased by 20 percent in case of on-peak hours.
On clearing the market if the prosumers have surplus
energy then it is sold back to the main grid using the main
smart contract. sellEnergy function is called and amount of
power and market price, at which energy is being sold back
to the main grid, is passed and information is stored. The
billing function is used to get the billing information of the
consumers and prosumers. The last function of the algorithm
is used to get the monthly information from the main contract
at the end of each contract.
G. INTERACTION BETWEEN MARKET PARTICIPANTS
AND SMART CONTRACTS
In this section, the transactions and interactions between
market participants and smart contracts are explained. Figure
2 is the graphical illustration of these interactions.
1) A customer sends the request to the main smart con-
tract. This request can be sent through a smart meter
or a separate communication device. If a customer has
surplus energy, it sends sell request and in the case of
energy deficit, it sends buy request to the main smart
contract, respectively. In this request, the customer also
sends its identity, amount of power to sell or buy and
the price at which it wants to sell electricity.
2) When a main smart contract receives the buy/sell re-
quest, it processes it and checks the validity of the
customer. It makes sure that the requester is a valid
market participant and it is in the state of buying and
selling energy.
3) After verifying the validity of the request, the main
smart contract checks the status of the P2P smart
contract. In this step, it checks whether market time
has expired or it still has some time left. Moreover, the
Algorithm 3 P2G smart contract
1: Intialize all necessary parameters
2: function buyenergy() {
3: CPrice = price at current hour
4: Check peak hour
5: if peak hour == true
6: CPrice = CPrice + (CPrice*0.8)
7: else if off-peak hour == true
8: CPrice = CPrice*0.05
9: end if
10: }
11: function sellEnergy() {
12: CPrice =MPrice
13: Store information
14: }
15: function billing() {
16: main.consumerInfo(address of consumer)
17: Store information
18: }
19: function monthlyBill() {
20: main.monthlyBill(address of consumer)
21: }
number of available consumers and prosumers is also
checked. P2P contract responds to these requests by
sending the acknowledge signal or required data back
to the main smart contract.
4) In the active energy trading market, the main smart
contract forwards the request of energy buy/sell to the
P2P smart contract. This request contains the informa-
tion related to the buyer/seller and the amount of power
they need to buy/sell.
5) At market clearance time, P2P smart contract processes
all the energy buy/sell requests and suitable matches of
peers are made to exchange energy efficiently. These
pairs are made based on the distance between two
peers. It is preferred to make all the pairs in such a
way that all peers have a minimum distance between
them. This approach reduces the possible power losses.
After successful pairing, the smart contract sends its
information back to the main smart contract.
6) The amount of available energy to sell cannot always
be equal to the demanded energy in the local market.
Sometimes demand increases as compared to the lo-
cally generated energy and HLat other times it becomes
lower. In both cases, energy can be sold or bought from
the main grid. So, P2P smart contract informs the main
smart contract about the current status.
7) Main smart contract sends the electricity buy/sell re-
quest to the P2G smart contract. It also sends the price
of electricity at which it wants to sell energy. P2G smart
contract receives the request and acknowledges it. In
the case of selling energy, it sends back its current price
of selling energy. It also sends a signal which indicates
its agreement on buying or selling the required amount
10 VOLUME 4, 2016
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
Request
(buy/sell)
Processing
Check status
Responds
Responds
Responds
Responds
Responds
Responds
Buy/sell
request
Payment
request
Payment
request
Monthly energy
usage data
Send
information
Billing
information
Processing
Processing
Seller/Buyer
FIGURE 2: Interactions between smart contracts
of electricity.
8) The main smart contract sends the payment request to
the customers. This payment request includes the bill
of electricity bought from the local market which is
cleared daily. It can also be cleared at the end of each
month as there is no restriction on it.
9) Customers respond to the main smart contract’s re-
quest and pays their bills. These bill transactions are
made in the form of e-money. The main smart contract
maintains the e-wallet for each market participant. The
prosumers may instead of paying bills, get money for
the energy they have sold to peers and the main grid.
10) P2G smart contract sends a request to the main smart
contract to get the detailed energy transaction informa-
tion of each customer. In its response, the main smart
contract sends it the history of the whole month.
11) Upon receiving the information of the whole month,
P2G smart contract computes the monthly bill of each
customer and sends the request for payments.
12) This monthly bill payment request, received by the
main smart contract from P2G smart contract, is for-
warded to each related customer. A request is made
VOLUME 4, 2016 11
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
0 5 10 15 20
Intervals
0
2
4
6
8
10
12
Power consumption (kWh)
Single
Family
Student
Total
FIGURE 3: Load consumption pattern of users
to pay the monthly electricity bill. The customers in
response, pay the bill and continue participating in the
local energy trading market as well as with utility grid
through smart contracts.
VI. SIMULATION RESULTS
In this section, a local energy trading system is simulated. For
development of smart contracts, solidity language is used,
which is a special language for smart contracts. Ethereum
is used as a platform with Ganache. Following are the
constraints of this system which must be followed during
electricity trading:
Only registered consumers can participate in trading.
One consumer can place only one bid on a specific time
interval.
A prosumer can either buy or sell energy at a time.
Price of electricity in the local market must reside
between the lowest price set by utility grid and highest
price.
Energy trading price in the local market will always be
lower than the price offered by the utility.
This system is also connected with the main grid and gets
power from it when needed. As described in the previous
section, three types of energy consumers are considered.
The student and single energy consumers do not produce
their energy and third consumersâ ˘
A´
Z type is family and they
act as energy prosumers in the market. Both students and
single consumers either buy energy from the local market
or the main grid. Energy prosumers have PV panels and
ESSs for local energy generation and storage, respectively.
The energy transactions are made using a blockchain-based
hybrid P2P energy trading mechanism suggested in this
paper. The outcome of simulation will prove the economic
benefit of this hybrid energy trading mechanism over the
traditional P2G energy trading mechanism. Moreover, the
positive effect of this system on the utility grid will also
be depicted by increasing the stability of the main grid by
clipping the peaks and reducing the PAR. Before simulation
results, characteristics of smart homes, PV panels and ESS
0 5 10 15 20
Intervals
0
2
4
6
8
10
12
Load generation(kWh)
RES
FIGURE 4: Power generation pattern of PV panels
should be clarified.
The PV panels considered in this system have 54 cells
of 1480X1000 mm height and width. Each cell can collect
250 Wh of maximum energy. 48 PV panels are assembled
to make a solar panel for a smart home that can collect
a maximum of 12 kWh of energy on a full bright sunny
day. The installation price of this solar panel is estimated at
around 9,370.16 e(each panel is of worth 195.21 e). An
ESS costs 2928.93 eand can save energy up to 6.4 kWh.
Two ESSs are installed in a smart home for energy storage
up to 12.8 kWh and their installation cost is 5857.86 e.
To validate the proposed blockchain-based P2P and P2G
electricity trading market mechanism, a total of 1000 users
are considered, 600 of which are electricity prosumers and
rest are only consumers. Figure 3 illustrates the power
consumption pattern of all three power-consuming groups
separately on individual basis [27]. The blue line represents
the load profile of a single electricity consumer with a peak of
3.9 kW. The orange line represents the energy consumption
pattern of the family with a maximum peak of 5.4 kW, this
peak is formed on the 19th hour. The energy consumption
pattern of a student is represented by the yellow line. It
12 VOLUME 4, 2016
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
0 5 10 15 20
Intervals
20
22
24
26
28
30
Grid price
FIGURE 5: Electricity price signal
forms a peak at 23rd hour and power consumption on this
hour is equal to 2.9 kW. The dotted line represents the total
energy demand of these three consumers. The peak load
is 10.53 kW in the 19th hour. This load consumption data
is used to generate the electricity load of 1000 users. The
load is randomly generated following these load patterns of
electricity consumers and total load pattern.
Figure 4 represents the energy generation curve of PV
panels [31]. This data is for one PV panel installed in a smart
home. It can be observed from the figure that the maximum
energy collection is close to 12 kW. A total of 24 intervals are
considered. Each interval is of 1 hour. The maximum energy
collection period is from the 13th hour to the 17th hour.
During this interval, the energy collection varies between 9-
11.7 kW. The electricity price signal is illustrated in Figure
5. It is a real-time pricing signal and it can be observed
that initially the electricity price is low and as the energy
consumption increases the price of electricity also increases.
According to Figure 3, the peak hour is in the 19th hour.
Similarly, in Figure 5, the electricity price increases in the
following next two hours. Electricity supplied by main grid
during these intervals is expensive for the consumers and
compels them to decrease the usage of power during these
intervals.
In our proposed blockchain-based P2P and P2G electricity
trading mechanism, P2P energy trading plays a vital role
during these peak hours. As discussed in the previous section,
the electricity prosumers produce electricity locally, so, they
use this energy first and if required they buy energy from
the main grid. Moreover, in the case of surplus energy,
where these prosumers are generating more energy than
their requirement, they will sell this energy to their peers
on comparatively less cost than the main grid. If they still
have surplus energy then this energy will be sold back to the
main grid. Figure 6, depicts the effect of hybrid P2P energy
trading on the overall energy demand curve from the main
grid. The values of load consumption patterns are computed
using Equations 1 to 4. The red line represents the energy
demand from the main grid by consumers when P2P trading
is integrated. The dotted line shows the electricity demand of
consumers in the conventional scenario. Initially, it is night
time and no renewable energy is being produced. So, the
energy consumption patterns of both hybrid P2P and P2G
are similar. After the 11th interval, the pattern of both curves
starts changing. In the case of a hybrid P2P scenario, no
power is being purchased from the main grid and power
demand of the local market is being fulfilled by local energy
trading between neighbors. As the energy generation from
PV panels increases, the surplus energy can also be sold back
to the grid and ESSs can be charged as well. After the 16th
hour, as the energy demand increases rapidly, the additional
energy demand is fulfilled by purchasing energy from the
main grid. In the next intervals, the electricity demand is
fulfilled by both P2P and P2G trading. After 22nd interval the
energy consumption pattern of both curves becomes similar.
Figure 6, depicts that the peak of electricity demand from
the main grid has also reduced. Peak reduction contributes
to the more stable main grid and prevents the possibilities of
blackouts. The electricity demand peak in the conventional
scenario is equal to 10.53 MW and after peak reduction,
it becomes 4.6 MW. Moreover, PAR has also decreased as
illustrated in Figure 7, it is computed using Equation 13. It is
depicted in this figure that without P2P trading the PAR was
up to 3.8607 which has been reduced down to 3.6304. Owing
to these results, it is clear that the proposed electricity trading
model is beneficial for the main grid as it clips the peak and
reduces the PAR. On the other hand, it is also beneficial for
the consumers.
In the traditional energy optimization methods, the cost
of energy consumption is reduced by either shutting down
the electrical appliances or shifting the load from on-peak
hours to off-peak hours. In both cases, the users’ comfort is
compromised. Low electricity bills are obtained on the cost of
the inconvenience of appliances’ operation. Contrary to this,
in our proposed model the cost of electricity for consumers
is reduced without compromising their comfort. As we have
already discussed in the previous section about the pricing
mechanism in a hybrid P2P trading system, the price of
electricity bought from prosumers instead of the main grid
would always be less. All the electricity prosumers with
surplus energy place the bid of their energy selling price in
the smart contract. The bidders choose the electricity selling
price between the lowest and highest price limits set by main
grid. In the end, the market clearance price for electricity is
chosen which is the lowest among all the placed bids. The
smart contract sets this price as the final electricity trading
price and each prosumer sells its surplus power to consumers
on this rate.
The low electricity purchasing price motivates the buyers
to buy electricity from local prosumers instead of the main
grid. Figure 8 illustrates the comparison of the energy con-
sumption prices of both the main grid and local prosumers.
The blue line represents the real-time pricing signal from
the main grid and the red line represents the local energy
trading price. The local energy trading price is much lower
VOLUME 4, 2016 13
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
0 5 10 15 20
Intervals
0
2000
4000
6000
8000
10000
12000
Power consumption (kWh)
Without P2P trading
With P2P trading
FIGURE 6: Load consumption pattern from the main grid after coalition
Without P2P trading P2P trading
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
4
PAR
FIGURE 7: Comparison of PAR for both scenarios
0 5 10 15 20
Intervals
20
22
24
26
28
30
Grid price
Local energy price
FIGURE 8: Comparison of electricity pricing signal for both
scenarios
as multiple prosumers announce their price within the price
limit set by the main grid and every time smart contract picks
the lowest price. In Figure 9, the comparison of electricity
consumption cost in both scenarios is presented. Equation 12
is used to compute the energy consumption cost for all users.
In case of singles and students, the profit is zero as they do
not have local generation. Whereas, prosumers have profit
because of their local energy generation. In case of single
consumers, the cost in conventional grid scenario is equal to
459.1710 eand in case of hybrid P2P it has reduced down
to 394.8177 e. For students, the initial cost was 491.2680
eand it is reduced to 444.1003 e. Lastly, the prosumers
(family) group was paying 700 eand now their cost has been
reduced down to 190.2050 e. The highest cost reduction is of
prosumers as they are not only producing electricity locally
but also selling it in the market and making profit.
From the simulation results, it is evident that the cost-
saving of prosumers is up-to 510 eper month. The total
installation cost of RESs and ESSs is approximately 15,277
e. So, prosumers can get back their invested money in two
and a half years and they can earn profit from next years.
VII. CONCLUSION
In this paper, it is demonstrated that the integration of
blockchain technology in the hybrid P2P electricity market
has a positive influence. A truly distributed and P2P system
is developed and a trustless environment is created between
market members while eliminating a central controlling en-
tity. The consortium blockchain is used to design a hybrid
P2P energy trading market where electricity consumers and
prosumers trade electricity with one another and the main
grid. Three smart contracts are designed to implement this
local energy market. The main smart contract is responsible
for the registration of the members and storage of necessary
data related to all transactions. The P2P smart contract is
responsible to manage the local trading of the market and the
P2G smart contract manages the prosumers to grid electricity
transactions. To reduce the transmission losses, energy trad-
ing between nearest neighbors is preferred. The simulations
are carried out to check the performance of the proposed
14 VOLUME 4, 2016
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
Single Single P2P Family Family P2P Student Student P2P
0
100
200
300
400
500
600
700
FIGURE 9: Comparison of cost for both scenarios
system. The results depict that our objectives, cost and PAR
reduction, are successfully achieved.
REFERENCES
[1] Xie, Junfeng, Helen Tang, Tao Huang, F. Richard Yu, Renchao Xie, Jiang
Liu, and Yunjie Liu. “A Survey of Blockchain Technology Applied to
Smart Cities: Research Issues and Challenges.â ˘
A˙
I IEEE Communications
Surveys & Tutorials (2019).
[2] Li, Yinan, Wentao Yang, Ping He, Chang Chen, and Xiaonan Wang.
“Design and management of a distributed hybrid energy system through
smart contract and blockchain.â ˘
A˙
I Applied Energy 248 (2019): 390-405.
[3] Ahl, Amanda, Masaru Yarime, Kenji Tanaka, and Daishi Sagawa. “Review
of blockchain-based distributed energy: Implications for institutional de-
velopment.â ˘
A˙
I Renewable and Sustainable Energy Reviews 107 (2019):
200-211.
[4] Dang, Can, Jiangfeng Zhang, Chung-Ping Kwong, and Li Li. “Demand
Side Load Management for Big Industrial Energy Users under Blockchain-
Based Peer-to-Peer Electricity Market.â ˘
A˙
I IEEE Transactions on Smart
Grid (2019).
[5] Zanghi, Eric, Milton Brown Do Coutto Filho, and Julio Cesar Stacchini
de Souza. “Conceptual framework for blockchain-based metering sys-
tems.â ˘
A˙
I Multiagent and Grid Systems 15, no. 1 (2019): 77-97.
[6] Lin, Jason. “Analysis of Blockchain-based Smart Contracts for Peer-to-
Peer Solar Electricity Transactive Markets.â˘
A˙
I PhD diss., Virginia Tech,
2019.
[7] Rabiya, Khalid, and Nadeem Javaid. â ˘
AIJA blockchain-based decentral-
ized energy management in a P2P trading system.â ˘
A˙
I IEEE ICCâ ˘
A´
Z20 -
NGNI Symposium, (submitted).
[8] Christidis, Konstantinos, and Michael Devetsikiotis. “Blockchains and
smart contracts for the internet of things.â ˘
A˙
I Ieee Access 4 (2016): 2292-
2303.
[9] Acevedo, Marco Antonio, Wen Yu, and Marà a Elena Acevedo. “An IoT
Expert System Shell in Block-Chain Technology with ELM as Inference
Engine.â ˘
A˙
I International Journal of Information Technology & Decision
Making 17 (2018).
[10] Ferreira, Joao, and Ana Martins. “Building a Community of Users for
Open Market Energy.â˘
A˙
I Energies 11, no. 9 (2018): 2330.
[11] Di Silvestre, Maria Luisa, Pierluigi Gallo, Mariano Giuseppe Ippolito,
Eleonora Riva Sanseverino, and Gaetano Zizzo. “A Technical Approach to
the Energy Blockchain in Microgrids.â ˘
A˙
I IEEE Transactions on Industrial
Informatics 14, no. 11 (2018): 4792-4803.
[12] Kang, Jiawen, Rong Yu, Xumin Huang, Sabita Maharjan, Yan Zhang, and
Ekram Hossain. “Enabling localized peer-to-peer electricity trading among
plug-in hybrid electric vehicles using consortium blockchains.â ˘
A˙
I IEEE
Transactions on Industrial Informatics 13, no. 6 (2017): 3154-3164.
[13] Gao, Jianbin, Kwame Omono Asamoah, Emmanuel Boateng Sifah, Abla
Smahi, Qi Xia, Hu Xia, Xiaosong Zhang, and Guishan Dong. “Gridmoni-
toring: Secured sovereign blockchain based monitoring on smart grid.â ˘
A˙
I
IEEE Access 6 (2018): 9917-9925.
[14] Gao, Jianbin, Kwame Omono Asamoah, Emmanuel Boateng Sifah, Abla
Smahi, Qi Xia, Hu Xia, Xiaosong Zhang, and Guishan Dong. “Gridmoni-
toring: Secured sovereign blockchain based monitoring on smart grid.â ˘
A˙
I
IEEE Access 6 (2018): 9917-9925.
[15] Thakur, Subhasis, and John G. Breslin. “Peer to peer energy trade
among microgrids using Blockchain based distributed coalition formation
method.â ˘
A˙
I Technology and Economics of Smart Grids and Sustainable
Energy 3, no. 1 (2018): 5.
[16] Sikorski, Janusz J., Joy Haughton, and Markus Kraft. “Blockchain technol-
ogy in the chemical industry: Machine-to-machine electricity market.â ˘
A˙
I
Applied Energy 195 (2017): 234-246.
[17] Wu, Jiani, and Nguyen Tran. “Application of blockchain technology in
sustainable energy systems: an overview ˘
A˙
I Sustainability 10, no. 9
(2018): 3067.
[18] Liu, Chao, Kok Keong Chai, Xiaoshuai Zhang, Eng Tseng Lau, and Yue
Chen. “Adaptive blockchain-based electric vehicle participation scheme in
smart grid platform.â ˘
A˙
I IEEE Access 6 (2018): 25657-25665.
[19] Zhang, Tianyang, Himanshu Pota, Chi-Cheng Chu, and Rajit Gadh. “Real-
time renewable energy incentive system for electric vehicles using priori-
tization and cryptocurrency.â˘
A˙
I Applied energy 226 (2018): 582-594.
[20] Panarello, Alfonso, Nachiket Tapas, Giovanni Merlino, Francesco Longo,
and Antonio Puliafito. “Blockchain and IoT integration: A systematic
survey.â ˘
A˙
I Sensors 18, no. 8 (2018): 2575.
[21] Qu, Chao, Ming Tao, and Ruifen Yuan. “A hypergraph-based blockchain
model and application in Internet of Things-enabled smart homes.â ˘
A˙
I
Sensors 18, no. 9 (2018): 2784.
[22] Xu, Ronghua, Yu Chen, Erik Blasch, and Genshe Chen. “Blendcac:
A smart contract enabled decentralized capability-based access control
mechanism for the iot.â ˘
A˙
I Computers 7, no. 3 (2018): 39.
[23] Mengelkamp, Esther, Benedikt Notheisen, Carolin Beer, David Dauer, and
Christof Weinhardt. “A blockchain-based smart grid: towards sustainable
local energy markets.â ˘
A˙
I Computer Science-Research and Development
33, no. 1-2 (2018): 207-214.
[24] Pop, Claudia, Tudor Cioara, Marcel Antal, Ionut Anghel, Ioan Salomie,
and Massimo Bertoncini. “Blockchain based decentralized management
of demand response programs in smart energy grids.â ˘
A˙
I Sensors 18, no. 1
(2018): 162.
[25] Inayat, Kashif, and Seong Oun Hwang. “Load balancing in decentralized
smart grid trade system using blockchain.â ˘
A˙
I Journal of Intelligent&
Fuzzy Systems Preprint (2018): 1-11
[26] Park, Lee, Sanghoon Lee, and Hangbae Chang. “A sustainable
home energy prosumer-chain methodology with energy tags over the
blockchain.â ˘
A˙
I Sustainability 10, no. 3 (2018): 658.
[27] Noor, Sana, Wentao Yang, Miao Guo, Koen H. van Dam, and Xiaonan
Wang. “Energy Demand Side Management within micro-grid networks
enhanced by blockchain.â ˘
A˙
I Applied energy 228 (2018): 1385-1398.
[28] Nakamoto, Satoshi. “Bitcoin: A peer-to-peer electronic cash system.â ˘
A˙
I
(2008).
[29] Mihaylov, Mihail, Sergio Jurado,Narcàs Avellana, Kristof Van Moffaert,
Ildefons Magrans de Abril, and Ann NowÃl’. “NRGcoin: Virtual currency
for trading of renewable energy in smart grids.â ˘
A˙
I In 11th International
conference on the European energy market (EEM14), pp. 1-6. IEEE, 2014.
[30] Vranken, Harald. “Sustainability of bitcoin and blockchains.â ˘
A˙
I Current
opinion in environmental sustainability 28 (2017): 1-9.
[31] https://www.elia.be/en/grid-data/power-generation/Solar-power-
generation-data [accessed on: 15 May 2019]
VOLUME 4, 2016 15
Author et al.: Preparation of Papers for IEEE TRANSACTIONS and JOURNALS
RABIYA KHALID received the MCS degree from
Mirpur University of Science and Technology,
Mirpur (Azad Kashmir ), Pakistan, in 2014, and
the M.S. degree in computer science with a spe-
cialization in energy management in smart grid
from COMSATS University Islamabad, Islam-
abad, Pakistan in 2017. She has authored more
than 13 research publications in international jour-
nals and conferences. Her research interests in-
clude Data science and smart grid. Currently she is
doing PhD in computer science under the supervision of Dr. Nadeem Javaid.
NADEEM JAVAID (S’08, M’11, SM’16) received
the bachelor degree in computer science from
Gomal University, Dera Ismail Khan, Pakistan,
in 1995, the master degree in electronics from
Quaid-i-Azam University, Islamabad, Pakistan, in
1999, and the Ph.D. degree from the University
of Paris-Est, France, in 2010. He is currently an
Associate Professor and the Founding Director
of the Communications Over Sensors (ComSens)
Research Laboratory, Department of Computer
Science, COMSATS University Islamabad, Islamabad. He has supervised
120 master and 16 Ph.D. theses. He has authored over 900 articles in tech-
nical journals and international conferences. His research interests include
energy optimization in smart/micro grids, wireless sensor networks, big
data analytics in smart grids, and blockchain in WSNs, smart grids, etc.
He was recipient of the Best University Teacher Award from the Higher
Education Commission of Pakistan, in 2016, and the Research Productivity
Award from the Pakistan Council for Science and Technology, in 2017. He
is also Associate Editor of IEEE Access, Editor of the International Journal
of Space-Based and Situated Computing and editor of Sustainable Cities and
Society.
AHMAD ALMOGREN (SMIEEEâ ˘
A´
Z12) is a
Professor of Computer Science Department at the
College of Computer and Information Sciences
(CCIS), King Saud University (KSU), Riyadh,
Saudi Arabia. Currently, he is the director of Cy-
ber Security Chair at CCIS, KSU. He received a
PhD degree in Computer Science from Southern
Methodist University, Dallas, Texas, USA in 2002.
He served as the dean of the college of computer
and information sciences and the head of academic
accreditation council at Al Yamamah University. Also, he served as the
general chair for the IEEE smart world symposium and a Technical Program
Committee member in numerous international conferences/workshops such
as IEEE CCNC, ACM BodyNets, IEEE HPCC. His research areas of interest
include mobile-pervasive computing and cyber security.
MUHAMMAD UMAR JAVED Muhammad Umar
Javed did his Bachelorâ ˘
A´
Zs in Electrical En-
gineering from Government College University
Lahore, Lahore, Pakistan in 2014. He did his
Masterâ ˘
A´
Zs in Electrical Engineering from Gov-
ernment College University Lahore, Lahore, in
2018. Currently, he is doing Ph.D. in Computer
Science from COMSATS University Islamabad,
Islamabad. He is also a part of Communications
over Sensors Research Laboratory, Department of
Computer Science, COMSATS University Islamabad, Islamabad. His re-
search interests include: SmartGrid, Electric Vehicles and Blockchain.
PLACE
PHOTO
HERE
SAKEENA JAVAID has completed MS in Com-
puter Science from International Islamic Univer-
sity, Islamabad and pursuing towards PhD under
the supervision of Dr. Nadeem Javaid in COM-
SATS University Islamabad, Pakistan. She has
(co-)authored 30+ research publications in local
and international journals and conferences. She
has worked and is currently working as a Reviewer
and the Technical Committee Member of many
prestigious local and international journals and
conferences. Her research interests include wireless networks, smart grid,
cloud computing and artificial intelligence.
MANSOUR ZUAIR received the B.S. degree in
computer engineering from King Saud University,
and the M.S. and Ph.D. degrees in computer en-
gineering from Syracuse University. He served as
the CEN Chairman, from 2003 to 2006, the Vice
Dean, from 2009 to 2015, and has been the Dean,
since2016. He is currently an Associate Professor
with the Department of Computer Engineering,
College of Computer and Information Sciences,
King Saud University, Riyadh, Saudi Arabia. His
research interests include computer architecture, computer networks, and
signal processing.
16 VOLUME 4, 2016
... Although the P2P area corresponds to the vast majority of smart contracts applications reported in published research, some works also use smart contracts for P2G transactions, as it is explained by Khalid et al. [36]. Indeed, after local P2P trades have been validated by a smart contract, remaining energy needs (or extra energy) can be traded between the consumers and the grid. ...
... Unlike the peer-to-peer category that corresponds to full peer-to-peer trades, in which a buyer buys energy from a specific seller, in this category, the application corresponds to hybrid peer-to-peer, as defined in [56], in which a buyer does not know which producer provides the energy procured. Hence, this category regroups applications such as double auctions [36,[57][58][59][60][61][62][63][64], but also more complex market design approaches that directly includes a validation of the trade from power flow computations, as it can be carried out using Distributed Locational Marginal Pricing (DLMP) and AC Optimal Power Flow (AC OPF) [31,60,65,66]. Also, [67] uses smart contracts to implement a modified Vickrey auction. ...
... prosumer, consumer, etc.), but also to link a monitoring device to their profile [43]. This allows end-users to then authenticate themselves, using their smart metre address [36,44]. Furthermore, the registration functions can also require a money deposit in order to validate the participation of an end-user in a smart contract. ...
Article
Full-text available
Given the ongoing transition towards a more decentralised and adaptive energy system, the potential of blockchain-enabled smart contracts for the energy sector is being increasingly recognised. Due to their self-executing, customisable and tamper-proof nature, they are seen as a key technology for enabling the transition to a more efficient, transparent and transactive energy market. The applications of smart contracts include coordination of smart electric vehicle charging, automated demand-side response, peer-to-peer energy trading and allocation of the control duties amongst the network operators. Nevertheless, their use in the energy sector is still in its early stages as there are many open challenges related to security, privacy, scalability and billing. In this paper, we systematically review 178 peer-reviewed publications and 13 innovation projects, providing a thorough analysis of the strengths and weaknesses of smart contracts used in the energy sector. This work offers a broad perspective on the opportunities and challenges that stakeholders using this technology face, in both current and emergent markets, such as peer-to-peer energy trading platforms. To provide a roadmap for researchers and practitioners interested in the technology, we propose a systematic model of the smart contracting process, by developing a novel 6-layer architecture, as well as presenting a sample energy contract in pseudocode form and as open-source code. Our analysis focuses on the two mainstream application areas we identify for smart contract use in this area: energy and flexibility trading, and distributed control. The paper concludes with a comprehensive, critical discussion of the advantages and challenges that must be addressed in the area of smart contracts and blockchains in energy, and a set of recommendations that researchers and developers should consider when applying smart contracts to energy system settings.
... Using the proposed platform, distant users are able to perform reliable P2P transactions without centralized authority intervention [23] To implement a hybrid P2P energy trading market employing blockchain Ethereum Customers' electricity cost reduction was achieved The rest of this paper is organized as follows. An overview of the concepts of blockchain and smart contracts is provided in Section 2, followed by a description of a smart contract-enabled P2P energy trading framework in Section 3. The proposed trading mechanism programmed into the smart contracts is detailed in Section 4, and Section 5 shows the case study considered. ...
... Ethereum-based smart contracts can also be adapted for deployment on other blockchains such as Binance Smart Chain, Avalanche, Polygon, etc. Some other relevant works [12,22,23] have employed Ethereum; however, the present work incorporates the concept of P2P spinning reserve trading among network peers. ...
Article
Full-text available
The decentralization of power generation driven by the rise in the adoption of distributed energy resources paves the way for a new paradigm in grid operations. P2P energy trading is beneficial to the grid as well as the connected peers. A blockchain-based smart contract is well suited to transparently facilitate trades between energy consumers and producers without the services of intermediaries. In this paper, Ethereum-based smart contracts that facilitate double energy auction and spinning reserve trading are developed with Solidity, compiled, and deployed within the Remix IDE. Willing energy sellers/buyers submit offers/bids to a contract that implements the double auction procedure. In order to fulfil energy supply obligations, sellers are also able to purchase spinning reserves via another smart contract. The smart contracts’ effectiveness in performing the auction procedure and making payments is confirmed using an energy/reserve market scenario. The proposed scheme encourages further adoption of distributed energy resources and participation in local P2P energy trading.
... Different market approaches have been proposed to encourage participants to exchange energy within the same network and support the energy transition agenda. Market approaches such as the use of optimisation models as market clearing algorithms [2,17], game theory-based models for partnership within the network [14], and blockchain to secure transactions in LEM [11]. Compared to the aforementioned market mechanism, a large number of current research utilises auction-based market strategies as this mechanism allows energy trading continuously or for the next time slots for all participants in the LEM [6,20]. ...
... The market mechanism algorithm (adapted from [10]) 1 Function TransactionArray (addsale); 2 Input: order; bids; offers; quantities 3 Output: sales amount; cost-savings 4 Open market 5 for each round do 6 for each bid in orders do 7 for each offer in orders do 8 Solve market clearing optimisation (2a) 9 for each matched and do 10 if bid ≥ offer && quantities ≥ quantities then 11 Calculate sales quantities 12 end 13 if bid ≥ offer && quantities < quantities then 14 Transfer all quantities to 15 Transfer excess quantities of to next round ...
... Smart contracts can be used to match bids and offers by different market participants in a decentralized way without the need for a central entity. Many methods were developed to achieve this, such as auction mechanisms [49], [50]. ...
Article
Full-text available
Blockchain technology applications in the electricity sector are getting considerable attention from both academia and industry. It is expected that blockchain will play an important role in the transition to the smart grid. The blockchain applications in the electricity sector can be classified to optimizing existing processes like metering and billing or grid management and using blockchain for emerging applications such as creating new platforms for value exchange like peer-to-peer (P2P) energy trading. This paper briefly introduces fundamentals of blockchain technology such as different types of blockchain networks and consensus mechanisms, in addition to introducing a few blockchain platforms that are widely used in current studies, projects, and startups or may have future potential in electricity sector applications. The contribution of this paper is to provide a review of potential applications of blockchain in many electricity sector use cases, and they are categorized into eight categories such as P2P energy trading, wholesale markets, retail markets, metering and billing, trading of renewable energy certificates (RECs) and carbon credits, electric mobility, enhancement of power system cyber security, investments in renewable energy sources (RESs), and power system operation and management. Moreover, examples of research studies, pilot projects, industrial projects, startups, or companies investigating the blockchain capabilities at each potential application are introduced. Furthermore, the studies presented at each use case are compared to clarify and highlight the blockchain functions and involved actors. Finally, the paper discusses the challenges that blockchain technology is facing that obstruct large-scale adoption in different sectors and in the electricity sector specifically and potential solutions to these challenges that are being developed.
... The results showed that the proposed algorithms improved the PGS load prediction accuracy. Hafeez et al. [22] utilized blockchain technology to balance the load in the energy trading market. They proposed a model to implement an efficient hybrid energy trading market while reducing costs and power peak-to-average ratios. ...
Article
Full-text available
This research aims to minimize the unnecessary resource consumption by intelligent Power Grid Systems (PGSs). Edge Computing (EC) technology is used to forecast PGS load and optimize the PGS load forecasting model. Following a literature review of EC and Internet of Things (IoT)-native edge devices, an intelligent PGS-oriented Resource Management Scheme (RMS) and PGS load forecasting model are proposed based on task offloading. Simultaneously, an online delay-aware power Resource Allocation Algorithm (RAA) is developed for EC architecture. Finally, comparing three algorithms corroborate that the system overhead decreases significantly with the model iteration. From the 40th iteration, the system overhead stabilizes. Moreover, given no more than 50 users, the average user delay of the proposed delay-aware power RAA is less than 13 s. The average delay of the proposed algorithm is better than that of the other two algorithms. This research contributes to optimizing intelligent PGS in smart cities and improving power transmission efficiency.
... A small-scale local market needs to be formed within the community. This market is mainly based on a decentralized model through auction model [9,10], blockchain [11,12] and bilateral contracts [13]. Game theory provides a good theoretical framework for this structure. ...
Article
Full-text available
Battery energy storage system (BESS) is an expected solution for the local surplus renewable energy. Due to the high initial investment, the profitability of the BESS program remains a concern at present. Therefore, in this paper, we want to seek a new frame to introduce the BESS which is share the batteries in a community. And we presented a new method to calculate the techno-economic performance of the BESS in a community. We mainly focus on analysing and determining the capacity and the operation of the BESS. First, the potential of energy sharing was explored based on historical monitoring data in a Japanese smart community. Second, the size and number of the BESS were determined by developing a genetic algorithm-based constraint model. Then, the participation of the BESS in grid demand response (DR) was discussed to bring more economic benefits. Finally, the proposed method of battery sharing was compared to the traditional user-owned BESS to verify its feasibility. Case studies show that the shared BESS contribute to a significant reduction in battery capacity at the community level (a 38.8% reduction). Meanwhile, the active incentives of the DR play a critical role in the economic assessment (a 46.4% reduction in payback period). Technical analysis indicates that the shared battery will have the following characteristics: (1). The private shared battery has an advantage over the centralized shared battery due to its significantly lower transmission losses. (2). Prioritizing the deployment of batteries in buildings with much insufficient power is more applicable than in buildings with surplus power. This research provides guidance to promote energy sharing and battery sharing in the future and offers a solution to improve the local energy self-consumption rate.
Chapter
To better optimize and control the renewable energy system and its integration with traditional grid systems and other energy systems, corresponding technologies are needed to meet its growing practical application requirements: decentralized management and control, support for decentralized decision-making, fine-grained and timely data sharing, maintain data and business privacy, support fast and low-cost electricity market transactions, maintain the security and reliability of system operation data, and prevent malicious cyberattacks. Blockchain is based on core technologies such as distributed ledgers, asymmetric encryption, consensus mechanisms, and smart contracts and has some excellent features such as decentralization, openness, independence, security, and anonymity. These characteristics seem to meet the technical requirements of future renewable energy systems partially. This chapter will systematically review how blockchain technology can potentially solve the challenges with decentralized solutions for future renewable energy systems and show a guideline to implement blockchain-based corresponding applications for future renewable energy.
Article
Transactive energy (TE) is emerging as a novel tool of localized market mechanism to keep supply and demand in balance as more distributed energy resources (DERs) and flexible loads are integrated with power systems. TE is focused on the energy transactions in power distribution systems, which is closely related to human behaviors and social activities and can also be easily extended to multi-energy carrier systems. Moreover, recent developments in cutting-edge artificial intelligence (AI) technologies enable participation in various TE markets more automatically and intelligently. Accordingly, TE paves the path towards the cyber-physical-society system and price signal-defined open access energy facilities. This paper provides a comprehensive review of TE conceptual development in power distribution systems, including its fundamental features, structure, key implementation techniques, transactive control methodology, and existing pilot projects. In addition, TE integrated with the cyber-physical-society system is discussed in terms of AI, multi-energy carriers, social and human impact.
Thesis
Full-text available
The potential of Hydrogen as an energy carrier that is both more efficient and, depending on its production, less environmentally harmful than contemporary alternatives, is not a new discovery. In fact, Bockris’, who coined the term Hydrogen Economy speaking at a General Motors Conference in 1970 and later authored its first scientific appearance in 1972, only elaborated on a speech given by Haldrane in 1923. Despite that, it is the current peak of interest in hydrogen (JPM 2021, European Commission 2020:2) that has swept into National Hydrogen Strategies at a global scale (BNEF, World Energy Council). In the European Union (EU) alone “almost all Member States have included plans for clean hydrogen in their National Energy and Climate Plans” (European Commission 2020:2); of which 14 included hydrogen (H2) “in the context of their alternative fuels infrastructure national policy frameworks”1 (ibid.). On top of national efforts, the EU published a “hydrogen strategy for a climate-neutral Europe”, stating that “there are many reasons why hydrogen is a key priority to achieve the European Green Deal and Europe’s clean energy transition” (ibid.). Said strategy was embedded in the 2020 update on the Energy Union Package (initially adopted in 2015). The latter aims at providing a “resilient Energy Union with an ambitious climate policy at its core” (European Commission 1 submitted under Directive 2014/94/EU.2 2015:1), though its recent revision acknowledged that, despite isolated achievements towards the above, the necessary superstructure of a unified energy market was still lacking (European Commission 2020a:8). The placement of the EU Hydrogen Strategy, thus, implicitly suggests a reorientation towards a unified energy market based on a multi-carrier system beyond just electricity. Thereby H2 could either serve as crucial support structure for an electricity-based energy supply or – bearing in mind Bockris’ claim about its superiority as an energy carrier – become the predominant energy carrier itself in a so-called Hydrogen Economy. There are two angles of interest to approach the above. Necessarily those entail evaluating 1) whether hydrogen is a more promising alternative than electricity in terms of both efficiency and environmental impact at all stages of its life cycle. To this end the level of research is growing from both national bodies (BMBF) and within-industry (e.g., in the steel industry (European Commission 2020b; McKinsey 2020) or within transport c.f. Toyota Mirai or Hyundai ix35) regarding production, distribution, adaption, and financing – though in most cases, according to national or corporate interests, considered as isolated issues. But there is also instructive value, from assessing 2) whether the technological means to achieve a unified energy market based on electricity also apply to hydrogen. In the realms of electricity management both industry- (Deutsche Energie-Agentur GmbH 2019; Edeland and Mörk 2018; PwC 2017) and governmental or policy-related sources (Government Office for Science 2016; Lacassagne and Donnerer 2018, China Academy of Information and Communication Technology 2018) converge on the potential of Blockchain solutions. Though synergies between Blockchain and hydrogen have remained untouched by the scientific community thus far, the number of business cases in this sphere is rising (c.f. Acciona, HydroCoin, FlexiDAO, EnergyWeb). This paper aims to fill this gap by providing an overview where blockchain solutions could prove beneficial along the hydrogen value chain, whereby the overall objective is to arrive at an evaluation of the significance of Blockchain for a functioning Hydrogen Economy. This will be assessed along the spectrum of isolated use-cases, where Blockchain applications may offer procedural improvements or solve present problems within the hydrogen supply chain, up to an integrated Blockchain-based Hydrogen Economy. Therefore, it will first be established what the term Hydrogen Economy describes and entails, including the chemical characteristics of hydrogen, its production and usage. Similarly, a background on Blockchain technology and its distinctive qualities will be given, before diving into the applicative value of Blockchain firstly for the supply side and secondly from an end-user’s perspective. Following this assessment of isolated applications, a glance at the alternative, a Blockchain ecosystem for the Hydrogen Economy, will be presented along the use-case of HydroCoin. Concludingly an evaluation of the findings along the inquiry “Blockchain in the Hydrogen Economy: Upstream Considerations and Peer-to-Peer trading” will be provided.
Article
Smart appliances bring convenience to people’s lives, but the high electricity cost and high peak load are still drawbacks. The scheduling optimization of household electricity tasks can effectively alleviate those drawbacks. Therefore, this paper proposes a scheduling optimization model of smart home appliances to reduce the load peak value and electricity cost. Herein, the electricity tasks are defined by the set theory and classified by the operational characteristics of the loads. Then, a hybrid coding genetic algorithm based on the niche technology is proposed for scheduling optimization problems of electricity tasks. Different coding and cross-mutation operation strategies are designed for different electricity tasks. Finally, a tracing Pareto method based on weighted sum approach is proposed to solve the multi-objective optimization problem. The experimental results show that the proposed algorithm has a good performance in reducing load peaks and electricity costs. In cases A, B, and C, the load peak value is reduced by 54.7%, 45.7%, and 20.7%, respectively; the electricity cost is reduced by 5.98%, 12.00%, and 16.12%, respectively. Furthermore, a series of Pareto optimal solutions are also identified, which can help users better understand the trade-off relation between the load peak value and electricity cost.
Article
Full-text available
The future of energy is complex, with fluctuating renewable resources in increasingly distributed systems. It is suggested that blockchain technology is a timely innovation with potential to facilitate this future. Peer-to-peer (P2P) microgrids can support renewable energy as well as economically empower consumers and prosumers. However, the rapid development of blockchain and prospects for P2P energy networks is coupled with several grey areas in the institutional landscape. The purpose of this paper is to holistically explore potential challenges of blockchain-based P2P microgrids, and propose practical implications for institutional development as well as academia. An analytical framework for P2P microgrids is developed based on literature review as well as expert interviews. The framework incorporates 1) Technological, 2) Economic, 3) Social, 4) Environmental and 5) Institutional dimensions. Directions for future work in practical and academic contexts are identified. It is suggested that bridging the gap from technological to institutional readiness would require the incorporation of all dimensions as well as their inter-relatedness. Gradual institutional change leveraging community-building and regulatory sandbox approaches are proposed as potential pathways in incorporating this multi-dimensionality, reducing cross-sectoral silos, and facilitating interoperability between current and future systems. By offering insight through holistic conceptualization, this paper aims to contribute to expanding research in building the pillars of a more substantiated institutional arch for blockchain in the energy sector.
Article
Full-text available
Energy markets are based on energy transactions with a central control entity, where the players are companies. In this research work, we propose an IoT (Internet of Things) system for the accounting of energy flows, as well as a blockchain approach to overcome the need for a central control entity. This allows for the creation of local energy markets to handle distributed energy transactions without needing central control. In parallel, the system aggregates users into communities with target goals and creates new markets for players. These two approaches (blockchain and IoT) are brought together using a gamification approach, allowing for the creation and maintenance of a community for electricity market participation based on pre-defined goals. This community approach increases the number of market players and creates the possibility of traditional end users earning money through small coordinated efforts. We apply this approach to the aggregation of batteries from electrical vehicles so that they become a player in the spinning reserve market. It is also possible to apply this approach to local demand flexibility, associated with the demand response (DR) concept. DR is aggregated to allow greater flexibility in the regulation market based on an OpenADR approach that allows the turning on and off of predefined equipment to handle local microgeneration.
Article
Full-text available
The Energy Internet has become a hot topic for the integration of sustainable energies. However, as a result, there are numerous sustainable energy forms and participants, the system is extremely complex, and some key issues are difficult to overcome, such as the control and management of distributed sustainable energy forms. On the other hand, blockchain technology consists of distributed data storage, peer-to-peer transmission, a consensus mechanism, encryption algorithms, and smart contracts. Applying the technical advantages of the blockchain to the Energy Internet can solve many of the problems that hinder its development. The purpose of this paper is to review the development of blockchain and the Energy Internet, and provide some references for the possible applications of blockchain technology to the Energy Internet. Firstly, the definition and characteristics of blockchain and the Energy Internet are introduced in detail. Secondly, the compatibility of the two is analyzed. Then, several application scenarios of blockchain in the Energy Internet are put forward. Finally, the challenges that still exist when applying the current blockchain technology to the Energy Internet are analyzed.
Article
Full-text available
With the fast development and expansion of the Internet of Things (IoT), billions of smart devices are being continuously connected, and smart homes, as a typical IoT application, are providing people with various convenient applications, but face security and privacy issues. The idea of Blockchain (BC) theory has brought about a potential solution to the IoT security problem. The emergence of blockchain technology has brought about a change of decentralized management, providing an effective solution for the protection of network security and privacy. On the other hand, the smart devices in IoT are always lightweight and have less energy and memory. This makes the application of blockchain difficult. Against this background, this paper proposes a blockchain model based on hypergraphs. The aims of this model are to reduce the storage consumption and to solve the additional security issues. In the model, we use the hyperedge as the organization of storage nodes and convert the entire networked data storage into part network storage. We discuss the design of the model and security strategy in detail, introducing some use cases in a smart home network and evaluating the storage performance of the model through simulation experiments and an evaluation of the network.
Article
Full-text available
The Internet of Things (IoT) refers to the interconnection of smart devices to collect data and make intelligent decisions. However, a lack of intrinsic security measures makes IoT vulnerable to privacy and security threats. With its “security by design,” Blockchain (BC) can help in addressing major security requirements in IoT. BC capabilities like immutability, transparency, auditability, data encryption and operational resilience can help solve most architectural shortcomings of IoT. This article presents a comprehensive survey on BC and IoT integration. The objective of this paper is to analyze the current research trends on the usage of BC-related approaches and technologies in an IoT context. This paper presents the following novelties, with respect to related work: (i) it covers different application domains, organizing the available literature according to this categorization, (ii) it introduces two usage patterns, i.e., device manipulation and data management (open marketplace solution), and (iii) it reports on the development level of some of the presented solutions. We also analyze the main challenges faced by the research community in the smooth integration of BC and IoT, and point out the main open issues and future research directions. Last but not least, we also present a survey about novel uses of BC in the machine economy.
Article
This paper studies the design and management of a distributed energy system incorporating renewable energy generation and heterogeneous end-users from residential, commercial and industrial sectors. A hierarchical framework is first proposed for the energy demand side management through peer-to-peer exchange of energy information in the real-time market. The heterogeneity of demand flexibility associated with different types of users is reflected in the framework with inter-sectorial interactions modelled by a non-cooperative game. The inherent uncertainty of renewable generation is also considered with the technique of receding horizon optimization. Subsequently, smart contracts and decentralized identifier guaranteed by blockchain technologies are implemented to create a seamless, secured and efficient distributed energy system. Finally, a Singapore-based case study is conducted and the results show that with effective interactions among participants, electricity consumption of the entire energy system closely tracks the generation pattern of renewable resources, resulting in a significantly flattened schedule of grid electricity procurement.
Article
The smart grid environment requires the enhancement of various computational tools, especially for routine tasks of data acquisition and system monitoring. This paper presents the building blocks of a conceptual framework to be used as the basis for the construction of novel distributed remote metering systems with utilization of the cutting edge Blockchain technology. The proposed methodology is suitable for processing a large volume of data aimed at monitoring modern electric power distribution grids. As a proof of concept, a collaborative metering system is conceived based on the Blockchain technology, being primarily capable of: Dealing with the entirety of the collected data (conveniently stored and filtered); assuring data integrity by means of cryptography; optimizing implementation/operation costs of the telecommunication services involved. Simulation results concerning the reliability and performance of the designed distributed remote metering system are presented.
Article
Blockchain is the key technology of Bitcoin and other cryptocurrencies, and it is one of the most exciting technologies changing the world in the 2010’s. Targeting at big industrial energy users, this paper first presents a new market structure (i.e., transaction rules) under existing blockchain-based electricity transaction platforms to cover popular types of markets such as contract, day-ahead, adjustment and balancing markets, and then focuses on the optimal load management problem for a particular industrial user. The proof-of-work cost from blockchain is also modelled. A key feature of this load management problem is that the user has direct control on its own load, and the obtained load control model is much more accurate than existing approaches in which system operators or demand aggregators cannot control load directly and have to rely on inaccurate estimations. As a case study, the pumping load of a water supply plant is investigated to illustrate how the demand load is managed under this blockchain-based market. From the case study, it is found that 18.9% of total cost can be saved under this new market structure.
Article
In recent years, the rapid urbanization of world’s population causes many economic, social and environmental problems, which affect people’s living conditions and quality of life significantly. The concept of “Smart City” brings opportunities to solve these urban problems. The objectives of smart cities are to make the best use of public resources, provide high quality services to the citizens, and improve the people’s quality of life. Information and Communication Technology (ICT) plays an important role in the implementation of smart cities. Blockchain as an emerging technology has many good features, such as trust-free, transparency, pseudonymity, democracy, automation, decentralization and security. These features of blockchain are helpful to improve smart city services and promote the development of smart cities. In this paper, we provide a comprehensive survey on the literature involving blockchain technology applied to smart cities. First, the related works and background knowledge are introduced. Then, we review how blockchain technology is applied in the realm of smart cities, from the perspectives of smart citizen, smart healthcare, smart grid, smart transportation, supply chain management and others. Finally, some challenges and broader perspectives are discussed.