16
1 Risk-Averse Model Predictive Operation Control of Islanded Microgrids Christian A. Hans, Pantelis Sopasakis, Jörg Raisch, Carsten Reincke-Collon and Panagiotis Patrinos Abstract—In this paper we present a risk-averse model pre- dictive control (MPC) scheme for the operation of islanded microgrids with very high share of renewable energy sources. The proposed scheme mitigates the effect of errors in the determination of the probability distribution of renewable infeed and load. This allows to use less complex and less accurate forecasting methods and to formulate low-dimensional scenario- based optimisation problems which are suitable for control applications. Additionally, the designer may trade performance for safety by interpolating between the conventional stochastic and worst-case MPC formulations. The presented risk-averse MPC problem is formulated as a mixed-integer quadratically- constrained quadratic problem and its favourable characteristics are demonstrated in a case study. This includes a sensitivity analysis that illustrates the robustness to load and renewable power prediction errors. Index Terms—Average value-at-risk, energy management, is- landed microgrids, model predictive control, operation control, risk-averse control. I. I NTRODUCTION The substitution of conventional power plants by renewable energy sources (RES) is a key element in the fight against climate change. However, it presents major challenges. The structure of power supply is expected to change from a small number of large-scale power plants to a large number of small- scale units. These will be geographically distributed over the entire electric grid. Additionally, the uncertainty in power supply of some RES will complicate the operation of the grid. One way to tackle these challenges is to partition the electric grid into microgrids (MGs) [1]. These comprise storage, conventional and renewable units connected to each other and to loads by power lines [2]. MGs can be operated connected to the grid or electrically isolated (islanded) [3]. Inspired by conventional power systems, hierarchical approaches have been promoted for the control of MGs, e.g., in [4]. On the C.A. Hans is with Technische Universität Berlin, Control Systems Group, Germany, [email protected]. P. Sopasakis is with Queen’s University Belfast, School of Electronics, Electrical Engineering and Computer Science, Centre For Intelligent Au- tonomous Manufacturing Systems (i-AMS), Belfast, Northern Ireland, UK, [email protected]. J. Raisch is with Technische Universität Berlin, Control Systems Group and Max-Planck-Institut für Dynamik komplexer technischer Systeme, Germany, [email protected]. C. Reincke-Collon is with Younicos GmbH (wholly owned subsidiary of Aggreko Deutschland GmbH), Germany, [email protected]. P. Patrinos is with KU Leuven, Department of Electrical Engineering (ESAT), Belgium, [email protected]. This work was partially supported by the German Federal Ministry for Economic Affairs and Energy (BMWi), Project No. 0324024A and 0325713A. lower control layer, typically on a timescale from millisec- onds to seconds, primary control aims to provide voltage and frequency stability. Secondary control, typically on a timescale from seconds to minutes, aims at compensating frequency deviations and ensures that the voltages remain close to the desired values. Operation control, also referred to as energy management, usually acts on a timescale of minutes to fractions of hours. It aims at optimising the MG operation by providing power setpoints to the units [5]. For this task, model predictive control (MPC) approaches are considered a good choice as they allow to explicitly include constraints on the units, take into account the system dynamics and can be combined with forecasts of load and renewable infeed to operate the MG in an optimal way. A. Operation control of MGs Several approaches for the operation control of MGs have been proposed. One way to categorise them is by the way they handle uncertainties. Prominent control formulations are (i) certainty-equivalent, where a deterministic model of the system is fully trusted, (ii) worst-case robust, where a con- troller minimises the worst-case performance, (iii) risk-neutral stochastic, where an underlying probability distribution is trusted, or (iv) risk-averse, where the underlying distribution is not fully trusted. There is a variety of publications on operation control of MGs where a perfect forecast is assumed. For example, in [6] a certainty-equivalent approach for grid-connected MGs is proposed. Similarly, based on the assumption that the forecast generation of RES, load and the energy price are certain, in [7] an MPC is proposed. For islanded MGs, an MPC approach that also assumes perfect forecasts is presented in [8]. Yet another certainty-equivalent approach that includes power flow over the lines is proposed in [9]. The proposed formulation also includes the possibility to limit power provided by RES. However, as shown in [10], in the operation of islanded MGs with high share of RES, certainty-equivalent approaches can lead to significant constraint violations. To compensate for this lack of robustness, some authors have proposed worst-case approaches. Assuming bounded uncertain model parameters of conventional units and RES, in [11] an MPC framework for the operation of a grid- connected MG is presented. In the worst-case formulations [10], [12], uncertain bounded forecasts of load and RES were considered. The MPC approach for islanded MGs includes power flow over the lines, power sharing of grid-forming units and curtailable renewable infeed. However, these approaches

Risk-Averse Model Predictive Operation Control of Islanded ... file1 Risk-Averse Model Predictive Operation Control of Islanded Microgrids Christian A. Hans, Pantelis Sopasakis, Jörg

Embed Size (px)

Citation preview

1

Risk-Averse Model Predictive Operation Controlof Islanded Microgrids

Christian A. Hans, Pantelis Sopasakis, Jörg Raisch, Carsten Reincke-Collon and Panagiotis Patrinos

Abstract—In this paper we present a risk-averse model pre-dictive control (MPC) scheme for the operation of islandedmicrogrids with very high share of renewable energy sources.The proposed scheme mitigates the effect of errors in thedetermination of the probability distribution of renewable infeedand load. This allows to use less complex and less accurateforecasting methods and to formulate low-dimensional scenario-based optimisation problems which are suitable for controlapplications. Additionally, the designer may trade performancefor safety by interpolating between the conventional stochasticand worst-case MPC formulations. The presented risk-averseMPC problem is formulated as a mixed-integer quadratically-constrained quadratic problem and its favourable characteristicsare demonstrated in a case study. This includes a sensitivityanalysis that illustrates the robustness to load and renewablepower prediction errors.

Index Terms—Average value-at-risk, energy management, is-landed microgrids, model predictive control, operation control,risk-averse control.

I. INTRODUCTION

The substitution of conventional power plants by renewableenergy sources (RES) is a key element in the fight againstclimate change. However, it presents major challenges. Thestructure of power supply is expected to change from a smallnumber of large-scale power plants to a large number of small-scale units. These will be geographically distributed over theentire electric grid. Additionally, the uncertainty in powersupply of some RES will complicate the operation of the grid.

One way to tackle these challenges is to partition the electricgrid into microgrids (MGs) [1]. These comprise storage,conventional and renewable units connected to each other andto loads by power lines [2]. MGs can be operated connectedto the grid or electrically isolated (islanded) [3]. Inspiredby conventional power systems, hierarchical approaches havebeen promoted for the control of MGs, e.g., in [4]. On the

C. A. Hans is with Technische Universität Berlin, Control Systems Group,Germany, [email protected].

P. Sopasakis is with Queen’s University Belfast, School of Electronics,Electrical Engineering and Computer Science, Centre For Intelligent Au-tonomous Manufacturing Systems (i-AMS), Belfast, Northern Ireland, UK,[email protected].

J. Raisch is with Technische Universität Berlin, Control Systems Group andMax-Planck-Institut für Dynamik komplexer technischer Systeme, Germany,[email protected].

C. Reincke-Collon is with Younicos GmbH (whollyowned subsidiary of Aggreko Deutschland GmbH), Germany,[email protected].

P. Patrinos is with KU Leuven, Department of Electrical Engineering(ESAT), Belgium, [email protected].

This work was partially supported by the German Federal Ministry forEconomic Affairs and Energy (BMWi), Project No. 0324024A and 0325713A.

lower control layer, typically on a timescale from millisec-onds to seconds, primary control aims to provide voltageand frequency stability. Secondary control, typically on atimescale from seconds to minutes, aims at compensatingfrequency deviations and ensures that the voltages remainclose to the desired values. Operation control, also referred toas energy management, usually acts on a timescale of minutesto fractions of hours. It aims at optimising the MG operationby providing power setpoints to the units [5]. For this task,model predictive control (MPC) approaches are considereda good choice as they allow to explicitly include constraintson the units, take into account the system dynamics and canbe combined with forecasts of load and renewable infeed tooperate the MG in an optimal way.

A. Operation control of MGs

Several approaches for the operation control of MGs havebeen proposed. One way to categorise them is by the waythey handle uncertainties. Prominent control formulations are(i) certainty-equivalent, where a deterministic model of thesystem is fully trusted, (ii) worst-case robust, where a con-troller minimises the worst-case performance, (iii) risk-neutralstochastic, where an underlying probability distribution istrusted, or (iv) risk-averse, where the underlying distributionis not fully trusted.

There is a variety of publications on operation control ofMGs where a perfect forecast is assumed. For example, in[6] a certainty-equivalent approach for grid-connected MGs isproposed. Similarly, based on the assumption that the forecastgeneration of RES, load and the energy price are certain, in[7] an MPC is proposed. For islanded MGs, an MPC approachthat also assumes perfect forecasts is presented in [8]. Yetanother certainty-equivalent approach that includes power flowover the lines is proposed in [9]. The proposed formulationalso includes the possibility to limit power provided by RES.However, as shown in [10], in the operation of islanded MGswith high share of RES, certainty-equivalent approaches canlead to significant constraint violations.

To compensate for this lack of robustness, some authorshave proposed worst-case approaches. Assuming boundeduncertain model parameters of conventional units and RES,in [11] an MPC framework for the operation of a grid-connected MG is presented. In the worst-case formulations[10], [12], uncertain bounded forecasts of load and RES wereconsidered. The MPC approach for islanded MGs includespower flow over the lines, power sharing of grid-forming unitsand curtailable renewable infeed. However, these approaches

2

have been found to be overly conservative as they try tominimise the worst-case objective (see, e.g., [10], [12]).

The conservativeness of worst-case approaches has lead tothe wide adoption of stochastic methods, which consist inminimising the expected value of a random cost with respectto an assumed probability distribution. There are two mainapproaches to modelling randomness: (i) random processeswith continuous distributions (e.g., independent and identicallydistributed Gaussian processes) and (ii) scenario trees.

In the area of microgrid control, some authors have used theassumption that all involved uncertain quantities are normallydistributed [13]–[16]. Having unbounded support, Gaussiandisturbances make it impossible to satisfy state constraintsuniformly; instead, we need to resort to chance constraints.Dealing with chance constraints hinges on the normalityassumption and further requires that the involved randomprocesses are independent [17], [18]. An approach for chanceconstraints that drops the normality assumption is presented in[19] using polynomial chaos expansions and machine learning.

Scenario-based approaches seem to be more popular inmicrogrid control [7], [16], [20]–[25]; mainly because scenariotrees can be constructed from data [26]–[28] and because theassumption of independence does not need to be imposed.Anapproach that employs more complex forecast probabilitydistributions of load, RES and the market price for tradingenergy in a scenario-based fashion was introduced in [21]. In[22], another scenario-based approach combining an optimaloperation scheduling with an MPC and assuming uncertainweather and load was proposed. Furthermore, [7] was extendedin [23] to a two-stage stochastic MPC approach, which wasformulated using scenario trees. There are also stochasticapproaches that are dedicated to the operation control ofislanded MGs. In [24], a scenario-based optimal operationcontrol strategy for droop controlled MGs is presented. There,a heuristic particle swarm optimisation is used to minimise theexpected value of costs while accounting for power limitationsof the transmission lines. A stochastic continuous-time rollinghorizon control strategy that considers uncertain load is foundin [25]. However, this approach disregards the power flowover the transmission lines, possible power sharing among gridforming units and the possibility to limit power provided byRES. There exist other scenario-based approaches, e.g., [16],that account for power flow. However, [16] does not allow tolimit infeed from RES. One approach that includes both powerflow and curtailable RES is the scenario-based stochastic MPCpresented in [20]. Scenario-based MPC approaches that mini-mize the expectation of the cost assume that the scenario treeoffers an adequate representation of the underlying probabilitydistribution. The realisation that this assumption does notalways hold led to the emergence of risk-averse MPC [29],[30] which aims at safeguarding the controlled system from theinexact knowledge of the underlying probability distribution.

B. Motivation for risk-averse formulations

Risk measures stem from the domains of operations re-search, stochastic finance and actuarial science [31], [32].When used in optimisation problems, they allow to mitigate

