You are on page 1of 12

Sustainable Cities and Society 48 (2019) 101536

Contents lists available at ScienceDirect

Sustainable Cities and Society


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

A hierarchical distributed predictive control approach for microgrids energy T


management
Le Anh Daoa, Alireza Dehghani-Pilehvarania, Achilleas Markoub, Luca Ferrarinia,

a
Dipartimento di Elettronica, Informazione e Bioingegneria, Politecnico di Milano, P.za L. da Vinci 32, 20133, Milano, Italy
b
Smart Grids Research Unit, School of Electrical and Computer Engineering, National Technical University of Athens, 15780, Zografou, Greece

ARTICLE INFO ABSTRACT

Keywords: This paper addresses the problem of management and coordination of energy resources in a typical microgrid,
Energy management including smart buildings as flexible loads, energy storages and renewables. The overall goal is to provide a
Distributed control comprehensive and innovative framework to maximize the overall benefit, still accounting for possible requests
Model predictive control to change the load profile coming from the grid and leaving every single building or user to balance between
Microgrid
servicing those requests and satisfying his own comfort levels. The user involvement in the decision-making
process is granted by a management and control solution exploiting an innovative distributed model predictive
control approach with coordination. In addition, also a hierarchical structure is proposed, to integrate the dis-
tributed MPC user-side with the microgrid control, also implemented with an MPC technique. The proposed
overall approach has been implemented and tested in several experiments in the laboratory facility for dis-
tributed energy systems (Smart RUE) at NTUA, Athens, Greece. Simulation analysis and results complement the
testing, showing the accuracy and the potential of the method, also in the perspective of implementation.

1. Introduction goal to preserve a given level of user comfort. The solutions for those
problems employ different techniques, such as heuristics (Gu, Wu, &
It is well known that the oscillations of fossil fuel price and the Yuan, 2010), genetic algorithms (Liao, 2010), game theory (Chen &
environmental concerns of their widespread usage have raised the in- Zhu, 2017; Liu, Yu, Wang, & Wang, 2017; Mondal, Misra, & Obaidat,
terest in alternative energy resources, including renewables and 2017) and optimization techniques (Alvarez et al., 2009; Colson,
storages, possibly managed through optimal control strategies. Besides Nehrir, & a Pourmousavi, 2010). More specifically, some research lines
being cleaner, these energy resources can often be placed in the vicinity attack the problem of wisely operating (B)ESS (Battery Energy Storage
of the end users, thus reducing the energy losses related to electricity System) and DERs (Distributed Energy Resources) and modifying pre-
transmission. This entails a radical change in the structure of the energy scheduled consumption profile of flexible loads, possibly involving end-
system, where the new electricity network scenario includes many users in the decision-making process. In particular, (Garcia & Bordons,
small and distributed generators connected to medium and low voltage 2013; Lin, Barooah, & Mathieu, 2017; Parisio et al., 2014; Stadler,
grids, as opposed to a few large generators connected in high voltage. Ashouri, & Marechal, 2016; Taha, Gatsis, & Dong, 2017) discussed the
The concept of microgrid appears to be a promising solution to properly role of the (flexible) load in supporting the grid ancillary services and
address this type of scenario. frequency regulation. Others, like (Deng, Yang, Chow, & Chen, 2015; Li
Accordingly, many research activities flourished recently around et al., 2015), focus on economic or operation optimization of microgrid.
these scenarios, and the development of optimal control solutions is one A particularly useful methodology in the context of microgrid
of them. The typical attacked problems include, for example, econom- management is Model Predictive Control (MPC), which is well-suited to
ical management of the resources to trade with the energy market (Dao, deal with a large amount of constraints of different types that have to be
Piroddi, & Ferrarini, 2015; Dao, Ferrarini, & Piroddi, 2017; Parisio, imposed in real time in a microgrid. This technique has been exploited
Rikos, & Glielmo, 2014), reduction of greenhouse gas emission for example in (Cominesi, Farina, Giulioni, Picasso, & Scattolini, 2018;
(Alvarez, Lopez, Gómez-Aleixandre, & De Abajo, 2009), tracking day- Dao et al., 2017; Ferrarini, Mantovani, & Costanzo, 2014; Garcia &
ahead committed power profile with the distribution network, in pre- Bordons, 2013; Hooshmand, Asghari, & Sharma, 2013; Kriett & Salani,
sence of various disturbances and uncertainties and with the general 2012; Mantovani & Ferrarini, 2015; Parisio et al., 2014; Stadler et al.,


Corresponding author.
E-mail address: Luca.Ferrarini@polimi.it (L. Ferrarini).

https://doi.org/10.1016/j.scs.2019.101536
Received 8 August 2018; Received in revised form 14 February 2019; Accepted 2 April 2019
Available online 27 April 2019
2210-6707/ © 2019 Elsevier Ltd. All rights reserved.
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

2016; Valverde, Bordons, & Rosa, 2016; Zhang, Zhang, Wang, Liu, & distributed optimization for the centralized optimization problem, the
Guo, 2015). In (Dao et al., 2017; Ferrarini et al., 2014; Parisio et al., incremental proximal method is discussed in (Bertsekas, 2011); the
2014) flexible loads are modelled as a predefined amount of possible method is generally believed as a more stable approach than the gra-
load consumption and the microgrid controller can directly determine a dient-based one.
load profile as long as it fulfils the amount. This approach neglects the The present paper addresses the problem of management and co-
dynamics of load flexibility in the shiftable loads category (e.g., ordination of energy resources in a typical microgrid, including flexible
heating/cooling system, refrigerator, washing machine, etc.), since the loads, energy storages and renewables. In the present paper, an in-
size of the predefined range in one step of this load type cannot be fixed novative control scheme is proposed, based on a suitable combination
in advance and it depends on the value of decision variable in the of hierarchical and distributed model predictive control (H-DMPC), in
previous steps. On the other hand, in (Kriett & Salani, 2012; Zhang order to perform economical management of power flows in a micro-
et al., 2015), the load side may reveal its model which later will be grid in grid-connected mode, equipped with RES, an ESS and flexible
formulated in the optimization problem in a centralized controller. loads, that in our modeling metaphor is represented by a group of smart
Concerning the control scheme, some interesting directions have buildings where the thermal comfort is provided by electrical equip-
been discussed lately such as a stochastic model predictive control ment. Basically, the overall microgrid is separated into two layers,
scheme in (Cominesi et al., 2018; Parisio & Glielmo, 2013; Zhang, naming microgrid level and load (or building) level. Any forecast errors
Meng, Wang, Zhu, & Zeng, 2018), or a centralized predictive scheme is are mitigated, taking advantage from the smaller sampling time of the
considered in (Dao et al., 2017; Garcia & Bordons, 2013; Hooshmand negotiation between two levels with respect to the time scale of the
et al., 2013; Kriett & Salani, 2012; Parisio et al., 2014). In particular, it main target factors in the microgrid operation. The microgrid level
is well-known that the centralized scheme presents issues of scalability, manages the ESS and RES to track day-ahead power profile and max-
computational burden, management of the failure of single unit, imize the energy profit through trading electricity activities. To do so, a
adaptability, etc. Recent works are putting more attention to the dis- standard MPC problem is formulated. The load level, on the contrary,
tributed MPC and hierarchical control schemes, such as (Cominesi employs an innovative distributed, shrinking horizon, model predictive
et al., 2018; Rokni, Radmehr, & Zakariazadeh, 2018; Stadler et al., control technique with coordination, to achieve consensus solution for
2016; Tavakoli, Shokridehaki, Marzband, Godina, & Pouresmaeil, 2018; coupled control variables among users/loads/buildings regarding
Yang, Chavali, & Gilboa, 2013). In particular, in (Cominesi et al., 2018) comfort and cost optimization. The technique employs, in the MPC
a two-layer control scheme based MPC operating at two different time framework, iterative, algorithms based on proximal minimization,
scales has been studied. In the paper, some details on the markets (e.g., where the local objective functions of the users are refined by adding
imbalance charge, difference in purchasing and selling tariffs) are ne- penalty terms which penalize a consensus residual factor (see in
glected and flexible load is not considered. On the other hand, the paper (Bertsekas, 2011; Parikh & Boyd, 2013) and references therein). Spe-
(Stadler et al., 2016) employs a sequential distributed MPC for energy cifically, the structure of incremental proximal algorithms in
management problems in the microgrid meaning that only one user can (Bertsekas, 2011) is used in this paper, which allows the loads have a
optimize its cost function at a time which results in significant delay wide autonomy within the microgrid. The technique gives the possi-
when the number of users is large. Moreover, some elements are bility not to share any information except values of the coupled vari-
missing, including the presence of RES (Renewable Energy Resource), ables; direct connections between involved users are not necessary, but
the difference in purchasing and selling tariffs, and the difference in ESS all the exchanged information is collected and evaluated together at
charge and discharge efficiencies. These assumptions lead to formulate every iteration in a central coordination unit which helps to reduce the
an MPC problem in each local controller which is rather simple, instead communication burden and privacy. Low computational load and small
of using Mixed-Integer Quadratic Programming (MIQP) as in (Parisio memory required are other advantages coming from the considered
et al., 2014) or splitting an original variable into multiple variables as technique.
in (Dao et al., 2017). Also, the research focuses on planning level with A few papers including (Kraning, Chu, Lavaei, Boyd, & April, 2014;
1-hour sampling time. On the other hand, parallel distributed sche- Magnússon, Weeraddana, & Fischione, 2015; Shi, Xie, Chu, & Gadh,
duling problems are addressed in (Rokni et al., 2018; Yang et al., 2013) 2015) have been studying the applications of this technique in the
as well as in this paper, instead of sequential one as in (Stadler et al., context energy management of smart grid and microgrids. Beside the
2016). A significant difference is that in the approach here proposed in fundamental differences in the control architecture, control problem, as
this paper different users are coupled by hard constraints on the total well as some technical details in the ESS models, electricity tariffs,
power consumption, while in works like (Yang et al., 2013) users are imbalance charge, the present paper introduces an additional degree of
coupled through the total cost function terms (e.g., user satisfaction freedom in the central coordination unit to evaluate the exchanged
cost, utility bill). Another difference with respect to (Yang et al., 2013) information (or solution) collected from each agent, while the local cost
is that there are additive terms in the cost function of each user, while function of each agent remains unchanged and the weight information
here in this paper the cost function of each user penalizes the deviation is unknown by any agents. In detail, an optimization problem which is a
with respect to a suggestion from a centralized unit (i.e., Load Co- weighted sum of quadratic terms associated with the exchanged in-
ordinator) instead of the difference between two consecutive solutions. formation is considered. The weights are selected based on a common
Moreover, here in this work, the related weight coefficient is an in- rule between the users (e.g., high weight is assigned to the user which
creasing function of the number of iterations, as opposed to the fixed contributes significantly or more trustworthy to the overall system and
ones used in (Rokni et al., 2018; Yang et al., 2013). vice versa). The assumption implies that the exchanged information of
Focusing on distributed MPC (DMPC) applied to the building con- an agent which has high weight with respect to others’ will get more
trol problem, (Walker, Lombardi, Lesecq, & Roshany-Yamchi, 2017) has attention in the evaluation of the central coordination unit.
discussed a non-iterative, non-cooperative DMPC algorithm based on Our research largely extends the studies presented in (Dao et al.,
the classification discussed in (Christofides, Scattolini, Muñoz de la 2017; Mantovani & Ferrarini, 2015; Mantovani, Costanzo, Marinelli, &
Peña, & Liu, 2013); on the other hand, the algorithms in (Álvarez et al., Ferrarini, 2014) which discuss a basic microgrid energy management
2013; Hou et al., 2017; Koehler, Danielson, & Borrelli, 2015) belong to scenario in a centralized model predictive control framework. More-
a class of distributed optimization for the centralized optimization over, the validity of our approach has been investigated and tested in
problem employing different methods, such as the proximal Jacobian both simulation and laboratory environments.
alternating direction method of multipliers (ADMM) in (Hou et al., The rest of the paper is organized as follows. The microgrid setting
2017), the primal-dual active set in (Koehler et al., 2015), the La- and considered scenarios are described in Section 2, the corresponding
grangian dual method in (Álvarez et al., 2013). In the same class of model, control architecture and algorithms are introduced in Section 3.

