Model Predictive Operation Control of Islanded Microgrids under Nonlinear Conversion Losses of Storage Units

: This paper proposes a certainty equivalence model predictive control (MPC) approach for the operation of islanded microgrids with a very high share of renewable energy sources. First, to make the MG model more realistic, the conversion losses of the storage units and the conversion losses of the power electronic devices are considered by the quadratic functions in the dynamic of units. Then, to mitigate the effect of errors in the storage units’ state of charge prediction, the conversion loss functions are reformulated by the mixed-integer linear inequality functions and included in the proposed scheme. Finally, the effectiveness of the proposed certainty MPC is veriﬁed by a numerical case study.


Introduction
Electric power systems have played a pivotal role in technological advances, infrastructure development, and economic growth since their invention [1]. However, conventional power systems typically use fossil fuels (for example, coal, natural gas, or oil) and nuclear and hydropower plants [2]. Unfortunately, the performance of most of them leads to a significant increase in greenhouse gas emissions. Hence, in recent years, researchers have been encouraged to reduce greenhouse gas emissions and fossil fuel consumption in power systems. One of the most effective ways to reduce greenhouse gas emissions is by replacing conventional generators with Renewable Energy Sources (RES) [3]-for example, Photo-Voltaic (PV) power plants or Wind Turbines (WT). Furthermore, to facilitate the integration of a sizeable number of renewable Distributed Generation (DG) units, the concept of microgrids (MGs) has become increasingly popular [4,5].
A microgrid is a small-scale power system, generally consisting of conventional generators, RESs, Energy Storage Sources (ESSs), and loads interconnected by transmission lines [6][7][8]. In general, MGs can be typically operated in grid-connected or island mode. Recently, the MG control system has been standardized into three layers [7]. The inner loop is called Primary Control (PC), and it provides the references for the DG's DC-AC power converters. The PC is decentralized to establish the desired sharing of power among DGs while preserving the MG stability by employing a droop control term. This layer typically operates on a fast timescale (in the range of tens of milliseconds to seconds). Then, because inverter-based DGs have no inertia, a Secondary Control (SC) layer is needed to compensate for the frequency and voltage deviations introduced by the PC's droop control terms and generally operates on a timescale from seconds to minutes. Finally, the operation control is designed to optimize the operation of the MGs by providing power setpoints to the lower control layers. The operation control typically operates on a timescale from minutes to fractions of hours. For this task, model predictive control (MPC) approaches are considered a good choice as they allow us to include constraints on the units explicitly and evaluate the system dynamics. This work mainly focuses on the optimal operation of microgrids with a high share of renewable sources.

Literature Review
Several control schemes have been reported for the operation of islanded MGs. According to how they handle uncertainties, these approaches can be categorized as: (i) certainty equivalence, wherein a forecast in the form of the mean value is fully reliable; (ii) worst-case, where no possibility information is presumed; (iii) risk-neutral stochastic, where a forecast probability distribution is thoroughly reliable, and (iv) risk-averse, where uncertainties in the forecast probability distribution are considered.
In this context, a two-stage operation control algorithm is recorded in [9], which includes a schedule and a dispatch layer. To dispatch generators of islanded MGs, an energy management approach is proposed in [10] by adapting the power setpoints and droop gains of the units. Furthermore, a method is provided in [11] to schedule islanded MGs. However, refs. [9][10][11] do not allow us to limit infeed from RES. By using genetic algorithms, a day-ahead schedule for MGs is also designed in [12]. Additionally, ref. [13] proposes an operation controller based on a rolling horizon strategy. Another operation control is introduced in [14] to address an energy management problem for deterministic forecasts of load and renewable generation. The authors in [15] formulated a multi-objective optimization problem based on model predictive control with the goals of minimizing fuel costs and changes in the power output of diesel generators, minimizing costs associated with the low battery life of energy storage. However, losses and line power flow limits are not considered. Using MPC, a centralized energy management system for isolated microgrids without considering power losses is designed in [16], allowing the proper dispatch of the energy storage units. However, refs. [13][14][15][16] disregard the power flow over the transmission lines. The model predictive operation control of microgrids in islanded operation mode is studied in [17]. Although there is a limit to the RES infeed, the conversion losses of storage units are ignored. A novel day-ahead EMS based on EV considering non-integer-hour energy flow is subsequently presented in [18] for pelagic island microgrid groups. The authors in [19] propose a real-time-driven primary regulation that mainly depends on the optimized P-f droop coefficient. This regulator reduces the power loss in all the operating conditions in an islanded microgrid. An MPC-based energy scheduling system is designed in [20] for an autonomous islanded microgrid with PV, a dispatchable generator, and hybrid ESS. The approach in [20] suffers from the fact that it is only applicable to grid-connected MGs where the transmission network acts as a slack node. In [21], a convex EMS is formulated for an islanded MG that optimizes its operating and emission costs. In addition, in [22,23], stochastic scenario-based MPC approaches for the operation of islanded MGs are reported. Furthermore, distributed conditional cooperation model predictive control approaches can be found in [24,25]. For the approaches pursued by [22][23][24][25], all their results rely on the assumption that there are no conversion losses in the storage units.