the effects of inexact knowledge of the underlying probabilitydistribution of the uncertain values. They bridge the gapbetween conservative worst-case approaches, which assumeno knowledge about the underlying probability distributionand stochastic approaches, which assume perfect knowledge.Therefore, risk-averse approaches are suitable for practicalimplementations where probability distributions are not knownexactly or can change over time. In the case of operationmanagement of MGs it is likely that the predicted load andrenewable infeed are not only uncertain, but the estimatedprobability distribution is inaccurate as well. As such errorscan have a high impact on the controlled system it is importantto design controllers that are robust with respect to forecasterrors and errors in the determination of their probabilitydistribution.

A popular risk measure is the average value-at-risk (AVaR),also known as expected shortfall. Other risk measures includethe mean upper semideviation, the entropic value-at-risk andthe expectiles (see, e.g., [31], [33]). AVaR is well-studied andwell-established. Reasons for this are that it is polytopic, whichoffers great convenience for computational purposes, and thatit allows to perform an interpolation between the worst-case (based on the maximum operator) and stochastic (basedon the expectation operator) formulations using one singleparameter. Furthermore, AVaR is a tight convex approximationof the quantile operator which makes it suitable for chance-constrained formulations [34].

Despite the fact that risk-averse problems enjoy favourableproperties, their applicability has been limited due to theircomplexity and computational cost of resulting multistagerisk-averse optimal control problems. The reason is that thecost function of risk-averse problems is expressed by a com-position of several nonsmooth mappings [31]. Up to now,there have only been numerical optimisation methods that werehard to apply (e.g., stochastic dual dynamic programming)and limited to linear cost functionals [35]–[37]. An alternativesolution approach uses multiparametric piecewise quadraticprogramming [38], yet its applicability is limited to systemswith few states and small prediction horizons [39]. This hasbeen daunting and risk-averse problems involving integer vari-ables were often considered overly computationally complexfor real-time applications.

C. Risk-based approaches in power systems

The study of risk-averse optimisation problems is becomingmore popular in power systems applications as discussedin [40]. Such problems have been investigated in severalapplication domains such as unit commitment, scheduling andoptimal power flow. For unit commitment some two-stageapproaches can be found, e.g., in [41], [42]. In [43] theday-ahead schedule for a hydro chain is determined usingAVaR-based constrains. An approach for reserve schedulingconsidering uncertain wind power is presented in [44]. Forday-ahead scheduling of a virtual power plant combining awind power plant and a cascade hydro system in [45] a min-risk two-stage formation is proposed. For optimal power powerflow, risk-averse approaches have been discussed. Considering

3

uncertain RES and load reserve capacity, in [46] a risk-averseformulation that ensures that chance constraints are satisfiedis introduced. Moreover, in [47], a risk-averse optimal powerflow approach that uses convex approximations of chanceconstraints is presented and in [48] a risk-based optimal powerflow formulation with probabilistic guarantees is introduced.

Risk-averse formulations have also been used in other ap-plications that are related to power systems. For optimal windpower trading, a nonlinear optimisation problem is presentedin [49]. In [50], using the AVaR, an approach for expansion andoperation planing for a hydrothermal system is proposed. Amulti-stage formulation for short-term trading with uncertainpower from wind turbines and market prices is introducedin [51]. Moreover, considering uncertain wind power, a two-stage approach that aims at minimising carbon emissionsis presented in [52]. For grid-connected MGs a comparisonbetween a scenario-based risk-averse stochastic and a worst-case optimisation approach is presented in [40].

Although risk-averse optimisation problems are gainingpopularity, most of them ([41], [42], [45], [49]–[52]) are basedon simple formulations which fail to capture how the risk isgenerated by the underlying stochastic process. Desired prop-erties in risk-averse MPC result from multi-stage formulationswith nested conditional risk mappings; these are discussedin detail in Section VI. Such risk-averse MPC problemslead to intricate optimisation problem formulations where thecost function is expressed as the composition of nonlinearnonsmooth mappings which makes them less suitable forMPC [29], where fast computations are required. Nevertheless,in this paper we use a reformulation that decomposes thesenested mappings and and allows to solve risk-averse MPCproblems efficiently online.

D. Contributions

In brief, the contributions of this work are: (i) we introducea novel constrained hybrid dynamical model for islandedMGs, (ii) we propose a multi-stage risk-averse MPC problemfor the optimal operation of an MG, (iii) we reformulatethe risk-averse optimal control problem in a computationallytractable way and (iv) we demonstrate the properties of theproposed operation control scheme in a simulation case study.

(i) We present the model of an islanded MG with uncertainrenewable generation and loads that allows for configurationswith very high share of RES. This model, motivated by [10],[20], considers a possible limitation of renewable infeed whilelimitations on transmission lines are approximately accountedfor using DC power flow calculations. Furthermore, we modelstorage devices as grid-forming units and consider powersharing with the enabled conventional generators. This way,the fluctuations of load and renewable generation affect thepower of all units and the state of charge of the storage devices.This allows operating modes where only RES and storage unitsare operated and no conventional unit is required.

(ii) We extend [10], [20] to formulate a risk-averse MPCproblem for islanded MGs. Similar to stochastic MPC (see,[20], [53]), at every time instant we solve an optimisationproblem on a scenario tree to find an optimal control policy.

However, scenario formulations often require a very largenumber of nodes to achieve a decent approximation of theunderlying distribution. The presented risk-averse approachallows for fewer nodes in the scenario tree as it mitigates theeffect of uncertainty in the estimated probability distribution.This allows for robustness against bad forecast models of loadand renewable infeed, time-varying probability distributions,or approximation errors caused by the generation of thescenario tree. Risk-averse formulations allow us to interpolatebetween worst-case [10] and stochastic [20] MPC. Thereby wecan specify the acceptable risk and provide resilience againsthigh-effect low-probability events.

(iii) Motivated by [29], we use an epigraphical relaxation toreformulate the original risk-averse problem as a mixed-integerquadratically-constrained quadratic problem. This way we de-compose the original nested formulation and render the MPCproblem formulation suitable for real-time implementations.

(iv) In a comprehensive case study, we demonstrate the useof the proposed risk-averse MPC scheme for a simple MG. Wejuxtapose the operation of the MG using a stochastic, a robustand a risk-averse formulation to show that the conservativenessof the controller can be tuned. Lastly, the robustness withrespect to uncertainties in the probability distribution of loadand RES is investigated by means of a sensitivity analysis.

E. Structure of paperThe remainder of the paper is structured along the lines

of Figure 1. In Section II the model of an islanded MG isintroduced. Then, scenario trees are derived from time-seriesbased forecasts in Section III. In Section IV we quantify theoperating costs of the MG. Subsequently, risk measures arediscussed in Section V. Based on this, a risk-averse MPCapproach is derived in Section VI. Finally, in Section VII, theproperties of the resulting MPC are illustrated in a numericalcase study.

F. NotationIn what follows, real numbers are denoted by R and natural

numbers by N. The set of nonnegative integers is denoted byN0. The set x|x ∈ N0 ∧ a ≤ x ≤ b is denoted by N[a,b].Furthermore, the set of nonnegative real numbers is R≥0 andthe set of positive real numbers is R>0. The cardinality of aset V is denoted by |V|. The transpose of a vector a is a>.The vector [av1 av2 · · · avN ]> composed of elements avi forall vi ∈ V = v1, v2, . . . , vN ⊂ N with vi < vj for i < j,i ∈ N[1,N ], j ∈ N[1,N ] is denoted by [ai]i∈V. A vector ofdimension N whose elements are all equal to 1 is denotedby 1N . Let a = [a1 · · · aN ]>. Then, diag (a) denotes thediagonal matrix with entries ai, i ∈ N[1,N ].

When used with vectors, the ≥, ≤, <, > operators arealways understood in the element-wise sense. Equally, themax(a, b) function returns the element-wise maximum of thevectors a and b. However, if the function is used with only onevector input argument, i.e., max(a), then it returns the largestelement of the vector a. The same holds for the minimumfunction min(·). Furthermore, we denote by minx∈X f(x) theminimum value of function f over X and by maxx∈X f(x)the maximum value of f over X.

4

Risk-averseMPC

Microgrid

Uncertain RES & load w(k)

ScenarioreductionForecast

Historic RES & load data

Input

v(k) = v(0)

Measurement

x(0) = xk, δ(0−) = δk−1

Collection of forecastscenarios of RES & load

Scenario treeof RES & load

w(i), π(i)

Fig. 1. Control scheme used in the risk-averse model predictive control approach for islanded MGs (motivated by [20], [53]).

II. MICROGRID MODEL

In this section, we derive a control-oriented mathematicalmodel for islanded MGs. The MG model includes loads, con-ventional, renewable and storage units as well as transmissionlines. The example of a basic MG that includes all thesecomponents is shown in Fig. 7. The MG model has the form

x(k) +Bq(k)− x(k + 1) = 0, (1a)H1 · x(k + 1) ≤ h1, (1b)

H2 ·[v(k)> q(k)> w(k)>

]> ≤ h2, (1c)

G ·[v(k)> q(k)> w(k)>

]>= g, (1d)

where k ∈ N0 is the discrete time instant.Here, x(k) ∈ RS≥0 with S ∈ N is the state vector, q(k) ∈ RQ

the vector of Q ∈ N auxiliary variables and B ∈ RS×Q theinput matrix. Furthermore, H1 is a matrix and h1 a vectorof appropriate dimensions that allow to model state inequalityconstraints of the form (1b). The control inputs are collectedin the vector v(k) = [u(k)> δt(k)>]>, where u(k) ∈ RU isthe vector of real-valued control inputs of all U ∈ N unitsand δt(k) ∈ 0, 1T the vector of T ∈ N Boolean inputs.The uncertain external inputs of the model are collected inthe vector w(k) ∈ RW , W ∈ N. In (1c), H2 is a matrix andh2 a vector of appropriate dimensions that reflect inequalityconstraints. Likewise, in (1d) G is a matrix and g a vector ofappropriate dimensions that reflect equality constraints.

In the following sections, we will derive a control-orientedmodel of the form (1). We start by posing some assumptions.

Assumption II.1 (Lower control layers). We assume that thelower control layers, i.e., secondary and primary control, aredesigned such that the MG can run autonomously for severalminutes. Therefore, providing power setpoints to the units onthe same timescale is sufficient. Furthermore, we assume thatthese control layers ensure a desired power sharing (see, e.g.,[54], [55]) among the grid forming units.

Assumption II.2 (Conventional units). The startup and shut-down times of the conventional units are small compared tothe sampling time of the MPC, i.e., switching actions areassumed to be instantaneous. Furthermore, changes in powerare instantaneous, i.e., no climb rates need to be considered.

Assumption II.3 (Storage units). The state of charge of thestorage units can be estimated sufficiently accurately and isaccessible to the operation control. Additionally, it is theonly state of our model, i.e., we assume the availability offull state measurements. Furthermore, we assume that theerror introduced by neglecting self discharge and conversion

TABLE IMODEL-SPECIFIC VARIABLES

Symbol Explanation Unit Size

x Energy of storage units (state) pu h S

ut Setpoint inputs of conventional units pu Tus Setpoint inputs of storage units pu Sur Setpoint inputs of renewable units pu Ru Setpoint inputs of all units pu Uδt Boolean inputs of conventional units — Tv Vector of all control inputs — Q

wr Uncertain available renewable power pu Rwd Uncertain load pu Dw Vector of all uncertain inputs pu W

pt Power of conventional units pu Tps Power of storage units pu Spr Power of renewable units pu Rp Power of all units pu Upe Power over transmission lines pu Eδr Boolean auxiliary variables — Rρ Real-valued auxiliary variable — 1q Vector of all auxiliary variables — Q

losses of storage units is small compared to the uncertaintyintroduced by intermittent renewable infeed and loads.

Assumption II.4 (Transmission lines). The resistance of thetransmission lines between the units and loads of the MG aswell as the reactive power flow are assumed to be negligible.Also, the voltage amplitudes in the grid are assumed to beconstant and the phase angle differences small. Thus, the DCpower flow approximations (see, e.g., [56]) can be used. Theerror introduced hereby is assumed to be small compared tothe uncertainty introduced by renewable infeed and loads.

A. Plant model interface

