Abstract The global transition to sustainable energy demands efficient integration of renewable resources and resilient operation of microgrids (MGs). This study aims to develop a cost-effective and sustainable Energy Management System (EMS) for MGs operating in both grid-connected and islanded modes. The inherent variability of renewable generation and fluctuating grid prices pose significant challenges to maintaining supply-demand balance. To address this, the proposed EMS employs an Improved Whale Optimization Algorithm (IWOA), incorporating a nonlinear swimming parameter and Lévy flight mechanism to prevent premature convergence. Simulation results on a benchmark low-voltage MG reveal that IWOA achieves a 39.66% reduction in operational costs compared to standard algorithms, while maintaining competitive runtime of 4.2 min. Furthermore, a dynamic energy trading strategy is integrated to optimize real-time interactions with the main grid. The findings validate the proposed framework as a robust solution for enhancing the economic and environmental performance of modern power systems.
El-Zaher et al. (Tue,) studied this question.