(untitled) (Comprehensive Journal of Science, 2025)
The increased penetration of renewable energy sources in microgrids brings significant uncertainty in power generation, which needs additional buffering and flexibility. Energy storage systems (ESS) are the conventional solution to compensate for this variability; however, their high capital cost limits large-scale deployment. Electric vehicles (EVs), equipped with onboard batteries, provide a promising complementary storage resource when integrated into microgrid scheduling. In this paper, we develop an optimal configuration model for battery storage capacity in grid-connected and islanded microgrids considering the participation of EVs in energy dispatch. The model jointly optimizes the ESS sizing, micro-turbine operation, renewable generation use, and EV charging/discharging strategy. To find the minimum required ESS capacity, an improved mixed-integer programming approach is applied and benchmarked against a particle swarm optimization solution. The simulation results of two representative scenarios show that the involvement of EVs could reduce ESS capacity requirements by up to 33% and decrease daily operating costs. Meanwhile, the improved MIP method provides faster convergence and more practical capacity configuration suitable for engineering deployment. The results confirm that EVs can serve as flexible storage resources, facilitating microgrid economic dispatch and reducing the cost of conventional ESS installations.