Download as pdf or txt
Download as pdf or txt
You are on page 1of 16

i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

Available online at www.sciencedirect.com

ScienceDirect

journal homepage: www.elsevier.com/locate/he

Hierarchical model predictive control for islanded


and grid-connected microgrids with wind
generation and hydrogen energy storage systems*

Muhammad Bakr Abdelghany a,b,*, Valerio Mariani c, Davide Liuzza d,e,


Luigi Glielmo f
a
Department of Electrical and Computer Engineering, Khalifa University of Science and Technology, Sas Al-Nakhl
Campus, Abu Dhabi, United Arab Emirates
b
Computer and Systems Engineering Department, Faculty of Engineering, Minia University, Minia, Egypt
c
Department of Energy Technologies and Renewable Energy Sources, ENEA, 80055 Portici, NA, Italy
d
Group for Research on Automatic Control Engineering, Department of Engineering, University of Sannio, Benevento,
Italy
e
ENEA Fusion and Nuclear Safety Department, Via Enrico Fermi 45, 00044 Frascati Rome, Italy
f
Department of Electrical Engineering and Information Technologies, DIETI, University of Naples Federico II, Napoli,
Italy

highlights

 Design of control algorithms for islanded and grid-connected microgrids.


 Development of hierarchical MPCs to target long-term and short-term operations.
 Tracking the load demand and maximizing the revenue via electricity markets.
 Minimization of the HESS operational costs.

article info abstract

Article history: This paper presents a novel energy management strategy (EMS) to control a wind-hydrogen
Received 25 January 2023 microgrid which includes a wind turbine paired with a hydrogen-based energy storage
Received in revised form system (HESS), i.e., hydrogen production, storage and re-electrification facilities, and a local
11 May 2023 load. This complies with the mini-grid use case as per the IEA-HIA Task 24 Final Report,
Accepted 5 August 2023 where three different use cases and configurations of wind farms paired with HESS are
Available online 02 September 2023 proposed in order to promote the integration of wind energy into the grid. Hydrogen
production surpluses by wind generation are stored and used to provide a demand-side
Keywords: management solution for energy supply to the local and contractual loads, both in the
Energy markets grid-islanded and connected modes, with corresponding different control objectives. The
Multi-level model predictive control EMS is based on a hierarchical model predictive control (MPC) in which long-term and
Hydrogen energy storage system short-term operations are addressed. The long-term operations are managed by a high-
Energy conversion level MPC, in which power production by wind generation and load demand forecasts
Energy management system are considered in combination with day-ahead market participation. Accordingly, the
hydrogen production and re-electrification are scheduled so as to jointly track the load

