*2.2. Model of PV Array*

PV power generation is one of the main power generation units in the microgrid system. In solving the problem of microgrid optimization and dispatch, it is necessary to accurately predict the power of photovoltaic power generation. Therefore, the output power of photovoltaic should consider solar radiation and temperature, the function is as follows [23]:

$$P\_{\rm pv}(t) = N\_{\rm pv} P\_{\rm rate-pv} \ast \frac{S}{S\_{\rm ref}} \ast \left[1 + K\_l (T\_c - T\_{\rm ref})\right] \tag{3}$$

where *Ppv* is the output power of PV arrays, *Npv* is numbers of PV arrays, the maximum output power of the photovoltaic array is expressed in *Prate*−*pv*. This value is the rated output power obtained by measuring the output of the PV array in a standard environment with a solar radiation intensity (*Sref*) of 1 kW/m<sup>2</sup> and a temperature (*Tref*) of 25 ◦C under no wind conditions. *S* is solar radiation intensity and *Tc* is the PV cell temperature.

The PV cell temperature can be calculated as follows [23],

$$T\_c = T\_a + S(\frac{NOCT - 20}{800})\tag{4}$$

where *Ta* is the ambient temperature and *NOCT* is the temperature of the battery under standard operation.

### *2.3. Model of Energy Storage System (ess)*

The ess can store electric energy when the electric energy is sufficient, and release electric energy when the electric energy is insufficient. The state of charge of the battery is divided into two types: charging and discharging, which increases the flexibility and reliability of the microgrid. The power of the battery is as follows [23,24]:

$$E\_b(t) = E\_b(t-1) + [P\_{pv}(t) + P\_{w}(t) + P\_{ch,t}]\eta\_{b}^{ch} \tag{5}$$

where *Eb*(*t*) and *Eb*(*<sup>t</sup>*−*1*) are the power stored in the battery at times *t* and *t*−1, *Pch,t* represents the battery charging power, η*chb*represents the battery charging efficiency, generally take 95%.

Besides, when the load demand is large, the power of the system cannot meet the load demand, the battery is in a discharged state. Therefore, the energy of the battery at the time t can be expressed as follows [24],

$$E\_b(t) = E\_b(t-1) - \left[P\_{pv}(t) + P\_w(t) + P\_{dcch,t}\right] / \eta\_b^{chh} \tag{6}$$

where η*dch b* represents the battery discharge efficiency, in this study, it is taken 100%. *Pdch,t* represents the battery discharging power.

For the modeling of the above mentioned, there are still many constraints, such as the mutual repulsion constraint of the battery's charge and discharge state, the constraint of the state of charge, and the constraint of charge and discharge power are as follow [23,24]:

$$\begin{array}{l} E\_{b\\_min} \le E\_b(t) \le E\_{b\\_max} \\ E\_{b\\_min} \le (1 - DOD)E\_{b\\_max} \\ E\_{b\\_max} = N\_{batt}E\_{rate-batt} \end{array} \tag{7}$$

where *Nbatt* is the number of battery, *Ebma* and *Ebmin* are the maximum and minimum storage capacity, and *Erate*−*batt* is the battery pack rate (kWh), and DOD is the depth of discharge, which is taken 80% in this study.
