DOI:
https://doi.org/10.14483/23448393.23474Published:
2025-08-01Issue:
Vol. 30 No. 2 (2025): May-AugustSection:
Electrical, Electronic and Telecommunications EngineeringEnergy Management System using Particle Swarm Optimization for Operating Costs Reduction in AC Microgrids with Battery Storage during Grid-Connected and Islanded Operation
Sistema de gestión de energía mediante optimización por enjambre de partículas para la reducción de costos operativos en microrredes de CA con almacenamiento en baterías durante la operación interconectada y aislada
Keywords:
Energy management system, battery energy storage, microgrids, swarm optimization, grid-on, grid-off (en).Keywords:
Sistema de gestión de energía, Almacenamiento de energía en baterías, Microrred, Optimización por cúmulo de ´´´ partículas (es).Downloads
References
A. Mohammed, S. S. Refaat, S. Bayhan, and H. Abu-Rub, “Ac microgrid control and management strategies: Evaluation and review,” IEEE Power Elect. Mag., vol. 6, no. 2, pp. 18–31, 2019. https://doi.org/10.1109/MPEL.2019.2910292
A. N. Sheta, G. M. Abdulsalam, B. E. Sedhom, and A. A. Eladl, “Comparative framework for ac-microgrid protection schemes: challenges, solutions, real applications, and future trends,” Protect. Control Mod. Power. Syst., vol. 8, no. 2, pp. 1–40, 2023. https://doi.org/10.1186/s41601-023-00296-9
R. Kandari, N. Neeraj, and A. Micallef, “Review on recent strategies for integrating energy storage systems in microgrids,” 2023. https://doi.org/10.3390/en16010317
M. Uzair, L. Li, M. Eskandari, J. Hossain, and J. G. Zhu, “Challenges, advances and future trends in ac microgrid protection: With a focus on intelligent learning methods,” Renew. Sust. Energy Rev., vol. 178, p. 113228, 2023. https://doi.org/10.1016/j.rser.2023.113228
A. A. R. Mohamed, R. J. Best, X. Liu, and D. J. Morrow, “Two-phase bess optimization methodology to enhance the distribution network power quality and mitigate violations,” IET Renew. Power Gen., vol. 17, no. 11, pp. 2895–2908, 2023. https://doi.org/10.1049/rpg2.12583
N. I. Labra-Caceres, L. F. Grisales-Noreña, R. I. Bolanos, J. A. Guzman-Henao, and O. D. Montoya, “Energy management system for PV-based distributed generators in AC microgrids using an adapted JAYA optimizer to minimize operational costs, energy losses, and CO2 emissions,” Res. Eng., p. 104397, 2025. https://doi.org/10.1016/j.rineng.2025.104397
L. F. Grisales-Noreña, H. P. Vega, O. D. Montoya, V. Botero-Gomez, and D. Sanin-Villa, “Cost optimization of ac microgrids in grid-connected and isolated modes using a population-based genetic algorithm for energy management of distributed wind turbines,” Mathematics, vol. 13, no. 5, p. 704, 2025. https://doi.org/10.3390/math13050704
A. Rajagopalan, K. Nagarajan, O. D. Montoya, S. Dhanasekaran, I. A. Kareem, A. S. Perumal, N. Lakshmaiya, and P. Paramasivam, “Multi-objective optimal scheduling of a microgrid using oppositional gradient-based grey wolf optimizer,” Energies, vol. 15, no. 23, p. 9024, 2022. https://doi.org/10.3390/en15239024
L. Grisales-Noreña, B. Cortes-Caicedo, O. D. Montoya, J. Hernandez, and G. Alcala, “A battery energy management system to improve the financial, technical, and environmental indicators of colombian urban and rural networks,” Journal of Energy Storage, vol. 65, p. 107199, 2023. https://doi.org/10.1016/j.est.2023.107199
Q. Yan, Z. Wang, L. Xing, and C. Zhu, “Optimal economic analysis of battery energy storage system integrated with electric vehicles for voltage regulation in photovoltaics connected distribution system,” Sustainability, vol. 16, no. 19, p. 8497, 2024. https://doi.org/10.3390/su16198497
S. Alexprabu and K. Sathiyasekar, “Battery energy management systems in active distribution network,” in 2023 4th Int. Conf. Smart Elect. Comm. (ICOSEC). IEEE, 2023, pp. 194–200. https://10.1109/ICPCSN58827.2023.00123
Y. Sahri, Y. Belkhier, S. Tamalouzt, N. Ullah, R. N. Shaw, M. S. Chowdhury, and K. Techato, “Energy management system for hybrid pv/wind/battery/fuel cell in microgrid-based hydrogen and economical hybrid battery/super capacitor energy storage,” Energies, vol. 14, no. 18, p. 5722, 2021. https://doi.org/10.3390/en14185722
T. A. Fagundes, G. H. F. Fuzato, L. J. R. Silva, A. M. dos Santos Alonso, J. C. Vasquez, J. M. Guerrero, and R. Q. Machado, “Battery energy storage systems in microgrids: A review of soc balancing and perspectives,” IEEE Op. J. Ind Elect. Soc., 2024. https://doi.org/10.1109/OJIES.2024.3455239
S. Wang, Q. Tan, X. Ding, and J. Li, “Efficient microgrid energy management with neural-fuzzy optimization,” Int. J. Hydrogen Energy, vol. 64, pp. 269–281, 2024. https://doi.org/10.1016/j.ijhydene.2024.03.291
R. Nebuloni, L. Meraldi, C. Bovo, V. Ilea, A. Berizzi, S. Sinha, R. B. Tamirisakandala, and P. Raboni, “A hierarchical two-level milp optimization model for the management of grid-connected bess considering accurate physical model,” App.Energy, vol. 334, p. 120697, 2023. https://doi.org/10.1016/j.apenergy.2023.120697
S. Behera and N. B. Dev Choudhury, “A systematic review of energy management system based on various adaptive controllers with optimization algorithm on a smart microgrid,” Int. Trans. Elect. Energy Syst., vol. 31, no. 12, p. e13132, 2021. https://doi.org/10.1002/2050-7038.13132
A. Kazikova, M. Pluhacek, and R. Senkerik, “Why tuning the control parameters of metaheuristic algorithms is so important for fair comparison?” Mendel, vol. 26, no. 2, pp. 9–16, 2020. https://doi.org/10.13164/mendel.2020.2.009
C. Huang, Y. Li, and X. Yao, “A survey of automatic parameter tuning methods for metaheuristics,” IEEE Trans. Evol. Comp., vol. 24, no. 2, pp. 201–216, 2019. https://doi.org/10.1109/TEVC.2019.2921598
L. S. Avellaneda-Gomez, L. F. Grisales-Noreña, B. Cortes-Caicedo, O. D. Montoya, and R. I. Bolanos, “Optimal battery operation for the optimization of power distribution networks: An application of the ant lion optimizer,” J. Energy Storage, vol. 84, p. 110684, 2024. https://doi.org/10.1016/j.est.2024.110684
M. Issa, H. Ibrahim, H. Hosni, A. Ilinca, and M. Rezkallah, “Effects of low charge and environmental conditions on diesel generators operation,” Eng, vol. 1, no. 2, pp. 137–152, 2020. https://doi.org/10.3390/eng1020009
A. Soroudi, Power system optimization modeling in GAMS. Springer, 2017, vol. 78. https://doi.org/10.1007/978-3-319-62350-4
F. Marini and B. Walczak, “Particle swarm optimization (pso). a tutorial,” Chemometrics Intell. Lab. Syst., vol. 149, pp. 153–165, 2015. https://doi.org/10.1016/j.chemolab.2015.08.020
S. Charadi, H. E. Chakir, A. Redouane, A. El Hasnaoui, and M. Et-taoussi, “Bi-objective optimal active and reactive power flow management in grid-connected AC/DC hybrid microgrids using metaheuristic–PSO,” Clean Energy, vol. 7, no. 6, pp. 1356–1380, 12 2023. https://doi.org/10.1093/ce/zkad081
D. Wang, D. Tan, and L. Liu, “Particle swarm optimization algorithm: an overview,” Soft Comp., vol. 22, no. 2, pp. 387–408, 2018. https://doi.org/10.1007/s00500-016-2474-6
V. Kusuma, A. Firdaus, S. Suprapto, D. Putra, Y. Prasetyo, and F. Filliana, “Leveraging pso algorithms to achieve optimal stand-alone microgrid performance with a focus on battery lifetime,” Int. J. App. Power Eng., vol. 12, no. 3, pp. 293–299, Sep. 2023. https://doi.org/10.11591/ijape.v12.i3.pp293-299
O. D. Montoya and W. Gil-González, “On the numerical analysis based on successive approximations for power flow problems in ac distribution systems,” Elect. Power Syst. Res., vol. 187, p. 106454, 2020. https://doi.org/10.1016/j.epsr.2020.106454
M. E. Baran and A. W. Kelley, “A branch-current-based state estimation method for distribution systems,” IEEE Trans. Power Syst., vol. 10, no. 1, pp. 483–491, 1995. https://doi.org/10.1109/59.373974
A. Hirsch, Y. Parag, and J. Guerrero, “Microgrids: A review of technologies, key drivers, and outstanding issues,” Renew. Sust. Energy Rev., vol. 90, 04 2018. https://doi.org/10.1016/j.rser.2018.03.040
S. Parhizi, A. Khodaei, and S. Bahramirad, “State of the art in research on microgrids: A review,” IEEE Access, vol. 3, pp. 1–1, 01 2015. 10.1109/ACCESS.2015.2443119
W. Gil-González, O. D. Montoya, L. F. Grisales-Noreña, and A. Escobar-Mejía, “Optimal economic–environmental operation of bess in ac distribution systems: A convex multi-objective formulation,” Computation, vol. 9, no. 12, p. 137, 2021. https://doi.org/10.3390/computation9120137
Tensiones y Frecuencia Nominales en Sistemas de Energa Electrica En Redes de Servicio Publico NTC 1340, I.C. de Normas Tecnicas y Certificacion (ICONTEC), 2004.
B. Cortes-Caicedo, L. F. Grisales-Noreña, O. D. Montoya, M. A. Rodriguez-Cabal, and J. A. Rosero, “Energy management system for the optimal operation of pv generators in distribution systems using the antlion optimizer: A colombian urban and rural case study,” Sustainability, vol. 14, no. 23, p. 16083, 2022. https://doi.org/10.3390/su142316083
B. Do˘gan and T. Olmez, “A new metaheuristic for numerical function optimization: Vortex search algorithm,” Info. Sci., vol. 293, pp. 125–145, 2015. https://doi.org/10.1016/j.ins.2014.08.053
P. C. Chu and J. E. Beasley, “A genetic algorithm for the multidimensional knapsack problem,” J. Heuristics, vol. 4, pp. 63–86, 1998.
R. W. Hockney and C. R. Jesshope, Parallel Computers 2: architecture, programming and algorithms. CRC Press, 2019. https://doi.org/10.1201/9780367810672
D.-H. Yoon and Y. Han, “Parallel power flow computation trends and applications: A review focusing on gpu,” Energies, vol. 13, no. 9, p. 2147, 2020. https://doi.org/10.3390/en13092147
S. Lalwani, H. Sharma, S. C. Satapathy, K. Deep, and J. C. Bansal, “A survey on parallel particle swarm optimization algorithms,” Arabian J. Sci. Eng., vol. 44, pp. 2899–2923, 2019. https://doi.org/10.1007/s13369-018-03713-6
L. F. Grisales-Noreña, O. D. Montoya, E.-J. Marin-Garcia, C. A. Ramos-Paja, and A.-J. Perea-Moreno, “Integration of pv distributed generators into electrical networks for investment and energy purchase costs reduction by using a discrete–continuous parallel pso,” Energies, vol. 15, no. 20, p. 7465, 2022. https://doi.org/10.3390/en15207465
P. Chu and J. Beasley, A genetic algorithm for the set partitioning problem. London, UK: Imperial College, 1995.
V. M. Garrido-Arévalo, O. D. Montoya, W. Gil-González, L. F. Grisales-Noreña, and J. C.
Hernandez, “An sdp relaxation in the complex domain for the efficient coordination of bess and dgs in single-phase distribution grids while considering reactive power capabilities,” J. Energy Storage, vol. 90, p. 111913, 2024. https://doi.org/10.1016/j.est.2024.111913
How to Cite
APA
ACM
ACS
ABNT
Chicago
Harvard
IEEE
MLA
Turabian
Vancouver
Download Citation
Recibido: 18 de marzo de 2025; Aceptado: 23 de julio de 2025
Abstract
Context:
This paper proposes an energy management system (EMS) for battery energy storage systems (BESS) to reduce operating costs in AC microgrids (MGs) operating in grid-connected (GON) and islanded (GOFF) mode, considering energy purchase, conventional generation, and maintenance costs while accounting for all the operational constraints of the system and its components.
Method:
A master-slave methodology based on particle swarm optimization (PSO) andanhourlypowerflowbasedonthesuccessiveapproximations method (SAM)is used as a smart BESS operation strategy. This proposal is validated in a 33-bus AC MGoperating in GONandGOFFmodes,incomparisonwithtwomethodsutilizing the vortex search algorithm (VSA) and conitnuos version of the Chu & Beasley ge netic algorithm (CBGA) and the same power flow.
Results:
The PSO-based EMSachievedthelowestcostsi.e., 6897.59 USD/day (GON) and 17 527.42 USD/day (GOFF), with cost reductions of 1.45 and 0.13%, and low standard deviation values (0.067 and 0.014%), which confirms its efficiency, robust ness, and constraint compliance.
Conclusions:
The EMS based on PSO/SAM delivers superior solution quality and processing times in both modes of operation. In GON mode, it reduces the mean costs by0.0287%comparedtotheVSAand0.2252%vs.the CBGA,where as,inGOFF mode, the reductions are 0.0191 and 0.0355%, respectively. These results reflect a more effective cost reduction than exact methods, which constitutes this paper’s main contribution.
Keywords:
energy management system, battery energy storage, microgrids, swarm optimization, grid-on, grid-off.Resumen
Contexto:
En este artículo se propone un sistema de gestión energética (EMS) para sistemas de almacenamiento de energía en baterías (BESS) orientado a la reducción de costos operativos en microrredes (MG) AC que operan conectados a la red (GON) y en modo isla (GOFF), considerando los costos de compra de energía, generación convencional y mantenimiento a la vez que se cumple con todas las restricciones operativas del sistema y sus componentes.
Método:
Comoestrategia de operación inteligente del sistema de almacenamiento en baterías, se utiliza una metodología maestro-esclavo basada en optimización por enjambre de partículas y un flujo de potencia horario basado en el método de aproximaciones sucesivas (SAM). Esta propuesta se valida en una MG-AC de 33 nodos, operando en modos GON y GOFF, en comparación con dos métodos alternativos que utilizan el algoritmo de búsqueda por vórtices (VSA) y el algoritmo genético continuo de Chu&Beasley (CBGA) y el mismo método de flujo de potencia. Resultados: El EMS basado en PSOalcanzó los menores costos, i.e., 6897.59 USD/día (GON) y 17 527.42 USD/día (GOFF), con reducciones en costos del 1.45 y el 0.13% respectivamente y bajas desviaciones estándar (0.067 y 0.014%), lo que confirma su eficiencia, robustez y cumplimiento de restricciones.
Conclusiones:
El EMS basado en PSO/SAM ofrece una calidad de solución y un tiempo de procesamiento superiores en ambos modos de operación. En el modo GON, reduce los costos promedio en un 0.0287% en comparación con el VSA y en un 0.2252% con respecto al CBGA, mientras que, en el modo GOFF, las reducciones son de 0.0191 y 0.0355% respectivamente. Estos resultados reflejan una reducción de costos más efectiva que la obtenida por métodos exactos, lo que constitye la principal contribución de este artículo.
Palabras clave:
sistema de gestión de energía, almacenamiento en baterías, microrredes, optimización por enjambre de partículas, conectado a la red, aislado de la red.Introduction
In the last decade, alternating current (AC) microgrids (MG) have been increasingly adopted due to their advantages over conventional grids (1,2). These advantages include the integration of multiple renewable energy sources, an improved control of power demand, and the incorporation of battery energy storage systems (BESS) to manage power surplus (3). AC-MGs also allow for interconnection with conventional grids, creating opportunities to enhance the technical, economic, and environmental performance of electrical systems 4,5).
In recent years, numerous studies have focused on the optimal operation of distributed energy resources (DERs), aiming to reduce the operating costs associated with energy production or purchasing from conventional generators (CG), as well as the maintenance costs related to DERs. These methods enable the optimal coordination of distributed generators (DGs) by minimizing operating costs while satisfying technical constraints in both their grid-connected and standalone modes of operation. However, when energy management strategies focus solely on generation control without integrating energy storage coordination, a considerable amount of surplus energy is wasted. This energy could otherwise be stored and used during peak demand periods, thereby improving MG efficiency and further lowering their operating costs (6,7).
In the context of energy management systems (EMS) for BESS in AC-MGs, several studies in the specialized literature have sought to reduce operating costs. One such example is presented in (8), which employs the opposition-based learning grey wolf optimizer (OLGWO) to enhance the operation of MGs with both renewable and non-renewable DG. This approach, which seeks to minimize operating costs, is benchmarked against the particle swarm optimizer (PSO), the cuckoo search algorithm (CSA), the grey wolf optimizer (GWO), and the gradient-based grey wolf optimizer (GGWO), demonstrating superior convergence speed and solution quality. However, this approach is only evaluated under grid-connected conditions, without considering standalone operation, which limits its validation in real-world scenarios- where MGs must operate in both modes.
The research presented in (9) addresses the problem of EMS for BESS in urban and rural AC distribution networks, with the objective of improving the economic performance of the grid. A mathematical model is developed to minimize operating costs while considering the technical constraints typical of AC networks, including those related to maximum power point tracking photovoltaic (PV) operation and BESS. The proposed solution follows a master-slave strategy, employing metaheuristic methods such as the vortex search algorithm (VSA), PSO, and the continuous genetic-based algorithm (CBGA) in combination with a successive approximations-based hourly power flow algorithm. The model was tested on two Colombian distribution networks — one in grid-connected mode and the other in islanded mode — using real generation and demand data. According to the results, the proposed methodology outperforms PSO and CBGA in terms of solution quality, repeatability, and processing times. However, the issue of parameter tuning is not properly addressed, which limits the performance of otherwise efficient techniques like PSO. To fully exploit the capabilities of each method, a deep and systematic tuning process is essential. Furthermore, although the study considers both grid-connected and islanded operation, it focuses exclusively on static active network scenarios, without evaluating real MG dynamics, where mode transitions may occur due to faults or grid disconnections. In this vein, control strategies must be robust and adaptable to ensure optimal performance under realistic and dynamic operating conditions.
In (9), convex optimization is used within an EMS for AC grids aimed at the optimal dispatch of BESS and renewable sources. Although effective, the use of exact methods like semi-definite programming increases solution complexity and limits adaptability to different scenarios. In contrast, metaheuristic strategies, when properly tuned, can achieve a solution quality comparable to simpler processes requiring lower computational effort. Their ability to deliver consistent results with low standard deviation values makes them a practical alternative to exact methods in real-world applications.
In (10), a comprehensive economic strategy is proposed for voltage regulation in distribution networks with high PV penetration while integrating BESS and electric vehicles (EV). The objective function aims to maximize the total revenue through the joint management of electricity rates, DERs, and participation in the electricity market. The methodology follows a master-slave model comprising two stages: i) day-ahead forecasting using a hybrid pelican optimization algorithm-XGBoost strategy for the PV output and ii) real-time operation through PSO-based multi-objective optimization. This model was validated on an IEEE 33-bus test network, comparing scenarios with different EV and BESS configurations. Significant economic savings and improvements in voltage quality were achieved. Nevertheless, a key limitation of this study is its assumption of a continuous grid connection, failing to assess system behavior in islanded mode. This restricts the evaluation of operational autonomy and the MG’s resilience under external contingencies.
The authors of (11) present an EMS for active distribution networks using BESS. Their objective function aims to minimize the hourly active power losses of the network while considering operating costs and economic benefits. The methodology employs an advanced evolutionary algorithm (AEA) based on genetic principles to optimize the siting, sizing, and coordinated dispatch of BESS alongside distributed wind generation. This approach was validated on an IEEE radial 33-bus distribution system under four scenarios, assessing different configurations with and without BESS and wind integration. The results show that the combined incorporation of BESS and wind resources can reduce network losses by up to 57.2%, in addition to enhancing voltage stability. However, this research is limited to grid-connected systems and does not explicitly consider autonomous or islanded operation, which restricts its applicability to MG with high levels of operational independence.
The work by (12) develops an EMS for hybrid MGs integrating multiple renewable energy sources and storage technologies, with a focus on ensuring service continuity and improving power quality. The system’s implicit objective is to minimize power fluctuations and maximize operational efficiency through DC voltage regulation and the intelligent, sequential use of available energy resources. The control strategy combines fuzzy logic techniques with direct reactive power control (DRPC), employing multilevel converters for the rotors of doubly-fed induction generators (DFIG). This system was validated through MATLAB/Simulink simulations under two configurations: one using batteries and supercapacitors to smooth active power fluctuations and another incorporating an electrolyzer and fuel cell for hydrogen storage and energy recovery during shortfalls. The results show significant improvements in voltage regulation and a reduction in transient stress within the system. However, this study assumes a continuous connection to the main grid and does not explore a fully islanded operation, which limits its applicability in autonomous MG6 environments.
In recent years, several studies have proposed EMS for the optimal operation of BESS in AC MGs (13). Most of these works focus on minimizing operating costs through a variety of solution methodologies, including convex optimization, metaheuristic techniques, linear programming, and commercial software tools (14-16). This study aims to maximize the benefits of BESS while achieving the lowest possible operating costs and ensuring consistent performance with minimal standard deviation values and reduced processing times at each execution. The literature emphasizes the effectiveness, robustness, and simplicity of metaheuristic approaches in the implementation of EMS, as they significantly reduce system complexity and deployment costs compared to commercial software. Therefore, metaheuristic optimization methods were adopted in this paper as the core solution strategy.
Table I summarizes the methodologies reviewed in the state of the art regarding EMS for BESS in AC-MGs. As shown in Table I, the most recent studies on EMS with BESS in AC-MGsfocusongrid-connected scenarios, primarily employing metaheuristic or hybrid methodologies to optimize economic objective functions. While significant progress has been made in terms of computational efficiency and solution quality, a notable gap remains in the evaluation of energy management strategies under islanded operating conditions or during dynamic transitions between modes.
Table I.: Comparative summary of recent studies on EMS with BESS in AC-MGs
Recognizing the current need to develop effective EMS for BESS scheduling in AC-MGs, this work proposes a robust methodology focused on minimizing operating costs through the use of highly efficient metaheuristic techniques. A distinctive feature of the proposed approach is the incorporation of a systematic tuning procedure, which ensures the optimal performance of the optimization algorithm in both grid-connected (GON) and islanded (GOFF) operating modes.
The core of the proposed methodology is the PSO, which is employed to determine the optimal dispatch of BESS. To solve the hourly power flow, the successive approximations (SA) method was selected, given its proven compatibility with metaheuristic optimization. Crucially, the PSO was f ine-tuned through a dedicated parameter calibration process, designed to enhance its convergence properties and solution robustness (17, 18). To ensure a fair and comprehensive comparison, two additional algorithms, i.e., the VSA and the CBGA, were also subjected to the same tuning procedure and evaluated under identical conditions using the SA power flow method. This comparative framework allowed for a rigorous assessment of each algorithm’s performance under both GON and GOFFconditions.
Validation was carried out on a 33-bus test feeder incorporating real-world generation and demand profiles from the city of Medellín, Colombia. The test system considered the presence of PV generation operating in maximum power point tracking mode in all scenarios. Meanwhile, in the GOFF mode, a diesel generator was included to support the energy supply during low-generation periods. This setup allowed evaluating the EMS under realistic and dynamic MG conditions.
For each method and scenario, 100 independent simulations were performed to evaluate the bestcase and average performance, the standard deviation, and the computation time required. The results clearly demonstrate that the proposed PSO-based strategy delivers the most cost-effective solutions, achieving superior performance across all metrics and modes of operation. These findings directly address a gap in the literature, which often limits the analysis to static or GON conditions without evaluating transition dynamics or GOFF performance.
From an academic standpoint, this work advances the state of the art by introducing a systematically tuned metaheuristic approach for BESS operation within MGs, which is explicitly validated in both GON and GOFF configurations. The study not only confirms the importance of algorithm tuning often neglected in previous research- but also shows that such calibration significantly improves convergence stability, repeatability, and solution quality when compared to other commonly used metaheuristics.
From an industry perspective, the proposed EMS provides a practical and scalable solution for modern distribution networks with a high penetration of renewable energy and BESS. Its validation with real demand and generation data confirms its applicability in real-world settings, particularly in regions with frequent service interruptions or limited grid infrastructure. The system’s ability to maintain optimal performanceunderdiverseandrealistic conditions enhances its robustness and makes it a valuable tool for operational planning and cost-effective energy management in contemporary power systems
The remainder of this document is organized as follows. Section 2 presents the mathematical model for AC-MGs operating in GON and GOFF modes, which aims to reduce operating costs by integrating the full set of constraints that represent AC-MGs in the presence of DERs. Section 3 describes the proposed master-slave methodology, based on PSO andSA,aswellasthemethodsusedforcomparison and the optimizer parameters obtained through a smart selection process. Section 4 describes the test system used for validation, and Section 5 presents the simulation results. Finally, Section 6 outlines the conclusions of this research, as well as some proposals for future work.
Mathematical formulation
The objective of the proposed model is to minimize the total operating cost of an AC-MG over a daily planning horizon. This cost includes both energy purchasing from conventional generators, the operation and maintenance (O&M) costs of DGs and BESS, and the production cost of the diesel generators used in GOFF mode. Our mathematical model is based on the work by (19).
The total operating cost is defined in Eq. (1) as the sum of two components: f1, the cost of the energy purchased or produced from conventional generators, and f2, the cost associated with the operation of the BESS and DGs installed in the MG.
The first component, shown in Eq. (2), corresponds to the total energy purchasing or production cost. Here, C
kWh is the average energy price in monetary units per kilowatt-hour,
represents the active power supplied by the conventional generator at node i during period h, C
i,h
cg
is the variable cost of energy production at node i and hour h, and ∆h is the length of each time period (typically one hour).
The second component, presented in Eq. (3), aggregates the O&M costs. Its first term considers the cost associated with the energy charged or discharged by the BESS, where C
O&M
B
is the maintenance cost per unit of energy, and P
i,h
B
represents the active power (positive for discharge, negative for charge) from the BESS at node i and hour h. The second term captures the cost of energy produced by DGs, with
being the O&M cost per kilowatt-hour and
P
i,h
dg
the power generated by the DG at node i and hour h.
The system’s operation is subject to several technical constraints. For instance, Eq. (4) ensures the active power balance at each node i and hour h. Its left-hand side represents the sum of all active power sources: conventional generation P
i,h
cg
, DG P
i,h
dg
, and BESS power P
i,h
B
, minus the active load demand
. The right-hand side models the power flow using the polar form, where v
i,h
and v
j,h
are voltage magnitudes at nodes i and j, Y
ij
is the magnitude of the admittance between nodes i and j, θ
i,h
and θ
j,h
are voltage angles, and φ
ij
is the admittance phase angle.
Eq. (5) models the reactive power balance. Here,
and
denote the reactive power generated and demanded at node i and hour h, respectively.
Eqs. (6) and (7) impose lower and upper bounds on the active and reactive power outputs of conventional generators, respectively. The limits
m´ın, and
m´ax represent technical constraints based on generator capacity.
When the AC-MG operates in GOFF mode, additional constraints must be included to properly represent the behavior of the diesel generator. In this mode, the system cannot export or absorb power, so the generator can only supply energy to the MG.
Furthermore, if the generator is in operation, it must comply with minimum and maximum technical limits, which are defined as a percentage of its nominal capacity, i.e., 40 and 80 % of the nominal power(20). These constraints ensure an efficient and safe operation, preventing inefficient or unsafe conditions while helping to preserve the equipment’s lifespan
Eq. (9) defines the bounds for the DGs. Here,
Gdg
h
is a normalized solar irradiance coefficient (in p.u.) for hour h, which is used to scale the maximum power output
.
Eq. (10) ensures that the BESS operate within their charging and discharging power limits, which are denoted by
and
.
The maximum discharging and charging power of the BESS at node i is defined in Eqs. (11) and (12) as a function of the BESS capacity C i B and its corresponding discharging (td B i ) and charging (tc B i ) times.
The voltage and current constraints are expressed by Eqs. (13) and (14), where V
i
min
,V
i
max
denote the voltage limits and
is the maximum current flowing through line ij.
The state of charge (SoC) of each BESS is dynamically updated using Eq. (15), where/ represents an efficiency-based coefficient and ∆t is the time step.
The charge/discharge coefficient ϕ B i , shown in Eq. (16), depends on capacity and maximum power ratings of the BESS (21).
The initial and final SoC are set using Eqs. (17) and (18). The SoC must always stay within the predefined minimum and maximum limits, as shown in Eq. (19).
Solution methodology:PSO/SAM
This study employs a master-slave methodology that combines the PSO and the successive approximations method (SAM) to determine the optimal operation of BESS in AC-MGs that incorporate PV generators operating at their maximum power point. PSO is responsible for determining the BESS operation schedule over a 24-hour horizon, while SAM solves the power flow, evaluating the objective function and the constraints associated with each possible BESS operating condition within the MG.
Master stage: PS
This work proposes a solution method based on PSO to determine the optimal operation of BESS in AC-MGs (22). PSO is a population-based metaheuristic inspired by the coordinated movement of bird f locks or fish schools. In each iteration, the algorithm updates the position of each particle using both individual knowledge (the best solution found by the particle) and social knowledge (the best solution found by the entire population) (23,24).
The algorithm starts by defining all the relevant parameters, i.e., the number of particles (ns), the number of variables (nv), the maximum number of iterations (tmax), the inertia limits (Inermax, Inermin), the cognitive and social factors (Φ1, Φ2), and the velocity bounds (V elmin, V elmax). Each particle is initialized randomly within the search space:
where αj ∼ U(0,1) for k = 1,...,ns and j = 1,...,nv. In the optimal BESS operation problem, each particle in the PSO represents a candidate solution, whose position corresponds to the charging or discharging power levels of the BESS installed in the AC-MG
Fig. 1 presents the encoding used to represent the 24-hour operating profile of each BESS. Each row corresponds to a BESS and is divided into hourly intervals. The values represent the normalized power levels for charging or discharging at each time step. The first and last hours are highlighted to reflect boundary conditions, assuming an initial and final SoC of 50%, as per IEEE recommendations (9). This structure allows the PSO to evaluate each particle as a complete and feasible operation schedule for the BESS.
Figure 1: Encoding used to generate a solution for operation of BESS in AC-MGs
Once the initial population has been generated, the objective function is evaluated for each particle using the SAM described in slave stage. The initial position of each particle becomes its personal best, and the best solution among all particles is set as the global best.
In each iteration t, the inertia coefficient is linearly updated.
The PSO’s velocity update equation determines how each particle adjusts its trajectory within the solution space. For each particle k and each dimension j, the updated velocity at iteration t, denoted as
, is calculated as follows:
This expression consists of three components. The first term,
, represents the inertia component, which preserves part of the previous velocity to maintain the particle’s momentum. The second term,
, is the cognitive component, which drives the particle toward its own best-known position. Here, Φ1 denotes the cognitive acceleration coefficient, and β
j
is a uniformly distributed random number in the interval (0,1). The third term,
, is the social component, which attracts the particle towards the best position found by the entire swarm. Here, Φ2 is the social acceleration coefficient, and γ
j
is another random value in (0,1). Together, these three components balance exploration and exploitation, allowing the swarm to converge towards optimal or near-optimal solutions 25.
Once the velocity has been updated, the new position of each particle is calculated by means of the following equation:
In this expression,
represents the updated position of particle k in dimension j at iteration t. This is obtained by adding the newly computed velocity
to the particle’s previous position
. This operation allows the particle to move through the solution space, guided by the influence of its own experience and the collective knowledge of the swarm. This step is essential for exploring new candidate solutions and gradually approaching the global optimum.
In this study, the velocity and position of each particle are updated while ensuring that they remain within the feasible operating range. Specifically, the power values associated with each particle are limited according to the maximum charging and discharging capabilities specified in the datasheet of the BESS under consideration.
After evaluating the objective function and constraints of the new positions using the slave stage, the personal best of each particle and the global best of the swarm are updated if better solutions are found. The algorithm stops when it reaches a predefined maximum number of iterations. The best solution found is returned as the optimal BESS schedule. A summary of the parallel PSO (PPSO) is presented in Fig. 2, which illustrates the main steps and structure of the proposed approach.
Figure 2: Step-by-step flowchart of our PSO method
Slave stage: SAM
In our proposal’s master stage, the PSO generates candidate operation schedules for the BESS over a 24-hour horizon. Each particle represents a potential combination of hourly charging and discharging power values for each BESS.
The slave stage is responsible for evaluating the technical viability and overall performance of each candidate solution provided by the PSO in relation to the objective function and constraints. This is accomplished through a sequential, hour-by-hour power flow analysis using the SAM (26). The selection of this method was based on its excellent performance in terms of convergence and processing times, as it has outperformed both classical and modern approaches such as the Newton-Raphson, Gauss-Seidel, accelerated Gauss-Seidel, Levenberg-Marquardt, and graph-based backward/forward sweep methods.
The evaluation process follows the steps presented below.
1. Hourly data setup: For each hour h ∈ {1,2,...,24}, retrieve:
-
The load demand profile
-
The power output from PV generation
-
The charging/discharging power values of the BESS (provided by the PSO)
2. Solve the power flow: Using the SAM, solve the nodal equations to estimate the voltage magnitudes and line flows:
3. Constraint verification: Check whether the solution satisfies all operational limits, i.e.,
-
the voltage magnitude boundaries at each node
-
that the current flows within thermal limits of the lines
-
that the BESS operates within its charge/discharge capacity
4. Penalty assessment: If violations are detected, penalty terms are added to the objective function in order to reduce the quality of the solution. To this effect, the fitness function reported in (9) is employed.
5. Cost aggregation: Once all 24 hourly scenarios have been evaluated, the total operating cost of the MGis calculated by applying the fitness function, which includes penalties for any constraint violations associated with the proposed schedule.
6. Feedback for the PSO: The final fitness value is returned to the master stage (PSO), which uses it to guide the swarm toward more optimal BESS schedules in the next iterations.
This methodology allows for a dynamic evaluation of the MG under various BESS operation scenarios, ensuring that each proposed solution is both technically feasible and economically sound. The SAM offers a computationally efficient approach for solving the power flow equations, while the PSOof BESS schedules enhances voltage regulation, operational reliability, and cost-effectiveness.
Test system
For validation purposes, this study used a 33-bus AC-MG as a test system, evaluating its operation in both GONandGOFFmodes(27). The analysis considers the variable power generation and demand profiles typical of Medellín, Colombia, based on data reported by the local public utility, Empresas Públicas de Medellín (EPM), and NASA datasets (9). A single-line diagram of the test system is presented in Fig. 3.
Figure 3: Line diagram of the 33-buses AC-MG used for testing
The same test system was used for both modes of operation, reflecting practical MG applications where the infrastructure remains unchanged regardless of whether the network is connected to the main grid (28). The key distinction lies in the source providing grid support: the utility grid in GON mode or a local synchronous diesel generator in the GOFF mode (29). Furthermore, using a single system allows for a consistent evaluation of the implemented optimization methodologies, as each mode implies a different solution space. Comparing their performance within the same system ensures that any differences in the results are due to operating conditions rather than changes in the network configuration, enabling a fair analysis in terms of the best and average solutions, the standard deviation, and the computational time required.
The test system operates at a nominal voltage of 12.66 kV and a base power of 100 kW. It consists of 33 buses, 32 distribution lines, and one slack bus, which represents the point of connection to the conventional power grid and the diesel generator used for GOFF operation. The technical parameters of the lines, including the resistance, reactance, load demands, and current limits, are detailed in Table II.
Table II. : Technical parameters of the 33-bus AC-MG
The MGincludes three PV generators located at buses 12, 25, and 30, with rated capacities of 1125, 1320, and 999 kW, respectively. These units operate in maximum power point tracking (MPPT) mode throughout the simulation period. Fig. 4 shows the typical daily generation and demand curves for Medellín.
Figure 4: Normalized daily profiles regarding PV generation, energy demand, and variable energy costs for Medellín, Colombia
Three lithium-ion BESS units are installed at buses 6, 14, and 31. These units are classified into three types: A, B, and C, with nominalcapacities of 1000, 1500, and 2000 kWh, respectively. With charging and discharging times of four hours for types A and B and five hours for type C (30). Each BESS operates within a SoC range of 10-90%, with initial and final values fixed at 50% to ensure a stable operation and preserve BESS health, as recommended by the IEEE (30).
All bus voltages are required to remain within ±10 % of the nominal value, in accordance with Colombian technical standards (NTC 1340) 31.
As for the operating costs, two scenarios were considered: a GON case with time-varying energy prices and a GOFF one with fixed generation costs. The hourly variations in energy prices used for the GON scenario are illustrated in Fig. 4.
Finally, the economic and environmental performance of the MG was assessed using specific cost and emissions parameters. In GON mode, the cost of electricity purchased from the main grid was $0.1302/kWh, while, in GOFF mode, this value increased to $0.2913/kWh (32). The operation and maintenance cost of the distributed PVs was estimated at $0.0019/kWh, and the maintenance costs associated with the BESS was set at $0.0017/kWh 32. Regarding the environmental impact, the CO2 emissions were 0.1644 kg/kWh during GON operation and 0.2671 kg/kWh in GOFF scenario 32.
Comparison and parameter tuning
All optimization methodologies were calibrated using a PSO configured with 100 particles, whose cognitive and social coefficients were set to 1.494. The inertia weight ranged from a maximum value of 1 to a minimumof 0, and the stopping criterion was set to a maximum of 300 iterations. This algorithm has been extensively used in the literature to enhance energy management strategies in systems integrating DERs (9). Its purpose within this context is to determine the optimal set of parameters that allows each control strategy to achieve its best possible performance (25).
During the tuning process, specific parameter configurations were assigned to each optimization method for both GON and GOFF operating conditions. To apply PSO, the GON scenario was configured with a population of 72 particles and a maximum of 1239 iterations. The inertia weight ranged from 0.8926 to 0.5103, with the cognitive and social factors set to 1.3235 and 0.8236, respectively. A velocity limit factor of 0.2172 was also implemented to constrain particle displacement. For the GOFF case, the configuration used 462 particles, 648 iterations, an inertia weight between 1 and 0.8457, and cognitive and social coefficients of 0.8260 and 0.2978. The velocity limit factor in this case was reduced to 0.0385.
To validate the effectiveness of the PPSO/SAM EMS, comparative analyses were conducted with two alternative metaheuristic approaches: the VSA (33) and CBGA (34), both implemented using the same power flowmodel(i.e., the SAM).
For the VSA, the GON mode employed 100 individuals and a maximum of 1000 iterations, while the GOFF configuration used 233 individuals and 4000 iterations. The decay rate was adjusted according to the mode of operation, with values of -9.0645 and -11.4285 for GON and GOFF conditions, respectively.
The CBGA was set with ten individuals and 2000 iterations in GON mode, using three mutation operations per generation. In contrast, the GOFF configuration was expanded to 200 individuals and 4000 iterations, with only one mutation per generation.
Finally, in this paper, a parallel processing approach was incorporated into the proposed solution methodologies in order to enhance their performance (i.e., PVSA and PPSO). This parallelization allowed evaluating a larger number of individuals per iteration by utilizing all available workstation cores (35). In other words, multiple power flow analyses were executed in parallel, using the SAM for the different BESS operation schemes proposed by the VSA and PSO, corresponding to a subset of individuals in the population, limited by the numberofavailableworkers.Thissignificantly reducedthe computation time of the proposed methodologies. Our parallel implementation followed the procedure described in (36-38). However, it was not possible to implement the parallel processing approach in the case of the CBGA due to its characteristics, as it evaluates only one individual per iteration(39).
Analysis and discussion This section analyzes and discusses the simulation results obtained via PPSO and the methods used for comparison. Our EMS for the optimal operation of BESS in AC-MGs was implemented and solved in MATLAB 2024a, using an Asus ROG Strix SCAR 18 (2024) G834 workstation laptop with an Intel Core i9-14900HX processor, an NVIDIA GeForce RTX 4090 GPU, 32 GB of DDR5-5600 RAM, and dual 1 TB PCIe 4.0 NVMe SSDs running Windows 11 Home Edition. Each objective function was analyzed in both MGs, considering the best and average solutions, the standard deviation, and their percentage differences. For statistical validation, each methodology was run 100 times.
This section presents the numerical results obtained with the proposed master-slave optimization scheme. Recall that the performance of this strategy was assessed under two scenarios: GON and GOFF.
The performance metrics considered include the total operating cost, convergence behavior, and computational efficiency. To obtain statistically significant insights regarding the robustness and consistency of each optimization technique, all simulations were executed 100 consecutive times under identical conditions. This approach allowed for a more rigorous evaluation of the computational effort required by each method and the variability in the quality of the solutions obtained. The following subsections detail the simulation setup, present the results for each mode of operation, and provide a comparative analysis of the optimization strategies employed.
Numerical performance of the proposed methodology
Tables III and IV summarize the numerical performance of the proposed PPSO/SAM approach when compared against two alternative metaheuristic techniques: the CBGA and the VSA. The performance metrics reported include the best solution, the average solution, the standard deviation (expressed as a percentage of the mean), and the average computational time per run (in seconds). Tables III presents the results for the GON mode, where the MG operates in coordination with the main grid, while Table IV reports the outcomes for the GOFF mode, where the system operates autonomously using a diesel generator, PVs, and BESS.
Table III. : Numerical results obtained for the 33-bus feeder during GON operation
Table IV. : Numerical results obtained for the 33-bus feeder during GON operation
Based on the data presented in Tables III and IV, the following can be stated:
-
In GON mode, PPSO achieves the lowest operating cost, with a best solution of 6897.58646 USD/day, outperforming both PVSA (6897.95530 USD/day) and CBGA (6906.11828 USD/day). This represents a cost reduction of approximately 101.47 USD/day compared to the base, non-optimized case (6999.05313 USD/day), demonstrating the substantial economic benefits of the proposed EMS. Additionally, PPSO achieves a reduction of 0.37 USD/day compared to PVSA, as well as 8.53 USD/day compared to CBGA. It is important to highlight that, for the GON case, the proposed methodology clearly outperforms the results reported in 40, where an optimization strategy based on semi-definite programming (SDP) was implemented. In that study, the SDP approach reported an objective function value of 6897.69280 USD/day..
In GOFF mode, the best solution is again obtained by PPSO (17527.41548 USD/day), surpassing PVSA (17527.57720 USD/day) by 0.16 USD/day and CBGA (17533.60244 USD/day) by 6.19 USD/day. Compared to the base case (17550.5832 USD/day), PPSO yields a total cost reduction of 23.17 USD/day, further confirming its superior performance in standalone operation scenarios.
-
The mean solution represents the expected cost over 100 consecutive runs. In GON mode, PPSO yields the lowest average cost (6900.50405 USD/day), followed by PVSA (6902.48686 USD/day) andCBGA(6916.08321USD/day).PPSOnotonlyfindsbetterindividual solutions; it also reaches them more consistently, which is essential for a robust EMS. Similarly, in GOFF mode, the lowest average cost is again achieved by PPSO (17529.71611 USD/day), followed by PVSA (17533.07184 USD/day)andCBGA(17535.95161USD/day).ThisfurtherreinforcesPPSO’sability to consistently deliver high-quality solutions across multiple executions.
-
In terms of standard deviation, PPSO exhibits the lowest variability in GON mode (0.06748%), indicating high convergence consistency. In comparison, PVSA (0.08904%) and CBGA(0.07079%) show slightly higher deviations, reflecting greater dispersion in their results. The low standard deviation achieved by PPSO confirms its robustness.
On the other hand, in GOFF mode, CBGA achieves the lowest standard deviation (0.00837%), indicating high consistency — although this comes at the expense of lower-quality solutions. PPSO maintains a relatively low deviation (0.01453%), striking a favorable balance between solution quality and reliability. PVSA shows the highest deviation (0.01823%), indicating greater instability in its outcomes.
-
Finally, from a computational standpoint, in GON mode, CBGA is the fastest method (2.80 s), although this comes at the expense of solution quality. PPSO and PVSA exhibit nearly identical runtimes (39.15 s), significantly higher than those of CBGA. However, the superior accuracy and consistency of PPSO justify this moderate computational overhead. In GOFF mode, the computational time varies significantly among the methods. CBGA is again the fastest (5.53 s), making it computationally efficient, albeit with suboptimal results. PVSA is the slowest (252.09 s), which is a considerable drawback,especially given that it does not outperform PPSO. The latter requires an average of 67.91 s, which is acceptable considering its superior performance.
This comparative analysis shows that the proposed methodology consistently outperforms CBGA and PVSA across all evaluated criteria. In both GON and GOFF modes, PPSO achieves the lowest operating costs (corresponding to both the best and mean solutions) while maintaining low variability, indicating strong robustness and convergence. Although CBGA offers the shortest computation time, it sacrifices solution quality. PPSO strikes a well-balanced trade-off between accuracy, reliability, and efficiency, achieving cost reductions of 101.47 USD/day and 23.17 USD/day compared to the base case in GON and GOFF modes, respectively. These results confirm PPSO as an effective and reliable optimization strategy for energy management in MGs under both grid-connected and islanded conditions.
On the other hand, Fig. 5 and 6 illustrate the percent cost reduction achieved by the three metaheuristic methods relative to the base case. The analysis considers both the best and the mean solutions obtained after 100 independent runs of each method. Fig. 5 corresponds to the GON mode, while Fig. 6 presents the results for the GOFF mode, both applied to a modified 33-bus test system.
Figure 5: Percent cost reduction by methodology with respect to the base case in the 33-node system during GON operation
Figure 6: Percent cost reduction by methodology with respect to the base case in the 33-node system during GOFF operation
Both figures confirm that PPSO consistently achieves the highest percentage reduction in operating costs across both modes of operation and performance metrics. In GON mode (Fig. 5), the performance gap is more pronounced, with all three methods achieving reductions above 1% and PPSO slightly outperforming its competitors. In contrast, Fig. 6 shows that the magnitude of the cost reduction in GOFFmodeissignificantly lower, with all methods achieving reductions below 0.15%. This outcome is expected, as operational flexibility is reduced under islanded conditions, limiting the potential benefits of optimization. Nevertheless, PPSO still delivers the best results, demonstrating its adaptability even in constrained environments.
Fig. 5)and 6) visually reinforce the quantitative findings presented in Tables III and IV: the PPSO-based EMSoutperforms CBGAandPVSAinbothoperationalscenarios. Our proposal’s ability to consistently yield the highest percentage reductions — particularly in terms of the average performance —demonstrates not only its effectiveness in minimizing operating costs, but also its robustness and reliability. These figures further validate PPSO as the most balanced and efficient optimization strategy among the evaluated methods for energy management in AC-MGs under both GON and GOFF conditions.
Fig. 7 presents the dispersion diagrams (boxplots) of the objective function ECost for the metaheuristic methods in both modes of operation: a) GON and b) GOFF. Each boxplot summarizes the distribution of the operating costs over 100 consecutive executions, allowing for a visual inspection of each method’s central tendency, spread, and presence of outliers.
Figure 7: Dispersion diagram of results for ECost: a) GON and b) GOFF operation
These boxplots provide key insights into each method’s robustness and stability. PPSO consistently achieves lower medians and tighter distributions in both GON and GOFF modes, confirming its ability to converge towards high-quality solutions with minimal variability. PVSA, while occasionally competitive in terms of its best solutions, exhibits greater variance and more pronounced outliers, especially in GOFF mode, which suggests a less stable performance. CBGA exhibits a stable but suboptimal behavior, with concentrated yet consistently higher cost values across both modes.
Fig. 7 reinforces the conclusion that PPSO is the most reliable and cost-effective strategy among the evaluated methods. Its low median costs, narrow variability, and controlled dispersion of outliers in both operational scenarios indicate a strong capacity for producing robust and high-quality solutions. In contrast, PVSA and CBGA either lack consistency or deliver less competitive results, underscoring the advantages of the PPSO-based EMS for operating cost minimization in MGs.
Validating the operational constraints
This section analyzes the results related to the SoC of the BESS (Figs. 8 and 9), the system’s nodal voltage profiles (Figure 10), and its line loading levels (Fig. 11) over a typical day of operation. The f indings confirm that our EMS allows for feasible MG operation while adhering to the technical limits imposed on storage systems, voltage regulation, and line capacities in both GON and GOFF modes.
Figure 8: SoC in the optimal solution obtained by the PPSO over a representative day of operation in GONmode
Figure 9: SoC in the optimal solution obtained by the PPSO over a representative day of operation in GOFFmode
Figs. 8 and 9 illustrate the evolution of the SoC for the three BESS (A, B, and C) over a 24-hour period in the two modes of operation. Fig. 8 corresponds to the GON mode, while Fig. 9 represents the GOFF mode. Both figures show the hourly SoC profiles obtained from the optimal solution using the PPSO-based EMS.
In both figures, the SoC trajectories for each BESS remain within the predefined technical limits, i.e., min. SoC: 10%; max.SoC:90%,andtheSoCalsostarts and endsat the value predefined by the network operator (50%). In GON mode, the SoC shows greater variability and more aggressive charging and discharging cycles, especially between hours 1 and 5, when the BESS charge to their maximum level, and between hours 16 and 22, when they discharge from maximum to minimum, delivering all their energy to the system. In contrast, under GOFF conditions, the SoC curves are smoother and more conservative, with BESS A and B supplying power to the grid during the first ten hours. Once the solar resource begins injecting its maximum power, the BESS are charged to their maximum level and then discharged down to 50% of their maximum charge at hour 17.
The behavior observed in GON mode (Fig. 8) reflects the system’s ability to take advantage of grid availability, allowing for deeper charge/discharge cycles to optimize operating costs. The BESS charge during the early hours, when both energy prices and demand are at their lowest levels (below 80%), and begin discharging after hour 16 as energy demand exceeds 90% and energy prices reach their peak (above 95%). This indicates that the proposed EMS strategically leverages the variability in energy prices and demand to improve economic performance.
On the other hand, in GOFF mode (Fig. 9), the strategy prioritizes energy conservation, as there is no external grid support. To ensure supply continuity, both the BESS and the diesel generator inject power into the network. Later, when renewable resources become abundant (starting around hour 9) the BESS are charged to their maximum capacity. Finally, as in the GON case, the strategy takes advantage of the fact that both energy prices and demand are at their highest levels during the day to inject power into the system, thereby reducing operating costs.
Fig. 10 illustrates the voltage regulation performance, expressed in p.u., over a 24-hour period for a representative day of operation. The results are shown for both the GON and GOFF modes, based on the optimal solution obtained using the PPSO-based EMS.
Figure 10: Voltage regulation in the optimal solution obtained by the PPSO for a representative day of operation
Throughout the day, both the GON and GOFF profiles remain well below the 0.10 p.u. limit, indicating that the proposed EMS maintains voltage regulation within acceptable operating bounds at all times. In the GON mode, the voltage variations are more pronounced, with values approximately ranging from 0.04 to 0.09 p.u., reflecting higher system flexibility due to grid interaction. The system utilizes this flexibility to optimize costs, even if it results in greater voltage excursions (still within the limits). In contrast, under GOFF conditions, the voltage regulation is smoother and more stable, approximately ranging from 0.05 to 0.08 p.u., which is consistent with a more conservative control strategy in the absence of grid support.
Finally, Fig. 11 illustrates the maximum line loadability (expressed as a percentage of thermal capacity) across all branches of the 33-node test system for a representative day of operation. The results are shown for both the GON and GOFF modes. The dashed horizontal line at 100% denotes the maximum allowable thermal limit for each distribution line.
Figure 11: Performance of the Maximum Loadability in the Optimal Solution Obtained by the PPSO for a Representative Day of Operation.
In both modesofoperation, the loadability of all lines remains within permissible limits, confirming that the optimization process respects the thermal constraints. Under GON conditions, most lines operate between 85 and 100% of their capacity, with relatively uniform loading, suggesting that the system leverages the grid connection to balance the power flows efficiently. Under GOFF conditions, greater variability is observed, with several lines operating well below their capacity andothers showing reduced load levels (e.g., lines 17, 21, and 32), which is indicative of the redistribution of power flows due to the absence of an external supply.
Fig. 8, 9, 10, and 11 confirm that the PPSO-based EMS ensures full compliance with the SoC, voltage, and current constraints in both modes of operation. The system adapts its charging strategy according to grid availability, operating more flexibly in GON mode and more cautiously in GOFF mode. This highlights the EMS’s ability to maintain feasibility, adaptability, and technical soundness in managing BESS operation across different scenarios.
Conclusions and future Works
This work presented an energy management system for the optimal operation of battery energy storage systems in AC microgrids under grid-connected and islanded modes, using a master-slave strategy that integrates particle swarm optimization with a successive approximations power flow method.
The proposed methodology achieved the lowest operating costs in both GON and GOFF modes when compared to alternative metaheuristics (CBGA and PVSA), the proposed methodology for the GON case also outperformed the exact solution obtained with an SDP model that solves this optimization problem. Specifically, in GON mode, the PPSO-based EMS reached a cost reduction of 101.47 USD/day (1.45 %) relative to the base case, while, in GOFF mode, it achieved a reduction of 23.17 USD/day (0.13 %). PPSO also yielded the lowest average cost, with values of 6900.50 USD/day in GON mode and 17529.72 USD/day in GOFF mode, outperforming the competing methods in both cases. In terms of solution consistency, PPSO exhibited low standard deviations of 0.067 % (GON) and 0.014 % (GOFF) over 100 independent runs. Despite its moderate computational cost (39.16 seconds per run in GON mode 67.91 seconds per run in GOFF mode), the method ensures full compliance with all technical constraints, including SoC limits (10-90 %), voltage regulation (<0.10 p.u.), and line loadability (<100 %), confirming its robustness, feasibility, and effectiveness.
Future work will focus on extending the methodology to formulations that enable the management of both active and reactive power by the BESS, in addition to considering their relocation within the system to further improve operating costs. Likewise, another line of future research may focus on the optimization of technical factors such as network energy losses or environmental factors such as GHG emissions.
References
License
Copyright (c) 2025 Luis Fernando Grisales Norena

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
From the edition of the V23N3 of year 2018 forward, the Creative Commons License "Attribution-Non-Commercial - No Derivative Works " is changed to the following:
Attribution - Non-Commercial - Share the same: this license allows others to distribute, remix, retouch, and create from your work in a non-commercial way, as long as they give you credit and license their new creations under the same conditions.