The microgrid model presented here is closely relatedto the one introduced in [10]. The real-valued manipulatedvariables are the power setpoints of the units, i.e., u(k) =[ut(k)> us(k)> ur(k)>]> ∈ RU where ut(k) ∈ RT≥0 are thesetpoints of the T conventional units, us(k) ∈ RS the setpointsof the S storage units and ur(k) ∈ RR≥0 the setpoints of the RRES. Furthermore, every conventional unit is associated with aBoolean input that indicates whether it is enabled or disabled.All Boolean inputs are collected in a vector δt(k) ∈ 0, 1T .Furthermore, the stored energies of the storage units arecollected in the state vector x(k) ∈ RS≥0. The uncertainexternal inputs of the model are w(k) = [wr(k)> wd(k)>]>,where wr(k) ∈ RR≥0 represents the maximum available power

5

of the renewable units under given weather conditions andwd(k) ∈ RD≥0 the load.

B. Power of units

In islanded mode, equilibrium of production, consumptionand storage power must be ensured in the presence of uncertainload and renewable infeed. Therefore, the power of the unitsp(k) ∈ RU is not necessarily equal to the setpoints u(k) asillustrated in the following section. The vector of power valuesp(k) = [pt(k)> ps(k)> pr(k)>]> is composed of the power ofthe conventional units, pt(k) ∈ RT≥0, power of the storageunits, ps(k) ∈ RS , and power of the RES, pr(k) ∈ RR≥0.

1) RES units: The power provided by the renewable units,pr(k) and the corresponding setpoints, ur(k), are limited by

pminr ≤ pr(k) ≤ pmax

r and (2a)

pminr ≤ ur(k) ≤ pmax

r (2b)

with pminr ∈ RR≥0 and pmax

r ∈ RR≥0.Additionally, the power infeed pr,i(k) ∈ R≥0 of every

renewable unit i ∈ N[1,R] can be limited by the power setpointur,i(k) ∈ R≥0. However, the power only follows the setpoint ifthe maximum possible infeed under current weather conditionswr,i(k) ∈ R≥0 is greater than or equal ur,i(k). Using theelement-wise min operator, this can be described by

pr(k) = min(ur(k), wr(k)). (3)

For the formulation of the optimisation problem it isbeneficial to transform (3) into a set of linear inequalitiesinvolving integer variables. This can be done by introducingthe free variable δr(k) ∈ 0, 1R (see, e.g., [57]). Then, withthe constants mr ∈ R, mr < min(pmin

r ) and Mr ∈ R≥0,Mr > max(pmax

r ) which can be calculated offline, we canexactly reformulate (3) as

pr(k) ≤ ur(k), (4a)pr(k) ≥ ur(k) + (diag (wr(k))−MrIR)δr(k), (4b)pr(k) ≤ wr(k), (4c)pr(k) ≥ wr(k)− (diag (wr(k))−mrIR)(1R − δr(k)). (4d)

2) Conventional units: The power provided by conventionalunit i ∈ N[1,T ] is limited by pmin

t,i ∈ R≥0 and pmaxt,i ∈ R≥0 if

it is enabled, i.e., if δt,i(k) = 1. If the unit is disabled, i.e.,δt,i(k) = 0, then naturally pt,i(k) = 0. In vector notation andwith pmin

t ∈ RT≥0, pmaxt ∈ RT≥0 this can be expressed by

diag(pmin

t

)δt(k) ≤ pt(k) ≤ diag (pmax

t ) δt(k). (5a)

The same holds for the power setpoints, i.e.,

diag(pmin

t

)δt(k) ≤ ut(k) ≤ diag (pmax

t ) δt(k). (5b)

3) Storage units: As the storage units are assumed to bealways enabled, all their setpoints and power values are limitedby pmin

s ∈ RS≤0 and pmaxs ∈ RS≥0, i.e.,

pmins ≤ ps(k) ≤ pmax

s and (6a)

pmins ≤ us(k) ≤ pmax

s . (6b)

C. Power sharing of grid forming units

Due to variations of load and renewable infeed, the powerof all units does not necessarily match the power setpoints thatare prescribed to the system. The grid forming units, i.e., allstorage and conventional units, are assumed to be controlledby the lower control layers such that they share the changes inload and renewable infeed in a desired proportional manner.This so called proportional power sharing (see, e.g., [54],[55]) depends on the design parameter χi ∈ R>0 for all gridforming units. A typical choice of χi is, e.g., proportional tothe nominal power of the corresponding units.

Power sharing can be formalised as follows. Two units i ∈N[1,T+S] and j ∈ N[1,T+S], i 6= j with χi ∈ R>0 and χj ∈R>0 are said to share their power proportionally, if

pi(k)− ui(k)

χi=pj(k)− uj(k)

χj(7)

holds. Using the auxiliary free variable ρ(k) ∈ R and takinginto account that only enabled units, i.e., units with δt(k) =1, can participate in power sharing, we can rewrite (7) forall grid forming units with Kt = diag ([1/χ1 · · · 1/χT ]>) andKs = diag([1/χ(T+1) · · · 1/χ(T+S)]>) as

Kt(pt(k)− ut(k)) = ρ(k)δt(k) and (8a)Ks(ps(k)− us(k)) = ρ(k)1S . (8b)

To proceed with what follows in the next sections, we need totransform (8a) into a set of linear inequalities with integer vari-ables. This can be done using a similar strategy as described,e.g., in [57]. First, we choose Mt ∈ R which can be calculatedoffline. The value of Mt should be greater than the biggestpossible value of ρ(k). Hence, with the biggest possible valuefor storage units, ρmax

s = max(Ks(p

maxs − pmin

s )), and for

conventional units, ρmaxt = max

(Kt(p

maxt − pmin

t ))

Mt hasto be chosen such that max

(ρmax

s , ρmaxt

)< Mt. Then, with

mt = −Mt, we can exactly reformulate (8a) as

Kt(pt(k)− ut(k)) ≤ Mtδt(k), (9a)Kt(pt(k)− ut(k)) ≥ mtδt(k), (9b)Kt(pt(k)− ut(k)) ≤ 1T ρ(k)−mt(1T − δt(k)), (9c)Kt(pt(k)− ut(k)) ≥ 1T ρ(k)−Mt(1T − δt(k)). (9d)

D. Dynamics of storage units

The dynamics of all storage units are assumed as

x(k + 1) = x(k)− Tsps(k), (10a)

where Ts ∈ R>0 is the sampling time. The stored energy isrepresented by x(k) with initial state x(0) = x0. To cover forthe limited storage capacity, x(k + 1) is bounded by

xmin ≤ x(k + 1) ≤ xmax, (10b)

with xmin = 0S and xmax ∈ RS≥0.

Remark II.5. In the simulation case study in Section VII, weuse a more detailed plant model that is different from (10a).This model is motivated by [7] and includes self-discharge as

6

well as charging and discharging efficiencies of the storageunits. It reads

x(k + 1) =

x(k)− Tsη

cps(k)− xsd, if ps(k) ≤ 0,

x(k)− Ts(ηd)−1ps(k)− xsd, if ps(k) > 0.

(11)Here, ηc ∈ [0, 1]S×S is the diagonal matrix of chargingefficiencies of the units and ηd ∈ [0, 1]S×S the diagonalmatrix of discharging efficiencies, both with nonzero diagonalelements. Furthermore, xsd ∈ RS≥0 models self-discharge.

The simplified storage dynamics of the control-orientedmodel (10a) can be derived from (11) by assuming ηc =ηd = diag (1S) and xsd = 0S . Note that (10a) is used inan MPC context where the state is sampled at every timeinstant and used as initial value to predict future states. Sucha receding horizon strategy allows the use of less accuratemodels due to its inherent robustness [58]. Furthermore, asposed in Assumption II.3, the error introduced by uncertainrenewable infeed and load is assumed to be much largerthan the one introduced by (10a). Therefore, the model-plantdiscrepancy is of minor importance.

E. Transmission network

The power transmitted over the lines can be derived usingDC power flow approximations for AC grids (see, e.g., [10],[56]). Thus, the power flowing over the transmission lines,pe(k) = [pe,1(k) · · · pe,E(k)]>, can be derived from thepower of the units and the load using the linear relation

pe(k) = F ·[p(k)> wd(k)>

]>, (12a)

where F ∈ RE×(U+D) is a matrix that links the power flowingover the lines with the power provided or consumed by theunits and loads. More information on the derivation of F canbe found, e.g., in [10], [59]. Due to the limited transmissioncapability of the lines, pe(k) is desired to be bounded as

pmine ≤ pe(k) ≤ pmax

e (12b)

with pmine ∈ RE≤0 and pmax

e ∈ RE≥0. Additionally, generatedpower must equal consumed power at all times, i.e.,

1>T pt(k) + 1

>Sps(k) + 1

>Rpr(k) = 1

>Dwd(k). (12c)

Remark II.6. There are small MGs in which all units aredirectly connected to a single bus (see, e.g., [7], [23]). Thereare two ways to model them in (12). (i) Discard constraints(12a) and (12b) and only keep (12c). (ii) Set F = [1

>U − 1

>D].

Due to (12c), in this case pe(k) = 0 holds for all k ∈ N0 andthe limits can be chosen as pmin

e = pmaxe = 0.

Remark II.7. For the MG simulation model in the case studyin Section VII, we use the nonlinear power flow equations(see, e.g., [55], [60]). Thus, the power provided or consumedby unit or load i ∈ N[1,J], where J = U + D is the totalnumber of units and loads, is

pe,i(k) = viJ∑j=1j 6=i

vigij − vj(gij cos(θij(k)) + bij sin(θij(k))

),

(13)

Here, vi ∈ R>0 is the voltage amplitude at node i andθij(k) = θi(k) − θj(k) is the difference between the phaseangles θi(k) ∈ R at node i and θj(k) ∈ R at node j ∈ N[1,J].Furthermore, gij ∈ R≥0 is the conductance and bij ∈ R thesusceptance of the line connecting nodes i and j.

Note that (12a) can be derived from (13) using Assump-tion II.4, i.e., assuming inductive lines with gij = 0, constantvoltage amplitudes vi and small angle differences θij(k) suchthat sin(θij(k)) ≈ θij(k) can be used for all i, j ∈ N[1,J]. Withthese assumptions and with bij = −vivjbij , (13) becomes

pe,i(k) =J∑j=1j 6=i

bijθij(k). (14)

This equation can now be used to derive matrix F in (12a)(see, e.g., [12]). Although more accurate convex power flowmodels exist (see, e.g., [61]), we assume that the error intro-duced by uncertain renewable infeed and load is much largerthan the one introduced by (12a) (see Assumption II.4).

F. Overall model

Having discussed the different components of the is-landed MG, we can now derive the a control-orientedmodel of the form (1) based on (2), (4)–(6), (8b)–(12).Using these constraints, the auxiliary vector is q(k) =[p(k)> δr(k)> ρ(k)]> and the input matrix is B = [0S×T −TsIS 0S×2R+1]. Moreover, H1 = diag([(1S)> (−1S)>]) andh1 = [(xmax)> (−xmin)>]>. Furthermore, H2 and h2 in (1c)are formed such that they reflect (2), (4)–(6), (9) and (12b).Additionally, G and g in (1d) are formed such that they reflect(8b), (12a) and (12c).

III. UNCERTAINTY MODEL

This section focuses on the representation of uncertain loadand renewable infeed. First the generation of a collectionof forecast scenarios is discussed. Then scenario-trees areillustrated and the model of an MG with uncertain load andRES generation is derived.

A. Representation of uncertainty by collections of scenarios

To obtain a representative probability distribution of loadand renewable infeed for the controller, a sampling basedMonte Carlo forecast was chosen. Here, random samples thatfollow the error distribution obtained from the training of themodel are drawn and applied to the forecast model to generatea collection of independent scenarios, i.e., a scenario fan,where every scenario has the same probability (see Figure 2).Thus, for a high number of independent forecast scenariosthe probability distribution of the forecast is approximated.To generate a collection of independent forecast scenarios ofload and RES, the seasonal ARIMA models from [20] wereused (see Figure 2). For more information on time-series basedforecasting, the reader is referred to [63].

To achieve a sufficiently accurate approximation of theforecast probability distribution, a high number of scenarios inthe collection of independent forecast scenarios is desired. Thisleads to an undesired high computational complexity in finding

7

Fig. 2. Wind and load forecast with seasonal ARIMA models from [20] overa horizon of 4 h. The collection of independent forecast scenarios, i.e., thescenario fan, was generated using Monte Carlo simulations with 500 seeds.The scenario tree was determined using fast forward selection as described in[62, Algorithm 5]. The maximum number of children per node was chosenas 8 for the node of stage 0, 2 for the nodes of stage 1 and 1 for all otherstages.

