Use of model predictive control for experimental microgrid optimization

Use of model predictive control for experimental microgrid optimization

Applied Energy 115 (2014) 37–46 Contents lists available at ScienceDirect Applied Energy journal homepage: www.elsevier.com/locate/apenergy Use of ...

2MB Sizes 0 Downloads 105 Views

Applied Energy 115 (2014) 37–46

Contents lists available at ScienceDirect

Applied Energy journal homepage: www.elsevier.com/locate/apenergy

Use of model predictive control for experimental microgrid optimization Alessandra Parisio a,⇑,1, Evangelos Rikos b, George Tzamalis c, Luigi Glielmo d a

ACCESS Linnaeus Center and the Automatic Control Lab, The School of Electrical Engineering, KTH Royal Institute of Technology, Sweden Department of PVs and DERs Systems, Center for Renewable Energy Sources and Saving (CRES), Pikermi, Athens, Greece c Department of RES and Hydrogen Technologies, Center for Renewable Energy Sources and Saving (CRES), Pikermi, Athens, Greece d Department of Engineering, Università degli Studi del Sannio, Benevento, Italy b

h i g h l i g h t s  A model of a microgrid with storages and controllable loads is developed.  Our storage model guarantees a feasible behavior of the storage unit.  Using our model the microgrid operations optimization problem is tractable.  An MPC controller for minimizing the microgrid running costs is developed.  The proposed method is applied to an experimental microgrid located in Greece.

a r t i c l e

i n f o

Article history: Received 7 June 2013 Received in revised form 2 October 2013 Accepted 10 October 2013 Available online 25 November 2013 Keywords: Model predictive control Microgrids Optimization Mixed Integer Linear Programming

a b s t r a c t In this paper we deal with the problem of efficiently optimizing microgrid operations while satisfying a time-varying request and operation constraints. Microgrids are subsystems of the distribution grid comprising sufficient generating resources to operate in isolation from the main grid, in a deliberate and controlled way. The Model Predictive Control (MPC) approach is applied for achieving economic efficiency in microgrid operation management. The method is thus applied to an experimental microgrid located in Athens, Greece: experimental results show the feasibility and the effectiveness of the proposed approach. Ó 2013 Elsevier Ltd. All rights reserved.

1. Introduction Microgrids are integrated energy systems comprising loads and a combination of Distributed Energy Resources (DERs), such as Distributed Generators (DGs), which are controllable units, and Renewable Energy Resources (RESs), which are non controllable units. In a smart grid scenario, the microgrid concept is a promising approach, since it is capable of managing and coordinating DGs, storages and loads in a more decentralized way reducing the need for the centralized coordination and management [1]. The key concept that differentiates the microgrid paradigm from a conventional power utility is that the power generators are small. They are also located in close proximity to the energy users. A microgrid can be either grid-connected or islanded; when the microgrid ⇑ Corresponding author. Tel.: +46 700406605. E-mail address: [email protected] (A. Parisio). This work was supported by the European Commission, through the Distributed Energy Resources Research Infrastructures (DERri) project (EU Project No. 228449) and the Sustainable-Smart Grid Open System for the Aggregated Control, Monitoring and Management of Energy (e-GOTHAM) project. 1

0306-2619/$ - see front matter Ó 2013 Elsevier Ltd. All rights reserved. http://dx.doi.org/10.1016/j.apenergy.2013.10.027

operates in parallel with the grid, it can buy and sell power to and from its energy suppliers [2,3]. In this work we solve the problem of operating the microgrid in order to minimize its running costs while meeting the predicted energy demand over a certain period (typically one day). The overall control strategy has to consider that the system must operate within its technical and physical limits; this means that complex operational constraints have to be fulfilled, such as DGs’ minimum on/off time. The microgrid operational management problem needs to include policies for controllable loads (Demand Side Management, DSM), interaction with the utility grid and storage models, which require both continuous (such as storage charge or discharge rates) and discrete (such as on/off states of DGs) decision variables. Thus, the problem is generally stated as a Mixed Integer Nonlinear Problem (MINLP) (see, for example, [4–6]), which are really hard to solve. The modeling capabilities and the computational advances of Mixed Integer Problem (MIP) algorithms, have led several Independent System Operators (ISOs) and Regional Transmission

38

A. Parisio et al. / Applied Energy 115 (2014) 37–46

Organizations (RTOs) to implement MIP-based solution methods in order to find a better solution to solve day-ahead and real-time market problems [7]; however, not solving unit commitment problems to complete optimality can cause several issues [8]. Therefore, new modeling requirements are needed to solve the problem described above, e.g. storage modeling must be incorporated in order to coordinate storage use with RES generation and energy prices, and address the complexity of the charging/discharging schedule [9]. It is important to notice that there are no current integrated modeling tools including both controllable loads and energy storage modeling in a smart grid environment, as well as specific microgrid features and operations (see [10] and Section 2). 2. Literature review The optimization of the microgrid operations is extremely important in order to cost-efficiently manage its energy resources [11,3]. Several works have shown that relevant benefits can be obtained by applying optimal instead of heuristic-based approaches. Further, a microgrid control strategy that accounts for uncertainty, uses predictions of the future system behavior, employs DMS and optimizes the use of storage devices, can achieve high performance (see [12–14]). Coping with uncertainty is thus another relevant aspect in microgrid management, which further complicates it. Hence, it is necessary to find a tractable formulation of the microgrid operation optimization problem which includes the specific key features of a microgrid. The approaches proposed in the literature are generally computationally demanding and not suitable for online applications, or they resort to heuristic or decomposition techniques and compute suboptimal solutions (e.g., see [15–20]). Metaheuristics and heuristics have been proposed to specifically solve the power dispatch problem for microgrids, such as Genetic Algorithms [21], Evolutionary Strategies [22], Tabu Search algorithms [17]. Some ad hoc algorithms have been developed to manage electric vehicles (EVs) and heat pumps (HPs) such that they can absorb fluctuations of overgeneration from intermittent renewable energy sources [23] and to find out hourly power set-points of Distributed Energy Resources (DERs) for Real Time Operation of an islanded microgrid [24]. The authors in [25,26] have formulated a mixed integer linear problem for energy planning of a Virtual PowerPlant and a residential microgrid equipped with a Combined and Heat Power (CHP) unit respectively. Multi-agents systems have been proposed for gas power plants [27] and for autonomous polygeneration microgrids [28]. Further, in [29] the authors propose a stochastic approach to microgrid operation optimization. However, there are significant differences in the aforementioned studies compared to our approach, such as, several DG operational constraints are neglected, storage dynamics and grid interaction are described by different constraints, curtailments are not considered, nor a Model Predictive Control (MPC) scheme is applied. Recently, MPC has drawn the attention of the power system community due to several factors [30]: (i) it is based on future behavior of the system and predictions, which is appealing for systems significantly dependent on forecasting of energy demand and RES generation; (ii) it provides a feedback mechanism, which makes the system more robust against uncertainty; and (iii) it can handle complex system constraints. Some works can be found in the literature that addresses MPC for optimal dispatch in power systems. In [31,32] the authors apply an MPC framework to solve the Dynamic Economic Dispatch (DED) problem, which aims at deciding the power dispatch to meet the demand at minimum cost subject to bounds on power generation and ramp rates.

