Multi-Time Scale Economic Scheduling Method Based on Day-Ahead Robust Optimization and Intraday MPC Rolling Optimization for Microgrid

Due to the source and load prediction errors and uncertainties, the real operation state of microgrid may deviate significantly from the expected state, which leads to prevent the system from reaching its expected economic effects. In order to obtain the optimal economic effects for microgrid scheduling, an optimal microgrid scheduling model considered the demand responses is built in this paper firstly, and then a multi-time scale economic scheduling method based on day-ahead robust optimization and intraday model predictive control (MPC), is developed as well. Moreover, in the day-ahead stage, the long-time scale interval is set as 1 h and the robust optimization is used to address the low-frequency components in prediction errors and uncertainties. Meanwhile, the robust optimization enables to gain the day-head optimal economic scheduling plan for the microgrid and to keep the system operating effectively even when large-scale fluctuations happen. Furthermore, in the intraday stage, the short-time scale interval is set as 15 mins and MPC is adopted to track and correct the day-ahead economic scheduling plan, which enables to address the high-frequency components in prediction errors and uncertainties. Finally, simulation results demonstrate the feasibility of the proposed optimal microgrid scheduling model and the validity of the proposed multi-time scale economic scheduling method.


I. INTRODUCTION
Nowadays energy crisis calls for innovative sources and techniques for effectively utilizing more renewable energies such as wind energy and solar energy. Therefore, more and more wind power and photovoltaic power are connected into the main grid [1], which leads to the uncertainty of the total amount of wind power and photovoltaic power connected into power systems increasing. Moreover, the uncertainties also bring tremendous challenges to the economic operation of the microgrid, which is one of the important forms of integrating wind power and photovoltaic power into power The associate editor coordinating the review of this manuscript and approving it for publication was Siqi Bu . system. Therefore, to ensure the economic operation of the microgrid, it is necessary to minimize the impact of uncertainties and prediction errors of wind power and photovoltaic power [2], [3].
So far, the research on the microgrid economic scheduling plan mostly focuses on the day-ahead and intraday multi-time scale optimal scheduling model to address the uncertainties. Usually, in the day-ahead stage and the long-time scale controllable unit scheduling plan based on the predicted operation scenario is made. While, in the intraday stage and the short-time scale real time correction scheduling plan, based on the real operating status, is implemented to achieve the expected economic microgrid scheduling [4]. VOLUME 9, 2021 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/

A. THE INTRADAY STAGE
Generally speaking, the intraday optimal scheduling plan involves the selected performance indicators such as economy and tracking performance, and the conventional stochastic optimization or rolling optimization based on MPC is adopted widely [5]- [7]. As we known, MPC is a model-based finite time domain closed-loop optimal control method. Besides, MPC allows the scheduling plan to be corrected in real time through short-time prediction values and feedback correction, so the high system accuracy is not required. Therefore, in the intraday scheduling stage, MPC is typically used for real time tracking and rolling correction of the day-ahead scheduling plan to meet the real operating state [8]- [12]. The intraday microgrid scheduling plan needs to meet the real operating situation, some studies have been done. For example, in [13], MPC was employed to track and correct an active output plan to achieve smooth output of the controllable units. A multi-time scale demand response strategy framework, which used MPC to correct the scheduling plan and obtained the adjustable capacity range of the microgrid, was proposed in [14]. In [15], a multi-time scale scheduling method was developed based on MPC for building systems, where MPC corrected the day-ahead scheduling plan for optimal operation.

