**1. Introduction**

In order to protect the environment and cope with the energy crisis, the renewable energies, such as wind and solar, are being exploited in a more widespread way. However, the randomness and intermittency of renewable electricity are still challenging issues for the large-scale connection to the power grid [1].

Since hydrogen has the advantages of high-energy density, being environmentally friendly and easy storage, it has been regarded as a promising energy carrier and electricity storage medium to reduce carbon emission, improve the sustainability of the energy system, promote the consumption of renewable energies and alleviate their volatility [2]. Hydrogen can either be produced centrally from renewable electricity through electrolyzers situated close to wind or PV power plants and then transported to hydrogen consumers or can be directly generated on sites close to hydrogen consumers [3]. Though mass production in a central manner is more economical, the high transportation cost may erase the advantages of this hydrogen production mode. Consequently, the distributed hydrogen production mode based on a renewable energy microgrid is considered to be an effective way to reduce

**Citation:** Wang, J.; Li, D.; Lv, X.; Meng, X.; Zhang, J.; Ma, T.; Pei, W.; Xiao, H. Two-Stage Energy Management Strategies of Sustainable Wind-PV-Hydrogen-Storage Microgrid Based on Receding Horizon Optimization. *Energies* **2022**, *15*, 2861. https://doi.org/10.3390/ en15082861

Academic Editors: Leijiao Ge, Jun Yan, Yonghui Sun and Zhongguan Wang

Received: 1 March 2022 Accepted: 5 April 2022 Published: 14 April 2022

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

**Copyright:** © 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https:// creativecommons.org/licenses/by/ 4.0/).

hydrogen production and transportation costs and promote the consumptions of distributed renewable energies [4]. The distributed hydrogen production mode based on a renewable energy microgrid has attracted more attention, and research is focused on the aspects of modeling, techno-economic analysis, cooperative operation and optimal planning, etc. For example, the accurate modeling method of the advanced alkaline electrolyzer system is proposed and demonstrated in [5]. The techno-economic feasibility of the production of hydrogen from the PV-wind microgrid has been evaluated in [6]. A cooperative operation method to increase profits for wind turbines and onsite hydrogen production and fueling stations has been proposed in [7]. A Nash-bargaining-based cooperative planning and operation method for a wind-hydrogen-heat multi-agent energy system has been proposed in [8]. In addition, optimal capacity planning of an isolated, batteryless, hydrogen-based microgrid is proposed in [9].

Due to the stochastic volatility of renewable electricity, such as wind power and PV, not only affecting the stable operation of the hydrogen production system, but also affecting hydrogen purity, the question of how to relieve the adverse effects of the uncertainties and volatility of the renewable energies is still a critical challenge and an open problem, which has drawn more and more attention. The energy management strategy based on model predictive controller or receding horizon optimization is considered to be one of the promising methods. For instance, an energy management strategy is proposed for a renewable hydrogen-based microgrid in [10], and both the long- and short-term optimal operation schedules are obtained by the model predictive controller. In [11], an energy management strategy based on the receding-horizon stochastic optimization method is proposed to increase renewable penetration and improve operational flexibility of the PV-hydrogen microgrids. In [12], a flexible weighted model predictive control energy management strategy is proposed for a multi-energy microgrid with the hydrogen energy storage system and the heat storage system. In [13], a real-time energy management method based on model predictive control is proposed for a microgrid composed of PV, battery, electrolyzer and fuel cell. In [14], in order to maximize the operational benefit of the microgrid and minimize the degradation causes of each storage system, energy management based on the model predictive control method is proposed. The energy management strategies proposed above all show good performance in relieving the uncertainties of renewable energies or loads. Furthermore, the energy storage as well as the demand response technologies is also helpful in mitigating the power fluctuations of the renewable energy microgrid. For example, in [15], the conventional operation strategy, demand response strategy for peak shaving, has been comparatively studied for grid-connected photovoltaic (PV)-hydrogen/battery systems and the battery storage has an important role in reducing the operation cost and mitigating the power fluctuation. In [16], the accurate model of a hybrid energy system including solar energy, lithium-ion battery and hydrogen is proposed; the coordinated operations of the short-term lithium-ion battery and long-term hydrogen storage show great advantage in keeping energy balanced and mitigating the power fluctuation of renewable energies. In [17], the advantages in reducing operation cost and relieving the intermittent use of a pumped-storage system with a dynamic tariff demand response strategy have been demonstrated in a system consisting of wind turbines, a photovoltaic array and a pumped hydro energy storage system. In order to improve the reliability and mitigate the stochastic volatility of wind farms, an optimal coordination operation and planning method of kinetic energy storage is proposed in [18]; simulation results show that the proposed method is effective in identifying the minimum capacity of kinetic energy storage and improving power supply reliability. Likewise, an optimization energy management method is proposed in [19] to reduce the operation cost of a wind power plant-flywheel energy storage system; simulation results show that the flywheel energy storage method is effective in relieving the stochastic fluctuation of wind power. In [20], a planning method is proposed to optimize the structure of the PV-wind-electrochemical storage system, and the energy storage system has been shown to play an important role in improving the power supply reliability.

These research results have laid a good foundation for the energy management problem of the renewable-energy-based microgrid. However, the energy management problem for the wind-PV-hydrogen-battery microgrid is still an open problem; the questions of how to mitigate the adverse effects of the stochastic and uncertain factors of renewable electricity and how to coordinate the operation of the whole system still need further investigation.

In order to alleviate the uncertainties and fluctuations of outpower of WT and PV, and the power and hydrogen demands, this paper proposes a two-stage energy management model for the sustainable wind-PV-hydrogen-storage microgrid based on receding horizon optimization, and the role of energy storage has also been explored. The main contributions are as follows.


The remainder of this paper is organized as follows. Section 2 introduces the structures and the subsystem models of the sustainable wind-PV-hydrogen-storage microgrid. Section 3 proposes the two-stage energy management model. Section 4 presents the simulation and result analysis. At last, Section 5 draws the conclusion.

#### **2. The Sustainable Wind-PV-Hydrogen-Storage Microgrid**

Figure 1 illustrates the sustainable wind-PV-hydrogen-storage (WPHS) microgrid. It is mainly composed of wind turbines (WT), photovoltaics (PV), battery storage and the power-to-hydrogen (P2H) subsystem. The WPHS microgrid is responsible for meeting the hydrogen demands and power demands of the end users. The sustainable WPHS microgrid is connected to the upstream power grid, and the renewable electricity is mainly consumed locally to produce hydrogen and meet the power loads. Bilateral power exchange with the power grid is supported, the surplus power can be fed back to the power grid to make profit and the insufficient electricity can also be purchased from the power grid. Therefore, the WPHS microgrid comprises a high proportion of renewable energy systems, which can realize the sustainability of energy supply. The models of WT, PV, battery storage and the power-to-hydrogen subsystem are as follows. *Energies* **2022**, *15*, x FOR PEER REVIEW 4 of 21

