## 1 Introduction  
Alternating current (AC) microgrid (MG) systems have emerged as a fundamental paradigm in modernizing electrical infrastructures, particularly in addressing the challenges of integrating distributed generation and meeting operational flexibility requirements [1]. In the current energy transition context, these systems offer a technically and economically viable solution for managing the increasing penetration of fluctuating renewable sources while ensuring power supply quality and reliability [2]. A key enabler of modern MGs is the technological evolution of battery energy storage systems (BESSs). According to recent data from the U.S. Department of Energy (2023), the global installed capacity of BESSs has surpassed 206 GW [3], reflecting their rapid deployment across diverse geographical and operational contexts. This growth is primarily attributed to their capacity to provide critical ancillary services such as generation-demand balancing, frequency regulation, and power quality enhancement [4]. In parallel, the optimal energy management of MGs, especially regarding the coordination of distributed energy resources (DERs), has been a central theme in the specialized literature [5; 6]. Among the various approaches, metaheuristic techniques have gained prominence for their effectiveness in addressing the nonlinearities and high dimensionality inherent to these problems [7]. However, recent studies have highlighted persistent limitations in current control schemes, particularly in the comprehensive integration of BESSs within energy management systems (EMSs) [8; 9]. Addressing these gaps, recent research in DER optimization has increasingly focused on minimizing technical losses in distribution and transformation stages and operation costs [10], as well as reducing CO\({}_{2}\) emissions associated with energy generation and DER operation. Metaheuristic approaches such as Particle Swarm Optimization (PSO), Vortex Search Algorithm (VSA), Chu & Beasley Genetic Algorithm (CBGA), Ant Lion Optimization (ALO), and JAYA have shown promising results in EMS applications for AC MGs [11; 12]. These methods enable the optimal dispatch of distributed generators, reducing energy losses and emissions while complying with operational constraints in both grid-dependent and self-powered modes. Nevertheless, EMS strategies that focus solely on generation control without effectively coordinating energy storage often lead to wasted surplus energy [4]. Storing this excess for later use during peak demand can significantly enhance MG efficiency, reduce losses, and improve system performance [13]. In this context, several studies have proposed BESS-centric EMS strategies aimed at both reducing CO\({}_{2}\) emissions and mitigating energy losses. For instance, ref. [14] introduces the Opposition-Based Learning Grey Wolf Optimizer (GWO) for managing hybrid renewable-conventional MGs, focusing on minimizing grid carbon footprint and transmission losses. This method outperformed alternatives, such as PSO, CSA, GWO, and GGWO, in convergence speed and efficiency. However, its scope was limited to grid-dependent mode, leaving a critical gap in addressing standalone operation, an increasingly relevant scenario in real-world applications. Similarly, in [15], the authors proposed an optimization approach to determine the optimal placement and sizing of BESSs in distribution networks. The goal was to reduce reverse power flow from high DG penetration and manage peak shaving during high-demand periods. GA, PSO, and the Salp Swarm Algorithm (SSA) were used for optimization. Tests on 33- and 69-bus systems showed PSO and SSA performed best. However, battery dispatch was approximated using the Fourier series, which may not yield truly optimal BESS configurations. Complementing these efforts, in [16], the optimal power dispatch problem is addressed using the Monte Carlo method.