Robust Economic Model Predictive Control Based on a Zonotope and Local Feedback Controller for Energy Dispatch in Smart-Grids Considering Demand Uncertainty †

Electrical smart grids are complex MIMO systems whose operation can be noticeably affected by the presence of uncertainties such as load demand uncertainty. In this paper, based on a restricted representation of the demand uncertainty, we propose a robust economic model predictive control method that guarantees an optimal energy dispatch in a smart micro-grid. Load demands are uncertain, but viewed as bounded. The proposed method first decomposes control inputs into dependent and independent components, and then tackles the effect of demand uncertainty by tightening the system constraints as the uncertainty propagates along the prediction horizon using interval arithmetic and local state feedback control law. The tightened constraints’ upper and lower limits are computed off-line. The proposed method guarantees stability through a periodic terminal state constraint. The method is faster and simpler compared to other approaches based on Closed-loop min–max techniques. The applicability of the proposed approach is demonstrated using a smart micro-grid that comprises a wind generator, some photovoltaic (PV) panels, a diesel generator, a hydroelectric generator and some storage devices linked via two DC-buses, from which load demands can be adequately satisfied.


Introduction
The most trivial approach of tackling uncertainties is simply to neglect them i.e., to consider only the nominal system, and rely on the receding horizon control principle of MPC, which introduces a Closed-loop mechanism that could minimize the effects of uncertain disturbances. Unfortunately, there is no guarantee of achieving an optimal and stable control system in the presence of uncertainties. Therefore, it is quite necessary that, some well-thought control strategies have to be developed. Without advanced predictive control strategies, it is quite unrealistic to achieve optimal control of complex Multiple Input Multiple Output (MIMO) interconnected electrical systems such as smart grids. Many previous works [1][2][3][4] have used stochastic approaches to deal with uncertainties in generalized flow-based networks. In this study, we consider a deterministic approach namely robust optimization for tackling load demand uncertainty. Model Predictive Control (MPC) [5][6][7][8] has become nowadays one of the most sophisticated and regularly used techniques for performing optimal control of complex MIMO systems. Furthermore, uncertainties and noise can tremendously increase the complexity of smart electrical grids [9,10]. Computational constraints as reported in [11][12][13] can be enforced to tackle model uncertainty and noise. But, the issue of tractability is often of concern in this approach. Optimization techniques such as min-max MPC approaches as discussed in [14][15][16][17][18][19] can better tackle uncertainties in electrical smart grids. However, one of the main disadvantages of min-max approaches is that, they principally concentrate on worst-case scenarios. Furthermore, [13,20] have proposed some adjustable robust solutions, which assume that there exists an affine dependence between some adjustable control inputs and the uncertainty parameters of the problem. This approach is more flexible, and it is usually expected to produce a computationally tractable problem [21]. Tube-based robust MPC [22] This approach uses an independent nominal model of the system, and a feedback controller to ensure that the actual state converges to the nominal state. It is important to notice that, the optimization is made over the nominal system whose constraints are dynamically tightened with the help of robust positively control invariant sets. After that the nominal computed control inputs are adjusted using a linear feedback controller. One of its drawbacks is the requirement of a robust positively invariant set. Constraint Tightening MPC [23] This method is based on the idea of widening the state constraints, so that a trajectory can be found under any evolution of the disturbance. There is no need to compute a robustly invariant terminal constraint set. This approach might be computationally expensive. Feedback min-max MPC [24] To tackle the drawbacks of Open-loop min-max MPC, a feedback min-max MPC has been proposed. This approach is based on the idea of steering the system to a robust control invariant set using min-max MPC. Once the state is in the control invariant set Xf, a linear state feedback can be applied to adjust the control input. The method assumes that the objective function of the optimization problem is convex and zero for any state inside the control invariant set. Stability is guaranteed by using the control invariant set Xf as a terminal state constraint. The main drawback of this method is that it leads to a control law that is more computationally intensive. However, the computational load can be significantly reduced if the system is linear and the constraints are convex. Moreover, if the disturbance set is polytope, then it is sufficient to only consider the worst-case realizations of the disturbance i.e., only the vertices could be considered in the optimization problem.
In general, Open-loop frameworks of robust MPC methodologies are termed to be conservative, while Closed-loop predictions are usually based on controllers with high computational complexity. In [18,19], the authors proposed Closed-loop min-max approach to solve the problem of uncertain economic energy dispatch in smart micro-grids. However, the obtained results show that the computational performance was not only complex but also not optimal as desired. In [25], we proposed a novel Open-loop robust economic model predictive control method. In this work, we extend the method presented in [25] by adding a feedback control law, which results in a Closed-loop system. This could palliate shortcomings of the Open-loop approach such as tackling higher demand uncertainty, thereby improving the overall feasibility and stability of the controller.
The proposed method first decomposes control inputs into dependent and independent components, and then considers the effect of demand uncertainty by tightening the system constraints along the prediction horizon. The bounds of the tightened constraints are calculated off-line. The decomposition of control inputs offers a possibility of dividing the control strategy into two parts: an Open-loop system that tightens only the dependent components, and a Closed-loop system using a local feedback control law that is used to tighten the independent components. The dependent components have further been divided into two parts, whereby one of the parts is bounded by a zonotope and is employed to compensate for any deviation of the actual demand from the forecasted one. The uncertainty in load demands is captured using a zonotope that is subsequently propagated through the system. System stability is guaranteed through a periodic terminal state constraint. The proposed method is simpler and faster than Closed-loop min-max approaches, because the online computational burden is reduced. Additionally, we also present a comparison of the Open-loop and Closed-loop approaches based on the daily economic costs of energy production.
The applicability of the proposed approach is demonstrated using a smart micro-grid that comprises a wind generator, some photovoltaic (PV) panels, a diesel generator, a hydroelectric generator and some storage devices linked via two DC-buses, from which load demands can be satisfied. Load demands are uncertain, but viewed as bounded.
The contributions of this paper are manifold: • Development and application of a novel robust MPC Method based on zonotopes extending classical tube-based approaches for tackling an uncertain energy dispatch problem in smart micro-grids including several heterogeneous generators and storage elements.