j = 0 j = 1 j = 2

0

x(0)

v(0)v(0−)

1

x(1)

v(1)

2

x(2)

v(2)

3

x(3)

4

x(4)

5

x(5)

w(1) , q

(1) , π(1)

w (2), q (2)

, π (2)

w(3) , q

(3) , π(3)

w (4), q (4)

, π (4)

w(5), q(5), π(5)

Fig. 3. A probability tree with N = 2 and µ = 6 nodes. The nodes ofthe stages are nodes(0) = 0, nodes(1) = 1, 2 and nodes(2) =3, 4, 5. Note that anc(1) = 0, anc(3) = 1 and anc(5) = 2. Alsochild(0) = 1, 2, child(1) = 3, 4 and child(2) = 5. The scenariosof the tree are the sequences (0, 1, 3), (0, 1, 4) and (0, 2, 5). Furthermore,stage(0) = 0, stage(1) = stage(2) = 1, stage(3) = stage(4) =stage(5) = 2 and the leaves of the tree are 3, 4, 5.

a suitable control action as a high number of scenarios oftenleads to a high number of decision variables. To satisfy bothneeds sufficiently, we generate scenario trees which serve asa more compact representation of the probability distribution.This is discussed in the following section.

B. From data to scenario trees

Scenario trees can be constructed from collections offorecast scenarios. They can be obtained in practice usingmethodologies such as [64] or scenario reduction (see, e.g.,[27], [28]). There exist several other scenario generation algo-rithms, e.g., clustering-based [65], [66] as well as simulationand optimisation-based approaches [67], [68]. An example ofsuch a collection of independent forecast scenarios and thecorresponding scenario tree for a forecast of load and windpower is shown in the right plots of Figure 2. This tree wasgenerated using fast forward selection as described by [62,Algorithm 5] which is a modification of [27, Algorithm 2.4].

j = 0 j = 1

v(0)

w(2)

w(1)

q(2) = fq(v(0), w(2))

q(1) = fq(v(0), w(1))

j = 0 j = 1

x(0)

x(1) = fx(x(0), q(1))

x(2) = fx(x(0), q(2))

Fig. 4. Relation of optimisation variables on a scenario tree during the timeperiod between j = 0 and j = 1 for power (left) and energy (right). Note thatthe power values are piecewise constant. The vector power setpoints v(0) isrepresented by the green line, the uncertain values w(1), w(2) by blue linesand the auxiliary variables q(1), q(2) by black lines. Further note that thefunctions fq and fx can be derived from (1).

C. Representation of uncertainty using scenario trees

A scenario tree is a representation of the uncertain evolutionof a discrete-time finite-valued random process as illustratedin Figure 3. A tree is a collection of µ ∈ N nodes partitionedinto stages j ∈ N[0,N ] and indexed with a unique identifieri ∈ N[0,µ−1]. Each node is associated with a possible value ofthe state of the process at a future time instant starting froman initial node i = 0 at stage j = 0 which is called the rootnode of the tree. The set of nodes at stage j is denoted bynodes(j) ⊆ N[0,µ−1]. Conversely, the stage in which a nodei resides is denoted by stage(i) ∈ N[0,N ]. The nodes at stagej = N are called leaf nodes of the tree. All non-leaf nodes iat a stage j possess a set of child nodes which are in stagej+1 and are connected to i; these are denoted by child(i) ⊆nodes(j+1). Likewise, every node i 6= 0 is reachable from asingle ancestor node, which resides in the previous stage andis denoted by anc(i) ∈ nodes(stage(i) − 1). A scenario isa sequence of nodes (s0, . . . , sN ) such that sN ∈ nodes(N)and anc(sa) = sa−1, a ∈ N[1,N ]. Scenarios are uniquelyidentified by leaf nodes. The probability of visiting node i ∈N[0,µ−1], i.e., the sum of probabilities of all scenarios runningthrough that node, is denoted by π(i) > 0. Thus, at each stagej a probability space with

∑i∈nodes(j) π

(i) = 1 is defined.For the tree shown in Figure 3, the relation of the different

variables at j = 0 and j = 1 is illustrated in Figure 4. Asshown here, we make a decision v(0) at stage j = 0 withoutknowing which disturbance w(1) or w(2) will occur during thetime between j = 0 and j = 1. Depending on the disturbancew, different values of the auxiliary vector q will occur. Thesecan be calculated using the function fq(·, ·) derived from (1).Thus, the choice of v(0) accounts for q(1) = fq(v

(0), w(1))and q(2) = fq(v

(0), w(2)) without knowing which one occurs.Similarly, following (1a) the state x at time instant j = 1 isa function fx(·, ·) of the state at time instant j = 0 and theauxiliary vector that is present between j = 0 and j = 1.Consequently, different values q(1) and q(2) lead to differentstates x(1) = fx(x(0), q(1)) = fx(x(0), fq(v

(0), w(1))) andx(2) = fx(x(0), q(2)) = fx(x(0), fq(v

(0), w(2))).In summary, given an initial measured system state x(0) at

stage j = 0 and a forecast of w in the form of w(1) or w(2) wemake a decision v(0) using this information. Similarly, at everystage j ∈ N[0,N−1], we make decisions v(i), i ∈ nodes(j),using the information that is available up to that stage andusing the forecast values w(i+) for i+ ∈ child(i). In other

8

words, v is decided using causal control laws. This is indicatedin Figure 3 by the positioning of v(i) at the nodes of thetree instead of at its edges. Thus, across the nodes of thescenario trees, the control-oriented model (1) for all nodesi+ ∈ N[1,µ−1] with i = anc(i+) become

x(i) +Bq(i+) − x(i+) = 0, (15a)

H1 · x(i+) ≤ h1, (15b)

H2 ·[v(i)> q(i+)> w(i+)>

]> ≤ h2, (15c)

G ·[v(i)> q(i+)> w(i+)>

]>= g. (15d)

IV. OPERATING COSTS

In this section we derive an operating cost function for anMG which reflects the main objectives: (i) economic operation,(ii) low number of switching actions, (iii) high use of RESand (iv) desired state of storage units. We use cost functionsthat are motivated by [20]. Our presentation will hinge onthe scenario tree structure introduced in Section III-C, i.e.,objectives will be defined at the nodes of a scenario tree.

The objective at node i+ ∈ N[1,µ−1] with i = anc(i+)and i− = anc(i) is composed of a part reflecting items (i)–(iii), `o(v(i), v(i−), q(i+)) ∈ R≥0 and a part that reflects (iv),`s(x

(i+)) ∈ R≥0. Furthermore, a discount factor γ ∈ (0, 1) isadded to emphasise decisions in the near future. Thus, the costassociated with node i+ ∈ N[1,µ−1] is

`(x(i+), v(i), v(i−), q(i+)) =

γstage(i+)(`o(v(i), v(i−), q(i+)) + `s(x

(i+))). (16)

Remark IV.1. Note that the cost associated with node i+,`o(v(i), v(i−), q(i+)), also depends on nodes i = anc(i+) andi− = anc(i). The reason for this is that q(i+) is a function ofthe input v(i) (see Section III-C). Therefore, it is required useq(i+) and v(i) with i = anc(i+) in the same cost function. Asthe cost that is caused by v(i) partly depends on the input atthe past time instant v(i−), e.g., in case of switching penalties,it is further required to include v(i−) in the cost.

The economically motivated cost consists of (i) oper-ating costs of conventional units, `rtt (v(i), q(i+)) ∈ R≥0,(ii) costs for switching conventional units on or off,`swt (v(i), v(i−)) ∈ R≥0, and (iii) costs incurred by low util-isation of RES, `r(q(i+)) ∈ R≥0, i.e.,

`o(v(i), v(i−), q(i+)) = `rtt (v(i), q(i+))+

`swt (v(i), v(i−)) + `r(q(i+)). (17)

More precisely, following [69], the operating cost of theconventional generator is modelled as

`rtt (v(i), q(i+)) = c>t δ

(i)t + c′t

>p

(i+)t + ‖ diag (c′′t ) p

(i+)t ‖22,

(18a)with weights ct ∈ RT>0, c′t ∈ RT>0 and c′′t ∈ RT>0 and usingthe square of the Euclidean norm ‖ · ‖22.

Costs for switching the conventional units on or off fromnode i− = anc(i) to node i are modelled by

`swt (v(i), v(i−)) = ‖diag (cswt ) (δ(i−)t − δ(i)

t )‖22 (18b)

with weight cswt ∈ RT>0. For the root node, δ(0−)t denotes the

initial switch state of the conventional units, δt,k−1.It is desired to maximise renewable infeed. This can be

included in the stage cost as a penalty if the renewable infeedis less than the nominal value pmax

r , i.e.,

`r(q(i+)) = ‖ diag (cr) (pmax

r − p(i+)r )‖22, (18c)

with cr ∈ RR>0.Very high or very low states of charge, x(k), can increase

the ageing of batteries (see, e.g., [70]). To reduce the occur-rence of such values of x(k), we introduce the interval ofdesired states of charge [xmin, xmax] ⊆ [xmin, xmax] ⊂ RS≥0.To enforce that x(k) ∈ [xmin, xmax] we use the cost

`s(x(i)) = c>s (max(xmin − x(i), 0S)−min(xmax − x(i), 0S))

(19)with weight cs ∈ RS>0.

For every node i+ ∈ N[1,µ−1] with i+ ∈ child(i) as wellas i− = anc(i) we define the cost variable

Z(i+) = `(x(i+), v(i), v(i−), q(i+)). (20a)

Thus, for stage j ∈ N[1,N ], the vector

Zj = [Z(i+)]i+∈nodes(j) (20b)

is associated with a random variable over the probability spacenodes(j). Note that Zj ∈ R|nodes(j)| is a function of thestates x(i+), input vectors v(i), v(i−) and vector q(i+) for alli+ ∈ nodes(j), j ∈ N[1,N ]. The multi-stage cost is thendescribed by the sequence of vectors associated with randomvariables (Z1, . . . , ZN ).

V. MEASURING RISK

In this section we introduce the notion of risk measures andprovide a few examples thereof. Furthermore, we will discussone specific risk measure: the average value-at-risk (AVaR).

A. Introduction to risk measures

Let Ω = ω1, . . . , ωK be a sample space, whose elementsωi have probabilities πi > 0 for i ∈ N[1,K]. The probabilitiescan be collected in a vector π = [π1 · · · πK ]>. This vectoris element of the probability simplex, i.e., the set D = π ∈RK | πi ≥ 0,

∑Ki=1 πi = 1. A random variable on Ω is a

function Z : Ω→ R with Z(ωi) = Zi. All values of Z can becollected in a vector Z = [Z1 · · · ZK ]> ∈ RK . Note that inour case, the random variables are given by (20) and representthe operation cost at the nodes of the scenario tree.

A risk measure on the sample space Ω is a mappingρ : RK → R that, roughly speaking, quantifies the significanceof unlikely extreme events. A well-known, yet trivial, riskmeasure is the expectation operator Eπ(Z) =

∑Ki=1 πiZi,

which is often referred to as a risk-neutral measure as it carriesno deviation information. Another example is the maximumoperator max(Z) = maxZi | i=1, . . .,K which quantifiesthe worst-case value, or realisation, of Z. It can be written as

max(Z) = maxπ′∈D

Eπ′(Z), (21)

9

11

1

ππ′1

π′2

π′3

(a) α = 0

11

1

ππ′1

π′2

π′3

(b) α = 0.5

11

1

ππ′1

π′2

π′3

(c) α = 1.0

Fig. 5. Ambiguity sets Aα over a probability space with K = 3 and π1 =0.3, π2 = 0.3, π3 = 0.4. The ambiguity set A0 is the whole probabilitysimplex, and A1 the point π. Naturally, Aα1 ⊆ Aα2 for α1 ≥ α2.

where the maximum is taken with respect to all probabilityvectors π′ ∈ D. Therefore, it can be interpreted as the worst-case expectation over all possible probability distributions.Following the notation in (21), the expectation operator is

Eπ(Z) = maxπ′∈π

Eπ′(Z), (22)

In this work we focus on coherent1 risk measures (see, e.g.,[31, Def. 6.4.]) as they provide a natural and intuitive wayto quantify risk. In addition, they allow for a computationallytractable reformulation of risk-averse MPC problems whichrenders them suitable for real-time applications.

