## 2 A Two-Stage Robust Optimization Model
### Objective Function  
The objective function of the model is to minimize the total cost of the microgrid, which is solved in two stages in this paper. The first-stage objective function is to minimize the initial investment cost in the microgrid, and the second-stage objective function is to minimize the scheduling and operation cost in the microgrid.  
\[\text{min}F=C^{\text{inv}}+C_{\text{open}} \tag{12}\]  
where \(C^{\text{inv}}\) represents the total initial investment cost of the microgrid. \(C_{\text{open}}\) is the operation and maintenance costs of the microgrid equipment.  
(1) Initial investment cost.  
The initial investment cost in the first-stage objective function is the equipment investment cost for wind turbines, distributed photovoltaic power plants, energy storage devices, and micro-gas turbine units, as follows [29]:  
\[\begin{array}{ll}C^{inv}=&E_{bat}^{\text{max}}c_{bat}F_{CRE}(r_{bat},Y_{bat})+ \\ &\sum\limits_{i=1}^{3}P_{i}^{\text{max}}c_{i}F_{CRE}(r_{i},Y_{i})\\ \\ F(r_{i},Y_{i})=\dfrac{r_{i}(1+r_{i})^{Y_{i}}}{\left(1+r_{i}\right)^{Y_{i}}-1} \end{array} \tag{13}\]  
where \(E_{bat}^{\text{max}}\) is the maximum battery capacity of the energy storage device. \(P_{i}^{\text{max}}\) and \(c_{i}\) are the maximum technical output and investment cost per unit power of the \(i\)-th type of power equipment, respectively. \(F_{\text{CRE}}(r_{i},Y_{i})\) is the annual capital recovery rate. \(r_{i}\) and \(Y_{i}\) are the discount rate and discount years of the \(i\)-th type of power equipment, where the discount years of the energy storage device are the float life.  
(2) Operation and maintenance expenses [30].  
\[C_{\text{open}}=C_{\text{G}}^{\text{open}}+C_{\text{grid}}+C_{\text{op}} \tag{15}\]  
\[C_{\text{G}}^{\text{open}}=\sum_{t=1}^{T}c_{\text{fuel},t}\cdot P_{\text{G},t }+\sum_{t=1}^{T}\sum_{n=1}^{N}k_{n,t}\cdot c_{n,t}\cdot P_{\text{G},t} \tag{16}\]  
\[C_{\text{grid}}=\sum_{t=1}^{T}\left(c_{\text{buy},t}P_{\text{M},t}^{\text{buy }}\Delta t-c_{\text{sel},t}P_{\text{M},t}^{\text{bell}}\Delta t\right) \tag{17}\]\[C_{\text{op}}=\sum_{i=1}^{4}C_{\text{op}}^{i}\cdot P_{i,t} \tag{18}\]  
where \(C_{\text{G}}^{\text{open}}\), \(C_{\text{grid}}\), and \(C_{\text{op}}\), respectively, represent the operating costs of the micro-gas turbine, the cost of purchasing and selling electricity for the micro electric vehicle, and the maintenance cost of the equipment. Fuel cost is \(c_{\text{fuel},t}\) for time period \(t\). Real-time output of micro-gas turbines is \(P_{\text{G},t}\) for time period \(t\). \(k_{n,t}\) and \(c_{n,t}\) are the emissions of the nth pollutant and the treatment unit price of the micro-gas turbine during time period \(t\). \(c_{\text{buy},t}\) and \(c_{\text{sell},t}\), respectively, represent the unit price of electricity purchased and sold during time period \(t\). \(P_{\text{M},t}^{\text{buy}}\) and \(P_{\text{M},t}^{\text{sell}}\) are the power of the microgrid selling electricity to the distribution network during time \(t\). \(P_{i,t}\) and \(C_{\text{op}}^{i}\) are the maintenance cost unit price and output during time period \(t\) for energy storage devices, wind turbines, distributed photovoltaic power plants, and micro combustion units, respectively.