1 Introduction

Within the global wide concentration on cleaner, greener and sustainable development, tremendous efforts have been dedicated to the exploitation of renewable energy sources (RES), the promotion of distributed generators (DGs), and the excavation of latent, abundant energy residing in demand-side under the paradigm of smart grid, in order to achieve more efficient and economical power generation, transmission and utilization. Microgrid has long and proverbially been acknowledged as one highly successful way to integrate all these brand-new power sources into the existing power system without causing any catastrophic abnormality [1]. Consequently, problems concerning microgrid modelling, planning and operation has become a heated topic in both academic investigation and industrial applications.

The economic dispatch of microgrid is usually constructed as a nonlinear programming problem. Existing methods concerning this problem can be categorized into two aspects, the centralized method and the decentralized method. With regard to the former, the microgrid central controller (MGCC) is responsible for a coordinated decision making process to balance supply and demand of all units in the system. Mathematical methods, including sequential quadratic programming [2], interior-point algorithm [3], mixed integer programming [4], and heuristic-based intelligent algorithms, like generic algorithm [5] and particle swarm optimization [6] are mostly common seen in this respect. To overcome model complexity and the low computation efficiency of the centralized method, decentralized method treats each unit as an autonomous agent with their own operation goals. MGCC then gathers all the self-scheduling information and gives adjustment orders based on system-wide economy and reliability [7, 8]. Furthermore, privacy of different DER entities can be well protected via this distributed manner.

Two problems have been discovered with the current researches. First of all, microgrid economic dispatch is generally modelled in an open-loop style one day ahead, i.e. based on the prediction of weather conditions, demand, and electricity price, optimal power dispatch for each hour of next day is completed in one calculation. The schedule produced via this static method may not remain optimal in real-time scenarios with unexpected fluctuations of uncertain factors. Normally there are two ways to address these uncertainties [9]: to transform every possible scenarios into their deterministic equivalence and find a good solution for all the cases or to dynamically adjust the schedule according to real-time conditions, namely the rolling optimization. The former approach is relatively conservative by exaggerating the effects of extreme scenarios with low probability; while the latter could ensure an optimal power dispatch via timely modification of operation schedule.

The rolling optimization of microgrid operation is mainly realized via model predictive control (MPC) strategy [1012], where microgrid operation schedule is decided on the basis of predictions for future renewable energy generation and power consumption, and is continuously corrected according to the latest system state. However, the majority of the past studies loosely assume that all generators and loads in microgrid are connected to one bus, hence ignore the underlying distribution network constraints, e.g. node voltage boundaries. As a consequence, schedules got by this way may hazard system reliability and prove infeasible in practice [8].

In summary, a dispatch scheme that properly copes with real-time uncertainty and nonlinear power flow constraints makes the original microgrid economic dispatch problem a much more complicated one, and requires efficient mathematical methods to solve. In this paper, we handle this specific problem with both model predictive control strategy and conic programming. The main contributions of our work are listed as follows.

  1. 1)

    We formulate a model predictive-based centralized control model for microgrid with multiple distributed energy resources and flexible load in real-time environment. Facing the real-time uncertainties, power dispatch of all the controllable units in the system is optimized on a rolling basis by microgrid EMS to ensure a global power balance and operation economy under all possible scenario realizations.

  2. 2)

    We construct the above real-time microgrid economic dispatch problem as an optimal power flow (OPF) model to enclose network constraints and losses, therefore guarantee the feasibility of the proposed schedule at a distribution network level. The model established could be easily modified and adapted to distribution feeders at any scale.

  3. 3)

    We apply the technique of conic programming to solve the proposed mixed-integer nonlinear optimization problem. This method relaxes the nonlinear power balance equality constraints into linear inequality constraints to evade their non-convexity, while retains the global optimality of the solution. To the best of our knowledge, conic programming has not been previously used in the context of microgrid economic dispatch. Case studies are implemented to verify its applicability and efficiency.

The rest of the paper is organized as follows. Section 2 describes the centralized model predictive control scheme of microgrid system, followed by the detailed mathematical model of real-time microgrid economic dispatch. Section 3 introduces the conic programming technique and presents the mixed-integer conic programming formulation of the original problem. Section 4 reveals simulation results from a case study and makes comparisons between MPC schedule and the regular day-ahead schedule. Finally, concluding remarks are made in Sect. 5.

