5.3.2. Robust Optimization

RO fully considers the uncertainty of the system, and can guarantee stable operation of the system even in a worst-case scenario. The worst-case scenario means the least PV output and the most EV charging. When this happens, the microgrid system must increase the output of the DE to supplement the demand for electricity. Due to the relatively high price of electricity at noon, the microgrid does not purchase electricity from the main grid. Figure 4 shows that the PV output power is fully used, and the EVs are effectively charged at noon to achieve peak load shifting. RO guarantees the stability of the system, but the total cost of the system must increase.

**Figure 4.** Result of robust optimization in a worst-case scenario.

Figure 5 shows the simulation result of RO in a best-case scenario, where PV power generation accounts for a large proportion in the system, and the EV charging capacity is significantly reduced. Because the system is basically self-sufficient, the amount of electricity purchased from the main grid has also dropped markedly.

**Figure 5.** Result of robust optimization in the best-case scenario.

5.3.3. Comparison of Stochastic Optimization and Robust Optimization

In the three results, EVs are charged near 12:00 and renewable energy is used preferentially. Compared with SO, RO fully considers the uncertainty of the system and can operate safely even in the worst case. Table 4 shows that in a worst-case scenario the robust-optimized PV output is smaller, but RO meets more EV charging requirements, and the output of the DE as a rotating standby unit also increases. The total system cost is higher than that of the SO. On the contrary, when RO is in a best-case scenario, the PV output greatly increases while the EV charging capacity decreases, so the system reduces the output of the diesel generator and the power purchase from the main grid, which leads to a reduced total system cost.



### **6. Conclusions and Discussion**

The participation of electric vehicles in microgrid dispatching provides a new solution for grid connection of renewable energy power generation. Finding a method to dispatch the electric vehicle to play its energy storage unit role is a problem that must be solved. An optimal scheduling strategy is very important to the economy, environmental protection, and safety of a microgrid. This paper first analyzes the uncertainty of PV power output and EV charging behavior and expresses this uncertainty in the form of a set. Then, to enhance the economic and environmental benefits of the microgrid, a multi-objective optimization scheduling model is established, and an RO theory is applied to the scheduling model. Finally, the simulation results verify the validity of the proposed model. Compared with SO, RO considers the most conservative situation of the system. The system's economic cost is lowered, and the stable operation of the microgrid system is better guaranteed. The scheduling strategy proposed in this paper is a conservative method, which is suitable for the microgrid system with high security requirements. The case study of this paper can help decision-makers to find corresponding solutions for different microgrid systems.

Next, the following three aspects of research can be summarized.


**Author Contributions:** Conceptualization, R.S. and L.N.; methodology, R.S. and P.Z.; software, P.X. and J.Z.; validation, P.X., and J.Z.; formal analysis, R.S. and P.Z.; investigation, X.H.; resources, L.N.; data curation, J.Z. and X.H.; writing—original draft preparation, R.S., P.Z. and J.Z.; writing—review and editing, R.S., P.Z. and J.Z.; visualization, P.Z. and J.Z.; supervision, R.S.; project administration, L.N.; funding acquisition, R.S. and L.N. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the National Natural Science Foundation of China, grant numbers 71801224 and 61203100, the National Social Science Fund of China, grant numbers 19BTQ098 and by the Fundamental Research Funds for the Central Universities, grant number 16MS42.

**Conflicts of Interest:** The authors declare that they have no conflicts of interest in this work.
