# Development of Energy Management Strategies for a MG with Distributed Energy Generation and Storage

Pierrick Daval, Bilal Kabalan, Margot Gaetani-Liseo, Hugo Helbling, Emmanuel Vinot

► To cite this version:

Pierrick Daval, Bilal Kabalan, Margot Gaetani-Liseo, Hugo Helbling, Emmanuel Vinot. Development of Energy Management Strategies for a MG with Distributed Energy Generation and Storage. The 26th European Conference on Power Electronics and Applications, GDR SEEDS France & EPE Association, Mar 2025, Paris, France. 10.34746/epe2025-0298 . hal-05080221

HAL Id: hal-05080221

https://utc.hal.science/hal-05080221v1

Submitted on 22 May 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Development of Energy Management Strategies for a MG with Distributed Energy Generation and Storage

Pierrick Daval¹, Bilal Kabalan¹, Margot Gaetani-Liseo², Hugo Helbling², Emmanuel Vinot¹

¹Univ Eiffel, Univ Lyon, ENTPE, LICIT-ECO7, 69675 Lyon, France
{pierrick.daval, bilal.kabalan, emmanuel.vinot}@univ-eiffel.fr

²Université Claude Bernard Lyon 1, Ampère, UMR5005, INSA Lyon, Ecole Centrale de Lyon, CNRS,
Villeurbanne, F-69100, France
{margot.gaetani-liseo, hugo.helbling}@univ-lyon1.fr

**Index Terms**—Energy management, MG, storage, renewable energy, rule-based, dynamic programming.

**Abstract**—In this paper, energy management strategies are developed and compared for a microgrid connected to the grid, composed of solar panels, a storage system and a load profile. Three rule-based strategies and one strategy based on dynamic programming were implemented and compared in simulation. The first ruled-based strategy is based on self sufficiency principle and tries to use the grid as last resort. The second aims to use the battery in peak times. The third is predictive and uses weather and demand forecasts in order to limit the battery charging to be able to absorb all the surplus of solar energy. The paper shows that none of these rule-based strategies can reach the optimal solution. This is why an optimal strategy was developed as a reference for results comparison, using dynamic programming. After explaining the different strategies, a comparison is done between them using results of a case simulation.

## I. INTRODUCTION

To tackle the challenges of energy transition, public policies move towards massive integration of renewable energy sources (RES). The intermittency of these RES and the lack of inertia of some of these sources have led to the development of building or district microgrids (MG) connected to the main grid. The MG smaller-scale make it easier to bring closer sources and consumers, to manage bidirectional power exchanges, to schedule tasks and thus contribute to the optimal use of RES. It also makes easier to take into account the users, technical-economic and environmental criteria in the optimal strategies management.

In this context, the literature about energy management system or strategies (EMS) in MG is made up of

many papers. Some of them developing new optimal EMS for a given sizing [1]–[3]. Other papers propose optimal sizing studies for a given management strategy [4]. There are also tools and studies that enable optimal design, i.e. both energy management and sizing, but these algorithm are usually based on simple models and mainly optimizing technico-economic criteria. Some of these interesting works are resumed in review articles [5] and [6]. Moreover, these papers also shows the challenges left and the limits of the actual literature, as in [7]. Two of these challenges are taking into account component aging and environmental impact in optimal design and the impossibility to compare optimization results from one EMS to another one because the sizing and modeling methods are different.

The aim of our work is to propose a model-based tool for optimal design and to test several types of strategies using a unique model that takes into account component aging and/or ecological footprint of the system. This paper presents the first modeling and management work carried out. It compares several strategies that can be implemented on our simulation tool. Consideration of the environmental footprint will be addressed in future work.

Section II presents the MG model with each element of the MG. Section III present the different EMS strategies implemented and simulated, then in section IV we analyze and compare all the strategies.

## II. MICROGRID MODELING

