RT journal article T1 Development and experimental validation of a low-cost, real-time energy management system for microgrid clusters, based on electricity price and state of charge of hybrid energy storage systems A1 Carrasco González, David A1 Sarrias Mena, Raúl A1 Horrillo Quintero, Pablo A1 Llorens Iborra, Francisco A1 Fernández Ramírez, Luis Miguel A2 Ingeniería Eléctrica A2 Ingeniería en AutomáticaElectrónica, Arquitectura y Redes de Computadores K1 Energy management system K1 Energy storage system K1 Microgrid cluster K1 Raspberry Pi microcontroller K1 Real-time simulation K1 Renewable energy AB Microgrid clusters (MGCs) are gaining popularity for enhancing energy efficiency, resilience, and reliability by integrating power generation, consumption, and storage elements, including DC/AC technologies. However, their expanding use requires the development of new validation techniques to ensure real-world operation. This article contributes to this effort by presenting, implementing and experimentally validating via a hardware-inthe-loop (HIL) setup, a novel control system for an MGC, deployed on a Raspberry Pi board, which is more economical compared to industrial controllers. The HIL setup comprises an OPAL-RT emulator and the Raspberry Pi board, enabling real-time testing under various operating regimes. This MGC comprises two MGs interconnected to a main grid: a DC MG incorporating DC loads, a wind turbine, fuel cell, an electrolyzer, and an ultracapacitor; and an AC MG comprising AC loads, battery bank, and a photovoltaic generator. The control system uses individual device controllers and a centralized energy management system (EMS) that dynamically controls MGC components, considering the electricity grid price and the state of charge (SOC) of the ESSs. The experimental results demonstrate a robust performance of the MGC and the control system while ensuring a safe SOC in the ESSs. Additionally, the control system demonstrates significant reductions in the electricity costs and in CO2 emissions compared to a fuzzy-logic EMS across a 24-hour test under realistic scenarios, and a short 20-second test. Therefore, the results demonstrate that the proposed solution provides a cost-effective, responsive, adaptable, scalable and practical solution for real-time energy coordination in MGCs. PB Elsevier Ltd. YR 2026 FD 2026 LK http://hdl.handle.net/10498/38326 UL http://hdl.handle.net/10498/38326 LA eng NO This work was partially supported by Ministerio de Ciencia e Innovacion, ´ Agencia Estatal de Investigacion, ´ FEDER, UE (GrantPID2021-123633OB-C32 supported by MCIN/AEI/10.13039/501100011033/FEDER, UE). DS Repositorio Institucional de la Universidad de Cádiz RD 08-nov-2026