=

*t t in*

speed of wind turbine; *PRWT* is the rated power of wind turbine.

*<sup>t</sup> Ebat* be the energy stored in the batteries at time slot *<sup>t</sup>* ;

*<sup>t</sup> Pbat d* denote the charging and discharging power, respectively, and let

*r in*

*v v*

The outpower of wind turbine can be expressed as the function of wind speed [15].

*WT RWT in t r*

<sup>−</sup> ≤ ≤ <sup>−</sup>

≤ ≤

slot *t*; *in <sup>v</sup>* and *out <sup>v</sup>* are cut-in and cut-out wind speed, respectively; *<sup>r</sup> <sup>v</sup>* is the rated wind

The outpower of PV panels can be expressed as the function of solar radiation in-

1 0.005 25 ( ) *<sup>t</sup> <sup>t</sup> PV PV rSTC t STC <sup>I</sup> P NP <sup>T</sup> I*

test conditions (cell temperature is 25 °C, irradiance is 1000 W/m2); *<sup>t</sup> I* and *Tt* are irradiance and cell temperature (which approximates to the ambient temperature) at time

The battery storages are helpful in alleviating the volatility of renewable energies.

the minimum and maximum capacity of battery storages, respectively. Let ,

*<sup>t</sup> PPV* is the outpower of PV array; *NPV* is the number of PV panes; *STC <sup>I</sup>* is the

*v v P P v vv*

0 ,

≤ ≥

*RWT r t out*

*P vvv*

*<sup>t</sup> PWT* is the outpower of wind turbine at time slot *t*; *<sup>t</sup> v* is the wind speed at time

*t in t out*

= ⋅ ⋅ + ⋅− (2)

*PrSTC* is the rated power of each PV panel at standard

min *Ebat* and

max *Ebat* denote

max *Pbat c*, and

*<sup>t</sup> Pbat c* and

max *Pbat d*,

(1)

*v vv v*

**Figure 1.** The schematic of wind-PV-hydrogen-storage microgrid. **Figure 1.** The schematic of wind-PV-hydrogen-storage microgrid.

*2.1. The Wind Turbine Model*

tensity and the cell temperature [21].

standard irradiance, 1000 W/m2;

*2.3. The Battery Storage Model*

where

where

slot *t*.

Let

,

*2.2. The PV Model*

## *2.1. The Wind Turbine Model*

The outpower of wind turbine can be expressed as the function of wind speed [15].

$$P\_{WT}^t = \begin{cases} 0 & v\_t \le v\_{in}, v\_t \ge v\_{out} \\ \frac{v\_t - v\_{in}}{v\_r - v\_{in}} P\_{RWT} & v\_{in} \le v\_t \le v\_r \\\ P\_{RWT} & v\_r \le v\_t \le v\_{out} \end{cases} \tag{1}$$

where *P t WT* is the outpower of wind turbine at time slot *t*; *v<sup>t</sup>* is the wind speed at time slot *t*; *vin* and *vout* are cut-in and cut-out wind speed, respectively; *v<sup>r</sup>* is the rated wind speed of wind turbine; *PRWT* is the rated power of wind turbine.

#### *2.2. The PV Model*

The outpower of PV panels can be expressed as the function of solar radiation intensity and the cell temperature [21].

$$P\_{PV}^t = N\_{PV} \cdot P\_{rSTC} \cdot \frac{I\_t}{I\_{STC}} [1 + 0.005 \cdot (T\_t - 25)] \tag{2}$$

where *P t PV* is the outpower of PV array; *NPV* is the number of PV panes; *ISTC* is the standard irradiance, 1000 W/m<sup>2</sup> ; *PrSTC* is the rated power of each PV panel at standard test conditions (cell temperature is 25 ◦C, irradiance is 1000 W/m<sup>2</sup> ); *I<sup>t</sup>* and *T<sup>t</sup>* are irradiance and cell temperature (which approximates to the ambient temperature) at time slot *t*.

#### *2.3. The Battery Storage Model*

The battery storages are helpful in alleviating the volatility of renewable energies. Let *E t bat* be the energy stored in the batteries at time slot *t*; *E* min *bat* and *E* max *bat* denote the minimum and maximum capacity of battery storages, respectively. Let *P t bat*,*c* and *P t bat*,*d* denote the charging and discharging power, respectively, and let *P* max *bat*,*c* and *P* max *bat*,*d* denote the maximum values of charging and discharging power, respectively. Then, the battery storage model can be formulated as follows [22].

$$\begin{cases} E\_{bat}^t = E\_{bat}^{t-1} + (P\_{bat,c}^t e\_{bat,c} - \frac{P\_{bat,d}^t}{e\_{bat,d}}) \Delta t \\ 0 \le P\_{bat,c}^t \le u\_{bat}^t \cdot P\_{bat,c}^{\max} \\ 0 \le P\_{bat,d}^t \le (1 - u\_{bat}^t) \cdot P\_{bat,d}^{\max} \\ E\_{bat}^{\min} \le E\_{bat}^t \le E\_{bat}^{\max} \\ E\_{bat}^1 = E\_{bat}^1 \end{cases} \tag{3}$$

where the first equation of Equation (3) denotes the stored energy variation during time interval ∆*t* before and after charging or discharging. The second and third items of Equation (3) indicate that the charging and discharging power cannot exceed their maximums. *u t bat* is a binary variable to avoid charging and discharging power simultaneously. The fourth item of Equation (3) denotes that the stored energy should be constrained between the minimum and maximum capacity. The last item of Equation (3) shows that the stored energy at the end of the dispatch period is to be equal to its initial value.

#### *2.4. The Power-to-Hydrogen Subsystem Model*

The power-to-hydrogen production system mainly consists of alkaline electrolyzer, hydrogen compressor and hydrogen storage tank.

#### 2.4.1. The Model of Electrolyzer

Currently the alkaline electrolyzer (AE) and proton exchange membrane (PEM) are two major ways to produce hydrogen from electricity. The alkaline electrolyzer technology is more mature and economic, and was thus chosen to produce hydrogen in this paper. Since the start and response speed of the electrolyzer is quick [16], the ramp up/down