Statement of Contributions
Thus motivated, we extend the works in [22,23] by including the conversion losses in the dynamics of storage units and in the proposed controller to reduce the prediction error in the storage units. We assume the nominal forecast of load and available renewable infeed in the proposed controller, while the uncertain RES and load are considered in the MG model. The closed-loop setup of the proposed certainty equivalence MPC scheme for the operation of an islanded MG is shown in Figure 1. In brief, the contributions of this work are as follows: (i) We derive the model of an islanded MG with uncertain renewable generation and loads with a very high share of RES. This model, motivated by [22], considers a possible limitation of renewable infeed, while limitations on transmission lines are approximately accounted for using DC power flow approximations. (ii) We model storage devices as grid-forming units, and, to make the MG model more realistic, we consider the conversion losses of the storage units, the losses of the power electronic devices when converting Alternating Current (AC) to Direct Current (DC) (and vice versa), as well as ohmic losses in the batteries as the quadratic functions in the dynamics of storage units. (iii) We take into account power-sharing with the active conventional units. Therefore, the load fluctuations and renewable units influence all units' power and the storage units' state of charge. In this way, the model can also work where only RES and storage units are active, and no conventional unit is required. (iv) We propose a novel MPC approach for the optimal operation of an islanded MG with a very high share of renewable energy sources. To solve the optimization problem and mitigate the effect of errors in the storage units' state of charge prediction, we reformulate the conversion loss functions as the mixed-integer linear inequality functions and include them in the proposed scheme. (v) We confirm the properties of the proposed operation control scheme via realistic simulations with a high renewable share.

Paper Organization
This paper is organized as follows. In Section 2, we introduce the model of an islanded MG. Then, we formulate the certainty equivalence MPC problem in Section 3. In Section 4, we introduce the operating costs of the MG. In Section 5, we demonstrate the effectiveness of the resulting MPC in a numerical case study. Lastly, in Section 6, we provide the concluding remarks and possible directions for future research.

Mathematical Notation
The sets of complex, real, strictly positive, and negative real numbers are denoted by C, R, R <0 , and R >0 , respectively. Moreover, the set of non-positive real numbers is R ≤0 and the set of positive real numbers including 0 is R ≥0 . The set of natural numbers is N, and the set of non-negative integers is N 0 . Furthermore, the set of Boolean numbers is B = {0, 1}. For d ∈ N and a column vector of x ∈ R d , let x be its transpose. Given a matrix A, its transpose is denoted by A , while its hermitian (complex conjugate) transpose is A H . The matrix A is also non-negative (psd), denoted by A 0, if A is Hermitian and z H Az 0 for all z ∈ C n . Given a complex number z, its real part is denoted by Re(z), while the imaginary part of a complex number z is denoted by Im(z). Additionally, given a scalar a, its absolute value is defined by |a|. Finally, I n denotes the n-dimensional identity matrix, and by 1 n and 0 n , respectively, all 1 and all 0 n-dimensional column vectors are represented.