2
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Fig. 1. Microgrid setting and designed control system (Power flow: gray, bold line; Information, control signal: blue line).

The simulation results and experimental results are illustrated and Notice that, in Fig. 2, the time step term refer to duration of a discrete
discussed in Sections 4 and 5, respectively, before the concluding re- time step while the sampling time term implies rate of running of re-
marks reported in Section 6. lated entities.
The MC is in charge of fulfilling as much as possible the promised
2. Control setting overview hourly profile exchanged with the grid, in front of uncertainties of fu-
ture power production of RES as well as load power consumption and
The microgrid considered in this paper is sketched in Fig. 1. It other disturbances (e.g., weather conditions). Basically, the MC consists
comprises a group of smart buildings which can vary from small to large of a controller and an optimizer. Its controller part decides for the
loads (e.g., residential buildings, airports, shopping districts and com- battery (i.e. ESS) charging and discharging through an MPC-based ap-
mercial buildings), a RES (e.g., wind turbines or photovoltaic panels) proach, denoted as MMPC, that receives as inputs the predicted pro-
and an ESS (Energy Storage System). duction of the RES, the load demand, the time-of-use (TOU) electricity
All components of the microgrid are connected on the same elec- tariffs, the power profile promised to the grid, and aims at the mini-
tricity bus and linked with the main grid by a Point of Common mization of the total energy cost of the microgrid, possibly asking for a
Coupling (PCC), assumed to be closed (grid-connected mode). The is- change of load profile. On the other hand, microgrid planning optimizer
landed mode is not considered here, since one of the objectives is the (MPO) is the optimizer part of the MC which is designed to generate
maximization of the economic benefit related to electricity trading. The references for hourly day-ahead power exchanged through PCC (or for
electricity required to supply the load side can be taken from either the short reference power) considering as input the prediction of day-ahead
RES or the ESS, or purchased from the grid. The electricity in excess RES generated power and load consumption. This optimizer is executed
generated by the RES can be either stored in the ESS or sold to the grid. once a day with the prediction horizon of 24-hour and 1-hour sampling
Smart buildings are here endowed with some flexibility in changing the time which matches to the requirement of the day-ahead market.
load demand to pursue the incentive received from changing its Finally, the MC also takes a responsibility of communicating to the LC a
planned consumption. Such a flexibility is enforced eventually through load change request (or request) for changing their planned consump-
a local smart control system, which takes again the form of an MPC, tion.
which is however out of the scope of the present paper. Although the sampling time of the MMPC is 15 min, the reference
power is given as an hourly profile and its prediction horizon is based
2.1. Overall control architecture on a 1-hour block which causes the variation of the duration of the first
1-hour block of the prediction horizon from 15 min to 60 min. Notice
As shown in Figs. 1 and 2, the microgrid energy management is that the prediction horizon of the MMPC setting is a fixed value as in
separated into two problems, each solved by two different controllers. the standard MPC approach.
They are the Microgrid Coordinator (MC) and Load Coordinator (LC) On the other side, the LC receives the request from the MC, and
and are working with the same timescale, by default set to 15 min. initiates and coordinates an iterative process among buildings to try to

Fig. 2. Overall control architecture of the microgrid.

3
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Fig. 3. Prediction horizon in dynamic shrinking horizon MPC.