As illustrated in figure 1, the MG with the following components is considered: solar panels (*PV*), battery (*batt*), and load. We considered the MG connected to the national main grid which can absorb or provide power.
The energetic model of the components are presented in the following subsection. The effect of the MG on the main grid are neglected.

<figure><img src="image_2.png" /><figcaption>Fig. 1. Grid architecture</figcaption></figure>

### A. Solar Panel Model

In order to model the photovoltaic panels (PV), their area ($PV_{AREA}$ in [m²]), maximum peak power ($PV_{PEAK_{MAX}}$ in [W]) and efficiency ($η$ in [%]) need to be known. This data is provided in the manufacturer's data sheets. Using these characteristics, the PV are modeled using equations 1, 2 and 3.

$$PV_{AREA_{TOTAL}} = N_{panels} \times PV_{AREA} \quad (1)$$

$$P_{pv}(t) = E_{e}(t) \times \eta \times PV_{AREA_{TOTAL}} \quad (2)$$

With $N_{panels}$ is the number of panels installed and $PV_{AREA_{TOTAL}}$ is the total area of panels installed in [m²], $E_{e}(t)$ is the irradiance in [W/m²] given by NASA in several cities like Paris and Abu Dhabi [8]. This data is hourly.

The solar power in PV is limited by the maximum total peak power $PV_{peak_{max}}$ [W] of the installed panels as defined in equation 3.

$$PV_{totalpeak_{max}} = N_{panels} \times PV_{peak_{max}} \quad (3)$$

These three equations permit to model the solar panels. The using cost of solar panels is considered zero.

### B. Battery Model

A lithium-ion battery is considered. First, we model the electrical behaviour of the battery. Second, we will model the usage cost of the battery considering the battery lifetime. In first approach, the battery's thermal model has not been coupled to the electrical and ageing

model and the battery's temperature is assumed to be constant and equal to the ambient temperature.

The first step of the electrical model is to determine the battery power as a function of time. This power will be determined by the management strategy used. The battery current $I_{bat}$ is then defined equation 4.

$$I_{bat}(t) = \frac{U_0 - \sqrt{U_0^2 - 4 \times R \times P_{bat}(t)}}{2 \times R} \quad (4)$$

With $U_0$ is the open-circuit voltage [V], $P_{bat}(t)$ is the battery power [W] and $R$ the battery internal resistance [Ω].

The battery current is used to calculate the state of charge (SoC) at the following time step, as defined in equation 5.

$$SoC(t + \Delta t) = SoC(t) - \frac{RdF \times I_{bat} \times \Delta t}{C_{bat}} \quad (5)$$

With $RdF$ is the faradic efficiency in [%], $\Delta t$ is the time step in [h] and $C_{bat}$ is the battery capacity in [Ah].

To assess the usage cost of the battery or the battery lifetime, an ageing model is used. It is based on the Eyring's equation and has been developed and validated in a previous study [9]. Firstly, we calculate the cost of purchasing the battery, as described in equation 6, with $E_{tot_{bat}}$ is the total battery energy, $cost_{kwh}$ is the market price per kilowatt-hour for lithium-ion batteries [€].

$$cost_{init} = \frac{E_{tot_{bat}} \times cost_{kwh}}{1000} \quad (6)$$

Thanks to this initial cost, we can now calculate the usage cost as presented in equation 7.

$$cost_{bat}(t) = \frac{dql(t) \times cost_{init}}{100 - C_{EoF}} \quad (7)$$

With $dql(t)$, the capacity loss of the battery [%] and $C_{EoL}$ is the end-of-life battery capacity [Ah].

### C. Load Model

To model the load power profile ($P_{load}(t)$), data from the literature in [10] was used. It is a fictional neighbourhood made up of a residence, offices, electric charging stations and groceries. Two typical days have been considered, one in summer and one in winter. This load power is shown in figure 2 and used directly in simulation.
<figure><img src="image_3.png" /><figcaption>Fig. 2. Evolution of load power as a function of time</figcaption></figure>

