Adaptively Constrained Stochastic Model Predictive Control for the Optimal Dispatch of Microgrid

In this paper, an adaptively constrained stochastic model predictive control (MPC) is proposed to achieve less-conservative coordination between energy storage units and uncertain renewable energy sources (RESs) in a microgrid (MG). Besides the economic objective of MG operation, the limits of state-of-charge (SOC) and discharging/charging power of the energy storage unit are formulated as chance constraints when accommodating uncertainties of RESs, considering mild violations of these constraints are allowed during long-term operation, and a closed-loop online update strategy is performed to adaptively tighten or relax constraints according to the actual deviation probability of violation level from the desired one as well as the current change rate of deviation probability. Numerical studies show that the proposed adaptively constrained stochastic MPC for MG optimal operation is much less conservative compared with the scenario optimization based robust MPC, and also presents a better convergence performance to the desired constraint violation level than other online update strategies.


Introduction
Nowadays, fossil fuel shortage and air pollution are among the top concerns of economic and social development worldwide.To achieve the objectives of energy saving and emissions reduction, many countries around the world are making great efforts in deploying clean renewable energy sources (RESs) extensively [1,2].However, a proliferation of RESs, such as photovoltaic panels (PVs) and wind turbines (WTs), brings significant challenges due to their inherent intermittent nature.Fortunately, microgrid (MG) is emerging as a new concept of operation in distribution systems, which is required to present as a single, self-controlled entity to the surrounding distribution grid [3,4].In China, based on the forecasts of electricity demands and RESs' power outputs, the power exchange between MG and the connected distribution grid is optimized in advance considering certain economic objectives and is expected to remain unchanged in real-time operation in spite of random variations of RESs and electric loads, by properly controlling energy storage units in the MG [3,4].
On the other hand, the operation limits of energy storage units, such as the maximum and minimum state-of-charge (SOC) and charging/discharging power suggested by manufacturers, are usually considered in designing the MG's optimal operation, for avoiding potential over-charged/ discharged and over-rapid charged/discharged situations [5,6].However, in order to prolong the lifetime of the energy storage unit, its SOC and discharging/charging power limits suggested by manufacturers could be conservative, whereas during the long-term operational lifetime, a slight violation of these constraints might be granted.That is, permitting a given small probability for Energies 2018, 11, 243 2 of 17 constraint violation could be reasonable and can also increase the utilization of the energy storage unit, leading to a more economical capacity investment.Consequently, as energy production of volatile PVs and WTs can only be forecasted with uncertainty due to their heavy dependence on weather conditions, while future electricity loads also might integrate stochastic components such as electric vehicles, stochastically coordinating energy storage unit, RESs, and electric loads with less conservativeness with respect to chance-constraints is challenging and imperative to be solved in optimal dispatch of MGs [7,8].
Recently, model predictive control (MPC) has drawn significant attention in the power system community [9][10][11][12][13].Specifically, research works have shown advantages of applying MPC to optimal economic dispatch of MG [6,8,[14][15][16][17][18][19][20][21][22][23].A hierarchical stochastic MPC was discussed in [6] for coordinating electric vehicles and wind power in a MG, in which the chance constraints of the electrical vehicles are converted to its deterministic counterpart and directly incorporated into the MPC framework.A MPC-based two-layer control scheme with respect to two timescales was proposed in [8] for the optimal energy management of MG, in which the high-level off-line economic optimization is combined with a low-level online stochastic MPC.Energy management of an isolated MG was formulated via an MPC approach and iteratively solved by a multi-stage mixed integer linear programming (MILP) in [14].A MPC approach to the MG operation optimization was proposed [15] while satisfying a time-varying request and operation constraints, in which the predictions for RESs generations and electricity demands were assumed perfect.A MPC controller for the optimal load sharing of a MG in a real operational scenario was presented in [16], in which the penalties were implemented on battery constraints violations.A real-time economic MPC model for a subsequent control with respect to the day-ahead scheduling results was proposed in [17], in which the uncertainties of solar power and residual load were represented by scenarios.An optimal distributed MPC strategy to coordinate energy management among MGs was developed in [18,19], in which the cooperation among heterogeneous MGs was focused on.The mathematical formulation and control architecture of a stochastic MPC-based energy management system for isolated MG was proposed, in which the generated scenarios were used to represent the uncertainties of wind power [20].An accelerated MPC for MG energy management was developed in [21], in which scenario trees were generated for RES outputs and electricity prices, and a worst-case scenario was generated for EV charging prediction.A chance-constrained MPC based controller for optimizing economic dispatch under uncertain demands in a MG was developed in [22], where the uncertainty of the forecasted demand was represented by a random variable and its cumulative distribution was assumed to be known.In an islanded MG a deterministic MPC strategy was proposed for the efficient resource management [23].
In the existing research on MPC-based MG dispatch, some works focused on the deterministic MPC with the uncertainties neglected [14][15][16]18,19,23].Yet, the deterministic MPC formulation is incapable of systematically dealing with the uncertainties of RESs and electricity demands that are ubiquitous in MGs and the inherent uncertainties can lead to the degradation of the performance of dispatch algorithm.In other works [17,20,21], the stochastic MPC-based dispatch optimization was investigated, in which the chance constraints were not considered and the uncertainties of RESs generation and electricity demand were represented by scenarios, but how to determine the suitable number of scenarios was not discussed.However, in the works [6,8,22], the chance-constrained stochastic MPC for MG economic dispatch was developed, and in order to solve the chance constraints, the uncertainties of the forecasted RESs generation and electricity demand were assumed to be governed by Gaussian distribution or be able to be transformed to Gaussian process; furthermore, less conservativeness with respect to chance constraints was not discussed.Obviously, the restriction on special probabilistic distributions might not hold for practical applications.Consequently, although in existing research on MPC-based MG dispatch, chance constraints have been considered to handle uncertainties of RESs and electricity demands, effective and less-conservative coordination between energy storage unit and uncertain RESs is still limited.
The chance-constrained MPC technique, adaptively constrained stochastic MPC in particular, has been studied as a recent active research direction and applied in building climate control and security constrained optimal power flow problems [24,25].Motivated by the existing research, in this paper, an adaptively constrained stochastic MPC approach is explored to determine the optimal coordination of energy storage unit and uncertain RESs/electric loads in MGs, while mitigating the conservativeness issue.Specifically, besides pursuing the economic objective of MG operation, SOC and discharging/charging power limits of energy storage unit are formulated as chance constraints to effectively accommodate uncertainties of RESs and electric loads.In addition, a closed-loop online adaption strategy is performed to the constraint formulation in order to adaptively drive the chance constraint to be satisfied at the lower boundary, in which a novel update strategy is proposed by considering not only the deviation of the actual violation level from the desired one, but also the change rate of violation frequency at the current time step.Case studies on a test MG case illustrate that the proposed MG dispatch method shows less conservativeness compared with the robust MPC via scenarios optimization [26], and presents a better convergence performance to the desired constraint violation level than other online adaption strategies [25].
The main contributions of this work are described as follows: (1) An adaptively constrained stochastic MPC approach is proposed to coordinate the energy storage unit and uncertain RESs/electric loads in MGs, in which there is no any requirement for a priori information about the probability distribution of the uncertainties.(2) A novel online adaption strategy is developed, in which the current change rate of constraint violation frequency is considered in order to improve the dynamic performance of the MG dispatch method.(3) In cases of uncertain RESs generation and electricity load, the proposed adaptively constrained stochastic MPC method can improve the dispatch performance compared with the scenarios-based robust MPC and adaptively constrained stochastic MPC with other adaption strategies.
The remainder of this paper is organized as follows.Section 2 describes the modeling of adaptively constrained stochastic MPC for MG dispatch.In Section 3 the solving of adaptively constrained stochastic MPC for MG dispatch is illustrated.Simulation results and discussions are given in Section 4, and Section 5 concludes the paper.