constraints are assumed to be satisfied in this paper. The mass of hydrogen production of AE is approximately linear to the consumed power [23].

$$\begin{cases} \begin{array}{c} m\_{\text{H}\_2}^t = \eta\_{\text{H}\_2} P\_{\text{el}}^t \cdot \Delta t\\ 0 \le P\_{\text{el}}^t \le P\_{\text{el}}^{\text{max}} \end{array} \tag{4} $$

where *m<sup>t</sup>* H<sup>2</sup> is the hydrogen mass produced at time slot *t*, kg; *η*H<sup>2</sup> is hydrogen production rate, kg/kW · h; *P t* el denotes the power consumed by electrolyzer at time slot *t*, kW; ∆*t* is the time step; *P* max el is the maximum power of electrolyzer.

#### 2.4.2. The Model of Hydrogen Compressor

A hydrogen compressor is used to compress the hydrogen into high-pressure hydrogen. The power consumption of the hydrogen compressor can be expressed as follows [24]:

$$\begin{cases} \begin{array}{c} P\_{com}^{t} = \frac{\mathbb{C}\_{H\_{2}} m\_{com}^{t} T\_{in} \kappa}{\eta\_{com} (\kappa - 1)} \left[ \left( \frac{P\_{out}}{P\_{in}} \right)^{\frac{\kappa - 1}{\kappa}} - 1 \right] \\\ 0 \le P\_{com}^{t} \le P\_{com}^{\max} \end{array} \end{cases} \tag{5}$$

where *P t com* is the electric power consumed by compressor at time *t*; *CH*<sup>2</sup> is the specific heat of hydrogen at constant pressure, 14.304 kJ/kg · K; *<sup>m</sup><sup>t</sup> com* is the hydrogen flow rate through compressor at time *t*, kg/s; *Tin* is the inlet hydrogen temperature (293 K); *ηcom* is the efficiency of compressor (0.7); *κ* is the isentropic exponent of hydrogen (1.4); *P* max *com* is the maximum power of hydrogen compressor.

#### 2.4.3. The Model of Hydrogen Storage Tank

The compressed hydrogen is stored in the hydrogen storage tank. The pressure of the hydrogen tank can be formulated as follows [25].

$$\begin{cases} \begin{aligned} \mathcal{M}\_{\mathcal{H}\_{2}}^{t+1} &= \mathcal{M}\_{\mathcal{H}\_{2}}^{t} + m\_{\mathcal{H}\_{2}}^{t} - L\_{\mathcal{H}\_{2}}^{t} \\ \mathcal{M}\_{\mathcal{H}\_{2}}^{\min} &\leq \mathcal{M}\_{\mathcal{H}\_{2}}^{t} \leq \mathcal{M}\_{\mathcal{H}\_{2}}^{\max} \\ \mathcal{M}\_{\mathcal{H}\_{2}}^{\min} &= \gamma^{\min} \mathcal{C}\_{\mathsf{tank'}}^{\mathcal{R}} \cdot M\_{\mathcal{H}\_{2}}^{\max} = \gamma^{\max} \mathcal{C}\_{\mathsf{tank}}^{\mathcal{R}} \\ \mathcal{M}\_{\mathcal{H}\_{2}}^{0} = M\_{\mathcal{H}\_{2}}^{\mathcal{T}} &= \gamma^{0} \mathcal{C}\_{\mathsf{tank'}}^{\mathcal{R}} \end{aligned} \end{cases} \tag{6}$$

where *M<sup>t</sup>* H<sup>2</sup> is the stored hydrogen mass in the hydrogen tank at time slot *t*, kg; *L t H*<sup>2</sup> is the hydrogen load at time slot *t*, kg; *C R* t*an*k is the capacity of hydrogen tank, kg; *γ* min and *γ* max denote the minimum and maximum ratio of the rated capacity of hydrogen tank; *M*<sup>0</sup> H<sup>2</sup> and *M*<sup>T</sup> H<sup>2</sup> are the stored hydrogen at the initial and end time slot, respectively.

## **3. The Two-Stage Energy Management Model**

The randomness and uncertainty of the outpower of WT and PV will affect the stable operation of the whole system and may reduce the hydrogen purity. As illustrated in Figure 2, in order to alleviate these adverse effects, a two-stage energy management model based on receding horizon optimization is proposed for the wind-PV-hydrogen-storage microgrid. In the first stage of the energy management model, the day-ahead optimization is performed to minimize the total operational cost based on the predicted outpower of WT and PV, as well as the predicted power and hydrogen demands, the time-of-use price, the feed-in tariff and the operation constraints of the whole system. In the second stage of the energy management model, the intra-day optimization model based on the receding horizon optimization is executed to eliminate the power fluctuations caused by the forecast errors. The specific day-ahead optimization and intra-day optimization models will be formulated in the following subsections.

**Figure 2.** The schematic of the two-stage energy management model. **Figure 2.** The schematic of the two-stage energy management model.

#### *3.1. The Day-Ahead Optimization Model 3.1. The Day-Ahead Optimization Model*

tions of their output power.

where ,

*<sup>t</sup> Pbat c* and ,

The objective of the day-ahead operation is to minimize the comprehensive operation cost *CDAC* , which is composed of the operational and maintenance costs of PV (*CPV* ) and WT (*CWT* ); the degradation costs of batteries (*Cbat* ) and electrolyzer (*Cel* ); and the The objective of the day-ahead operation is to minimize the comprehensive operation cost *CDAC*, which is composed of the operational and maintenance costs of PV (*CPV*) and WT (*CWT*); the degradation costs of batteries (*Cbat*) and electrolyzer (*Cel*); and the net energy cost (*Ce*).

net energy cost (*Ce* ). The operational and maintenance costs of PV and WT are formulated as the functions of their output power.

$$\begin{cases} \mathbf{C}\_{PV} = \sum\_{t=1}^{T} \lambda\_{PV} P\_{PV}^{t} \Delta t \\ \mathbf{C}\_{WT} = \sum\_{t=1}^{T} \lambda\_{WT} P\_{WT}^{t} \Delta t \\ \vdots \end{cases} \tag{7}$$

1 1 *t <sup>T</sup> <sup>t</sup> WT WT WT t P t C* λ = = <sup>∆</sup> = ∑ (7) where *T* is the total number of time slots, *λPV* and *λWT* are maintenance cost coefficients of PV and WT, respectively; their values are assumed to be 0.005 ¥/kWh and 0.0045 ¥/kWh, respectively [26]. *P t PV* and *P t WT* are output power of PV and WT at time slot *t*, respectively.