Microgrid Model
We consider an MG that includes a grouping of conventional generators, renewable energy storage units, and loads connected by transmission lines. Figure 2 depicts a basic MG consisting of all these components. The electrical connection among units and loads due to power lines can be modeled by a di-graph G e N (V, E e ), where V = {1, . . . , N} represents the set of agents and E e ⊆ {V × V } is the set of edges (transmission lines) between two distinct agents. In this manuscript, we consider that the set of agents includes four subsets V T , V S , V R , and V L , wherein these letters denote, respectively, the sets of conventional, energy storage, renewable units, and loads. We also denote by Y ij = G ik + ı · B ij ∈ C the admittance line between the i-th agent and j-th agent, wherein G ij and B ij show the line conductance and susceptance between the i-th agent and j-th agent. If no connection between the i-th agent and j-th agent exists, G ij = B ij = 0.

Conventional Generator
Load With the variables summarized in Table 1, the behavior of the MG is modeled by: In fact, this vector is inclusive of entries x i (k) that represent the stored energy of unit i ∈ N [1,S] .q(k) ∈ R Q is referred to as a vector of Q ∈ N auxiliary variables. F(k) is a vector of S ∈ N in which each of its elements represent the function of the conversion losses. v(k) = [u(k) δ t (k) ] is also the vector of control inputs, wherein u(k) ∈ R U is denoted as the vector of the real-valued control inputs of all U ∈ N units and δ t (k) ∈ {0, 1} T is defined to be the vector of T ∈ N Boolean inputs. The uncertain external input is also collected in the vector w(k) = [w r (k) w t (k) ] , where w r (k) is the maximum infeed under weather conditions of all renewable units and w t (k) includes all loads, W ∈ N. Let B ∈ R S×Q in (1a) and H 1 , h 1 in (1b) be appropriate dimensions. Furthermore, we consider in (1c), H 2 and h 2 , respectively, as a matrix and a vector of appropriate dimensions that reflect inequality constraints. Likewise, in (1d), G is a matrix and g a vector of appropriate dimensions that reflect equality constraints. In more detail, the real-valued control inputs are the power setpoints of the units ≥0 is related to the conventional units, u s (k) ∈ R S to the storage units, and u r (k) ∈ R R ≥0 to the renewable units, such as wind turbines and PV power plants. Regarding the storage and conventional generators, u s (k) and u t (k) represent desired power values. For RES, u r (k) represents an upper limit on the weather-dependent power infeed. Hence, u r (k) is their maximum admissible value. Vector of all auxiliary variables -Q Furthermore, for each conventional generator, a Boolean control input δ t,i (k) ∈ {0, 1} is considered. This input shows whether generator i ∈ N [1,T] is active (δ t,i (k) = 1) or inactive (δ t,i (k) = 0). The Boolean variables of all conventional generators are gathered in the vector δ t .
In what follows, we will derive a control-oriented MG model of the form (1). We start by posing some assumptions. Assumption 1 (Lower control layers). The lower control layers, i.e., primary and secondary control, are considered to compensate for the frequency and voltage deviations by providing setpoints to the units, as well as establishing the power-sharing (see, e.g., [6,26,27]) among the grid-forming units. Notice that the MG can run autonomously in these layers for several minutes.

Assumption 2 (Conventional units).
In terms of time, conventional units have shorter start-up and shutdown times than the sampling time of (MPC), meaning that switching actions are supposed to be instantaneous. Furthermore, changes in power are instantaneous, i.e., no climb rates need to be considered.

Assumption 3 (RES units and loads).
It is assumed that the uncertain input follows the nominal forecast of load and available renewable infeed.

Assumption 4 (Transmission lines).
It is assumed that the resistance of the electrical coupling among units and loads of MG as well as reactive power flow is negligible. Since the voltage amplitudes in the network are constant, and the phase angle differences small, the DC power flow approximations [28] can be employed.