•
Assessing the suitability and reliability of Economic MPC paradigm to incorporate the developed robust MPC method.

•
The proposed method tackles the effect of demand uncertainty by tightening the system constraints in real-time as the uncertainty propagates throughout the prediction horizon.
The structure of the paper is as follows: in Section 2 the problem formulation and the EMPC strategy are presented. Section 3 describes the robustification of the proposed EMPC strategy against demand uncertainty. Section 4 shows how the variable bounds of the MPC optimization problem are adjusted to tackle demand uncertainty. Section 5 presents an application of the proposed approach to a smart micro-grid system. Section 6 draws the main conclusions and presents future research directions.

Control-Oriented Modelling
Electrical smart grids can be viewed as instances of generalized flow-based networks. Basically, every flow-based network consists of some components [2,18,19,26], e.g., flow sources, flow handling and sink elements, nodes, links and storage elements.
Let us consider a smart grid consisting of n u energy flow handling and source elements, n x storage elements, n q intersection nodes and n d sinks (demands). Then, from control point of view, let the smart grid be represented by the following discrete-time descriptor linear model where x ∈ n x is the state vector, u ∈ n u stands for the vector of control inputs, d ∈ n d denotes the disturbances (i.e., demands) vector. A ∈ n x ×n x , B ∈ n x ×n u , B d ∈ n x ×n d are system matrices. E u ∈ n q ×n u and E d ∈ n q ×n d are matrices of suitable dimensions that connect energy suppliers to load demands on the n q DC bus(ses).

Assumption 1.
The states x are observable at time k, and the pair (A,B) is also controllable.