where *T* is the total number of time slots, λ*PV* and λ*WT* are maintenance cost coefficients of PV and WT, respectively; their values are assumed to be 0.005 ¥/kWh and 0.0045 ¥/kWh, respectively [26]. *<sup>t</sup> PPV* and *<sup>t</sup> PWT* are output power of PV and WT at time slot *<sup>t</sup>* , respectively. The degradation of energy storage is caused by charging and discharging, as well The degradation of energy storage is caused by charging and discharging, as well as the depth of discharge. Refs. [27,28] have shown that the degradation density function of the state of charge (SoC) is almost flat between minimum and maximum of Soc. Thus, as in the model in [29–31], the amortized battery degradation cost *Cbat* can be computed by the power of discharging and charging (Equation (8)), while the degradation cost of battery considering the depth of discharge can be found in [17,32].

$$\mathbf{C}\_{bat} = \sum\_{t=1}^{T} \lambda\_{bat} \left( \mathbf{P}\_{bat,c}^{t} + \mathbf{P}\_{bat,d}^{t} \right) \Delta t \tag{8}$$

by the power of discharging and charging (Equation (8)), while the degradation cost of battery considering the depth of discharge can be found in [17,32]. where *P t bat*,*c* and *P t bat*,*d* are the charging and discharging power of battery, respectively. *λbat* denotes the degradation cost coefficient.

λ

*<sup>T</sup> t t* Similarly, the amortized degradation cost *Cel* of electrolyzer can be expressed as follows.

$$\mathbf{C}\_{\ell l} = \sum\_{t=1}^{T} \lambda\_{\ell l} P\_{\ell l}^{t} \Delta t \tag{9}$$

= ∑ <sup>∆</sup> (9)

λ*bat* denotes the degradation cost coefficient. Similarly, the amortized degradation cost *Cel* of electrolyzer can be expressed as where *P t el* and *λel* are the consumed power and degradation cost coefficient of electrolyzer, respectively.

follows. The microgrid is allowed to buy electricity from the utility grid when its electricity is insufficient and it may sell power back to the grid when its power is surplus. Then, the

*C*

1 *<sup>T</sup> <sup>t</sup> el el el t*

=

λ*P t*

*C*

net energy cost is formulated as the electricity purchasing cost minus the revenue from selling electricity.

$$\mathbf{C}\_{\mathcal{E}} = \sum\_{t=1}^{T} \left( \pi\_b P\_b^t - \pi\_s P\_s^t \right) \Delta t \tag{10}$$

where *π<sup>b</sup>* and *π<sup>s</sup>* denote the electricity buying and selling prices, respectively.*P t b* and *P t <sup>s</sup>* are the power purchased from and sold to the utility grid, respectively.

Then, the objective of the day-ahead optimization model can be expressed as follows.

$$\min \mathcal{C}\_{DAC} = \min \left( \mathcal{C}\_{PV} + \mathcal{C}\_{WT} + \mathcal{C}\_{bat} + \mathcal{C}\_{el} + \mathcal{C}\_{\varepsilon} \right) \tag{11}$$

The power balance should be satisfied at each time slot.

$$\mathbf{P}\_{\rm PV}^{t} + \mathbf{P}\_{\rm WT}^{t} + \mathbf{P}\_{b}^{t} + \mathbf{P}\_{\rm bat,d}^{t} = \mathbf{P}\_{\rm but,c}^{t} + \mathbf{P}\_{\rm el}^{t} + \mathbf{P}\_{\rm com}^{t} + \mathbf{P}\_{\rm s}^{t} + \mathbf{P}\_{\rm load}^{t} \tag{12}$$

where *P t b* and *P t <sup>s</sup>* are the power buying from and selling to the power grid at time slot *t*, respectively. *P t load* is the predicted power load at time slot *t*.

The buying and selling power cannot happen simultaneously. Let *P* max *grid* denote the maximum power allowed when selling to or buying from the power grid, and *χ t bs* denote the binary variable; then, the constraints of power exchanged with the power grid can be formulated as follows.

$$\begin{cases} \ 0 \le P\_b^t \le \chi\_{bs}^t P\_{grid}^{\max} \\\ \ 0 \le P\_s^t \le \left(1 - \chi\_{bs}^t\right) P\_{grid}^{\max} \end{cases} \tag{13}$$

Furthermore, the operation constraints of WT, PV, battery storage and the powerto-hydrogen subsystem should be satisfied. Then, the day-ahead optimization model in compact form can be expressed as follows.

$$\min \mathcal{C}\_{DAC} = \min \left\{ \begin{array}{ll} \frac{T}{\sum} \lambda\_{PV} P\_{PV}^{t} + \sum\_{t=1}^{T} \lambda\_{WT} P\_{WT}^{t} + \sum\_{t=1}^{T} \lambda\_{bat} \left( P\_{bat,c}^{t} + P\_{bat,d}^{t} \right) \\\ t \sum\_{t=1}^{T} \lambda\_{cl} P\_{cl}^{t} + \sum\_{t=1}^{T} \left( \pi\_{b} P\_{b}^{t} - \pi\_{s} P\_{s}^{t} \right) \\\ s.t. \ (1)-(6), (12)-(13) \end{array} \right\} \tag{14}$$

#### *3.2. The Intra-Day Optimization Model*

According to the day-ahead operation schemes, the intra-day optimization model will be performed to minimize the operation errors based on the ultra-short-term prediction data of WT, PV, power and hydrogen demands. The intra-day optimization model is built based on the receding horizon optimization, which is an effective method to tackle the uncertainty and volatility of renewable energies and loads. The main idea of the receding horizon operation is illustrated in Figure 3. It mainly contains the following three steps [3]. (1) Take the day-ahead operation schemes as set points; at the time slot *k*, solve the intra-day operation strategies during the receding horizon based on the real-time predicted values of renewable energy generation, power loads and hydrogen loads. (2) From the first step, obtain the operation strategies over the *k*-th to the *(k + M* − 1)-th time slot. Only the operation strategies at the *k*-th slot are implemented. (3) Move to the *k* + 1-th time slot, update the prediction data and repeat the first two steps. It is obvious that by means of receding horizon optimization, the operation strategies are updated step-by-step to alleviate the impacts of the uncertainty and volatility of renewable energies and loads.

The objective of the intra-day energy management is to trace the day-ahead operation schemes based on the updated predicted data for the output power of PV and WT, the power loads and hydrogen loads. Take the day-ahead operation strategies as set points and the objection function intra-day energy management can be expressed as follows.