Problem Description of the Chance-Constrained MPC in MG Dispatch
This paper focuses on a MG connected with the distribution grid.In the MG, there are the following components: a controllable generator, an energy storage unit, a solar or wind RES, and electricity loads.With the forecasting of electricity demands and power outputs of RES, the MG operator determines the optimal dispatch solution while considering the economic objective and various operational constraints, and then the optimal solution of the electricity exchange between MG and the distribution grid is sent to the distribution grid.The distribution grid makes its own scheduling plans in advance according to the predetermined power exchange.
In most cases, although the discrepancies between the actual and predicted values of electricity loads and power outputs of RESs must exist, it is desirable that the actual exchanged electricity power between MG and distribution grid stays identical to the scheduled one by properly controlling the energy storage unit.When operating the energy storage unit, the following chance constraint is usually considered Pr P s−min ≤ P s (t) ≤ P s−max and where Pr[F] describes the probability that event F occurs, and α ∈ [0, the least conservativeness can be achieved.
Chance-constrained stochastic MPC can be used to solve the above-described problem.MPC is based on an iterative, finite-horizon optimization of the controlled model.By iteratively optimizing the dispatch of MGs over a predefined finite-horizon in a rolling basis, the performance of the MPC controller is much better than other traditional control methods, especially in an uncertain environment.Specifically, in MPC, at each time step, the optimal dispatch problem over a certain pre-defined horizon is solved, using the current status of the system as the initial state.The optimization calculates a future control sequence for the entire finite horizon that optimizes a given performance index with respect to operational constraints, while only the derived control action for the next time step is applied to the MG.At the next time step, the time horizon is shifted forward and the procedure is repeated using the new actual system status as the initial state [27,28].For the stochastic MPC approach considering the chance constraint, usually three tractable approximations for chance constraint are applied: (a) performing analytic reformulations or approximations by imposing the assumption that the uncertainty follows a special probabilistic distribution; (b) performing the robust optimization resulted from assuming artificial bounds of uncertainty and using Chernoff bounds on tails to get a probabilistic guarantee; (c) adopting scenarios-based approach and solving a determinative optimization problem with heavy computational consumption resulting from a prohibitive number of samples.Still, there exists one remaining common drawback of all the above three approaches, that is, they only can guarantee the chance constraint is achieved, but cannot guarantee the least-conservativeness.Consequently, the three approximation methods usually can lead to over-satisfaction for the desired violation level, and in turn an unnecessary loss in performance for many practical applications [24,25].

Mathematical Formulation of Adaptively Constrained Stochastic MPC for MG Dispatch
The objective of the optimal dispatch of MG at a time instant t is to minimize the total operation cost, that is, the cost of running the controllable generator and cost of purchasing electricity energy from the connected distribution grid, over a predefined prediction time horizon as follows: where T denotes the length of the predefined prediction time horizon, i is the index of time step in the predefined prediction time horizon with i = 0 being the current time step, P con ( t + i|t) is the i-step-ahead power dispatch of the controllable generator in MG and c con is its operation cost coefficient, P Grid ( t + i|t) is the i-step-ahead electric power exchange between MG and the connected distribution grid, and c Grid ( t + i|t) is the i-step-ahead predicted price for the electricity energy exchange.As for the value of the time step, it can be determined according to the time-resolution and time-ahead of RESs forecasts.
During the considered prediction time horizon, electricity supply and demand balance of the MG is described as follows: where P RES (t + i|t ) and P L (t + i|t ) are i-step-ahead predictions of RES's power output and electricity demand, P s ( t + i|t) is i-step-ahead scheduled charging (i.e., P s ( t + i|t) > 0) or discharging (i.e., P s ( t + i|t) < 0) power of the energy storage unit.
Energies 2018, 11, 243 5 of 17 Ramping down and up constraints for the controllable generator and the electric power exchange with the distribution grid are usually imposed as In addition, upper and lower limits for P Grid ( t + i|t) and P con ( t + i|t) are described as In order to formulate the adaptively constrained stochastic MPC as a MILP problem, two binary variables I ch and I disch and two continuous variables X ch and X disch are introduced for describing the SOC and charging/discharging power of energy storage unit.That is, during the predefined prediction time horizon i = 1, • • • , T, the energy storage unit is modeled as The following inequality constraints ( 13)-( 16) are imposed to reformulate the chance constraint ( 1), aiming at achieving a better convergence of actual constraint violation of the energy storage unit to the desired level α In constraints ( 13)-( 16), the parameters h t,j (j = 1, • • • , 4) are time-dependent values, which serve to tighten or relax the constraints and in turn make the chance constraint satisfied with the least conservativeness.In addition, SOC and power output of energy storage are also constrained by their upper and lower physical limits SOC, SOC, P s and P s .Consequently, the constraints ( 13)-( 16) are further modified as follows: In summary, the objective (2) and the constraints (3)-( 12), ( 17)-( 20) constitute the constrained stochastic MPC optimization model, which is formulated as a MILP problem.
In order to determine the parameters h t,j (j = 1, • • • , 4), a novel online adaptive update strategy is proposed and illustrated as follows.The main idea is that with the closed-loop feedback of the current constraint violation probability, the parameters h t,j are adaptively tuned to make the probability of constraint violation as close to the target as possible in both dynamic and static states.Considering that the probability of constraint violation can be interpreted as the frequency of such violation in a specific long time horizon, it makes sense to examine the actual constraint violation frequency of energy storage unit at each time instant during the implementation of MPC.
Consequently, only if the considered time horizon is long enough, the actual probability of constraint violation until the time t can be calculated via (21). where indicates the actual constraint violation status at time i.
The adaptive update rule for tightening or relaxing parameter h t,j in ( 17)-( 20) is given by From ( 22), it can be seen that the constraints ( 17)-( 20) can be adaptively tightened or relaxed via a closed-loop online fashion, according to the deviations of the actual constraint violation from the desired one as well as the current change rate of constraint violation frequency, respectively represented by the second and third items on the right side of (22).The close-loop updating mechanism with respect to the constraint violation is depicted in Figure 1.Specifically, in comparison with the update rule proposed in [25], the change rate of the constraint violation frequency is added in order to achieve a better convergence performance with the reduced overshoot and oscillation, the introduction of which is inspired by the functionality of derivative control in the traditional proportional-integral-derivative (PID) control method.From (22) it can be observed that, with the second item on the right-hand side if α is larger (smaller) than Y(t), h t,j is decreasing (increasing), that is, the constraints ( 17)-( 20) are relaxed (tightened) and hence the constraint violation probability is increased (reduced); with the third item on the right-hand side, if the discrepancy between the actual constraint violation and the desired one increases, h t,j is growing and the constraints ( 17)-( 20) are tightened, and if the discrepancy varies little, the third item almost equals zero.Consequently, adding the third term on the right side of ( 22) can improve the dynamic performance of constraint violation.
Energies 2018, 11, 243 6 of 17 specific long time horizon, it makes sense to examine the actual constraint violation frequency of energy storage unit at each time instant during the implementation of MPC.Consequently, only if the considered time horizon is long enough, the actual probability of constraint violation until the time t can be calculated via (21).
where       s min s s max min max 0, 1, indicates the actual constraint violation status at time i.
The adaptive update rule for tightening or relaxing parameter , t j h in ( 17)-( 20) is given by From ( 22), it can be seen that the constraints ( 17)-( 20) can be adaptively tightened or relaxed via a closed-loop online fashion, according to the deviations of the actual constraint violation from the desired one as well as the current change rate of constraint violation frequency, respectively represented by the second and third items on the right side of (22).The close-loop updating mechanism with respect to the constraint violation is depicted in Figure 1.Specifically, in comparison with the update rule proposed in [25], the change rate of the constraint violation frequency is added in order to achieve a better convergence performance with the reduced overshoot and oscillation, the introduction of which is inspired by the functionality of derivative control in the traditional proportional-integral-derivative (PID) control method.From (22) it can be observed that, with the second item on the right-hand side if  is larger (smaller) than   Y t , , t j h is decreasing (increasing), that is, the constraints ( 17)-( 20) are relaxed (tightened) and hence the constraint violation probability is increased (reduced); with the third item on the right-hand side, if the discrepancy between the actual constraint violation and the desired one increases, , is growing and the constraints ( 17)-( 20) are tightened, and if the discrepancy varies little, the third item almost equals zero.Consequently, adding the third term on the right side of ( 22) can improve the dynamic performance of constraint violation.

Solving of Adaptively Constrained Stochastic MPC for MG Dispatch
As shown in the above illustration, the proposed adaptively constrained stochastic MPC model for the optimal dispatch of MG is formulated as a MILP problem, in which the parameters h t,j at each time instant need to be determined by (21) and (22).The adaptively constrained stochastic MPC for MG dispatch can be solved via Cplex optimizer.
As the parameters h t,j (j = 1, • • • , 4) are adaptively updated online, the initial values of h 0,j might not be critical for guaranteeing satisfaction on the chance constraints.In the simulation, the following method is applied to initialize the values.A set of scenarios of power outputs of RES and electric loads is generated, denoted as P RES (1) , • • • , P RES (NS) and P L (1) , • • • , P L (NS) , and accordingly the parameters are chosen as Any scenarios generation method can be used since the relaxing or tightening will anyways be implemented.
The procedure of applying the proposed adaptively constrained stochastic MPC algorithm for the optimal dispatch of MG is depicted in Figure 2, and illustrated as follows: Step (1) When t = 0, generate scenarios of electric loads and power outputs of RES over the prediction time horizon T, and initialize the parameters h 0,j (j = 1, • • • , 4).
Step (2) Solve the adaptively constrained stochastic MPC optimization model, i.e., the objective (2) and the constraints (3)-( 12) and ( 17)- (20), with respect to time t via Cplex, and only the dispatch results P Grid ( t + 1|t) and P con ( t + 1|t) for the next time step (t + 1) in control sequence will be implemented.
Step (3) The prediction time horizon is shifted forward (i.e., the time instant moves to t = t + 1), and with the actual values of electricity load and RES power output at time t and the dispatching results derived in Step (2), calculate the actual power output P s (t) of energy storage unit at time t according to the supply and demand balance of the electricity power, and then derive SOC(t) of energy storage unit.

Solving of Adaptively Constrained Stochastic MPC for MG Dispatch
As shown in the above illustration, the proposed adaptively constrained stochastic MPC model for the optimal dispatch of MG is formulated as a MILP problem, in which the parameters , t j h at each time instant need to be determined by (21) and (22).The adaptively constrained stochastic MPC for MG dispatch can be solved via Cplex optimizer.
As the parameters , are adaptively updated online, the initial values of 0 , j h  might not be critical for guaranteeing satisfaction on the chance constraints.In the simulation, the following method is applied to initialize the values.A set of scenarios of power outputs of RES and electric loads is generated, denoted as , and accordingly the parameters are chosen as scenarios generation method can be used since the relaxing or tightening will anyways be implemented.
The procedure of applying the proposed adaptively constrained stochastic MPC algorithm for the optimal dispatch of MG is depicted in Figure 2, and illustrated as follows: Step (1) When t = 0, generate scenarios of electric loads and power outputs of RES over the prediction time horizon T, and initialize the parameters 0, Step (2) Solve the adaptively constrained stochastic MPC optimization model, i.e., the objective (2) and the constraints (3)-( 12) and ( 17)- (20), with respect to time t via Cplex, and only the dispatch results

 
Grid for the next time step (t + 1) in control sequence will be implemented.
Step (3) The prediction time horizon is shifted forward (i.e., the time instant moves to t = t + 1), and with the actual values of electricity load and RES power output at time t and the dispatching Step (5) Go to Step (2) and repeat.

Simulation Results and Discussions
A test MG is used to demonstrate the effectiveness of the proposed adaptively constrained stochastic MPC algorithm for the optimal dispatch of MG.The model parameters are set and listed in Table 1.The effectiveness of the proposed dispatching strategy in achieving less conservative dispatch solutions is demonstrated by two groups of comparison: (1) comparing our proposed method with the scenarios optimization based robust MPC [26]; (2) comparing our proposed adaptive update strategies (called Strategy (a)) respectively with the update strategy h t,j implemented for all time instants [25] (called Strategy (b)) and with the active adaptive update h t−1,j implemented only when the constraint is violated [25] (called Strategy (c)).In addition, the influences of the parameters, such as the prediction time horizon T as well as the update strategy parameters γ 1 and γ 2 , on the dispatching performance are discussed.

Comparison between the Proposed Method and the Robust MPC via Scenarios Optimization
The effectiveness of the proposed dispatching strategy in achieving less conservative dispatch solutions is demonstrated by comparing it with the scenarios optimization-based robust MPC [26].The robust MPC via scenarios optimization is an alternative approach to the chance-constrained optimal dispatch of MG with uncertainties.In the scenarios optimization-based robust MPC approach, it is suggested that a certain number λ ≥ 1 α d + ln 1 ε + 2d ln 1 ε of scenarios are generated to simulate the uncertain electric loads and RES power outputs [26], where d is number of decision variables in the optimization problem (in this case d = 2T) and ε is a confidence level parameter, and the solution of the corresponding scenarios optimization based robust MPC will guarantee the chance constraint (1) to be met with the confidence level of at least (1 − ε).
In the following simulation, the prediction time horizon T = 12 is chosen as an example to show the comparison.In the robust MPC via scenarios optimization approach, ε is chosen as 0.1; and in our proposed method, the parameters γ 1 = 3, γ 2 = 0.1, and α = 0.1 are used.Actual constraint violation probabilities of the two methods are depicted in Figure 3a,b, respectively.It is discovered that the proposed method could effectively converge to the desired constraint violation probability 0.1, whereas the scenarios optimization based MPC method significantly over-satisfies the required constraint violation level with much more conservativeness.The variation of tightening or relaxing parameter h t,1 is shown in Figure 4.It is shown by comparing Figures 3a and 4, the constraint becomes tightened or relaxed adaptively according to the discrepancy between the actual violation and the desired value; for example, during the initial time period from t = 0 to about t = 130, with the violation from 0 increasing to almost 0.1, the constraint is becoming tighter and tighter; and once the violation is larger than 0.1, the constraints tend to become relaxing.For the two methods, the corresponding SOCs and power outputs of energy storage unit are given in Figure 5a,b.As shown in Figure 5a,b, SOC ranges of our proposed method are wider than that of the robust MPC via scenarios optimization, and power outputs of energy storage in our proposed method are much closer to its suggested upper and lower bounds compared with the scenarios optimization based robust MPC.Moreover, for the two models, the maximum and  For the two methods, the corresponding SOCs and power outputs of energy storage unit are given in Figure 5a,b.As shown in Figure 5a,b, SOC ranges of our proposed method are wider than that of the robust MPC via scenarios optimization, and power outputs of energy storage in our proposed method are much closer to its suggested upper and lower bounds compared with the scenarios optimization based robust MPC.Moreover, for the two models, the maximum and For the two methods, the corresponding SOCs and power outputs of energy storage unit are given in Figure 5a,b.As shown in Figure 5a,b, SOC ranges of our proposed method are wider than that of the robust MPC via scenarios optimization, and power outputs of energy storage in our proposed method are much closer to its suggested upper and lower bounds compared with the scenarios optimization based robust MPC.Moreover, for the two models, the maximum and minimum values of SOC and power output, as well as the probabilities of SOC and power output staying between the suggested and physical bounds of energy storage unit, are listed in Table 2, which demonstrates that with our proposed method the energy storage unit can be utilized more efficiently (i.e., approaching to the physical limits more closely) to mitigate the fluctuations of uncertain RES and electric loads.Probability distributions of SOCs for the two dispatching methods are compared in Figure 6.It is obvious that the probability of energy storage unit operating at about SOC = 0.1 for our proposed method is much higher than that for robust MPC via scenarios optimization; moreover, the total probability of energy storage unit operating at over SOC = 0.6 is much larger than that for robust MPC via scenarios optimization.It is well known that a higher utilization of energy storage unit can drive a less extensive capacity investment and reduce investment costs of MG owners.SOC = 0.1 for our proposed method is much higher than that for robust MPC via scenarios optimization; moreover, the total probability of energy storage unit operating at over SOC = 0.6 is much larger than that for robust MPC via scenarios optimization.It is well known that a higher utilization of energy storage unit can drive a less extensive capacity investment and reduce investment costs of MG owners.Moreover, with the different prediction time horizon, the comparison on computational burden between the robust MPC via scenarios optimization and our proposed approach is listed in Table 3.In robust MPC via scenarios optimization approach, due to the required number of generated scenarios aiming at guaranteeing the chance constraint to be met with the confidence level, its computational burden will significantly be aggravated with the increase of prediction time horizon; on the contrary, in our proposed method no significant extra computational time is increased.Moreover, with the different prediction time horizon, the comparison on computational burden between the robust MPC via scenarios optimization and our proposed approach is listed in Table 3.In robust MPC via scenarios optimization approach, due to the required number of generated scenarios aiming at guaranteeing the chance constraint to be met with the confidence level, its computational burden will significantly be aggravated with the increase of prediction time horizon; on the contrary, in our proposed method no significant extra computational time is increased.Table 3.Comparison on computational burden between the proposed method and robust MPC via scenarios optimization.

Methods
The proposed method 0.01 s 0

Comparison among Different Adaptive Constraint Update Strategies
The prediction time horizon T = 12 is taken as an example to compare our proposed adaptive update strategies called Strategy (a) respectively with the update strategy only when the constraint is violated [25] which is called Strategy (c).In the following simulations, the parameter γ 1 in the three strategies is set as 3 and the parameter γ 2 in Strategy (a) is set as 0.1.
Comparison on constraint violation probabilities among Strategies (a), (b) and (c) is shown in Figure 7.As shown in Figure 7, a noticeable discrepancy between the final constraint violation probability and its desired value is observed when the active adaptive update Strategy (c) is implemented.This phenomenon can be explained via the PID control principle.That is, if the update strategy is applied only when the constraint is violated, it means the integral action in PID is not used, which could most likely result in a steady-state error.Moreover, in order to make the comparison between Strategy (a) and Strategy (b) more clearly, their comparisons on transient characteristics are listed in Table 4.The maximum constraint violation of Strategy (b) is larger than that of Strategy (a), and its occurring time instant is also later than that of Strategy (a).In addition, the settling time of Strategy (b) is much longer than that of Strategy (a) if the allowed static error band is chosen as ±5%.
It is discovered from Figure 7 and Table 4, although both our proposed Strategy (a) and Strategy (b) can lead a good convergence of constraint violation probability to the desired value, a better dynamic performance is observed in our proposed adaptive constraint update strategy in terms of a faster damping of oscillation and a less overshoot.The reason is that our proposed strategy considers the change rate of the actual constraint violation probability at the current time step, which is analogous to the derivative action in PID control.It is well understood that the derivative action, also called "anticipatory control", could shorten the settling time and improve system stability by predicting system behavior.Consequently, the proposed adaptive constraint update strategy could improve the dynamic dispatching performance.
when the constraint is violated [25] which is called Strategy (c).In the following simulations, the parameter 1  in the three strategies is set as 3 and the parameter 2  in Strategy (a) is set as 0.1.
Comparison on constraint violation probabilities among Strategies (a), (b) and (c) is shown in Figure 7.As shown in Figure 7, a noticeable discrepancy between the final constraint violation probability and its desired value is observed when the active adaptive update Strategy (c) is implemented.This phenomenon can be explained via the PID control principle.That is, if the update strategy is applied only when the constraint is violated, it means the integral action in PID is not used, which could most likely result in a steady-state error.Moreover, in order to make the comparison between Strategy (a) and Strategy (b) more clearly, their comparisons on transient characteristics are listed in Table 4.The maximum constraint violation of Strategy (b) is larger than that of Strategy (a), and its occurring time instant is also later than that of Strategy (a).In addition, the settling time of Strategy (b) is much longer than that of Strategy (a) if the allowed static error band is chosen as 5%  .
It is discovered from Figure 7 and Table 4, although both our proposed Strategy (a) and Strategy (b) can lead a good convergence of constraint violation probability to the desired value, a better dynamic performance is observed in our proposed adaptive constraint update strategy in terms of a faster damping of oscillation and a less overshoot.The reason is that our proposed strategy considers the change rate of the actual constraint violation probability at the current time step, which is analogous to the derivative action in PID control.It is well understood that the derivative action, also called "anticipatory control", could shorten the settling time and improve system stability by predicting system behavior.Consequently, the proposed adaptive constraint update strategy could improve the dynamic dispatching performance.

Influence of Prediction Horizon on Control Performance
In the proposed adaptively constrained stochastic MPC approach, the prediction time horizon T could influence the performance.As shown in Figure 8, both dynamic and static-state performances are significantly improved with the increase in prediction horizon, because more information about the future is considered in the optimization model.Specifically, the adaptively constrained stochastic MPC with prediction horizon T = 1 tends to present a larger overshoot of about 30% and an obvious oscillation occurring even after 10,000 dispatching periods.When the prediction time horizon T increases to 8 and 12, the amplitudes of overshoot and oscillation are greatly reduced, and a good convergence to the desired constraint violation level is achieved rapidly.As shown in Table 3, although a longer prediction time horizon increases the number of solved variables in the optimization problem, no significant extra calculation time is increased.So, increasing the prediction time horizon T is applicable in order to improve the performance of MG dispatch.

Influence of Prediction Horizon on Control Performance
In the proposed adaptively constrained stochastic MPC approach, the prediction time horizon T could influence the performance.As shown in Figure 8, both dynamic and static-state performances are significantly improved with the increase in prediction horizon, because more information about the future is considered in the optimization model.Specifically, the adaptively constrained stochastic MPC with prediction horizon T = 1 tends to present a larger overshoot of about 30% and an obvious oscillation occurring even after 10,000 dispatching periods.When the prediction time horizon T increases to 8 and 12, the amplitudes of overshoot and oscillation are greatly reduced, and a good convergence to the desired constraint violation level is achieved rapidly.As shown in Table 3, although a longer prediction time horizon increases the number of solved variables in the optimization problem, no significant extra calculation time is increased.So, increasing the prediction time horizon T is applicable in order to improve the performance of MG dispatch.).

