# Development of energy management strategies for sustainable microgrid operation using battery storage and renewable integration

Yang Li, Berk Celik, Fabrice Locment, Manuela Sechilariu

► To cite this version:

Yang Li, Berk Celik, Fabrice Locment, Manuela Sechilariu. Development of energy management strategies for sustainable microgrid operation using battery storage and renewable integration. Symposium de Génie Électrique SGE 2025, Jul 2025, Toulouse, France. hal-05161566

HAL Id: hal-05161566

https://hal.science/hal-05161566v1

Submitted on 14 Jul 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 sustainable microgrid operation using battery storage and renewable integration

Yang LI, Berk CELIK, Fabrice LOCMENT, Manuela SECHILARIU

Avenues, Université de Technologie de Compiègne, Compiègne, France

**ABSTRACT** – This paper introduces an energy management strategy that enhances the utilization of renewable energy sources through the use of battery energy storage, with the goal of promoting sustainable energy use in a microgrid. The optimization problem is formulated to boost the efficiency of energy distribution while reducing costs and environmental impacts, ensuring a reliable energy utilization to meet the variable demand power that occur during the day. The proposed algorithm determines the ideal power output for each component of the microgrid, including the charging power of electric vehicles, while considering grid limitations, variable electricity tariffs, and user needs. The developed algorithms are solved using heuristic algorithms and mixed-integer linear programming, with outcomes compared against two baseline scenarios where energy management strategies depend solely on rule-based calculations. Simulations are executed daily over a year with a one-hour time resolution to ensure a fair comparison among the implemented methods with annual results. The performance of rule-based methods is benchmarked against optimization techniques including Mixed-Integer Linear Programming (MILP), Particle Swarm Optimization (PSO), Differential Evolution (DE), and a hybrid PSO-DE strategy. Simulation results show that when only BESS flexibility is leveraged, cost reductions range from 1.97% to 2.13%. When EV flexibility is also incorporated, cost savings increase substantially—up to 13.22% with MILP. MILP achieves the best performance with minimal computational effort, while hybrid PSO-DE provides a practical compromise between optimization quality and time requirements. The findings reveal a notable improvement in both cost efficiency and environmental advantages when applying the proposed energy management algorithm, underscoring its potential to improve the overall functionality of microgrid systems.

**Keywords** – Microgrid, energy management, heuristic optimization, mixed-integer linear programming, photovoltaic, battery storage, electric vehicles.

## 1. INTRODUCTION

The integration of the distributed energy resources (DERs) and electric vehicles (EVs) on the distribution grid has become increasingly vital as the demand for sustainable energy solutions grows. This shift not only supports the transition to renewable energy sources (RES) but also enhances grid resilience and reliability, setting the stage for innovative technologies that optimize energy consumption and renewable utilization. However, their integration poses several challenges, including the need for advanced control strategies and effective communication systems to manage the variability and unpredictability of RES.

Microgrids can provide an effective solution by enabling localized energy utilization, thereby enhancing the overall efficiency and reliability of local network while reducing dependence on centralized power systems [1]. Microgrids can also support the incorporation of energy storage systems, which are vital for balancing supply and demand in the distribution grid with self-consumption, ensuring that surplus energy produced during peak times is stored for use more efficiently [2]. This functionality not only stabilizes the grid but also encourages a

more sustainable energy use by optimizing the charging of EV batteries with renewable resources.

However, development of the efficient and reliable energy management algorithms is still a challenge to address because they are addressed carefully for the design and control of the microgrid systems dominated with EVs and renewable energy production. In this aspect, there are various studies that target the utilization of the mixed-integer linear programming (MILP). In [3], a convex optimization method is applied to determine the optimal sizing and energy management strategy of an islanded microgrid, incorporating battery degradation into the decision-making process. The study in [4] addresses the daily charge/discharge scheduling of battery storage within a distribution network to enhance operational efficiency. In [5], a two-stage stochastic programming model is developed to manage uncertainties in DER output and load demand. The approach ensures a reliable photovoltaic power supply for critical services under variable conditions. The work in [6] explores the design and operation of a microgrid system on an island territory, integrating diverse energy sources including PV, wind turbines, biomass, and geothermal. The objective is to minimize the total cost of the system while meeting energy demands. In [7], a temporal decomposition strategy is presented based on Benders' algorithm to optimize the operation of a hybrid railway power substation.