It is shown in [31, Thm. 6.5] that all coherent risk measurescan be written in a form reminiscent of (21) and (22) as

ρ(Z) = maxπ′∈A

Eπ′(Z), (23)

where A ⊆ D is a closed convex set which contains π. Everymapping of the form (23) where the so called ambiguity set Aof ρ is a closed convex set which contains π is coherent. Oneinterpretation of (23) is that we take the worst-case expectationof Z while we have uncertainty on the probability vector π′.More precisely, we do not know π′ exactly, we just knowthat it is in A (see, e.g., [71]). The expectation and maximumoperators are two extreme cases of coherent risk measures.The ambiguity set of max(Z) is the largest possible set, i.e.,A = D. The ambiguity set of E(Z) is the smallest possibleset, i.e., A = π. Other risk measures can be constructedby taking ambiguity sets of intermediate size to cope withuncertain knowledge of a probability distribution.

Risk measures, whose ambiguity set is a polytope, arecalled polytopic risk measures. Given the extreme points ofthe ambiguity set, i.e., the vertices π1, . . . , πL of its convexhull, with πl ∈ A, for l ∈ N[1,L], polytopic risk measuresassume the convenient representation

ρ(Z) = maxl∈N[1,L]

Eπl(Z). (24)

B. Average value-at-riskA commonly used risk measure is the average value-at-risk,

which is given in the form of (23) as

ρ(Z) = AV@Rα(Z) = maxπ′∈Aα

Eπ′(Z) (25a)

1Let Z, Z′ be two random variables on Ω and Z, Z′ the correspondingvectors. Then, ρ : RK → R is a coherent risk measure (see [31, Def. 6.4.])if it is (i) convex, i.e., ρ(λZ + (1 − λ)Z′) ≤ λρ(Z) + (1 − λ)ρ(Z′)for all λ ∈ [0, 1], (ii) monotone, i.e., ρ(Z) ≤ ρ(Z′) whenever Z ≤ Z′,(iii) translation equi-variant, i.e., ρ(c1K +Z) = c+ ρ(Z) for all c ∈ R, and(iv) positive homogeneous, i.e., ρ(αZ) = αρ(Z) for all α ∈ R≥0.

with the ambiguity set

Aα =

π′ ∈ D | π′ ≤ 1

απ, if α ∈ (0, 1],

D, if α = 0.(25b)

for α ∈ R[0,1]. Clearly, AVaR is a polytopic risk measure sinceAα is a polytope. As shown in Figure 5, Aα can be modifiedby varying α. This includes the extreme cases α = 1, whereA1 = π and α = 0, where A0 = D. Using convex dualityarguments and the additional free variable t ∈ R, (25) can betransformed into [31, Ex. 6.19]

AV@Rα(Z)=

min

(t+

Eπ(

max(Z−t1Kα , 0K

))), for α ∈ (0, 1]

max(Z), for α = 0.(26)

We will now give an equivalent representation of the averagevalue-at-risk which will be particularly useful in Section VI-Cas it will facilitate the solution of risk-averse optimal controlproblems.

Proposition V.1. The average value-at-risk at level α ∈ [0, 1]is given by

AV@Rα(Z) = minξ≥0Kαξ≥Z−t1K

(t+ Eπ(ξ)). (27)

Proof. Let α ∈ (0, 1]. Using the epigraphical relaxation (see[72, Sec. 3.1.7 & 4.1]) of max( · , 0), we have that

max(y, 0K) = minξ≥0Kξ≥y

ξ, (28)

for all y ∈ RK , where ξ ∈ RK is a slack variable. Therefore,

AV@Rα(Z) = min(t+ Eπ

(max

(Z−t1Kα , 0K

)))= min

(t+ Eπ

(minξ≥0K

ξ≥Z−t1Kα

ξ))

= min(t+ Eπ

(minξ≥0Kαξ≥Z−t1K

ξ)),

where the second equation is by virtue of (28). Using [31,Prop. 6.60], we interchange the expectation operator, Eπ andthe minimum to arrive at (27).

The right hand side of (27) is well defined for α = 0, i.e.,

AV@R0(Z) = minξ≥0K

t1K≥Z

(t+ Eπ(ξ))

= mint1K≥Z

t+ minξ≥0K

Eπ(ξ) = mint1K≥Z

t = max(Z).

Therefore, (27) holds for all α ∈ [0, 1]. This completes theproof.

Having discussed risk measures, we will now use them toconstruct multistage risk-averse MPC problems.

VI. RISK-AVERSE MPC

In this section we will first introduce conditional riskmappings on scenario trees. Then we will construct multistagerisk-averse optimal control problems and reformulate them asmixed-integer quadratically-constrained quadratic problems.

10

j = 0 j = 1 j = 2

0

1

2

3

4

5

6

7

ρ(1) : R3 → RZ[1] = [Z(3) Z(4) Z(5)]>

ρ(2) : R2 → RZ[2] = [Z(6) Z(7)]>

ρ1(Z2) = [ρ(1)(Z[1]) ρ(2)(Z[2])]>

Z(3)Z

(4)Z

(5)

π(i+

)

π(1)

Z(6)Z

(7)

π(i+

)

π(2)

Fig. 6. Example of conditional risk mapping conditioned at stage j = 1.Following (29), the conditional risk mapping ρ1 : R5 → R2 is appliedto a vector in R5 that is associated with the random variable on the spacenodes(2) and returns vector in R2 that is associated with the random variableon the space nodes(1). Here, ρ[1] and ρ[2] can be any coherent risk measureson the spaces child(1) = 3, 4, 5 and child(2) = 6, 7, respectively.Note also that Z2 = [Z(3) · · · Z(7)]>, is decomposed into Z[1] and Z[2].

A. Conditional risk mappings on scenario trees

A conditional risk mapping on a scenario tree is a general-isation of the notion of conditional expectation. For scenariotrees, the latter this is the expectation of a random cost Zj+1

at stage j+1 given all information we can surmise up to stagej. Roughly speaking, a conditional risk mapping at a non-leafnode i of the tree returns the risk of the cost of the childrenof i. Conditional risk mappings can be constructed as follows.

For every stage j ∈ N[0,N−1], the set nodes(j) is a prob-ability space whose elements i ∈ nodes(j) have probabilityπ(i). Naturally, we can define real-valued random variableswith corresponding vectors Zj ∈ R|nodes(j)| on that space.Likewise, the set nodes(j + 1) is also a probability space. Aconditional risk mapping at stage j is a mapping

ρj : R|nodes(j+1)| → R|nodes(j)|, (29)

which is constructed as we explain hereafter.For all i ∈ nodes(j), the sets child(i) ⊆ nodes(j + 1)

are disjoint and define a partition over nodes(j + 1), i.e.,

nodes(j + 1) =⋃i∈nodes(j) child(i).

Given that node i is visited, node i+ ∈ child(i) occurs withprobability π(i+)

/π(i). This makes child(i) into a probabilityspace whereon we can construct random variables with vectors

Z [i] =[Z(i+)

]i+∈child(i)

.

In particular, Zj+1 on the probability space nodes(j + 1) isdecomposed into vectors Z [i] on child(i), i ∈ nodes(j).

Using a coherent risk measure ρ(i) : R| child(i)| → R, wecan compute a risk ρ(i)(Z [i]) for every vector Z [i]. Thus, wedefine the conditional risk mapping ρj at stage j as

ρj(Zj+1) =[ρ(i)(Z [i])

]i∈nodes(j). (30)

In words, ρj maps the probability distribution at stage j + 1into a vector whose ith element denotes the risk that will incurif one is at node i ∈ nodes (j). For a simple scenario tree,this is illustrated in Figure 6.

Remark VI.1. For the case where ρ(i)(Z [i]) is AV@Rα(Z [i]),according to Proposition V.1, the risk of Z [i] is

ρ(i)(Z [i]) = minξ[i]≥0| child(i)|αξ[i]≥Z[i]−t(i)1| child(i)|

(t(i) + Eπ[i](ξ[i])

)(31)

with t(i) ∈ R and ξ[i] = [ξ(i+)]i+∈child(i), ξ(i+) ∈ R fori ∈ N[0,µ−1] \ nodes(N). As we consider the probabilityspace child(i), we are interested in the probability of visitingi+ ∈ child(i) given that we are at node i. Therefore,the probabilities are π[i] = [π

(i+)/π(i)]i+∈child(i) and (31) is

equivalent to

ρ(i)(Z [i]) = minξ[i]≥0| child(i)|αξ[i]≥Z[i]−t(i)1| child(i)|

(t(i) +

∑i+∈child(i)

π(i+)

π(i) ξ(i+)). (32)

Having discussed conditional risk mappings on scenariotrees, we can now use them to extract a multistage risk measureout of the vector Z = [Z

>1 · · · Z

>N ]> that is associated with

the multistage random variable.

B. Risk-averse optimal control

Let Zj ∈ R|nodes(j)| be the random cost from (20). For thesequence (Z1, . . . , ZN ) and given a sequence of conditionalrisk mappings ρj as described in (30), the nested multistagerisk measure %N : R|nodes(1)| × · · · × R|nodes(N)| → R isdefined as (see, e.g., [29]–[31])

%N (Z1, . . . , ZN ) =

ρ0 (Z1 + ρ1 (Z2 + . . .+ ρN−1(ZN )) . . .) . (33)

Complex as they might appear, nested multistage risk measurespossess favourable properties which render them suitable foroptimal control formulations. The most important propertiesare (i) they measure how risk propagates over time and aresuitable for multistage formulations, (ii) they are coherent riskmeasures over the space R|nodes(1)|× · · · ×R|nodes(N)| [31,Sec. 6.8], (iii) they give rise to optimal control problems whichare amenable to dynamic programming formulations [73],(iv) they allow for MPC formulations with closed-loop sta-bility guarantees [29], [30].

The definition of %N in (33) gives rise to the following opti-misation problem with decision variables v = [v(i)]i∈N[0,µ−1]

,x = [x(i)]i∈N[0,µ−1]

, q = [q(i)]i∈N[0,µ−1].

Problem 1 (Risk-averse multistage optimal control problemwith nested conditional risk mappings). Solve the optimalcontrol problem

Minimisev,x,q

%N (Z1, . . . , ZN )

subj. to

constraints (15) and given initial conditions x(0), δ(0−)t

∀i+ ∈ N[1,µ−1] and i = anc(i+).

Note that the cost function is the composition of a se-ries of, typically, nonsmooth mappings. Such problems havebeen studied in the operations research literature and aretypically solved by means of cutting plane methods which

11

allow the solution of problems with only short predictionhorizons and linear stage cost functions (see, e.g., [35]–[37]). An alternative solution approach is to solve the dy-namic programming problem using multiparametric piecewisequadratic programming [38]. However, this is only applicableto systems with few states and small prediction horizons [39].Therefore, we employ the method introduced in [29] whichdecomposes the nested conditional risk mappings and allowsto reformulate Problem 1 as a mixed-integer quadratically-constrained quadratic problem.

C. Risk-averse reformulation as a mixed-integer quadraticallyconstrained quadratic problem

In this section we employ (32) to decompose the nestedformulation stated above for the case of the AVaR. By doingso, we will cast the overall optimisation problem as a mixed-integer quadratically-constrained quadratic problem.

Theorem VI.2 (Problem reformulation). Define the variablest(i) for all non-leaf nodes i and variables ξ(i) for all nodesi ∈ N[1,µ−1]. Define

Ψ(i) = t(i) +∑i+∈child(i)

π(i+)

π(i) ξ(i+),

for all non-leaf nodes i, which is the cost in the minimisationproblem in (32). Let the underlying risk measure be theaverage value-at-risk at level α ∈ [0, 1]. Then, with theadditional decision variables t = [t(i)]i∈(N[0,µ−1]\nodes(N))

and ξ = [ξ(i)]i∈N[0,µ−1], Problem 1 is equivalent to the

following problem, in the sense that both problems yield equaloptimal values.

Problem 2. Solve the optimisation problem

Minimisev,x,q,t,ξ

Ψ(0)

subj. to

ξ[i] ≥ 0,

αξ[i] ≥ Z [i] − t(i)1| child(i)|, if stage(i) = N − 1

αξ[i] ≥ Z [i] + Ψ[i] − t(i)1| child(i)|, if stage(i) < N − 1

