**4. Constraints**

For the above objective function. The main constraints established in this section are as follow:

(1) Power balance constraint,

$$P\_{\rm pv,t} + P\_{\rm ut,t} + B\_{\rm dis,t} \cdot P\_{\rm dis,t} + P\_{\rm dc,t} = P\_{l,t} + B\_{\rm ch,t} \cdot P\_{\rm ch,t} \tag{13}$$

where *Ppv,t* and *Pwt,t* represent the output power of the WT and photovoltaic at time *t*, *Pl,t* represent the load power at *t*, and *Pde,t* represent the output power of the diesel generator at *t*.

(2) The output power constraint of the diesel generator,

$$P\_{dc-min} \le P\_{dc,t} \le P\_{dc-max} \tag{14}$$

(3) Battery energy storage constraints.

> Energy storage system charge and discharge power constraints:

$$\begin{cases} 0 \le P\_{ch,t} \le P\_{ch,\max} \\ 0 \le P\_{dis,t} \le P\_{dis,\max} \end{cases} \tag{15}$$

Energy storage system charge state constraints:

$$S\_{\rm ess,min} \le S\_{\rm esc,t} \le S\_{\rm res,max} \tag{16}$$

Mutually exclusive constraints of energy storage systems:

$$0 \le B\_{\rm cl,t} + B\_{\rm dis,t} \le 1\tag{17}$$

### **5. Formulation of the Optimization Strategy**

In order to solve the problem of optimal operation and scheduling of islanded microgrid, it is usually more effective to use the energy optimization managemen<sup>t</sup> method with multi-period coordination. The flow chart in Figure 2 demonstrates the scheduling strategy proposed in this paper. Since the islanded microgrid system can only use the power output power of the WT and PV power generation system, it is necessary to predict the wind, solar and load demand in the future in advance. Due to the volatility of wind and solar energy, further short-term forecasting of wind and solar energy is needed to ensure the accuracy of the forecast. After obtaining the forecast data of wind energy, solar energy and load, it is divided into 6 di fferent scenarios.

Scenario 1: When the electrical energy generated by the WT and PV can meet the demand of the load, it should then be determined whether the ess needs to be charged. When the state of charge is su fficient and charging is not required, the power output of the WT and PV is limited by abandoning the wind and the light.

Scenario 2: When the state of charge of the ess is insu fficient and charging is required, it is further determined whether there is excess electrical energy for energy storage. If there is excess electrical energy, the ess is charged after meeting the load demand.

Scenario 3: If there is no excess power, the WT and PV output only need to meet the power supply of the load.

Scenario 4: If there is no excess electrical energy, the WT and PV output can only meet the load power supply. When the power generated by the WT and PV is insu fficient to meet the load demand, it is necessary to determine whether the ess can be discharged to supplement the power. If ess does not have enough power to power the load, then need to start diesel generators to power the system load.

Scenario 5: If ess can supply power, it needs to further determine whether the total output of WT/PV and ess meet the load demand. If the output meets the need, then the wind, solar and energy storage system is used to supply power to the load.

Scenario 6: If the output cannot meet the load, it also needs to start diesel generators to supply power to the system load.

The flow chart in Figure 2 is the scheduling strategy proposed in this section.

**Figure 2.** The scheduling strategy of the microgrid.

### *Optimal Sizing of Microgrid Using GWO*

Grey Wolf Optimization (GWO) is a group intelligence optimization algorithm proposed by Griffith University scholar Mirjalili and others in Australia in 2014. The algorithm is an optimized search method developed by the grey wolf predator activity. It has the characteristics of strong convergence performance, few parameters, and easy implementation [29]. Grey wolves belong to canines that live in groups and are at the top of the food chain. The grey wolf strictly observes a hierarchy of social dominance. As shown in Figure 3.

**Figure 3.** Grey wolf social dominance hierarchical relationship.

The GWO optimization process includes five steps. The specific steps are as follows.

(a) Social Hierarchy

First, wolf pack and set the number are initialized, then the fitness value of each individual in the wolf pack are calculated. Mark the grey wolves with the top three fitness values as α, β, δ, and the remaining wolves as ω. That is to say, the social rank in the grey wolf group is ranked from high to low in order of α, β, δ, and ω. The three optimal solutions (<sup>α</sup>, β, δ) in each iteration guide the optimization process of GWO.
