Anda di halaman 1dari 8

This article has been accepted for publication in a future issue of this journal, but has not been

fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

A Real-time Dynamic Pricing Algorithm for Smart


Grid with Unstable Energy Providers and Malicious
Users
Qiang Tang, Kun Yang, Senior Member, IEEE, Dongdai Zhou, Yuansheng Luo, and Fei Yu

AbstractIn this paper, we consider a smart power model,


where some subscribers share several energy providers and
there are some malicious users in this power grid. The energy
providers are managed by a Power Market Scheduling Center
(PMSC), which broadcasts electricity price to subscribers and
energy providers. The energy providers and subscribers update
their capacities and energy consumption requirements respectively according to the electricity prices received. In order to
identify the malicious users and the unstable energy providers,
the Mechanism of Identification and Processing (MIP) for the
malicious users and unstable energy providers is proposed. By
integrating the MIP, we proposed a heuristic algorithm named as
Dynamic Pricing Algorithm with Malicious users and Unstable
energy providers (DPAMU) to get the optimal electricity price
as well as the optimal power requirement and the load capacity.
Finally, the simulation results show that the proposed DPAMU
has good convergence performance and can shave and clip the
peak load effectively.
Index TermsPower market scheduling center, demand response, real-time pricing, malicious user, unstable energy
provider, smart grid.

I. I NTRODUCTION
MART grid is integrated new technologies with power
grid, such as intelligent controllers, two-way communications between utilities and consumers. Smart gird is a
highly automated and distributed energy network, and the
users can communicate with the energy providers in real time,
which leads to improving the real time feature of the Demand
Response (DR) and makes the power grid more efficient and
stable.
In smart grid, Demand Response (DR) is the main activities
to manage the electricity price and the power consumption
by consumers as well as the generation capacities of energy
providers. DR has many types, which are mainly divided into
two categories named as Price-based DR and Incentive-based
DR [1]. In Price-based DR, the electricity price is used to
adjust the customers power consumption to avoid the timeslot with high price and achieve the maximum users utilities.
In most cases, the Price-based DR schemes try to determine

Qiang Tang, Yuansheng Luo and Fei Yu are with the School of Computer
and Communication Engineering, Changsha University of Science and Technology, Changsha, Hunan, 410114 CHINA email: tangqiangcsust@163.com,
luodyx@msn.com, yufeiyfyf@163.com.
Kun Yang is with the School of Computer Science and Electronic Engineering, University of Essex, Colchester, CO4 3SQ, UK email: kunyang@essex.ac.uk.
Dongdai Zhou is with the College of Software, Northeast Normal University, Changchun, Jilin, 130117 CHINA email: ddzhou@nenu.edu.cn.
Manuscript received April 15, 2015; revised June 3, 2015.

the optimal electricity price for each time slot by using many
kinds of methods, thus the Price-based DR schemes can also
be called as the Time-based DR schemes.
In Incentive-based DR, the utilities or systems offer fixed
or time-varying incentives or payments to customers which
reduce their power consumption during the periods of system
stress [2].
There are many pricing schemes in Time-based DR, such as
Flat Pricing, Time-of-Use (TOU) pricing, Critical Peak Pricing
(CPP), Peak Load Pricing (PLP), Peak Day Rebates pricing (PDR), Real-Time Pricing (RTP), Vickrey-Clarke-Groves pricing
(VCG), et al [1]. Each of the above pricing schemes have some
variant schemes, such as the CPP has the variant scheme called
as fixed period CPP (CPP-F) [3], and the RTP has the variant
scheme named as Day-Ahead RTP (DA-RTP), in which the
next days prices are announced to the customers [4], [5]. In
the Incentive-based DR, there are also some programs, such as
Direct Load Control (DLC) [6], Interruptible/Curtailable(I/C)
[7] load, Emergency DR Programs (EDRPs) [8], Capacity
Market Program (CMP) [9], Demand Bidding (DB) [8], et
al.
In the above programs, each of the DR program has good
performance under certain circumstances. For example, if the
communication condition is limited, the DR program with little information exchange is required, while if the DR program
needs to optimize the utilities for both energy providers and
users, more communication capabilities are required. Thus, the
RTP scheme requires the maximum communication capabilities of the smart grid among the DR programs described above,
and the energy providers announces electricity prices, which
are determined before the start of each time slot [10]. The RTP
scheme can get the optimal price for each time slot, and makes
the benefit for both utilities and consumers maximum. In [11],
the RTP mechanisms have been applied into large industrial
and commercial customers.
Because of the large amount of information exchange, some
alternative RTP programs are proposed. For example, the DayAhead RTP (DA-RTP) is proposed [12], [13] and the DARTP has better performance compared with the original RTP
in the term of communication requirement. Besides, in order
to improve the performance of RTP scheme, many real-time
pricing models are proposed.
In order to improve the pricing efficiency of the RTP
program, the authors proposed an optimization model to adjust
the hourly load level in response to hourly electricity price in
[14]. The objective of the model is to maximize the utility of

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