constraints (15) and given initial conditions x(0), δ(0−)t

∀i+ ∈ N[1,µ−1] and i = anc(i+).

Proof. Let us introduce a vector Φ ∈ Rµ−|nodes(N)|, whichis defined over the non-leaf nodes of the scenario tree. Inparticular, we associate a value Φ(i) ∈ R to every non-leafnode i ∈ N[0,µ−1]\nodes(N). Similar to (20), we segment Φstage-wise into Φj = [Φ(i)]i∈nodes(j). We first define ΦN−1 ∈R|nodes(N−1)| over the set nodes(N − 1) as

ΦN−1 = ρN−1(ZN ). (34a)

ΦN−1 is the conditional value-at-risk at stage N − 1 and itcorresponds to the innermost term in the nested multistagecost function (33) in Problem 1. Furthermore, we define Φj ∈R|nodes(j)| over the set nodes(j), j ∈ N[0,N−2] as

Φj = ρj(Zj+1 + Φj+1). (34b)

The recursive definition (34) allows us to express the nestedmultistage risk measure (33) as

%N (Z1, . . . , ZN ) = ρ0(Z1 + ρ1(Z2 + . . .

+ ρN−2(ZN−1 + ΦN−1)) . . .)

...= ρ0(Z1 + Φ1) = Φ0. (35)

Note that ΦN−1 in (34a) is composed of elements Φ(i),i ∈ nodes(N − 1) and because of (32),

Φ(i) = ρ(i)(Z [i]) = minξ[i]≥0

αξ[i]≥Z[i]−t(i)1| child(i)|

Ψ(i), (36)

where the minimisation is carried out over the decision vari-ables t(i) and ξ[i] = [ξ(i+)]i+∈child(i).

The vector Φj in (34b) comprises the elements Φ(i),stage(i) = j. For AVaR, as described in (32) they are

Φ(i) = ρ(i)(Z [i] + Φ[i]) = minξ[i]≥0

αξ[i]≥Z[i]+Φ[i]−t(i)1| child(i)|

Ψ(i) (37)

In light of (35), the above recursive procedure leads to theformulation of the following optimisation problem.

Problem 3. Solve the optimisation problem

Minimisev,x,q,t,ξ

Φ(0)

subj. to

ξ[i] ≥ 0,

αξ[i] ≥ Z [i] − t(i)1| child(i)|, if stage(i) = N − 1

αξ[i] ≥ Z [i] + Φ[i] − t(i)1| child(i)|, if stage(i) < N − 1

constraints (15) and given initial conditions x(0), δ(0−)t

∀i+ ∈ N[1,µ−1] and i = anc(i+).

In Problem 3, we substitute Φ(0) with Ψ(0) in the costfunction. Furthermore, because of Lemma A.1 we can replacethe constraint αξ[i] ≥ Z [i] + Φ[i] − t(i)1| child(i)| by theconstraint αξ[i] ≥ Z [i] + Ψ[i] − t(i)1| child(i)|. This leads toProblem 2 completing the proof.

Given that the operating cost described in Section IVinvolves quadratic functions and given the presence of bi-nary variables, Problem 2 is a mixed-integer quadratically-constrained quadratic problem. As we will demonstrate inSection VII, this can be solved efficiently by standard softwaresuch as CPLEX or Gurobi.

D. Risk-averse MPCThe risk-averse optimal control problem (Problem 2) is

solved given the current measured state of the system anda scenario tree that describes the distribution of future infeedand demand over N stages. By solving Problem 2 at everytime instant k we obtain a set of control actions v(i) fori ∈ N[0,µ−1] \ nodes(N) (see Figure 3). Then, the controlaction associated with the root node of the tree, v(0), is appliedto the system. This procedure is repeated at every time instantk ∈ N0 in a receding horizon fashion (see, e.g., [57]) leadingto a risk-averse model predictive control (MPC) scheme.

12

RES

pr

Storage

ps

3

pe,4

pe,3

4

pe,2

2

Conventionalgenerator

pt

1pe,1

wdLoad

utus

ur

wr

xs

Fig. 7. MG considered in the simulation case study with a storage, arenewable, a conventional unit and a load. Each unit is connected to a bus,which is connected to other buses by transmission lines.

VII. CASE STUDY

In this case study, we illustrate the properties of the risk-averse MPC strategy introduced in Section VI-D. For thesimulations, the MG shown in Figure 7 was used. It comprisesa storage unit, a conventional unit, an RES and a load withparameters as in Table II. The units and the load are connectedby transmission lines that all have susceptance bij = −20 puand conductance gij = 2 pu. Thus, (12a) is

pe,1(k)pe,2(k)pe,3(k)pe,4(k)

=

1 0 0 00 −1/3 1/3 00 2/3 1/3 00 1/3 2/3 0

︸ ︷︷ ︸

F

pt(k)ps(k)pr(k)wd(k)

.

Each line can transmit power between −1.3 pu and 1.3 pu.Note that all values are given in per-unit (pu), see, e.g., [60].

All simulations were performed in Matlab 2015a. In thefollowing, we will discuss the different parts of our simulationsetup shown in Figure 1. More precisely, we discuss forecast,scenario reduction, MPC and the MG plant model we use tosimulate the system.

To forecast wind speed and load, the Matlab Econometricstoolbox was used to implement the seasonal ARIMA modelsfrom [20]. To calculate the available power of the RES, i.e., thewind turbine, the cubic approximation from [20] was appliedon the forecast values of wind speed.

The scenario tree was generated from a collection of 500independent scenarios of load and available renewable powerusing [62, Algorithm 5]. The maximum number of children pernode was chosen to be 6 for the node of stage 0, 2 for the nodesof stage 1 and 1 for all other stages. The tree was modified toinclude low-probability scenarios which correspond to extreme(load and available wind power) outcomes. The two additionalscenarios correspond to the cases of very low renewable powerand very high load and vice versa. Hence, the scenario treecontains 6 · 2 + 2 = 14 scenarios. Because of the very lowprobability of the scenarios, they have minor influence in thestochastic case for α = 1 and only have an effect for smallervalues of α that are close to zero, i.e., when we approach theworst-case. This will be illustrated later.

For the MPC, a prediction horizon of N = 8, a samplingtime of Ts = 1/2 h and a discount factor of γ = 0.95were chosen. The different controllers were implemented usingYALMIP R20180612 [74] and Gurobi 7.5.2 as a numericalsolver. To speed up the computations, the results from theprevious iteration were used as initial values to warm-start

TABLE IIUNIT PARAMETERS AND WEIGHTS OF COST FUNCTION.

Parameter Value Weight Value

[pmint , pmin

r , pmins ] [0.4, 0,−1] pu ct 0.1178

[pmaxt , pmax

r , pmaxs ] [1, 2, 1] pu c′t 0.751 1/pu

[xmin, xmax] [0, 7] pu h c′′t 0.0693 1/pu

[xmin, xmax] [0.5, 6.5] pu h cr 1 1/pu

x0 3 pu h cs 3 · 103 1/pu h

[Kt,Ks] [1, 1] cswt 0.1

the optimisation. Furthermore, the binary switch state of theconventional unit was relaxed for all stages greater or equalthan 4, i.e., δ(i)

t ∈ [0, 1] for stage(i) ≥ 4 in the risk-averseMPC. The simulations in Section VII-A were performed ona computer with an Intel R© Xeon R© E5-1620 v2 [email protected] GHz and 32 GB RAM. Here, the maximum solver timeof Gurobi (excluding the time required by YALMIP to parsethe problem) was below 7 s (see Table III). Considering a sam-pling time of Ts = 1/2 h (see, e.g., [75]), this is adequately fast.

The plant model was also implemented in Matlab. To obtainmore realistic simulation results, the efficiency of the storageunit described in Remark II.5 was considered. For the plantmodel, a charging and discharging efficiency of ηc = ηd =0.92 and a self discharge of xsd = 2 · 10−3 pu h wereassumed. Furthermore, the AC power flow equations describedin Remark II.7 were included into the plant model and solvedusing the numerical solver fmincon. In the AC power flow, theline parameters posed earlier were considered. Furthermore, allvoltages were assumed as vi = 1 pu, i ∈ N[1,4]. Note that thechanged model based on Remarks II.5 and II.7 was only usedfor the MG plant model and not in the MPC problems.

To compare the outcome of the different simulations weintroduce the average economically motivated cost

¯o = 1

K

∑Kk=1 `o(vs(k − 1), v(k), z(k)). (38a)

over simulation horizon K with `o from (17). Using (19), wealso introduce the average cost related to the stored energy,

¯s = 1

K