Assumption 2.
The realization of actual demands for current time k and future time instants k + i:d(k + i) may be decomposed as a summation of expected and uncertain additive demands where d(i|k) is the expected demand for the prediction horizon step i at sampling time instant k and ∆d(i|k) is the error of this prediction. The error ∆d(i|k) is unknown but regarded as bounded where ∆θ are the bounds. To propagate the effect of the uncertainty along the prediction horizon these bounds will be represented in a zonotopic form where: 0 is a column vector of n d zeros considered as the center of the zonotope, denotes the Minkowski sum, H d is a diagonal matrix defined as diag ∆θ 1 . . . θ n d and z d ∈ B n d with B = [−1, 1] .

Control Objectives
The control objectives of the economic MPC controller consist of the following terms: Economic cost, Safety storage levels and Smoothness of the control actions. These terms are described in the following lines.

Economic Cost
The total economic cost of operation of the smart grid is given by: where u(k) is a vector of control actions at time k; ∆t is the sampling time in seconds; α 1 is a known vector related to fixed economic costs as e.g., maintenance of generators and their accessories; α 2 (k) is a known time-varying vector associated to the economic cost of power flows related to transmission and distribution.

Safety Storage Levels
The safety objective penalizes the amount of energy in storage elements that violates (below or above) a pre-specified security thresholds x(k) ∈ [δ min , δ max ]. They are defined as: - Upper safety level: -Lower safety level: where ε − (k) and ε + (k) are the lower and upper safety limit violations that are included as the following soft constraint

Smoothness of the Control Actions
This objective is used to protect storage elements by avoiding peaks of power during charging and discharging processes.
where ∆u(k) is the control signal rate of change, defined as ∆u(k) = u(k) − u(k − 1).

Formulation of the Nominal Economic MPC Controller
Taking into consideration the model of the smart micro-grid (1) and the control objectives (5)-(9), the overall objective function can be formulated as follows Even though renewable energy sources (e.g., solar and wind) are intermittent and uncertain, we can still create some profiles of their power generations according to their geographical locations. By interpolating those profiles it is expected that, some constraints (i.e., bounds) on their power generations can be consistently defined. Based on those profiles and the state of energy storage elements, the dispatchability of renewable energies can be reasonably realised.
The formulation of the nominal MPC controller of the optimization problem is given as follows: where u min (k) and u max (k) are the lower and upper bounds of the control inputs; x min and x max are the lower and upper limits of the storage elements with x min ≤ δ min and x max ≥ δ max ; λ 1 , λ 2 − , λ 2 + , λ 3 are weighting coefficients for prioritizing the selected objectives. Finally, for load demands that exhibit repetitive periodic patterns, the prediction horizon H p corresponds to the period, and the following constraint is enforced so that storage elements are effectively used.
x(H p |k) = x(0|k) However, it is visible that the MPC controller (11) is not robust against the demand uncertainty forecast defined in (2). Therefore, in the coming section, the robustification of this controller will be carried out by considering the uncertainty bounds (3).

Robustyfing the MPC Controller
The proposed method considers the uncertainty effect by tightening system constraints along the prediction horizon using simultaneously zonotopes and interval arithmetic [27][28][29][30][31]. First, Control inputs are partioned into dependent and independent variables. After that, some particular dependent control variables are chosen and bounded by a zonotope, so that any possible discrepancy between actual and predicted demands is immediately compensated, as the uncertainty goes forward along the prediction horizon. Moreover, the corresponding uncertain state estimation caused by the uncertain demand is also computed and bounded by a zonotope at each time instant throughout the prediction horizon. Upper and lower limits of the adjusted constraints are calculated off-line.

Decomposition of the Control Variables
The static equations of the smart grid model (1) can be used to decompose control input variables into dependent and independent variables. The main goal is to come up with an affine parameterization of the control input variables in terms of demand variables. In fact, several studies [1,4,8,11] have already discussed about the affine dependence method.