B. THE DAY-AHEAD OPTIMAL STAGE
In order to deal with the uncertainties, there are two conventional approaches, that is, stochastic optimization and robust optimization [16]- [18]. The main disadvantages of stochastic optimization are as follow: 1) a deterministic probability curve is required to generate uncertain scenarios. However, the probability distribution model may contain prediction errors inherently since it cannot be obtained accurately; 2) the requirement for large numbers of scenarios brings a large calculation burden; and 3) the low-probability scenarios are generally deleted to reduce the calculations, but the risk of system often exists in these low-probability scenarios. Consequently, the stochastic optimization may bring risk to the system [19]. Different from the stochastic optimization, the robust optimization substitutes an uncertain set for the exact probability distribution of random variables [20]. The optimal decision that satisfies all constraints in the uncertain set can be obtained quickly, and the decision result enables to deal with the perturbations from multiple uncertain parameters simultaneously. In [21], the optimization of the lowest overall cost was targeted by adjusting the economy and robustness of the robust optimization and evaluating the risk indicators of the scheduling plan. The robust optimization model was established in [22], which can reduce the fluctuations of renewable energy through multi-type demand response, and further improve the robustness of the scheduling plan. In [23], several approaches of robust optimization were proposed to solve the problem in fast optimal control.
In summary, the recent researches only consider the intraday or the day-ahead stage to do the optimal scheduling. Though applying MPC in the intraday stage scheduling can obtain accurate tracking results, it only deals with the optimization of predicted specific scenarios, since the day-ahead optimal scheduling result depends on the deterministic source and load data. Prediction errors and uncertainties create inevitable deviation between the day-ahead scheduling scenario and the real operating state, which leads to these day-ahead economic scheduling plans invalid. Consequently, the intraday tracking of these day-ahead scheduling plans does not facilitate economic operation of the microgrid. Meanwhile, applying robust optimization in the day-ahead scheduling stage can obtain the scheduling plan considered prediction errors and uncertainties. However, in the intraday stage, these scheduling plans are open loop or without feedback correction, which will lead to these scheduling plans cannot be adjusted well to meet the real operation state of the microgrid, thus cannot ensure the economic operation of microgrid.

C. THE PROPOSED METHOD
To ensure the economy and the stability of microgrid in the real operation state, this paper refers to the related studies reported and combines with the features of the robust optimization and the MPC rolling optimization, then proposes a multi-time scale economic scheduling method for microgrid. The multi-time scale microgrid scheduling method is designed to address the prediction errors and uncertainties. Prediction errors and uncertainties consist of low-frequency component and high-frequency components. In the day-ahead and long-time scale scheduling stage, a robust economic optimization model is established to minimize the whole day operation cost and consider the demand response. The robust optimization is used to address the low-frequency components to obtain the day-ahead economic optimal scheduling plan and to keep the system operating effectively even when large-scale system fluctuations happen. Moreover, the robust economic optimization model is solved by Particle Swarm Optimization (PSO) algorithm to obtain the economic optimization of the robust scheduling plan. While in the intraday short-time scale scheduling stage, to address the high frequency components, the MPC tracks and corrects the day-ahead scheduling plan in real time and it also minimizes the deviation between the intraday scheduling and day-ahead scheduling. The main contribution of this research is that we propose a multi-time scale economic scheduling method based on day-ahead robust optimization and intraday MPC rolling optimization for microgrid, the microgrid can obtain better economy in the real operation state through this method.
The rest of the paper is organized as follows. In Section II, the multi-time scale optimal microgrid scheduling method is proposed in details. In Section III, the multi-time scale optimal scheduling model for microgrid is developed. Some case studies are implemented and compared in Section IV. Finally, the conclusions are drawn in Section V.

II. MULTI-TIME SCALE OPTIMAL MICROGRID SCHEDULING METHOD
As before described, the proposed method consists of dayahead long-time scale robust economic optimal scheduling and intraday short-time scale MPC rolling optimal scheduling. By optimizing and scheduling the controllable units of the microgrid at different time scales, the economy of microgrid operation is ensured.
A. DAY-AHEAD LONG-TIME SCALE SCHEDULING WITH ROBUST OPTIMIZATION Robust optimization reveals the optimal solution under a given interval of uncertainties. Hence, the robust optimization based microgrid economic scheduling plan enables to adapt the large-scale fluctuations of the real microgrid operating state. A robust optimization model with the goal of minimizing microgrid cost is given in (1): where C T is the value factor vector, U is the vector of decision variables (including the interactive power of the diesel generator, the energy storage output, and the large power grid), I is the number of constraint conditions, i is the i th constraint condition, a i is the coefficient vector, b i is the uncertain parameter vector, and ω i is the coefficient vector of b i . The polyhedron uncertainty set shown in (2) describes the uncertainty of wind and photovoltaics and load demand in microgrid [24]. The element in b i is b ij and the number of elements is j.
whereḃ ij is an uncertain parameter with an predicted value of b ij and the maximum fluctuation value ofb ij , ξ ij is the fluctuation ratio, i is the polyhedral uncertainty set, and i is the uncertainty, which has a limiting effect on The value of uncertainty i can be selected according to the central limit theorem. Assume that EX ij = ξ ij = ḃ ij − b ij /b ij and the expected value of EX ij is µ i ; its variance is σ 2 , which is distributed independently and identically. According to the central limit theorem: where N (0, 1) is the standard normal distribution. When the value of i is assigned according to (4), As a kind of evolutionary algorithm, PSO is similar to simulated annealing algorithm in that it starts from random solution and looks for the optimal solution through iteration. This algorithm has the advantages such as easy implementation, high precision, and fast convergence, so we adopt PSO to solve the robust optimization.