### III. ENERGY MANAGEMENT STRATEGY

In a MG, a higher level of control is needed to manage the energy exchange between the different components of the grid and to control the battery SoC.

The decision variable is the battery power $P_{bat}(t)$ as a function of time. The power of the main grid ($P_{grid}(t)$) is determined by the following MG stability constraint:

$$P_{bat}(t) + P_{grid}(t) + P_{pv}(t) = P_{load}(t) + P_{lost}(t) \quad (8)$$

Furthermore, there is also a constraint on the limit of the injection on the main grid, described by equation 15.

$$P_{GRID}(t) \leq P_{lim_{inj}} \quad (9)$$

The cost associate at each time step for resale/purchase of energy to/form the main grid is based on the french "Commission de Regulation de l'Energie" (CRE) [11] contract. For energy purchases an on-peak and off-peak hours contract is considered with on-peak hours between 8 a.m. to 9 p.m.

There are also a number of constraints concerning the battery, with the power limitation and the SoC limitation described below.

$$P_{bat_{limc}} \leq P_{bat}(t) \leq P_{bat_{limd}} \quad (10)$$

$$SoC_{min} \leq SoC(t) \leq SoC_{max} \quad (11)$$

Where $P_{bat_{limc}}$ is the battery charge power limit [W] and $P_{bat_{limd}}$ is the battery discharge power limit [W], $SoC_{min}$ and $SoC_{max}$ are the minimum battery SoC and maximum battery SoC respectively [%].

Three rule-based and one optimal strategies have been developed and are presented in the following. The rule-based strategies are governed by non-optimal laws that can be applied in real time whereas the optimal strategy, performed with Dynamic Programming, is developed to provide a reference.

#### A. Self-sufficiency

The principle of this strategy is to use the grid only as a last resort, i.e. when solar power and battery power alone cannot meet the load. A diagram of the self-sufficiency algorithm is presented in figure 3.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Diagram of the self-sufficiency algorithm</figcaption></figure>

When we simulate, for two summer days, the self-sufficiency strategy of the neighbourhood with 900 m² of solar panels and 1.3 MWh of battery, the results presents in figure 4 are obtained.

<figure><img src="image_5.png" /><figcaption>Fig. 4. Evolution of power and SoC as a function of time for two summer days for a self-sufficiency strategy</figcaption></figure>

The figure shows that solar power (yellow curve) and battery power (blue curve) provide the load (purple curve) without the intervention of the grid (red curve). However, surplus energy produced by PV panels is injected to the main grid when the battery $SoC_{max}$ is reached. The simulation is then repeated for two winter days and the results are presented in figure 5.

The figure shows that the battery is completely discharged before 10 a.m and can no longer provide
<figure><img src="image_6.png" /><figcaption>Fig. 5. Evolution of power and SoC as a function of time for two winter days for a self-sufficiency strategy</figcaption></figure>

power to the load. Solar power generated is lower than the load power asked and, as a result, we are forced to use the main grid to ensure continuity of service. So, in this case and with this MG size, the self-sufficiency strategy is not possible.

The second strategy developed is to use the battery during peaks of consumption, and will be called "Maximum demand".

## B. Maximum demand

The aim of this strategy is to use the battery to smooth out the electricity consumption during periods of high consumption, avoiding the need to switch on a generating plant with high-carbon emission. The diagram in figure 6 describes the algorithm for this strategy.

<figure><img src="image_7.png" /><figcaption>Fig. 6. Diagram of using battery at peak times</figcaption></figure>

For the simulation, the part of the energy needed by the load that cannot be provided by PV will be covered 50% by the grid and 50% by the battery. In addition, peak consumption is set between 6am and 9am and between

6pm and 9pm. Simulation results for two summer days are shown in figure 7.

<figure><img src="image_8.png" /><figcaption>Fig. 7. Evolution of power and SoC as a function of time for two summer days for using battery during peak consumption</figcaption></figure>