Influence of Constraint Update Parameters on Performance
In the adaptive constraint update Equation ( 22), the two parameters 1  and 2  could influence the performance of the proposed adaptively constrained stochastic MPC approach.For the prediction time horizon T = 8 while 1  are chosen as 1, 2, and 3, the performance of the proposed method on the optimal dispatch of MG is shown in Figure 9. Specifically, a smaller 1  could induce a larger overshoot and a more significant oscillation deviating from the desired constraint violation level.With the increase in 1  , the overshoot and oscillation can be effectively mitigated, leading to a faster convergence to the desired constraint violation level.In addition, for the prediction horizon T = 8, Figure 10 compares the MG dispatch performance with the different 2  of 0.02, 0.1, and 0.5.As shown in Figure 10, the performance in dynamic state is greatly improved with the decrease in 2  .

Influence of Constraint Update Parameters on Performance
In the adaptive constraint update Equation ( 22), the two parameters γ 1 and γ 2 could influence the performance of the proposed adaptively constrained stochastic MPC approach.For the prediction time horizon T = 8 while γ 1 are chosen as 1, 2, and 3, the performance of the proposed method on the optimal dispatch of MG is shown in Figure 9. Specifically, a smaller γ 1 could induce a larger overshoot and a more significant oscillation deviating from the desired constraint violation level.With the increase in γ 1 , the overshoot and oscillation can be effectively mitigated, leading to a faster convergence to the desired constraint violation level.In addition, for the prediction horizon T = 8, Figure 10 compares the MG dispatch performance with the different γ 2 of 0.02, 0.1, and 0.5.As shown in Figure 10, the performance in dynamic state is greatly improved with the decrease in γ 2 .