2 MPC-based microgrid economic dispatch

2.1 Centralized MPC scheme of microgrid

In the MPC approach, control actions to a certain system are computed online based on existing system knowledge and future predictions rather than using off-line static results [13]. At each time step, an optimization model that covers a finite time horizon produces a control action sequence, but only the first action is put into effect. The system then moves to the next time step with renewed system state and future information, and repeats the calculation above. MPC is considered closed-loop due to its ongoing modulation of control actions to compensate for inaccurate prediction. The principle of MPC is shown in Fig. 1.

Fig. 1
figure 1

Principle of MPC

Fig. 2
figure 2

Control scheme of microgrid

As can be seen from above, an MPC scheme generally includes the following components : \(\textcircled {1}\) a control agent that is in charge of optimizing control actions over a finite horizon in accordance with a system-wide objective function; \(\textcircled {2}\) multiple local agents that implement control actions; \(\textcircled {3}\) possible disturbances that may affect the local implementation of control actions.

In the context of microgrid economic dispatch, microgrid EMS acts as the central control agent to generate suitable set points for all controllable units, as well as the optimal power exchange with the utility grid, with the aim of minimizing the total operation cost. Local agents include micro turbines, energy storage system and flexible load. Together they maintain a global power balance by constantly responding to the coordinated energy management order from the higher-level EMS. Wind speed, load variations and electricity prices belong to uncertain disturbances, and their predications are continuously updated by EMS. The whole centralized MPC scheme of microgrid economic dispatch is presented in Fig. 2 [14]. Next part presents the detailed mathematical description of the proposed model.

2.2 MPC-based problem formulation

2.2.1 Objective function

At time step i, microgrid EMS minimizes the total operation cost over a time horizon with length N by solving the following problem:

$$\begin{aligned} \begin{aligned}&\mathrm {min} \quad cost(i)=\sum _{t=i}^{i+N-1}(\lambda _{RT}(t)P_{grid}^{RT}(t)\\&\quad +\sum _{MT=1}^{N_{G}}C_{MG}(P_{MT}^{RT}(t))+C_{LS}^{RT}(t)+C_{LC}^{RT}(t)) \end{aligned} \end{aligned}$$
(1)

where \(\lambda _{RT}\)(t) is the real-time price of interval t; \(P_{grid}^{RT}\)(t) is the power exchange; \(P_{MT}^{RT}\)(t) is the micro turbine generation; \(N_{G}\) is the set of micro turbines. The first term is the cost for power exchange with the utility grid; the second term stands for micro turbine generation cost; the last two terms express costs for dispatching the flexible load, including load transfer (\(C_{LS}^{RT}\)(t)) and load interruption (\(C_{LC}^{RT}\)(t)). Acronym RT is short for real-time. Cost for wind power is assumed to be zero.

Fuel cost of micro turbine is calculated as follows [15].

$$\begin{aligned} \begin{aligned} C_{MT}(t)=C_{fuel}\frac{P_{MT}(t)}{\eta _{MT}} \end{aligned} \end{aligned}$$
(2)

where \(C_{fuel}\) is the fuel cost, \(\eta _{MT}\) is micro turbine efficiency. For simplicity, it is assumed to be fixed and is derived from technical manuals of Capstone® [16]. Equations (3) and (4) compute the cost for transferred load and interrupted load, respectively.

$$\begin{aligned} C_{LS}(t)= & {} \sum _{r=1}^{N_{LS}}c_{r}^{LS}q_{r,t}^{LS}u_{r}(t)\end{aligned}$$
(3)
$$\begin{aligned} C_{LC}(t)= & {} a_{LC}P_{LC}(t) \end{aligned}$$
(4)

where \(N_{LS}\) is the set of load transfer contracts; \(c_{r}^{LS}\) and \(q_{r,t}^{LS}\) are the price and quantity in \(r_{th}\) contract at interval t, respectively; \(u_{r}\)(t) is a 0-1 binary variable indicating the status of load transfer; \(a_{LC}\) and \(P_{LC}\)(t) are the compensation price and quantity of interruptible load, respectively.

2.2.2 State equations of controllable units

The controllable units include micro turbines, energy storage system, and transferrable/interruptible load. At each time step i, their control actions over the next [i, i+N-1] period are predicted via the following state equations:

1) Micro turbine

$$\begin{aligned}&\left| P_{MT}(t)- P_{MT}(t-1)\right| \le r_{g}P_{MT}^{\mathrm {max}}\end{aligned}$$
(5)
$$\begin{aligned}&P_{MT}^{\mathrm {min}}\le P_{MT}(t)\le P_{MT}^{\mathrm {max}}\end{aligned}$$
(6)
$$\begin{aligned}&\sum _{MT=1}^{N_{G}}P_{MT}(t)/r_{MT}=P_{Tload}(t) \end{aligned}$$
(7)

where \(r_g\) is a ramping parameter; \(P_{TLoad}\)(t) is the current amount of thermal demand; \(r_{MT}\) is the power/heat ratio of micro turbine.

Equation (5) limits the change of micro turbine generation at two consecutive intervals. Equation(6) sets the generation range. Equation (7) ensures that total thermal production of micro turbines should be equal to thermal demand.

2) Battery

$$\begin{aligned} SoC(t)&= {} \eta _{b}SoC(t-1)+\mathrm {\Delta } tP_{es}(t)/Cap_{es}\end{aligned}$$
(8)
$$\begin{aligned} SoC_{\mathrm {min}}\le & {} SoC(t)\le SoC_{\mathrm {max}} \end{aligned}$$
(9)
$$\begin{aligned} P_{es,d}^{\mathrm {max}}\le & {} P_{es}(t)\le P_{es,c}^{\mathrm {max}} \end{aligned}$$
(10)
$$\begin{aligned} SoC(0)&= {} SoC(N) \end{aligned}$$
(11)

where \(\eta _b\) is the self-discharge rate of the battery; \(\mathrm {\Delta }\) t is the length of time interval; \(Cap_{es}\) is the battery capacity; \(P_{es}\)(t) is battery charge/discharge rate. Equation (8) links SOC in different time intervals [8]; (9) and (10) limit SOC and charge/discharge rate, respectively; (11) guarantees that SOC returns to its initial value at the end of a dispatch cycle.

3) Flexible load

We assume that there are two types of flexible load residing in the microgrid system. The first type is the transferrable load, which consumes a constant amount of power continuously at certain time slots, i.e. washing machines, dryers, dish washers [17]. Scheduling of the transferrable load is realized via contracts, which contains the amount of load that can be transferred, the energy price, as well as the time slots of load transfer and load recovery [18]. The second type is the interruptible load, which refers to a certain amount of base load that can be interrupted by microgrid EMS with cost for systematic security or economic reasons [19].