Assumption 3.
There are more variables than algebraic equations, i.e., n q < n u . The matrix E u in (1) has maximal rank, i.e., rank E u = n q .
It is assumed that, control inputs can be decomposed into dependent and independent variables (e.g., by applying LU-decomposition or heuristic approaches).
where P 1 ∈ n u ×n indep and P 2 ∈ n u ×n dep are suitable permutation matrices which define u from independent variables u indep and dependent variables u dep . Then, we can write where E indep = E u P 1 and E dep = E u P 2 .
Assuming, dependent input vector will compensate future deviations of demand predictions defined in Equation (2), we decompose the actual predicted control input into two components: where u dep (i|k) is the nominal prediction that is computed by nominal MPC problem (11) and ∆u dep (i|k) is the component of dependent inputs that would compensate future unexpected additive demand, i.e., ∆d(i|k) in Equation (2). On the other hand, we suppose that, the independent component will be given directly by MPC optimization problem (11) i.e., Substituting the actual demands (2) and the actual predicted inputs (15) into (14), we obtain Furthermore, (17) can be split into deterministic and stochastic (uncertain) parts. The deterministic part that is considered in the MPC optimization problem (11) is given as: while the uncertain part is given by: Assuming matrix E dep to be invertible, we can write Considering the zonotopic demand bounds (4), the dependent input vector can also be bounded with a zonotope as follows:

Decomposition of the State Variables
Since the control inputs can be decomposed into two components, it is expected that the states can also be decomposed into two parts.
The predicted evolution of the actual state can be expressed as Considering demand uncertainty and inputs decomposition leads tõ where B ind = BP 1 and B dep = BP 2 . Expanding (23) and applying demand error compensation, we obtain: Now, the future state can be decomposed as where x(i + 1|k) is the deterministic estimation part considered in MPC optimization problem, and ∆x(i + 1|k) is the uncertain part due to the demand error estimation.
Considering that the current state is known, thenx(0|k) =x(k) and ∆x(0|k) = 0. Therefore the deterministic state estimation part can be given by On the other hand, iteratively computing the state of the system at every time instant k, we end up expressing the uncertain state estimation part ∆x(i + 1|k) as an accumulative function of the unexpected additive demands Now, considering demand bounds (2), the uncertain state estimation part can also be bounded with the following zonotope:

Open-Loop Approach
As soon as the effect of demand uncertainty is propagated to the control inputs and states, input and state constraints in the MPC problem (11) have to be adjusted, in order that actual predicted inputs and states do not violate the defined input and state bounds, i.e., In this paper, for the sake of easing the MPC implementation, the dependent uncertain input vector ∆u dep (i|k) and ∆x(i + 1|k) state estimation error vector will be bounded using interval boxes obtained from the interval hull of (21) and (21), as follows with H dep = diagonal ∆ dep,1 . . . ∆ dep,n dep and z dep ∈ B n dep and with z x ∈ B n x and H x (i) = diagonal (∆ x,1 (i) . . . ∆ x,n x (i)) This approximation supposes that the uncertain vector components will be independent. Taking into account the uncertain dependent input vector bounded by the box defined in (33) and the actual predicted inputs constraints (30), we can formulate the input constraints in the MPC optimization problem (11) as follows: where the bounds that affect dependent input variables are big enough to guarantee demand error compensation (23) i.e., zonotope defined in (24) should be included in the box defined by (33) According to [29], box bounds can be solved using interval hull of zonotope whereH d,j denotes the j th row of matrixH d .
On the other hand, considering the state estimation error bounded by the box defined in (34) and the actual predicted state constraints (30), we can express the state constraints in the MPC optimization problem (11) as follows: where constants ∆ x,j (i|j) ∈ + for i = 1, . . . , H p and i = 1, . . . , n dep are big enough to consider the effect of the demand bounds error (2) in the state. As with the computation of dependent input bounds presented above, we may also calculate state estimation bounds as follows: whereH x,j (i|k) denotes the j th row of matrixH x (i|k) defined in (29). Taking into consideration the tightened constraints derived above, we can reformulate the MPC optimization problem (11) in a robust way as follows:

Closed-Loop Approach
To improve the performance and guarantee recursive feasibility of the Open-loop method, we introduce a linear state feedback control law applied to the independent control input u indep , as followsũ that counteracts the effect of the additive uncertain demand K is assumed to be an invertible linear disturbance rejection controller e.g., LQR gain. Thus, Equation (27) can be rewritten and considering demand bounds (2), the uncertain state estimation part can also be bounded with the following zonotope: Taking into account the uncertain dependent input vector bounded by the box defined in (33) and the actual predicted inputs constraints (30), we can formulate the input constraints in the MPC optimization problem (11) as follows: According to [29], box bounds can be solved using interval hull of zonotope whereH x,j denotes the j th row of matrixH x . Taking into consideration the tightened constraints derived above, we can reformulate the MPC optimization problem (11) in a robust way as follows: The control action applied to the system is given by:

Description
In this section, we use the smart micro-grid proposed in [25] to verify the applicability of the proposed method. The considered smart micro-grid is divided into two clusters connected with two DC-buses linked by a switch. The purpose of the first cluster is primarily to satisfy residential demands, and it is made up of a diesel generator, some photovoltaic panels, and a lead-acid battery. While the second cluster is intended to generate required energy for industrial and other DC-load. It consists of a hydroelectric generator, a wind turbine generator, and one virtual sink (external grid connection). It might be important to realise that, the external grid connection is viewed as a source when selling energy, and as a sink when buying energy. The considered smart micro-grid is diagrammatically depicted in Figure 1.

Control-Oriented Model
We consider all the smart micro-grid's components as manipulated inputs (excluding sinks), and its states are represented by the state of charge of the storage elements.
State variables: x b and x h are the state of charge (SOC) of the batteries (lead-acid and hydrogen respectively): x Control input variables: u(k) = P b1 (k), P b2 (k), P h1 (k), P h2 (k), P d (k), P w (k), P pv (k), P f (k), P hy (k), P g1 (k), P g2 (k) t (52) where P b1 and P b2 are the charged power and discharged power of the lead-acid battery; P h1 and P h2 are the charged and discharged power of the hydrogen battery; P g1 and P g2 are the exported and imported power into/from the external grid; P d , P hy , P pv , and P w stand for the power supplied to the DC Buses by the diesel, hydroelectric, wind, and photovoltaic generators respectively. P f is the power flow from Bus 2 to Bus 1. Disturbance variables: d 1 is the industrial load, d 2 is the residential load. The disturbance vector d consists of the two loads: The matrices and vectors that define the system and its constraints are given as follows: where η hc and η hd are the charging efficiency and discharging efficiency of the hydrogen battery respectively; and η bc and η bd are the charging efficiency and discharging efficiency of the lead-acid battery respectively. x min = [0, 0] t , x max = [40kWh, 40kWh] t u min (k) = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] t u max (k) = 2.2, 10.2, 2.2, 10.2, 7.7500, P pw (k), P ppv (k), 2.2, 8, 3, 3 t where P pw (k) ≤ 7.75 kW and P ppv (k) ≤ 6.75 kW are the energy generation profiles of the wind and photovoltaic generators respectively. The additive uncertain demand is considered to be bounded by a box defined in zonotopic form (4) as where ∆θ 1 and ∆θ 1 define the uncertainty demand bounds of the two loads.
On the other hand, the charging batteries' inputs u 1 (k) and u 3 (k) have been chosen as dependent variables, i.e., Then and Therefore −E −1 dep E d = −I. Considering the uncertain dependent input and demand error compensation (20) leads to Then, applying (37) we can obtain ∆ dep,1 = ∆θ 1 and ∆ dep,2 = ∆θ 2 (63) and the state uncertain estimation part as Then, accumulative function (27) leads tô and considering demand error bounds (29) yields Finally, applying (39) we obtain ∆ x,1 (i|k) = (i + 1)η bc ∆θ 1 and ∆ x,2 (i|k) = (i + 1)η hc ∆θ 2 (67) The simulations were made for 96 h (4 days). Some expected profiles of the PV and wind generator, as well as load demands are depicted in Figure 2. In Figure 3, the additive uncertain load demands are represented with the shadowed green area. The state of charge of the batteries and the subsystems' Initial values are set to [20 kWh, 20 kWh] t . Model parameters and energy prices are summarized in Table 1.  The profile of a generator represents the maximum power that can be ideally produced by the generator.