$$\begin{aligned} \min \, \mathbb{C}\_{ID\mathbb{C}} &= \min \left\{ \sum\_{t=k}^{k+M-1} \left[ w\_1 \left( P\_{\text{grid}}^t - \hat{\mathcal{P}}\_{\text{grid}}^t \right)^2 + w\_2 \left( P\_{\text{el}}^t - \hat{\mathcal{P}}\_{\text{el}}^t \right)^2 \right] \right\} \\ &\left\{ (1) - (6), (12) - (13) \right\} \\ &s.t. \left\{ \begin{aligned} \Delta P\_{\text{grid}}^t &= \left| P\_{\text{grid}}^t - \hat{\mathcal{P}}\_{\text{grid}}^t \right| \le \Delta P\_{\text{grid}}^{\text{max}} \\ \Delta P\_{\text{el}}^t &= \left| P\_{\text{el}}^t - \hat{\mathcal{P}}\_{\text{el}}^t \right| \le \Delta P\_{\text{grid}}^{\text{max}} \\ \Delta P\_{\text{conf}}^t &= \left| P\_{\text{conf}}^t - \hat{\mathcal{P}}\_{\text{el}}^t \right| \le \Delta P\_{\text{conf}}^{\text{max}} \\ \Delta P\_{\text{tot}}^t &= \left| P\_{\text{conf}}^t - \hat{\mathcal{P}}\_{\text{tot}}^t \right| \le \Delta P\_{\text{conf}}^{\text{max}} \end{aligned} \right. \end{aligned} \tag{15}$$

where *P t grid* = *P t <sup>b</sup>* − *P t s* , *P t bat* = *P t bat*,*<sup>c</sup>* − *P t bat*,*d* , *P*ˆ*<sup>t</sup> grid*, *<sup>P</sup>*ˆ*<sup>t</sup> el*, *<sup>P</sup>*ˆ*<sup>t</sup> com* and *P*ˆ*<sup>t</sup> bat* denote the day-ahead operation schemes of buying power, electrolyzer, compressor and battery storage. *w*1, *w*2, *w*<sup>3</sup> and *w*<sup>4</sup> are weight factors; they can be optimized based on their significance. In this paper, they are assumed to have equal weights. ∆*P* max *grid* , ∆*P* max *el* , ∆*P* max *com* and ∆*P* max *bat* are the admissible maximum errors of exchanged power, the power of electrolyzer, the power of compressor and the net charging power of battery storage, respectively. The objective function (15) of the intra-day operation model is to minimize the operation deviation between the intra-day strategies and the day-ahead strategies. The constraints are the operation limitations of each component and the power exchange with the power grid. The decision variables are the operation strategies of each component and the power exchange with the power grid; the decision variable vector is *x* = h *P t grid*, *P t el*, *P t com*, *P t bat*i . More details about the input and output variables of the two-stage energy management model can be found in Appendix A. *Energies* **2022**, *15*, x FOR PEER REVIEW 9 of 21 al-time predicted values of renewable energy generation, power loads and hydrogen loads. (2) From the first step, obtain the operation strategies over the *k*-th to the *(k + M* − 1)-th time slot. Only the operation strategies at the *k*-th slot are implemented. (3) Move to the *k* + 1-th time slot, update the prediction data and repeat the first two steps. It is obvious that by means of receding horizon optimization, the operation strategies are updated step-by-step to alleviate the impacts of the uncertainty and volatility of renewable energies and loads.

**Figure 3.** Schematic of receding horizon optimization. **Figure 3.** Schematic of receding horizon optimization.

#### **4. Numerical Analysis**

#### The objective of the intra-day energy management is to trace the day-ahead opera-*4.1. Basic Parameter Settings*

tion schemes based on the updated predicted data for the output power of PV and WT, the power loads and hydrogen loads. Take the day-ahead operation strategies as set points and the objection function intra-day energy management can be expressed as follows. ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) 2 2 1 1 2 2 2 3 4 max max ˆ ˆ ˆ ˆ 1 6 , 12 13 ˆ ˆ . . min min *t t tt k M grid grid el el IDC t t tt t k com com bat bat t tt grid grid grid grid t tt wP P w P P wP P wP P P PP P st P P P P <sup>C</sup>* + − = −+− + −+ − − − ∆ = − ≤∆ ∆ = − ≤∆ = ∑ (15) The microgrid in Figure 1 is taken as an example to demonstrate the proposed twostage energy management method. In the first stage, the day-ahead optimization is performed based on the predicted outpower of WT and PV, the predicted power and hydrogen loads. In the second stage, the intra-day optimization is performed based on the actual data. Without loss of generality, the actual data are assumed to be the sum of predicted data and the forecast error. Assume that the day-ahead forecast errors of wind power, PV, power and hydrogen demands follow standard normal distribution. The standard deviation for the day-ahead forecast errors of wind power, PV, power and hydrogen demands is set as 25%, 20%, 15% and 15% of their day-ahead forecast data, respectively. In fact, the ultra-short-term prediction data of WT, PV, power and hydrogen demands can be predicted by the long short-term memory (LSTM), neural network or other artificial intelligence methods [33]. In this paper, the prediction cycle is 1 h, and the control cycle is 30 min and

ma

day-ahead operation schemes of buying power, electrolyzer, compressor and battery storage. *w*<sup>1</sup> , *w*<sup>2</sup> , *w*<sup>3</sup> and *<sup>w</sup>*<sup>4</sup> are weight factors; they can be optimized based on their

max <sup>∆</sup>*Pcom* and max <sup>∆</sup>*Pbat* are the admissible maximum errors of exchanged power, the power of electrolyzer, the power of compressor and the net charging power of battery storage, respectively. The objective function (15) of the intra-day operation model is to minimize the operation deviation between the intra-day strategies and the day-ahead strategies. The constraints are the operation limitations of each component and the power exchange with the power grid. The decision variables are the operation strategies of each component and the power exchange with the power grid; the decision variable vector is

x

*tt t PP P bat bat c bat d* = − , ˆ*<sup>t</sup> Pgrid* , ˆ*<sup>t</sup> Pel* , ˆ*<sup>t</sup> Pcom* and <sup>ˆ</sup>*<sup>t</sup> Pbat* denote the

max <sup>∆</sup>*Pgrid* , max <sup>∆</sup>*Pel* ,

*t tt P PP grid b s* = − , , ,

 

where

*el el el el*

∆ = − ≤∆

ˆ

significance. In this paper, they are assumed to have equal weights.

*com com com com*

*P PP P*