On the other hand, metaheuristic algorithms offer significant flexibility, as they can be applied to a wide range of optimization problems without being constrained by problem-specific structures. Their primary objective is to achieve a global optimum. In [8], 35 different metaheuristic algorithms are reviewed and highlighted that many of them have been explored in related research. Each algorithm is based on distinct principles, which influence two key properties: solution diversity and convergence speed. These properties often exhibit a trade-off: lower solution diversity typically leads to faster convergence but at the cost of reduced solution accuracy. In practical applications, metaheuristic algorithms are often implemented in hybrid forms, as hybridization is considered a powerful strategy. It helps maintain solution diversity during the search process, thereby preventing premature convergence to local optima and improving solution accuracy. At the same time, hybridization can enhance convergence speed when rapid convergence is necessary [9]. In [10], 12 recent studies are reviewed that deploys different metaheuristic algorithms for microgrid optimization and provided insights into the characteristics of each algorithm within these studies. The study in [11] proposes a probabilistic methodology to enhance energy management in microgrids integrated with DER and energy storage systems. It introduces a self-adaptive, modified q-Particle Swarm Optimization algorithm that dynamically adapts to system changes, thereby ensuring efficient and reliable microgrid operation under varying conditions. In [12], an innovative energy management strategy is presented for isolated microgrids, employing a multi-layer Ant Colony Optimization algorithm. This approach focuses on minimizing electricity production costs by optimizing both day-ahead and real-time sche-
duling. Meanwhile, the study in [13] introduces an adaptive modified Firefly Algorithm within a scenario-based stochastic optimization framework. This framework is applied to a microgrid configuration that includes wind turbines, photovoltaic systems, micro-turbines, fuel cells, and energy storage systems. In [14], a novel Niching Evolutionary Algorithm is proposed for optimizing the placement and allocation of renewable energy sources and energy storage systems in isolated microgrids, aiming to enhance system reliability and performance. The study in [15] introduces an improved memetic algorithm tailored for demand-side management in microgrids, focusing on optimizing energy usage and reducing operational costs.

In this paper, an energy management approach is presented to optimize the operation of microgrids that integrate RES, battery energy storage systems (BESS), and EVs. The study addresses the challenges posed by the variability of renewable generation and the flexibility of EV charging demand by developing a detailed microgrid model composed of PV panels, BESS, and a connection to the main grid. Rule-based energy management approaches with optimization-based methods, including mixed-integer linear programming (MILP), particle swarm optimization (PSO), differential evolution (DE), and a hybrid PSO-DE algorithm are presented. These methods aim to determine the optimal power flow and scheduling within the microgrid, taking into account factors such as electricity tariffs, renewable availability, battery state-of-charge limits, and user satisfaction (e.g., EV battery levels at departure). The optimization problem is formulated with constraints that reflect technical limitations of each component and user requirements. Heuristic algorithms are implemented with detailed tuning of hyperparameters to balance convergence speed and solution quality.

The rest of the paper is organized as follows: Section 2 presents the microgrid modeling and the optimization problem formulation for the proposed energy management algorithms; the results and analysis are discussed in Section 3; and finally, the conclusion and future works are provided in Section 4.

## 2. METHODOLOGY

This section outlines the research methodology, providing insights into the system model and the algorithms implemented to evaluate the performance of the energy management strategies. The energy management techniques encompass rule-based methods and optimization algorithms that are utilized to analyze the efficacy of energy management strategies across various operational scenarios. The microgrid model, illustrated in Fig. 1(a), is designed to simulate various configurations and interactions between the components including with demand power flexibility, allowing for a analysis of energy flows, demand response capabilities, and the integration of renewable sources. In this research, the microgrid system is formed by PV system, BESS and main grid connection, that are used for supplying power to flexible EV load, where the EV charging power can be regulated over the time horizon. The energy flow diagram of the microgrid is presented in Fig. 1(b), where all sources can directly supply power to the total EV load, while the BESS can only be charged by surplus PV generation and is not permitted to discharge for the purpose of selling electricity to the main grid.

### 2.1. Modeling of microgrid components

In this aspect, microgrid components PV, BESS and EVs are modeled according to [2]. Firstly, the PV power production is formulated in Eq. (2) by determining the module temperature in Eq. (1) as follows:

$$T_m(t) = T_a(t) + G(t) \left( \frac{NOCT - T_{NOCT}}{G_{NOCT}} \right) \quad (1)$$

$$P_{pv}(t) = P_{STC} \frac{G(t)}{G_{STC}} (1 + \gamma_p (T_m(t) - T_{STC})) \quad (2)$$

<figure><img src="image_2.png" /><figcaption>FIG. 1. Modeled EV charging station. (a) Electrical diagram of the microgrid, (b) power flow model in microgrid.</figcaption></figure>