fulfil the requests and minimizes costs. After the negotiation phases (i.e., microgrid negotiation phase and
In detail, the LC behaves as an aggregator that (i) initially receives user negotiation phase), which take a few seconds or a minute in both
the request to change load profile from the MC and then dispatches this simulation and laboratory environment, the control phase takes place
information to the load controllers, (ii) receives the response from load for both the BMPC and the MMPC for the rest of the sampling time.
controllers, (iii) computes (optimally) and distributes new load power
profiles, iterates until an agreement is reached. More specifically, each 2.2. Control objectives
building is equipped with an MPC-based controller for negotiation
(denoted as BMPC) that works with the same sampling time as the This section provides an overview on the objectives, both technical
MMPC, but the formulation is based on a 15-minute block. This dif- and economic ones, imposed to the controllers at the microgrid and
ference in both the sampling time and the length of each time step building levels.
generates a special setting of the prediction horizon (denoted as dy- For the main control objectives in MMPC, a similar approach as the
namic shrinking horizon) of the BMPC as depicted in Fig. 3. While a one in (Dao et al., 2017) has been here developed, including energy
normal MPC rolls the prediction horizon over time steps with a fixed profit maximization, minimization of imbalance charges and smooth-
length of the horizon, in the dynamic shrinking horizon the prediction ness of the power flow terms. As for the MPO, only the first and third
horizon is changed while rolling. As for communication between Mi- terms in the above control objectives are considered. Due to the present
crogrid and Load level, at the beginning of each time instant, the BMPC of the “if-else” condition in this microgrid level, their optimization
receives the request (i.e., maximum change of total local consumption) problems are formulated as MIQP ones which are solved by using
from microgrid. Then, following the iterative distributed MPC with a ILOG’s CPLEX 12.8 (an efficient solver based on branch-and-cut algo-
coordinator framework, the level of change for each of them is estab- rithm).
lished by way of an interaction and negotiation process among the local As for the BMPC, the main control objectives are considered as
controllers. For the sake of simplicity, only the planning level (or high- follows:
level controller BMPC) is here discussed for the load controller while
the low-level control system is not included. However, some level of • Energy cost minimization – Buildings exploit variation of the market
disturbances for the load side is still presented by assuming that the real tariffs to consume energy in such a way that minimizes the cost for
consumption of the buildings equals to the planned load consumption heating system in the building.
plus white noises. • Incentive maximization – The load power profile can be modified in
The process of solving the MPO, MMPC and exchanging information the interest of the entire microgrid regarding the incentive. The
between the MC and the LC is named as microgrid negotiation phase, higher the change, the greater incentive load side will receive for the
while we denote user negotiation phase as the process of solving the compensation.
BMPCs and exchanging information between the LC and the BMPCs. • User comfort maximization – Even though the changing of the desired
Notice that only one cycle of negotiation between the MC and the LC is load consumption may result in the incentive maximization and
studied in this paper, while multiple cycles consideration is instead a energy cost minimization for the users, it basically brings the actual
subject of future work. The communication between these units are temperature of the building away from the setpoint. Therefore, the
depicted also in Fig. 4. end-users should also track their setpoint to maximize their comfort.

Fig. 4. Distributed control system architecture.

4
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Although the combination of MMPC, MPO, LC and BMPC in the uncoupled decision variables (denoted as x j, u ) and the sum of coupled
control architecture is one of innovative points of our paper, the de- decision variables of all users except user j (denoted as x j, c ) as a new
tailed development of the individual control systems in MC level MMPC decision variable. Subsequently, the coupled constraints Xc in Eq. (1)
and MPO, in another hand, can be found in (Dao et al., 2017; Parisio will be presented in the form (xj, c , xj, c ) Xj (i.e., the local constraint
et al., 2014). For example, the considered cost function terms are si- sets) for every users j. The pseudo–code of the algorithm is given in
milar to the ones in (Dao et al., 2017); the way these terms are treated Algorithm 1 as below where x̄ j, c and x̄ j, c are denoted as setpoints
in MIQP is presented in (Parisio et al., 2014); and the system models are computed by the LC for the coupled variables of user j and the sum of
found in both works. As the following, we will not discuss further the coupled decision variables of all users except user j and x¯c is collection
design of the microgrid coordinator but putting more focus on the of x̄ j, c for all users.

Algorithm 1: Distributed algorithm (General scheme)


1 Initialization
2 Set t = 0
3 (BMPC) x (0) j = argmin xj Xj f j (xj ) for all users
m
4 Set x¯ j(0) (0) (0)
, c = x j, c ; x¯ j, c =
(0)
h = 1, h j x¯h, c
5 For t = 1: L repeat until satisfying (*).
6 (BMPC) x (j t ) = argmin xj, c, xj,u, xj,c Xj f j (xj ) + c (t ) ( xj, c x¯ (j,tc 1) 22 + xj,c x¯ (j,tc 1) 22 ) for all users
7 If |x (j,tc) (n) x¯ (j,tc 1) (n)| < (n) and |x (j,tc) (n ) x¯ (j,tc 1) (n) | < (n) (*) is satisfied 2
m m m
8 Otherwise, (LC) x¯c (t ) = argmin x¯1, c , x¯2, c, … , x¯m,c ( j = 1 Qj x¯j, c x (j,tc) 22 + j = 1 Qj h = 1, h j x¯ h, c x j(,tc) )
m 2
9 (LC) x¯ j(,tc) = h = 1,h j x¯h(t, c)
10 t t + 1, go to step 5

building controllers (LC and BMPC, Section 3). Initially, each user j declares its desired solution x j(0) by solving its
original cost function in step 3. An initial value of x j(0) , c and x j, c are
(0)

3. Design of load coordinator (LC) and building controllers chosen as in step 4. Two different stopping criteria are presented in step
(BMPC) 5 and step 7 where the first one is based on the maximum number of
iterations and the later one is based on absolute value of the difference
In this paper, residential buildings equipped with electricity-pow- in the solutions x j, c and x j, c computed by the users at iteration t with
ered heating systems are considered (e.g., a heat pump) and they are respect to the corresponding setpoints x̄ j, c and x̄ j, c computed by LC at
managed by the BMPCs to satisfy user comfort (temperature) and iteration (t-1). The index n in the algorithm (step 7) presents the n-th
economic purposes. This section starts with the general scheme of the element of the related vectors x j(,tc) , x j(,tc) , x¯ j(,tc 1) , x̄ j(,tc 1) and (i.e., the
distributed algorithm, and then the development of the BMPC in the threshold of the second stopping criteria); h in steps 4, 8, 9 is a the
buildings will be studied. running index which indicates the users. The term c (t ) in step 6 high-
lights the importance of the consensus term in the objective function. As
3.1. Nomenclature t increases, the role of the consensus term is being weighted higher to
motivate the agreement among the users. An increasing function with
The main parameters and decision variables used in this section are respect to t is employed for c (t ) . At every iteration t, the same value of
described in Table 1, where, for simplicity, the subscript i is omitted c (t ) is used for all users (or BMPC) in the synchronous setting of the
when referring to the i-th step ahead in the prediction (or control) distributed algorithm. A trivial option for c (t ) could be c (t ) = . t , where
horizon. is a positive constant number which plays as an extra degree of
freedom to modify the step size. Qj stands for the weight associated to
3.2. General scheme of the distributed algorithm the solution on the decision variables x j, c and x j, c of user j in the LC, if a
higher weight is imposed, then the solution of the corresponding user is
This section considers a general scenario of a network of m users (or
better, “agents”) that communicate to a central coordination unit to Table 1
cooperatively solve a problem of sharing resources (e.g., ESS, RES or Main nomenclature in the building level.
the request in the context of this paper) among them. The original form k Discrete time step based on 15-minutes sampling time
of the optimization problem of user j is presented as follows:
m Number of users involving to the building levels
Pj : min xj Rnj f j (xj ); subject to xj Xj and (x1, x2 , …, xm) Xc (1) NB Prediction and control horizon of the BMPC
T s, B Sampling time of the building level [Hour]
where x j nj represents a vector of nj decision variables of user j and
I Benefit tariff from changing planned consumption for users
denotes the set of real numbers. For each user j, f j (.): nj , (cents/Wh)
Xj nj and X Rnc are objective function, constraint set of user j and
c Pku, j , Power consumption of the building j [W]
the set of coupled constraints between the control variables of the users. The change of planned power consumption of the building j and
dPku,j , dPku,,j
The function f j (.) is convex, and Xj and Xc are closed convex sets for the change of planned power consumption for all buildings except
each j = 1, 2, …, m. To solve this optimization problem, a distributed building j at time k, respectively [W]
¯
algorithm with coordinator is here proposed based on the incremental ¯
dPku,j , dPku,,j Setpoints computed by LC for dPku,j and dPku,,j , respectively [W]
proximal method. Specifically, in this algorithm, for each user j an R̄k Request for power changing from microgrid level to building level
additive cost function term is integrated to f j (.), in order to motivate for time instant k [W]
Temperature and temperature setpoint of building j at time k
the agreement among users. The presence of the additive cost function Tkj, T¯k j
term causes the enlargement of the control variable sets and the change j
Tmax j
Tmin Upper and lower bounds on the building j’s temperature
respectively
of the constraint sets of individual optimization problem Pj . Therefore, u, j
Pmax u, j
, Pmin Upper and lower bounds on power consumption of the building j,
the set of control variables x j of the j-th user consists of coupled decision respectively,
variables (i.e. those linked to coupled constraints and denoted as x j, c ),