the consumer subject to a minimum daily energy-consumption


level, maximum and minimum hourly load levels, and ramping
limits on such load levels. The robust optimization techniques
are used to model the uncertainty of price. In [15], a smart
power infrastructure is proposed, where several subscribers
share a common energy source. The objective of the model is
to maximize the social welfare subject to power consumption
range of each user in every time slot. A distributed algorithm
is proposed to solve the model. The model in [15] motivated
some studies, such as in [16], the authors studied the price
elasticity of electricity demand in a smart grid framework
where the loads of a power system are scheduled by energy
management controller (EMC) units that aim to maximize
users benefits by considering both load utilities and realtime electricity price. In [17], a real-time pricing algorithm is
described that allows different energy providers to share one
common network, without violating the network constraints.
The voltage balance among wires is considered as the main
constraint.
Based on the model proposed in [15], we focus on the realtime interactions among subscribers and PMSC which manage
some energy providers. Malicious users and unstable energy
providers are also introduced. We propose a DR program
between consumers and some energy providers, which can
identify the malicious users as well as the unstable energy
providers and process the malicious data from both the users
and energy providers to enable the DR program stable and
convergent.
Finally, the simulation results show that the proposed DR
program can schedule the power consumption and make
the electricity price in each time slot convergent. Both the
subscribers and energy providers can benefit from the proposed
algorithms.
In the follow sections, the system model is presented
in Section II. In Section III, we proposed heuristic pricing
algorithms. Simulation results are presented in Section IV. In
Section V, we will give the conclusion.
II. S YSTEM M ODEL
A. Problem Description
In [15], authors considered a smart power system consisting
of a single energy provider and several load subscribers. But
in the real life, one energy provider is not enough to provider
energy for a large number of subscribers, thus multiple energy providers are needed, which can provide enough energy
capacities to the subscribers.
But, if all energy providers announce their electricity prices
for all subscribers in each time slot respectively, the power
market will cause price competition, which is harmful to the
energy providers when the market is the buyers market. If the
market is the sellers market, all the subscribers may pay high
energy consumption fees for the energy providers. Thus, if
there is no the third-party supervision agency coordinating the
electricity for both the energy providers and the subscribers,
the total social welfare may not be maximized.
In this paper, a Power Market Scheduling Center (PMSC) is
proposed, which manages all the energy providers and makes

them provide a unified price to the subscribers, and the energy


providers generate the optimal quantity of electricity to get the
maximum utilities.
In addition to coordinate the electricity price for both energy
providers and the subscribers in each time slot, the PMSC also
needs to identify and process the malicious subscribers as well
as the unstable energy providers.
Because the DR programs especially the RTP schemes
may be not so attractive for some risk-averse subscribers,
some users may consume the electricity as their will or even
change the programs solidified in the smart meters and send
the required energy consumption data to the PMSC as their
will. While if the energy providers received electricity price
announced from the PMSC, in the rational and safe case the
energy providers generate the optimal energy capacities to
maximize the utilities and send the optimal energy capacities
data to the PMSC. But if some of the energy capacities data are
hijacked and tampered to be a random number or the energy
capacities data are determined in the irrational case because of
the unstable generation behavior or other reasons, the PMSC
electricity price as well as the total energy capacities may
not convergent, which means the electricity price is not the
optimal.
In the above description, we conclude that the successful
implementation of DR program not only need the excellent
performance of the DR program but also need the security
mechanism to ensure the data and the participants are all safe.
In the following description, we will solve the problems
introduced above, and propose a heuristic algorithm named as
Dynamic Pricing Algorithm with Malicious subscribers and
Unstable energy providers (DPAMU).

B. Utility Function and Cost Model


As introduced in [15], the subscribers utility functions are
non-decreasing and the marginal benefit of customers is a nonincreasing function. Thus the utility function is defined as
follow:

wx x2 if 0 x w
2

U (x, w) = w
(1)
w

if
<x

where is a parameter pre-defined for every subscribers and


is known by the PMSC. We assume the utility function type is
known by PMSC. The parameter w is the energy consumption
willing of subscriber and different subscribers have their own
different consumption willing denoted by wi .
We consider a cost function Cpk (Lkp ), p = 1, 2, ..., M indicating the cost of energy provider p in each time slot k K.
We consider the follow cost function:
Cpk (Lkp ) = akp (Lkp )2 + bkp Lkp + ckp

(2)

where akp > 0, bkp , ckp 0 are pre-determined parameters and


are only known by the energy provider p. We assume the cost
function type is known by PMSC.

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

C. Malicious Users
In this paper, we let N = {i | i=1,2,3,...,N} denote the users
or subscribers set, and rmal (0, 1) is the rate of malicious
users. We let Nmal denote the set of malicious users, then we
have:

as maximizing the social welfare, and according to [15] we


formulate the following optimization problem:

maximize
(
U (xki , wik )
Cpk (Lkp ))
kK iN Nmal

s.t.
|Nmal | = |N | rmal