∑Kk=1 `s(x(k)). (38b)

Having described the simulation setup and the average costs,we can now discuss the simulation results. Here, we firstprovide a comparison of different controllers for a nominalsimulation run. Then, we illustrate the properties of the risk-averse MPC in more detail in a sensitivity analysis.

A. Nominal simulations

In the following, the risk-averse MPC approaches withdifferent values of α and a certainty-equivalent MPC approachwhere the mean value of the forecast is considered as the truevalue [10] are compared. As shown in Table III, the certainty-equivalent approach leads to power constraint violations in theclosed-loop simulations. These occur due to the discrepancybetween the data-based forecast and the actual values ofavailable renewable infeed and load, as well as the mismatchbetween the model considered in the MPC and in the plantsimulation. These violations render the certainty-equivalent

13

0 1 2 3 4 5 6 7

−2

−1

0

1

2Po

wer

inpu

(a) certainty-equivalent

Storage RES Conventional generator Load Stored energy

0 1 2 3 4 5 6 7

0.5

3.5

6.5

Ene

rgy

inpuh 0 1 2 3 4 5 6 7

−2

−1

0

1

2 (b) Risk-averse, α = 0.0

0 1 2 3 4 5 6 7

0.5

3.5

6.5

0 1 2 3 4 5 6 7

−2

−1

0

1

2

Pow

erin

pu

(c) Risk-averse, α = 0.5

0 1 2 3 4 5 6 7

0.5

3.5

6.5

Time in d

Ene

rgy

inpuh 0 1 2 3 4 5 6 7

−2

−1

0

1

2 (d) Risk-averse, α = 1.0

0 1 2 3 4 5 6 7

0.5

3.5

6.5

Time in d

Fig. 8. Power and energy of the MG using different controllers over one week of simulation with a sampling time of 1/2 h.

TABLE IIIRUNNING COSTS, CONVENTIONAL AND RENEWABLE INFEED OF

CLOSED-LOOP SIMULATION WITH SIMULATION HORIZON K = 336.

certainty-equival.

Risk-averse, α =

0.0a 0.5 1.0b

Avg. power costs ¯o 2.79 3.2 2.82 2.75

Avg. energy cost ¯s 5.82 0 0.17 1.34

Avg. conventional infeed in pu 0.18 0.28 0.18 0.17Avg. infeed of RES in pu 0.43 0.33 0.42 0.44

Constraint violations power 6 0 0 0Switching actions 13 11 11 15

Avg. solver time in s 0.01 0.26 0.34 0.75Maximum solver time in s 0.06 5.01 2.44 6.29

a For α = 0.0, the worst-case optimal control problem is solved.b For α = 1.0, the stochastic risk-neutral (expectation-based) optimal

control problem is solved.

approach unsuitable for a safe operation control. Therefore,the certainty-equivalent approach is not further discussed.

For the risk-averse approaches, it can be seen in Figure 8that with increasing α, energy is stored faster. Furthermore,the mean infeed from RES increases and the infeed of theconventional unit decreases (see Table III). These two effectscontribute significantly to a decrease of the cost ¯

o. Thus, withα = 1, the costs ¯

o is reduced by 14 % compared to α = 0.As the approach becomes more risk-averse (for small values

of α), the average cost associated with the desired operatingrange [xmin, xmax] of the stored energy, ¯

s, decreases. Twoeffects drive this decrease: (i) the handling of high-effectlow-probability (HELP) scenarios in the MPC and (ii) the

mismatch between the MG model used in the plant simulationand the one used in the MPC. However, simulations where thesame model was used in the plant simulation and the MPCformulation indicate that effect (i) plays the dominant role.

HELP scenarios represent extreme combinations of forecastvalues which are very unlikely to happen. A misestimationof their probability can have a strong impact on the closed-loop performance. Stochastic MPC where the expectation isminimised (α = 1) is agnostic to probability misestimation andcan therefore not act proactively against misestimated HELPevents. In closed-loop simulations, this is reflected by higherenergy related costs, ¯

s, as probability distributions that do notfollow the scenario tree are not considered. With decreasingα, ambiguity in the forecast probability distribution is takenmore into account. Hence, smaller values of α lead to MPCformulations that account for the fact that the probability ofunlikely events could be higher. This leads to an increasingimportance of unlikely scenarios where the energy is outsidethe interval [xmin, xmax]. This results in more conservativecontrol actions where more energy values are in the interval[xmin, xmax] leading to much lower values of ¯

s.A comparison of the overall average cost, ¯= ¯

o+¯s, shows

that the lowest value ¯ = 2.99 is achieved for α = 0.5. Thisis about 6 % lower as the overall cost for α = 0, ¯= 3.2, andabout 26 % lower than the overall cost for α = 1, ¯= 4.09.

The nominal simulations show that the risk-averse MPC incombination with an appropriate construction of the scenariotree allows to obtain suitable operation strategies for islandedMGs. In practice, this translates into a desirable trade-offbetween performance and robustness to uncertain probabilitydistributions.

14

Fig. 9. 1000 scenarios of wind and load data used in sensitivity analysis withconstant offset of 1.5 times the standard deviation.

2.85 2.9 2.95 3 3.05 3.1 3.15 3.2

α = 1.0

α = 0.5

α = 0.0

¯o

0 1 2 3 4 5 6 7

α = 1.0

α = 0.5

α = 0.0

¯s

Fig. 10. Results of sensitivity analysis with systematic error, i.e., constantoffset in the mean value of the additional disturbance.

B. Sensitivity analysis

To illustrate the performance of the risk-averse approachin presence of inaccurate forecasts, a sensitivity analysis wascarried out. In the analysis, 1000 closed-loop simulations wereperformed over tree days, i.e., K = 144 simulation steps, ofthe scenario shown in Figure 8. To illustrate the robustnessof the risk-averse approach with respect to uncertainty inthe probability distribution, we added noise with differentproperties to the measured load and wind speed time-series.This way HELP events that only happen occasionally areartificially added to illustrate the positive effects of the risk-averse MPC approach. In the following analysis, we considertwo different probability distributions of the disturbances:(i) constant offset in the mean value, and (ii) occasional offsetthat randomly occurs in 10 % of the simulation steps.

1) Disturbance with constant offset: In this case study, aGaussian noise term with nonzero mean and standard deviationequal to that of the ARIMA forecast training residuals is addedto the wind speed and load time series. In particular, Gaussiannoise with mean 0.048 pu and standard deviation 0.032 pu wasadded to the load and a Gaussian noise with mean −0.795 m/sand standard deviation 0.53 m/s was added to the wind speedbefore the uncurtailed wind power, wr, was obtained. Thedifferent scenarios of wind and load are shown in Figure 9.

The resulting distribution of ¯o for the different disturbance

scenarios is illustrated in Figure 10. It can be observed thatthe mean of the power related costs first decrease from α = 1to α = 0.5 by 0.1 %. Furthermore, the standard deviation of¯o significantly decreases from 0.019 for α = 1 to 0.012

for α = 0.5. Then, for α = 0 the mean of ¯o increases

by 9.3 % due to the increased conservativeness of the robustMPC approach. This shows that choosing α < 1 can protect

Fig. 11. 1000 scenarios of wind and load data used in sensitivity analysiswith occasional extreme events in 10 % of the cases.

2.75 2.8 2.85 2.9 2.95 3 3.05 3.1 3.15 3.2

α = 1.0

α = 0.5

α = 0.0

¯o

0 1 2 3 4 5 6 7 8 9

α = 1.0

α = 0.5

α = 0.0

¯s

Fig. 12. Results of sensitivity analysis with occasional extreme events in10 % of the cases.

the system from high-effect low-probability events and helpreduce the closed-loop costs. This is also reflected in thelower standard deviation of cost for smaller values of α(see Figure 10). Furthermore, the energy related costs ¯

s

decrease for smaller values of α. By choosing α appropriately,the costs and the conservativeness of the control scheme canbe tuned. This adds an important degree of freedom to thetraditional design procedures of worst-case (α = 0) andstochastic (α = 1) approaches.

2) Disturbance with occasional extreme events: In thissensitivity analysis, to model occasional extreme events themean value of the additional disturbance that was added tothe load and wind speed was only chosen different from zeroin 10 % of the data points. For the rest of the simulations, themean of the additional disturbance added to the original datawas considered to be zero. The random nonzero offset in 10 %of the cases was 0.096 pu for the load and 1.589 m/s for windwind speed. A standard deviation of 0.032 pu for load and0.53 m/s for wind speed were considered for all cases basedon the training residuals of the ARIMA forecast model. Thislead to the scenarios illustrated in Figure 11.

As shown in Figure 12, the energy related costs ¯s decrease

for low values of α, yet, lower operation costs ¯o, are not

observed as α decreases. However, the standard deviation of¯o decreases from 0.024 for α = 1 to 0.007 for α = 0,

indicating that the average cost for operating the grid becomesless sensitive to the uncertain value with decreasing α. In thecase of high-effect low-probability events, the conservativenessof the controller can also be parametrised by adapting α.Therefore, for a given MG setup, the designer of the MPChas an additional tuning knob to strike a suitable trade-offbetween economically motivated ¯

o and the state related ¯s.

15

VIII. CONCLUSIONS

In this work we presented a risk-averse MPC strategy forislanded MG with very high share of RES which allowsto trade economic performance for safety by interpolatingbetween worst-case and risk-neutral stochastic formulations.The approach is resilient with respect to misestimations ofthe underlying probability distributions of demand and infeedof RES as shown in Section VII. Therefore, it is suitable forpractical implementations, where these distributions are notknown exactly or change over time. It also allows for theuse of simple and therefore computationally less expensivescenario trees at the expense of operating with a slightlymore conservative regime. Furthermore, the presented MPCscheme is able to protect the MG against high-effect low-probability events such as sudden drops of available renewablepower or unexpected increase of demand. Finally, the proposedrisk-averse MPC formulation can be cast as an mixed-integerquadratically-constrained quadratic problem which can besolved by commercial solvers as indicated in Section VI.

Potentially, for a large number of integer variables theproblem complexity can become prohibitive. One possibleapproach to mitigate this complexity is to relax the problemfor predictions in the far future or to employ heuristics such asgenetic algorithms to be able to solve complex mixed-integerproblems reasonably fast. In the future we would like to lookinto this topic in more detail by considering MGs with moreconventional generators and RES as well as scenario treeswith a higher number of nodes. Furthermore, as the operationregime is significantly influenced by the state of charge weplan to consider more complex storage dynamics. Future workwill also address chance constraints and decreasing the solvertime by devising paralleliseable optimisation algorithms (see,e.g, [76]) that can run on graphics processing units.

APPENDIX AAUXILIARY RESULTS

Lemma A.1. Let ∅ 6= X ⊆ Rn, ∅ 6= Y ⊆ Rm and for everyx ∈ X, f(x, y) attains a minimum over Y, i.e., miny∈Y f(x, y)exists. Then, the optimisation problem

Minimisex∈X,y

F (x, y) subj. to miny∈Y

f(x, y) ≤ β,

with cost function F : Rn × Rm → R is equivalent to

Minimisex∈X,y

F (x, y) subj. to y ∈ Y, f(x, y) ≤ β.

Proof. As the two problems have the same cost function, itsuffices to show that they have the same constraint sets. There-fore, we define the sets S =

x ∈ Rn | miny∈Y f(x, y) ≤ β

and S′ = x ∈ Rn | ∃y ∈ Y such that f(x, y) ≤ β.

Take x ∈ S, i.e., miny∈Y f(x, y) ≤ β. Since the minimumexists, there is a y? ∈ Y such that f(x, y?) ≤ β. Hence, x ∈ S′and consequently S ⊆ S′.

Take x ∈ S′, i.e., there is a y0 ∈ Y such that f(x, y0) ≤ β.Then, x ∈ S because miny∈Y f(x, y) ≤ f(x, y0) ≤ β, andconsequently S′ ⊆ S. This proves that S′ = S.

REFERENCES

[1] N. Hatziargyriou, H. Asano, R. Iravani, and C. Marnay, “Microgrids,”IEEE Power Energy Mag., vol. 5, no. 4, pp. 78–94, 2007.

[2] R. H. Lasseter, “MicroGrids,” in IEEE PES WM, 2002, pp. 305–308.[3] J. A. Peças Lopes, C. L. Moreira, and A. G. Madureira, “Defining control

strategies for microgrids islanded operation,” IEEE Trans. Power Syst.,vol. 21, no. 2, pp. 916–924, 2006.

[4] A. Bidram and A. Davoudi, “Hierarchical structure of microgrids controlsystem,” IEEE Trans. Smart Grid, vol. 3, no. 4, pp. 1963–1976, 2012.

[5] F. Katiraei, R. Iravani, N. Hatziargyriou, and A. Dimeas, “Microgridsmanagement,” IEEE Power Energy Mag., vol. 6, no. 3, pp. 54–65, 2008.

[6] A. G. Tsikalakis and N. D. Hatziargyriou, “Centralized control foroptimizing microgrids operation,” in IEEE PES GM, 2011, pp. 1–8.

[7] A. Parisio, E. Rikos, and L. Glielmo, “A model predictive controlapproach to microgrid operation optimization,” IEEE Trans. ControlSyst. Technol., no. 99, 2014.

[8] R. Palma-Behnke, C. Benavides, F. Lanas, B. Severino, L. Reyes,J. Llanos, and D. Sáez, “A microgrid energy management system basedon the rolling horizon strategy,” IEEE Trans. Smart Grid, vol. 4, no. 2,pp. 996–1006, 2013.

[9] D. Olivares, C. Cañizares, and M. Kazerani, “A centralized energymanagement system for isolated microgrids,” IEEE Trans. Smart Grid,vol. 5, no. 4, pp. 1864–1875, 2014.

[10] C. A. Hans, V. Nenchev, J. Raisch, and C. Reincke-Collon, “Minimaxmodel predictive operation control of microgrids,” in IFAC WC, 2014,pp. 10 287–10 292.

[11] I. Prodan and E. Zio, “A model predictive control framework for reliablemicrogrid energy management,” Int. J. Electr. Power Energy Syst.,vol. 61, pp. 399–409, 2014.

[12] C. A. Hans, V. Nenchev, J. Raisch, and C. Reincke-Collon, “Ap-proximate closed-loop minimax model predictive operation control ofmicrogrids,” in ECC, 2015, pp. 241–246.

[13] P. Kou, D. Liang, L. Gao, and F. Gao, “Stochastic coordination of plug-in electric vehicles and wind turbines in microgrid: A model predictivecontrol approach,” IEEE Trans. Smart Grid, vol. 7, no. 3, pp. 1537–1551,2016.

[14] M. Gulin, J. Matuško, and M. Vašak, “Stochastic model predictivecontrol for optimal economic operation of a residential dc microgrid,”in IEEE ICIT, March 2015, pp. 505–510.

[15] S. Raimondi Cominesi, M. Farina, L. Giulioni, B. Picasso, and R. Scat-tolini, “A two-layer stochastic model predictive control scheme formicrogrids,” IEEE Trans. Control Syst. Technol., vol. 26, no. 1, pp. 1–13,2018.

[16] A. Hooshmand, M. H. Poursaeidi, J. Mohammadpour, H. A. Malki,and K. Grigoriads, “Stochastic model predictive control method formicrogrid management,” in IEEE PES ISGT, 2012, pp. 1–7.

[17] A. Mesbah, “Stochastic model predictive control: An overview andperspectives for future research,” IEEE Control Syst. Mag., vol. 36, no. 6,pp. 30–44, 2016.

[18] F. Oldewurtel, C. N. Jones, and M. Morari, “A tractable approximationof chance constrained stochastic MPC based on affine disturbancefeedback,” in IEEE CDC, 2008, pp. 4731–4736.

[19] P. Kou, D. Liang, and L. Gao, “Stochastic energy scheduling in micro-grids considering the uncertainties in both supply and demand,” IEEESyst. J., vol. 12, no. 3, pp. 2589–2600, 2018.

[20] C. A. Hans, P. Sopasakis, A. Bemporad, J. Raisch, and C. Reincke-Collon, “Scenario-based model predictive operation control of islandedmicrogrids,” in IEEE CDC, 2015.

[21] S. Mohammadi, S. Soleymani, and B. Mozafari, “Scenario-basedstochastic operation management of microgrid including wind, pho-tovoltaic, micro-turbine, fuel cell and energy storage devices,” Int. J.Electr. Power Energy Syst., vol. 54, pp. 525–535, 2014.

[22] M. Petrollese, L. Valverde, D. Cocco, G. Cau, and J. Guerra, “Real-timeintegration of optimal generation scheduling with MPC for the energymanagement of a renewable hydrogen-based microgrid,” Appl. Energy,vol. 166, pp. 96–106, 2016.

[23] A. Parisio, E. Rikos, and L. Glielmo, “Stochastic model predictive con-trol for economic/environmental operation management of microgrids:An experimental case study,” J. Process Control, vol. 43, pp. 24–37,2016.

[24] A. Maulik and D. Das, “Optimal operation of droop-controlled islandedmicrogrids,” IEEE Trans. Sustain. Energy, vol. PP, no. 99, p. 1, 2017.

[25] B. Heymann, J. F. Bonnans, F. Silva, and G. Jimenez, “A stochasticcontinuous time model for microgrid energy management,” in ECC,2016, pp. 2084–2089.

16

[26] P. Pinson, H. Madsen, H. A. Nielsen, G. Papaefthymiou, and B. Klöckl,“From probabilistic forecasts to statistical scenarios of short-term windpower production,” Wind Energy, vol. 12, no. 1, pp. 51–62, 2009.

[27] H. Heitsch and W. Römisch, “Scenario reduction algorithms in stochasticprogramming,” Comput. Optimization. Appl., vol. 24, no. 2-3, pp. 187–206, 2003.

[28] H. Heitsch and W. Römisch, “Scenario tree modeling for multistagestochastic programs,” Math. Prog., vol. 118, no. 2, pp. 371–406, 2009.

[29] P. Sopasakis, D. Herceg, A. Bemporad, and P. Patrinos, “Risk-aversemodel predictive control,” Automatica, vol. 100, pp. 281–288, 2019.

[30] Y.-L. Chow and M. Pavone, “A framework for time-consistent, risk-averse model predictive control: Theory and algorithms,” in ACC, 2014,pp. 4204 – 4211.

[31] A. Shapiro, D. Dentcheva, and A. Ruszczynski, Lectures on stochasticprogramming: modeling and theory, 2nd ed. Philadelphia, PA, USA:SIAM, 2014.

[32] G. Pflug and W. Römisch, Modeling, Measuring and Managing Risk.World Scientific, 2007.

[33] F. Bellini and E. D. Bernardino, “Risk management with expectiles,”European J. Finance, vol. 23, no. 6, pp. 487–506, 2017.

[34] A. Nemirovski and A. Shapiro, “Convex approximations of chanceconstrained programs,” SIAM J. Optim., vol. 17, no. 4, pp. 969–996,2007.

[35] T. Asamov and A. Ruszczynski, “Time-consistent approximations ofrisk-averse multistage stochastic optimization problems,” Math. Prog.,vol. 153, no. 2, pp. 459–493, 2015.

[36] R. A. Collado, D. Papp, and A. Ruszczynski, “Scenario decompositionof risk-averse multistage stochastic programming problems,” Ann. Op.Res., vol. 200, pp. 147–170, 2012.

[37] S. Bruno, S. Ahmed, A. Shapiro, and S. Stree, “Risk neutral and riskaverse approaches to multistage renewable investment planning underuncertainty,” Eur. J. Oper. Res., vol. 250, no. 3, pp. 979–989, 2016.

[38] P. Patrinos and H. Sarimveis, “Convex parametric piecewise quadraticoptimization: theory and algorithms,” Automatica, vol. 47, no. 8, pp.1770–1777, 2011.

[39] ——, “An explicit optimal control approach for mean-risk dynamicportfolio allocation,” in ECC, 2007, pp. 3364–3370.

[40] R. Khodabakhsh and S. Sirouspour, “Optimal control of energy storagein a microgrid by minimizing conditional value-at-risk,” IEEE Trans.Sustain. Energy, vol. 7, no. 3, pp. 1264–1273, 2016.

[41] P. Xiong, P. Jirutitijaroen, and C. Singh, “A distributionally robustoptimization model for unit commitment considering uncertain windpower generation,” IEEE Trans. Power Syst., vol. 32, no. 1, pp. 39–49,2017.

[42] C. Zhao and R. Jiang, “Distributionally robust contingency-constrainedunit commitment,” IEEE Trans. Power Syst., vol. 33, no. 1, pp. 94–102,2018.

[43] J. García-González, E. Parrilla, and A. Mateo, “Risk-averse profit-basedoptimal scheduling of a hydro-chain in the day-ahead electricity market,”Eur. J. Oper. Res., vol. 181, no. 3, pp. 1354–1369, 2007.

[44] Z. Wang, Q. Bian, H. Xin, and D. Gan, “A distributionally robust co-ordinated reserve scheduling model considering cvar-based wind powerreserve requirements,” IEEE Trans. Sustain. Energy, vol. 7, no. 2, pp.625–636, 2016.

[45] I. G. Moghaddam, M. Nick, F. Fallahi, M. Sanei, and S. Mortazavi,“Risk-averse profit-based optimal operation strategy of a combined windfarm–cascade hydro system in an electricity market,” Renewable Energy,vol. 55, pp. 252–259, 2013.

[46] Y. Zhang, S. Shen, and J. L. Mathieu, “Distributionally robust chance-constrained optimal power flow with uncertain renewables and uncertainreserves provided by loads,” IEEE Trans. Power Syst., vol. 32, no. 2,pp. 1378–1388, 2017.

[47] T. Summers, J. Warrington, M. Morari, and J. Lygeros, “Stochasticoptimal power flow based on conditional value at risk and distributionalrobustness,” Int. J. Electr. Power Energ. Syst. Eng., vol. 72, pp. 116–125,2015.

[48] L. Roald, M. Vrakopoulou, F. Oldewurtel, and G. Andersson, “Risk-based optimal power flow with probabilistic guarantees,” Int. J. Electr.Power Energy Syst., vol. 72, pp. 66–74, 2015.

[49] A. Botterud, Z. Zhou, J. Wang, R. J. Bessa, H. Keko, J. Sumaili, andV. Miranda, “Wind power trading under uncertainty in LMP markets,”IEEE Trans. Power Syst., vol. 27, no. 2, pp. 894–903, 2012.

[50] M. Maceira, L. Marzano, D. Penna, A. Diniz, and T. Justino, “Appli-cation of CVaR risk aversion approach in the expansion and operationplanning and for setting the spot price in the brazilian hydrothermalinterconnected system,” Int. J. Electr. Power Energy Syst., vol. 72, pp.126–135, 2015.

[51] J. M. Morales, A. J. Conejo, and J. Pérez-Ruiz, “Short-term trading fora wind power producer,” IEEE Trans. Power Syst., vol. 25, no. 1, pp.554–564, 2010.

[52] P. Xiong and C. Singh, “Distributionally robust optimization for energyand reserve toward a low-carbon electricity market,” Electr. Power Syst.Res., vol. 149, pp. 137–145, 2017.

[53] P. Patrinos, S. Trimboli, and A. Bemporad, “Stochastic MPC for real-time market-based optimal power dispatch,” in IEEE CDC and ECC,2011, pp. 7111–7116.

[54] A. Krishna, C. A. Hans, J. Schiffer, J. Raisch, and T. Kral, “Steadystate evaluation of distributed secondary frequency control strategies formicrogrids in the presence of clock drifts,” in MED, 2017.

[55] J. Schiffer, C. A. Hans, T. Kral, R. Ortega, and J. Raisch, “Modelling,analysis and experimental validation of clock drift effects in low-inertiapower systems,” IEEE Trans. Ind. Electron., vol. 64, no. 7, pp. 5942–5951, 2017.

[56] K. Purchala, L. Meeus, D. Van Dommelen, and R. Belmans, “Usefulnessof DC power flow for active power flow analysis,” in IEEE PES GM,2005, pp. 454–459.

[57] A. Bemporad and M. Morari, “Control of systems integrating logic,dynamics, and constraints,” Automatica, vol. 35, no. 3, pp. 407–427,1999.

[58] J. B. Rawlings and D. Q. Mayne, Model predictive control: Theory anddesign. Nob Hill Pub., 2009.

[59] C. A. Hans, P. Braun, J. Raisch, L. Grüne, and C. Reincke-Collon,“Hierarchical distributed model predictive control of interconnectedmicrogrids,” IEEE Trans. Sustain. Energy, vol. 10, no. 1, p. 407–416,2019.

[60] P. Kundur, N. J. Balu, and M. G. Lauby, Power system stability andcontrol. McGraw-Hill, 1994, vol. 7.

[61] S. H. Low, “Convex relaxation of optimal power flow—part I: Formu-lations and equivalence,” IEEE Trans. Control Netw. Syst., vol. 1, no. 1,pp. 15–27, 2014.

[62] C. Ocampo-Martinez, V. Puig, J. Grosso, G. Cembrano, P. Sopasakis,A. Sampathirao, P. Patrinos, D. Bernardini, G. Gnecco, and A. Bempo-rad, “Real-time control algorithms for optimal operational management,”EFFINET, Tech. Rep., 2015.

[63] G. E. Box, G. M. Jenkins, and G. C. Reinsel, Time series analysis:forecasting and control. John Wiley & Sons, 2013.

[64] G. C. Pflug and A. Pichler, “Dynamic generation of scenario trees,”Comput. Optimization Appl., vol. 62, no. 3, pp. 641–668, 2015.

[65] J. M. Latorre, S. Cerisola, and A. Ramos, “Clustering algorithms forscenario tree generation: Application to natural hydro inflows,” Eur. J.Oper. Res., vol. 181, no. 3, pp. 1339–1353, 2007.

[66] Z. Chen and D. Xu, “Knowledge-based scenario tree generation methodsand application in multiperiod portfolio selection problem,” Appl. Stoch.Model. Bus. Ind., vol. 30, no. 3, pp. 240–257, 2014.

[67] P. Beraldi, F. D. Simone, and A. Violi, “Generating scenario trees: Aparallel integrated simulation-optimization approach,” J. Comput. Appl.Math., vol. 233, no. 9, pp. 2322–2331, 2010.

[68] N. Gülpınar, B. Rustem, and R. Settergren, “Simulation and optimizationapproaches to scenario tree generation,” J. Econ. Dyn. Control, vol. 28,no. 7, pp. 1291–1315, 2004.

[69] M. Živic Ðurovic, A. Milacic, and M. Kršulja, “A simplified modelof quadratic cost function for thermal generators,” Ann. DAAAM 2012Proc. 23 Int. DAAAM Symp., vol. 23, no. 1, pp. 25–28, 2012.

[70] J. Vetter, P. Novák, M. R. Wagner, C. Veit, K.-C. Möller, J. Besenhard,M. Winter, M. Wohlfahrt-Mehrens, C. Vogler, and A. Hammouche,“Ageing mechanisms in lithium-ion batteries,” J. Power Sources, vol.147, no. 1-2, pp. 269–281, 2005.

[71] B. P. Van Parys, D. Kuhn, P. J. Goulart, and M. Morari, “Distributionallyrobust control of constrained stochastic systems,” IEEE Trans. Autom.Control, vol. 61, no. 2, pp. 430–442, 2016.

[72] S. Boyd and L. Vandenberghe, Convex optimization. Cambridgeuniversity press, 2004.

[73] A. Shapiro, “Minimax and risk averse multistage stochastic program-ming,” Eur. J. Oper. Res., vol. 219, no. 3, pp. 719–726, 2012.

[74] J. Löfberg, “YALMIP: A toolbox for modeling and optimization inMATLAB,” in IEEE CACSD, 2004, pp. 284–289.

[75] P. Braun, T. Faulwasser, L. Grüne, C. M. Kellett, S. R. Weller, andK. Worthmann, “Maximal islanding time for microgrids via distributedpredictive control,” in 22 Int. Symp. Math. Theory Netw. Syst., 2016, pp.652–659.

[76] A. K. Sampathirao, P. Sopasakis, A. Bemporad, and P. Patrinos, “GPU-accelerated stochastic predictive control of drinking water networks,”IEEE Trans. Control Syst. Technol., vol. 26, no. 2, pp. 551–562, 2018.