B. INTRADAY SHORT-TIME SCALE SCHEDULING WITH MODEL PREDICTIVE CONTROL
There is an inevitable deviation between the real operating state of the microgrid and the day-ahead scheduling scenario. Robust optimization is somewhat conservative, so the scheduling plan must be corrected within the day to ensure a stable and economic microgrid. As a closed-loop control method with excellent tracking and anti-interference ability, MPC can correct the scheduling plan in real time by means of short-term predicted values and feedback correction without requiring high system accuracy [25], [26]. The MPC is used here for intraday real time tracking and rolling correction of the day-ahead robust economic optimized scheduling plan. The MPC is composed of a prediction model, rolling optimization, and feedback correction.

1) PREDICTIVE MODEL
This model can predict the state of the future system based on the state at the current moment, which is composed of the state variable, control input, and the output: where X (t 2 ) is the state variable at time t 2 , which is the interactive power of the diesel generator, energy storage output, and large power grid; u(t 2 ) is the control input at time t 2 , that is, the variable changes value of output power of the diesel generator and energy storage. r(t 2 ) denotes the system errors which consist of wind power and photovoltaic power and load disturbance. Y (t 2 ) is the output at time t, which is the interactive power of the diesel generator, energy storage output, and large power grid. A, B, C, and D are the system matrix, input matrix, output matrix, and error matrix, respectively.

2) ROLLING OPTIMIZATION
In the predictive time domain, the MPC tracking characteristic provides a performance indicator (reference value) for the rolling optimization. The objective function is: where M is the predictive time domain, w v , w u is the weight coefficient matrix. The (6) is a 2-Norm form function, after transforming (6) into the standard quadratic programming form, its Hessian matrix is a positive definite matrix. Thus, the global minimum is unique and does not fall into the local optimum, so we choose quadratic programming to solve MPC. The performance indicators in the M time domains are optimized at time t and the control sequence in the predicted time domains from t 2 to t 2 + M is obtained by (7). The control is executed only at the first time and the above steps are repeated at time t 2 + 1. 3

) FEEDBACK CORRECTION
There are many nonlinear and uncertain factors in the controlled object. The actual value and the predicted value of the output are detected at each sampling time and the error is updated by (8). The intraday optimal scheduling control can be made more accurate by performing feedback correction for the prediction model before the next rolling optimization.
where e k (t 2 ) is the actual error between the predicted value and the actual value, λ k is the error coefficient matrix, X (t 2 + 1| t 2 ) is the predicted output of t 2 + 1 at time t 2 .

III. MULTI-TIME SCALE OPTIMAL SCHEDULING MODEL FOR MICROGRID A. MULTI-TIME SCALE OPTIMAL SCHEDULING MODEL FOR MICROGRID
The microgrid under study here is composed of wind power, photovoltaics, diesel generators, and energy storage systems. The microgrid is connected to a large power grid through tie lines. The load is composed of rigid and electricity price demand response loads. The block diagram of the system composition is shown in Fig. 1.