(3)

We assume every user in each time slot has the same


power consumption range [xkmin , xkmax ], which is also known
by PMSC. The malicious users calculate their own energy
requirements according to the following equation:
xki = xkmin + rand (xkmax xkmin ), i Nmal

(4)

where rand is the uniform distributed random number in the


interval (0, 1).
In DPAMU, the PMSC can identify all the malicious users
according to the energy requirement data received from malicious users. If the malicious users are identified, the PMSC
replaces the wrong data with the average energy requirement
data from all the non-malicious users:

k
jN Nmal xj
k
xi =
, i Nmal
(5)
|N Nmal |
We assume the PMSC can communicate with the malicious
users smart meter and set the maximum power consumption
in this time slot as (5) as a punishment.

iN Nmal

pMMust

xki +

xkj

jNmal

(7)

Lkp , k K

pMMust

wik

where
is the w parameter of user i in time slot k. Lkp is
the generation capacity of energy provider j in time slot k.
According to (5), the problem (7) can be converted to the
following problem:

maximize
(
U (xki , wik )
Cpk (Lkp ))
kK iN Nmal

pMMust

(8)

|N |
xki
s.t.
Lkp , k K
|N Nmal | iN Nmal
pMMust
In order to solving the problem (8), we found that the
U (xki , wik ) and Cpk (Lkp ) are convex functions, thus problem
(8) can be solved by using the dual decomposition approach.
Because the sub-problems of (8) in time slots are independent
with each other, the problem (8) is equivalent to the following:

Cpk (Lkp )
U (xki , wik )
maximize
iN Nmal

pMMust

|N |
s.t.
Lkp
xk
|N Nmal | iN Nmal i
pMMust

(9)

|N |
, then the Lagrangian function of
|N Nmal |
problem (9) is:

Cpk (Lkp )
U (xki , wik )
L(x, Lk , k ) =
Let =

D. Unstable Energy Providers


Besides the malicious users, the energy capacities data from
the energy providers may be unstable and PMSC needs to
identify and process the wrong data.
We let M = {p | p=1,2,3,...,M} denote the set of all the
energy providers, and Must denote the set of all the unstable
energy providers.
We assume the capacities of the energy providers are the
same with each other. We let the load capacity of energy
provider p in the time slot k belongs to the following interval:
Lkp [0, |N | xkmax ]

(6)

where the maximum load capacity of energy provider p can


meet the total energy requirement of all the users.
If some energy providers send the unstable energy capacities
data to the PMSC, PMSC should identify and cut the power
grid connections between the unstable energy providers and
the PMSC, which means the load capacities of the unstable
energy providers are set as zero.
In the following section, we will introduce the mechanism
of identifying the malicious users and the unstable energy
providers.
E. Optimal Model of DPAMU
After identify and process the malicious users and the
unstable energy providers, we make the objective of DPAMU

iN N mal

k (
=

pMMust

iN N mal

Lkp )

pMMust

(10)

iN N mal

xki

(U (xki , wik ) k xki )

(k Lkp Cpk (Lkp ))

pMMust

According to [15], the problem (10) has the following subproblems:

D(k ) =
Bik (k ) +
Spk (k )
(11)
iN N mal

pMMust

Bik (k ) = maximize U (xki , wik ) k xki

(12)

Spk (k ) = maximize k Lkp Cpk (Lkp )

(13)

iN N mal

pMMust

where Bik (k ) and Spk (k ) can be solved by users and


energy providers locally to obtain the optimal xk
and Lk
p
i
k
respectively, as long as the electricity price is received
from the PMSC.
The dual optimization problem can be solved in an iterative
manner by using gradient projection method, and the k is

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

updated by the PMSC according to the following equation:

k
kt+1 = [kt + (
xk
i (t )
iN Nmal

(14)
k
+
Lk
p (t ))]

pMMust

where is the step size and kt denotes the electricity price


k at the iteration t of the time slot k.
In the above description, the model of DPAMU can be
solved in the iterative manner. But first of all, the PMSC needs
to identify the malicious users as well as the unstable energy
providers according to the data their submitted, which needs
the Mechanism of Identifying and Processing (MIP) for the
malicious users as well as the unstable energy providers.
The participant of DPAMU is either the user/subscriber or
the energy provider. If the participant is the subscriber, in
the iteration t of pricing in time slot k, it should calculate
k
the optimal energy requirement xk
i (t ) according to the
(12), while if the participant is the energy provider, it should
k
calculate the optimal energy capacity Lk
p (t ) according to
k k
k
the (13). All the xk
i (t ) and Lp (t ) need to be sent to
the PMSC and proceed in MIP. Thus in the MIP, there are
two types of participants need to be identified and proceed by
PMSC according to the data received from them.
The MIP contains two parts which are identifying and
processing the malicious users and identifying and processing
the unstable energy providers. We will introduce the two parts
respectively.

Assume there is a power consumption range [xki,min , xki,max ]