In [33] an MPC-based mixed integer linear problem is proposed to optimally manage a residential microgrid equipped with a CHP unit; also an MPC-based power dispatch approach for Plug-in Electric Vehicles connected to the distribution system has been developed in [34]. In [35], the authors develop an MPC based supervisory control system for a wind/solar energy generation system which calculates the power set points for the wind and solar subsystems at each sampling time. In [36], the same authors propose to replace the above mentioned centralized MPC controller with two distributed MPC controllers, each responsible for computing optimal references for the local controller of the corresponding subsystem. The optimization problem solved both in [35] and in [36] is nonlinear and non convex, and several issues are not addressed, e.g., system startup or shut down. In [37] an energy management system based on a rolling horizon strategy is proposed for an islanded microgrid, which comprises photovoltaic panels, two wind turbines, a diesel generator and an energy storage system. The problem includes several nonlinear constraints associated with the modeling the two controllable units (the diesel generator and the storage system), which are approximated by piecewise linear models. Summarizing, in the aforementioned works, either the optimization problem stays nonlinear or other important features, such as minimum up and down times and demand side programs, are neglected. Our approach is more general and flexible so that the specific features and units of a microgrid are taken into account. Further, we would like to remark that, when storage elements are considered, generally the storage is modeled as a discrete-time first order system with two continuous variables representing charging and discharging power multiplied by suitable, and different, charging and discharging efficiencies. That approach does not rule out the possibility that the optimal solution contemplates simultaneous charging and discharging of the storage, a physically unrealizable policy. Such outcome may occur as the mathematical consequence of unpredicted RES-generated power surplus, bounds on the exchanged power with the utility grid, and costs of the storage level. This issue has been never discussed in the corresponding studies. Because of the different multiplicative factor in charging and discharging, one continuous variable, which can take both positive and negative values, cannot represent correctly the storage behavior. Binary variables are needed to better represent the storage behavior; in our approach, we employ only one binary variable to prevent simultaneous charging and discharging. Similarly the interaction with the utility grid should be modeled so as to prevent simultaneous selling and purchasing under certain market circumstances. 3. Main assumptions and contributions Microgrid control requirements involve different approaches and different time scales: time scales of seconds for voltage and frequency control and longer time scales (e.g., hours) for unit commitment and economic dispatch of all generating units and storages. Thus, a reasonable approach is to develop a hierarchical control structure: a centralized, high level controller is on the top of the hierarchy, which computes power set points for all sources and storages, while the second level includes load controllers and DERs’ controllers, which guarantee voltage stability and power quality [38]. We focus on developing a strategy for the the high level microgrid controller. We can safely assume that this controller deals with the steady state behavior of the microgrid components, since it is very weakly dependent on the transient behavior of the fast dynamics. Further, we assume that the Microgrid Operator is the unique entity in charge of management, aimed at optimizing profits. It

39

A. Parisio et al. / Applied Energy 115 (2014) 37–46

can take decisions, such as to sell or buy energy depending on local generation capabilities and costs and the energy prices. In this work, we propose a control-oriented approach to microgrid operations optimization, which employs MPC in combination with Mixed Integer Linear Programming (MILP) [39,40]. However MILP problems are NP-hard, it is clear that in the recent years truly remarkable progress has been made in the solution of MILP problems. The branch-and-bound techniques are mostly applied to MILP problems [41]. The main advantage of the branch and bound method is that, if a solution is reached, the solution is known to be globally optimal. We would like to point out that, in all the simulations and experiments we performed, the global optimal solution was always achieved. Moreover, to guarantee a feasible behavior for storage and grid interaction (e.g., non-simultaneous charging and discharging, buying and selling), we utilize the approach described in [42] and use the Mixed Logical Dynamical (MLD) framework. We would like to remark that, in the proposed problem formulation, only generators’ fuel consumption and emission functions are approximated in case they must be expressed as nonlinear functions, which is not always needed for microgrid components. We assume nonlinear generators’ fuel consumption and emission functions in order to state the problem formulation as general as possible. In our approach we strove to include as many details as possible, and to use and maintain the microgrid optimization problem solvable without resorting to any decomposition techniques or heuristics. Further, we modeled the generators’ technical and physical features by using a number of constraints and variables as low as possible. By using our method, the microgrid operational management problem can be solved by employing standard algorithms. Further, the feedback mechanism incorporated in the presented strategy allows to cope with uncertainty in the energy demand and in RESs’ generation. This paper extends the preliminary study presented in [43] (i) by discussing experimental results obtained from a microgrid located in Athens, Greece; (ii) by taking the costs of the power exchanged with the storage unit into account in the objective function; and (iii) by estimating all the parameters and costs required to carry out the experiments. Moreover, renewable power generation and demand forecasts are computed. In the following sections we will illustrate the proposed approach for the microgrid modeling and optimization. 4. Model predictive control for microgrid operation management In this section we formulate the MPC problem, which provides a trajectory of future control inputs satisfying the system dynamics and constraints and minimizing the microgrid operational costs. The proposed MPC control algorithm consists of the following steps, to be repeated for each time step k; k ¼ 0; . . . ; T  1: 1. at the current time k, the system model is initialized to the measured/estimated current state of the microgrid components, i.e. the storage current energy level, on/off state and power levels generated by the controllable generation units; 2. the high level controller computes an optimal input sequence, for the 24 h, based on the demand and RES generation forecasts and on predictions of the upcoming system behavior. The calculated optimal plan includes the curtailment schedule, decisions on storage operations and on grid buying/selling; 3. the first sample of the input sequence is applied;