1) DAY-AHEAD LONG-TIME SCALE ROBUST ECONOMIC OPTIMAL SCHEDULING MODEL
In the day-ahead stage, to improve the wind power and photovoltaic consumption and participate the power grid peak shaving and valley filling, here the robust economic optimal scheduling model is built by combining the predicted value of the wind power and photovoltaic power to the obtained the total loads of the demand responses based on the electricity price, as mentioned in [27]. Thus, the long-time scale economic optimal scheduling plan is then obtained by using the PSO algorithm to solve the model.
(C DG (t 1 ) + C BA (t 1 ) + C GRID (t 1 )) (9) where the time interval of t 1 is 1 h, C DG (t 1 ) is the comprehensive cost of the diesel generator at time t 1 , C BA (t 1 ) is the comprehensive cost of energy storage at time t 1 , and C GRID (t 1 ) is the comprehensive cost of interaction between the microgrid and the large grid at time t 1 .

2) INTRADAY SHORT-TIME SCALE MPC ROLLING OPTIMAL SCHEDULING
To satisfy the real operating state of the microgrid at the intraday stage, taking 15 mins here as the control time domain and 1 h as the predictive time domain, so the time interval of t 2 is 15 mins, the value of M is 4. Aiming at minimizing the deviation of the robust economic optimal scheduling plan, a MPC optimal rolling scheduling model is built. Moreover, the day-ahead scheduling plan is corrected and tracked in real time.

3) SCHEDULING COST MODEL a: COMPREHENSIVE COST OF DIESEL GENERATOR SCHEDULING
The comprehensive cost of the diesel generator equipment is composed of power generation cost and maintenance cost values [6]: where P DG (t) is the output power of diesel generator; d 1 , d 2 , and d 3 are the comprehensive cost coefficient of the generator output, respectively.

b: COMPREHENSIVE COST OF ENERGY STORAGE SCHEDULING
The comprehensive cost of energy storage equipment includes maintenance and loss costs. The comprehensive cost and energy storage charging and discharging power have a quadratic relationship [28].
where P BA (t) is the energy storage output power and is the comprehensive cost coefficient of the energy storage output.

c: COMPREHENSIVE COST OF LARGE POWER GRID INTERACTION
The comprehensive cost and interactive power of the large grid are as follows: where P GRID (t) is the interactive power of the large grid; β is the comprehensive cost coefficient of the interaction between the micro grid and the large grid.

4) CONSTRAINTS a: DAY-AHEAD POWER BALANCE CONSTRAINT
Due to prediction errors between wind and photovoltaic output power and load power, the prediction error at each moment should be taken into account. Hence the following day-ahead power balance is created.
P WT (t 1 ) +Ṗ PV (t 1 ) + P BA (t 1 ) + P DG (t 1 ) + P GRID (t 1 ) = P LOAD (t 1 ) (13) where P DR (t 1 ) is the demand response load, P LOAD (t 1 ) is the total load following the demand response,Ṗ(t 1 ) is the actual value, and the wind, photovoltaic, and rigid load power are denoted as WT, PV, and LOAD. The actual values of the wind, photovoltaic, and rigid load are calculated as follows: where P(t 1 ) is the predicted value,P(t 1 ) is the prediction error, and ξ is the fluctuation ratio.
where P 0 (t 2 ) is the actual power in the intraday stage.

c: UPPER AND LOWER CONSTRAINTS OF CONTROLLABLE UNIT OUTPUT AND INTERACTIVE POWER
     P DG min < P DG (t) < P DG max P BA min < P BA (t) < P BA max P GRID min < P GRID (t) < P GRID max (19) where P max and P min represent the upper and lower limits of output power, respectively.
where P DGc and P BAc represent the power climbing limit of the diesel generator and energy storage, respectively.

e: CONSTRAINTS OF ENERGY STORAGE SOC
The value of the energy storage state of charge (SOC) state is related to the energy storage output at the previous moment. The relationship between them is listed as below: where η and λ are SOC charging and discharging coefficients. The SOC upper and lower limits with the constraints of the beginning and end state are: where T is the optimization period.

f: SPINNING RESERVE CONSTRAINTS
To improve the ability of the microgrid to deal with system disturbances and ensure system stable operation, the spinning reserve constraints must be met during operation, as shown in (25).
where ε is the spinning reserve value.