5
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

fulfilled more strictly in the unconstrained optimization problem (step related to the additive cost function term in the algorithm. All the cost
8). function terms should be expressed as function of the decision variables
Ufj of building j’s in the form of:
3.3. Building MPC (BMPC) cost function terms and constraints min J = Uf T AUf + BUf + C , subject to: D2 Uf b (6)
As mentioned before, every building is endowed with two con- where A, B, C , D2 and b are the suitable matrices. The considered cost
trollers: one is used in the negotiation with other users and works with function includes several additive terms spanning the whole prediction
15-minute sampling time (this is the BMPC), and the other one is for horizon, which address different objectives as explained in the fol-
comfort enforcement (e.g., temperature control in this paper context) lowing.
working with a much smaller sampling time, trying to track the deci-
sion taken by the negotiation unit. The second one is neglected in this 3.3.1.1. Temperature set-point tracking ( J T ). A quadratic term is
paper as discussed in Section 2. To assess the performance of the pro- considered to motivate the predicted temperature Tkj, i to stay close to
posed approach in the building level, the following s-domain transfer temperature setpoint T̄k, i j . In our model, a constant setpoint is
function G (s ) from the heating power (input) to building temperature employed. However, any variation of the setpoint will not change the
(output) has been employed: considered formulation.
4 NB
G 1 (s ) =
1 + 24500 (27) J T ,j = (Tkj, i T¯k, i j )2
i=1 (7)
The maximum power of the building heating system is 3 kW and the
gain of the model is 4 °C/kW. The model is derived around an equili-
brium point (12 °C, 0 kW). 3.3.1.2. Electricity consumption cost ( J M ). The electricity consumption
Denote the decision variable of building j for time k as ukj , NB is the cost of a building is trivially computed as the product of the electricity
j
prediction and control horizon of the BMPC, Yˆ = [Tkj,1…Tkj, NB ]T is the tariff, sampling time and the consumed power (Pku,,ij ) which is an
vector of estimated building temperature of user j. Note that the value element of the control variable Ufj . Remind that in case of purchasing
of NB is changing following the dynamic shrinking horizon depicted in electricity from the grid or from the microgrid level, the same tariff of
T T
Fig. 3. Let also Ufj = [ukj,1 …ukj, NB ]T be the vector of future control ac- purchasing (cb) is applied. Therefore, over NB step prediction horizon,
tions. Then, one can express the vector of output prediction Ŷ as:
j the electricity cost function can be formulated as follows:
NB
j
Yˆ = Sfj Ufj (3) J M ,j = ckb, i Pku,,ij T s, B
i=1 (8)
where Sfj is a suitable coefficient matrix which is derived from the
building thermal model. Defining decision vector as T s, B takes a value of 0.25 which equals to the duration of one step in
ukj = [Pku, j dPku, j dPku,, j ]T . Refer to the algorithm 1, Pku, j , dPku, j and dPku,, j play the BMPC in 1-hour unit (i.e., 15 min). Notice that the difference be-
roles of uncoupled, coupled and the sum of coupled decision variables tween the tariff of electricity sold from the microgrid level to the
of all users except user j variables, respectively. As opposed to the building level (cs) and the tariff of electricity purchased by the building
MMPC, the BMPC optimization problem is formulated in the form of level from the microgrid level (cb) (notice that cb is more expensive than
standard Quadratic Programming (QP) where binary variables are not cs) generates a fund for the overall microgrid. At the end of a certain
presented. Moreover, the discrete time step k is here considered base on period, this fund will be distributed proportionally among the users
15-minute basis. based on their contribution in supporting the microgrid level in redu-
Notice that the starting point of the activities in LC and BMPC is the cing the imbalance charge.
request sent from MC to LC. At time k, if we present Pkg,,iplan as the
average planned PCC power computed by the MMPC for the remaining 3.3.1.3. Benefit from changing planned consumption ( J B ). In response to
period of the i-th 1-hour block of the prediction horizon, Pkref , i as the the request from the MC to the building level at discrete time k for i-th
reference power at time instant k + i and Pkexe , i as the average of power step ahead in BMPC prediction horizon (denoted as R̄k,i ), each building
already flowed through PCC within the i-th 1-hour block of the pre- decides to change with respect to its planned consumption committed
diction horizon, then the corresponding average of the request power in the previous step. Given the benefit tariff (I) and the power change
sent to the LC can be computed as follows: (dPku,,ij ) , the benefit obtained is described as follows:
Pkref
,i Pkg,,iexe (1 Tks, i ) Pkg,,iplan Tks, i NB
R¯ k, i = J B, j = I .sign (R¯ k,i ). dPku,,ij .T s, B
Tks, i (4) (9)
i=1

3.3.1. Building MPC cost function terms 3.3.1.4. Consensus term ( J A ). As discussed, this term is designed to
The cost function of the BMPC for each building j includes several force the BMPCs to reach an agreement. In response to the desired
terms, that address different objectives: solutions of the BMPCs, the LC provides updated set-point dP¯ku,,ij and
J j = wTj J
T ,j
+ wMj J
M, j
+ wBj J
B, j
+ wAj J
A, j
(5) dP u¯ , j for each building j to be used in the following term:
k , i,
NB
where wTj , wMj , wBj and wAj are weight coefficients and J M , j , J T , j , J B, j and
J A, j = (dPku,,ij dP¯ku,,ij )2 + (dPku,,ij dPk¯u,,ij ) 2
J A, j are cost terms that account for temperature set-point tracking, (10)
i=1
electricity consumption cost, benefit from changing planned con-
sumption and consensus terms associated to building j for reaching an
agreement; while wTj , wMj , wBj take constant values, wAj instead is an 3.3.2. Building MPC constraints
increasing term during the user negotiation phase which equals to c (t ) 3.3.2.1. Building temperature constraints. Besides tracking the set-point,
presented in the previous subsection. According to algorithm 1, the each building needs to consider the maximum and minimum values for
general formulation of the J j is the one in step 3 and step 6 of the its temperature as hard constraints:
algorithm. In fact, the first three terms in the cost function J j present j
the original local objective function of each user, while the last term is Tmin Tkj, i j
T max (11)

6
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

3.3.2.2. Constraints on heating system power. Practically, the heating laboratory components (e.g., 15-kWh lead-acid storage system, 1 kW
system has lower and upper power bounds for its consumption that are lamps, PV panels, etc.) and SCADA (Supervisory Control And Data
defined as follows: Acquisition) system can be found in (Kotsampopoulos, Kleftakis, &
u, j Hatziargyriou, 2017; Messinis et al., 2014).
Pmin Pku,,ij u, j
Pmax (12)
u, j
Pmax takes a positive value and u, j
Pmin is basically equal to zero when the 4.2. Architecture
heating system is off.
The overall control scheme used in the testing facilities is described
3.3.2.3. Change of planned power consumption constraints. In response to in Fig. 4. While the ESS, the RES, PCC are the real equipment of Smart
the request from the MC, user j sends dPku,,ij and dPku,,ij, to the LC. Both RUE network connected to the local LV grid, the buildings are simu-
dPku,,ij and dPku,,ij, can take either negative or positive values which stand lated, and the related power consumption is implemented in the mi-
for decreasing or increasing with respect to their planned power crogrid network using the dump load.
consumption correspondingly. At first, these control variables need to In the tests, the developed algorithm has been separated and exe-
fulfill the following equalities: cuted in two different personal computers, equipped with Generation
u ,j Intel® Core™ i7 processor with 3.5 GHz and 2.7 GHz frequency. In the
Pku,,ij = Pk,plan + dPku,,ij, i = 1, …, NB (13)
i
first computer, the MMPC and the MPO are installed, while the tasks of
where
u
Pk,plan
,j
is the planned power consumption of the building j for the LC and the BMPC are executed in the second computer. To simulate
i
u ,j the proposed distributed algorithm, the BMPCs are performed in par-
time instant k + i. Notice that Pk,plan will be updated by corresponding
i
allel by using MATLAB (version r2017a) parallel computing toolbox in
elements of Pku,,ij when we move to the next time instant. To compute an
u ,j
the second computer. In the end, the iteratively exchanged information
initial value of the Pk,plani , the BMPC focuses only on tracking between these two parts has been done through TCP/IP connection. On
temperature setpoint. The same consideration takes place at the first the other hand, UDP protocol is used to control the load and the ESS in
u ,j
sampling time of each 1-hour block to compute an initial value of Pk,plan i the laboratory. For practical reasons, the load consumption in the la-
for the last 1-hour block of the prediction horizon as the prediction boratory is discretized into 10 different levels (i.e., 0, 80, 180, 280, 360,
u ,j
horizon NB of the BMPC is extended with respect to the size of Pk plan 1, i in 460, 540, 640, 720, 820, 920 W), which are modulated in time in order
the previous step (refer to Fig. 3, Section 2). to reach the desired values asked by the LC. Clearly, the buildings
If we represent R¯ = [R¯ k,1…R¯ k, NB ]T as the vector of the request at time power has been scaled down to match the nominal dump load in the
instant k for the NB steps ahead, the following constraints are assigned lab.
to the system:

a) In the original form of Xc in Eq. (1): 4.3. Experimental parameters and scenarios
m
A set of two experiments has been carried out to investigate dif-
0 dPku,,ij R¯ k, i , if R¯ k, i 0
j=1
ferent aspects of the designed approach, with different control settings
m i = 1, …, NB and under different environmental situations. Unless otherwise stated,
0 dPku,,ij R¯ k, i , if R¯ k, i < 0 the parameter values listed in Table 2 are adopted in all the experi-
j=1 (37a) ments, where ttest is the total period of an experiment or simulation;
NMPO , NM and NB are the prediction or control horizon of MPC in the
• In the form in algorithm 1 MPO, MMPC and BMPC correspondingly.
The value (refer to algorithm 1), is set to 0.1 both in the experi-
0 dPku,,ij R¯ k, i ments and the simulation, which represents a step of 0.1 in increasing
if R¯ k, i 0, i = 1, …, NB the weight of coupled terms in each user cost function. In the experi-
0 dPku,,ij + dPku,,ij, R¯ k, i
ments and simulations, the stop criterion of the proposed approach is
0 dPku,,ij R¯ k, i set as in the algorithm 1, where the maximum number of iteration
if R¯ k, i < 0, i = 1, …, NB
0 dPku,,ij + dPku,,ij, R¯ k, i L = 200 or L = 2000 and the vector of values is chosen small enough –
(37b) i.e. corresponding to 0.1% or 0.01% of the vector of the request during
These constraints highlight the fact that, at the end, the total change the prediction horizon from the microgrid level, in the experiment or
of the planned power consumption of all the building and single simulations, respectively. The efficiencies of the battery have been
building should not go further than the request. Notice that the request manually computed at around 38.4–56.7% for both charging ( c ) and
power at each time instant within the prediction horizon of the BMPC discharging ( d ) . However, a value of 65% is considered for ESS effi-
equals average request power of the corresponding 1-hour block men- ciencies inside the microgrid coordinator, to introduce as a possible
tioned in Eq. (4). model mismatch for ESS model with respect to reality. The maximum
In the next two sections, the main results obtained with real ex-
perimental testing and simulation are illustrated and discussed. Table 2
Simulation and experiment parameters.
4. Experimental results Parameter Unit Value Parameter Unit Value

b, D W 500 Ts Minute 15-60


4.1. Experimental facility description Pmax
b, C
Pmax W 500 T s, B Minute 15
[%] SOCini -7.5 Minute 240
The experimental validation of the proposed control algorithm was b
SOCmin ttest

performed at Smart RUE (Smart grid Research Unit of the Electrical and b
SOCmax [%] SOCini +4.5 NB – 9-12

Computer Engineering school), within the ERIGrid project, financing Cb KWh 13.5 NM – 3
[%] 65 NMPO – 9
the access to European smart grid infrastructures. In these experiments, c
[%] 65 m – 4
the test facility provides a small-scale, single phase microgrid operating d
L 200 or 2000 PEN Cents /kWh 10
in both grid connected mode to the local LV (Low Voltage) grid or in – 0.1 I Cents /kWh 5
islanded mode (Messinis et al., 2014). Detailed description of the

7
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Table 3 Table 4
Cost function weights tuning in different optimizers. Experimental and Simulation results.
Building MPC (BMPC) ID ERES ERRES EL,s EB IMG CMG
Benefit type: wT ,1 = 3, wT ,2 = 6 wM , j = [1, 1,1, 1] wB, j = [1,1, 1,1] Unit Wh % Wh Wh Cent Cent
Comfort type: wT ,3 = 48, wT ,4 = 96
Load Coordinator (LC) Experimental Results
Qj = [1,1, 1,1] E1 2554 3.1 1801 65.93 −6.32 0.10
E2 937.5 28.9 1677 −253.21 −5.94 −4.97
Microgrid MPC (MMPC)
Simulation Results
wP = 1 wR = 0.03 wC = 1
E2-SIM 937.5 28.9 1675 −234.55 −5.56 −3.04
Microgrid Planning Optimizer (MPO)
FLEX 2812.5 0 4970 −212.9 −8.06 −18.02
wR, O = 0.03 wC , O = 1
FLEX1 2812.5 14.5 5017 −191.2 −11.71 −22.98
FLEX2 2812.5 28.9 5183 −191.2 −14.42 −25.33
CEN 2812.5 0 4963 −189.2 −8.22 −18.49
power ESS charge and discharge power (i.e., Pmax b, D
and Pmax
b, C
) are also FIX 2812.5 0 5056 −191.2 −15.26 −34.29
limited to 500 W which allows the ESS in the laboratory performing
properly. To match the sizes of other involved components, only a
portion of the ESS is employed in the experiments, the lower 4 Energy flowed through ESS (EB)
(SOCminb
) and upper limits (SOCmax
b
) of SOC (State of Charge) of the ESS 5 Imbalance charge for overall microgrid (IMG)
are 4.5% and 7.5% lower or higher than the measured SOC at the be- 6 Total energy cost for overall microgrid including the users on 4 h
ginning of any experiment (denoted as SOCini ) respectively. The hard basis (CMG) including cost for energy imbalance charge
constraints on minimum and maximum temperature for each building
(i.e., Tmin
j
and Tmax
j
) are set equal to 1 °C lower and higher than its Positive values for the cost indicators represent earning and nega-
temperature setpoint, respectively. tive values represent a cost for the related entities. For the energy in-
Regarding the cost function weights, they are chosen to balance the dicators, the users always consume energy. The RES always produces
overall cost for both microgrid and users. Small or large values of wT , j energy. The value of ERRES for the whole simulation period is measured
determines if the buildings are benefit or comfort type. The chosen based on the Root Mean Square Error (RMSE) criterion as follows:
values for different weights are illustrated in Table 3. NB R
i = 1 (Pk , i PkR+ i)2
The experiments duration was of several hours, thus catching the N
100% k=1 NB
short-term variability of RES, high variation of the trading electricity ERRES =
M N (16)
tariff in hourly.
As mentioned, the RES power generation prediction is performed by where M is the maximum generated power (M = 600 W) of the RES
using the persistent method. This working assumption is functional to during the test days and N is the number of time steps of the whole
the objective of this paper, which is not to develop novel predictor al- simulation period.
gorithms, but to assess the effect of good and bad predictions on the
control architecture. 4.4. Experimental results
The following experiments, all involving PV panels, buildings and
ESS, are performed: 4.4.1. (Summer) Open Loop (OL) PCC power
The objective of E1 experiment is to test the overall control archi-
1 E1. (Summer) open loop PCC Power tecture with a PV as a source of renewable energy during summer
2 E2. (Winter) closed loop PCC Power period in a sunny day. This test is approximately 5.5 h long and started
at 1:00 pm. To be consistent with the duration of the other experiments
In the first experiment, the MMPC acts in open loop for the PCC and simulation, only the results tested in the first 4 h are reported.
power measurement setting, while E2 acts in closed loop setting. The Random values for day-ahead promised power were assigned in this
difference between these schemes is on how to set Pkg,,iexe value in the test. Sampling time of 20 min for Ts,B and penalty tariff of 12 cents/kWh
following equation: are also chosen.
The temperature setpoints are 21 °C for user 1 and user 3, and
Pkref Pkg,,iexe (1 Tks, i )
21.5 °C for user 2 and user 4. Users consumption profile was set to a
,i
Pkg,,isp =
Tks, i (15) constant value which can keep the buildings’ temperature to track
At time k, denote as the reference power at time instant k + i
Pkref perfectly the temperature setpoints and this profile is known by the
,i
and Pkexe , i as the average of power already flowed through PCC within the
MMPC. MPO is not present in this test so that the reference power is
i-th 1-hour block of the prediction horizon, then the Pkg,,isp (i.e., setpoint randomly assigned. The initial temperature of each building is set to be
for the exchanged power flow at the PCC to track in i-th 1-hour block). equal to its setpoint.
Then, it is clear that the Pkg,,iexe takes zero value for every i = 2, …, Nm as As can be seen from the left figure of Fig. 5, the total power flow
there is no power flow through PCC during the 1-hour blocks following through PCC computed by our algorithm follows quite closely the re-
the first one, and so Pkg,,isp = Pkref
, i as a consequence. In fact, Pk , i
g , exe
takes a ference power profile. However, the actual PCC differs by a larger
value equal to the average of PCC power measured within the i-th 1- quantity due to the RES prediction error and to the control error in both
hour block in the closed loop setting, while in the open loop setting ESS and load side. This behavior highlighted the necessity of further
Pkg,,iexe presents the estimation value of the same factor under assump- investigation on the closed loop PCC power measurement which was
tions that there is no difference between estimated and measured values addressed in E2.
of ESS, RES and load power. Another main difference between E1 and
E2 is on the period of the tests, where E1 is tested during summer, while 4.4.2. (Winter) closed loop (CL) PCC power
E2 is tested during winter. For each test and experiment, the following Similar settings of E1 are applied to E2 during a winter period and a
values are computed (Table 4): cloudy erratic weather day, which caused a higher error in RES gen-
erated power prediction. This test was 4 h long and started at 1:00 pm.
1 Energy produced from RES (ERES) The system is operated in closed loop with respect to PCC power.
2 Prediction error for RES produced energy (ERRES) Another modification of E1 that results in E2 was the introduction of
3 Scaled total energy consumed by users (EL, s) the MPO which is expected to provide a better value for the reference