4. the new state of the system for the time k + 1 is measured/estimated, the forecasts of energy demand and RES generation are updated over a shifted horizon and the MPC problem is solved using this updated information. This receding horizon philosophy helps the control strategy to compensate for any disturbance acting on the microgrid; 5. k = k + 1, go to step (2). 4.1. Nomenclature Tables B.1, B.2 and B.3 report the forecasts, the parameters and the decision variables used in the described formulation. For simplicity, in these tables we omit the subscript i when referring to the ith unit. We remark that the fuel consumption cost for a DG unit is traditionally assumed to be a quadratic function of the form C DG ðPÞ ¼ a1 P 2 þ a2 P þ a3 . In the following sections, vectors and matrices are denoted in bold. 4.2. Modeling We describe here the key features of the microgrid, which are then modeled with the aim to keep the problem tractable. Both the demand (Controllable and Critical loads) and the supply side (DGs, RESs and storage units) are illustrated. 4.2.1. Loads In the present work, we consider two types of loads: (ii) critical loads, which must be always met; curtailable loads, which can be reduced or shed to support the distribution grid operations. We model each curtailable load h through a continuous-valued variable, 0 6 bh ðkÞ 6 1, representing the portion of the power level to be curtailed at time k so that microgrid operations are either feasible or more economically convenient. ^ an equality In case no curtailment is allowed at a certain time k, ^ constraint can be set, bh ðkÞ ¼ 0. 4.2.2. Storage dynamics We model a storage unit as the following discrete time model:

xb ðk þ 1Þ ¼ xb ðkÞ þ gPb ðkÞ  xsb ;

ð1Þ

where