$$\begin{aligned} P_{LS}(t)&= {} \sum _{r=1}^{N_{LS}}q_{r,t}^{LS}u_{r}(t) \end{aligned}$$
(12)
$$\begin{aligned} \sum _{t'\in LS_{r,t,t'}}\!\!\!\!\! v_{r}(t,t')&= {} u_{r}(t) \end{aligned}$$
(13)
$$\begin{aligned} P_{LR}(t')&= {} \sum _{r=1}^{N_{LS}}\sum _{t\in LS_{r,t,t'}}\!\!\!\!\!q_{r,t}^{LS}v_{r}(t,t') \end{aligned}$$
(14)
$$\begin{aligned} 0\le & {} P_{LC}(t)\le \varepsilon P_{Load}(t) \end{aligned}$$
(15)

Equation (12) calculates the amount of load transferred at time interval t; (13) implies that if load transfer happens at t, it must be recovered at another interval within the given time slots \(LS_{r,t,t'}\), where \(v_{r}\)(t, \(t^{\prime }\)) is a 0-1 binary variable indicating whether there’s load transferring from interval t to \(t^{\prime }\) in \(r_{th}\) contract; (14) calculates the amount of load recovered at time interval \(t^{\prime }\) from all other intervals. In (15), \(P_{Load}\)(t) is the current amount of electrical load, \(\epsilon\) is a positive factor indicating the maximum percent of electrical load that can be interrupted.

2.2.3 Distribution network constraints

The real/reactive power injection at each node k in the underlying distribution network system of the studied microgrid with n nodes satisfies the following power balance constraints:

$$\begin{aligned} P_{k}(t)&= {} \sum _{j\in n(k)}P_{kj}(t)\nonumber \\&= {} \sum _{j\in n(k)}g_{kj}V_{k}^{2}(t)-V_{k}(t)V_{j}(t)(g_{kj}\mathrm {cos}\theta _{kj}(t)+b_{kj}\mathrm {sin}\theta _{kj}(t))\nonumber \\&= {} P_{DG,k}(t)-P_{L,k}(t) \end{aligned}$$
(16)
$$\begin{aligned} Q_{k}(t)&= {} \sum _{j\in n(k)}Q_{kj}(t)\nonumber \\&= {} \sum _{j\in n(k)}-b_{kj}V_{k}^{2}(t)+V_{k}(t)V_{j}(t)(b_{kj}\mathrm {cos}\theta _{kj}(t)-g_{kj}\mathrm {sin}\theta _{kj}(t))\nonumber \\&= {} Q_{DG,k}(t)-Q_{L,k}(t) \end{aligned}$$
(17)

where n(k) is the set of nodes that is connected to node k, \(k=2,3,\ldots ,n; g_{kj}\) and \(b_{kj}\) are the real and image part of admittance between node j and node k; \(V_{k}\)(t) is the voltage magnitude; \(\theta _{kj}\)(t) is the voltage phase angle difference between node k and node j; \(P_{DG,k}\)(t)/\(Q_{DG,k}\)(t) is the sum of real/reactive power generation from wind turbines, micro turbines, battery charge/discharge and transferred/interrupted load at node k, while \(P_{L,k}\)(t)/\(Q_{L,k}\)(t) is its initial load plus the load recovered. For simplicity, only real power of DGs and load is dispatchable in this paper, reactive power is set to fixed values.

$$\begin{aligned} P_{loss}(t)&= {} \sum _{k=1}^{n}P_{Ik}(t) \end{aligned}$$
(18)
$$\begin{aligned} P_{grid}(t)&= {} P_{I1}(t) \end{aligned}$$
(19)
$$\begin{aligned} P_{grid}^{\mathrm {min}}\le & {} P_{grid}(t)\le P_{grid}^{\mathrm {max}} \end{aligned}$$
(20)
$$\begin{aligned} V_{k}^{\mathrm {min}}\le & {} V_{k}(t)\le V_{k}^{\mathrm {max}} \end{aligned}$$
(21)

Equations (18) and (19) compute network losses and power exchange with the utility grid, respectively. It should be noted that node 1 in the network is assumed to be the point of common coupling (PCC) and has a fixed voltage magnitude value of 1 p.u. with phase angle 0. Therefore, power injection at node 1 is the power flow from utility grid. Equation (20) sets the range of power exchange. Equation (21) guarantees that node voltage level varies within a normal range, i.e. [0.95, 1.05].

2.3 Control case

To verify the effectiveness of MPC strategy in optimizing real-time microgrid economic dispatch, we choose the routine day-ahead microgrid schedule as the control case. In day-ahead schedule, set points of all controllable units in the next day are calculated based on the prediction of random factors, and they remain unchanged in real-time operation. Plentiful researches have been carried out on day-ahead schedule in literature, and interested readers could refer to [20, 21] for more details. The day-ahead schedule model has the following objective function.

$$\begin{aligned} \begin{aligned}&\mathrm {min}\quad cost=\sum _{t=1}^{N}(\lambda _{DA,est}(t)P_{grid}^{DA}(t)\\&\quad +\,\sum _{MT=1}^{N_G}C_{MT}(P_{MT}^{DA}(t)) +C_{LS}^{DA}(t)+C_{LC}^{DA}(t)) \end{aligned} \end{aligned}$$
(22)

Equation (22) sets the aim of day-ahead schedule, which is subjected to constraints (5)–(21), where \(\lambda _{DA,est}\)(t) is the day-ahead estimated price, and all the other symbols hold the same meaning as in previous equations, except that acronym DA stands for day-ahead. Due to forecast errors of RES generation, demand and prices, changes shall take place in power exchange with utility grid and microgrid thermal output when day-ahead schedule goes into effect in real time. Deviation of real-time generation from day-ahead schedule will be punished, so its actual cost is measured as follows:

$$\begin{aligned} \begin{aligned}&\mathrm {actual}\;cost=\sum _{t=1}^{N}(\lambda _{DA}(t)P_{grid}^{DA}(t)+\lambda _{RT}(t)(P_{grid}^{RT}(t)\\&\quad -P_{grid}^{DA}(t)) +\sum _{MT=1}^{N_G}C_{MT}(P_{MT}^{DA}(t)) +C_{LS}^{DA}(t)+C_{LC}^{DA}(t)\\&\quad +\lambda _{TLoad}^{penalty}\mathrm {max}(0,P_{TLoad}^{DA}(t)-P_{TLoad}(t))\\&\quad +\lambda _{grid}^{penalty}|P_{grid}^{RT}(t)-P_{grid}^{DA}(t)|) \end{aligned} \end{aligned}$$
(23)

The first term of (23) implies a two-settlement system for financial settlement of DA and RT power exchange [22]. The last two terms imply financial punishment for deficiency in thermal supply and deviation from day-ahead power exchange, where \(P_{TLoad}^{DA}\)(t) is the day-ahead forecasted thermal load, \(\lambda _{TLoad}^{penalty}\) and \(\lambda _{grid}^{penalty}\) are the penalty prices.

3 Problem reformulation based on conic programming

3.1 Standard form of SOCP

The MPC-based microgrid economic dispatch model contains integer variables and non-linear distribution network constraints, therefore it is a non-convex problem and to find the global optimal solution is NP-hard. One efficient solution is via convex relaxation. In this section, we introduce the technique of second-order cone programming to realize convex relaxation and to get the optimal solution of the original problem. A second-order cone programming (SOCP) problem has the following standard form [23]:

$$\begin{aligned} \begin{aligned} \underset{{{\varvec{x}}}_l}{\mathrm {min}}\left\{ {{\sum _{l=1}^\zeta {{\varvec{c}}}^{T}{{{\varvec{x}}}_l} } |{{\sum _{l=1}^\zeta {{\varvec{A}}}_{l}{{\varvec{x}}_l} }={{\varvec{b}}}, {{{\varvec{x}}}_l} }\in {{{\varvec{K}}}_l} },l=1,2,...,\zeta \right\} \end{aligned} \end{aligned}$$
(24)

The decision variable set \({{\varvec{K}}}_l\) is presented as follows. Quadratic cone:

$$\begin{aligned} \begin{aligned} {{\varvec{K}}_l} = \left\{ x_{l,i}\in {{\varvec{R}}^{n_l}}|x_{l,1}\ge \sqrt{\sum _{j=2}^{n_l}x_{l,j}^{2}},x_{l,1}\ge 0 \right\} \end{aligned} \end{aligned}$$
(25)

Rotated quadratic cone:

$$\begin{aligned} \begin{aligned} {{\varvec{K}}_l} = \left\{ x_{l,i}\in {{\varvec{R}}^{n_l}}|2x_{l,1}x_{l,2}\ge \sqrt{\sum _{j=3}^{n_l}x_{l,j}^{2}},x_{l,1},x_{l,2}\ge 0 \right\} \end{aligned} \end{aligned}$$
(26)

An SOCP problem is a convex programming problem consisting of a linear objective function, linear equality/inequality constraints and nonlinear but convex conic inequality constraints, and its optimal solution can be obtained using interior point methods within polynomial time [24]. Next part presents how the MPC-based microgrid economic dispatch problem can be transformed into the form of convex mixed-integer second-order cone programming and be efficiently solved.

3.2 OPF model reformulation

As is stated before, power balance constraints in MPC-based microgrid economic dispatch model is nonlinear and non-convex, and does not suit the standard form of conic programming. Hence new variables are introduced to the model as follows [25]:

$$\begin{aligned} u_{k}(t)&= {} V_{k}^{2}(t)/\sqrt{2} \end{aligned}$$
(27)
$$\begin{aligned} \frac{V_{k,\mathrm {min}}^{2}}{\sqrt{2}}\le & {} u_{k}(t)\le \frac{V_{k,\mathrm {max}}^{2}}{\sqrt{2}} \end{aligned}$$
(28)
$$\begin{aligned} R_{kj}(t)&= {} V_{k}(t)V_{j}(t)\mathrm {cos}\theta _{kj}(t) \end{aligned}$$
(29)
$$\begin{aligned} T_{kj}(t)&= {} V_{k}(t)V_{j}(t)\mathrm {sin}\theta _{kj}(t) \end{aligned}$$
(30)

Based on these new variables, the real and reactive power injection equations can be rewritten as:

$$\begin{aligned} P_{k}(t)&= {} \sum _{j\in n(k)}\sqrt{2}g_{kj}u_{k}(t)-g_{kj}R_{kj}(t)-b_{kj}T_{kj}(t)\nonumber \\&= {} P_{DG,k}(t)-P_{L,k}(t) \end{aligned}$$
(31)
$$\begin{aligned} Q_{k}(t)&= {} \sum _{j\in n(k)}-\sqrt{2}b_{kj}u_{k}(t)+b_{kj}R_{kj}(t)-g_{kj}T_{kj}(t)\nonumber \\&= {} Q_{DG,k}(t)-Q_{L,k}(t) \end{aligned}$$
(32)
$$\begin{aligned} 2u_k(t)u_j(t)\ge & {} R_{kj}^{2}(t)+T_{kj}^{2}(t),R_{kj} \ge 0 \end{aligned}$$
(33)

Equation (33) describes the relationship among the newly defined variables \(u_k\)(t), \(R_{kj}\)(t) and \(T_{kj}\)(t), which constitutes a rotated quadratic cone. The function of (33) is to relax the initial non-convex feasible region into a convex one, since global optimality can only be ensured under the condition that the problem is convex. Furthermore, it has been proved that if (33) becomes binding at the solution obtained by the reformulated OPF model, then this solution is also the optimal one to the original problem [26].

By now, the conic programming model for MPC-based microgrid economic dispatch becomes solving (1) while complying with (5)–(15), (18)–(20), (28), (31)–(33), and can be efficiently solved by commercial softwares that uses branch-and-bound algorithm [27].

3.3 Solution process

The process of solving the proposed MPC-based microgrid ED problem is demonstrated in Fig. 3.

Fig. 3
figure 3

Solution process of MPC-based microgrid economic dispatch

As is shown in the figure, the third step in the process involves solving a mixed integer nonlinear programming problem due to the existence of nonlinear power flow constraints and binary variables indicating load transfer. Model complexity and computation burden would increase rapidly with a longer prediction horizon. For the sake of computation efficiency, a 24-hour time period is chosen with 1 hour at each interval, i.e., N = 24. On the other hand, a 24-hour period is also reasonable since it tallies with the natural daily cycle of power consumption and electricity price [28].

In addition, forecast tools are needed to predict possible future disturbance. Multiple forecasting measures have been developed in literature, including least-square support vector machines (LS-SVM), neural network (NN), time-series based ARIMA model, etc. However, as the main focus of this paper is not forecast techniques, we assume that forecast error of the uncertain factors follow a certain probability distribution with known mean value and standard deviation.

4 Numerical analysis

4.1 System configuration

We transform the IEEE 33-bus distribution system [29] into a microgrid by adding 2 wind turbines, 4 micro turbines, one battery, transferrable and interruptible load at the selected nodes. The configuration of microgrid system is shown in Fig. 4. Hourly load is distributed among the nodes according to the systems original load distribution proportion. Historical data of real-time wind speed, prices and load obtained from [30] and [31] are used for simulation.

Fig. 4
figure 4

Microgrid configuration

Day-ahead forecast error of wind speed, electrical and thermal load and price follows normal distribution with zero mean and the standard deviation of 20%, 10% and 20%, respectively. In real-time forecast, we assume that the standard deviation is reduced by half. Furthermore, we assume that there’s no forecast error of thermal load in real-time. System parameters are shown in Table 1.

Table 1 System parameters

4.2 Simulation results

4.2.1 Verification of MPC effectiveness

Fig. 5
figure 5

Comparison of micro turbine generation

Figure 5 compares micro turbine generation of the MPC-based microgrid dispatch schedule and day-ahead schedule. Since micro turbines have a higher fuel cost than real-time price, they are mainly used to serve the thermal load. Therefore, during time intervals with little forecast error of thermal load (e.g. 1, 4, 9–11 h), micro turbine generation of the two schedules are approximately the same; while in time intervals with greater forecast deviation (e.g. 3, 5–8, 13–14 h), power generation of the two schedules differs a lot from each other. Forecast error of thermal demand leads to less economic use of micro turbines in day-ahead schedule.

Fig. 6
figure 6

Comparison of load profiles

Figure 6 displays the load profiles after load transfer and load interruption in both schedules. By tracking real-time prices, MPC schedule transfers and interrupts more flexible load in price peak period (1–2 h, 8–9 h); While in day-ahead schedule, forecast errors of real-time price results in a load profile with less change.

Table 2 Comparison of operation cost

Table 2 lists the operation cost obtained by MPC schedule and day-ahead schedule on one day. To further justify the higher economic efficiency of the former, simulations for both schedules have also been run for one-week period, based on the measured weather data, price information and demand record from November 2, 2014 to November 8, 2014. And the results have been reported in the table. It clearly shows that MPC schedule outperforms the day-ahead schedule in economy and could reduce system operation cost to a considerable extent.

4.2.2 Inspection on system stability

Figure 7 shows the microgrid voltage level over the whole horizon. As can be observed in the figure, all bus voltages are kept within the normal range [0.95 p.u, 1.05 p.u.], indicating that MPC schedule is feasible at a distribution network level.

Fig. 7
figure 7

Microgrid voltage level

4.2.3 Computation efficiency

The MPC-based economic dispatch model has 5856 control variables in total, among which 1800 are 0–1 binary variables. The total number of constraints is 1931. The number of rotated quadratic cones is 768. 24-hour real-time schedule is calculated by a desktop computer with 2.67 GHz Intel® Xeon® CPU and 6 GB RAM. MOSEK optimization toolbox [27] is used to solve the mixed-integer SOCP problem. Convergence time for each interval is shown in Table 3.

Table 3 Computation time

Average convergence time of Table 3 is 4.8 s and in the worst case, convergence took 11 s, both are much shorter than the one-hour dispatch interval, which verifies the feasibility of MPC schedule in real-time power dispatch.

4) Test of algorithm robustness

Since both day-ahead schedule and MPC schedule involve forecasts of uncertain factors, only that the latter conducts an intra-day forecast with higher accuracy. Forecast errors exert inevitable disturbance on the robustness of scheduling strategy. To test the robustness of the proposed MPC model, 10 hypothetical scenarios are randomly generated with different forecast errors. Total costs from day-ahead schedule and MPC schedule in each scenario are shown in Fig. 8.

Fig. 8
figure 8

Operation costs under hypothetical scenarios

The standard deviation and range of the 10 costs calculated by day-ahead schedule are $16.327 and $54.69, respectively; while those of MPC schedule are $0.958 and $3.1, respectively. Both indices show that optimal solutions of the latter fluctuates less under various conditions, and possesses higher robustness. This is because stochastic parameters input in MPC model are updated on a rolling basis, and power dispatch is adjusted accordingly, so that negative disturbances on operation economy are greatly depressed.

To verify the equality of relaxed rotated quadratic conic constraint (33) at the optimal solution, a relaxed deviation D is further defined and computed as follows.

$$\begin{aligned} \begin{aligned} D_{kj}(t)=|2u_{k}(t)u_{j}(t)-R_{kj}^{2}(t)-T_{kj}^{2}(t)| \end{aligned} \end{aligned}$$
(34)

The maximum value of D for all distribution lines during 24-hour horizion is 5.1225e-07, proving that the solution obtained is accurate enough.

From what has been observed above, it can be safely concluded that MPC-based real-time schedule exceeds day-ahead schedule in both operation economy and robustness, which can be mainly attributed to its look-ahead perspective and the embedded feedback modulation mechanism. Furthermore, simulations also prove that computation burden of MPC schedule is affordable under real-time circumstances.

5 Conclusion

In this paper we explore the use of model predictive control strategy in optimizing real-time microgrid power dispatch to counteract the unfavorable influences of uncertain factors. Distributed generators, energy storage and flexible load, along with power flow constraints of the underlying distribution system are all enclosed by the established model. To solve the above mixed integer nonlinear optimal power flow problem, the technique of second-order cone programming is applied to evade the non-convexity of the original problem while ensuring global optimality. The proposed model is tested on a reconstructed IEEE-33 bus distribution system and compared with the general day-ahead schedule. Simulation results show that MPC schedule outshines day-ahead schedule in both economy and robustness, and meets the requirement of fast convergence, therefore is of high feasibility in practical application.