On summer days, the surplus solar power is completely injected into the main grid. Besides, between 6pm and 9pm, the load is covered 50% by the grid and 50% by the battery.

The simulation is then repeated for two winter days and the results presented in figure 8.

<figure><img src="image_9.png" /><figcaption>Fig. 8. Evolution of power and SoC as a function of time for two winter days for using battery during peak consumption</figcaption></figure>

It is seen in figure 8 that the grid, with the help of solar power, fully covers the load outside periods of high consumption. As in figure 7, the grid power curve
and the battery power curve overlap during peaks in
consumption, validating that the load is covered 50%
by the grid and 50% by the battery.

However, there are two problems with this strategy.
First, there is a peak in consumption when the battery
is being recharged. Second, in summer, the surplus solar
power is completely fed into the grid because the battery
is already at its maximum SoC. This is why a predictive
rule-based strategy will be developed.

C. Predictive strategy

The principle of this strategy is to use the weather
model forecasts and the next day's electricity demand
predictions to optimize the battery's SoC just before
solar production exceeds demand, in order to inject the
maximum surplus of solar production into the battery. To
achieve this objective, there are three possible scenarios
:

1) The surplus of solar energy is large enough to fully recharge the battery. In this case, the strategy will fully discharge the battery during off-peak hours so that as much surplus solar energy as possible can be injected into the battery.

2) There is no surplus solar energy. In this case, the strategy will fully recharge the battery to use it later as much as possible in assisting the load during peak hours.

3) The amount of surplus energy lies between the first two scenarios. In this case, the strategy will calculate a SoC which, after injecting this surplus energy into the battery, will allow the battery to be fully charged.

The results of this strategy are presented in figure 9
and figure 10.

In these figures no variation is observed on the last
day of the simulation because no prediction for the next
day is available. It can be seen that on any day in winter
is there a surplus of PV generation energy. Thus the
battery is charged by the grid during off-peak hours.
Unlike a winter week, in summer there is not a single
day when the power profile doesn't show a surplus of
solar production. So, during off-peak hours, the battery
discharges to a low state of charge, enabling it to absorb
the surplus solar power.

Although rule-based strategies try to maximize self
consumption and self sufficiency, they do not achieve the
global optimal cost over a period of time. That's why
we're going to adopt dynamic programming to optimize
these costs efficiently.

<figure><img src="image_10.png" /><figcaption>Fig. 9. Evolution of power and SoC as a function of time for a winter week using a predictive strategy</figcaption></figure>

<figure><img src="image_11.png" /><figcaption>Fig. 10. Evolution of power and SoC as a function of time for a summer week using a predictive strategy</figcaption></figure>

D. *Dynamic Programming*

To optimize the energy management for an objective
J (grid cost for example), the discrete dynamic program-
ming (DDP) [12] is used. A good representation of this
optimization problem is a SOC versus time graph (figure
11) limited by maximum battery charge and discharge
capabilities. The constraint on the final SoC is respected
according to the limits presented in red and green in
figure 11. This graph is regularly sampled in time and
SOC. The points of two consecutive columns are linked
by oriented edges associated to a cost. This cost depends
on the PV power, load power and the SOC variation between the two points of an edge. It is calculated using the previously presented model in section II. The sum of cost of the edges on a trajectory provides the objectives to minimize. The DDP method is then applied to find the best trajectory in an efficient way.

<figure><img src="image_12.png" /><figcaption>Fig. 11. DDP principle</figcaption></figure>

The optimization problem is recalled hereafter:
State variable: battery SOC

Control variable: battery power $P_{bat}(t)$

Objective function:

$$J = \min \sum_{k=1}^{N} cost_{k} \qquad (12)$$

with $cost_k = cost_{res_k} + cost_{bat_k}$

where $cost_{res_k}$ is the cost to buy electricity on the grid and $cost_{bat_k}$ is the usage cost asses with eq. 7.