(



gc ; if Pb ðkÞ > 0 ðcharging modeÞ; d 1=g ; otherwise ðdischarging modeÞ;

ð2Þ

where 0 < gc , gd < 1. The energy stored at time k is denoted by xb ðkÞ, while Pb ðkÞ defines the power exchanged with the storing device at time k. Remarkably, due to constant sampling time DT ¼ t kþ1  t k , there exists a constant ratio between energy and power at each interval. We introduce one binary variable db ðkÞ and one auxiliary variable zb ðkÞ to model the following logical conditions and storage dynamics, as illustrated in [42]:

Pb ðkÞ P 0 () db ðkÞ ¼ 1;

ð3Þ

and

( b

x ðk þ 1Þ ¼

xb ðkÞ þ gc Pb ðkÞ  xsb ;

if db ðkÞ ¼ 1;

xb ðkÞ þ 1=gd P b ðkÞ  xsb ; otherwise:

The ‘if . . . then’ condition as in (3) and the equality zb ðkÞ ¼ db ðkÞPb ðkÞ can be equivalently expressed as 6 mixed integer

40

A. Parisio et al. / Applied Energy 115 (2014) 37–46

Further, denote

Table B.1 Parameters of the optimization model.

0

Parameters Ng ; Nl ; Nc C DG ðPÞ

uðkÞ ¼ ½P0 ðkÞ Pg ðkÞ b0 ðkÞ d0 ðkÞ 2 RNu  f0; 1gNg ;

Description

c0

wðkÞ ¼ ½Pres ðkÞ D0 ðkÞ D ðkÞ 2 RNw ;

Number respectively of DG units, critical loads and controllable loads Fuel consumption cost curve of a DG unit depending on generated power

a1 ; a2 ; a3

Cost coefficients of C

DG

ðPÞ

2

T up ; T down

(€/ðkW hÞ ; €/kW h, €) Operating and maintenance cost of a DG unit (€/kW h) Operating and maintenance cost of the power exchanged with the storage unit (€/kW h) Ramp up limit of a DG unit (kW/h) Minimum up and down time of a DG unit (h)

xsb

Storage ‘physiological’ energy loss (kW h)

xbmin ; xbmax

Minimum, maximum energy level of the storage unit (kW h)

OM OM b Rmax

C Tg

P min ; P max

gc ; gd bmin ; bmax cSU ; cSD Dc

qc

where N u ¼ N g þ 1 þ N c ; N w ¼ 1 þ N l þ Nc ; wðkÞ is a vector containing all known disturbances (obtained by forecasts); PðkÞ, dðkÞ; DðkÞ; Dc ðkÞ and bðkÞ are column vectors containing, respectively, all the power levels, the generators off/on states, the critical demand, the power levels of the controllable loads and the curtailments. By doing so, Pb ðkÞ can be expressed as follows: 0

Pb ðkÞ ¼ F0 ðkÞuðkÞ þ f wðkÞ:

Storage power limit (kW)

b

0

xb ðk þ 1Þ ¼ xb ðkÞ þ ðgc  1=gd Þzb ðkÞ þ 1=gd ½F0 ðkÞuðkÞ þ f wðkÞ  xsb :

Minimum, maximum allowed curtailment of a controllable load Start-up, start-down costs of a DG unit (€) Preferred power level of a controllable load (kW) Penalty weight on curtailments

Table B.2 Forecasts (inputs of the control algorithm). Forecasts

Description

P res D cP ; cS

Sum of power production from RES (kW) Power level required from a critical load (kW) Purchasing, selling energy prices (€/kW h)

Table B.3 Decision and logical variables (outputs of the control algorithm). Description Off(0)/on(1) state of a DG unit Discharging(0)/charging(1) mode of the storage unit

b

d dg P

4.2.3. Interaction with the utility grid The interaction with the utility grid is modeled by applying the same procedure outlined above. We introduce a binary variable dg ðkÞ and an auxiliary variable C g ðkÞ to express as 6 mixed integer linear inequalities the following logical statements and the possibility to buy/sell energy from/to the utility grid:

Pg ðkÞ P 0 () dg ðkÞ ¼ 1; and

Pg xb b

linear inequalities (we refer the interested reader to [42] for guiding details and to [44] for details on storage modeling). Then, the storage dynamics and the inequalities can be rewritten in the following compact form:

subject to Eb1 db ðkÞ þ Eb2 zb ðkÞ 6 Eb3 Pb ðkÞ þ Eb4 :

ð4Þ

The column vectors Eb1 ; Eb2 ; Eb3 ; Eb4 are easily derived from the 6 mixed integer linear inequalities mentioned above and can be found in [44]: Now we consider the balance between energy production and consumption must be met at each time k:

Pb ðkÞ¼

Ng Nl Nc X X X Pi ðkÞþPres ðkÞþPg ðkÞ Dj ðkÞ ½1bh ðkÞDch ðkÞ i¼1

j¼1

h¼1

cP ðkÞPg ðkÞ if dg ðkÞ ¼ 1; g

cS ðkÞP ðkÞ

otherwise

 :

Eg1 dg ðkÞ þ Eg2 C g ðkÞ 6 Eg3 ðkÞPg ðkÞ þ Eg4 :

Curtailed power percentage

xb ðk þ 1Þ ¼ xb ðkÞ  ð1=gd  gc Þzb ðkÞ þ 1=gd Pb ðkÞ  xsb ;



Then, the buying/selling microgrid behavior can be written in the following compact form:

Exporting(0)/importing(1) mode to/from the utility grid Power level of a DG unit (kW) Power exchanged (positive for charging) with the storage unit (kW) Importing (positive)/exporting (negative) power level from/to the utility grid (kW) Stored energy level (kW h)

Pb

ð7Þ

The vectors FðkÞ and f are provided in [44].

C g ðkÞ ¼

d

ð6Þ

Thus the storage level can be expressed as an affine function by substituting (6) in (4):

Maximum interconnection power flow limit (at the point of common coupling) (kW) Minimum, maximum power level of a DG unit (kW) Storage charging, discharging efficiencies

Variables

0

ð5Þ

ð8Þ

The column vectors Eg1 ; Eg2 ; Eg3 ðkÞ; Eg4 are provided in [44]. The matrix Eg3 ðkÞ is generally time-varying due to the time varying energy prices. 4.3. Formulating the optimization problem Here we define the microgrid optimization problem. The microgrid optimal operational management problem consists in taking decisions on how to optimally schedule internal production by generators, storage, as well as curtailable loads, to cover the microgrid demand and minimize the generators’ running costs and the cost of imported electricity from the utility grid in the next hours or day. By using the formulations obtained in the modeling Section 4.2, the problem can be formulated as a MILP optimization problem; we next define the cost function and the constraints associated with the MILP. 4.3.1. Constraints: Generator operating conditions Constraints on the operations of each DG unit must be imposed, i.e., the minimum time period a DG unit must be kept on/off (minimum up/down times) and the start up and shut down costs. At the current point in time, the minimum up/down times constraint can be expressed by the following mixed integer linear inequalities without resorting to any additional variable:

A. Parisio et al. / Applied Energy 115 (2014) 37–46

di ðkÞ  di ðk  1Þ 6 di ðsÞ; ðoff-onswitchÞ; di ðk  1Þ  di ðkÞ 6 1  di ðsÞ; ðon-offswitchÞ;

ð9Þ

with i ¼ 1; . . . ; N g ; s ¼ k þ 1; . . . ; minðk þ T up i  1; TÞ in case of the minimum up time or s ¼ k þ 1; . . . ; minðk þ T down  1; TÞ i otherwise. The DG unit start up/shut down behavior is modeled by introducing two auxiliary variables, SU i ðkÞ and SDi ðkÞ, representing respectively the start up cost and the shut down cost for the ith DG generation unit at time k. Then, the following mixed integer linear constraints must be met:

We denote by xb ðk þ jjkÞ, with j > 0, the state at time step k þ j predicted at time k employing the storage model (7). We further denote by uT1 the input sequence ukT1 ¼ ðuðkÞ; . . . ; uðk þ T  1ÞÞ k computed at time k. At each time step k, given an initial storage state xbk and a horizon T, the MPC provides the optimal control sequence uT1 solving k the following optimization problem: 

J  ðxbk Þ ¼ min J uT1 k

subject to storage modelð7Þin the variable xb ðjkÞ;

SU i ðkÞ P cSU i ðkÞ½di ðkÞ  di ðk  1Þ;

ð12Þ

constraints ð8Þ—ð10Þ;

SDi ðkÞ P cSD i ðkÞ½di ðk  1Þ  di ðkÞ;

ð10Þ

SU i ðkÞ P 0;

constraints ð11Þ; xb ðkjkÞ ¼ xb ðkÞ;

SDi ðkÞ P 0;



with i ¼ 1; . . . ; N g [45]. 4.3.2. Constraints: Capacity and terminal constraints To pose the final MILP optimization problem, additional operational constraints must be met:

xbmin 6 xb ðkÞ 6 xbmax ;

ð11aÞ

Pi;min di ðkÞ 6 Pi ðkÞ 6 Pi;max di ðkÞ;

ð11bÞ

jPi ðk þ 1Þ  Pi ðkÞj 6 Ri;max di ðkÞ;

ð11cÞ

bh;min 6 bh ðkÞ 6 bh;max ;

ð11dÞ

with i ¼ 1; . . . ; N g and h ¼ 1; . . . ; N c . The constraints above model the technical limits on the storage unit (inequality (11a)), the bounds on each DG generated power (inequality (11b)), ramp up and ramp down rates of each DG unit (inequality (11c)), the bounds on curtailments (inequality (11d)). Note that the binary variable di ðkÞ will be equal to 1 if the power P i ðkÞ generated from the ith DG unit at time k is strictly positive and equal to 0 if P i ðkÞ ¼ 0. When P i;min ¼ 0, a wrong assignment of the di ðkÞ variable in the inequality (11b) can be avoided by assigning to P i;min a very small positive value. 4.3.3. Cost function The objective function in the proposed MPC problem formulation represents the microgrid running costs. Hence, the cost function J includes energy production and start-up/shut-down costs, along with possible earnings and curtailment penalties. The following cost functional is then minimized: Ng h T1 X i X J :¼ C DG i ðP i ðkÞÞ þ OM i di ðkÞ þ SU i ðkÞ þ SDi ðkÞ k¼0 i¼1

þ OMb ð2zb ðkÞ  Pb ðkÞÞ þ C g ðkÞ þ qc

41

Nc X bh ðkÞDch ðkÞ; h¼1

where k is the current time, T is the horizon length and ð2zb ðkÞ  Pb ðkÞÞ models the absolute value of the power exchanged with the storage unite, with Pb ðkÞ given by (6). Remarkably, operative and maintenance costs of the ith DG unit can be included in the MPC policy by adding the term OMi Pi ðkÞ must be added in the objective function. Please, notice that C g ðkÞ is negative only if energy is sold to the utility grid, which corresponds to a economical profit for the microgrid. Note that J is a quadratic cost function due to the presence of the quadratic terms C DG i ðP i ðkÞÞ. 4.4. Model predictive control formulation Here we illustrate the MPC control strategy.

where J is a linear approximation of the cost function in (12) obtained by approximating every function C DG i ðP i ðkÞÞ with a convex piecewise affine function, which provides very similar results, but can be efficiently solved via a mixed integer linear program [46,47] (details can be found in Appendix A). Thus, the problem results in a mixed integer linear program, as can be seen in [44]. We recall that the vector of disturbances profiles, denoted by wðk þ jÞ, is assumed to be known over the horizon, i.e., for j ¼ 0; . . . ; T  1. The controller computes its control decisions by assuming that all the predictions are correct (i.e., Certainty Equivalence). 5. Implementation of model predictive control for experimental microgrid The experimental validation of the control algorithm was performed at the Centre for Renewable Energy Sources and Saving (CRES), Pikermi-Athens, Greece. The microgrid runs on a low-voltage 3-phase electric network with all DER components connected, an Interbus communication and control network, a Modbus based monitoring of active and reactive power at the mains, a graphical interface for supervision, monitoring and control. The microgrid test site of CRES comprises the following units (see Fig. B.1):  two photovoltaic generators 1.1 and 4.4 kWp (the second on a single-axis tracking system);  two battery storage systems with total capacity 80 kW h, each consisting of 2 V FLA (Flooded Lead Acid) battery cells and interconnected to the mains through battery inverters which offer numerous control capabilities, such as gridforming, grid-tied and droop-mode; it is worth mentioning that during the tests one of the two battery systems was used to simulate the operation of a micro-CHP.  a load bank of resistors of maximum active power 13 kW. This load is equally distributed into the three phases. The loads are grouped into Controllable and Critical loads and programmed by using data files of consumption so as to produce the desired profiles;  one 3 kW reverse osmosis desalination unit of the kind used on islands for water production.  one 5 kW Proton Exchange Membrane (PEM) fuel cell equipped with a DC/AC 3-phase system. Hydrogen consumption is 40 N L/min at 3 kW and 75 N L/min at 5 kW. The fuel cell is supplied with a compressed hydrogen storage tank at a maximum pressure of 16 bar, a physical volume of 3000 L and a a nominal hydrogen storage capacity of 50 N m3;

42

A. Parisio et al. / Applied Energy 115 (2014) 37–46

Fig. B.1. Experimental microgrid setup.

 one PEM electrolyzer producing hydrogen at 0.5 N m3/h at a pressure of up to 14 bar. The daily spot prices (from the EEX, European Energy Exchange) are shown in Fig. B.2. We apply Least-Square Support Vector Machines (LS-SVM) for regression (LS-SVR, Support Vector Regression) with a moving time window to forecast the renewable power generation for the day ahead based on historical data. See Appendix B for an outline of the algorithm and further details on forecasting in the experiments. We consider a 15 min sampling period and the experiments are run over six hours.

5.1. Experimental data estimation One of the most important issues of the study was the estimation and calculation of the model required parameters, such as

Fig. B.2. Spot energy prices over 24 sampling periods (6 h). Input of the control algorithm.

investment and operating costs, minimum up and down times of the DG units, efficiencies, storage limits. Despite the fact that all parameters are critical for the optimization in general, in the specific implementation the size of the selected system (and DG units) allowed zero minimum up and down time or start up time. The most important set of parameters are the costs and the storage efficiencies. This section aims at describing the procedure for the parameters’ estimation. 5.1.1. Investment, maintenance and operating costs The cost parameters for each unit were estimated differently because they differ in construction and operation. For example a photovoltaic (PV) system does not present fuel cost while a natural gas cogenerator (CHP) does.  PVs: for grid connected PV systems up to 5 kW (considering crystalline-Si technology) the investment cost using data of the Greek market for 2011 is approximately 3—4 €=W. The fuel cost is zero, while the maintenance/operating cost for the system lifetime (25 years) is approximately 1% of the investment/year. This cost includes also the inverter change. It is worth mentioning that such a system presents daily operating cycles according to the irradiance availability which can vary from zero to maximum power;  Lead-Acid Battery Storage: the energy capacity considered is up to 50 kW h while the rated power around 5–10 kW depends on the inverter capability. The AC battery storage system adds an additional cost of approximately 0:05—0:10 €=kW h to each kW h being stored and returned to consumption, mainly because the battery needs to be replaced periodically (every 5–10 years), and the related cost needs to be recovered over the limited lifetime of the battery). The inverter cost is about 0:8—1:0 €=W for a 4quadrant inverter (an inverter that is capable of providing both positive and negative active and reactive power). Finally, the maintenance and operating cost can be considered negligible since the only requirement is de-ionized water check every 3 months ð0:25 €=ltÞ and addition if necessary, as well as dust cleaning. If we assume that we never discharge the battery bank under 50% (i.e. the maximum Depth of Discharge is 50%), then we may expect 2500 full

A. Parisio et al. / Applied Energy 115 (2014) 37–46

43

Fig. B.3. Exchanged power with the battery over 24 sampling periods (6 h) for Experiment 2. Output of the control algorithm.

Fig. B.5. Fuel cell power generation over 24 sampling periods (6 h) for Experiment 1. Output of the control algorithm.

cycles during the life time of 12.5 years. Therefore the cost over 12.5 years (assuming that we will replace the batteries once during the system lifetime of 25 years) for 100 kW h is 15; 000 €. The total energy exchanged is then given by: Total energy ¼ Nominal capacity ðkW hÞ  2500, which provides the charging/discharging energy. Assuming also an average coefficient of charge/discharge cycle efficiency of 0.85 times and a coefficient of degradation/ageing of 0.90, averaged over the lifetime of the batteries, the total energy exchanged for a 100 kW h battery will be approximately 191 250 kW h (0.85  0.90  100  2500 = 191 250), and hence the battery cost per kW h exchanged is equal to 0:0784 €/kW h. In order to run a 6-h test, the minimum allowable storage capacity is set to 75% primarily for safety reasons and secondly for 0:0784 €=kW h value be a more accurate estimate of the battery cost;  Fuel cell: in our case the power range of fuel cell was considered between 1 and 5 kW. For the specific power range, the cost parameters are estimated as follows. The invest-

ment cost is considered as 3000—5000 €=kW without including the associated power electronics unit. The lifetime of a PEM fuel cell stack is approximately 20,000 h of operation. This means that the stack requires replacement with 40% of the initial investment cost which results in a maintenance cost of 0:1 € per sampling period, i.e. 8000 €=20; 000 h=4 ¼ 0:1 € each 15 min;  Natural gas l-CHP: The power range considered in our study was up to 2 kW. The investment cost for such a unit is around 1:5 €=W while the system lifetime is 3500 h of operation. The fuel cost was assumed as 48 €=kW h while the operating and maintenance cost for the units was assumed 0:01 €=kW h.

5.1.2. Battery efficiency The battery system efficiency was estimated by making some reasonable assumptions in terms of battery internal processes and bi-directional inverter topology operation. More specifically,

Fig. B.4. Exchanged power with the battery over 24 sampling periods (6 h) for Experiment 1. Output of the control algorithm.

Fig. B.6. CHP power generation over 24 sampling periods (6 h) for Experiments 1, 2 and 3. Output of the control algorithm.

44

A. Parisio et al. / Applied Energy 115 (2014) 37–46

Fig. B.7. Exchanged energy with the utility grid over 24 sampling periods (6 h) for Experiment 1. Output of the control algorithm.

the efficiency of a lead-acid battery in PV applications is affected by different factors such as internal resistances, self-discharge, gas production during charging. During discharging, the effects due to gassing and self-discharging are neglectable, while energy losses occur due to internal resistances [48]; on the other hand, during charging all the aforementioned effects are present and lead to a lower energy efficiency. Moreover, the bi-directional battery inverter may present the opposite behavior due to its topology: lower efficiency during discharging (supplying energy to the grid) and higher during charging (absorbing energy from the grid). In our experiments, the battery system was controlled in order to prevent it from operating under extreme conditions like deep discharge, high charging voltage, very high/low power. Because of this, we could reasonably assume that the total efficiency of the whole system is the same both in charging and discharging mode, and it is equal to 80% (gc ¼ gd ¼ 0:8 in (2)). 6. Performance of model predictive control in microgrid The results of three experiments are presented:

Fig. B.8. Exchanged power with the battery over 24 sampling periods (6 h) for Experiment 2. Output of the control algorithm.

Fig. B.9. Exchanged power with the battery over 24 sampling periods (6 h) for Experiment 3. Output of the control algorithm.

 Experiment 1: the microgrid is operated without high-level control;  Experiment 2: the microgrid operations are managed by the MPC–MILP control scheme with a planning horizon of 24 steps;  Experiment 3: the microgrid operations are managed by the MPC–MILP control scheme with a planning horizon of 72 steps. During the Experiment 1, the system was operated with the same consumption profiles and the ultimate purpose of this test was the power balance between production and consumption. In other words, the system operated so as to minimize the power flow to and from the public grid. This is the fundamental concept of microgrids since they are designed so as to exploit as much as possible the benefits of Distributed Energy Resources (see [2,49]). During the other two experiments, the battery was not significantly utilized, as shown in Fig. B.3, due to its high maintenance costs,

Fig. B.10. Curtailments over 24 sampling periods (6 h). Output of the control algorithm.

45

A. Parisio et al. / Applied Energy 115 (2014) 37–46

while it is employed in Experiment 1, which was not based on economic savings (see Fig. B.4). Namely, also the fuel cell was utilized in Experiment 1 (see Fig. B.5), while it was always off during the experiment with high-level control: this is due to its large operative and maintenance costs and its low efficiency in electrical power generation. It would be likely utilized in case the thermal demand and the emissions were included in the problem formulation. The CHP unit was always run at its maximum power in these experiments (see Fig. B.6). Figs. B.7, B.8 and B.9 show the power exchanged with the utility grid. The total cost for Experiment 1 is 27:43 €, for Experiment 2 is 19:6 € and for Experiment 3 is 17:9 €. Then the MPC–MILP strategy yields a 28.5% saving with T ¼ 24 time steps and a 34.7% saving with T ¼ 72 time steps. Curtailments are usually penalized since they lead to user discomfort; so they are not performed unless strictly convenient or necessary. Hence, all experiments run with a penalty on curtailments, qc , equal to 0.5, show no curtailment. We ran another experiment over 24 steps reducing qc to 0:1 in the last hour and Fig. B.10 shows how the optimization algorithm uses this relaxation. The economic saving with respect to the experiment with qc ¼ 0:5 is not significant because the PV power generation during this experiment was much smaller, so a larger amount of energy needed to be bought from the utility grid. A trade-off between cost and demand peak reduction and user comfort can be achieved by tuning the parameter qc . It is worth mentioning that under some circumstances the actual power values deviated from the setpoints due to the following reasons: (i) the Battery Storage Inverter presented power derating when overheated, which led to a power reduction. As a result, the microgrid covered the deficit by absorbing power from the public grid; (ii) the second battery system which was used to simulate the CHP unit, presented at a specific moment deep discharge due to the bad battery state of health. Because of this, it was necessary to manually reverse the power for small intervals of 15 min. This, despite not being counted as energy absorption, was considered as zero production intervals, leading to deviation from the setpoints; and (iii) in some experiments, the weather conditions lead to reduced power from the PV and hence to deviation from the predicted power. 6.1. Computational details The MPC problem formulation was implemented using Matlab. We used ILOG’s CPLEX 12.0 [50] to solve the MILP optimizations. In the presented experimental study, a large number of MILP problems has been solved and an optimal solution was always obtained in less than 1 s on average. All the forecasts are obtained by Matlab’s SVM (Support Vector Machine) toolbox, a LS-SVM training and simulation environment written in C-code [51].

tail in the problem formulation so to take advantage of the DERs’ economic benefits. The experiments have also evidenced how allowable curtailments can be performed and a trade-off between demand peak reduction and user comfort can be achieved. Future work will focus on including state estimation and reactive power management in the control scheme. Further extensions of the presented study will include a sensitivity analysis of the optimization model’s parameters; for instance, critical parameters are the number of battery cycles and the battery capacity, which are largely affected by the operation profile. 8. Glossary  Distributed Energy Resources: also called on-site generation, they are small, modular, decentralized, grid-connected or off-grid energy systems located in or near the place where energy is used.  Demand Side Management: a set of programs that allow consumers a greater role in shifting their energy demand and reduce their energy use.  Independent System Operator: an organization that coordinates, controls and monitors the operation of the electrical power system. Usually within a single U.S. State.  Regional Transmission Organization: an organization that performs the same functions as ISOs, but cover a larger geographic area.

Acknowledgements The authors are grateful to the Center for Renewable Energy Sources and Saving (CRES) for the support provided during the experiments; in particular the authors would like to thank Dr. Stathis Tselepi for invaluable support on cost parameters’ estimation. Appendix A. Linear approximation of fuel consumption cost function Since experience has shown that mixed integer linear programs are computationally more efficient than quadratic programs, the fuel cost function of a DG generator, C DG ðPÞ ¼ a1 P2 þ a2 P þ a3 is approximated by the max of affine functions without introducing binary variables [47]:

C DG ðPÞ maxj¼1;...;n fSj P þ sj g ¼ kSP þ sk1 ;

ðA:1Þ

where P is the generated power and S and s are obtained by linearizing the function at n points (the subscript j extracts the jth row of S and s). Appendix B. Support Vector Regression (SVR) training algorithm

7. Conclusions and future steps We have presented an MPC approach to modeling and optimization of microgrids. A novel mixed integer linear framework has been illustrated, which includes unit commitment, economic dispatch, energy storage, grid interaction and curtailment schedule. Further, to potentially compensate inevitable disturbances and forecast errors, we have incorporated this into an MPC framework. The proposed approach has been investigated on an experimental microgrid located in Athens, Greece. Experimental results have shown that our MPC–MILP control scheme is able to economically optimize the microgrid operations and save money compared to the current practice; the cost is addressed and parametrized in de-

The training algorithm of a SVR involves a quadratic optimization program, which provides a unique solution and does not require the random initialization of weights, as in NN training. The training data set is defined as follows:

fxi ; yi g i ¼ 1; . . . ; N where N is the number of samples, xi ; yi are real-valued input patterns and corresponding outputs, respectively. The SVR training algorithm aims at finding a nonlinear mapping /ðxÞ of the input data x and then solving a linear regression problem in this feature space. The function representing the relationship between the output and input is

46

yi ¼

A. Parisio et al. / Applied Energy 115 (2014) 37–46 N X wi /ðxi Þ þ bi ;

ðB:1Þ

i¼1

where, for each sample i; bi is the scalar thresholds and wi is the weight coefficient. Then, the parameters wi and bi are estimated by solving the following convex regression problem in this feature space:

min 0:5wT w þ C

w;b;n;n

N X ðn þ n Þ; i¼1

s:t: yi  wT /ðxi Þ  bi 6  þ n ;

ðB:2Þ

wT /ðxi Þ þ bi  yi 6  þ n; n; n P 0 i ¼ 1; . . . ; N; where the parameter C is the regularization parameter, which assigns penalty to the errors and determines a trade-off between the flatness of the regression function and the training error, n and n are the slack variables of the upper and the lower bound of the training vector, and  is the residual tolerance. References [1] Ustun T, Ozansoy C, Zayegh A. Recent developments in microgrids and example cases around the world. A review. Renew Sustain Energy Rev 2011;15(8):4030–41. [2] Lasseter R, Piagi P. Microgrid: a conceptual solution. in: IEEE annual power electron specialists conference; 2004. p. 4285–90. [3] Hatziargyriou N, Asano H, Iravani R, Marnay C. Microgrids. IEEE Power Energy Mag; 2007. [4] Chen Y, Lu S, Chang Y, Lee T, Huc M. Economic analysis and optimal energy management models for microgrid systems: a case study in Taiwan. Appl Energy 2013;103:145–54. [5] Marzband M, Sumper A, Dominguez-Garcia J, Gumara-Ferret R. Experimental validation of a real time energy management system for microgrids in islanded mode using a local day-ahead electricity market and MINLP. Energy Convers Manage 2013;76:314–22. [6] Dinghuan Z, Yang R, Hug-Glanzmann G. Managing microgrids with intermittent resources: a two-layer multi-step optimal control approach. In: North American Power Symposium (NAPS). Texas at Arlington Texas, USA; 2010. [7] O’Neill R, Dautel T, Krall E. Recent ISO software enhancements and future software and modeling plans. Staff report, Tech rep, Federal Energy Regulatory Commission; November 2011. [8] Sioshansi R, O’Neill R, Oren S. Economic consequences of alternative solution methods for centralized unit commitment in day-ahead electricity markets. IEEE Trans Power Syst 2008;23(2):344–52. [9] Ilic J, Prica M, Rabiei S, Goellner J, Wilson D, Shih C, Egidi R. Technical and economic analysis of various power generation resources coupled with caes systems, Tech rep, National Energy Technology Laboratory, DOE/NETL-2011/ 1472; June 2011. [10] Hoffman M, Kintner-Meyer M, Sadovsky A, DeSteese J. Analysis tools for sizing and placement of energy storage for grid applications – a literature review. Tech rep, Pacific Northwest National Laboratory (DOE/PNNL), Richland, WA (US); 2010. [11] Strategic deployment document for Europe’s electricity networks of the future; 2008. . [12] Molderink A, Bakker V, Bosman M, Hurink J, Smit G. Management and control of domestic smart grid technology. IEEE Trans Smart Grid 2010;1(2):109–19. [13] Siddiqui A, Marnay C, Bailey O, LaCommare K. Optimal selection of on-site power generation with combined heat and power applications. Int J Distributed Energy Resour 2005;1(1):33–62. [14] Pepermans G, Driesen J, Haeseldonckx D, Belmans R, D’haeseleer W. Distributed generation: definition, benefits and issues. Energy Policy 2005;33(6):787–98. [15] Siddiqui A, Marnay C, Firestone R, Zhou N. Distributed generation with heat recovery and storage. J Energy Eng 2007;133(3):181–210. [16] Wang L, Wang Z, Yang R. Intelligent multiagent control system for energy and comfort management in smart and sustainable buildings. IEEE Trans Smart Grid 2012;3(2):605–17. [17] Takeuchi A, Hayashi T, Nozaki Y, Shimakage T. Optimal scheduling using metaheuristics for energy networks. IEEE Trans Smart Grid 2012;3(2):968–74. [18] Chen C, Duan S, Cai T, Liu B, Hu G. Smart energy management system for optimal micro grid economic operation. Renew Power Gener IET 2011;3:258–67. [19] Colson C, Nehrir H, Gunderson R. Multi-agent microgrid power management. In: 18th IFAC world congress. Milano, Italy; 2011.

[20] Stluka P, Godbole D, Samad T. Energy management for buildings and microgrids. In: IEEE conference on decision and control. Orlando, Florida, USA; 2011. [21] Liao G-C. Solve environmental economic dispatch of smart microgrid containing distributed generation system – using chaotic quantum genetic algorithm. Electr Power Energy Syst 2012;43:779–87. [22] Basu A. Microgrids: planning of fuel energy management by strategic deployment of chp-based ders an evolutionary algorithm approach. Electr Power Energy Syst 2013;44:326–36. [23] Zhang Q, Tezuka T, Ishihara K, Mclellan B. Integration of PV power into future low-carbon smart electricity systems with EV and HP in Kansai Area, Japan. Renew Energy 2012;44:99–108. [24] Marzband M, Sumper A, Ruiz-lvarez A, Domnguez-Garcia J, Tomoiaga B. Experimental evaluation of a real time energy management system for standalone microgrids in day-ahead markets. Appl Energy 2013;106:365–76. [25] Pandz˘ic` H, Kuzle I, Capuder T. Virtual power plant mid-term dispatch optimization. Appl Energy 2013;101:134–41. [26] Kopanos G, Georgiadis M, Pistikopoulos E. Energy production planning of a network of micro combined heat and power generators. Appl Energy 2013;102:1522–34. [27] Roche R, Idoumghar L, Suryanarayanan S, Daggag M, Solacolu C, Miraoui A. A flexible and efficient multi-agent gas turbine power plant energy management system with economic and environmental constraints. Appl Energy 2013;101:644–54. [28] Kyriakarakos G, Piromalis D, Dounis A, Arvanitis K, Papadakis G. Intelligent demand side energy management system for autonomous polygeneration microgrids. Appl Energy 2013;103:39–51. [29] Niknam T, Azizipanah-Abarghooee R, Narimani M. An efficient scenario-based stochastic programming framework for multi-objective optimal micro-grid operation. Appl Energy 2012;99:455–70. [30] Otomega B, Marinakis A, Glavic M, Cutsem TV. Model predictive control to alleviate thermal overloads. IEEE Trans Power Syst 2007;22(3):1384–5. [31] Hooshmand A, Malki H, Mohammadpour J. Power flow management of microgrid networks using model predictive control. Comput Math Appl, 2007. [32] Xia X, Zhang J, Elaiw A. A model predictive control approach to dynamic economic dispatch problem. In: IEEE Bucharest power tech conference. Bucharest, Romania; 2009. [33] Kriett P, Salani M. Optimal control of a residential microgrid. Energy 2012;42:321–30. [34] Su W, Wang J, Zhang K, Huang A. Model predictive control-based power dispatch for distribution system considering plug-in electric vehicle uncertainty. Electr Power Syst Res 2014;106:29–35. [35] Qi W, Liu J, Chen X, Christofides P. Supervisory predictive control of standalone wind/solar energy generation systems. IEEE Trans Control Syst Technol 2011;19(1):199–207. [36] Qi W, Liu J, Chen X, Christofides P. Supervisory predictive control for long-term scheduling of an integrated wind/solar energy generation and water desalination system. IEEE Trans Control Syst Technol 2012;20(2):504–12. [37] Palma-Behnke R, Benavides C, Lanas F, Severino B, Reyes L, Llanos J, et al. A microgrid energy management system based on the rolling horizon strategy. IEEE Trans Smart Grid PP 2013(99):1–11. [38] Bidram A, Davoudi A. Hierarchical structure of microgrids control system. IEEE Trans Smart Grid PP 2012(99):1–14. [39] Maciejowski J. Predictive control with constraints. Harlow (UK): Prentice Hall; 2002. [40] Mayne D. Constrained optimal control. In: European control conference, plenary lecture. Porto, Portugal; 2001. [41] Floudas C. Nonlinear and mixed-integer programming – fundamentals and applications. Oxford (UK): Oxford University Press; 1995. [42] Bemporad A, Morari M. Control of systems integrating logic, dynamics, and constraints. Automatica 1999;35(3):407–27. [43] Parisio A, Glielmo L. Energy efficient microgrid management using model predictive control. In: IEEE conference on decision and control. Orlando, Florida, USA; 2011. [44] Parisio A, Rikos E, Glielmo L. Microgrid operation optimization using model predictive control, Tech rep, Universit‘a degli Studi del Sannio; February 2012. [45] Carriòn M, Arroyo J. A computationally efficient mixed-integer linear formulation for the thermal unit commitment problem. IEEE Trans Power Syst 2006;21(3):1371–8. [46] Richard A, How J. Mixed-integer programming for control. In: American control conference, vol. 4, Portland, Oregon (USA); 2005. p. 2676–83. [47] A. Bemporad, Model predictive control of hybrid systems, in: Advanced process control applications for industry workshop. Vancouver, British Columbia; 2007. [48] Zahedi A. Development of an electrical model for a PV/battery system for performance prediction. Renew Energy 1998;15:531–4. [49] Siddiqui A, Asano H, Hatziargyriou N, Aramburo CH, Marnay C. Microgrids: engineering and economic, Tech. rep., UK Energy Research Centre. Springer; 2008. [50] ILOG. CPLEX 12.0 users manual; 2012. [51] Pelckmans K, Suykens J, Gestel TV, Brabanter JD, Lukas L, Hamers B, Moor BD, Vandewalle J. LS-SVMlab: a MATLAB/C toolbox for least squares support vector machines, ESAT-SCD-SISTA K.U. Leuven Kasteelpark Arenberg 10, B-3001 Leuven-Heverlee. Belgium; 1998.