Conclusions
In MG, the energy storage unit could mitigate the fluctuations of uncertain RESs and electric loads, which could help representing MG as a single, self-controlled entity to the surrounding distribution grid.With the ever increasing deployment of MGs in the energy production system, the stochastic coordination between energy storage unit and uncertain RESs/electric loads with less conservatism is of paramount importance.In this paper, an adaptively constrained stochastic MPC approach for the optimal dispatch of MG under uncertainties is proposed.In the proposed approach, the objective is to minimize operation costs over the prediction horizon, and the closed-loop online adaptive constraints for SOC and discharging/charging power of energy storage is introduced.Specifically, a novel strategy for adaptively tightening or relaxing constraint is proposed, which considers the deviation of the actual violation level from the desired one as well as the change rate of

Conclusions
In MG, the energy storage unit could mitigate the fluctuations of uncertain RESs and electric loads, which could help representing MG as a single, self-controlled entity to the surrounding distribution grid.With the ever increasing deployment of MGs in the energy production system, the stochastic coordination between energy storage unit and uncertain RESs/electric loads with less conservatism is of paramount importance.In this paper, an adaptively constrained stochastic MPC approach for the optimal dispatch of MG under uncertainties is proposed.In the proposed approach, the objective is to minimize operation costs over the prediction horizon, and the closed-loop online adaptive constraints for SOC and discharging/charging power of energy storage is introduced.Specifically, a novel strategy for adaptively tightening or relaxing constraint is proposed, which considers the deviation of the actual violation level from the desired one as well as the change rate of