Plant Model Interface
The power setpoints of the units u(k) = [u t (k) u s (k) u r (k) ] ∈ R U , called the realvalued manipulated variables containing u t (k) ∈ R T ≥0 as setpoints of the T conventional units, u s (k) ∈ R S the setpoints of the S storage units and u r (k) ∈ R R ≥0 the setpoints of the R (RES). To show that conventional units are enabled or disabled, we consider a Boolean input for each conventional unit and we collect all Boolean inputs in a vector δ t (k) ∈ {0, 1} T . Moreover, the stored energies of the storage units are gathered in the state vector x(k) ∈ R S ≥0 . The uncertain external input of the model is expressed by shows the maximum available power of the renewable units under given weather conditions and w d (k) ∈ R D ≥0 the load.

Power of Units
We consider p(k) = [p t (k) p s (k) p r (k) ] as the vector of power values, which consists of the power of conventional units, p t (k) ∈ R T ≥0 , storage units, p s ∈ R S , and RES, It is worth noting that, in islanded mode, since production, consumption, and storage power must be balanced in the presence of uncertain load and renewable infeed, the power of the units p(k) ∈ R U is not necessarily equal to the setpoints u(k).

Active Power at RES Units
Let the active power of renewable units, p r (k), as well as the corresponding setpoints, u r (k), be bounded by: Furthermore, we consider that the power infeed p r,i (k) ∈ R ≥0 of any renewable unit i ∈ N [1,R] can be constrained by the power setpoint u r,i (k) ∈ R ≥0 . Notice that the power tracks the setpoint when the maximum possible infeed under current weather conditions w r,i (k) ∈ R ≥0 is greater than or equal to u r,i (k). This can be characterized by using the element-wise min operator as follows: To solve the optimization problem, the authors in [22] reformulated (3) to a set of linear inequalities including integer variables as follows: where δ r (k) ∈ {0, 1} R represents the free variable and m r ∈ R, m r < min(p min r ) and M r ∈ R ≥0 , M r > max(p max r ) are the constant coefficients, which are computed offline.

Active Power at Conventional Units
We consider whether the conventional unit i ∈ N [1,T] is enabled, i.e., if δ t,i (k) = 1, then its active power is bounded by p min t,i ∈ R ≥0 and p max t,i ∈ R ≥0 . If the unit is disabled, i.e., δ t,i (k) = 0, then, naturally, p t,i (k) = 0. The active power of conventional units with p min t ∈ R T ≥0 , p max t ∈ R T ≥0 can be written in vector form as [22]: The same holds for the active power setpoints, i.e., diag p min

Active Power at Storage Units
Since we assume that all storage units are always enabled, all their active power setpoints and active power values are bounded as: where p min s ∈ R S ≤0 and p max s ∈ R S ≥0 represent the known lower and upper power limits.

Power Sharing of Grid-Forming Units
Note that the power of all units does not necessarily equal the power setpoints that are assigned to the system due to variations in load and renewable infeed. Therefore, we assume that the secondary and primary control layers control all units to share the changes in load and renewable infeed in a desired proportional manner. The aforementioned socalled proportional power-sharing (see, e.g., [27,29]) depends on the design parameter χ i ∈ R >0 for all grid-forming units. A practical option for χ i is, e.g., proportional to the nominal power of the corresponding units.
Power sharing can be described by (7), where two units i ∈ N [1,T+S] and j ∈ N [1,T+S] , i = j share their active power proportionally according to χ i ∈ R >0 and χ j ∈ R >0 , if the next relation holds: By using a new auxiliary free variable ρ(k) ∈ R and considering that only enabled units, namely units i with δ t,i (k) = 1, can participate in power-sharing, (7) can be recast for all grid-forming units with as [22]: For the formulation of the optimisation problem, ref. [22] transforms (8a) into the following set of linear inequalities with integer variables: where M t ∈ R can be calculated offline and its value should be greater than the largest possible value of ρ(k). Hence, with the largest possible value for the storage units,