Constraints:

$$P_{bat_{limc}} \leq P_{bat}(t) \leq P_{bat_{limd}} \qquad (13)$$

$$SoC_{min} \leq SoC(t) \leq SoC_{max} \qquad (14)$$

$$P_{GRID}(t) \leq P_{lim_{inj}} \qquad (15)$$

$$SoC_{k=0} = SoC_{initial} \qquad (16)$$

$$SoC_{k=N} = SoC_{final} \qquad (17)$$

The DP is then solve using the methods describe in [12] or [13].

## IV. COMPARISON AND RESULTS

A comparison between the previously presented strategies is done in Table I for a simulation using the following data :

* Solar Panel : 1750 m² corresponding to a maximum power of 360 kW.

* Battery : Lithium Ion of 1.3 MWh. Electric and Aging Data comes from [9]. The purchase cost is 300€/kWh i.e. 390000€ for the battery investment.

* Load : the power profile used is the one presented in subsection II-C for one day which is repeated along the years.

* The grid costs are 27c/kWh during peak hours and 20.38c/kWh during off-peak hours. The electricity is sell at 11.71c/kWh. The costs (to purchase and resale) are those for the french national grid [11].

The simulation is performed over one year to take into account the sunshine evolution. Figue 12 presents a one years sunshine evolution for the city of Bron (near Lyon) in France. The data comes from NASA website [8].

<figure><img src="image_13.png" /><figcaption>Fig. 12. One year sunshine in Bron</figcaption></figure>

The results in Table I are presented for 5 years of use:

* the dynamic programming, which consider the global cost shows obviously the best results, and can be used as reference to assess the efficiency of the other strategies. It is the best possible strategy but it needs to be execute in advance as it needs the information of irradiance and load in advance.

* the self sufficiency strategy presents good results compared to DDP. The grid cost is a bit high but this strategy tends to preserve the battery and is finally efficient regarding the global cost.

* the predictive strategy which aims to maximize the solar energy stocked in the battery is effective and better than the self-sufficiency strategy and the Max. demand strategies. This is due to a better use of the solar panel energy. If it is planned that the energy who will be provide on next days is higher than those storable in the battery, the strategy discharged the battery in a preventive manner. Then it reaches its minimum state of charge when the solar panel power is higher than the load power see fig. 9 and
10. However, this strategy does not take into account the battery aging which is only assess after application of the strategy and not consider in a preventive manner (as in self sufficiency). It lead then to a lower lifetime than self sufficiency or DP (table.I) and thus to higher battery cost and finally total costs. This can probably be explained considering that predictive strategies tend to discharge more the battery self-sufficiency.

<table><caption>TABLE I
COST FOR THE DIFFERENT ENERGY MANAGEMENT</caption><thead><tr><th></th><th>Self sufficiency</th><th>Max. demand</th><th>Predictive</th><th>Dynamic Prog.</th></tr></thead><tbody><tr><td>Total cost (k€)</td><td>319.4</td><td>497.8</td><td>331.4</td><td>285.8</td></tr><tr><td>grid cost (k€)</td><td>262.7</td><td>431.3</td><td>252.1</td><td>219.9</td></tr><tr><td>battery cost (k€)</td><td>56.7</td><td>66.5</td><td>80.4</td><td>66</td></tr><tr><td>battery final SoH (%)</td><td>89.7</td><td>87.9</td><td>85.4</td><td>88</td></tr><tr><td>battery final SoC (%)</td><td>20</td><td>80</td><td>22</td><td>90</td></tr><tr><td>Simulation time</td><td>37s</td><td>37s</td><td>37s</td><td>8h16m</td></tr></tbody></table>

It should be mentioned that these comparative results of the EMS are linked to the MG size. A parametric study on the effect of the battery size and solar panels size was performed and will be detailed in the final version.

## V. CONCLUSION AND PERSPECTIVES