Results
The two proposed robust economic MPC strategies the Open-loop and Closed-loop approaches as well as the nominal approach (i.e., neglecting uncertain demands) have been implemented with YALMIP [14,32] using CPLEX solver in the Matlab environment. The local contol law K defined in (43) for the Robust Closed-loop approach is computed using the LQR method as proposed in [33] obtaining Two different Cases have been taken into account in the simulations: Case 1 (low and medium demand uncertainty) and Case 2 (high demand uncertainty). Demand uncertainty bounds ∆θ 1 = ∆θ 2 = 0.4 kW and ∆θ 1 = ∆θ 2 = 0.7 kW were considered in Case 1 and Case 2 respectively. As a general summary of the results depicted in Figures 4-8, the diesel and hydroelectric generators delivered between 1 and 1.3 kWh in summer during the first six hours of the day, and in winter in the afternoon for six hours. The batteries delivered between 1 and 2 kWh during the first two hours of the day. 1 kWh was bought from the external grid during the second hour of the day. Tables 2 and 3 show an economic comparison between the two proposed robust approaches and the nominal approach. The overall energy production costs are higher in the robust approaches than in the nominal approach, due to the demand uncertainty. However, the proposed robust methods provide robustness against unexpected changes in the demands. Robust Open-loop approach is more efficient in economic terms than Robust Closed-loop approach for low and medium uncertainties, as can be seen in Table 2. However, as the demand uncertainty increases, the performance of the Open-loop approach deteriorates, and at some points the problem becomes even unfeasible. This fact can be observed in the results of Case study 2 in Table 3. With high demand uncertainty of 0.7 kW the Open-loop approach becomes unfeasible, while the Closed-loop approach does not present feasibility problems.
The superiority of the Robust Closed-loop approach to its Open-loop counterpart in dealing with high demand uncertainties is due to the fact that, a part of the range of independent variables (37) is devoted to compensate the accumulative effect of demand uncertainties in uncertain state estimation (27). This compensation leads to smaller uncertain state estimation bounds (39) in the Closed-loop approach than in the Open-loop approach. This fact is emphasized in Figure 9 where the evolution of the bounds of state x 1 (SOC of lead acid battery) regarding time prediction i. I.e., x max 1 − ∆x(i|k) and x min 1 + ∆x(i|k) considering both robust approaches in Case Study 2 (high demand uncertainty) is depicted. As it can be noticed from this figure, the degree of freedom in the evolution of predicted state variables is much more limited in the Open-loop approach than in the Closed-loop one.

Conclusions
In this paper, we have developed a novel robust economic MPC method for guaranteeing an optimal control of a smart micro-grid considering an unknown but bounded demand uncertainty. The proposed robust economic MPC strategy tightens in real-time the constraints of the control inputs as the uncertainty goes throughout the prediction horizon.
We have shown how the control inputs can be decomposed into independent and dependent components, thereby offering a possibility of two different robust EMPC approaches: a feedforward (Open-loop) approach that tightens only the dependent components, and a feedback (Closed-loop) approach that incorporates a local feedback controller for tightening also the independent components. The dependent components have further been divided into two parts, whereby one of the parts is bounded by a zonotope and is employed to compensate for any deviation of the actual demand from the forecasted one. We have also carried out a comparison between the Open-loop and Closed-loop approaches and prove that the Closed-loop approach is more robust to demand uncertainty than the Open-loop approach. Finally, the results of a case study have demonstrated that the proposed robust EMPC method can be successfully used to tackle demand uncertainty in energy dispatch of electrical smart micro-grids. The next steps for completing this work will be devoted to the development of an automatic approach of successively selecting optimal control inputs for compensating demand deviations. Furthermore, extending the developed method by including uncertainty of energy prices and renewable energies as done in [19] for a min-max robust method will also be considered.