Dynamics of Storage Units
The dynamics of all storage units can be formulated as: where T s ∈ R >0 is the sampling time and x(k) represents the stored energy with initial state x(0) = x 0 . The constraint of the stored energy is given by: with x min = 0 S and x max ∈ R S ≥0 . In particular, F p s (k) = [ f 1 p s,1 (k) , . . . , f S p s,S (k) ] is a vector of S ∈ N, where each of its elements represents the conversion loss terms, including the conversion losses of the storage units, the losses of the power electronic devices when converting AC to DC (and vice versa), as well as ohmic losses in the batteries, considered to be a convex quadratic function as follows: where p s,i (k) is assumed to be limited as: Note that the polynomial function, f i p s,i (k) , is an example and it could be replaced by some other complex functions for different storage technology. Moreover, the coefficients are found offline by looking at the storage units and analyzing measurements.
To solve the optimization problem, it is useful to reformulate the function f p s,i (k) as piecewise affine functions (see, e.g., [30]), i.e., in which A y,i , B y,i ∈ R and the following holds: and, on the borders of sequential D y , the linear segments are connected, which means that f i p s,i (k) is continuous. The condition p s,i (k) at each partition D y,i can be associated with a binary variable δ y,i (k) ∈ {0, 1}, ∀y = 1, 2, . . . , r, satisfying the exclusive-or condition: such that: From (16), there exists some δ y,i (k) = 1, which implies p s,i (k) ∈ D y,i , a contradiction by (15b). Therefore, (15)-(17) are equivalent to: with J y,i = 1 −1 for y = {1, . . . , r} and i = {1, . . . , S}, and H y,i represents a vector of 2, where the first row of H y,i is equal to the lower bound of the D y,i with a minus sign, while its second row is the upper bound. M i in (18a) can be computed as: By using this binary variable, we can recast (14) as follows (see, e.g., [30]): Therefore, (20) can be rewritten as: Unfortunately, (21) is nonlinear since it involves products between logical variables and inputs. Therefore, we transform it into equivalent mixed-integer linear inequalities. This can be done using a similar strategy as proposed in [30]. To this aim, we set: Then, (22b) is equivalent to: being Remark 1. Notice that, in [22], the dynamics of all storage units are considered without piecewise affine losses terms, namely,

Transmission Network
Following [24], the DC power flow approximations can be employed to extract the power of transmission lines, p e (k) = [p e,1 (k) . . . p e,E (k)] . Hence, the power on lines can be formulated from the power of units and load using the following linear equation: where F ∈ R E×(U+D) represents a matrix that links the power flowing over the lines with the power produced or consumed by the units and loads. More details about the derivation of F are provided in [31]. It is assumed that p e (k) is bounded by: with p min e ∈ R E ≤0 and p max e ∈ R E ≥0 . This assumption is reasonable due to the physical limitation in the transmission capability of the lines. Moreover, the produced power must be equal to the consumed power at all times [24], e.g.,

Overall Model
In accordance with the equations considered for the different parts of an islanded MG, the overall model can be formulated as follows. The constraints on power and setpoint originate from (2), (5) and (6), namely, By referring to (10), the dynamics of the storage unit are described by: with constraint functions The renewable infeed, which is a function of the setpoint and the available power under weather conditions, is given by (4) as: Power-sharing of the grid-forming units is described by (8), which, using (9), can be recast into: Lastly, the power limit of the transmission lines is introduced by (28), i.e., Now, let us compute a compact form of (29). From (29c) and by denotingq(k) = [p(k) δ r (k) ρ(k)] and B = [0 S×T I S 0 S×2R+1 ], we can obtain Equation (1a), namely, By following (29d), we have with Finally, according to (29a) and (29b) and (29n)-(29p), the next equations can be yielded as where H 2 and h 2 in (1c) are formed such that they reflect (2), (4)-(6), (9) and (28b). Additionally, G and g in (1d) are formed such that they reflect (8b), (28a) and (28).This completes the introduction of the control-oriented MG model. The control scheme of the certainty equivalence MPC under the conversion loss functions is shown in Figure 3. Based on this section, we will now formulate a cost function for an islanded MG with a high renewable share.