where $T_a(t)$ is the ambient temperature, and NOCT is the nominal operating cell temperature (NOCT), $P_{STC}$ is the PV panel rated power at standard test conditions (STC), $G(t)$ is the solar irradiation, $\gamma_p$ is the power temperature coefficient of the PV panel, $T_m(t)$ is the PV module temperature, and $t$ is the simulation time index, respectively. $T_{NOCT}$ and $T_{STC}$ are the standard temperature values 20°C and 25°C; and $G_{NOCT}$ and $G_{STC}$ are the standard solar radiation values 800 W/m² and 1000 W/m² for the NOCT and STC conditions, respectively. After that, state-of-charge (SoC) of the BESS is determined below:

$$SoC_b(t) = SoC_b(t-1) + \left( \frac{P_b^c(t) + P_b^d(t)}{E_b} \right) \Delta t \quad (3)$$

where $\Delta t$ is the simulation time interval, $SoC_b(t)$ is the SoC, $E_b$ is the energy capacity; and $P_b^c(t)$, and $P_b^d(t)$ are the charging and discharging powers of the BESS, respectively. Lastly, the SoC of EVs is determined similar to BESS by:

$$SoC_e(u, t) = SoC_e(u, t-1) + \left( \frac{P_e^c(u, t)}{E_e(u)} \right) \Delta t \quad (4)$$

where $u$ is the EV user index, $SoC_e(u, t)$ is the SoC, $E_e(u)$ is the energy capacity, and $P_e^c(t)$ is the charging power of the EV battery, respectively. In the end, the total load power of EV consumption is determined by:

$$P_l(t) = \sum_{u=1}^{U} P_e^c(u, t) \quad (5)$$

where $U$ is the total EV number. In the next sections, the energy management algorithms are presented without optimization (rule-based approach) with optimization (mixed-integer linear problem and heuristics).

### 2.2. Energy Management Strategies

The microgrid energy management algorithm is built to determine the use of available resources while satisfying the EV charging needs. This algorithm considers elements such as energy
consumption, PV generation profiles, and SoC levels of BESS to make decisions regarding power allocation among the microgrid components. Consequently, rule-based approaches are presented as a benchmark, after which the optimization problem is formulated in this section.

### 2.2.1. Rule-based approaches

Rule-based algorithms assess the power output of each resource according to a predefined set of rules. In this study, two rule-based approaches that differ in how they determine the charging power for each EV are proposed: **First-come-first-serve** and **equal-share-group-serve**. In **first-come-first-serve** method, the maximum power is allocated to the EVs based on their arrival time (first gets maximum, last gets minimum), while in **equal-share-group-serve** method, the available power is distributed equally among all EVs. Nevertheless, in both rule-based approaches, the hierarchy for resource utilization is defined same, with PV power having the highest priority (first used for supplying the load, then for charging the BESS), while grid power is given the lowest priority (last used for supplying the load or buying the surplus PV). Accordingly, the net power $P_n(t)$ in Eq. (6), battery power $P_b(t)$ in Eqs. (7) and (8), the curtail PV power $P_{pv}^c(t)$ in Eq. (9), and grid power $P_g(t)$ in Eq. (10) are determined as follows:

$$P_n(t) = P_l(t) - P_{pv}(t) \quad (6)$$

$$P_b^o(t) = \begin{cases} P_n(t) & , \text{if } P_n(t) \le 0 \text{ and } P_n(t) \ge -P_g^m \\ -P_g^m & , \text{else if } P_n(t) \le 0 \text{ and } P_n(t) < -P_g^m \\ P_g^m & , \text{else if } P_n(t) > 0 \text{ and } P_n(t) \ge P_g^m \\ P_n(t) & , \text{otherwise} \end{cases} \quad (7)$$

$$P_b(t) = \begin{cases} \max(P_b^o(t), -P_b^m) & , \text{if } P_b^o(t) \le 0 \\ \min(P_b^o(t), P_b^m) & , \text{otherwise} \end{cases} \quad (8)$$

$$P_{pv}^c(t) = \begin{cases} P_g^m + P_n(t) & , \text{if } P_n(t) \le 0 \text{ and } P_n(t) \ge -P_g^m \\ 0 & , \text{otherwise} \end{cases} \quad (9)$$

$$P_g(t) = P_l(t) - P_{pv}(t) + P_b(t) + P_{pv}^c(t) \quad (10)$$

where $P_g^m$ is the maximum limit for grid supply/inject power, $P_b^m$ is the maximum limit for BESS charging/discharging power, and $P_b^o(t)$ is the maximum limit for BESS power before considering maximum charging/discharging limit, respectively. In order to determine the charging power of EV battery, the available power capacity $P_a(t)$ for supplying power to total EV load is determined in Eq. (11), and then each EV battery charging power is calculated in Eq. (12) for **first-come-first-serve** in Eq. (13) for **equal-share-group-serve** as follows:

$$P_a(t) = P_g^m + P_{pv}(t) + P_b^m \quad (11)$$

$$P_e^c(u,t) = \begin{cases} P_a(t) - \sum_{k=1}^{K} P_e^c(k < u, t) & , \text{if } P_a(t) > 0 \\ 0 & , \text{otherwise} \end{cases} \quad (12)$$

$$P_e^c(u,t) = \frac{P_a(t)}{K} \quad (13)$$

where $k$ is EV user index which represent all the EV users arrived before the EV user $\{k < u\} \in U$, and $K$ is the total number of EVs connected to charging station at the time $t$.

### 2.2.2. Formulated optimization problem

The designed optimization algorithm aims to reduce the expenses associated with electricity consumption in the microgrid, which is influenced by the use of renewable energy within the microgrid and the transactions (buying and selling) of power with the main grid. Consequently, the objective function for the optimization problem is given as follows:

$$\min \left[ C_d = \sum_{t=1}^{T} \left( P_g^+(t) \cdot \lambda_g^b(t) - P_g^-(t) \cdot \lambda_g^s(t) \right) \cdot \Delta t \right] \quad (14)$$

where $C_d$ is the daily total cost; $P_g^+(t)$ and $P_g^-(t)$ are grid buying/selling powers ($P_g(t) = P_g^+(t) + P_g^-(t)$); $\lambda_g^b(t)$ and $\lambda_g^s(t)$ are grid buying/selling prices; $T$ is total time interval in a day, respectively. In order to determine the minimum cost of the formulated objective function in Eq. (14), the decision variables are defined as follows: SoC of BESS $SoC_b(t)$, and the load power of the total EV consumption $P_l(t)$ at each time interval; and the following constraints are defined:

$$-P_g^m \le P_g(t) \ge P_g^m \quad (15)$$

$$-P_b^m \le P_b(t) \ge P_b^m \quad (16)$$

$$0 \le P_e^c(u,t) \ge P_e^m(u) \quad (17)$$

$$\underline{SoC_b} \le SoC_b(t) \ge \overline{SoC_b} \quad (18)$$

$$SoC_e(u,t) \ge SoC_e^d(u) \quad (19)$$

$$P_l(t) - P_{pv}(t) + P_b(t) + P_{pv}^c(t) - P_g(t) == 0 \quad (20)$$

where $\underline{SoC_b}$ and $\overline{SoC_b}$ are the minimum and maximum SoC limit of BESS, respectively; $SoC_e^d(u)$ is the desired minimum battery SoC of EV at the departure, and $P_e^m(u)$ is the maximum EV battery charging power. Eq. (15) is grid power supply/inject constraint, Eq. (16) present BESS charging/discharging power constraint, Eq. (17) indicates the EV battery charging power limitation, Eq. (18) is the SoC operation constraint for BESS, and Eq. (19) is the constraint for user satisfaction which indicated with the minimum desired SoC at the departure, and Eq. (20) is the power balance equation of the microgrid system.

The identical objective function is solved individually with three heuristic algorithms — particle swarm optimization (PSO), differential evolution (DE), and hybrid PSO-DE — along with mixed-integer linear programming (MILP) to enable performance evaluation based on calculation time and cost reduction. In every approach, the optimization algorithm calculates the power outputs of the BESS, PV curtailment, EV charging power, and the transactions of buying/selling power with the main grid.

### 2.3. Heuristic algorithms

In this study, three optimization approaches are proposed, integrating two heuristic algorithms — Particle Swarm Optimization and Differential Evolution— alongside MILP for performance evaluation. Simulation results are presented for three configurations for heuristic methods: PSO-only optimization, DE-only optimization, and a hybrid PSO-DE optimization. Each heuristic method generates population for SoC of BESS and load power (total consumption of EV loads) with 25 and 24 elements (totally 49 individuals) corresponding to overall time horizon from the beginning of the day ($t=0$) to the end of the day ($t=24$). The rest of the details of the heuristic algorithms implementation in the formulated optimization are described in detail in the following section.
### 2.3.1. Particle swarm optimization

In the PSO algorithm, during simulations where both battery discharge and load-side power are optimized simultaneously, each particle's position at time t, denoted as $X_t$, represents the battery's state of charge (SOC) and the load power at that time. Initially, all particles are randomly initialized. The swarm is then iteratively updated using the following equations:

$$V_{t+1} = w \cdot V_t + c_1 \cdot (P_i - X_t) + c_2 \cdot (P_g - X_t) \quad (21)$$