Conclusions
In MG, the energy storage unit could mitigate the fluctuations of uncertain RESs and electric loads, which could help representing MG as a single, self-controlled entity to the surrounding distribution grid.With the ever increasing deployment of MGs in the energy production system, the stochastic coordination between energy storage unit and uncertain RESs/electric loads with less conservatism is of paramount importance.In this paper, an adaptively constrained stochastic MPC approach for the optimal dispatch of MG under uncertainties is proposed.In the proposed approach, the objective is to minimize operation costs over the prediction horizon, and the closed-loop online adaptive constraints for SOC and discharging/charging power of energy storage is introduced.Specifically, a novel strategy for adaptively tightening or relaxing constraint is proposed, which considers the deviation of the actual violation level from the desired one as well as the change rate of actual violation probability at the current time step.Simulations demonstrate that the proposed adaptively constrained stochastic MPC approach could derive the optimal dispatch solutions with much less conservativeness in comparison to the robust MPC via scenarios optimization, in terms of more effective utilization and even more economical capacity investment of energy storage unit; simultaneously, with the increase of prediction time horizon no significant extra computational burden is increased in the proposed approach, whereas the computational burden will significantly be aggravated in the robust MPC via scenarios optimization.Moreover, the proposed adaptive constraint update strategy could achieve a better convergence to the desired constraint violation level with significantly smaller overshoot, less oscillation and shorter settling time, as compared to other online update strategies.In addition, the performance of MG dispatch can be improved by adjusting the parameters, such as the prediction time horizon T, the adaptive constraint update parameters γ 1 and γ 2 , which means various ways can be used to achieve the less conservative MG dispatch scheme with the better dynamic and static performances.