Operating Costs
Motivated by [22], here, we extract an operating cost function for the MG. It consists of two parts. The first part is marked by o (v(k − 1), v(k),q(k + 1)) ∈ R ≥0 and is economically motivated. The second part is denoted by s (q(k)) ∈ R ≥0 and is related to the desired region of operation of the state of charge and the conversion losses. Thus, the cost function at time instant k, i.e., the stage cost, is: The economically motivated costs comprise (i) the fuel costs of conventional units, rt t (v(k),q(k + 1)) ∈ R ≥0 ; (ii) costs caused by switching conventional units on or off, sw t (v(k − 1), v(k)) ∈ R ≥0 , and (iii) costs incurred by low utilization of renewable sources, r (q(k + 1)) ∈ R ≥0 , i.e., The cost of a conventional generator is generally described by four curves: fuel cost, heat rate, input/output (I/O), and incremental cost. Generator curves are typically represented as cubic or quadratic functions and piecewise linear functions. The conventional power plants use a quadratic fuel cost function such as the Fuel Cost Curve. Thus, by following [22,32], the fuel costs of conventional units are formulated as: with weights c t ∈ R T >0 ,c t ∈ R T >0 , andĉ t ∈ R T >0 . In the islanded MGs with a high share of RES, grid-forming conventional units are usually regarded as backup generators in times of low renewable infeed and empty storage units. Moreover, conventional units are often turned off during periods of high renewable infeed or if the storage units can meet the load demand. Therefore, the decision to enable or disable them should be made by the operation control, taking into account their running costs and the cost associated with enabling or disabling them. Enabling or disabling a conventional generator entails costs. Hence, it is desirable to enable or disable conventional generators as little as possible. The switching cost of a conventional generator can be described by considering that it was disabled at the time instant k − 1 and is enabled at time instant k, or was enabled at time instant k − 1 and is disabled at time instant k, i.e, with weight c sw t ∈ R T >0 . Renewable sources, such as PV power plants or WTs, are usually associated with a very high initial investment and small operation costs after installation. Hence, RES heirs wish to keep the units' infeed as high as possible under given weather conditions. Restricting a renewable unit can be considered a financial loss as the available infeed is not sold to customers. Thus, the renewable unit costs can be adjusted by considering a penalty for using less than the maximal power p max r , i.e., r (v(k),q(k + 1)) = (p max r − p r (k + 1)) diag(ĉ r )(p max r − p r (k + 1)) +c r u r (k) with weightc r ∈ R R >0 ,ĉ r ∈ R R >0 . Note that u r (k) is added to ensure that the setpoint does not exceed the maximum available power w r (k + 1).
Very large or very low values of the state of charge, x(k), can increase the ageing mechanism in storage units [33]. Hence, it is useful to keep the state of charge within a specific desired interval [x min ,x max ]. It should be pointed out that the desired interval, [x min ,x max ], depends on the battery technology. In addition, storing energy usually causes conversion losses. Thus, the cost of storage units is modeled by:

Remark 2.
It should be noted that if Assumption 1 is not fulfilled, then we cannot have the optimal operation control. In general, we have to be sure that the lower control layers (primary and secondary layers) perform well; otherwise, it does not make sense to have optimal economic operation. Moreover, if Assumption 3 is not met, the charge's state may differ from what we expect. Thus, in this case, we need to use complex models of uncertain inputs, e.g., scenario trees (see [22]), to forecast load and renewable units. However, the main scope of this paper is to show a realistic model of the storage units considering the conversion losses.