the receding horizon optimization is performed once per 5 min. Therefore, the intra-day optimization model will be executed 288 times during the 24 h. 24 h. The predicted and actual output power of WT and PV is shown in Figures 4 and 5

,, , *t tt t P PP P grid el com bat* <sup>=</sup> *<sup>x</sup>* . More details about the input and output variables of the

The microgrid in Figure 1 is taken as an example to demonstrate the proposed two-stage energy management method. In the first stage, the day-ahead optimization is performed based on the predicted outpower of WT and PV, the predicted power and hydrogen loads. In the second stage, the intra-day optimization is performed based on the actual data. Without loss of generality, the actual data are assumed to be the sum of predicted data and the forecast error. Assume that the day-ahead forecast errors of wind power, PV, power and hydrogen demands follow standard normal distribution. The standard deviation for the day-ahead forecast errors of wind power, PV, power and hydrogen demands is set as 25%, 20%, 15% and 15% of their day-ahead forecast data, respectively. In fact, the ultra-short-term prediction data of WT, PV, power and hydrogen demands can be predicted by the long short-term memory (LSTM), neural network or other artificial intelligence methods [33]. In this paper, the prediction cycle is 1 h, and the control cycle is 30 min and the receding horizon optimization is performed once per 5 min. Therefore, the intra-day optimization model will be executed 288 times during the

*Energies* **2022**, *15*, x FOR PEER REVIEW 10 of 21

**4. Numerical Analysis** *4.1. Basic Parameter Settings*

two-stage energy management model can be found in Appendix A.

The predicted and actual output power of WT and PV is shown in Figures 4 and 5 [34], respectively. The predicted and actual power load and hydrogen load are illustrated in Figures 6 and 7 [7,34], respectively. Table 1 gives the power prices of the power grid [35]; the buying price is time-of-use price and the feed-in price is fixed price. The other parameters of the micro are given in Table 2 [34,35]. The maximum of the deviations for *P t grid*, *<sup>P</sup>*ˆ*<sup>t</sup> el*, *<sup>P</sup>*ˆ*<sup>t</sup> com* and *P*ˆ*<sup>t</sup> bat* are 200 kW. [34], respectively. The predicted and actual power load and hydrogen load are illustrated in Figures 6 and 7 [7,34], respectively. Table 1 gives the power prices of the power grid [35]; the buying price is time-of-use price and the feed-in price is fixed price. The other parameters of the micro are given in Table 2 [34,35]. The maximum of the deviations for *<sup>t</sup> Pgrid* , ˆ*<sup>t</sup> Pel* , ˆ*<sup>t</sup> Pcom* and <sup>ˆ</sup>*<sup>t</sup> Pbat* are 200 kW.

**Figure 4.** The predicted and actual outpower of WT. **Figure 4.** The predicted and actual outpower of WT.

**Figure 5.** The predicted and actual outpower of PV. **Figure 5.** The predicted and actual outpower of PV.

**Table 1.** Power prices (¥/kWh).


**Figure 6.** The predicted and actual power load.

**Figure 7.** The predicted and actual hydrogen load.

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

**Figure 6.** The predicted and actual power load. **Figure 6.** The predicted and actual power load. **Figure 6.** The predicted and actual power load.

**Figure 5.** The predicted and actual outpower of PV.

**Figure 5.** The predicted and actual outpower of PV.

The predicted PV power The actual PV power

The predicted PV power The actual PV power

*Energies* **2022**, *15*, x FOR PEER REVIEW 11 of 21

0

0

500

5500

500

1000

1000

1500

1500

Power (kW)

Power (kW)

2000

2000

2500

2500

3000

3000

3500

3500

**Figure 7.** The predicted and actual hydrogen load. **Figure 7.** The predicted and actual hydrogen load.

**Figure 7.** The predicted and actual hydrogen load. **Table 2.** The parameters of the WPHS microgrid.


#### *4.2. The Analysis and Discussions of the Simulation Results*

Figures 8–11 show the day-ahead schemes and the intra-day operation strategies of buying or selling power, charging and discharging power of battery storage, electrolyzer and compressor, respectively. Figures 12 and 13 illustrate the storage states of battery storage and hydrogen tank, respectively.

**Time Slots Buying Price Selling Price**

*BS* 5700 kWh max ∆*Pgrid* 200 kW

*BS* 600 kWh max ∆*Pel* 100 kW

*BS* <sup>=</sup> 600 kWh max ∆*Pcom* 10 kW

max *m*<sup>H</sup> 1000 kg max *<sup>P</sup>*bat,c 2100 kW max <sup>∆</sup>*Pbat* 200 kW

01:00–07:00, 23:00–24:00 0.3376 0.4 12:00–14:00, 19:00–22:00 0.8654 0.4 08:00–11:00, 15:00–18:00 0.5980 0.4

Figures 8–11 show the day-ahead schemes and the intra-day operation strategies of buying or selling power, charging and discharging power of battery storage, electrolyzer and compressor, respectively. Figures 12 and 13 illustrate the storage states of battery

*com* 0.7 max

min *m*<sup>H</sup> 0 kg *<sup>t</sup>* <sup>0</sup>

*T*in 40 °C max *Pcom* 500 kW max *<sup>P</sup>*bat,d 2400 kW

**Figure 8.** The exchanged power with power grid. **Figure 8.** The exchanged power with power grid.

3000

**Table 1.** Power prices (¥/kWh).

H2 η

max *Pgrid*

0.0192

**Table 2.** The parameters of the WPHS microgrid.

H2 *<sup>R</sup>* 14.304 <sup>2</sup>

storage and hydrogen tank, respectively.

6000 kW <sup>2</sup>

η

max *<sup>P</sup>*el 5000 kW *κ* 1.4 min

*4.2. The Analysis and Discussions of the Simulation Results*

**Figure 9.** The charging and discharging power of battery storage. **Figure 9.** The charging and discharging power of battery storage. **Figure 9.** The charging and discharging power of battery storage.

Time(h)

Day-ahead scheme

Day-ahead scheme

Receding horizon optimization strategy

Receding horizon optimization strategy

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

**Figure 10.** The power of electrolyzer. **Figure 10.** The power of electrolyzer. **Figure 10.** The power of electrolyzer.

**Figure 11.** The power of compressor.

**Figure 11.** The power of compressor.

0

0

50

50

100

100

The power of compressor (kW)

The power of compressor (kW)

150

150

200

200

250

250

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

**Figure 9.** The charging and discharging power of battery storage.

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

Day-ahead scheme

Receding horizon optimization strategy

**Figure 11.** The power of compressor. **Figure 11.** The power of compressor.