*
This work is supported by the grant from the European Union's Horizon 2020 under the project HAEOLUS (grant no. 779469).
* Corresponding author. Department of Electrical and Computer Engineering, Khalifa University of Science and Technology, Sas Al-
Nakhl Campus, Abu Dhabi, United Arab Emirates.
E-mail addresses: muhammad.bakr@mu.edu.eg (M.B. Abdelghany), valerio.mariani@enea.it (V. Mariani), dliuzza@unisannio.it
(D. Liuzza), luigi.glielmo@unina.it (L. Glielmo).
https://doi.org/10.1016/j.ijhydene.2023.08.056
0360-3199/© 2023 The Authors. Published by Elsevier Ltd on behalf of Hydrogen Energy Publications LLC. This is an open access article under the CC BY license
(http://creativecommons.org/licenses/by/4.0/).
596 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

demand, maximize the revenue through electricity market participation and minimize the
HESS operating costs. Instead, the management of the short-term operations is entrusted
to a low-level MPC, which compensates for any deviations of the actual conditions from
the forecasts and refines the power production so as to address the real-time market
participation and the short time-scale equipment dynamics and constraints. Both levels
also take into account operation requirements and devices’ operating ranges through
appropriate constraints. The mathematical modeling relies on the mixed-logic dynamic
(MLD) framework so that the various logic states and corresponding continuous dynamics
of the HESS are considered. This results in a mixed-integer linear program which is solved
numerically. The effectiveness of the controller is analyzed by simulations which are
carried out using wind forecasts and spot prices of a wind farm in center-south of Italy.
© 2023 The Authors. Published by Elsevier Ltd on behalf of Hydrogen Energy Publications
LLC. This is an open access article under the CC BY license (http://creativecommons.org/
licenses/by/4.0/).

viable technical solutions in real applications. In practice, an


1. Introduction EMS should pursue also the following aspects:

In the new energy paradigm based on renewable generation,  to preserve the electrolyzer and the fuel cell from prema-
microgrids are a solution for improving the resilience of power ture lifespans degradations;
systems. Renewable energy sources (RESs), particularly wind  to reduce equipment's running costs;
power, have been experiencing an increase in utilization for a  to generate and maximize revenues through energy mar-
few decades to reduce the adverse effect caused by greenhouse ket participation.
gas emissions from conventional fossil fuel-based generation
units [1]. However, this new paradigm is characterized by In the literature, it is possible to find many solutions which
some technological barriers, such as the sporadic nature of provide an EMS. For instance, heuristic approaches [10], sto-
RESs. Consequently, this has an impact on the power quality chastic control techniques [11, 12], artificial neural network and
and the economic competitiveness of energy supply systems fuzzy logic schemes [13], and adaptive optimization algorithms
equipped with both renewable and conventional sources. [14] are worth to be mentioned. Among the techniques pro-
Due to their sporadic nature, the integration of RESs in the posed for the management of microgrids, model predictive
main grid requires the support of energy storage systems control (MPC) is widely adopted because it provides an in-built
(ESSs) technologies [2]. Among the ESSs, batteries are feasible opportunity to simultaneously integrate energy price estima-
only for short-term storage due to their self-discharge and low tions, generation and load predictions. Moreover, MPC also al-
energy density [3]. Hydrogen energy storage systems (HESSs), lows to handle constraints, delays, and disturbances and to
instead, appear today to be one of the most promising options minimize some desired costs. The reader can refer to Refs.
among the long-term ESSs [4]. The coupling of HESSs with [15e18], where MPC-implemented solutions have been
RESs, besides promoting their integration into the main grid designed for the optimal management of RESs and demand
[2], opens up new opportunities also for their participation to response.
the electricity market and suitable profit margins for the in- As a relevant example among others in the literature, the
vestors [5e7]. Consequently, a microgrid can operate in two lifespans of the HESS devices, i.e., the electrolyzer and the fuel
modes: the islanded mode and the grid-connect mode. In the cell, have been maximized in Ref. [19], where the authors have
first mode, the main purpose is to maintain the power balance designed and experimentally tested an MPC policy to control a
for the local loads without grid support. The grid-connected RES hydrogen-based microgrid. The long- and short-term
mode is characterized by the additional participation to the operations of the microgrid have been addressed by means
electricity markets to generate profits whenever possible. of a multi-objective function that includes energy demand,
The combination of RESs with the HESS and the partici- operating costs, system performances, and device degrada-
pation to the electricity markets require the deployment of tions. The MPC policy has been validated under energy excess
proper and advanced energy management systems (EMSs) for and deficit and it has been shown that both the optimal energy
their optimal operation. Although the stable hydrogen pro- dispatch and the power balance, according to the fixed pri-
duction for renewable power balancing has been validated in orities and the device accumulated degradation, are guaran-
many studies [8,9], the design of EMSs for HESSs where the teed. Also, suitable models are able to compute the equipment
electrical energy demand of the user and the maximization of degradation at each time-step considering the system's past
the economical benefits of the plant are jointly addressed is history. Then, the subsequent efficiency reduction and the
still open. With this in mind, the development of an EMS new nominal power output are evaluated. Although the
which takes into account all the relevant physical and work- degradation issues have been addressed in such a study, the
ing limitations of HESSs, the degradations, and the opera- design of a control algorithm that enables to reliably supply
tional and maintenance costs is of paramount importance the local load in a hydrogen-based microgrid across the two
because, being relevant for the economic aspect, if neglected it possible operating modes (islanded and connected) for
could prevent the implementation of good and economically
i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0 597

enhancing power quality has not been considered. In Refs. that the controller significantly minimizes the microgrid
[20e22], it has been investigated how the electrolyzer and the running costs. The authors in Ref. [34] have developed a novel
fuel cell are affected by load fluctuation, ON/OFF cycles, and MPC-based optimal scheduling framework which in-
switching states. In Refs. [16,23,24], an MPC strategy that takes corporates a scheduling correction algorithm into the basic
into account cost optimization and equipment damage, MPC structure in order to achieve a superior trade-off between
among others, has been employed. The approach limits the the scheduling accuracy and the computational efficiency,
intensive use of the electrolyzer and the fuel cell by con- making it a promising solution for real-time scheduling of the
straining the devices to be operated within minimum and HESS with high accuracy and robustness. However, the
maximum value power ranges. The above-cited studies do not equipment capital costs and the loss of efficiency due to
consider “standby” consumptions of the hydrogen devices, switchings among different operating modes (e.g., ON/OFF)
thus neglecting the important aspects related to the lifespans are not included in the controllers. The aforementioned
of the expensive equipment. optimal control strategies demonstrate the real-time energy
In regards to the tracking of the local load demand, in management and control capabilities of RESs with MPC
Ref. [25], an MPC strategy including the short-term and long- schemes, where the controllers react to external disturbances
term optimal plannings of a hydrogen microgrid has been within a few seconds or minutes. However, because of such
proposed. The work has shown that the MPC strategy satisfies short horizons, they are unsuitable for achieving any eco-
the electrical load demand while minimizing the microgrid nomic advantage which may derive by possible optimal op-
running costs. In Ref. [26], an MPC has been designed to ensure erations of the ESS across larger time ranges, e.g., the
the continuity of hydrogen production and the power balance maximization of the profits through the participation to the
between electrolyzer power consumption and renewable long contracted energy markets. Certainly, long-term sched-
generation in an offshore plant. A decentralized hierarchical uling can be computationally expensive, and therefore un-
MPC has been proposed in Ref. [27] to deal with the issues suitable for real-time where a fast response is required. This is
related to unequal power-sharing and power quality of an why, in order to address both short-term and long-term fea-
islanded alternating current microgrid. A robust MPC strategy tures of the hydrogen-based wind farm under investigation, a
has been presented in Ref. [28] for the optimization of an multi-level MPC architecture is used in this paper.
islanded microgrid by taking into account the uncertainties in Heuristics and meta-heuristics techniques are also pro-
RESs and electric loads. In all the mentioned papers regarding posed in the literature. In particular, the genetic algorithm, the
the local load demand satisfaction, neither the degradations particle swarm optimization (PSO), the duelist algorithm, the
are considered, nor the standby consumptions are taken into simulated annealing, the ant colony optimization, and the
account. This is one of the key aspects of this research study. Manta-ray foraging optimizer are examples of meta-heuristic
Regarding revenue maximization via the energy market algorithms [35,36]. Furthermore, the authors in Ref. [37] have
participation, in Ref. [20], an MPC strategy that optimally integrated a sophisticated EMS paired with hybrid-ESSs that
schedules the network of interconnected hydrogen-driven employs a multi-objective artificial hummingbird optimizer to
microgrids with hybrid ESSs under failure conditions has reduce running costs by minimizing three objective functions.
been proposed. An adaptive MPC algorithm for the optimal Moreover, optimal energy management of distributed gener-
economic schedule and management of RES microgrids has ation in microgrids to control the voltage and frequency based
been provided in Ref. [29]. The authors in Ref. [30] have inte- on multi-objective PSO has been developed in Ref. [38] in order
grated a hierarchical MPC strategy for multi-microgrid coor- to achieve optimal and stable power distribution. A hybrid off-
dination with demand-side management in order to manage grid photovoltaic (PV)-wind system using PSO, hybrid firefly,
the RESs of each microgrid based on the reference signals sent harmony search algorithm, cultural algorithm, harmony
by the main-grid level. An MPC strategy for the following day search, and simulated annealing has been proposed in
energy market participation of hydrogen-based microgrids Ref. [39] to maximize profits. The authors in Ref. [40] have
considering economic and environmental aspects has been studied an economic management strategy for a HESS based
presented in Ref. [31]. A hierarchical MPC controller for a grid- on the marine predator algorithm to reduce operating costs
tied renewable-powered microgrid has been presented in and meet the requested loads. Moreover, a reinforcement
Ref. [32]. In particular, the first stage of the controller de- learning approach based on distributed hydrogen refueling
termines the optimal economic schedule of a microgrid, while stations for fuel supply and reserve demand service with
the second one manages the power sold revenues through evolutionary transfer multi-agent has been provided in
electricity market participation, where also the optimal use of Ref. [41] to enhance the practicability and the flexibility of the
RESs and ESSs are considered. In all the aforementioned scheduling. Contrary to the aforementioned mentioned pa-
studies, the authors have presented their results with regards pers, this study uses numerical commercial solvers for the
to the energy market participation, however neglecting the mixed-integer programming optimal problems, where heu-
minimum ON/OFF times constraints which affect the device ristic approaches are not adopted.
lifespans and short time scale dynamics. The production and the utilization of renewable energy
With respect to the equipment operation and maintenance have many economic advantages, which are investigated in
costs, the authors in Refs. [23,33] have implemented a control the literature. In this regard, in Ref. [42], optimal energy
strategy to meet user-requested electric reference by taking management of cooperative energy communities considering
into account the HESS acquisition costs, the electricity export/ flexible demand, storage, and vehicle-to-grid under un-
import to/from the grid costs, the devices life degradation, and certainties has developed based on a two-stage optimization
the operation and maintenance costs. The results have shown framework. As further examples of techno-economic
598 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

analysis, in Ref. [43], MPC solutions for the optimal economic to the main grid which gives the opportunity to maximize the
dispatch of RESs and demand response have been proposed in economic benefits. To summarize, the contributions of this
a grid-connected wind-solar microgrid incorporating hybrid- research study are:
ESSs. Moreover, a techno-economic analysis of hydrogen,
battery, and hybrid systems considering degradation and 1. the design of a control algorithm that enables to reliably
seasonal storage has been proposed in Ref. [44]. In Ref. [45], a supply the local load in a hydrogen-based microgrid across
techno-economic assessment and evaluation of a hydrogen the two possible operating modes (islanded and
refueling station powered by an on-grid solar microgrid in connected);
Morocco have been provided in order to predicate the 2. the participation to the electricity market in case of con-
requested demand for hydrogen. Similarly, in Ref. [46], a nected operations, with the aim of supporting the local
detailed techno-economic analysis of different shades of load in situations of scarce wind production and hydrogen
renewable and non-renewable energy-based hydrogen for energy availability, or, in the opposite case, of generating
fuel cell electric vehicles has been provided to minimize the profits;
cost of hydrogen for different color codes of hydrogen. In order 3. the addressing of additional criteria specifically targeting
to ensure the feasibility analysis of hydrogen application as the operations of the HESS with the aim of reducing the
ESS in microgrids, the authors in Ref. [47] have developed an corresponding economic costs.
optimal control of microgrids paired with HESSs. Another
techno-economic analysis has been carried out in Ref. [48] for The dynamic model and the control technique developed
a novel solar-driven HESS-based multi-generation system in this research study are related to the HAEOLUS project [53].
coupled parabolic trough PV thermal collector and thermal Indeed, the proposed controller will be used for a real
ESS to evaluate the feasibility of the system. The literature renewable-powered wind farm in North Norway. Numerical
revised above either ignores the high equipment costs or, if it simulations presented in this study prove its effectiveness
does, the ESSs degradation models are oversimplified. This is using the project data, and for those not yet available,
one of the main points of the study, which proposes an HESSs' literature-based data are used.
model by taking into account both their equipment working
modes/switches and their operational constraints. 1.2. Outline
In conclusion, according to the authors’ knowledge, the
short- and long-term optimal energy management of a HESS The research study is further organized as follows. Pre-
that simultaneously takes into account devices degradation, liminaries and notation are given in Section 2. In Sections 3
start-up/shutdown and standby cycles, operational con- and 4, the hydrogen microgrid and its operations are
straints, and operational and maintenance costs have not yet explained in detail, respectively. The system modeling is
been addressed by the literature. presented in Section 5, and the costs included in the control-
lers are given in Section 6. The high- and low-level MPC con-
1.1. Key contributions trollers are presented and discussed in Section 7. In Section 8,
simulation analysis and validation are shown, and the closing
There are significant differences between the covered litera- remarks are given in Section 9.
ture and our approach. For instance, in Refs. [20,21], the
degradation issues of the hydrogen devices in microgrids
with HESSs have been considered, however, the devices' 2. Preliminaries and notation
standby consumptions have not been considered. Similarly,
in Refs. [49e51], the wind farm output power is smoothed, In this section, we introduce notations and standard as-
however, neglecting the degradation issues concerning to the sumptions that will be used throughout the paper. The models
coupled ESS with RESs. In our case, we simultaneously used by the MPC controllers are built upon automata with
consider the optimal operation planning of a microgrid with a similar states OFF, STB, and ON; A ¼ fOFF; STB; ONg, a and b
wind farm, a HESS, and a local load. The wind-hydrogen are two generic indices that take value in A; and when a and b
microgrid is modeled using MLD to consider device switch- are used in conjunction, it is assumed that a s b; da, sba , za,
ing dynamics and degradation costs. Consequently, the and za, 2 {0, 1} are Boolean variables, and ya is mixed-logic,
controller exploits the wind-hydrogen plant's real capabilities i.e., given by the product between a Boolean variable and a
[52]. real one; in some circumstances, the subscripts e and f will be
The proposed controller suits both the islanded and grid- used to refer to the electrolyzer and the fuel cell, respectively,
connected modes by taking into account different related as- in case of ambiguities. That is, the equations are developed
pects. In the islanded mode, the main purpose is to maintain against a generic device and the subscripts e or f should be
the power balance for the local loads without grid support. In implicitly added to the formulation (but, for the sake of
the grid-connected mode, the additional participation to the brevity, not reported). However, some equations require both
electricity markets is managed always with the main target of variables related to the electrolyzer and to the fuel cell and in
supplying the local load. However, in this case, the extra de- this case, the indexing is necessary and will be therefore used.
gree of freedom given by the access to the electricity market Also, we develop a two-level architecture that addresses two
can be leveraged to generate profits whenever possible. The different time-scales. When equations have to be used at a
EMS in the grid-connected mode adjusts the power balance high-level they should be time-indexed against a different
between supply and demand by purchasing or selling power time-step that is, instead, used at a low-level. However, many
i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0 599

equations refer both to the high- and low-levels, thus the MG.1 in the islanded mode, to track the requested load
generic time-step k is used. In other cases, where it is instead with the wind generation and the hydrogen stored in the tank,
necessary to discriminate, h will be used as a time-step for the and to minimize the operating costs of the electrolyzer and
high-level and [ for the low-level, such as th and H indicate the the fuel cell;
sampling time and the horizon at the high-level while ts and M MG.2 in the connected mode, to track the requested load
at low-level. Finally, bold is used to indicate vectors, and the with the wind power, the stored hydrogen in the tank, and the
symbol u indicates the transpose. grid support (i.e., by buying energy), to minimize the running
costs of the HESS units, and possibly to generate profits via
energy selling.
3. Microgrid description The control system is established in two levels, i.e., the
high-level control (HLC) and the low-level control (LLC), where
The microgrid under investigation consists of a wind farm, a the first addresses larger time-scales and the second ad-
HESS, a local load, and a control and communication system. dresses shorter ones. The rationale is that at larger time-
In turn, the HESS includes a tank, an electrolyzer, and a fuel scales, long-term forecasts are used in order to compute first
cell. The microgrid can work either islanded or grid- scheduling, which is adjusted at shorter time-scales. The two
connected through a powerlink with limited capacity. A controllers share similar objectives and constraints, however,
conceptual representation of the microgrid is given in Fig. 1. specified at the particular time-scale addressed.
In the figure, the energy flows are denoted by solid green
lines, the solid blue lines represent the hydrogen flows, and
the red dashed lines indicate the data flows. Accordingly, Pw, 5. Dynamic modeling for the multi-level
PON ON
e , and Pf denote the wind power, the input power given to control
the electrolyzer, and the output power from the fuel cell,
respectively, Pg is the power delivered (0)/received (<0) to/ In this section, we develop the MLD modeling for the multi-
from the grid, and Pref is the electric demand requested by level control. Note that the MLD formulation of the devices
the industrial facility which has to be tracked by the system presented in the following equations employs an abuse of
available power Pavl. notation in that it uses the same discrete-time variable k both
at the HLC and the LLC. While it will be clear from the context
how to solve the ambiguity, this helps to achieve a lighter
4. General operations notation. In the following, the MLD formulation is obtained by
following the logical equivalences defined in Ref. [54].
The main goal of the integrated system is to supply the local
load both in the islanded (i.e., without grid support) and con- 5.1. Electrolyzer and fuel cell states
nected (i.e., with grid support) modes. However, when con-
nected, the integrated system can leverage the extra degree of The electrolyzer and the fuel cell targeted by this paper are
freedom in order to also sell power and generate profits. real industrial-grade equipment endowed with high-level
Summarizing, the multi-level control strategy developed functionalities such as, e.g., different operating modes, i.e.,
under the mini-grid use case for the HAEOLUS plant has to off, on, and standby. The operating modes can be considered
carry out two tasks: as additional degree of freedoms that, e.g., an optimizer can

Fig. 1 e HAEOLUS plant under study.


600 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

leverage when deciding how to handle the renewable gener- The automata are linked to the physical functioning of a
ation according to the adopted optimization criterion and may device via
bring to better results as opposite to the case where such
PðkÞ ¼ 0 ⇔ dOFF ðkÞ ¼ 1; (1a)
additional degrees of freedom are not used. Thus, in this
paper, we use MLD modeling [55] to incorporate in the con-
trollers their different logic states and corresponding working PðkÞ ¼ PSTB ⇔ dSTB ðkÞ ¼ 1; (1b)
modes through suitable logic variables and constraints. For h i
instance, in this way switching costs can be minimized, PðkÞ2 Pmin ; Pmax ⇔ dON ðkÞ ¼ 1: (1c)
among others. We also stress that, in order to leverage the
electrolyzer and fuel cell advanced functionalities, their In order to derive the devices' MLD constraints, the definitions
physical, say low-level, models are not required. Rather, the in (1) have to be further developed. Indeed, they can be
map between the implied input/output powers against the reconducted to the generic condition
corresponding operating modes suffices. h i
PðkÞ2 Pa;min ; Pa;max ⇔ da ðkÞ ¼ 1; (2)
In what follows, the MLD modeling is developed. As already
said, our optimization model is developed exploiting a MLD where a is a generic state. For instance, the deinition (1a) is
approach. In this regard, the electrolyzer and the fuel cell have derived in the form (2) via a ¼ OFF and Pa, min ¼ Pa, max ¼ 0.
a high-level description (that is, a logical one) and are repre- Similar considerations apply for the remaining equations in
sented by the automaton of Fig. 2. Such automaton (it has the (1). Thus, the MLD modeling is carried out against (2) and not
same structure both for the electrolyzer and the fuel cell, but (1), because this leads to achieving a higher degree of sym-
differ in the powers, transition conditions, and numerical metry of the resulting equations by simplifying the reading.
values) links the logical states of the HESS devices (electrolyzer Numerical solvers cannot directly handle the logical defini-
and fuel cell), for the corresponding HLC and the LLC. The tion given in (2), thus requiring additional manipulations in
nodes and the edges correspond to the devices’ states and the order to obtain their equivalent mixed-integer inequalities.
corresponding transitions, respectively. The two automata are This is achieved by introducing suitable auxiliary variables
then translated into logical conditions describing the states defined as
and the transitions. The states are then mapped with the
power values and the derived equalities and inequalities will  
½za; ðkÞ ¼ 1/ PðkÞ  Pa;min ∧
be considered as constraints to be respected by the controller.  
½za; ðkÞ ¼ 0/ PðkÞ < Pa;min ;
The choice of using the same automata structure for both the
HESS devices is motivated by the fact that they have similar (3a)
features. This helps also to simplify the following exposition
where the MLD model is developed. Indeed, in order to ½za; ðkÞ ¼ 1/½PðkÞ  Pa;max ∧
improve the readability, the required indexing against the de- ½za; ðkÞ ¼ 0/½PðkÞ > Pa;max ;
vices is dropped, while it is understood that in the controller (3b)
one copy for the electrolyzer and one copy for the fuel cell of which, according to Ref. [54], are equivalent to
the following equations are considered. To the same aim, also
the indexing against the particular control level is dropped. PðkÞ  Pa;min  Ma;min za; ðkÞ; (4a)
Finally, we use a generic time-step k while it has to be
considered that at high- and low-levels the two time-steps are PðkÞ þ Pa;min  Ma;min ð1  za; ðkÞÞ; (4b)
different. In Section 6, the introduced ambiguity is solved by
explicitly mapping the equations to the control layer where and
they are included and the devices they refer to.
PðkÞ þ Pa;max  Ma;max za; ðkÞ; (5a)

PðkÞ  Pa;max  Ma;max ð1  za; ðkÞÞ; (5b)


a, min a, min
respectively, where M  max (P(k)  P ) and
Ma, max  max (P(k)  Pa, max).
The last step consists in linking das with za,s and za,s.
Then, we define the logical statement

½da ðkÞ ¼ 1/½za; ðkÞ ¼ 1∧½da ðkÞ ¼ 1/½za; ðkÞ ¼ 1; (6)

which leads to

da ðkÞ  za; ðkÞ; (7a)

da ðkÞ  za; ðkÞ: (7b)


Fig. 2 e Automata for the HLC and the LLC. The nodes and In addition,
the edges denote the states and the transitions between
X
them, respectively. The time-dependence of the logic da ðkÞ ¼ 1 (8)
variables is omitted for lighten the notation. a
i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0 601

must be included since only one state at a time can be active on the sign of the power Pg(k) exchanged with the grid
for obvious reasons. according to

½dbuy ðkÞ ¼ 1 ⇔ ½Pg ðkÞ  xg ; (13a)


5.1.1. State transitions
Similar to the states, the transitions between them, denoted
½dsell ðkÞ ¼ 1 ⇔ ½Pg ðkÞ < xg ; (13b)
by the edges in Fig. 2, can be modeled by logical variables
defined as *
where xg ¼ 0 holds at the HLC and xg ¼ ðPhg Þ holds at the LLC, with
*
½sba ðkÞ ¼ 14½da ðk  1Þ ¼ 1∧½db ðkÞ ¼ 1; (9) ðPhg Þ being the schedule provided by the HLC and used in real-

with a; b2A. From the definition above, it follows that sba ðkÞ is time by the LLC to remunerate for any deviations of the grid
equal to 1 if at the time instant k a switch from the state a to power. The logical expressions in (13) result, respectively, in
the state b occurs. According to Ref. [54], the definition (9) is  g dbuy ðkÞ;
Pg ðkÞ  xg  M (14a)
equivalent to the following set of linear inequalities
 
sba ðkÞ  da ðk  1Þ; (10a)  g 1  dbuy ðkÞ ;
Pg ðkÞ þ xg  M (14b)

and
sba ðkÞ  db ðkÞ; (10b)
 g dsell ðkÞ;
Pg ðkÞ þ xg  M (15a)
sba ðkÞ  d ðk  1Þ þ d ðkÞ  1:
a b
(10c)
 g ð1  dsell ðkÞÞ:
Pg ðkÞ  xg  M (15b)
The switch from the state ON to the state OFF and vice
versa is not immediate, in the sense that a fixed time interval In order to hide the non-linearity introduce by the product
(of the order of minutes) is required to be executed, thus of two decision variables, the mixed-logic variables ybuy(k) and
implying that the direct transitions from OFF to ON and vice ysell(k) are defined as
versa (dashed edges in Fig. 2) are not allowed. The condition  
related to these unfeasible transitions can be expressed by ybuy ðkÞ ¼ Pg ðkÞ  xg dbuy ðkÞ; (16)
constraining ON ðkÞ
sOFF and sON
OFF ðkÞ equal to 0 for all time-steps k.
and
 
5.2. Mixed-integer products ysell ðkÞ ¼  Pg ðkÞ  xg dsell ðkÞ; (17)

As it will appear in the following, some equations will involve such that
the mixed products between logical and real variables (for
instance, the hydrogen dynamics in the tank, since they Pg ðkÞ ¼ ybuy ðkÞ  ysell ðkÞ: (18)
depend upon the electrolyzer and the fuel cell being in the ON Similarly to (11) and (12), the conditions (16) and (17) can be
state, and the corresponding operating powers, or in the OFF recast, respectively, as
state). This realizes nonlinearities that can be difficult for an
optimizer to handle. Therefore, suitable mixed-integer vari-  g dbuy ðkÞ;
ybuy ðkÞ  m (19a)
ables are defined and corresponding inequalities are derived.
In other words, particular instances (e.g., depending on the  g dbuy ðkÞ;
ybuy ðkÞ  M (19b)
device and/or the control level they refer to) of
   
 g 1  dbuy ;
ybuy ðkÞ  Pg ðkÞ  xg  M (19c)
ya ðkÞ ¼ PðkÞ da ðkÞ (11)

are used with corresponding instances of    


 g 1  dbuy ðkÞ ;
ybuy ðkÞ  Pg ðkÞ  xg þ m (19d)
ya
ya ðkÞ  m da ðkÞ; (12a)
and
ya
y ðkÞ  M d ðkÞ;
a a
(12b)
 g dsell ðkÞ;
ysell ðkÞ  m (20a)
ya
ya ðkÞ  PðkÞ  M ð1  da ðkÞÞ; (12c)
 g dsell ðkÞ;
ysell ðkÞ  M (20b)
ya
ya ðkÞ  PðkÞ þ m ð1  da ðkÞÞ; (12d)  
 g ð1  dsell ðkÞÞ;
ysell ðkÞ  Pg ðkÞ  xg  M (20c)
where M ya
ðm Þ is an upper (lower) bound of y .
ya a

 
5.3. Power exchanged with the utility grid  g ð1  dsell ðkÞÞ:
ysell ðkÞ  Pg ðkÞ  xg þ m (20d)

In the integrated system, the electricity can be both bought 5.4. Additional constraints
from the grid and sold to the grid. Correspondingly, these
circumstances identify two logical variables dbuy(k) and In this section, the constraints deriving from the devices’
dsell(k) such that their activation and deactivation depend operating ranges, practical considerations regarding the system
602 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

operations, and physical facts that need to be considered in with JMG, and ucon is the logic variable modeling the user input
order to achieve meaningful scheduling are presented. regarding the operating mode, as also explained in Section 5.4.1.
In what follows, in order to keep the notation light, we will
5.4.1. Power balance constraints use the letters h for the time-step of quantities pertaining to
At each level, an instance of the power balance the HLC, and (h, [) for the LLC, thus avoiding sub/superscripts1.
That is, e.g., JMG(h) is different from JMG(h, [) because the first is
Pw ðkÞ  yON
e ðkÞ þ yf ðkÞ  Pavl ðkÞ ¼ Pg ðkÞ ucon
ON
(21)
the cost in disconnected mode used at the HLC, while the
must be considered as a constraint to provide physically second is at the LLC.
meaningful commands. In particular, the constrain in (21)
corresponds to two different power balances, i.e., one hold- 6.1. High-level cost functions
ing in islanded operations which is derived by setting ucon ¼ 0
and the other holding in connected operations which is This subsection introduces the system costs concurring in
derived by setting ucon ¼ 1. In this regard, we remark that ucon defining the HLC optimization problem. In particular, the
is not a decision variable, rather it is a user-defined logic following subsections develop the cost functions for the utility
command which defines two different controllers according grid interconnection, devices operating costs, and electric load
to the operating modes. demand satisfaction cost function, respectively. Such cost
functions are later combined in order to integrate the HLC.
5.4.2. Hydrogen amount dynamics
The hydrogen H stored in the tank at each time-step k is 6.1.1. Cost function for intraday market operations
modeled according to the first order dynamical system The grid cost function is given in order to maximize the energy
selling revenue or economical energy buying cost from the
f ðkÞTs
yON main grid. The corresponding cost function is
e ðkÞTs 
Hðk þ 1Þ ¼ HðkÞ þ he yON ; (22)
hf  
Jcon ðhÞ ¼ pbuy ðhÞ ybuy ðhÞ  psell ðhÞ ysell ðhÞ Ts ; (26)
where he and hf are the efficiencies of the HESS devices and Ts is a
buy sell
generic sampling time. It is worth pointing out that the effi- where p (h) and p (h) are the energy purchase and sale
ciencies of HESS devices in (22) are constant values that may be prices at the time-step h, respectively, while ybuy and ysell are
modified if a significant deviation with respect to these values the mixed variables as defined in (19) and (20) to model the
occurs. From (22), it derives that only in the ON state the elec- possibility of sell/buy energy to/from the grid during market
trolyzer produces hydrogen and the fuel cell consumes operations at the time-step h, respectively.
hydrogen.
6.1.2. Cost function for plant operations
5.4.3. Ramp up limits The cost function related to the hydrogen devices is the
In order to limit the slew rate of the hydrogen devices so as to combination of different costs: the components' deteriora-
avoid damage, the constraint tion, the reduction of life spans, and the energy used to
keep the units warm when they are in standby mode. Here,
jyON ðk þ 1Þ  yON ðkÞj  R (23) the number of working hours is used to represent the
lifespan. In order to save devices' lifetime (and conse-
has to be introduced, where R denotes the ramp bound of the
quently enhance CAPEX cost saving), not only the working
HESS devices.
hours for the hydrogen devices are minimized, but also the
fluctuations in the operating conditions and the HESS de-
5.4.4. Operating ranges
vices’ startup/shutdown/standby cycles are taken into ac-
The hydrogen in the tank has to keep within the lower and the
count. Therefore, we propose the cost
upper bounds, denoted by Hmin and Hmax, respectively, i.e.,
 rep
C  
Hmin  HðkÞ  Hmax : (24) JðhÞ ¼ þ COM dON ðhÞ þ psc ðhÞ ySTB ðhÞ þ yON ðhÞ th ; (27)
NH

where NH, Crep and COM are a generic device cycle lifespan,
6. System costs stack replacement cost and operating and maintenance costs,
respectively, while psc(h) is the power spot price.
This section presents the cost functions used at the HLC
and the LLC. Despite the fact that they may look similar,
6.1.3. Cost function for local load demand tracking
they are different since the constraints (i.e., models)
One control objective is to deliver uninterrupted power supply
against which they are minimized are different. From the
to the local load, via the forecast reference demand Pref, with
perspective of the microgrid operating modes, i.e., the
the power Pavl available in the system. Then, the cost function
islanded or connected ones, at each level, we refer to the  2
Jt ðhÞ ¼ Pavl ðhÞ  Pref ðhÞ (28)
generic cost arrangement
has to be introduced.
JðkÞ ¼ JMG ðkÞ þ rcon Jcon ðkÞ ucon ; (25)

where JMG are the costs relevant both to the connected and
islanded modes, Jcon are the additional costs relevant only to the 1
In practice, at the LLC the running index is [ while h is fixed
connected mode, rcon is a weight to appropriately combining Jcon and is determined by the h-th optimization iteration at the HLC.
i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0 603

6.2. Low-level cost functions renewable generations and load demand and computes the
optimal scheduling of the devices and evolution of the
The next subsections illustrate the individual cost functions hydrogen level for the next few hours with the purpose of
contributing to the LLC formulation. Analogously to the HLC, the minimizing the HESS operating cost. Then, the LLC uses such
cost functions derived here are combined to define the LLC. references to compensate for any deviations of the real-time
renewable generations and electricity demand from the
6.2.1. Cost function for real-time market operations forecasted ones in short terms. When it is possible, the LLC
The LLC grid cost function is given analogously to the HLC as follows the references computed by the HLC but it can also
  manage the system independently. According to the MPC
Jcon ðh; [Þ ¼ pbuy ðh; [Þ ybuy ðh; [Þ  psell ðh; [Þ ysell ðh; [Þ ts ; (29) methodology, at each time instant, a constrained optimiza-
where pbuy(h, [) and psell(h, [) are the real-time market profiles at tion problem is solved across a prediction horizon of fixed
the hour h and the minute [, and ts is the sampling time at the size. The output is the sequence of the optimal decision var-
LLC. iables across the horizon; however, only the first sample is
applied, while the others are discarded. Then, updated data of
6.2.2. Cost function for plant operations devices are achieved, the time-step is increased, and a new
Analogously to the HLC, also for the low-level case, the cost iteration starts. In a multi-level architecture, at each time-
function aims at saving the device's lifetime by penalizing the step, two constrained optimization problems are solved.
working hours. Besides this, however, operations at the LLC Two different sample times (and two different time-steps)
require that the HESS devices track the scheduled hydrogen and characterize such problems. For the specific application pre-
power levels provided by the HLC. Therefore, the cost function is sented in this paper, th ¼ 1 h and ts ¼ 10 min. Also, the pre-
diction horizons used by the HLC and the LLC are different

Crep and, therefore, are correspondingly indicated by H and M.
Jðh; [Þ ¼ þ COM dON ðh; [Þ
NH While the HLC and the LLC are unavoidable in real applica-
  (30)
þpsc ðh; [Þ ySTB ðh; [Þ þ yON ðh; [Þ ts tions, in this study we consider them separately, which are
2 2 described in the following subsections.
þuP ðyðh; [Þ  yðhÞÞ þ uH ðHðh; [Þ  HðhÞÞ ;
2
where uH and uP are weight coefficients, uH ðHðh; [Þ  HðhÞÞ 7.1. High-level MPC design
models the difference between the real-time hydrogen quan-
tity, denoted by H (h, [), in the tank at the time [ and the level The MPC strategy at the HLC handles the electricity trans-
Hh(h) defined by the HLC for the referred time, and, similarly, actions for the following day and meets the local load refer-
2
uP ðyðh; [Þ  yðhÞÞ models the difference between the real-time ence demand. The control goals of the proposed HLC vary with
available power y (h, [) at the time [ and the level y(h) given respect to the microgrid operating mode. Moreover, the con-
by the HLC. The other terms in (30) have a similar meaning of trol architecture distinguishes between the islanded and
those in (27), however, referring to the LLC (where this applies). connected modes, where in the second case, being the HLC, an
additional cost is used in order to consider market operations
6.2.3. Cost function for local load demand tracking both for buying and selling energy. The decision variables for
The load tracking for real-time operations is accomplished by the HLC are collected in the set
minimizing the cost function
H1
2
HðhÞ ¼ ∪ pðh þ jÞ; pavl ðh þ jÞ; ya ðh þ jÞ; da ðh þ jÞ; za ðh þ jÞ
Jt ðh; [Þ ¼ ðPavl ðh; [Þ  Pavl ðhÞÞ ; (31) j¼0
H1
∪ pcon ðh þ jÞ ucon ;
where Pavl(h, [) is the available system power calculated by the j¼0

LLC, while Pavl(h) is the scheduled load demand that should be (32)
tracked by the controller at the low-level.
where H is the size of the horizon at the HLC and pcon ¼
u
ð Pcon ðhÞ; …; Pcon ðh þ H  1Þ Þ . Thus, at the high-level the MPC
7. MPC design can be defined as
P
H1
min JMG ðh þ jÞ þ rcon Jcon ðh þ jÞ ucon
HðhÞ
The control architecture proposed in this research study is j¼0

characterized by a switching function, which selects the s:t: An instance of ð4Þ  ð12Þ
control strategies corresponding to the two modes (islanded for the electrolyzer ða2fOFF; STB; ONgÞ;
and grid-connected). In the islanded mode, the primary goal is An instance of ð4Þ  ð12Þ
to maintain the balance between generation and demand for the fuel cell ða2fOFF; STB; ONgÞ;
(33)
Utility grid constraints ð14Þ  ð20Þ
without the grid support, while, in the grid-connected mode,
Power balance constraints ð21Þ;
the additional participation to the electricity market is used
HESS dynamics ð22Þ;
with the main target of supplying the load and, whenever
Ramp up constraints ð23Þ;
possible, generating profits.
Operating ranges constraint ð24Þ;
The architecture implements a two-level cascade
Domain constraints for the logical variables;
controller based on the MPC framework, as shown in Fig. 3.
The HLC compares for the following day the forecasts of the where HðhÞ is given by (32),
604 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

Fig. 3 e Block diagram of the two-level cascaded MPC.

being the HLC or the LLC, an additional cost is used in order


JMG ðh þ jÞ ¼ re Je ðh þ jÞ þ rf Jf ðh þ jÞ þ rt Jt ðh þ jÞ; (34) to consider market operations both for buying and selling
energy. Indeed, buying energy is meant to take advantage of
re, rf, rt, and rcon are suitable weights tuned with a number of the grid support in case of a possible load demand that
numerical simulations and their values allow to have a good cannot be matched with the wind generation and the
threshold between power consumption, goal satisfaction, and hydrogen available in the tank, while selling energy enables
equipment degradation. Further tuning will be executed on an additional degree of freedom for generating revenues
the physical plant once the construction and commitment are whenever possible. The decision variables for the LLC are
terminated. Jcon(h) is defined in (26), ucon ¼ 0 if the user wants collected in the set
to address MG.1 and ucon ¼ 1 if the user wants to address
MG.2. S
M1
Mð[Þ ¼ pð[ þ nÞ; pavl ð[ þ nÞ; ya ð[ þ nÞ; da ð[ þ nÞ; za ð[ þ nÞ
n¼0
;
S
M1
7.2. Low-level MPC design pcon ð[ þ nÞ ucon
n¼0

(35)
Similarly to the HLC, it is useful to define the difference be-
tween the islanded and connected modes in the LLC. In where all vectors (in bold) have the analogous definitions
particular, in the islanded scenario, the goal of the LLC is to of the corresponding terms in (32), and M is the size of
track the real-time local demand without grid support while the horizon at the LLC. Then, the low-level MPC is recast
satisfying HESS operations. In the grid-connected mode, as
i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0 605

P
M1
Table 1 e Parameters and weighting factors set in the
min JMG ðh; [ þ nÞ þ ucon Jcon ðh; [ þ nÞ ucon
Mð[Þ n¼0 (36) MPC strategy according to the HAEOLUS project.
s:t: Similar to ð33Þ;
Electrolyzer Parameters
where Mð[Þ is given in (35), Variable Parameter Value

JMG ðh; [ þ nÞ ¼ ue Je ðh; [ þ nÞ þ uf Jf ðh; [ þ nÞ þ ut Jt ðh; [ þ nÞ; (37) Pmin


e Minimum power 0.3 MW
Pmax
e Maximum power 2.5 MW
ue, uf, ut, and ucon are suitable weights, Jcon(h, [) is defined in PSTB
e Standby consumption 1 kW
(29), ucon ¼ 0 if the user wants to address MG.1 and ucon ¼ 1 if he Efficiency 0.019 kg/kWh
the user wants to address MG.2. de Efficiency degradation 2%/year
NHe Cycles lifespan 8000 h
NYe Operation hours 40 000 h
PEM Fuel cell Parameters
8. Numerical analysis Pmin Minimum power 12 kW
f
Pmax
f Maximum power 120 kW
In this section, we validate the two-level MPC strategy based PSTB
f Standby consumption 1 kW
on the HAEOLUS plant data via a series of numerical simula- hf Efficiency 17 kWh/kg
tions. In order to show the effectiveness of the controller, df Efficiency degradation 2%/year
different power production and consumption profiles are NHf Cycles lifespan 8000 h
NYf Operation hours 40 000 h
taken into account. The results validation are preliminary to
the deployment of the control strategy on the plant site, which
is currently under construction in parallel to this research 8.2. Case studies
study. As it will be clear in what follows, the numerical results
show that the proposed controller is able to correctly satisfy The robustness and the efficacy of the proposed controller
the overall system constraints and achieve the set control have been evaluated by considering two scenarios: the islan-
objectives proposed. ded and the grid-connected. In the first scenario, the main
purpose is to guarantee the balance between generation and
8.1. Simulation setup demand without the support of the grid. In the grid-connected
scenario, additional participation to the electricity market is
The simulations have been conducted over a H ¼ 24 h used with the main target of supplying the load and gener-
simulation horizon with th ¼ 1 h sampling time. Instead, for ating profits. The two different scenarios feature the common
addressing the real-time market, the LLC has been imple- target of minimizing the HESS’ operating costs. In the con-
mented on a shorter time horizon of M ¼ 1 h with ts- nected scenario, the interaction with the main grid implies
¼ 10 min sampling time. Since the HAEOLUS plant is under that the energy prices predicted for energy selling/buying in
construction, wind profiles and market prices have not been the daily market must be considered. Fig. 4 shows the power
collected yet, and then wind generation data from an Italian production and consumption profiles considered in the nu-
wind farm has been used for the numerical simulations of merical simulations for the HLC and the LLC.
this research study. In particular, the wind profiles have
been provided by Friendly Power s.r.l., San Martino Sannita, 8.2.1. Scenario 1: islanded mode (ucon ¼ 0)
Italy, and refer to a wind farm situated in center-south Italy For the islanded microgrid, the main goals are to track the load
in 2017 (recent data are not available due to a change of demand by using only the RESs and the stored hydrogen and
ownership). Market prices, instead, have been provided by to minimize the operating costs of the HESS devices. Fig. 5
the Italian energy market operator, named Gestore dei Mer- provides a summary of the strategy's effectiveness by
cati Energetici, and refer to the same period, i.e., 2017. Table 1 showing that the proposed controller for the islanded scenario
summarizes the main characteristics of the HESS devices. allows the achievement of the HESS optimal behavior.
Data from the literature have been adopted for the param-
eters not yet defined in the plant under construction. Table
1 also shows that the fuel cell is undersized in terms of
power compared to the electrolyzer. This choice derives
from the main focus of the HAEOLUS project on the
economical interests of the wind farm owner given the
peculiar wind generation of the area where it is located. In
order to balance the tracking goal satisfaction and the
operational costs, the cost functions include suitable
weights (determined by appropriate simulations test runs).
The development and the simulation analysis of the pro-
posed two-level controller have been carried out in MATLAB
with the YALMIP tool and GUROBI optimizer on a computer
with an Intel Xeon (R) W  2245HQ 3.9 GHz with 128 GB RAM.
Fig. 4 e Wind according to the data from an Italian wind
The time interval needed to solve the optimization problem
farm from 12.10 of 17, February 2017 and local load profile
on this computer is 60 s.
by smoothing the wind profile.
606 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

possible the optimal references computed by the HLC, but at


the same time, it is designed to manage the system autono-
mously as well. In this regard, in Fig. 5(d) the hydrogen level
reference scheduled by the HLC and their tracking in the LLC
are detailed. As it can be seen, from autonomous decisions the
LLC starts producing hydrogen during the hours 5e8 and
16e17 although it was not scheduled during those hours. This
is due to the fact that the wind generations during the said
hours in real-time are such that available power meets the
loads, while the LLC decides to shunt the excess to the elec-
trolyzer for later uses.

8.2.2. Scenario 2: grid-connected mode (ucon ¼ 1)


In the grid-connected mode, the market operations both for
buying and selling energy are included in the controller to
satisfy the local and contractual loads. For the reader's con-
venience, in the grid-connected mode, wind and load profiles
(HLC and LLC) are the same as those in the islanded mode
(such as the initial condition for the hydrogen in the tank 0.5
p.u.). Note that in the Italian energy market operator, named
Gestore dei Mercati Energetici, only an hourly basis is provided
for energy prices, and then they are resampled at the LLC
whose sampling time is 10 min. In practice, Fig. 6 reports the
electricity buying/selling events with the utility grid consid-
ered in the control implementation.
Fig. 7 shows the control response of the proposed HLC. It is
observed from Fig. 7(a) that the available power exactly meets
the load demand for all instants. After meeting the load de-
mand, any excess of renewable power is shunted towards the
electrolyzer for producing hydrogen, while hydrogen is
consumed during low or nearly zero RES hours, as shown in
Fig. 7(b). One can see that the controller is designed to pur-
chase energy from the grid when the prices are lower and the
sold power revenues are maximized, depending on the energy
price profile and the available power. As shown in Fig. 7(c),
during the 24 h except for the hours 3, 7 and 17e21, the
controller tends to sell as much as possible. Furthermore,
Fig. 7(d) presents the stored hydrogen in the tank.
Fig. 8 shows the control response of the proposed con-
trollers (both the HLC and the LLC) for the grid-connected
mode. It is possible to see that the LLC tries to reach the ref-
erences given by the HLC where possible. Similar to the island
scenario, the system's available power correctly meets the
user load demand, as Fig. 8(a) shows. In Fig. 8(b), the evolution
of the state variables Hh and H[ is shown. Fig. 8(c) illustrates
the possibility of interacting with the main grid. However,
depending on the energy price profile and the system's avail-
able power, the sold power revenues are maximized.
Fig. 5 e Control response of the two-level MPC for the
In order to make closing remarks, the exposed degradation
islanded mode.
considering the hydrogen devices, the device degradations
caused by the switching states such as start-up, shut-down,
Moreover, from Fig. 5(a) it is observable that the system's and standby are minimized, therefore leading the LLC to a
available power meets user requested load demand. Fig. 5(b) hydrogen level profile possibly different from the one sched-
depicts the hydrogen devices' powers. The level of hydrogen in uled. An example can be seen from Fig. 8(a) for the hour 15
the tank is depicted in Fig. 5(d). where it was scheduled the ON state for the fuel cell, but the
In order to present the effects of the LLC, Fig. 5 shows the optimal LLC does not follow this action because enough power
24 h test response of the proposed controllers. It is possible to remained in the microgrid.
observe from Fig. 5(c) that the references schedule provided by From the figures above, it derives that in both scenarios the
the HLC is tracked by the LLC and correctly meets the user load operation of the HESS devices is executed correctly and their
demand where possible. Indeed, the LLC follows whenever operation and maintenance costs are minimized. This results
i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0 607

Fig. 6 e Energy price for intraday market (Source: “Gestore dei Mercati Energetici S.p.A.” - www.mercatoelettrico.org).

Fig. 7 e Control response of the HLC for the grid-connected Fig. 8 e Control response of the two-level MPC for the grid-
mode. connected mode.
608 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

in a minimization of the number of working hours. In the grid- [6] Luo X, Wang J, Dooner M, Clarke J. Overview of current
connected scenario, the exchange of energy with the main development in electrical energy storage technologies and
grid is also considered to maximize profits. the application potential in power system operation. Appl
Energy 2015;137:511e36.
[7] Gonza  lez EL, Llerena FI, Pe
rez MS, Iglesias FR, Macho JG.
Energy evaluation of a solar hydrogen storage facility:
9. Conclusion comparison with other electrical energy storage
technologies. Int J Hydrogen Energy 2015;40(15):5518e25.
This work develops a hierarchical MPC for the EMS of a HESS [8] Dawood F, Anda M, Shafiullah G. Hydrogen production for
paired with a wind farm and connected to the main grid. In energy: an overview. Int J Hydrogen Energy
order to satisfy different time-scale constraints, this study 2020;45(7):3847e69.
[9] Gorre J, Ruoss F, Karjunen H, Schaffert J, Tynja € la
€ T. Cost
presents novel dynamical models for the HESS devices at
benefits of optimizing hydrogen storage and methanation
different time-scale resolutions. The proposed novel models capacities for power-to-gas plants in dynamic operation.
take into account the microgrid components' life of the HESS Appl Energy 2020;257:113967.
so as to optimize the hydrogen devices’ working cycles via [10] Bai W, Abedi MR, Lee KY. Distributed generation system
properly defined cost functions. In this regard, the two-level control strategies with PV and fuel cell in microgrid
MPC presented in this study allows to achieve the HESS operation. Control Eng Pract 2016;53:184e93.
[11] Velarde P, Valverde L, Maestre JM, Ocampo-Martı́nez C,
optimal behavior also when a disagreement between the
Bordons C. On the comparison of stochastic model predictive
economical schedule computed at the HLC and the real-time
control strategies applied to a hydrogen-based microgrid. J
scenario addressed via the LLC occurs. In particular, the ref- Power Sources 2017;343:161e73.
erences scheduled by the HLC are tracked by the LLC. How- [12] Abdelghany MB, Al-Durra A, Zeineldin H, Gao F. Integrating
ever, being autonomous, it can correct the energy scenario in scenario-based stochastic-model predictive control and load
case a deviation exists in real-time due to the intermittent forecasting for energy management of grid-connected hybrid
nature of the wind generation. energy storage systems. Int J Hydrogen Energy 2023. https://
doi.org/10.1016/j.ijhydene.2023.05.249.
The control strategy developed in this research study will
[13] Vivas FJ, Segura F, Andújar JM, Palacio A, Saenz JL,
be implemented as part of the HAEOLUS plant, which is Isorna F, Lo  pez E. Multi-objective fuzzy logic-based energy
currently under construction [53] at a wind farm in North management system for microgrids with battery and
Norway. It is worth highlighting, however, that the modeling hydrogen energy storage system. Electronics
and the approach carried out in this paper are not specific to 2020;9(7):1074.
that particular plant and can be applied for similar settings [14] Ramli MA, Bouchekara H, Alghamdi AS. Optimal sizing of PV/
where the hydrogen storage and re-electrification are paired wind/diesel hybrid microgrid system using multi-objective
self-adaptive differential evolution algorithm. Renew Energy
with intermittent RESs. Future works will also include more
2018;121:400e11.
sophisticated MPC strategies, e.g., the stochastic MPC, to [15] Abdelghany MB, Faisal Shehzad M, Liuzza D, Mariani V,
consider the regulation service and uncertainties of the fore- Glielmo L. Modeling and optimal control of a hydrogen
cast loads. storage system for wind farm output power smoothing. In:
2020 59th IEEE Conference on Decision and Control. CDC);
2020. p. 49e54.
Declaration of competing interest [16] Abdelghany MB, Shehzad MF, Liuzza D, Mariani V, Glielmo L.
Optimal operations for hydrogen-based energy storage
The authors declare that they have no known competing systems in wind farms via model predictive control. Int J
Hydrogen Energy 2021;46(57):29297e313.
financial interests or personal relationships that could have
[17] Gonza  lez-Rivera E, Sarrias-Mena R, Garcı́a-Trivin ~ o P,
appeared to influence the work reported in this paper.  ndez-Ramı́rez LM. Predictive energy management for a
Ferna
wind turbine with hybrid energy storage system. Int J Energy
references Res 2020;44(3):2316e31.
[18] Abdelghany MB, Shehzad MF, Mariani V, Liuzza D, Glielmo L.
Two-stage model predictive control for a hydrogen-based
storage system paired to a wind
[1] Foda A, Abdelaty H, Mohamed M, El-Sadaany E. A generic farm towards green hydrogen production for fuel
cost-utility-emission optimization for electric bus transit cell electric vehicles. Int J Hydrogen Energy
infrastructure planning and charging scheduling. Energy 2022;47(75):32202e22.
2023:127592. [19] Ferna ndez FJV, Segura Manzano F, Andújar Ma  rquez JM,
[2] Valverde L, Rosa F, Bordons C, Guerra J. Energy management Caldero  n Godoy AJ. Extended model predictive controller to
strategies in hydrogen smart-grids: a laboratory experience. develop energy management systems in renewable source-
Int J Hydrogen Energy 2016;41(31):13715e25. based smart microgrids with hydrogen as backup.
[3] Bordons C, Garcia-Torres F, Ridao MA. Model predictive Theoretical foundation and case study. Sustainability
control of microgrids. Springer; 2020. 2020;12(21):8969.
[4] Van LP, Chi KD, Duc TN. Review of hydrogen technologies [20] Garcia-Torres F, Bordons C, Tobajas J, Marquez JJ, Garrido-
based microgrid: energy management systems, challenges Zafra J, Moreno-Munoz A. Optimal schedule for networked
and future recommendations. Int J Hydrogen Energy microgrids under deregulated power market environment
2023;48(38):14127e48. using model predictive control. IEEE Transactions on Smart
[5] Dı́az-Gonza  lez F, Sumper A, Gomis-Bellmunt O, Villafa
 fila- Grid 2020;12(1):182e91.
Robles R. A review of energy storage technologies for wind [21] Garcia-Torres F, Bordons C, Ridao MA. Optimal economic
power applications. Renew Sustain Energy Rev schedule for a network of microgrids with hybrid energy
2012;16(4):2154e71.
i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0 609

storage system using distributed model predictive control. and frequency based on PSO-adaptive virtual impedance
IEEE Trans Ind Electron 2019;66(3):1919e29. method. Elec Power Syst Res 2022;208:107881.
[22] Garcia-Torres F, Valverde L, Bordons C. Optimal load sharing [39] Samy M, Almamlook RE, Elkhouly HI, Barakat S. Decision-
of hydrogen-based microgrids with hybrid storage using making and optimal design of green energy system based on
model-predictive control. IEEE Trans Ind Electron statistical methods and artificial neural network approaches.
2016;63(8):4919e28. Sustain Cities Soc 2022;84:104015.
[23] Valverde L, Bordons C, Rosa F. Integration of fuel cell [40] Ferahtia S, Rezk H, Djerioui A, Houari A, Fathy A,
technologies in renewable-energy-based microgrids Abdelkareem MA, et al. Optimal heuristic economic
optimizing operational costs and durability. IEEE Trans Ind management strategy for microgrids based PEM fuel cells. Int
Electron 2015;63(1):167e77. J Hydrogen Energy 2022. https://doi.org/10.1016/
[24] Pereira M, Limon D, Alamo T, Valverde L. Application of j.ijhydene.2022.02.231.
periodic economic MPC to a grid-connected micro-grid. IFAC- [41] Jiang Y, Liu J, Zheng H. Optimal scheduling of distributed
PapersOnLine 2015;48(23):513e8. hydrogen refueling stations for fuel supply and reserve
[25] Petrollese M, Valverde L, Cocco D, Cau G, Guerra J. Real-time demand service with evolutionary transfer multi-agent
integration of optimal generation scheduling with MPC for reinforcement learning. Int J Hydrogen Energy 2023. https://
the energy management of a renewable hydrogen-based doi.org/10.1016/j.ijhydene.2023.04.128.
microgrid. Appl Energy 2016;166:96e106. [42] Tostado-Ve liz M, Kamel S, Hasanien HM, Turky RA, Jurado F.
[26] Serna A, Yahyaoui I, Normey-Rico JE, de Prada C, Tadeo F. Optimal energy management of cooperative energy
Predictive control for hydrogen production by electrolysis in communities considering flexible demand, storage and
an offshore platform using renewable energies. Int J vehicle-to-grid under uncertainties. Sustain Cities Soc
Hydrogen Energy 2017;42(17):12865e76. 2022;84:104019.
[27] Jayachandran M, Ravi G. Decentralized model predictive [43] Abdelghany MB, Al-Durra A, Gao F. A coordinated optimal
hierarchical control strategy for islanded AC microgrids. Elec operation of a grid-connected wind-solar microgrid
Power Syst Res 2019;170:92e100. incorporating hybrid energy storage management systems.
[28] Zhang Y, Fu L, Zhu W, Bao X, Liu C. Robust model predictive IEEE Trans Sustain Energy 2023:1e13. https://doi.org/10.1109/
control for optimal energy management of island microgrids TSTE.2023.3263540.
with uncertainties. Energy 2018;164:1229e41. [44] Le TS, Nguyen TN, Bui D-K, Ngo TD. Optimal sizing of
[29] Gbadega PA, Saha AK. Impact of incorporating disturbance renewable energy storage: a techno-economic analysis of
prediction on the performance of energy management hydrogen, battery and hybrid systems considering degradation
systems in micro-grid. IEEE Access 2020;8:162855e79. and seasonal storage. Appl Energy 2023;336:120817.
[30] Bustos R, Marı́n LG, Navas-Fonseca A, Reyes-Chamorro L, [45] Bahou S. Techno-economic assessment of a hydrogen
Sa ez D. Hierarchical energy management system for multi- refuelling station powered by an on-grid photovoltaic solar
microgrid coordination with demand-side management. system: a case study in Morocco. Int J Hydrogen Energy 2023.
Appl Energy 2023;342:121145. https://doi.org/10.1016/j.ijhydene.2023.03.220.
[31] Daneshvar M, Mohammadi-Ivatloo B, Zare K, Asadi S. [46] Mohideen MM, Subramanian B, Sun J, Ge J, Guo H,
Transactive energy management for optimal scheduling of Radhamani AV, Ramakrishna S, Liu Y. Techno-economic
interconnected microgrids with hydrogen energy storage. Int analysis of different shades of renewable and non-renewable
J Hydrogen Energy 2020;46(30):16267e78. energy-based hydrogen for fuel cell electric vehicles. Renew
[32] Mendes PR, Isorna LV, Bordons C, Normey-Rico JE. Energy Sustain Energy Rev 2023;174:113153.
management of an experimental microgrid coupled to a V2G [47] Diaz IU, de Queiro  z Lamas W, Lotero RC. Development of an
system. J Power Sources 2016;327:702e13. optimization model for the feasibility analysis of hydrogen
[33]  ndez LM, Jurado F, Langella R,
Garcı́a P, Torreglosa JP, Ferna application as energy storage system in microgrids. Int J
Testa A. Energy management system based on techno- Hydrogen Energy 2023;48(43):16159e75.
economic optimization for microgrids. Elec Power Syst Res [48] Zheng N, Zhang H, Duan L, Wang Q, Bischi A, Desideri U.
2016;131:49e59. Techno-economic analysis of a novel solar-driven PEMEC-
[34] Huang C, Zong Y, You S, Træholt C, Zheng Y, Wang J, et al. SOFC-based multi-generation system coupled parabolic
Economic and resilient operation of hydrogen-based trough photovoltaic thermal collector and thermal energy
microgrids: an improved MPC-based optimal scheduling storage. Appl Energy 2023;331:120400.
scheme considering security constraints of hydrogen [49] Khalid M, Savkin A. A model predictive control approach to
facilities. Appl Energy 2023;335:120762. the problem of wind power smoothing with controlled
[35] Yousri D, AbdelAty AM, Al-qaness MA, Ewees AA, Radwan AG, battery storage. Renew Energy 2010;35(7):1520e6.
Abd Elaziz M. Discrete fractional-order caputo method to [50] Diaz-Gonzalez F, Bianchi FD, Sumper A, Gomis-Bellmunt O.
overcome trapping in local optima: Manta ray Control of a flywheel energy storage system for power
foraging optimizer as a case study. Expert Syst Appl smoothing in wind power plants. IEEE Trans Energy Convers
2022;192:116355. 2014;29(1):204e14.
[36] Abdelghany MB, Moustafa AM, Moness M. Benchmarking [51] Muyeen S, Takahashi R, Murata T, Tamura J, Ali MH.
tracking autopilots for quadrotor aerial robotic system using Application of STATCOM/BESS for wind power smoothening
heuristic nonlinear controllers. Drones 2022;6(12):379. and hydrogen generation. Elec Power Syst Res
[37] Yousri D, Farag HE, Zeineldin H, El-Saadany EF. Integrated 2009;79(2):365e73.
model for optimal energy management and demand [52] Abdelghany MB, Sheshzad M, Mariani V, Liuzza D, Glielmo L.
response of microgrids considering hybrid hydrogen-battery Optimal tracking of grid operated load demand with
storage systems. Energy Convers Manag 2023;280:116809. hydrogen based storage system using model based
[38] Sepehrzad R, Khojasteh Rahimi M, Al-Durra A, predictive control. 2022. p. 899e901. URL, https://www.
Allahbakhshi M, Moridi A. Optimal energy management of scopus.com/inward/record.uri?eid¼2-s2.0-85147189965
distributed generation in micro-grid to control the voltage &partnerID¼40&md5¼430ffc3689521fd69d5fc93fc310a4f9.
610 i n t e r n a t i o n a l j o u r n a l o f h y d r o g e n e n e r g y 5 1 ( 2 0 2 4 ) 5 9 5 e6 1 0

[53] Hydrogen-aeolic energy with optimized electrolysers [55] Shehzad MF, Abdelghany MB, Liuzza D, Mariani V, Glielmo L.
upstream of substatio project, http://www.haeolus.eu/ Mixed logic dynamic models for MPC control of wind
(November 2018). farm hydrogen-based storage systems. Inventions
[54] Bemporad A, Morari M. Control of systems integrating logic, 2019;4(4):57.
dynamics, and constraints. Automatica 1999;35(3):407e27.

You might also like