Case Study
In this section, we intend to verify the properties of the certainty equivalence model predictive control strategy proposed in Section 3. The microgrid structure depicted in Figure 2 is used for the simulations. It consists of a storage component and a conventional and renewable unit. The detailed parameters of the microgrid are summarized in Table 2. a quadratic function as f 1 p s,1 (k) = 0.09p s,1 (k) 2 + 0.01. Moreover, we reformulate the function f 1 p s,1 (k) as the following linear cases: In accordance with Equations (25a), (25b) and (38), we chose M i = 0.1 and m i = −0.17. We formulated the MPC problems in MATLAB using the YALMIP toolbox and solved them numerically with Gurobi. Here, we first compare the prediction error of the state of charge in the cases considering the dynamic storage with piecewise affine loss model (10)- (25) and the dynamic storage without piecewise affine loss model (26)-(29d) in the MPC problem. We formulated this error as e(k) = x(k) −x(k), wherein x(k) is the actual state of charge of the nonlinear loss model given the same power values, whereasx(k) is the forecast of the state of charge. An analysis was carried out for both cases to compare the two cases. In the analysis, closed-loop simulations were performed over 366 simulation steps. For each simulation step, the state of charge prediction of the controllers (over 12 prediction steps) was compared to a prediction performed with the nonlinear plant model for the same storage power values. Then, at each prediction step, the probability distribution of the prediction errors was visualized in the form of box plots (see Figure 4). The circle of each box marks the median value of prediction errors of 336 data points in each prediction step. The box around the median values contains all data from the 25th to the 75th percentile. The downwards dash of each box represents the lowest occurring value of prediction error in each step, whereas the upwards dash marks the highest occurring value. It can be seen in Figure 4 that, including the conversion losses in the proposed model predictive controller, the prediction error is reduced. For example, at N = 1, when the conversion loss model is not employed in the controller, the median value is 5 × 10 −3 . By adding the conversion loss model in the controller, this value is decreased 3 times to 1.5 × 10 −3 . It is worth noting that this ratio increases as the prediction horizon rises. As can be observed from the last step of Figure 4, the median value of the error is equal to 9 × 10 −2 when the conversion loss model is not included in the controller, whereas this value is reduced to 2 × 10 −2 when the conversion loss model is added to MPC problem formulation. Therefore, the obtained results from Figure 4 illustrate that when we consider the dynamic storage with piecewise affine loss functions in the MPC problem, the actual state of charge x(k) with much less error can be predicted by the controller.
The closed-loop simulation results of the power of units and load, as well as the stored energy and line power of the MG, are depicted in Figure 5. It can be noted that, at the beginning of the period, since the available power of the renewable unit is low, the storage unit is discharging. When the battery is empty, the conventional generator is enabled to provide power to the load. As soon as the available power of the renewable unit is sufficient to provide power to the load, the conventional unit is disabled, and the storage unit is charged. When the stored energy reaches the upper end of the desired state of charge, the setpoint of the wind turbine is set such that the wind power only covers the load. Thus, the stored energy approximately remains at x max = 6.5 pu h. At some point, the available renewable unit power cannot entirely cover the load, and the storage is discharged. When the renewable unit reaches the minimum value x min = 0.5 pu h. and the storage unit is totally discharged, the conventional unit is activated again to provide power to the load. At the end of the simulation, the available power of the renewable unit increases again such that the storage unit can be charged with the available renewable unit power. These results indicate that the conventional units can be enabled and disabled during the simulation. Thus, the model is also able to work when RES and storage units are enabled. However, if the storage unit is discharged and the available power of the renewable unit is low, the conventional unit is repeatedly enabled to provide power to the loads and charge the storage units. Then, after increasing the available power of the renewable unit, the conventional unit is turned off. Hence, it results that by choosing this proposed operation control strategy, the share of power from RES can be significantly increased. Finally, it is clear from Figure 5 that the line power in the lower plot was within the given bounds of ±1.3 pu at all times.

Conclusions
In this work, we designed a novel certainty model predictive control approach for the operation of an islanded MG with a very high share of renewable energy sources. To this aim, a mathematical model of an islanded MG was derived by considering the conversion losses as quadratic functions to realistically model the scenario. In the model, we included (i) grid-forming storage units; (ii) renewable energy sources, where the power infeed can be limited, e.g., if storage units are fully charged; and (iii) conventional generators that can be disabled, e.g., in times of high available renewable infeed. Moreover, the model allowed us to approximately include the power flow over the transmission lines and a limitation thereof, as well as power-sharing of grid-forming units. In order to reduce the state of charge prediction error, we reformulated the conversion losses of storage units as piecewise affine functions and included them in the proposed controller. The obtained results confirmed that when considering the piecewise affine conversion loss functions in the proposed MPC, the prediction error of the state of charge decreased. Moreover, it is shown that the proposed scheme leads to a very high share of renewable energy sources in closed-loop simulations. Future works will investigate AC optimal power flow (OPF) problems, which are more realistic than the widely used linearized DC power flow approximations. To solve the AC OPF problems, we intend to employ a convex relaxation of the original problem, which leads to a second-order cone program (SOCP) that can be solved by available commercial software.