8
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Fig. 5. Result of the first and second experiments (E1: left figure and E2: right figure), subplot 1: power flow through all the involved components, subplot 2: PCC
power (1-min average, PPcc), PCC power (1-hour average, PPcc, Avg), reference power (PPcc, Promise), PCC power computed (PPcc, Avg, CP), subplot 3: ESS power (1-min
average, PBESS), ESS power (1-hour average, PBESS, Avg), ESS power computed (PBESS, Avg, CP).

discharge efficiencies of the simulated ESS (i.e., the ESS model em-
ployed as the real ESS in the simulation environment) are 50.9% and
47.1%, respectively which are derived from average performance of the
real ESS. Quite similar values for most of the indicators are observed
between E2 and E2-SIM in Table 4. The differences can be explained by
the simple simulated ESS model which cannot catch some behaviors
such as self-discharge, highly nonlinear SOC of the real one.

5. Simulation results

Three sets of simulations are here illustrated to point out different


Fig. 6. Power quality in the experiment E2. characteristics of the system which are the impact of the flexible load,
RES generated power prediction error and comparison of the proposed
control techniques, as follows:
power than the one in E1. Different daily electricity tariffs are also
tested, the variation of which between two consecutive hours is higher 1 S1. Comparison between fixed and flexible load;
in E2 than in E1. Notice that these electricity tariffs are used in all the 2 S1. Comparison between different levels of RES generated power
simulations and all monetary items in this paper are denominated in prediction errors;
euro (€). 3 S1. Comparison between the proposed DMPC and centralized MPC
Another source of prediction error is introduced by short-term PV in the building level;
prediction in MMPC and long/medium-term prediction in the MPO and
they certainly have different quality performance in prediction. Despite The starting point of all the simulations is the second experiment
the presence of various prediction and control errors, the total power (E2). Comparing to E2, the closest simulation is FLEX where the E2′s
flowing through PCC computed by our approach tracks very well the system settings, parameters and RES generated power are employed in
reference power and similar performance for the PCC actual power, this simulation. However, the considered RES prediction herein is the
since the feedback of PCC power measurement is considered in the perfect one which implies that the prediction and measured values are
MMPC. As shown in right figure of Fig. 5, the microgrid tends to export identical. On the other hand, the number of buildings involving is also
electricity during the peak period and import electricity during off-peak change from four buildings in E2 to 12 buildings in our simulation
hours which brings monetary benefit. An additional experiment has which can be represented by replicating four building types introduced
been performed, to evaluate the algorithm in the case that Qj are dif- in Table 3 for three different building models as follows:
ferent numbers, to represent different roles of each user within the
microgrid. However, due to space limitation, this experiment results are 4 5 6
G 1 (s ) = ; G2 (s ) = ; G3 (s ) =
not here reported. Regarding the power quality of the microgrid, the 1 + 24500 1 + 25200s 1 + 25200s (39)
measured voltage and frequency of the grid and the battery inverter are Accordingly, the PV production is also increased three time to
measured and reported in Fig. 6. The results show an acceptable power match someway to the level of the consumption side. However, the size
quality during the operation of our experiment as (i) the frequency of the ESS (i.e., power, capacity, SOC limits) remains unchanged to
stays around 50 (Hz) with maximum deviation is 0.06 (Hz) and (ii) the promote better the role of the flexible load in our simulations.
voltage (RMS value) is from 222 to 234 (V) which accounts for max- Moreover, compared to E2, estimated ESS model is considered in the
imum 3.5% deviation from the nominal value of 230 (V). simulation environment while the real ESS is tested in E2. A better BESS
At the end, as the quality of ESS power, load control and so PCC with respect to the one in the experiments is employed in the simulation
power control are well regulated, the experimental results of E2 and its with the charge and discharge efficiencies of 65% in ESS model con-
equivalent version for simulation (i.e., same parameters values, ESS, sidered in MPC formulation of the MPO and the MMPC, while in the
measured and predicted RES power, etc.) are expected to provide very simulated ESS, 55% of the charge and discharge efficiencies is con-
similar if the real ESS and simulated ESS are the same. The E2-SIM is a sidered to provide another source of model mismatch in the simulation.
simulation version of E2 with only difference is that the charge and Four different alternative versions of the FLEX will be studied which

9
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Fig. 7. Reference power tracking (left figure) and Net bill for all users (right figure) for FLEX, CEN and FIX.

are labeled as FLEX1, FLEX2, FIX and CEN. Detailed description of these the net bills for benefit type users with respect to the comfort type users
simulations will be reported in the following section while the simu- is observed Fig. 7. Regarding the building models, the users of the first
lation results are shown in Figs. 7 and 8 and Table 4. building model (i.e., user 1, 2, 3 and 4) gain more money than the users
of second and third building models (i.e., user 5, 6, 7, 8 and user 9, 10,
5.1. S1: fixed and flexible load comparison 11, 12 respectively) as the first building model has less gain and longer
time constants which allows the buildings of this type change their
With respect to the FLEX, the FIX does not consider load flexibility. expected power profile with less change in their comfort.
This simulation is the case when there is no microgrid negotiation and
user negotiation phases.
As shown in Table 4, the overall microgrid reduces significantly the 5.2. S2: Different levels of RES generated power prediction error
cost from 34.29 cents in the FIX to 18.02 cents in the FLEX. Specifically, comparison
the net benefit for the microgrid level (i.e., imbalance charge, energy
cost for microgrid level, incentive paid to the users) increases from This section is devoted to make a comparison between different
23.79 cents in the FIX to 25.37 cents in the FLEX which is equivalent to versions of the FLEX where the levels of prediction error ranges from
6.6% improvement. In fact, Fig. 7 shows a better reference power 0% (i.e. perfect short-term prediction) in the FLEX to 28.9% (the short-
tracking in the case of the FLEX instead of the FIX which will, therefore, term prediction used in E2 during the experiment) in FLEX2. An in-
reduce the imbalance charge for microgrid level. However, it is clear termediate prediction error level 14.5% in FLEX1 whose predictions are
that the levels of comfort of the users in FIX (i.e., users in FIX focus only manipulated by mixing the prediction values of FLEX2 and perfect
on temperature tracking) are much higher than the ones in FLEX since prediction values in FLEX. The results are summarized in Table 4 that
in FLEX the users changed their initial expected power consumption to shows a significant improvement in the cost for the overall microgrid
support the overall microgrid (see Fig. 8). when improving the quality of the prediction. Better planning for the
Regarding the users’ bill, their net bills are computed by subtracting ESS activities and the requested power to the building level are obvious
the energy cost and the incentives acquired from the MC and the mi- reasons for this improvement. As a matter of fact, a large difference in
crogrid fund; positive values represent earning and negative values terms of the overall microgrid cost is observed between the worst (i.e.,
represent a cost for the related entities. This information is shown in ERRES = 28.9%) and the best case (i.e., ERRES = 0%). A part of this
Fig. 7 which indicates a significant improvement in the net bill for all difference comes from the quality of the reference power tracking in
users by considering the load flexibility. For the sake of comparison, these simulations as shown in Fig. 7 which results in the imbalance
although the users in the FIX case do not contribute to reducing the charge paid to the main grid being 8.06 cents, 11.71 cents, and 14.42
imbalance charge for microgrid level, the microgrid fund is still dis- cents for FLEX, FLEX1, and FLEX2, respectively.
tributed equally to each of them. Clearly, significant improvement in