for user i in time slot k, and in this paper, we assume all the
users load ranges in time slot k are the same and known
by the PMSC. Then if wi / xki,min , the optimal load is
xki,min . If wi / xki,max , then the optimal load can only be
calculated by using (17), because the optimal load can only
stay in the range [xki,min , xki,max ], then the optimal load is:
k
xk
i (t ) = max(min(

wi k k
, xi,max ), xki,min )

(19)

If the wi / [xki,min , xki,max ], then the range can be


divided into two sub ranges [xki,min , wi /] and [wi /, xki,max ].
In the range [xki,min , wi /], the optimal load is:
k
xk
i ( ) = max(min(

wi k wi
, ), xki,min )

(20)

In the range [wi /, xki,max ], the optimal load is wi /.


According to the analysis above, the optimal load of nonmalicious user i can be xki,min ,xki,max ,wi / or (wi k )/.
If PMSC has received the optimal load data from user i, it
estimates whether the data is xki,min or xki,max . If the received
data is neither xki,min nor xki,max , PMSC uses (17) and (18)
t
t
to calculate the user is consumption willing wi1
and wi2
and
store them.
In the next several iterations, we will continue to calculate
the consumption willing of user i. For example, in the iteration
t + 1, if the optimal load data of user i is neither xki,min
t+1
t+1
nor xki,max , the willing are calculated as wi1
and wi2
respectively. Then, we compare the four willing, and conclude
that user i is the malicious user or not.
F. Identifying and processing the malicious users
The steps of identifying and processing the malicious users
If there are some malicious users in the power grid, which
are executed by PMSC, and shown as following:
cant comply with the pricing program or send the wrong data
Step1: PMSC initializes a willing set for every user, for
to the PMSC in order to disturb the pricing progress. Then
0
0
}, and the initial values
, wi2
example user is willing set is {wi1
the PMSC has to identify the malicious users according to the
0
0
of wi1 and wi2 are zeros.
wrong data received from them and process their submitted
Step2: If all users data is proceed, exit. Or PMSC gets any
wrong data. In this paper, we assume the malicious users send
user is data in time slot k, at the iteration t, and compares it
random loads to the PMSC in the each iteration of pricing.
with the load range [xki,min , xki,max ].
According to (12), every non-malicious user needs to loStep3: Estimates whether the xti is equal to xki,min or xki,max .
cally calculate the optimal load and send the data to PMSC.
If xti = xki,min or xti = xki,max , then user i is non-malicious
According to the piecewise function (1) and (12), we get the
user and go to Step2.
following two maximizing problems respectively:
Step4: If xti = xki,min and xti = xki,max , then uses (17) and
t
t
of user i respectively
(18) to calculate the willing wi1
and wi2
wi
k 2
k
k
k
k
k
0
0
)

x
,
x

xk
(
)
=
argmax
w
x