B. MULTI-TIME SCALE OPTIMAL MICROGRID SCHEDULING PROCESS
The microgrid multi-time scale scheduling method can be divided into a day-ahead stage (Steps 1-3) and intraday stage (Steps 4-7). The detailed process is described as follows: Step 1: Use the method of [27] to respond to the demand of electricity price demand response load.
Step 2: A robust economic optimal scheduling model with the objective function (9) is built by combining the load value after demand response with the wind power and photovoltaic power predicted value.
Step 3: Use PSO algorithm to solve the scheduling model, which aims to obtain a robust economic optimal scheduling plan of diesel generator, energy storage output and the interactive power of the large power grid per hour.
Step 4: Build predictive model shown in (5), which initial state value is the actual value of the diesel generators, energy storage output and interactive power of the large power grid.
Step 5: Establish MPC objective function, shown in (6), and transform it into standard quadratic programming form. Then, use quadprog function in MATLAB to solve (6) to obtain the control variables in M predicted time domains.
Step 6: Execute the first control variable to obtain the diesel generator, energy storage output and the interactive power of large power grid at t 2 + 1, and then feedback and correct the system performance according to (8).
Step 7: Take the actual load output and actual interactive power at time t 2 + 1 as the initial value of the intraday optimization model, and then return to Step 4 and carry out the next rolling optimization.

IV. CASE STUDIES A. SYSTEM PARAMETERS
To verify the validity of the proposed economic optimal scheduling method, four scheduling methods were studied and compared under three microgrid real operating states. The actual values of the source and load of the three operating VOLUME 9, 2021  states are offset by 3%, 5%, and 10% from the day-ahead predicted value, where the rigid load increases and the power output of the wind and photovoltaics decreases, and then the stochastic errors of 3%, 5%, and 10% were superposed respectively. The day-ahead predicted value of the source and load is come from typical daily data of an area of Guizhou power grid. The four scheduling methods are studied and compared, which are (a) the proposed multi-time scale optimal scheduling method, that is, the day-ahead robust optimization combined with the intraday MPC rolling optimization method, which is labeled as Robust + MPC in Table 3-5; (b) the day-ahead robust optimization for economic scheduling and the intraday disturbances balanced by the large power grid method, labeled as Robust + open loop control in Table 3-5; (c) the day-ahead stochastic optimization for economic scheduling and the intraday MPC rolling optimization method, labeled as Deterministic optimization + MPC in Table 3-5; and (d) the day-ahead stochastic optimization for economic scheduling and the intraday disturbances balanced by the large power grid method, labeled as Deterministic optimization + open loop control in Table 3 The simulation case studies of this system, shown in Fig. 1, are carried out via MATLAB. Some system parameters are listed in below Table 1 [6], [28] and Table 2.
To reduce the number of start-up and stop of the diesel generator, the upper and lower limits of output are set as 150 kW/15 kW and the climbing constraint is 30 kW/h. The rated power of energy storage is 150 kW and the maximum capacity of energy storage is 200 kW. The upper and lower limits of output are 150 kW/-100 kW and the climbing constraint is 20 kW/h. The upper and lower limit constraints of SOC is set to 0.9/0.1 with an initial value of 0.5. The upper and lower limits of the output of the large power grid is 100/-100 kW; the spinning reserve ε of the system is the 5% maximum capacity of the controllable units.

B. SIMULATION RESULTS
The day-ahead predicted load and intraday actual values are shown in Fig. 3. The day-ahead predicted values and actual  intraday values of the wind and photovoltaic output powers are shown in Fig. 4.
The robust economic optimal scheduling plan of diesel generator, energy storage output, and large grid interaction power obtained in the day-ahead stage by the proposed method is shown in Fig. 5. The corresponding SOC curve is shown in Fig. 6.
In the robust economic optimal scheduling plan, during the valley period (23:00-08:00), the microgrid stores energy and charges, while the diesel generator maintains its lowest output. At this time, the large grid supplies power to meet   the power balance. The purchase cost of power increases during the off-peak period (08:00-17:00). At this time, diesel generators and the large power grid mainly supply the load. During the peak period (17:00-23:00), diesel generators and energy storages are mainly used to satisfy the load. At the end of the optimization period (23:00-00:00), the SOC restores to its initial value.
In the intraday stage, the MPC provides real time tracking and rolling correction of the day-ahead robust economic optimal scheduling plan. An electricity consumption plan was developed for the demand response load in the day-ahead,  so the load of the demand response was no longer adjusted in the intraday stage. The intraday disturbance factors were jointly coped with by the diesel generators, energy storages, and the large power grid. The updated scheduling plan and SOC curve after the MPC rolling optimization are shown in Fig. 7 and Fig. 8, respectively.
Interference from prediction errors and uncertainties requires that the day-ahead scheduling plan be corrected to meet the real operating state and balance power across the system. The real operating state deviates from the expected day-ahead scenario, so the amount of correction required for the intraday MPC rolling optimization scheduling decreases over time. It shows that the day-ahead robust economic scheduling plan can make the microgrid have sufficient reserves to cope with the source and load prediction errors and uncertainties.