Figure 1 .
Figure 1.Closed-loop of constraint violation in adaptively constrained stochastic model predictive control (MPC).

Figure 1 .
Figure 1.Closed-loop of constraint violation in adaptively constrained stochastic model predictive control (MPC).
results derived in Step (2), calculate the actual power output   s P t of energy storage unit at time t according to the supply and demand balance of the electricity power, and then derive   SOC t of energy storage unit.Step (4) Calculate   Y t via (21), and adaptively update parameters,

Figure 3 .
Figure 3.Comparison on constraint violation probabilities.(a) The proposed method; and (b) Robust MPC via scenarios optimization.

Figure 5 .Figure 5 .
Figure 5.Comparison of state-of-charges (SOCs) and power outputs of energy storage unit.(a) The proposed method; and (b) Robust MPC via scenarios optimization.

Figure 5 .
Figure 5.Comparison of state-of-charges (SOCs) and power outputs of energy storage unit.(a) The proposed method; and (b) Robust MPC via scenarios optimization.

Figure 6 .
Figure 6.Comparison of probability distributions of SOCs.(a) The proposed method; and (b) Robust MPC via scenarios optimization.

Figure 6 .
Figure 6.Comparison of probability distributions of SOCs.(a) The proposed method; and (b) Robust MPC via scenarios optimization.