6000

**Figure 10.** The power of electrolyzer.


0

1000

2000

The power of electrolyzer (kW)

3000

4000

5000


The charging or discharging power

of battery storage (kW)

1000

2000

3000

Day-ahead scheme

Receding horizon optimization strategy

0

**Figure 12.** The storage state of battery storage. **Figure 12.** The storage state of battery storage. **Figure 12.** The storage state of battery storage.

Time(h)

**Figure 13.** The storage state of hydrogen tank. **Figure 13.** The storage state of hydrogen tank. **Figure 13.** The storage state of hydrogen tank.

4.2.1. The Day-Ahead Simulation Results

4.2.1. The Day-Ahead Simulation Results

4.2.2. The Intra-Day Simulation Results

4.2.2. The Intra-Day Simulation Results

operation.

operation.

buys more electricity from the power grid during the valley periods and flat periods than the peak periods. This is because the buying power price is low during the valley and flat periods; in order to reduce the operation cost, the microgrid buys more electricity to meet the demands of power loads, produce hydrogen or charge the batteries. During the peak periods, the required power of the WPHS microgrid is mainly met by the battery storage, the WT and PV. In addition, it can be seen from Figures 10, 11 and 13 that the hydrogen is produced and stored in the tank during the valley periods, and the tank discharges hydrogen during the flat and peak periods to satisfy hydrogen demand. Figures 9 and 12 Figure 9; Figure 12 show that the battery storage mainly stores the electricity during the valley or flat periods and discharges power during the peak periods to reduce the operation cost. Therefore, the day-ahead optimization can effectively coordinate the operation of the WT, PV, battery storage and power-to-hydrogen subsystems, and realize high-efficiency

the peak periods. This is because the buying power price is low during the valley and flat periods; in order to reduce the operation cost, the microgrid buys more electricity to meet the demands of power loads, produce hydrogen or charge the batteries. During the peak periods, the required power of the WPHS microgrid is mainly met by the battery storage, the WT and PV. In addition, it can be seen from Figures 10, 11 and 13 that the hydrogen is produced and stored in the tank during the valley periods, and the tank discharges hydrogen during the flat and peak periods to satisfy hydrogen demand. Figures 9 and 12 Figure 9; Figure 12 show that the battery storage mainly stores the electricity during the valley or flat periods and discharges power during the peak periods to reduce the operation cost. Therefore, the day-ahead optimization can effectively coordinate the operation of the WT, PV, battery storage and power-to-hydrogen subsystems, and realize high-efficiency

#### 4.2.1. The Day-Ahead Simulation Results

The simulation results of Figures 8 and 9 show that the sustainable WPHS microgrid buys more electricity from the power grid during the valley periods and flat periods than the peak periods. This is because the buying power price is low during the valley and flat periods; in order to reduce the operation cost, the microgrid buys more electricity to meet the demands of power loads, produce hydrogen or charge the batteries. During the peak periods, the required power of the WPHS microgrid is mainly met by the battery storage, the WT and PV. In addition, it can be seen from Figures 10, 11 and 13 that the hydrogen is produced and stored in the tank during the valley periods, and the tank discharges hydrogen during the flat and peak periods to satisfy hydrogen demand. Figures 9 and 12 show that the battery storage mainly stores the electricity during the valley or flat periods and discharges power during the peak periods to reduce the operation cost. Therefore, the day-ahead optimization can effectively coordinate the operation of the WT, PV, battery storage and power-to-hydrogen subsystems, and realize high-efficiency operation.

#### 4.2.2. The Intra-Day Simulation Results

Figures 8–13 show that the intra-day operation strategies are effective in tracing the day-ahead operation schemes and eliminating the effects of the volatility of renewable energies, power and hydrogen loads. Furthermore, the intra-day operation strategies of battery storage and hydrogen tank can completely trace their day-ahead states. The maximum deviations of exchanged power, the power of electrolyzer, the power of compressor and the power of battery storage are 199.45 kW, 81.34 kW, 3.48 kW and 191.62 kW, respectively. They all satisfy their maximum error constraints. Therefore, the intra-day optimization model is able to improve the operation stability of the WPHS microgrid and eliminate the adverse influence of the fluctuations of WT, PV, power and hydrogen demands.

#### 4.2.3. The Simulation Results of WPHS Microgrid without Battery Storage

In this section, the sustainable WPHS microgrid in Figure 1 without battery storage is taken as the comparative microgrid (WPH microgrid) to demonstrate the roles of battery storages. Figures 14–17 illustrate the day-ahead schemes and the intra-day operation strategies of buying or selling power, electrolyzer and compressor, respectively. Figure 17 illustrates the storage states of hydrogen tank. It can be seen that the proposed two-stage energy management model is robust and effective in coordinating the operation of the sustainable WPH microgrid, and intra-day receding horizon optimization strategies can effectively trace the day-ahead schemes. The operation costs for the microgrid with and without battery storage are 27,727 CNY and 31,815 CNY, respectively. The battery storage can reduce the operation cost dramatically by 12.85%. Furthermore, the maximum of the deviation of the receding horizon optimization strategy and the day-ahead scheme is 202.0123 kW and 231.5762 kW for the microgrid with and without battery storage, respectively. This deviation is reduced by 12.77% when the battery storage is considered. Therefore, the battery storage can also alleviate the fluctuations of the exchanged power with power grid and improve the performance of the intra-day optimization model.

**Remark 1.** *Though other methods, such as the scenario-based stochastic programming method and robust optimization [36], can also tackle the uncertainties, the former needs the probability distribution of uncertain factors and a huge number of scenario simulations, which may be a heavy burden. While the robust optimization can incorporate the uncertainties with a range without underlying probability distributions, and the optimal solutions in the worst case can be obtained, however, these solutions are very conservative [36]. The two-stage energy management method needs neither probability distribution nor huge scenario simulations; the robust solutions can be obtained based on the updated predicted data.*

hydrogen demands.

optimization model.

5000

Figures 8–13 show that the intra-day operation strategies are effective in tracing the day-ahead operation schemes and eliminating the effects of the volatility of renewable energies, power and hydrogen loads. Furthermore, the intra-day operation strategies of battery storage and hydrogen tank can completely trace their day-ahead states. The maximum deviations of exchanged power, the power of electrolyzer, the power of compressor and the power of battery storage are 199.45 kW, 81.34 kW, 3.48 kW and 191.62 kW, respectively. They all satisfy their maximum error constraints. Therefore, the intra-day optimization model is able to improve the operation stability of the WPHS microgrid and eliminate the adverse influence of the fluctuations of WT, PV, power and

