Papier Doha
Papier Doha
Results in Engineering
journal homepage: www.sciencedirect.com/journal/results-in-engineering
A R T I C L E I N F O A B S T R A C T
Keywords: The real-time operation of microgrids is crucial due to its ability to enhance energy resilience and efficiency.
Energy management Continuous monitoring and adaptation to fluctuations in energy supply and demand ensure a stable and reliable
Integrated energy systems electricity supply to local communities, even in the case of grid disturbances. This article presents an efficient and
Real-time control
easily implementable real-time energy management and control system based on multi-agent systems for hybrid
Energy efficiency
Low-Voltage Micro-Grids (LVMGs) using energy storage systems and renewable sources. The main objective of
Energy optimization
Smart grids the proposed approach is to determine optimal setpoints for all microgrid components to improve overall effi
Hybrid low-voltage microgrids ciency and reduce electricity costs while satisfying multiple constraints. The well-defined flexibilities of all
Energy flexibility microgrid components to adjust their power are exploited to achieve optimal power allocation. The approach is
Distributed energy resources tested and validated by developing a simulation environment using the Java Agent Development (JADE)
framework, enabling the implementation of microgrid optimization through MATLAB/Simulink.
* Corresponding author.
E-mail address: [email protected] (D. El Hafiane).
https://doi.org/10.1016/j.rineng.2024.103035
Received 5 August 2024; Received in revised form 21 September 2024; Accepted 29 September 2024
Available online 4 October 2024
2590-1230/© 2024 The Authors. Published by Elsevier B.V. This is an open access article under the CC BY-NC license (http://creativecommons.org/licenses/by-
nc/4.0/).
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
fluctuations. The implementation of demand response strategies, and consumption [7]. These systems leverage distributed generation
coupled with MAS’s adaptability to changes, enhances the microgrid’s (DG) to enhance energy independence, reduce costs, and minimize
resilience and reliability [10]. Utilizing advanced optimization algo environmental impact. Renewable sources, while beneficial, introduce
rithms, MAS ensures optimal resource allocation, minimizing costs and variability that must be managed to maintain grid stability. This is
maximizing the utilization of renewable energy. The scalability of MAS complemented by the utility grid, which provides additional power
enables its application in microgrids of varying sizes, and the learning coverage and reliability across extensive territories.
capabilities of agents contribute to continuous improvement in On the consumption side, LVMGs manage a variety of loads,
decision-making, making it a powerful tool for achieving sustainability, including both continuous (DC) and alternating (AC) loads. These loads
efficiency, and resilience in hybrid microgrid operations [9]. vary in their demand patterns and criticality, necessitating sophisticated
This study focuses on the management and optimization of a low- strategies to differentiate between essential services, which require
voltage microgrid with a multi-source (wind, PV, diesel generator) uninterrupted power, and non-essential services, which can tolerate
and multi-load (DC and AC) configuration, coupled with an energy brief interruptions [12]. Energy storage systems play a critical role by
storage system and connected to the low-voltage network. The primary absorbing excess power during peak production and releasing energy
objective is to maximize the overall efficiency of the microgrid while during low production periods, thus maintaining a balanced state of
minimizing costs. To achieve this goal, the study adopts a comprehen charge (SoC) and stabilizing the microgrid against the inherent inter
sive approach, including load management, source management, inte mittency of RES.
gration of energy storage systems, and intelligent control systems using As depicted in Fig. 1, the hybrid Low-Voltage Microgrid (LVMG)
advanced real-time algorithms. Leveraging the multi-agent system integrates several energy generation and storage components. These
(MAS) approach, the study develops a simulation environment using the include photovoltaic (PV) panels and wind turbines for renewable en
Java Agent Development (JADE) framework, enabling the imple ergy production, a diesel generator for backup power, and a Battery
mentation of microgrid optimization through various technologies and Energy Storage System (BESS) for balancing energy supply and demand
platforms, such as MATLAB/Simulink and JADE [1,4]. The proposed during fluctuations. This integration not only ensures energy efficiency
method aims to determine the optimal power set-points of the microgrid and sustainability but also enhances the resilience of the local energy
components, considering fluctuating electricity prices and adhering to system [13]. The microgrid supports both DC and AC loads, ensuring
strict constraints. By considering factors such as energy prices, grid energy flexibility. The system operates in two modes: islanded mode,
conditions, source availability, and sustainability goals, the proposed where it is disconnected from the main grid and functions autono
algorithm ensures improved flexibility and efficiency in microgrid mously, and grid-connected mode, where energy can be exchanged with
operation [8,11]. the main utility grid.
The following sections outline the characteristics of hybrid LVMGs, The microgrid can operate in two modes, Islanded, and grid-
delve into MAS technologies, and detail the implementation of MAS for connected Mode [8]:
optimal energy management, culminating in a comprehensive analysis
of the results and their implications for future microgrid applications. ● Islanded mode: In island mode, the microgrid operates independently,
separate from the main utility grid. Microgrids generate and
2. Hybrid LV microgrids consume electricity independently without being related to external
power sources.
2.1. Characteristics of a hybrid LV microgrids ● Grid-connected Mode: In grid-connected mode, the microgrid is syn
chronized and connected to the main utility grid. Depending on en
Hybrid Low-Voltage Micro-Grids (LVMGs) are sophisticated energy ergy demand and generation capacity, the microgrid can import or
networks that integrate renewable energy sources (RES), such as solar export electricity.
photovoltaics (PV) and wind turbines, with traditional utility grids and
energy storage systems to optimize electricity generation, distribution,
Fig. 1. Schematic of the hybrid LVMG system, comprising PV panels, wind turbines, a diesel generator, and Battery Energy Storage System (BESS). The system
manages both AC and DC loads and operates in either islanded or grid-connected mode.
2
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
2.2. Optimization in microgrid and secure operation, whether connected to a utility grid or operating
independently. The control system centrally manages distributed gen
Optimizing energy consumption in microgrids is an essential part of erators (DGs), energy storage systems (ESS), loads, monitors, and con
maximizing energy efficiency, reducing costs, and minimizing envi trols the entire microgrid. It optimizes the control strategy in real-time
ronmental impact [1,14]. Effective optimization strategies include: based on the operating conditions, contributing to efficient energy
management and system reliability [10].
● Load management: This involves balancing energy demand with Various approaches can be used, including centralized, decentral
production capacity through dynamic pricing to incentivize lower ized, and distributed control strategies [17]. These strategies play a
consumption during peak hours and advanced demand planning. crucial role in managing the operation and stability of microgrids. Fig. 2
Utilizing historical and forecast data, microgrids can adjust genera illustrates the three main control strategies employed in microgrid
tion and storage to meet predicted energy requirements efficiently management: centralized, decentralized, and distributed control. In
[15]. centralized control, a single central controller manages the energy flow
● Source management: Microgrids integrate diverse distributed energy and decision-making for the entire system, ensuring coordination be
resources (DER), such as solar and wind. Optimization here involves tween all components, including renewable sources, storage systems,
using predictive weather technologies and real-time data to maxi and loads. Decentralized control, on the other hand, delegates
mize production from renewable sources, adapting output to decision-making to individual local controllers, each responsible for
changing environmental conditions. managing a specific component of the microgrid. Finally, distributed
● Energy storage: By incorporating systems like batteries, microgrids control is characterized by a network of local controllers that commu
can store excess energy generated during peak production times and nicate with each other in a peer-to-peer manner, enabling dynamic co
release it when demand is high. This not only smooths out the load ordination and system-wide optimization without relying on a single
but also mitigates the variability of renewable energy sources. central controller. Each control strategy offers different benefits in terms
● Intelligent control and energy savings: Intelligent control systems use of system scalability, flexibility, and resilience.
advanced algorithms to adjust energy production, storage, and dis Here’s a summary of the control strategies based on the provided
tribution in real-time. This can include making automated decisions sources:
to optimize energy consumption according to various parameters.
The use of predictive analytics data can help identify energy-saving ● Centralized Control: The control system manages distributed genera
opportunities and take steps to realize them. tors (DGs), energy storage systems (ESs), and loads centrally. Also, it
monitors and controls the entire microgrid. It optimizes the control
The optimization of energy consumption in microgrids is based on a strategy in real-time based on the operating conditions, contributing
combination of smart technologies, energy storage, demand-side man to efficient energy management and system reliability.
agement, and renewable energy sources to ensure efficient energy use, ● Decentralized Control: Decentralized control involves making de
increased reliability, and reduced costs [1,16]. cisions at a local level within the microgrid. It can include inde
The optimization process ensures that operational and capital costs pendent active and reactive power control, correction of voltage sag,
are minimized, with a detailed explanation of the cost-related con and system stability.
straints, including the limits on both operational and capital expendi ● Distributed Control: Distributed control involves the coordination of
tures, and the mathematical formulation used to incorporate them, control actions across multiple entities within the microgrid. It in
provided in Section V.B. Additionally, we will detail how the system is cludes voltage and frequency regulation, real and reactive power
designed to operate with flexibility to accommodate variations in energy control, and making decisions for market participation and coordi
supply and demand. We also explain the importance of balancing system nation with the upstream network.
flexibility and stability under fluctuating conditions in this section.
These control strategies are essential for ensuring the stable and
2.3. Control of a microgrid secure operation of microgrids, whether they are connected to a utility
grid or operating independently. They contribute to the efficient man
The control of a microgrid is a critical aspect that ensures its stable agement of distributed energy resources and loads, as well as the overall
3
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
stability and reliability of the microgrid system [9]. landscape, where efficiency and adaptability are paramount.
As depicted in Fig. 3, the control layers in the microgrid system Fig. 4 provides a schematic representation of a Multi-Agent System
ensure that local and system-wide energy management tasks are per (MAS) in a microgrid. It illustrates the network of autonomous software
formed efficiently. The primary control addresses immediate response and hardware agents, each responsible for specific aspects of system
needs, while the secondary and tertiary layers manage broader grid management such as load balancing, energy storage, and source control.
stability and optimization tasks. The microgrid control system typically Agents receive data from various sensors and execute decisions auton
consists of three levels of control, the microgrid control unit typically omously while communicating within a robust network to coordinate
consists of the Microgrid Central Controller (MGCC), Micro-Source actions and optimize overall system performance. The diagram also
Controller (MSC), and Local Controller (LC), each serving specific highlights the adaptive learning mechanisms that enable continuous
functions within the microgrid system [7]. improvement in response to changing conditions.
The MGCC is responsible for centralized control and optimization, There are various types of agents that play crucial roles in the
determining the amount of power to be imported or exported from the management, control, and operation of the microgrid. These agents have
upstream distribution system, and coordinating the overall operation of specific characteristics and responsibilities tailored to the needs of the
the microgrid. The MSC manages local power quality and follows the microgrid. Here are some common types of agents in microgrids, along
demands from the MGCC when connected to the power grid, while also with their characteristics [19]:
performing local optimization of the micro source. The LC is involved in
the control of microgrid components, such as shedding non-critical, ● Energy Management Agents: These agents are responsible for opti
flexible loads when profitable, and monitoring the actual active and mizing the microgrid’s energy generation, distribution, and con
reactive power of the components [18]. sumption. They often use algorithms and data analytics to make
decisions based on load profiles, energy sources, and pricing infor
3. Multi-agent systems (MAS) mation. Those agents can make energy scheduling, demand-side
management, and coordination of distributed energy resources
3.1. Components of a multi-agent system (MAS) (DERs).
● Load Management Agents: These agents monitor and manage the
In the electrical domain, a multi-agent system (MAS) refers to a electricity demand within the microgrid, aiming to balance supply
network of autonomous agents, which can be software, hardware, or a and demand efficiently. Those agents can make load shedding, load
combination of both, that work together to manage and control various shifting, and prioritization of critical loads during peak demand
aspects of an electrical system. An agent is an autonomous entity able to periods.
perceive its environment, make decisions, and take actions to achieve ● Distributed Energy Resource (DER) Agents: DER agents control and
specific goals or objectives. Agents can be software programs, robots, coordinate the operation of renewable energy sources (e.g., solar
animals, or even humans, and they are a fundamental concept in the panels, wind turbines) and energy storage systems. They can Decide
field of artificial intelligence (AI) and multi-agent systems [19]. when and how to generate or store energy, based on weather con
Agents operate independently to a certain extent, they can perceive ditions and demand.
their environment through sensors, which can include various types of ● Battery Management Agents: Battery management agents control the
sensors, cameras, microphones, or other means of data collection. charge and discharge cycles of energy storage systems (e.g., batte
Agents use the information gathered from their environment to make ries) to optimize energy usage and grid stability. They can do battery
decisions. These decisions are often guided by a set of predefined goals scheduling, state-of-charge management, and fault detection.
or objectives, after making a decision, an agent can execute actions in its ● Grid Management Agents: These agents manage the connection of
environment to achieve its goals. Many agents can be adapted to the microgrid to the main power grid. They ensure seamless transi
changing environments and conditions. They can adjust their behavior tions between grid-connected and island modes. They are respon
based on new information or circumstances, they may communicate sible for grid synchronization, islanding, and reconnection to the
with each other or with a central control system to exchange informa main grid when needed.
tion, coordinate actions, or negotiate [8]. ● Control Agents: Control agents oversee the overall coordination and
Through adaptability and continuous learning, agents can refine control of microgrid components, ensuring they work together
their decision-making processes based on new data, leading to ongoing harmoniously. They can coordinate energy resources, monitor sys
improvements in system efficiency and responsiveness. For example, an tem performance, and maintain grid stability.
agent managing a solar panel array may adjust its parameters to maxi
mize output as weather conditions change throughout the day. Imple
menting MAS in electrical systems like microgrids exemplifies the 3.2. Multi-agent system (MAS) approach
transition towards more decentralized, intelligent, and resilient energy
infrastructures. Such systems are increasingly critical in today’s energy The multi-agent system (MAS) approach in microgrid management
that can be represented as a market involves distinguishing between
seller and buyer agents [7]. Seller agents supply energy, including
renewable energy sources, the local grid, and batteries when used to
provide energy. Buyer agents consume energy, including loads, con
sumers, and batteries when charging. The MAS framework facilitates
transactions in the electricity market with double-sided bidding, energy
trading, and scheduling among microgrids. It includes agents repre
senting buyers and sellers, aiming to achieve their own goals through
collaborative regulation optimization for microgrid economic dispatch.
The execution of the multi-agent system (MAS) algorithm in micro
grid management involves several steps, as outlined in the provided
search results:
4
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
● Evaluation of current demand and energy generation: The current de MAS algorithm in Fig. 5 facilitates the interaction and decision-making
mand of the loads, considered buyers, is evaluated against the energy of seller and buyer agents, contributing to the efficient operation of
generated by the sources, considered sellers of electricity. microgrids and the optimization of energy resources [20].
● Consideration of the total number of agents: The total number of agents, The provided search results offer valuable insights into the applica
including sellers and consumers, impacts the consideration of each tion of MAS in microgrid management, highlighting the role of seller and
agent. buyer agents in energy trading and scheduling.
● Market distribution: The market is distributed to allow production
entities to sell electricity directly to the microgrid or give a main 4. The optimization in a LVMG
agent the possibility to buy directly from the system.
● Beginning of a new negotiation cycle: A new negotiation cycle begins, 4.1. The structure of the microgrid
and agents bid in the Market power Seller/Buyer Agents.
● End of the negotiation cycle: The current negotiation cycle ends, and The LVMG under study is a hybrid system comprising a local AC grid,
agents announce their Assignment Power Seller/Power Buyer Agents photovoltaic (PV) panels, wind turbines, a diesel generator, and both AC
to their Parent Agent. and DC loads, supplemented by a battery storage system. Each compo
● Declaration of parent agent: Seller and consumer agents declare their nent within this microgrid is modeled as an agent capable of both pro
parent agent, after which they terminate themselves. ducing and consuming power within the network, organized into three
operational categories: production/supply (PDER (t)), consumption/de
These steps illustrate the process of energy trading and scheduling mand (PLoads (t)), and storage/backup (PBack (t)).
among microgrids using the MAS algorithm, enabling the optimization The primary goal is to optimize this microgrid using a multi-agent
of energy management and the coordination of energy transactions. The system model to ensure real-time energy balance [21]. This is
5
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
where:
PDER (t) = PPV (t) + PWind (t) (2)
● Modeling of solar PV
6
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
actual power extracted by the turbine to the maximum possible power availability from renewable sources first; if sufficient, it directs energy to
that could be extracted from the wind. The power coefficient is influ loads and assesses potential surplus for battery storage. Inadequate
enced by the design characteristics of the wind turbine and is typically supply triggers utility grid support to maintain energy balance.
obtained from the turbine’s power curve. Utilizing MATLAB/Simulink for detailed modeling of the energy
components and JADE for agent behavior simulation ensures compre
● Diesel generator model hensive coverage of both control strategies and agent interactions.
Simulations run over a 24-h period reveal how the system adapts to
A simplified model of a diesel generator for basic analysis typically variable energy availability and demand, demonstrating the MAS’s
involves representing the generator as a voltage source with an internal effectiveness in real-time energy management.
resistance. This model helps in understanding the basic electrical The use of MacsimJX facilitates the integration of the MG simulated
behavior of the generator under varying load conditions. Here’s a in Matlab Simulink and the JADE agent environment (as shown in
simplified model: Fig. 8).
The aim is to control the variable “B" mentioned in equation (1),
E
E = V + Ia .Ra I = (7) which is the balance between local production by DER sources and load
Ra + RL
consumption, that must be achieved instantaneously according to the
P = E.I (8) power produced and load demand. An order of priority is predefined to
manage the sources to be assigned to the loads, in the first instance the
where E is the generator voltage source, Ra is the internal Resistance of program must check the energy produced by the renewable energy
the generator, RL is the external load connected to the generator, I is the sources, if these sources can cover the needs of the MG an action is
load current, V is the terminal voltage, P is the electrical power output. executed to feed the loads and see if there is an excess that can be
The efficiency of the generator represents the ratio of electrical assigned to the battery, if not, we need to check whether the balance
power output Pe to mechanical power input Pm and is given by: power is sufficient to meet the MG’s instantaneous energy needs,
otherwise, we need to take an action that calls the utility network to
Pe = E.I (9) maintain the energy supplied to the MG, as shown in Fig. 8.
In this step, we need to define the management process in the multi-
Pm = T.ω (10)
agent system based on the MAS algorithm (see Fig. 5) and also the pri
Pe ority order we have predefined. The following algorithm manages this
n= (11) optimization planning process in the MAS:
Pm
The system makes the data analyses based on the information
where T is the torque produced by the machine and ω is the angular communicated in the network such as the power measurement (see
velocity of the machine. Fig. 4), that can help the control system to make the right decision ac
cording to the power estimation of the actual demand and actual
● ESS model production.
In the beginning the system defines the power management program,
Energy storage systems (ESS) play a crucial role in overcoming the the energy consumption can be presented in 4 cases:
intermittency challenges of renewable energy sources. By storing sur
plus energy production and providing energy when there is a deficiency ● Case 1: when the actual demand and actual production are balanced,
in renewable energy sources, ESS contributes to grid stability, reliability, if the measure of the needed power ActuelDem is equal to the
and emergency preparedness. Battery Energy Storage Systems (BESS), measured of the production power ActualProd , in this case the Loads
such as lithium-ion batteries, are particularly instrumental in maxi are totally powered by the DER sources (Wind and PV).
mizing the utilization of renewable resources and storage capacity. ● Case 2: when the actual demand is less then actual production, in
The dynamics of batteries can be modeled as follows to address the this case the Loads are totally powered by the DER sources (Wind and
challenges of intermittency in renewable energy sources like PV and PV) and the rest of the power produced is destined for changing the
wind energy [19,33,34]: battery, and when the battery is 100 % charged the power is injected
[ ( ∫t )] to the local grid.
1 ● Case 3: when the actual demand is more then actual production, in
SOCbatt = 100 1 − ibatt (t)dt (12)
Qbatt 0 this case the total of the produced power is used for the loads, the
The equation you provided is related to the state of charge (SOC) loads are also connected to the battery (It should also be specified
estimation of a battery, where SOCbatt represents the battery state of that in the case of this study, the battery must always have an SoC of
charge in percentage, ibatt is the battery current, and Qbatt is the over 30 %, for safety and emergency reasons). If the loads still need
maximum battery capacity in ampere-hours (Ah). This equation is more energy the local grid is connected to complete all the power,
fundamental for monitoring and managing the energy level of the bat and in case of abscence of the local grid (LG) the system runs the
tery, which is essential for various applications, including electric ve diesel generators.
hicles, microgrids, and renewable energy systems. ● Case 4: when the actual demand is more then actual production and
the battery charge is not enough, in this case the total of the pro
5. The implementation of MAS optimization duced power is used for the loads, remaining energy requirements is
taken from the local grid, and in case of abscence of the local grid
5.1. Case studies (LG) the système runs the diesel génerators.
7
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
● PV Agent (Photovoltaic Panels): Responsible for solar energy pro ● Wind Agent (Wind Turbines): Manages wind energy production in
duction must communicate with other agents to coordinate pro teracts with other agents to optimize the use of wind resources
duction and distribution
8
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
● Battery Agent: Controls energy storage and distribution makes de production scenarios that have been taken into account in our analysis.
cisions on charging and discharging based on microgrid needs Each scenario represents a possible state of production availability,
● Utility Grid: Agent provides an external energy source to the considering various influencing factors. There are four subfigures rep
microgrid can be used as a backup source or to supplement demand resenting the four key months: January, April, July, and October. These
● Diesel Generator: Agent provides backup energy production in case figures provide a detailed view of the production scenarios for each of
of failure of other sources activated in case of unavailability of these months, reflecting the seasonal variations.
renewable sources or demand peaks After fixing the group of agents (buyers and sellers), the system starts
● Load Agent: Represents energy-consuming equipment in the micro to study the energy market of the microgrid (MG) during 24 h for the
grid Interacts with other agents to adjust consumption based on selected months, as presented in the figure (Fig. 10). The load and the
source availability renewable energy vary according to climate change, seasons, and the
need for energy.
The energy market in this case is divided in two parts: For a basic scenario without using a multi-agent system (MAS)
optimization model, the system provides a standard control for the four
i) Seller agents: PV Agent; Wind Agent; Utility Grid Agent; and Battery months. Each scenario represents the 24-h average for the month, as
Agent depicted in Fig. 11. The sub-figures 11(a, b, c and d) illustrate the
ii) Buyer agents: Load Agent and Battery Agent contribution of wind, PV, and diesel generator sources along with the
corresponding energy demand throughout the 24-h average of the days
5.2.2. Scenario conception in January, April, July and October in a hybrid microgrid without MAS
The hybrid system consists of a photovoltaic (PV) installation with a optimization.
maximum power output of 10 kW, comprising 30 solar panels each rated For the standard operation in the MG, when the PV and wind are
at 330 W, providing a total PV capacity of 9.9 kW. In parallel, a wind available, the load is supplied by the PV and wind. If it’s not enough, the
turbine with a maximum power output of 10 kW is integrated into the utility grid completes the rest. When there is no energy demand, the PV
system. For energy storage, the system includes batteries with a total and wind power are reinjected into the local grid. If no source is avail
capacity of 12.5 kWh, which allows for the storage of excess energy able, the battery supplies the load.
produced. A 10 kW three-phase hybrid inverter ensures efficient energy Implementing optimization with multi-agent systems is also repre
management by operating both with and without batteries, thus guar sented in the scenarios for the four selected months (January, April,
anteeing flexibility and reliability. July, and October).
Renewable energy production varies with the seasons and climate, As illustrated in Fig. 12, the energy management system in the hybrid
with solar panels and wind turbines performing differently in each Low-Voltage Microgrid (LVMG) is optimized using a multi-agent system
season. Solar panels are affected by temperature and sunshine, while (MAS). The MAS coordinates energy distribution between various
wind turbines depend on wind activity. For this reason, it is necessary to sources such as PV panels, wind turbines, batteries, and diesel genera
study all seasons throughout the 12 months of the year. Therefore, we tors, while ensuring system reliability by dynamically managing loads.
will provide scenarios for four representative months, each represented This structure allows the LVMG to efficiently balance energy supply and
by the average monthly production calculated for one day of the month. demand, even in the presence of fluctuations.
Additionally, load demand varies depending on usage, monthly, and For MAS optimization, the excess PV and wind power is used to
seasonal needs. The following diagram, shown in Fig. 10, illustrates the charge the battery or is injected into the utility grid. In this case, the
supposed available production scenarios. This figure highlights different maximum produced energy is used for charging the battery, which can
Fig. 10. Available production from renewable energy sources and power demand.
9
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
Fig. 11. Basic scenario without using a multi-agent system (MAS) optimization model.
Fig. 12. Basic scenario using a multi-agent system (MAS) optimization model.
provide backup when the renewable sources are absent. primarily covered by the wind turbine. The excess of energy pro
duced is destined to be injected in the utility grid.
5.2.3. Detailed daily scenarios ● 1st April: Solar and wind power production was high, covering the
Four typical days were chosen to present the energy management of loads throughout the day. The battery SOC remained high, the excess
the system and are presented in Fig. 13. The days selected are repre of energy produced is destined to be injected in the utility grid.
sentative of the average conditions for the four chosen months: January, ● 1st July: This summer day saw high solar power production, with
April, July, and October. wind power contributing moderately. The battery SOC was fully
charged for most of the day. The utility grid was used briefly during
● 1st January: At the beginning of the day, the batteries were almost the night.
fully charged, and they are used briefly during the evening when te ● 15th October: Solar and wind resources were low in the morning,
wind power dropped and they are charged back when the wind leading to a decline in battery SOC. The fuel cell was activated to
power is in excess. The solar production was minimal. The load was cover the electrical needs and protect the battery from deep
10
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
Fig. 13. Power figures of four selected days using a multi-agent system (MAS) optimization model.
11
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
indicates a high reliance on renewable sources to meet energy needs, • Peak Load Management
which is a positive sign for environmental sustainability.
Managing peak loads is a major challenge in microgrids. Techno-
• Cost Savings economic optimization is important to ensure effective load manage
ment and to analyze and reduce peak loads to ensure system stability.
Cost savings in microgrids are a critical aspect of their evaluation. The maximum power drawn from the grid occurs between 10 h and 20 h,
Considering the impact of operating and production costs on the prof reaching 19.6 kW. The installed capacity of the microgrid includes 10
itability of microgrids, we stress the importance of calculating and kW of wind energy and 10 kW of PV, totaling 20 kW. The imple
comparing costs to optimize investments. The microgrid operating costs mentation of the microgrid reduces the peak load from 20 kW to 19.6
include: kW, which corresponds to a 2 % decrease. Although this reduction seems
modest, it can contribute to managing peak demand, reducing pressure
- Equipment maintenance: estimated at 50 € on the main grid, and lowering the risk of overloading [40].
- Purchase of grid electricity during peak hours (20 h–24 h): 117.60 € Figs. 8–10 provide sequential diagrams and power flow charts that
- Storage discharging cost (if energy storage systems are utilized): illustrate the decision-making process and outcomes at various stages.
estimated at around 0.05 €/kWh, which would add to the overall These visualizations show the contribution of wind and photovoltaic
operating costs depending on the amount of energy discharged. energy to the total production and the total consumption by different
loads. Additionally, the diagrams detail the components of microgrid
Therefore, the total operating cost of the microgrid is 167.60 €. operating costs, including maintenance and electricity purchase, and
In comparison, without using the microgrid, electricity consumption offer a comparison of costs with and without the use of the microgrid,
costs would have been 41.70 € for 278 kWh at a rate of 0.15 €/kWh. The highlighting the negative savings achieved. In terms of peak load man
savings achieved, calculated as the difference between the reference agement, the visualizations demonstrate the reduction in peak load due
costs and the microgrid operating costs, are negative at − 125.90 €. This to the installed capacity of the microgrid and the implications of this
deficit indicates that, despite using the microgrid, the current costs reduction on managing peak demand.
exceed potential savings, highlighting a possible need for operational The simulation results confirm that the proposed system is highly
optimization or initial investment adjustments. effective in managing energy flows and maintaining system stability
Table 2 presents the main formulas for calculating energy costs in a under diverse operating conditions. These findings suggest that the
microgrid [38,39]: system is well-suited for real-world implementation, where the ability to
adapt to variable renewable energy inputs and dynamic load conditions
• Environmental Impact is critical. The analysis also indicates that the proposed control strategy
could lead to improved energy efficiency and grid stability in hybrid
To emphasize the environmental aspect in our case study of hybrid microgrid systems.
low-voltage microgrids (LVMGs), we have incorporated relevant Key Remark. The simulated results provide an idealized view of system
Performance Indicators (KPIs) based on the obtained results. Our LVMG performance under stable conditions. However, when transitioning to real-
produced 260 kWh of renewable energy, potentially avoiding 130 kg of world implementation, several factors could introduce challenges. First, un
CO₂ emissions, given the carbon intensity of grid electricity [1]. With a predictable weather conditions such as sudden storms or irregular wind
total energy consumption of 278 kWh, the renewable energy coverage patterns may cause fluctuations in renewable energy generation, requiring
rate stands at 93.5 %, significantly reducing reliance on grid electricity. more frequent system interventions. Second, the degradation of system
Indirect water savings were estimated at 520 L due to reduced components over time will likely reduce efficiency, especially in energy stor
dependence on thermal power plants [18]. Waste management practices age systems such as batteries, which lose capacity as they age. Third, grid
will address the disposal of approximately 1.25 kWh worth of batteries disturbances and fluctuations in voltage or frequency could necessitate
annually. The placement of wind turbines has shown minimal impact on additional control measures to maintain stability. Despite these challenges,
local wildlife, as environmental monitoring reports indicate low risk to the proposed control strategies are designed to be robust and adaptive, making
bird populations [22]. them well-suited for real-world applications, though additional calibrations
Sustainable sourcing ensures that materials for our solar panels and may be needed to account for these real-world variables.
wind turbines meet environmental standards. The emissions intensity of
our LVMG is significantly lower compared to conventional sources, 6. Conclusion
estimated at 0.03 kg CO₂/kWh, primarily due to the use of renewable
energy [7]. These KPIs help us monitor and improve the environmental The microgrid’s architecture featured multiple components,
performance of our microgrid systems, driving sustainable practices and including renewable energy sources, storage systems, and loads inter
reducing overall environmental impact. connected through DC and AC buses. These elements, capable of inter-
supplying energy among themselves, to the storage system, or back to
the main grid, enhanced energy balancing and system flexibility. Using
the Multi-Agent System (MAS) optimization approach, components
Table 2 within the microgrid were defined as agents (either sellers or buyers),
Main formulas for calculating energy costs in a microgrid [38,39]. facilitating dynamic energy transactions.
Cost Component Formula This MAS was developed using the Java Agent Development
Cost of purchasing energy from Purchase cost = Quantity of energy purchased ×
Framework (JADE), while MATLAB/Simulink was employed for simu
the grid Unit price of electricity lating the energy distribution in the microgrid; the integration between
Cost of renewable energy Production cost = Fixed costs (maintenance, these platforms was achieved through MACSimJX. This method enabled
production depreciation) + Variable costs (operation) refined energy management optimization, considering diverse load de
Cost of energy storage in Storage cost = Charging costs + Discharging
mands and energy inputs from distributed resources.
batteries costs + Maintenance costs
Total operating cost of the Total cost = Energy purchase cost + Renewable The results underscored that the hybrid microgrid system managed
microgrid production cost + Storage cost + Other costs and controlled energy flows efficiently, substantiating reductions in
(personnel, administration, etc.) operating costs and peak energy consumption. The MAS-based control
Comparison with a reference Savings achieved = Total cost of the reference framework offered an intelligent and adaptable solution for complex
scenario without a microgrid scenario - Total cost of the microgrid
microgrid management, paving the way for future developments in
12
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
sustainable, AI-driven energy systems. electric vehicle integration, Results Eng 23 (2024) 102642, https://doi.org/
10.1016/j.rineng.2024.102642.
[15] A. Raza, L. Jingzhao, M. Adnan, I. Ahmad, Optimal load forecasting and scheduling
CRediT authorship contribution statement strategies for smart homes peer-to-peer energy networks: a comprehensive survey
with critical simulation analysis, Results Eng 22 (2024) 102188, https://doi.org/
10.1016/j.rineng.2024.102188.
Doha El Hafiane: Writing – review & editing, Writing – original
[16] D.B. Aeggegn, G.N. Nyakoe, C. Wekesa, Optimal sizing of grid connected multi-
draft, Visualization, Validation, Supervision, Software, Resources, microgrid system using grey wolf optimization, Results Eng 23 (2024) 102421,
Project administration, Methodology, Investigation, Formal analysis, https://doi.org/10.1016/j.rineng.2024.102421.
Data curation. Abdelmounime El Magri: Writing – review & editing, [17] S. Ali, Z. Zheng, M. Aillerie, J.-P. Sawicki, M.-C. Péra, D. Hissel, A review of DC
microgrid energy management systems dedicated to residential applications,
Writing – original draft, Visualization, Validation, Supervision, Soft Energies 14 (2021) 4308, https://doi.org/10.3390/en14144308.
ware, Resources, Project administration, Methodology, Investigation, [18] Md Rasheduzzaman, S.N. Bhaskara, B.H. Chowdhury, Implementation of a
Formal analysis, Data curation, Conceptualization. Houssam Eddine microgrid central controller in a laboratory microgrid network, in: 2012 North Am.
Power Symp. NAPS, IEEE, Champaign, IL, USA, 2012, pp. 1–6, https://doi.org/
Chakir: Formal analysis, Data curation, Conceptualization. Rachid 10.1109/NAPS.2012.6336332.
Lajouad: Supervision, Software, Resources. Soukaina Boudoudouh: [19] Intelligent energy management system of a smart microgrid using multiagent
Writing – review & editing, Visualization, Validation. systems, Arch. Electr. Eng. (2023), https://doi.org/10.24425/aee.2020.131756.
[20] A.M. Abdulmohsen, W.A. Omran, Active/reactive power management in islanded
microgrids via multi-agent systems, Int. J. Electr. Power Energy Syst. 135 (2022)
Declaration of competing interest 107551, https://doi.org/10.1016/j.ijepes.2021.107551.
[21] A.K. Mbodji, M.L. Ndiaye, M. Ndiaye, P.A. Ndiaye, Operation optimal dynamics of
a hybrid electrical system: multi-agent approach, Procedia Comput. Sci. 36 (2014)
The authors declare that they have no known competing financial 454–461, https://doi.org/10.1016/j.procs.2014.09.020.
interests or personal relationships that could have appeared to influence [22] F. Alam, Y. Jin, The utilisation of small wind turbines in built-up areas: prospects
the work reported in this paper. and challenges, Wind 3 (2023) 418–439, https://doi.org/10.3390/wind3040024.
[23] A.E. Magri, F. Giri, A.E. Fadili, L. Dugard, Adaptive nonlinear control of wind
energy conversion system with PMS generator, IFAC Proc 46 (2013) 318–325,
Data availability https://doi.org/10.3182/20130703-3-FR-4038.00113.
[24] P.P. Mishra, A. Latif, M. Emmanuel, Y. Shi, K. McKenna, K. Smith, A. Nagarajan,
Analysis of degradation in residential battery energy storage systems for rate-based
Data will be made available on request. use-cases, Appl. Energy 264 (2020) 114632, https://doi.org/10.1016/j.
apenergy.2020.114632.
References [25] K. El Mezdi, A. El Magri, I. El Myasse, A. Watil, L. Bahatti, N. Elaadouli, H. Ouabi,
Performance improvement through nonlinear control design and power
management of a grid-connected wind-battery hybrid energy storage system,
[1] G.S. Thirunavukkarasu, M. Seyedmahmoudian, E. Jamei, B. Horan, S. Mekhilef,
Results Eng 20 (2023) 101491, https://doi.org/10.1016/j.rineng.2023.101491.
A. Stojcevski, Role of optimization techniques in microgrid energy management
[26] J.M. Álvarez, D. Alfonso-Corcuera, E. Roibás-Millán, J. Cubas, J. Cubero-Estalrrich,
systems—a review, Energy Strategy Rev. 43 (2022) 100899, https://doi.org/
A. Gonzalez-Estrada, R. Jado-Puente, M. Sanabria-Pinzón, S. Pindado, Analytical
10.1016/j.esr.2022.100899.
modeling of current-voltage photovoltaic performance: an easy approach to solar
[2] S. Mansouri, F. Zishan, O.D. Montoya, M. Azimizadeh, D.A. Giral-Ramírez, Using
panel behavior, Appl. Sci. 11 (2021) 4250, https://doi.org/10.3390/
an intelligent method for microgrid generation and operation planning while
app11094250.
considering load uncertainty, Results Eng 17 (2023) 100978, https://doi.org/
[27] Y.E. Khlifi, A.E. Magri, R. Lajouad, O. Bouattane, F. Giri, Output-feedback control
10.1016/j.rineng.2023.100978.
of a grid-connected photovoltaic system based on a multilevel flying-capacitor
[3] K. El Mezdi, A. El Magri, A. Watil, I. El Myasse, L. Bahatti, R. Lajouad, H. Ouabi,
inverter with power smoothing capability, ISA Trans. 147 (2024) 360–381,
Nonlinear control design and stability analysis of hybrid grid-connected
https://doi.org/10.1016/j.isatra.2024.02.007.
photovoltaic-Battery energy storage system with ANN-MPPT method, J. Energy
[28] G. Traiki, A. El Magri, R. Lajouad, O. Bouattane, Multi-objective control and
Storage 72 (2023) 108747, https://doi.org/10.1016/j.est.2023.108747.
optimization of a stand-alone photovoltaic power conversion system with battery
[4] SkA. Shezan, I. Kamwa, MdF. Ishraque, S.M. Muyeen, K.N. Hasan, R. Saidur, S.
storage energy management, IFAC J. Syst. Control 26 (2023) 100227, https://doi.
M. Rizvi, M. Shafiullah, F.A. Al-Sulaiman, Evaluation of different optimization
org/10.1016/j.ifacsc.2023.100227.
techniques and control strategies of hybrid microgrid: a review, Energies 16 (2023)
[29] A. Mansouri, A. El Magri, E.K. Younes, R. Lajouad, M.S. Adouairi, Comprehensive
1792, https://doi.org/10.3390/en16041792.
review and analysis of photovoltaic energy conversion topologies, Int. J. Appl.
[5] V.N. Coelho, M. Weiss Cohen, I.M. Coelho, N. Liu, F.G. Guimarães, Multi-agent
Power Eng. IJAPE 13 (2024) 499, https://doi.org/10.11591/ijape.v13.i2.pp499-
systems applied for energy systems integration: state-of-the-art applications and
507.
trends in microgrids, Appl. Energy 187 (2017) 820–832, https://doi.org/10.1016/
[30] A. Watil, A. El Magri, R. Lajouad, A. Raihani, F. Giri, Multi-mode control strategy
j.apenergy.2016.10.056.
for a stand-alone wind energy conversion system with battery energy storage,
[6] Q. Sun, X. Wang, Z. Liu, S. Mirsaeidi, J. He, W. Pei, Multi-agent energy
J. Energy Storage 51 (2022) 104481, https://doi.org/10.1016/j.est.2022.104481.
management optimization for integrated energy systems under the energy and
[31] A. Mansouri, A. El Magri, R. Lajouad, F. Giri, A. Watil, Nonlinear control strategies
carbon co-trading market, Appl. Energy 324 (2022) 119646, https://doi.org/
with maximum power point tracking for hybrid renewable energy conversion
10.1016/j.apenergy.2022.119646.
systems, Asian J. Control 26 (2024) 1047–1056, https://doi.org/10.1002/
[7] M.W. Khan, J. Wang, The research on multi-agent system for microgrid control and
asjc.3233.
optimization, Renew. Sustain. Energy Rev. 80 (2017) 1399–1411, https://doi.org/
[32] A. Mansouri, A. Ammar, A. El Magri, N. Elaadouli, E.K. Younes, R. Lajouad, F. Giri,
10.1016/j.rser.2017.05.279.
An adaptive control strategy for integration of wind farm using a VSC-HVDC
[8] T. Logenthiran, D. Srinivasan, A.M. Khambadkone, H.N. Aung, Multiagent system
transmission system, Results Eng 23 (2024) 102359, https://doi.org/10.1016/j.
for real-time operation of a microgrid in real-time digital simulator, IEEE Trans.
rineng.2024.102359.
Smart Grid 3 (2012) 925–933, https://doi.org/10.1109/TSG.2012.2189028.
[33] K. El Mezdi, A. El Magri, A. Watil, I. El Myasse, L. Bahatti, R. Lajouad, H. Ouabi,
[9] R.G. Allwyn, A. Al-Hinai, V. Margaret, A comprehensive review on energy
Nonlinear control design and stability analysis of hybrid grid-connected
management strategy of microgrids, Energy Rep. 9 (2023) 5565–5591, https://doi.
photovoltaic-Battery energy storage system with ANN-MPPT method, J. Energy
org/10.1016/j.egyr.2023.04.360.
Storage 72 (2023) 108747, https://doi.org/10.1016/j.est.2023.108747.
[10] Y. Zahraoui, I. Alhamrouni, S. Mekhilef, M.R. Basir Khan, M. Seyedmahmoudian,
[34] N. Elaadouli, R. Lajouad, A. El Magri, A. Watil, A. Mansouri, I. El Myasse, An
A. Stojcevski, B. Horan, Energy management system in microgrids: a
improved control for a stand-alone WEC system involving a Vienna rectifier with
comprehensive review, Sustainability 13 (2021) 10492, https://doi.org/10.3390/
battery energy storage management, J. Energy Storage 76 (2024) 109716, https://
su131910492.
doi.org/10.1016/j.est.2023.109716.
[11] M.S. Rahman, A.M.T. Oo, Distributed multi-agent based coordinated power
[35] A. Lawrence, P. Thollander, M. Andrei, M. Karlsson, Specific energy consumption/
management and control strategy for microgrids with distributed energy resources,
use (SEC) in energy management for improving energy efficiency in industry:
Energy Convers. Manag. 139 (2017) 20–32, https://doi.org/10.1016/j.
meaning, usage and differences, Energies 12 (2019) 247, https://doi.org/10.3390/
enconman.2017.02.021.
en12020247.
[12] X. Wu, Z. Wang, T. Ding, Z. Li, Hybrid AC/DC microgrid planning with optimal
[36] J. Ligade, A. Razban, Investigation of energy efficient retrofit HVAC systems for a
placement of DC feeders, Energies 12 (2019) 1751, https://doi.org/10.3390/
university: case study, Sustainability 11 (2019) 5593, https://doi.org/10.3390/
en12091751.
su11205593.
[13] D. El Hafiane, A. El Magri, H.E. Chakir, R. Lajouad, S. Boudoudouh, Operational
[37] U.E. Moltu, G. Aavik, in: S.P.E. Days (Ed.), Developing Key Performance Indicators
consumption planning in a hybrid LV microgrid: comparison between TFWO and
(KPIs) for Energy Consumption and Air Emissions versus Material Recovery and
MAS optimization, in: H. El Fadil, W. Zhang (Eds.), Autom. Control Emerg.
Removal Methods Applied for the Frigg & Mcp01 Cessation Project in the North
Technol., Springer Nature Singapore, Singapore, 2024, pp. 246–258, https://doi.
Sea, SPE-126825-MS, Rio de Janeiro, Brazil, 2010, https://doi.org/10.2118/
org/10.1007/978-981-97-0126-1_22.
126825-MS.
[14] K. El Mezdi, A. El Magri, L. Bahatti, Advanced control and energy management
algorithm for a multi-source microgrid incorporating renewable energy and
13
D. El Hafiane et al. Results in Engineering 24 (2024) 103035
[38] S.A. Arefifar, M. Ordonez, Y. Mohamed, Energy management in multi-microgrid Energy Storage Energy Mark, Elsevier, 2021, pp. 173–190, https://doi.org/
systems — development and assessment, IEEE Trans. Power Syst. (2016), https:// 10.1016/B978-0-12-820095-7.00018-2.
doi.org/10.1109/TPWRS.2016.2568858, 1–1. [40] M. Caliano, F. Delfino, M. Di Somma, G. Ferro, G. Graditi, L. Parodi, M. Robba,
[39] A. Mansour-Saatloo, M. Agabalaye-Rahvar, M.A. Mirzaei, B. Mohammadi-Ivatloo, M. Rossi, An Energy Management System for microgrids including costs, exergy,
K. Zare, Economic analysis of energy storage systems in multicarrier microgrids, in: and stress indexes, Sustain. Energy Grids Netw. 32 (2022) 100915, https://doi.org/
10.1016/j.segan.2022.100915.
14