where w is the inertia weight, $c_1$ and $c_2$ are cognitive and social coefficients, $P_i$ represents the best-known position of the individual particle, $P_g$ represents the global best-known position found by the swarm, $\bar{X}_i$ is the particle's position at time t, $V_i$ is the velocity of particle at time t. When updating particle velocity, two different sets of w, $c_1$, and $c_2$ are used separately to update the battery SOC and load power. To prevent excessively fast convergence during iterations, $V_{t+1}$ needs to be constrained within a certain range.

$$V_{t+1} = \begin{cases} -V_{max} & , \text{if } V_{t+1} < -V_{max} \\ V_{t+1} & , \text{else if } -V_{max} \le V_{t+1} \le V_{max} \\ V_{max} & , \text{otherwise} \end{cases} \quad (22)$$

$$X_{t+1} = \begin{cases} \min(X_{t+1}) & , \text{if } X_t + V_{t+1} < \min(X_{t+1}) \\ X_t + V_{t+1} & , \text{if } \min(X_{t+1}) \le X_t + V_{t+1} \le \max(X_{t+1}) \\ \max(X_{t+1}) & , \text{otherwise} \end{cases} \quad (23)$$

where $\min(X_{t+1})$, $\max(X_{t+1})$ represent the minimum and maximum possible values of the particle position at time t + 1 determined based on the microgrid state at time t. If $X_{t+1}$ exceeds the above boundaries, it will no longer have a physically meaningful interpretation. After hyperparameter tuning using grid search, the optimal parameter combination for the PSO algorithm is determined in Table 1.

<table><caption>TABLE 1. PSO parameters</caption><thead><tr><th>Name</th><th>Meaning</th><th>Value</th></tr></thead><tbody><tr><td>numparticle</td><td>Population size</td><td>150</td></tr><tr><td>w<sup>soc</sup></td><td>Inertia weight for SOC</td><td>1.3</td></tr><tr><td>c<sub>1</sub><sup>soc</sup></td><td>Cognitive coefficient for SOC</td><td>2.6</td></tr><tr><td>c<sub>2</sub><sup>soc</sup></td><td>Social coefficient for SOC</td><td>2.2</td></tr><tr><td>V<sup>soc</sup><sub>max</sub></td><td>Max velocity in each iteration for SOC</td><td>2.2</td></tr><tr><td>w<sup>load</sup></td><td>Inertia weight for load</td><td>1.3</td></tr><tr><td>c<sub>1</sub><sup>load</sup></td><td>Cognitive coefficient for load</td><td>1.5</td></tr><tr><td>c<sub>2</sub><sup>load</sup></td><td>Social coefficient for load</td><td>4.0</td></tr><tr><td>V<sup>load</sup><sub>max</sub></td><td>Max velocity in each iteration for load</td><td>5.0</td></tr></tbody></table>

### 2.3.2. Differential evolution optimization

Differential Evolution (DE) optimizes the objective function by simulating the evolutionary process through three main operations (mutation, crossover, and selection). The core idea is to utilize differential information between individuals to guide the search process. In the first step, the population of the solution space is generated which consists N individuals (49 members). After that, for each individual $\bar{X}_i$ in the population, three distinct individuals $X_1$, $X_2$, and $X_3$ are selected for mutation.

$$X_m = X_1 + F \cdot (X_2 - X_3) \quad (24)$$

where $X_m$ is the mutation individual (a new candidate solution), F is the scaling factor. In the next step, to enhance search diversity, crossover operation is applied on the mutated individual $X_m$ over with the current individual $X_i$.

$$X_c(t) = \begin{cases} X_m(t) & , \text{if } r_t \le CR \text{ or } t = t_{rand} \\ X_i(t) & , \text{otherwise} \end{cases} \quad (25)$$

where $X_c(t)$ is the new individual generated through crossover, and $r_t$ is a random value between 0 and 1. The crossover probability CR determines the proportion of dimensions that will be replaced by the mutation vector $X_m(t)$. The parameter $j_{rand}$ ensures that at least one dimension is replaced, preventing the individual from remaining unchanged. Lastly, the objective function values of the new individual $\bar{X}_m$ and the old individual $\bar{X}_i$ are compared to determine the best individual for next iteration. After hyperparameter tuning using grid search, the optimal parameter combination for the DE algorithm is determined in Table 2.

<table><caption>TABLE 2. DE parameters</caption><thead><tr><th>Name</th><th>Meaning</th><th>Value</th></tr></thead><tbody><tr><td>num-individual</td><td>Population size</td><td>150</td></tr><tr><td>F<sup>soc</sup></td><td>Scaling factor for SOC</td><td>0.2</td></tr><tr><td>F<sup>load</sup></td><td>Scaling factor for load</td><td>0.6</td></tr><tr><td>CR</td><td>Crossover probability</td><td>0.5</td></tr></tbody></table>

