## 1 Introduction
These EMSs connect the microgrid to the distribution network by consuming them from the distribution network when the price of energy is low. During these periods, the generation is used to load the ESSs, discharging them during periods when the price of electricity is high. This strategy based on market prices is called energy arbitrage [27] and is one of the main ways to increase system efficiency and optimise economic performance [38]. Energy management strategies in microgrids can be approached from perspectives other than economic aspects. However, in such cases and despite not being the main focus, profitability and economic efficiency are usually highly considered factors in most EMSs. Another main microgrid operation strategy focuses on Demand Side Management. This methodology focuses on the integration and active participation of users in the management to optimise energy consumption [39]. This optimisation and increase in energy efficiency can be achieved through EMS with different strategies: making the best possible resource allocation by coordinating the demand side [40; 41]. A different management approach is to develop baseload profiles from generation forecasts [42; 43; 44]. On the other hand, in cases where both resource scarcity scenarios occur, EMS methodologies such as energy curtailment [45; 46] can be applied. The Demand Side Management extends to the demand response strategy [47; 48], where management seeks to change the consumption patterns of users regarding economic issues. In this way, economic incentives are implemented on consumption, and bidirectional communication with the grid is established in real-time, connecting and disconnecting the microgrid according to the operating costs and electricity pricing period. This type of management interconnects the objectives of economic and energy efficiency, in addition to minimising energy demand during periods of high consumption and/or low generation [49]. Examples of different EMSs proposed in microgrids that employ demand response to increase the economic efficiency of their microgrids are developed in [50; 51; 52], resulting in significant cost reductions. Another management criterion used in microgrid energy management strategies is to maximise renewable generation. Therefore, it is necessary for these EMSs to seek the best combination of available renewable generation sources, integrating complementary technologies to avoid generation valleys [53] that would upset the energy balance. In parallel to other strategies, the maximisation of renewable resources in the microgrid can be oriented towards different objectives and criteria. In the framework of energy transition and decarbonisation, one of these objectives is to reduce dependence on fossil fuels in order to achieve 100% renewable microgrids [30; 54]. Furthermore, taking advantage of the economic competitiveness of renewable energies over conventional energy sources [1; 4], implementing EMSs that maximise the use of renewables leads to a reduction in operating costs [30; 55; 37]. Consequently, maximising generation and consumption from distributed renewable generation sources in microgrids results in the ability to operate over extended time intervals under a self-consumption regime [56; 57; 58; 59]. The following methodology for energy management in SMG focuses on battery operation. In all the cases highlighted, the energy management of microgrids shares as a common element the use of ESS, with batteries being the most widespread technology. This equipment allows production and consumption to be balanced, provides flexibility to the system, and increases energy use [60]. This results in an increase in economic efficiency and a reduction in total operating costs [61]. This economic optimisation is achieved by matching the charging and discharging battery price gap between electricity price and remuneration rate [62]. This case study, as well as those presented in [63], highlights how state of charge and usable battery capacity can limit the profitability of this EMS.