Fig. 8. Building temperature of each user in FLEX.

10
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Fig. 9. An example on the difference between solutions from distributed and centralized MPC.

5.3. S3: distributed MPC with coordinator and centralized MPC way, and according to a predictive approach. In the hierarchical control
framework, the microgrid level, which employs a standard MPC fra-
This simulation focuses on evaluating the results obtained from the mework in managing the microgrid operation, is combined to the
proposed distributed algorithm with respect to the centralized MPC building level for further improving the overall microgrid performance
result which is considered as an optimal solution for the system. by exploiting the flexibility in changing their consumption. The nego-
Comparing to the FLEX, the CEN replaces the multiple BMPCs by a tiation phase between the two hierarchical levels is updated in a sam-
single centralized MPC (CMPC). Consequently, the need of receiving the pling time shorter than the time scale of the main target factors in the
setpoint from the LC to CMPC is not required, while the models and microgrid operation which gives a chance to refine the decision and
settings of all buildings are revealed for the CMPC. Consider the single enhance the performance to compensate for any forecast errors. On the
centralized optimization in the form of: other hand, to reach an agreement among multiple users in the building
m
level, an iterative, increment proximal minimization in MPC framework
P : min x Rn Qj*f j (x ) with the dynamic shrinking horizon is studied. The weights in the
j=1 central coordination unit are introduced to provide a further tool to
m classify the ability of each user in reaching the consensus solution. The
subject to x Xc ( Xj ) proposed control architecture has been implemented and tested in the
j=1 (40)
laboratory Smart RUE in NTUA in Athens, with a real microgrid, which
where x presents all the original control variables (i.e., x j, u and x j, c ) of consists of RES, controllable load, storage system, and grid connection.
the involved users. Qj* are weights associated to each agent local cost In addition to the experiments, an extensive simulation campaign has
function in the centralized optimization problem. We tested in simu- been performed in order to strengthen the analysis of the control fra-
lation the case when all values of Qj in the central coordination unit of mework and enhance the performance the control framework for any
the LC are equal to 1 which is expect to provide similar solution as forecast error. Both the simulation and experimental results illustrate
solving optimization problem defined in Eq. 18 where all Qj* equal to 1. the potentials of the proposed approach, in terms of adaptation to dif-
Indeed, the reported results in Table 4, Fig. 7 indicate the similarities ferent scenarios, convergence, and optimality with respect to cen-
between the solutions of the distributed and centralized approaches. tralized solutions. And the real-time experiments performed with
Fig. 9 shows an example of a set of trajectories of difference of variables normal laptops show that computationally the approach is feasible.
dPku,,ij in FLEX and CEN for all user j with respect to the number of All the above stimulates further research in this field, in particular,
iterations for a fixed number of k and i. towards the automatic construction of a day-ahead user consumption
As the number of iterations increases the difference between the profile in a robust way, an iterative negotiation between high and low-
solutions from distributed and centralized MPC algorithm gets smaller. level layer at every sampling time, in order to reduce differences with
In detail, the maximum difference between couples of solutions (i.e., respect to the optimal centralized solution, and integration with low-
User j – FLEX and User j – CEN for all j) reduces from 6.6 W and then to level real-time control of buildings. Also, a dynamic adaptation of the
2.91 W if is set to 0.01% and 0.001% which causes the negotiation weight coefficients in the load coordinator cost function will be con-
phase to stop at the 333rd, and the 1218th iteration correspondingly. In sidered. Finally, more experimental steps are envisaged, for further
the former case, the total duration for completing all the negotiation validation of the overall approach.
phases in this specific time instant is 132 s. Notice that the main part of
the time duration (more than 94%) is for computing optimization so- Acknowledgments
lution in BMPCs. This suggests that if the BMPCs optimization problem
is solved in a distributed way in different controllers, then the duration This project has been performed using the ERIGrid Research
of the negotiation phase will be significantly decreased. Infrastructure and is part of a project that has received funding from the
European Union’s Horizon 2020 Research and Innovation Programme
6. Conclusions under the Grant Agreement No. 654113. The support of the European
Research Infrastructure ERIGrid and its partner National Technical
This paper proposes an innovative two-layer hierarchical control University of Athens is very much appreciated.
framework for smart microgrids, integrating a distributed model pre-
dictive control framework with a coordination algorithm for smart References
buildings in smart microgrids. The overall framework includes day-
ahead market interactions down to inter-user negotiations initiated by a Alvarez, E., Lopez, A. C., Gómez-Aleixandre, J., & De Abajo, N. (2009). On-line mini-
mization of running costs, greenhouse gas emissions and the impact of distributed
request to change the energy profile in the day-ahead market. The generation using microgrids on the electrical system. Sustain. Altern. Energy (SAE),
scheme allows the user to be directly involved in any decision related to 2009 IEEE PES/IAS Conf., IEEE, 1–10. https://doi.org/10.1109/SAE.2009.5534847.
the adaptation of their profile. All the decisions are taken in an optimal Álvarez, J. D., Redondo, J. L., Camponogara, E., Normey-Rico, J., Berenguel, M., &

11
L.A. Dao, et al. Sustainable Cities and Society 48 (2019) 101536