(x
(15)
and
compares
them
with
w
and
w
.
i i
t
i
i
i
t
i1
i2
2 i

iN Nmal
0
0
0
0
t
Step5: If wi1
= wi2
= 0, replaces wi1
and wi2
with wi1
wi
k k
k
k wi
k
t
0
0
and
w
respectively.
If
w
=

0
or
w
=

0,
then
estimates
xi (t ) = argmax
t xi ,
< xi (16)
i2
i1
i2

0
t
0
t
iN Nmal
whether one of the four equations wi1
= wi1
, wi2
= wi2
,
0
t
0
t
= wi2
, wi2
= wi1
is true. If none of the four equations is
where wi is the consumption willing for user i, which is wi1
constant in all the time slots. If the user i received the price kt correct, user i is malicious user. If one of the four equations
of iteration t in time slot k, user i will calculate the optimal is correct, user i is non-malicious user and go to Step2.
Step6: PMSC replaces user is load according to (5) and go
load according to (15) and (16). If according to (15), the
to Step2.
optimal load of user i is:
wi kt

If using (16), the optimal load is:


wi
k
xk
i (t ) =

k
xk
i (t ) =

(17)

G. Identifying and Processing the Unstable Energy Providers

(18)

If there are some energy providers which send the nonoptimal load capacity data to the PMSC and disturb the
progress of pricing. For every stable energy provider p, it will

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

calculate the optimal load capacity according to (2) and (13).


The optimal load capacity of energy provider p is:
k
k k
k
k 2
k k
k
Lk
p (t ) = argmax t Lp ap (Lp ) bp Lp cp

(21)

pMMust

where akp > 0, bkp , ckp 0 are the pre-defined cost function
parameters of energy provider p in time slot k. Then we can
get the optimal load capacity according to (22):
kt bkp
2akp

k
Lk
p (t ) =

optimal load requirements are calculated by the subscriber


part, and the optimal electricity capacities of all the energy
providers are calculated by the energy provider part.
After integrating the MIP, the PMSC has to add more steps
contained by MIP to identify and process the malicious users
as well as the unstable energy providers.
Finally, we get the following DPAMU flow chart shown in
Fig 1.

(22)

According to (6), every energy provider p has its own load


capacity range [0, |N |xkmax ], and we can get the optimal load
capacity of energy provider p:
k
Lk
p (t ) = max(min(

bkp
, |N |
2akp

kt

Lkp* (tk ) = argmax tk Lkp C pk ( Lkp )


k

xik * (tk ) =

xkmax ), 0)

jN N mal

x kj * (tk )

N N mal

k*

Lp

( t

k
Lkp* (tk ) = rand N xmax
, p Must

, i N mal

(23)
Lkp* (tk ) = 0, p M ust

In this paper, the akp , bkp and ckp are three different constants
in all the time slots of energy provider p. Thus, if the
PMSC has received two values of optimal load capacity in
k
the iteration t and t + 1 in time slot k denoted by Lk
p (t )
k k
k k
k k
and Lp (t+1 ) respectively and if Lp (t ) and Lp (t+1 ) are
neither equal to 0 nor |N | xkmax respectively, then PMSC can
solve the following equation set and get the parameters ak
p
and bk
p of energy provider p in time slot k:
{ k
k
t bkp 2akp Lk
p (t ) = 0
(24)
k
k k k
k
t+1 bp 2ap Lp (t+1 ) = 0
If the PMSC received the third optimal load capacity data
k
k
Lk
p (t+2 ) which is neither equal to 0 nor |N | xmax from the
energy provider p, PMSC only needs to validate the following
expression is equal to zero or not:
k k k
kt+2 bk
p 2ap Lp (t+2 )

t +1

(25)

If (25) is zero, the energy provider p is stable energy


provider, otherwise the energy provider p is unstable energy
provider.
The steps of identifying and processing the unstable energy
providers are shown as following:
Step1: PMSC initializes a parameter set for every energy
provider, for example energy provider ps parameter set is
{akp , bkp } and the initial values of akp and bkp are 1.
Step2: If PMSC has received two optimal load capacity data
from energy provider p and which are both not equal to 0 and
|N | xkmax , calculates the cost function parameters of energy
provider p according to (24).
Step3: If PMSC has received the third optimal load capacity
data which is not equal to 0 and |N | xkmax from the energy
provider p, validates the (25) is equal to 0 or not. If (25) is
equal to 0, p is stable energy provider, else p is a unstable
energy provider.
III. HEURISTIC ALGORITHM
DPAMU contains three parts, which are the energy provider
part, subscriber part and PMSC part.
According to (11), (12), (13), (14), we know that the
electricity price is updated by the PMSC, and the users

xik * (tk )

tk+1 = [tk + ( iN -N xik * (tk ) pM M Lkp* (tk ))]+


mal

ust

xik * (tk ) = argmax U ( xik , wik ) tk xik

tk+1 ,

k
k
k
xik * (tk ) = xmin
+ rand ( xmax
xmin
), i N mal

Fig 1. The operation of the proposed DPAMU

In Fig 1, PMSC initializes an electricity price and broadcasts


it to all the energy providers as well as the subscribers. If
the subscribers received the price, the non-malicious users
calculate the optimal load requirements and the malicious
users send the random load requirements to the PMSC.
While the stable energy providers update the load capacities
according to (21) and the unstable energy providers update
the load capacities randomly decided belong to the interval
[0, |N | xkmax ]. All the subscribers and the energy providers
send the optimal data to the PMSC. If PMSC received the
data, it firstly identifies and processes the malicious users and
the unstable energy providers by using MIP. And then the price
is updated according to (14) and broadcasted to the subscribers
and energy providers by PMSC, and the malicious user rate
is also broadcasted to the subscribers.
A single iteration of pricing consists of the electricity price
broadcasting, the optimal load and capacity updating and
sending, malicious user and unstable energy provider identification and processing, electricity price updating. In each
time slot, several iterations are contained and the electricity
price becomes stable finally.
A. Complexity Analysis
According to Fig 1, we assume there are m energy providers
and n users, and the electricity price converges to a stable
value after k iterations. Then the PMSC received k(n + m)
messages from the energy providers and users, and every
energy provider as well as user received k messages from the
PMSC, thus the message complexity is O(k(n+m)). The time
complexity is O(k), where k is determined by the electricity
price k and the step size according to (14).
IV. PERFORMANCE EVALUATION
In this section, we will simulate the performance of DPAMU
in the MATLAB, where the PMSC, energy provider and

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

akp = 0.01 + 0.002p, p = 1, 2, ..., M


bkp = 1 0.02p, p = 1, 2, ..., M
ckp = rand(0, 1)

(26)

is big, the convergence is bad and the real time feature of


DPAMU is not good and vice versa.
Thus, in order to illustrate the real time feature of DPAMU,
the convergence of price, the load requirements as well as the
load capacities are all simulated.
In this simulation, we set the combinations of the percentage of malicious users and the percentage of unstable
energy providers as [0, 0], [0.2, 0.2], [0.5, 0.5] and [0.8, 0.8]
respectively to simulate the convergence of price.
The simulations are all executed in a single time slot, and
the simulation result of price convergence is shown in Fig 2.
4
DPAMU rate=0.0
DPAMU rate=0.2
DPAMU rate=0.5
DPAMU rate=0.8

3.5

3
Price($)

subscriber are defined respectively. In each time slot, PMSC


randomly sets and sends the initial price to energy providers
and subscribers. If the energy providers and subscribers have
received the price, they update their capacities or loads and
send them to the PMSC, which updates the price and identifies
malicious users as well as unstable energy providers if all
the updated loads and capacities are received. After several
iterations, the price will be stable and the sum of capacities
is equal to the sum of loads, which represents the end of the
real-time pricing process in this time slot, in other words the
simulation of this time slot is ended.
The entire time cycle is divided into 24 time slots representing the 24 hours of one day.
We assume the users willing w is randomly selected from
the interval [1, 4] and remains fixed within the entire day. We
let N = 100 and M = 10. The parameter is set as 0.5, and
the parameters of the cost function of the energy providers are
defined as following:

2.5

We assume the maximum and minimum power requirements


of all users in each time slot are the same and vary in each
time slot. The PMSC knows the maximum and minimum
power requirements and consider them as constant in each
time slot. We define the following maximum and minimum
power requirements of each time slot in table I for each user.

1.5

Max Req

Slot No

Min Req

Max Req

0.6333
1.0667
0.7167
1.0000
0.7667
1.0667
0.9667
1.2833
1.1833
1.3833
0.9500
1.2333

7.9000
9.4000
8.6000
9.1000
12.0000
10.4000
11.8000
13.5000
13.9000
15.6000
13.0000
11.1000

13
14
15
16
17
18
19
20
21
22
23
24

0.8233
0.5833
0.6267
0.2500
0.2567
0.2500
0.2483
0.1200
0.1183
0.1217
0.0833
0.0833

9.7000
7.3000
6.7000
3.5000
3.0000
2.5000
2.5600
1.5600
1.5600
1.5500
0.9000
0.8900

For every energy provider, assume the maximum load


capacity is |N | xkmax , and the optimal load capacity belongs
to the interval [0, |N | xkmax ].
In the next paragraph, we will simulate the performance of
convergence, peak shaving and clipping, the social welfare
respectively. The convergence will illustrate how fast the
convergence of the electricity price in DPAMU is. The peak
shaving and clipping will illustrate the DPAMU can reduce the
peak load and make the load requirements in the time slots
flat. The social welfare will illustrate the DPAMU can benefit
both the energy providers and the subscribers.
A. Convergence Performance
Because the DPAMU is executed in each time slot in the
iterative manner, the number of iteration is very important for
the performance of convergence. If the number of iteration

20
Iteration

25

30

35

40

500
Load Requirement rate=0.2
Generation Capacity rate=0.2
Load Requirement rate=0.5
Generation Capacity rate=0.5

450
400
350
Aggregate Load(kW)

Min Req

1
2
3
4
5
6
7
8
9
10
11
12

15

Fig 2. The convergence of price

TABLE I: The max and min power requirements


Slot No

10

300
250
200
150
100
50
0

10

15

20
Iteration

25

30

35

40

Fig 3. The convergence of load requirement and load capacities

From Fig 2, we found that the price of DPAMU converges


at a stable value in about 15 iterations, and if the percentage of
the malicious users as well as the percentage of the unstable
energy providers varies, the stable values are different. In Fig
2, we found that the prices are negative at some iteration,
which means that the total load capacities of energy providers
are much bigger than the total load requirements from the users
and cause the situation of oversupply. Thus, the electricity
price can be negative in theory before it converges at a stable
value.

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

B. Performance of Peak Shaving and Clipping


In this simulation, we first propose another simple algorithm
named as Flat Price Mechanism (FPM), where there is no
interaction between the energy provider and the users. All
the prices of time slots are equal to each other. All users at
the beginning of each time slot k initialize their own load
requirements randomly, which belong to the range shown in
Table I. We assume there are no malicious users and unstable
energy providers in the simulation of FPM.
We compare the performance of peak shaving and clipping
among the FPM, DPAMU. In DPAMU, we set the rate of
malicious users and unstable energy providers as 0.5. We
firstly simulate the users total load requirements of DPAMU,
FPM respectively in 24 time slot. The simulation result is
shown in Fig 4.
1000
900
DPAMU Total Load
DPAMU Total Capacity
FPM Total Load

800

Aggregate Load(kW)

700

in the 24 time slots, which means the total load capacities are
all used by the users. Besides, the total load curve of DPAMU
in the 24 time slots is more smooth than that of FPM, and the
peak load is shaved and clipped by DPAMU.
C. Social Welfare
According to (9), we can calculate the total social welfare
for each time slot for MMP. In order to compare, we assume
the social welfare of DPAMU is also calculated by (9). The
percentage of malicious users as well as the percentage of the
unstable energy providers is set as [0.5 0.5] respectively. The
social welfare of DPAMU and FPM are compared in Fig 5.
1000
0
1000
Aggregate Social Welfare

In order to illustrate the convergences of the load requirements and the load capacities of energy providers, we set the
combinations of the percentage of malicious users and the
percentage of unstable energy providers as [0.2, 0.2] and [0.5,
0.5] respectively. The number of energy providers is 10, and
the number of users is 100. The simulation result is shown in
Fig 3.
From the Fig 3, we conclude that the total load requirements
and the total load capacities of DPAMU are all convergent at
the same value, and finally they are equal to each other in
about 15 iterations. If the total load requirements are equal to
the total load capacities, there is no waste of the electricity
energy, and the supply and demand is balanced. In Fig 3,
if the percentage of the unstable energy provider becomes
bigger, the number of unstable energy providers identified and
processed by the PMSC is more, which reduces the stable
energy providers and cause the total optimal load capacities
reduced. So, when the percentage of the unstable energy
providers is 0.2, the total load capacities are bigger than that
of the situation, when the percentage of the unstable energy
providers is 0.5.

2000
3000
DPAMU Social Welfare
FPM Social Welfare

4000
5000
6000
7000

10

15

20

25

K=24

Fig 5. Social Welfare when rate=0.5

From the Fig 5, we can conclude that the social welfare


of DPAMU is better than that of FPM, especially when the
time slot is 10. The social welfare of DPAMU in each time
slot almost equals to a same value compared with that of
FPM, which is because the total social welfare of DPAMU
is optimized for the stable energy providers and the nonmalicious users, while the total social welfare of FPM is
decided by the random load from the users.
Besides, the total social welfare of FPM is negative at most
time slots, and that of DPAMU is positive at all the time slots,
which means both the energy providers and the users are all
benefit from the DPAMU. The FPM is harmful to at least one
of them.

600

V. CONCLUSION

500
400
300
200
100
0

10

15

20

25

time slot k

Fig 4. The total load and capacity performance

From the Fig 4, we found that the total load requirements


of DPAMU are equal to the total load capacities of DPAMU

In this paper, we propose a dynamic algorithm DPAMU for


the real-time pricing with the malicious users as well as the
unstable energy providers in the smart grid. The mechanism
of MIP is also proposed to identify and process the malicious
users as well as the unstable energy providers. Simulation
results show that DPAMU is a real-time algorithm for the
demand and response in the smart grid and can shave as well
as clip the peak load effectively.
In future, we can continue researching based on this paper
in the following aspects:
(1) Define the electricity generation cost in more detail, for
example the start stop cost of multiple generators, the line loss

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

This article has been accepted for publication in a future issue of this journal, but has not been fully edited. Content may change prior to final publication. Citation information: DOI
10.1109/JIOT.2015.2452960, IEEE Internet of Things Journal
IEEE INTERNET OF THINGS JOURNAL, VOL. **, NO. **, JULY 2015

of the power, and even the raw material (e.g. coal, gas etc.)
price of electricity generation.
(2) Research the real-time price based on the specific
appliances type, for example define the energy consumption
models and utility functions for air-conditioning, television,
rice cooker, water heater, etc., and research the real-time price
based on the appliances energy consumption models and utility
functions.
(3) Integrate the renewable energy (e.g. wind, solar, hydroenergy, etc.), and research the real-time pricing schema based
on the uncertainty energy source.
(4) Research the distributed algorithms for the real-time
pricing based on some theories, for example the convex
optimization and game theory.

[12] M. Doostizadeh and H. Ghasemi, A day-ahead electricity pricing model


based on smart metering and demand-side management, Energy, vol.
46, no. 1, pp. 221-230, Oct. 2012.
[13] A. Yousefi, and M. Parsa Moghaddam, A probabilistic risk-based approach for spinning reserve provision using day-ahead demand response
program, Energy, vol. 35, no. 5, pp. 1908-1915, May 2010.
[14] Antonio J. Conejo, Juan M. Morales, Luis Baringo, Real-Time Demand
Response Model, IEEE Trans. Smart Grid, vol.1, no.3, pp. 236-242,
Dec. 2010.
[15] Samadi P, Mohsenian-Rad A H, Schober R, et al. Optimal real-time
pricing algorithm based on utility maximization for smart grid, in Proc.
IEEE Smart Grid Communications, pp. 415-420, 2010.
[16] Yu R, Yang W, Rahardja S. Optimal real-time price based on a statistical
demand elasticity model of electricity, in Proc. IEEE Smart Grid
Modeling and Simulation (SGMS), pp. 90-95, 2011.
[17] Weckx S, Driesen J, Dhulst R. Optimal real-time pricing for unbalanced
distribution grids with network constraints, in Proc. IEEE Power and
Energy Society General Meeting (PES), pp. 1-5, 2013.

ACKNOWLEDGMENT
The work presented in this paper was in part funded by
a Project Supported by Scientific Research Fund of Hunan
Provincial Education Department (No. 13C1022), and a Chinese 863 High-Tech Program 5G Cognitive and Virtualization Technologies and Validation (2015AA01A705), and UK
EPSRC Project NIRVANA (EP/L026031/1) and DANCER
(EP/K002643/1). This work is also in part funded by a Project
Supported by Scientific Research Fund of Hunan Provincial
Education Department (No. 13C1023), and a Project supported
by the Natural Science Foundation of Hunan Province, China
(Grant No. 13JJ4052) and a Project supported by the National
Natural Science Foundation of China (Grant No. 61303043).
R EFERENCES
[1] Vardakas, J.S.; Zorba, N.; Verikoukis, C.V., A Survery on Demand
Response Programs in Smart Grids: Pricing Methods and Optimization
Algorithms, IEEE Communications Surveys & Tutorials, 2014, pp. 1-27.
[2] S. Mohagheghi, J. Stoupis, Z. Wang, Z. Li, and H. Kazemzadeh,
Demand response architecture: Integration into the distribution management system, in Proc. IEEE SmartGridComm 2010, pp. 501-506,
Gaithersurg, MA, USA, 4-6 Oct. 2010.
[3] C. Weiwei, X. Wang, J. Petersen, R. Tyagi, and J. Black, Optimal
Scheduling of Demand Response Events for Electric Utilities, IEEE
Trans. Smart Grid, vol.4, no.4, pp. 2309-2319, Dec. 2013.
[4] M. Doostizadeh and H. Ghasemi, A day-ahead electricity pricing model
based on smart metering and demand-side management, Energy, vol.
46, no. 1, pp. 221-230, Oct. 2012.
[5] E. Shayesteh, A. Yousefi, and M. Parsa Moghaddam, A probabilistic
risk-based approach for spinning reserve provision using day-ahead
demand response program, Energy, vol. 35, no. 5, pp. 1908-1915, May
2010.
[6] P. Palensky and D. Dietmar, Demand side management: Demand
response, intelligent energy systems, and smart loads, IEEE Trans. Ind.
Informat., vol. 7, no. 3, pp. 381-388, Aug. 2011.
[7] M. H. Albadi, E.F. El-Saadany, A summary of demand response in
electricity markets, Elect. Power Syst. Res., vol. 78, no. 11, pp. 19891996, Nov. 2008.
[8] H. A. Aalami, M. P. Moghaddam, G. R. Yousefi, Modeling and
prioritizing demand response programs in power markets, Electric
Power Syst. Res., vol. 80, no. 4, pp. 426-435, Apr. 2010.
[9] P. Khajavi, H. Abniki, and A. B. Arani, The role of incentive based
Demand Response programs in smart grid, in Proc. IEEE EEEIC 2011,
Rome, Italy, 8-11 May 2011.
[10] C. Chen, S. Kishore, and L. V. Snyder, An innovative RTP-based
residential power scheduling scheme for smart grids, in Proc. IEEE
ICASSP, pp. 5956-5959, Prague, Czech Republic, 22-27 May 2011.
[11] P. Cappers, C. Goldman, and D. Kathan, Demand response in US
electricity markets: Empirical evidence, Energy, vol. 35, no. 4, pp.15261535, Apr. 2010.

Qiang Tang is currently a lecturer at School of Computer and Communication


Engineering in Changsha University of Science and Technology, Changsha,
China. He received his Ph.D., M.S. and B.E. degrees from Department
of Control Science and Engineering, Huazhong University of Science and
Technology, Wuhan, China, in 2010, 2007 and 2005, respectively. His main
research interests include: wireless networks, smart grid.

Kun Yang is a Full Professor in School of Computer Science and Electronic


Engineering (CSEE), University of Essex, and the Head of the Network
Convergence Laboratory (NCL), University of Essex. He is a Fellow of IET,
Senior Member of IEEE, Member of IEEE ComSoc, and Member of ACM.
He received his PhD degree in network engineering from the Department of
Electronic and Electrical Engineering, University College London (UCL). His
main research interests include: Wireless networks, heterogeneous wireless
networks, network convergence, etc.

Dongdai Zhou got his Ph.D degree in Computer Science and Technology
from Jilin University. He is now working at Northeast Normal University as a
professor and doctoral tutor. His main research interests now include: software
engineering, digital learning environment theory, method and key technology.

Yuansheng Luo got his Ph.D degree in Computer Science and Technology
from Xian jiaotong University and MSc and BSc from Hunan University.
He is now working at Changsha University of Science and Technology as a
lecture. His main research interests now include: service computing, service
composition, wireless networks, mobile computing and data science.

Fei Yu received the B.E. degree from Anhui Normal University in 2007, the
M.S. and Ph.D. degree from College of Information Science and Engineering,
Hunan University, Changsha, China, in 2010 and 2013, respectively. He is
currently a lecturer at School of Computer and Communication Engineering
in Changsha University of Science and Technology, China. He focuses on
radio frequency integrated circuits design and UWB antenna design.

2327-4662 (c) 2015 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See
http://www.ieee.org/publications_standards/publications/rights/index.html for more information.