In this paper, EMS for a MG composed of PV panels, battery and a load power profile have been developed. The first strategies are rule-based and cannot reach the optimal operational conditions. This is why we then used dynamic programming to optimize the usage cost of the MG. Then, a comparative study has been done for a same MG sizing. Cost should not be the only criterion for designing a MG, the carbon footprint of each of the MG's components must also be considered. In a continuation to this work, a bi-level sizing and control methodology will be applied to optimize the sizing using heuristic method, while optimizing the management using dynamic programming. Also, it is planned to add a life-cycle analysis of the components of the MG to integrate the carbon footprint into the co-optimal sizing and energy management tool. The MG model will be expanded to include electric vehicle charging strategies as a control variable. Finally, experimental application is also planned in the scope of two projects (Grid4mobility and REMED) where MG platforms are being developed.

## REFERENCES

[1] Thirunavukkarasu, G. S., Seyedmahmoudian, M., Jamei, E., Horan, B., Mekhilef, S. and Stojcevski, A. (2022).

Role of optimization techniques in microgrid energy management systems—A review. Energy Strategy Reviews, 43

[2] Eyimaya, S. E., & Altin, N. (2024). Review of Energy Management Systems in Microgrids. Applied Sciences, 14(3)

[3] Ahmad, S., Shafiullah, M., Ahmed, C. B., & Alowaifeer, M. (2023). A review of microgrid energy management and control strategies. IEEE Access, 11, 21729-21757

[4] Anoune, K., Bouya, M., Astito, A. and Abdellah, A. B. (2018). Sizing methods and optimization techniques for PV-wind based hybrid renewable energy system: A review. Renewable and Sustainable Energy Reviews, 93, 652-673

[5] Agha Kassab, F., Rodriguez, R., Celik, B., Locment, F., & Sechilariu, M. (2024). A Comprehensive Review of Sizing and Energy Management Strategies for Optimal Planning of Microgrids with PV and Other Renewable Integration. Applied Sciences, 14(22), 10479

[6] Cuesta, M. A., Castillo-Calzadilla, T. and Borges, C. E. (2020). A critical analysis on hybrid renewable energy modeling tools: An emerging opportunity to include social indicators to optimise systems in small communities. Renewable and Sustainable Energy Reviews, 122

[7] Uddin, M., Mo, H., Dong, D., Elsawah, S., Zhu, J., & Guerrero, J. M. (2023). Microgrids: A review, outstanding issues and future trends. Energy Strategy Reviews, 49, 101127

[8] https://www.earthdata.nasa.gov/topics/atmosphere/atmospheric-radiation/solar-irradiance

[9] E. Redondo-Iglesias, P. Venet, and S. Pelissier, "Eyring acceleration model for predicting calendar ageing of lithium-ion batteries ", Journal of Energy Storage vol.13 pp. 176-183, 2017

[10] Loris Pace, Ayyoub Zouaghi, Matthieu Beley, Naoufel Haddour. An Adaptive Power Management Tool for Sizing a PV-Battery-Hydrogen Off-Grid Electrical Energy System. Academia Engineering, 2023, 〈10.20935/AcadEng6115〉 〈hal-04205609〉

[11] CRE 2023 : https://www.cre.fr/actualites/toute-lactualite/la-cre-publie-les-nouveaux-tarifs-et-primes-relatifs-aux-installations-photovoltaiques-implantees-sur-batiment-hangar-ou-ombriere-d-une-puissanc2.html

[12] R. Rigo-Mariani, B. Sareni, X. Roboam, C. Turpin, Christophe, "Optimal power dispatching strategies in smart-MGs with storage," Renewable and Sustainable Energy Reviews, vol. 40, pp 649-658, 2014, Elsevier

[13] E. Vinot, "Time reduction of the Dynamic Programming computation in the case of hybrid vehicle", International Journal of Applied Electromagnetics and Mechanics, vol. 53, pp 213-227, 2017, IOS Press