Figure 7 .
Figure 7.Comparison on constraint violation probabilities among different adaptive constraint update strategies.Figure 7. Comparison on constraint violation probabilities among different adaptive constraint update strategies.

Figure 7 .
Figure 7.Comparison on constraint violation probabilities among different adaptive constraint update strategies.Figure 7. Comparison on constraint violation probabilities among different adaptive constraint update strategies.
1] is the allowed constraint violation parameter.If the constraint P s−min ≤ P s (t) ≤ P s−max and SOC min ≤ SOC(t) ≤ SOC max is fully satisfied, the dispatch result of MG is very conservative, which can lead to a loss in performance; on the contrary, if the chance constraint is satisfied as Pr P s−min ≤ P s (t) ≤ P s−max and SOC min ≤ SOC(t) ≤ SOC max

Table 2 .
Comparison on energy storage utilization between the proposed Method and Robust MPC via Scenarios Optimization.

Table 2 .
Comparison on energy storage utilization between the proposed Method and Robust MPC via Scenarios Optimization.Pr P s−max < P s (t) ≤ P s 0.0005 0.0510 Pr P s ≤ P s (t) < P s−min 0.0006 0.0387

Table 3 .
Comparison on computational burden between the proposed method and robust MPC via scenarios optimization.
The prediction time horizon T = 12 is taken as an example to compare our proposed adaptive

Table 4 .
Comparison on transient characteristics between Strategy (a) and Strategy (b).