In this section, the sustainable WPHS microgrid in Figure 1 without battery storage is taken as the comparative microgrid (WPH microgrid) to demonstrate the roles of battery storages. Figures 14–17 illustrate the day-ahead schemes and the intra-day operation strategies of buying or selling power, electrolyzer and compressor, respectively. Figure 17 illustrates the storage states of hydrogen tank. It can be seen that the proposed two-stage energy management model is robust and effective in coordinating the operation of the sustainable WPH microgrid, and intra-day receding horizon optimization strategies can effectively trace the day-ahead schemes. The operation costs for the microgrid with and without battery storage are 27,727 CNY and 31,815 CNY, respectively. The battery storage can reduce the operation cost dramatically by 12.85%. Furthermore, the maximum of the deviation of the receding horizon optimization strategy and the day-ahead scheme is 202.0123 kW and 231.5762 kW for the microgrid with and without battery storage, respectively. This deviation is reduced by 12.77% when the battery storage is considered. Therefore, the battery storage can also alleviate the fluctuations of the exchanged power with power grid and improve the performance of the intra-day

4.2.3. The Simulation Results of WPHS Microgrid without Battery Storage

**Figure 14.** The exchanged power with power grid of WPH microgrid. **Figure 14.** The exchanged power with power grid of WPH microgrid.

**Figure 15.** The power of electrolyzer of WPH microgrid. **Figure 15.** The power of electrolyzer of WPH microgrid. **Figure 15.** The power of electrolyzer of WPH microgrid.

**Figure 16.** The power of compressor of WPH microgrid. **Figure 16.** The power of compressor of WPH microgrid. **Figure 16.** The power of compressor of WPH microgrid.

Day-ahead scheme Receding horizon optimization

Day-ahead scheme Receding horizon optimization

strategy

strategy

**Figure 17.** The storage state of hydrogen tank of WPH microgrid.

**Figure 17.** The storage state of hydrogen tank of WPH microgrid.

100

100

150

150

200

200

250

250

The stored hydrogen (kg)

The stored hydrogen (kg)

300

300

350

350

400

400

450

450

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

**Figure 15.** The power of electrolyzer of WPH microgrid.



0

50

The power of compressor (kW)

100

150

200

250

1000

The power of electrolyzer (kW)

2000

3000

4000

5000

0

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Time(h)

> Day-ahead scheme Receding horizon optimization

strategy

Day-ahead scheme Receding horizon optimization

strategy

**Figure 16.** The power of compressor of WPH microgrid.

**Figure 17.** The storage state of hydrogen tank of WPH microgrid. **Figure 17.** The storage state of hydrogen tank of WPH microgrid.

#### **5. Conclusions**

A two-stage energy management model is proposed for the sustainable wind-PVhydrogen-storage microgrid based on receding horizon optimization. In the first stage, the day-ahead optimization is performed based on the predicted outpower of WT and PV, the predicted demands of power and hydrogen loads. In the second stage, the intraday optimization is performed based on the actual data to trace the day-ahead operation schemes. The following conclusions are drawn.


Furthermore, in the future work, more accurate models of each component, including consideration of the startup cost and ramp time of the green hydrogen system will be considered. The demand side management issue is another interesting topic, which can be integrated in the two-stage energy management model. The mean efficiency of the whole process of the system can also be discussed and analyzed in the future work.

**Author Contributions:** Conceptualization, W.P.; methodology, H.X.; investigation, T.M. and J.W.; resources, D.L.; writing—original draft preparation, J.W. and T.M.; writing—review and editing, X.L.; supervision, X.M.; project administration, J.Z.; funding acquisition, J.W. All authors have read and agreed to the published version of the manuscript.

**Funding:** This research was funded by the Science and Technology Project of State Grid JILIN Electric Power Supply Company (NO. B7234220002J).

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Not applicable.

**Conflicts of Interest:** The authors declare no conflict of interest.

#### **Abbreviations**


#### **Appendix A**

Take the exchanged power with power grid, the power of electrolyzer, the power of compressor, the charging/discharging power of battery storage, the power storage state of battery storage and the hydrogen storage state of hydrogen tank to constitute state vector *x*(*k*) = - *Pgrid*(*k*) *Pel*(*k*) *Pcom*(*k*) *Pbat*(*k*) *Ebat*(*k*) *M*H<sup>2</sup> (*k*) T ; take the increment power of electrolyzer, the increment power of compressor and the increment charging/discharging power of battery storage to constitute the control variables *u*(*k*) = - ∆*Pel*(*k*) ∆*Pcom*(*k*) ∆*Pbat*(*k*) *T* ; take the increment power of the ultra-shortterm predicted power of wind turbine, PV, power load and hydrogen load as disturbance input vector *r*(*k*) = - ∆*PWT*(*k*) ∆*PPV*(*k*) ∆*Pload*(*k*) ∆*LH*<sup>2</sup> (*k*) *T* ; take the exchanged power with power grid, the power of electrolyzer, the power of compressor and the charging/discharging power of battery storage as the output variable vector *y*(*k*) = - *Pgrid*(*k*) *Pel*(*k*) *Pcom*(*k*) *Pbat*(*k*) T ; then the multi-input and multi-output state space model can be formulated in the following matrix form [34]:

*x*(*k* + ∆*t*) = *Pgrid*(*k* + ∆*t*) *Pel*(*k* + ∆*t*) *Pcom*(*k* + ∆*t*) *Pbat*(*k* + ∆*t*) *Ebat*(*k* + ∆*t*) *M*H<sup>2</sup> (*k* + ∆*t*) = 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 *Pgrid*(*k*) *Pel*(*k*) *Pcom*(*k*) *Pbat*(*k*) *Ebat*(*k*) *M*H<sup>2</sup> (*k*) + −1 −1 −1 1 0 0 0 1 0 0 0 1 0 0 *ηbs η*H<sup>2</sup> 0 0 ∆*Pel*(*k*) ∆*Pcom*(*k* ∆*Pbat*(*k*) + 1 1 −1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 −1 ∆*PWT*(*k*) ∆*PPV*(*k*) ∆*Pload*(*k*) ∆*LH*<sup>2</sup> (*k*) (A1) *y*(*k*) = *Pgrid*(*k*) *Pel*(*k*) *Pcom*(*k*) *Pbat*(*k*) = 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 *Pgrid*(*k*) *Pel*(*k*) *Pcom*(*k*) *Pbat*(*k*) *Ebat*(*k*) *M*H<sup>2</sup> (*k*) (A2)

#### **References**