### 2.3.3. Hybrid PSO-DE optimization

As an alternative to using a single heuristic algorithm, a hybrid optimization approach is proposed in which the formulated problem is first solved using the DE method, followed by PSO. Both algorithms aim to minimize the cost associated with the microgrid structure. The hybrid process begins with the DE algorithm to obtain an initial optimal solution. This solution is then used to initialize the population for the subsequent PSO stage, enhancing its convergence. By combining the strengths of both heuristic methods, the hybrid model aims to achieve improved optimization performance.

## 3. SIMULATION RESULTS

A year-long simulation of the microgrid was performed using two rule-based methods, three heuristics, and one MILP algorithm, employing annual irradiance data collected from measurements taken at the Avenues laboratory in UTC, Compiègne, France. The remaining parameters for the simulation configuration are provided in the Table 3.

Fig. 2 presents the simulation results of the objective function (in euros) across various algorithms. The results indicate that the only controlling BESS strategy achieves modest cost reductions, with values ranging from approximately 1.97% for PSO to 2.13% for **hybrid PSO-DE**, and a slightly lower reduction of 2.11% for MILP. This shows that while the differences among the algorithms are relatively small for the only BESS control scenario, there is a visible, consistent trend where **hybrid PSO-DE** slightly outperforms the other heuristic techniques. The consistent performance across PSO, DE, and MILP for only controlling BESS suggests that the robustness of each algorithm in this configuration may be comparable when focusing solely on the optimization of cost reduction, although the differences might be more significant when additional constraints or performance metrics are considered. Furthermore, the simulation results indicate that there is no significant difference in cost and power profiles between the two baseline algorithms (first-come-first-serve and equal-share-group-serve despite the use of different energy dispatching strategies for EV battery charging. This outcome is primarily due to the non-restrictive nature of the grid power limit and not having the arrival of EVs most of the time at the same moment, which together ensure an adequate supply of power for charging EV batteries. Future studies will incorporate more stringent scenarios to enable a more comprehensive comparison (e.g., considering grid congestion).
<table><caption>TABLE 3. Parameters of the simulation setup</caption><thead><tr><th>Equipment</th><th>Parameter</th><th>Value</th><th>Unit</th></tr></thead><tbody><tr><td rowspan="4">PV</td><td>Rated power</td><td>200</td><td>Wp</td></tr><tr><td>NOCT</td><td>45</td><td>°C</td></tr><tr><td>Temperature coefficient</td><td>-0.45</td><td>%/°C</td></tr><tr><td>Number of modules</td><td>200</td><td>—</td></tr><tr><td rowspan="3">BESS</td><td>Energy capacity</td><td>80</td><td>kWh</td></tr><tr><td>Min/Max SOC</td><td>0 – 100</td><td>%</td></tr><tr><td>Maximum power</td><td>80</td><td>kW</td></tr><tr><td rowspan="4">Main Grid</td><td>Maximum power</td><td>100</td><td>kW</td></tr><tr><td>Buying price (low)</td><td>0.1524</td><td>€/kWh</td></tr><tr><td>Buying price (medium)</td><td>0.2068</td><td>€/kWh</td></tr><tr><td>Buying price (high)</td><td>0.2795</td><td>€/kWh</td></tr><tr><td rowspan="5">EVs</td><td>Selling price</td><td>0.0800</td><td>€/kWh</td></tr><tr><td>Energy capacity</td><td>50</td><td>kWh</td></tr><tr><td>Maximum power</td><td>11</td><td>kW</td></tr><tr><td>Arrival SOC</td><td>10 – 40</td><td>%</td></tr><tr><td>Arrival time</td><td>5AM – 23PM</td><td>hour</td></tr><tr><td></td><td>Departure time</td><td>Arrival + 7 hour</td><td>hour</td></tr></tbody></table>

<figure><img src="image_3.png" /><figcaption>FIG. 2. Comparison of simulation results in terms of total cost reduction and simulation time per day optimization (Computation time of linear optimization is negligible).</figcaption></figure>

In contrast, controlling BESS with EV exhibits more variable performance with wider-ranging cost reduction percentages. Here, the cost reductions span from 6.61% for DE to 13.22% for MILP, with PSO and PSO-DE achieving 8.35% and 9.86%, respectively. This variability may indicate that the inclusion of EV control introduces additional complexity in the optimization process, causing the algorithms to react differently under the enhanced control setting. These results highlight the potential need for strategic selection of algorithm depending on whether a more conservative yet consistent control or an aggressive, hybrid control (with EV integration) is desired, factoring in both cost savings and the associated computation times.

Fig. 2 also depicts the average computation time per day (in seconds) for various algorithms. The results indicate that classical algorithms and linear optimization algorithms exhibit very brief runtimes, as they do not involve iterative processes, rendering their computation time minimal. For only controlling BESS, PSO demonstrates the fastest execution at 10 seconds per day, while DE requires 52 seconds, and hybrid PSO-DE needs 55 seconds. MILP shows instantaneous computation (negligible), though this excludes the solver initialization time. These differences become particularly relevant in real-time applications where computational efficiency is crucial alongside optimization performance. When implementing the control BESS with EV, the computational burden increases for most algo-

<figure><img src="image_4.png" /><figcaption>FIG. 3. Change of electricity consumption cost results for each EV user compared to baseline cases (-: cost reduction, +: cost increase).</figcaption></figure>

rithms, particularly for PSO which jumps from 10 to 22 seconds per day. DE shows a slight decrease to 48 seconds, while hybrid PSO-DE maintains its 55 seconds computation time, suggesting that its hybrid nature handles the additional EV complexity without extra computational overhead. This computational cost analysis, combined with the earlier cost reduction findings, presents an important trade-off: while MILP achieves the best cost reduction (13.22%) with minimal computational time, hybrid PSO-DE offers competitive cost reduction (9.86%) but requires significantly more processing time, which could impact real-world implementation decisions.

In Fig. 3 and Fig. 4, the EV cost change results are presented. Most EVs experience overall cost reductions under both BESS control and BESS with EV control methods; however, clear differences emerge among individual EVs. While the majority of EVs show significant cost reductions, EV-4 stands out for registering cost increases in every method, suggesting that specific operational or user factors may be influencing its performance. In contrast, EVs such as EV-2, EV-8, and EV-9 consistently achieve high cost reductions, indicating strong performance consistency under typical conditions. Analysis of cost changes reveals that BESS with EV control achieves deeper cost reductions (-13.22% with MILP) compared to BESS control alone (-2.11% with MILP). However, EV-4 shows substantial cost increases ranging from 53.81% to 74.92% across all methods, with DE showing the highest increase. This significant cost increase for EV-4 could lead to reduced participation in active energy scheduling, as users experiencing such increases may be less willing to provide flexibility in their charging patterns in the future.

The analysis of EV cost change results reveals that both BESS control and BESS with EV control generally deliver cost reductions (indicated by negative values), yet the integrated BESS with EV control approach tends to achieve slightly deeper reductions overall. Most EVs experience substantial reductions, with several units (e.g., EV-2, EV-8, and EV-9) consistently showing improved performance under both strategies. However, notable exceptions such as EV-4 show cost increases under both methods, underscoring the need for further investigation into these outlier cases to better understand the underlying factors driving the lower performance.

Comparing the two strategies, BESS with EV control typically provides enhanced cost reduction when compared to traditional BESS control, suggesting that the additional EV control mechanism can deliver more efficient tariff adjustments. Despite these overall improvements, the variability in performance remains similar across both control methods, as indicated by mixed cost change values for some EVs. This implies that while
<figure><img src="image_5.png" /><figcaption>FIG. 4. Change of electricity consumption cost results for each EV user compared to baseline cases. (a) Battery only control, (b) Battery with EV control.</figcaption></figure>

the integrated approach offers benefits on average, targeted solutions may still be necessary for addressing cases where cost increases occur.

## 4. CONCLUSIONS

This study proposes a comprehensive energy management framework to optimize the operational efficiency, sustainability, and cost-effectiveness of microgrids integrating RES, BESS, and flexible EV charging. By comparing rule-based methods with advanced optimization strategies—including MILP, PSO, DE, and a hybrid PSO-DE approach—the study demonstrates the tangible benefits of algorithmic optimization in enhancing microgrid performance.

Key findings show that while rule-based approaches offer simplicity and minimal computation time, their performance is limited. In contrast, optimization methods demonstrate significant improvements. When only the BESS is controlled, cost reductions are modest—ranging from 1.97% with PSO to 2.11% with MILP. However, integrating EV flexibility leads to much larger savings, with MILP achieving the highest cost reduction at 13.22%, followed by hybrid PSO-DE at 9.86%, PSO at 8.35%, and DE at 6.61%. MILP delivers these benefits with negligible computation time, while hybrid PSO-DE requires up to 55 seconds per day, illustrating a trade-off between optimization quality and computational cost. This reinforces the suitability of hybrid algorithms for near-real-time applications, particularly in systems where computational resources are a constraint.

Additionally, the study highlights how user-specific outcomes—such as the observed cost increases for several users across different scenarios—underscore the importance of individualized energy strategies to ensure fairness and maintain user participation. If such cost increases are not addressed, they could jeopardize the overall system performance by discouraging user engagement and reducing the effectiveness and long-term viability of implementing EV flexibility.

Future work will address current limitations by incorporating battery degradation models, stochastic forecasting of renewable generation and load demand, and exploring the scalability of the proposed strategies to more complex and heterogeneous microgrid environments. Furthermore, the integration of user behavior modeling and adaptive control mechanisms will be explored to enhance user engagement and ensure equitable benefits across all participating stakeholders.

## 5. ACKNOWLEDGEMENT

This work has been achieved within the framework of 4BLife project funded by ADEME.

## 6. REFERENCES

[1] F. A. Kassab, R. Rodriguez, B. Celik, F. Locment, and M. Sechilariu, "A comprehensive review of sizing and energy management strategies for optimal planning of microgrids with pv and other renewable integration," *Applied Sciences*, vol. 14, no. 22, 2024.

[2] F. A. Kassab, B. Celik, F. Locment, M. Sechilariu, S. Liaquat, and T. M. Hansen, "Optimal sizing and energy management of a microgrid: A joint milp approach for minimization of energy cost and carbon emission," *Renewable Energy*, vol. 224, p. 120186, 2024.

[3] D. Huo, M. Santos, I. Sarantakos, M. Resch, N. Wade, and D. Greenwood, "A reliability-aware chance-constrained battery sizing method for island microgrid," *Energy*, vol. 251, p. 123978, 2022.

[4] M. R. Jannesar, A. Sedighi, M. Savaghebi, and J. M. Guerrero, "Optimal placement, sizing, and daily charge/discharge of battery energy storage in low voltage distribution network with high photovoltaic penetration," *Applied Energy*, vol. 226, pp. 957-966, 2018.

[5] R. Kizito, Z. Liu, X. Li, and K. Sun, "Stochastic optimization of distributed generator location and sizing in an islanded utility microgrid during a large-scale grid disturbance," *Sustainable Energy, Grids and Networks*, vol. 27, p. 100516, 2021.

[6] A. François, R. Roche, D. Grondin, and M. Benne, "Assessment of medium and long term scenarios for the electrical autonomy in island territories: The reunion island case study," *Renewable Energy*, vol. 216, p. 119093, 2023.

[7] S. Brisset and M. Ogier, "Collaborative and multilevel optimizations of a hybrid railway power substation," *Int. J. Numer. Model. Electron. Netw. Devices Fields*, vol. 32, no. 4, 2019.

[8] İ. Çetinbas, B. Tamyürek, and M. Demirtas, "The hybrid harris hawks optimizer-arithmetic optimization algorithm: a new hybrid algorithm for sizing optimization and design of microgrids," *IEEE Access*, vol. 10, pp. 19254-19283, 2022.

[9] P. M. Saikia, M. Buragohain, and N. K. Das, "Enhancing lifespan of battery storage system in energy and regulation markets through power stabilization using heuristic concept," in *2022 International Conference on Augmented Intelligence and Sustainable Systems (ICAISS)*, 2022, pp. 01-08.

[10] A. I. Abeg, M. R. Islam, M. A. Hossain, M. F. Ishraque, M. R. Islam, and M. Hossain, "Capacity and operation optimization of hybrid microgrid for economic zone using a novel meta-heuristic algorithm," *Journal of Energy Storage*, vol. 94, p. 112314, 2024.

[11] A. Baziar and A. Kavousi-Fard, "Considering uncertainty in the optimal energy management of renewable micro-grids including storage devices," *Renewable Energy*, vol. 59, pp. 158-166, 2013.

[12] M. Marzband, E. Yousefnejad, A. Sumper, and J. L. Domínguez-García, "Real time experimental implementation of optimum energy management system in standalone microgrid by using multi-layer ant colony optimization," *International Journal of Electrical Power & Energy Systems*, vol. 75, pp. 265-274, 2016.

[13] S. Mohammadi, S. Soleymani, and B. Mozafari, "Scenario-based stochastic operation management of microgrid including wind, photovoltaic, micro-turbine, fuel cell and energy storage devices," *International Journal of Electrical Power & Energy Systems*, vol. 54, pp. 525-535, 2014.

[14] S. Conti, R. Nicolosi, S. A. Rizzo, and H. H. Zeineldin, "Optimal dispatching of distributed generators and storage systems for mv islanded microgrids," *IEEE Transactions on Power Delivery*, vol. 27, no. 3, pp. 1243-1251, 2012.

[15] P. Li and M. Zheng, "Multi-objective optimal operation of hybrid ac/dc microgrid considering source-network-load coordination," *J. Mod. Power Syst. Clean Energy*, vol. 7, pp. 1229-1240, 2019.