Ortigosa, P. M. (2013). Optimizing building comfort temperature regulation via 186–197. https://doi.org/10.1109/TPWRS.2016.2557764.
model predictive control. Energy and Buildings, 57, 361–372. https://doi.org/10. Liu, N., Yu, X., Wang, C., & Wang, J. (2017). Energy sharing management for microgrids
1016/j.enbuild.2012.10.044. with PV prosumers: a stackelberg game approach. IEEE Transactions on Industrial
Bertsekas, D. P. (2011). Incremental proximal methods for large scale convex optimiza- Informatics, 13, 1088–1098. https://doi.org/10.1109/TII.2017.2654302.
tion. Mathematical Programming, 129, 163–195. https://doi.org/10.1007/s10107- Magnússon, S., Weeraddana, P. C., & Fischione, C. (2015). A distributed approach for the
011-0472-0. optimal power-flow problem based on ADMM and sequential convex approximations.
Chen, J., & Zhu, Q. (2017). A game-theoretic framework for resilient and distributed IEEE Transactions on Control of Network Systems, 2, 238–253. https://doi.org/10.
generation control of renewable energies in microgrids. IEEE Transactions on Smart 1109/TCNS.2015.2399192.
Grid, 8, 285–295. https://doi.org/10.1109/TSG.2016.2598771. Mantovani, G., & Ferrarini, L. (2015). Temperature control of a commercial building with
Christofides, P. D., Scattolini, R., Muñoz de la Peña, D., & Liu, J. (2013). Distributed model predictive control techniques. IEEE Transactions on Industrial Electronics
model predictive control: A tutorial review and future research directions. Computers (1982), 62, 2651–2660. https://doi.org/10.1109/TIE.2014.2387095.
& Chemical Engineering, 51, 21–41. https://doi.org/10.1016/j.compchemeng.2012. Mantovani, G., Costanzo, G. T., Marinelli, M., & Ferrarini, L. (2014). Experimental vali-
05.011. dation of energy resources integration in microgrids via distributed predictive con-
Colson, C. M., Nehrir, M. H., & a Pourmousavi, S. (2010). Towards real-time microgrid trol. IEEE Transactions on Energy Conversion, 29, 1018–1025. https://doi.org/10.
power management using computational intelligence methods. Power Energy Soc. 1109/TEC.2014.2362887.
Gen. Meet. 2010 IEEE, 1–8. https://doi.org/10.1109/PES.2010.5588053. Messinis, G., Kleftakis, V., Rigas, A., Vassilakis, A., Kotsampopoulos, P., & Hatziargyriou,
Cominesi, S. R., Farina, M., Giulioni, L., Picasso, B., & Scattolini, R. (2018). A two-layer N. (2014). A multi-microgrid laboratory infrastructure for smart grid applications.
stochastic model predictive control scheme for microgrids. IEEE Transactions on MedPower 2014. Greece: IET, Athens1–6. https://doi.org/10.1049/cp.2014.1670.
Control Systems Technology, 26, 1–13. https://doi.org/10.1109/TCST.2017.2657606. Mondal, A., Misra, S., & Obaidat, M. S. (2017). Distributed home energymanagement
Dao, L. A., Piroddi, L., & Ferrarini, L. (2015). Impact of wind power prediction quality on system with storage in smart grid using game theory. IEEE Systems Journal, 11,
the optimal control of microgrids. Clean Electr. Power (ICCEP), 2015 Int. Conf. 1857–1866.
277–283. https://doi.org/10.1109/ICCEP.2015.7177636. Parikh, N., & Boyd, S. (2013). Proximal algorithms. Foundation Trends Optimization, 1,
Dao, L. A., Ferrarini, L., & Piroddi, L. (2017). MPC-based management of energy resources 123–231.
in smart microgrids. In: Proc.14th Int. Conf. Informatics Control. Autom. Robot. Parisio, A., & Glielmo, L. (2013). Stochastic Model Predictive Control for economic/en-
246–253. https://doi.org/10.5220/0006427902460253. vironmental operation management of microgrids. 2014–2019. http://ieeexplore.ieee.
Deng, R., Yang, Z., Chow, M. Y., & Chen, J. (2015). A survey on demand response in smart org/ielx7/6657188/6669080/06669807.pdf?tp=&arnumber=6669807&
grids: Mathematical models and approaches. IEEE Transactions on Industrial isnumber=6669080%5Cnhttp://ieeexplore.ieee.org/xpl/articleDetails.jsp?tp=&
Informatics, 11, 570–582. https://doi.org/10.1109/TII.2015.2414719. arnumber=6669807&pageNumber=2&queryText=stochastic+MPC.
Ferrarini, L., Mantovani, G., & Costanzo, G. T. (2014). A distributed model predictive Parisio, A., Rikos, E., & Glielmo, L. (2014). A model predictive control approach to mi-
control approach for the integration of flexible loads, storage and renewables. 2014 crogrid operation optimization. IEEE Transactions on Control Systems Technology: A
IEEE 23rd Int. Symp. Ind. Electron. 1700–1705. https://doi.org/10.1109/ISIE.2014. Publication of the IEEE Control Systems Society, 22, 1813–1827. https://doi.org/10.
6864871. 1109/TCST.2013.2295737.
Garcia, F., & Bordons, C. (2013). Optimal economic dispatch for renewable energy mi- Rokni, S. G. M., Radmehr, M., & Zakariazadeh, A. (2018). Optimum energy resource
crogrids with hybrid storage using model predictive control. Ind. Electron. Soc. IECON scheduling in a microgrid using a distributed algorithm framework. Sustainable Cities
2013 - 39th Annu. Conf. IEEE, 7932–7937. https://doi.org/10.1109/IECON.2013. and Society, 37, 222–231. https://doi.org/10.1016/j.scs.2017.11.016.
6700458. Shi, W., Xie, X., Chu, C. C., & Gadh, R. (2015). Distributed optimal energy management in
Gu, W., Wu, Z., & Yuan, X. (2010). Microgrid economic optimal operation of the com- microgrids. IEEE Transactions on Smart Grid, 6, 1137–1146. https://doi.org/10.1109/
bined heat and power system with renewable energy. IEEE PES Gen. Meet., IEEE, 1–6. TSG.2014.2373150.
https://doi.org/10.1109/PES.2010.5590140. Stadler, P., Ashouri, A., & Marechal, F. (2016). Distributed model predictive control for
Hooshmand, A., Asghari, B., & Sharma, R. (2013). A novel cost-aware multi-objective energy systems in microgrids. Syst. Conf. (SysCon), 2016 Annu. IEEE, 1–6. https://doi.
energy management method for microgrids. 2013 IEEE PES Innov. Smart Grid Technol. org/10.1109/SYSCON.2016.7490607.
Conf. ISGT 2013, 1–6. https://doi.org/10.1109/ISGT.2013.6497882. Taha, A. F., Gatsis, N., & Dong, B. (2017). Buildings-to-Grid integration framework. IEEE
Hou, X., Hou, X., Xiao, Y., Cai, J., Hu, J., et al. (2017). distributed model predictive Transaction on Smart Grid (Early Access). https://doi.org/10.1109/TSG.2017.
control via proximal distributed model predictive control via proximal jacobian 2761861.
ADMM for building control applications. Am. Control Conf. (ACC), 2017. https://doi. Tavakoli, M., Shokridehaki, F., Marzband, M., Godina, R., & Pouresmaeil, E. (2018). A
org/10.23919/ACC.2017.7962927. two stage hierarchical control approach for the optimal energy management in
Koehler, S., Danielson, C., & Borrelli, F. (2015). A primal-dual active-set method for commercial building microgrids based on local wind power and PEVs. Sustainable
distributed model predictive control. Am. Control Conf. (ACC), 2015. https://doi.org/ Cities and Society, 41, 332–340. https://doi.org/10.1016/j.scs.2018.05.035.
10.1109/ACC.2015.7172079. Valverde, L., Bordons, C., & Rosa, F. (2016). Integration of Fuel Cell Technologies in
Kotsampopoulos, P., Kleftakis, V., & Hatziargyriou, N. (2017). Laboratory education of Renewable-Energy-Based Microgrids Optimizing Operational Costs and Durability.
modern power systems using PHIL simulation. IEEE Transactions on Power Systems, IEEE Transactions on Industrial Electronics (1982), 63, 167–177. https://doi.org/10.
32, 3992–4001. https://doi.org/10.1109/TPWRS.2016.2633201. 1109/TIE.2015.2465355.
Kraning, M., Chu, E., Lavaei, J., Boyd, S., & April, W. D. (2014). Dynamic network energy Walker, S. S. W., Lombardi, W., Lesecq, S., & Roshany-Yamchi, S. (2017). Application of
management via proximal message passing. Foundation Trends Optimization, 1, distributed model predictive approaches to temperature and CO2 concentration
73–126. control in buildings. IFAC-PapersOnLine, 50, 2589–2594. https://doi.org/10.1016/j.
Kriett, P. O., & Salani, M. (2012). Optimal control of a residential microgrid. Energy, 42, ifacol.2017.08.107.
321–330. https://doi.org/10.1016/j.energy.2012.03.049. Yang, P., Chavali, P., & Gilboa, E. (2013). Parallel load schedule optimization with re-
Li, W.-T., Yuen, C., Hassan, N. U., Tushar, W., Wen, C.-K., Wood, K. L., et al. (2015). newable distributed generators in smart grids. IEEE Transactions on Smart Grid, 4,
Demand response management for residential smart grid: From theory to practice. 1431–1441.
IEEE Access: Practical Innovations, Open Solutions, 3, 2431–2440. https://doi.org/10. Zhang, Y., Zhang, T., Wang, R., Liu, Y., & Guo, B. (2015). Optimal operation of a smart
1109/ACCESS.2015.2503379. residential microgrid based on model predictive control by considering uncertainties
Liao, G. C. (2010). Using chaotic quantum genetic algorithm solving environmental and storage impacts. Solar Energy (Phoenix, Ariz), 122, 1052–1065. https://doi.org/
economic dispatch of smart microgrid containing distributed generation system 10.1016/j.solener.2015.10.027.
problems. Power Syst. Technol. (POWERCON), 2010 Int. Conf., IEEE, 1–7. https://doi. Zhang, Y., Meng, F., Wang, R., Zhu, W., & Zeng, X. J. (2018). A stochastic MPC based
org/10.1109/POWERCON.2010.5666468. approach to integrated energy management in microgrids. Sustainable Cities and
Lin, Y., Barooah, P., & Mathieu, J. L. (2017). Ancillary services through demand sche- Society, 41, 349–362. https://doi.org/10.1016/j.scs.2018.05.044.
duling and control of commercial buildings. IEEE Transactions on Power Systems, 32,

12

You might also like