1) MPC PERFORMANCE COMPARISON
The comparison of comprehensive costs of methods (a) and (b) under three different operating conditions, described in the first paragraph of Section IV, is shown in Table 3.
From the Table 3, it can be seen that the comprehensive cost of the scheduling method (a) is lower than that of the scheduling method (b) under three different operation conditions.   The comparisons of intraday interactive power correction of the large power grid are shown in Table 4 and Fig. 9-11. Table 4 shows that the interactive power correction of the large power grid under Method (a) is consistently smaller than that under Method (b). Moreover, the interactive power correction of the large power grid decreases as the intraday random error increases.
The simulation results show that the MPC rolling optimization tracks and corrects effectively the day-ahead scheduling plan to meet the real operating state. As a result, the microgrid remains economic even when its real operating state fluctu-   ates widely. The total amount of interactive power correction of the large-scale power grid throughout the day can also be minimized using this method. Table 5 shows the costs of methods (a), (c), and (d) under three different operating conditions, which are mentioned in the first paragraph of Section IV. Though the day-ahead comprehensive cost of Method (a) is higher than that of methods (c) and (d), which do not use robust optimization, the comprehensive costs of the latter are higher than those of the former in the real operating state wherein the source and load prediction errors and uncertainties are inevitable. Notice that the cost of method (c) is higher than that of method (d).

2) ROBUST PERFORMANCE COMPARISON
The output of the stochastic optimization is the optimal economic scheduling plan in specific scenario simulated here. This specific scenario differs from the real operating state because of the source and load prediction errors and uncertainties. In real operating state of intraday stage, the stochastic optimization economic scheduling plan obtained in the day-ahead scheduling stage cannot guarantee the economy of the microgrid. Using the intraday MPC rolling optimization to track the stochastic optimized economic scheduling plan increases the overall cost of the microgrid as the intraday random error increases.
The simulation results 1) and 2) discussed above show that the real operating state of the microgrid is affected by the source-load prediction errors and uncertainties, and the economic scheduling plan, obtained by robust optimization in the day-ahead scheduling stage, gives the reference values for the intraday tracking. In the intraday scheduling stage, the MPC rolling optimization provides reasonable tracking and thus obtains better economic effects. In summary, by using the proposed method to address the source and load prediction errors and uncertainties, the economic operation of the microgrid has been ensured and improved.

V. CONCLUSION
Prediction errors and uncertainties of source and load cause the real operating state of a microgrid to fluctuate over a wide range. The traditional scheduling method cannot adapt to these fluctuations, which leads to the microgrid incapable of the expected operating economy.
In this paper, a multi-time scale economic microgrid scheduling method based on the day-ahead robust optimization and the intraday MPC rolling optimization was proposed to ensure the economic operation of the microgrid. The robust optimization addressed the low-frequency component in prediction errors and uncertainties, and the MPC can address effectively the high-frequency component. In the day-ahead and long-time scale scheduling stage, the demand responses were considered and the robust optimization provided an economic optimization scheduling plan under uncertain conditions, which enabled the day-ahead economic scheduling plan to adapt to large-scale fluctuations in the real operating state of the microgrid. In the intraday and short-time scale scheduling stage, the MPC tracks and corrects the day-ahead robust economic optimal scheduling plan in real time to meet the real microgrid operating state. The proposed method was simulated and compared with three other methods in a microgrid. The simulation results verified the feasibility of the proposed optimal microgrid scheduling model and the validity of the proposed multi-time scale economic scheduling method for microgrid.