Besides, after nonlinear treatment by DNN, the process optimization design of adsorption and separation can be carried out. For example, Ref. [9] predicts and optimizes CO2 adsorption capacity, selectivity and adsorption heat through DNN and multiobjective optimization algorithm. It is worth noting that the selectivity at a fixed temperature calculated by extended Langmuir is a constant value, and the selectivity value does not change with adsorption pressure and mole fraction. Obviously, the calculation error of extended Langmuir is large. Ref. [10] points out that the IAST gives the most accurate predictions than the extended Langmuir and LRC for three binary systems. Therefore, more and more researchers use IAST to develop corresponding application programming interfaces (APIs) for calculating selectivity, such as pyIAST, pyGAPS and GraphIAST [11].

Compared with IAST, another advantage is that the DNN does not need to solve the integral solutions of different isotherm models. Actually, the DNN proposed in this paper can calculate the selectivity of any two-component gas, such as CO2/CH4, CH4/H2, etc. When the input parameters of DNN exceed the lower and upper boundaries of training data, the predicted results may deviate from the IAST theoretical calculations. The robustness of the DNN can be enhanced by increasing the dimension of input parameters and adjusting the structure of the DNN, which is not the focus of this paper. The DNN

**Fig. 2.** Adsorption isotherms of CO2 and H2 on CuBTC and AC at 298K on NIST/ARPA-E (equilibrium data from Ref. [12]).

**Fig. 3.** Extended Langmuir, IAST and DNN calculated selectivities of activated carbon and CuBTC for a 20:80 CO2/H2 mixture at different pressure (a) and a 10 atm CO2/H2 mixture at a different molar fraction of CO2 (b).

model is a new attempt at calculating selectivity and can improve the efficiency of adsorbent screening. In addition, the DNN model can also be extended to the calculation of adsorption selectivity of multi-component gases to optimize the design of layered beds with multi-adsorbent.

## **4 Conclusion**

The deep neural network model constructed in this paper can quickly predict the adsorption selectivity of CO2/H2. The results show that the correlation coefficient of the DNN model for the whole data set can reach 0.99948. In addition, by combining with NIST/ARPA-E Database, this paper takes activated carbon and CuBTC as examples to compare the adsorption selectivity of the two adsorbents under different pressures and CO2 molar fraction at the same temperature. The results show that the adsorption selectivity of CuBTC is greater than that of activated carbon, so CuBTC is more suitable for H2 purification and CO2 storage than activated carbon.

**Acknowledgments.** This research is funded by the and the Shuguang Project of Knowledge Innovation Program from the Wuhan Science and Technology Bureau<PHONE_NUMBER>020432,<PHONE_NUMBER>020479) and the National Natural Science Foundation of China (52176191). The authors' team is partially supported by the Innovative Research Team Development Program of the Ministry of Education of China (IRT\_17R83). Thanks to the International Network Programme supported by the Danish Agency for Higher Education and Science for the PRESS project "Proactive Energy Management Systems for Power-to-Heat and Powerto- Gas Solutions" (No. 8073-00026B).

## **References**

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Scheduling of Renewable Energy Hydrogen Production System Based on Two—Stage Distribution Robust Optimization**

Luohui Xia1, Bin Wu2, Linwei Zhou3(B) , Tao Liang2, and Zicong Liu2

1 Science and Technology Innovation Research Academy (Hebei), CAICT Institute Co., Ltd., Baoding 071000, Hebei, China

2 School of Artificial Intelligence, Hebei University of Technology, Tianjin 300130, China

3 Baoding National High-tech Industrial Development Zone Administrative Committee,

Baoding 071000, Hebei, China

<EMAIL_ADDRESS>
**Abstract.** Hydrogen energy has various advantages such as cleanliness, storage and high energy carrier, which is considered to be one of the key paths to achieve the goal of "double carbon". Utilization of hydrogen production in renewable energy is an important technical means to achieve new energy amazing and energy cleaning utilization. In response to the uncertainty characteristics of local scenery resources and local electricity load and hydrogen load demand, considering the investment cost of hydrogen storage system and the influence of flexible load of electric load on the optimal operation of the system, a two-stage distributed robust optimization model for hydrogen production system (H2-RES) from renewable energy is established, the capacity of the first stage hydrogen production system is determined by the system economy, and the second stage is designed to optimize the real-time scheduling of the system, aiming at the total operating cost, which is solved by C&CG algorithm, finally, an example is given to verify the validity of the proposed model.

**Keywords:** Renewable energy · Hydrogen production · Two stage robust · Optimal configuration · Operation optimization

## **1 Introduction**

With the "carbon peak-carbon neutral" goal proposed, power, transportation, and production links to speed up the transition to a deep low-carbon clean, hydrogen energy as an important clean energy, several developed countries have promoted the development of hydrogen energy industry as a national strategy. China also plans to include hydrogen energy in the energy category [1]. And from the central to the local issued a number of renewable energy to promote the development of hydrogen and hydrogen vehicles [2, 3]. Now, during the Beijing Winter Olympic Games, hydrogen energy has been fully demonstrated in this Beijing Winter Olympic Games, including more than 1,000 hydrogen-powered vehicles, equipped with more than 30 hydrogen refueling stations, in order to ensure the demand for hydrogen energy for the Winter Olympic Games, construction of large-scale hydrogen production projects in Zhangjiakou and other places. From the perspective of hydrogen demand, hydrogen-powered vehicles are more suitable for the "three north" winter low-temperature environment than electric vehicles because of their fast hydrogenation speed, long range and environmental friendliness, in recent years, it has gained wide attention and developed rapidly [4]. Hydrogen stations will also proliferate in the future, as they are a prerequisite for the rapid development of hydrogen-powered cars. The integration of renewable energy hydrogen production and power generation into the grid will not only enable new energy consumption and promote green energy development, but also be in line with the current situation of the Zhangjiakou region's energy supply for the Beijing Winter Olympic Games. Therefore, hydrogen production system based on renewable energy and supported by DC microgrid will be the best way to achieve low-carbon environmental protection, and zero-carbon power plus hydrogen energy is the only way to optimize the energy structure in the future [5], this has also become the current hot spot of scholars.

Literature [6] optimizes the operation of the comprehensive energy system of the hydrogen production unit containing wind power, which can meet the needs of electricity, hydrogen and heat at the same time. Reference [7] established a two-tier model for configuration optimization of grid connected offshore wind power hydrogen energy system, and studied the configuration and economy of the system by means of net present value. Literature [8] designed a hybrid new energy system including wind power, photovoltaic and hydrogen energy storage, and used the objective fitness function to model, and achieved good capacity optimization results Literature [9] designed the hydrogen energy storage system with heat balance system, established the wind hydrogen hybrid system, and proposed the optimal allocation method of hydrogen energy storage capacity of wind hydrogen hybrid system considering the uncertainty of heat balance. The above research optimizes the static capacity configuration of the integrated energy system containing hydrogen energy, and there is no subsequent dynamic optimization of the static configuration.

Literature [10] cooperates with three main body of the scene, based on the Nash negotiation theory, the operation model is established. Finally, through example verification, the operational operation of the proposed cooperative operation can be greatly improved. And the overall benefits of the cooperation alliance. Literature [11] is optimized by hydrogen energy-natural gas multi-energy storage systems, and the economics and environmental protection of electric hydrogen and electricity gas are verified. Literature [12] constructed the optimal scheduling model of wind hydrogen system with the optimization objective of hydrogen production efficiency, solved the optimal hydrogen production power by using artificial bee colony algorithm, and verified the effectiveness of the proposed method through simulation analysis. Literature [13] established the optimal scheduling model of integrated energy system with hydrogen production system with the goal of minimizing operation cost and environmental cost, and solved the optimal daily operation scheduling scheme of the system by using NSGA-II algorithm., Literature [14] proposed a low-carbon operation method of integrated energy system considering electrothermal flexible load and fine modeling of hydrogen energy. The static capacity configuration of hydrogen production equipment is not considered in the above literature.

Literature [15] established an island microgrid model including hydrogen production system and cogeneration, used robust optimization method to deal with the uncertainty related to photovoltaic output, electric load and heat load demand, and verified the effectiveness of the robust optimization used to deal with relevant risks, but static configuration optimization was not considered in the system. Literature [16] is electrically and hydrogen into the energy carrier, and a double-layer mixed integer planning model is proposed. The upper layer model is intended to improve system economy, optimize the device configuration to meet regional energy demand; The lower layer model aims to minimize the average cost of hydrogen production in order to promote the development of hydrogen. Among them, in the upper equipment capacity configuration, the economy of the system is the goal to determine whether the equipment is put into construction, rather than determining the equipment to be put into construction first and then optimizing the optimal capacity. Literature [17] uses a two-stage distributed robust optimization model to deal with the uncertainty of load. In the first stage, it optimizes the equipment safety capacity and time in the integrated energy system. In the second stage, it mainly optimizes and determines the "worst" operation scenario that the integrated energy system may encounter in the future and optimizes the system operation scheduling. Literature [18] For the renewable energy area integrated energy system to improve economic and scheduling flexibility, a double robust game model is proposed, and multi-target whale optimization algorithm is used to address constraint complex mixing integers nonlinear planning issues, verify the feasibility of the model and the effectiveness of the algorithm of the model by case analysis. The system in the above two documents did not consider hydrogen energy. Based on this, aiming at the uncertain load and renewable energy output, a two-stage distributed robust optimization model based onH2-RES system is established. Firstly, the capacity of hydrogen production system is statically optimized, and then the dynamic operation of the system is scheduling optimized.

During the operating scheduling of theH2-RES system, the flexible load of the electric load can be changed by changing its own size and time period, and further optimizing the smooth load curve to improve the operational flexibility and economic benefits ofH2- RES.Literature [19] For the problem of low-carbon economy optimization operation in the integrated energy system of hydrogen energy to energy conversion medium, the impact of flexible load on adjustment system optimization operation, and established flexible load model. Literature [20] established IES two-stage distribution robust optimization scheduling model considering flexible loads, verifying that flexible loads can improve the economic benefits of the IES system operation.

Based on the existing literature, this paper takes the hydrogen production system from renewable energy sources as the research object. Firstly, the capacity of the hydrogen production system is optimized for the uncertainty of renewable energy sources and the local electric load and hydrogen load. After the static configuration optimization, the daily operation scheduling of the hydrogen production system from renewable energy sources is optimized. For the uncertainty of renewable energy, considering the investment cost of hydrogen production system and the impact of the flexible load of electric load participating in the electric load regulation on the optimal operation of the system. A two-stage distributed robust optimization model of hydrogen production system from renewable energy driven by the worst scenario is constructed and applied to practical engineering projects, which has good feasibility.

The structure of the remainder of this paper is as follows. Section 2 introduce the structure and model of renewable energy hydrogen production system, Sects. 3 and 4 respectively introduce the objective function and model of static configuration and dynamic scheduling of the system, Sects. 5 and 6 respectively introduce the two-stage robust programming model and its solution method of the system, and Sect. 7 introduces the case analysis of the method proposed in this paper.

## **2 H2-RES Structure and Model**

Figure 1 shows the complete structure diagram of renewable energy hydrogen production system. It mainly includes fan, photovoltaic, storage battery, power grid, alkaline water electrolyzer, hydrogen compressor, hydrogen storage tank, etc. Part of the fans and photovoltaic power generation is used for residential power load, and the other part is used for hydrogen load of hydrogen fuel vehicles. The hydrogen produced by the electrolytic cell is compressed by the hydrogen compressor and then sent to the hydrogen storage tank. The compressed hydrogen gas is transported to the hydrogenation station through the hydrogen long pipe trailer to supply the hydrogen demand of hydrogen fuel vehicles. The battery in the system plays a buffer role. When the available energy is insufficient, it is discharged through the battery first. If the electric load and hydrogen load are still not met, it is necessary to purchase electricity from the power grid. When there is still electricity left after the electricity load and hydrogen load can be met by generating electricity from renewable energy, the battery can be charged or sold to the power grid according to the actual situation. In order to deal with the uncertainty of wind and solar output, the worst scenario driven distributed robust method is used to optimize the system. In terms of power load demand, flexible load is considered in this paper.

**Fig. 1.** H2-RES structure

## **3 The H2-RES Capacity Configuration Phase**

The capacity configuration stage of H2-RES is mainly to configure the optimal capacity of electrolytic cell, hydrogen compressor and hydrogen storage tank in the hydrogen production system. The goal is to minimize the daily average investment cost on the premise that the system can operate normally under all the worst probability scenarios:

$$
\min F\_1 = \frac{\rho\_{ED}\mathcal{M}\_{ED} + \rho\_{HC}\mathcal{M}\_{HC} + \rho\_{HS}\mathcal{M}\_{HS}}{N} \tag{1}
$$

In the formula, ρED represents the unit capacity investment cost of the electrolyzer, ρHC represents the unit capacity investment cost of the hydrogen compressor, ρHS represents the unit capacity investment cost of the hydrogen storage tank; MED, MHC, MHS represents the capacity of the electrolyzer cell, hydrogen compressor and hydrogen storage tank respectively, and N represents the total number of days in a year, taking 365 days.

The upper and lower limits of the capacity of the electrolyzer, hydrogen compressor and hydrogen storage tank are as follows:

$$0 \le M\_{ED} \le M\_{ED, \max} \tag{2}$$

$$0 \le M\_{HC} \le M\_{HC, \max} \tag{3}$$

$$0 \le M\_{HS} \le M\_{HS,max} \tag{4}$$

MED,max, MHC,max, MHS,max represents the maximum capacity of the electrolyzer, hydrogen compressor, and hydrogen storage tank, respectively.

## **4 The H2-RES Optimal Scheduling Phase**

After determining the optimal capacity configuration of the hydrogen production system in the first stage, the next stage is to optimize the operation and scheduling of the hydrogen production system from renewable energy based on the optimal capacity of the hydrogen production system determined in the first stage. In view of the characteristics of difficult prediction and strong randomness of fan and photovoltaic output, the "worst" operation scenario that may be encountered by the microgrid is considered and the economy of its operation is estimated, and the flexible load in the electric load is considered to improve the economy of the system.

### **4.1 Flexible Electrical Load Model**

The electrical load in the hydrogen production system of renewable energy includes flexible electrical load and rigid electrical load. The flexible electrical load is mainly used to regulate the overall load curve of the system and improve the overall energy consumption level of the system on the premise of meeting the basic rigid electrical load of the system. In order to tap the scheduling potential of flexible electric load and improve the economy of the system, two flexible load mathematical models are established, namely transferable and reducible flexible load.

#### **4.1.1 Transferable Electric Load Model**

The load can be transferred according to the real-time electricity price, the user carries on the transfer to some non-essential time period load, for example washing machine, water heater and so on. And the working hours of the transferable load and the size of the transfer time have no time continuity constraints, and have higher flexibility, the total power of the pre-and post-dispatch transferable loads must satisfy uniform invariance on the transferable interval [tstart, tend].

$$\sum\_{t=1}^{T} F\_{t}^{tr} \Delta t = \sum\_{t=t\_{\text{start}}}^{t\_{\text{end}}} P\_{t}^{tr} \Delta t \tag{5}$$

$$b\_{l}^{tr}P\_{min}^{tr} \le P\_{l}^{tr} \le b\_{l}^{tr}P\_{max}^{tr} \tag{6}$$

In the formula: Ftr t and Ptr t denote the power of the transferable electric load at t time before and after the transfer respectively, Ptr min and Ptr max denote the transferable minimum electric load and the transferable maximum electric load respectively, btr t is the 0-1 variable, which represents the transition state of the transferable electrical load t period and btr t = 1 means that the electric transfer load occurs during the time period.

When electric load transfer, the user is transfer compensation adjustment

$$C\_{tr} = r\_{tr} \sum\_{t=1}^{T} b\_t^{tr} P\_t^{tr} \tag{7}$$

In the formula: rtr represents the unit compensation price of the transferable electric load.

#### **4.1.2 Reduction of Electric Load Model**

Reducible electric load refers to a certain reduction of load power within the allowable range without changing the purpose of users' power consumption, which alleviates the tension of energy consumption. The reducible load in each period after dispatching can be expressed as:

$$\mathbf{P\_t^{cu}} = (\mathbf{l} - \mathbf{b\_t^{cu}} \varepsilon\_t) \mathbf{F\_t^{cu}} \tag{8}$$

In the formula: Fcu t and Pcu t for t time can reduce the electrical load before and after the reduction of electrical load power, bcu t for 0-1 variables, that can reduce the electrical load cut state, the load can be reduced by t when bcu t is equal to 1, εt represents the reduction of the load at t time, 0 εt - 1, when εt = 1 represents the complete reduction of the load.

$$\mathbf{C}\_{\rm cu} = \mathbf{r}\_{\rm cu} \sum\_{\rm t=1}^{\rm T} \mathbf{b}\_{\rm t}^{\rm cu} \left( \mathbf{P}\_{\rm t}^{\rm cu} - \mathbf{F}\_{\rm t}^{\rm cu} \right) \tag{9}$$

In the formula: rcu represents the unit power compensation cost that can reduce the electrical load.

#### **4.2 Objective Function**

The optimization objective of the second stage is to minimize the total cost under the operation of the hydrogen production system with renewable energy, and finally determine the start-up and shutdown plan of each unit, the power generation capacity, the charge and discharge plan of the energy storage system, and the power purchase and sales plan for trading with the power grid. The total cost includes the power purchase and sale expenses with the power grid, the flexible power load dispatching compensation cost of the microgrid, and the operation and maintenance expenses of the battery and hydrogen production system.

$$
\min F\_2 = C\_{grid} + C\_{dr} + C\_{op} \tag{10}
$$

In the formula: Cgrid, Cdr, Cop represents the transaction costs between the power grid, flexible load compensation costs, the operation and maintenance costs of equipment.

(1) transaction cost between system and power grid

Transaction costs between the system and the grid include the purchase of electricity to the grid and the sale of electricity to the grid

$$C\_{grid} = \sum\_{t=1}^{T} l\_t^{buy} P\_t^{buy} - l\_t^{sell} P\_t^{sell} \tag{11}$$

In the formula: lbuy t represents the purchase price of t time Grid, lsell t represents the sale price of t time grid, Pbuy t , Pbuy t represents the purchase and sale power of t time system.

(2) flexible electric load dispatch compensation cost

The flexible power load dispatching compensation cost mainly includes the power load compensation cost which can be reduced and the power load compensation cost which can be transferred:

$$\mathbf{C}\_{dr} = \mathbf{C}\_{tr} + \mathbf{C}\_{cu} \tag{12}$$

In the formula: Ctr, Ccu respectively represents the transferable electric power compensation cost and can reduce the electric power compensation cost, its specific mathematical model is shown in the formula (7) and formula (9).

(3) system equipment operation and maintenance costs

System equipment operation and maintenance costs mainly include the main components of the system operation and maintenance costs. The main components of the hydrogen production system are based on the unit power consumption, and the storage battery is based on the charge/discharge capacity. The model is as follows:

$$C\_{OP} = C\_{OP}^{EH} + C\_{OP}^{BAT} \tag{13}$$

$$\mathbf{C}\_{\rm OP}^{\rm EH} = \sum\_{t=1}^{T} \mathbf{r}\_{\rm OP}^{\rm EH} (\mathbf{P}\_{\rm t}^{\rm ED} + \mathbf{P}\_{\rm t}^{\rm HC}) \tag{14}$$

$$\mathbf{C}\_{\rm OP}^{\rm BAT} = \sum\_{t=1}^{T} \mathbf{r}\_{\rm OP}^{\rm BAT} (\mathbf{P}\_{\rm t}^{\rm BATC} + \mathbf{P}\_{\rm t}^{\rm BATD}) \tag{15}$$

In the formula: CEH OP, CBAT OP represents the operation and maintenance cost of hydrogen production equipment and storage battery respectively; rEH OP, rBAT OP represents the unit operation and maintenance cost of hydrogen production system and storage battery respectively; PED t , PHC t represents the consumption power of electrolyzer and hydrogen press at time t, PBATC t , PBATD t represents the charge and discharge power of battery at time t.

#### **4.3 Constraints**

The constraints of the optimal scheduling model ofH2-RES mainly include power balance constraints, power storage equipment constraints and hydrogen production system constraints.

(1) Power balance constraint

$$\begin{aligned} P\_l^{WD} + P\_l^{PV} + P\_l^{BATD} + P\_l^{BUY} &= P\_l^{EL} + P\_l^{tr} + P\_l^{cu} + P\_l^{BATC} \\ &+ P\_l^{ED} + P\_l^{HC} + P\_l^{SELL} \end{aligned} \tag{16}$$

In the formula: PWD t , PPV t represents the fan output power and photovoltaic output power at time t respectively; PBATC t , PBATD t represents the battery charge/discharge power at time t respectively; PBUY t , PSELL t indicates the purchasing power and selling power between the hydrogen production system and the power grid at time t, PEL t , Ptr t , Pcu t represents the rigid electric load at time t, the transferable electric load and the reduced electric load respectively, and PED t , PHC t represents the consumed electric power of the electrolyzer and the hydrogen compressor at time t.

(2) Constraint of storage equipment

$$\begin{cases} E\_1 = \eta\_0 E\_{BAT} + \eta\_{ch} P\_l^{BATC} - \frac{P\_l^{BATP}}{\eta\_{dh}}\\ E\_k = E\_{k-1} + \eta\_{ch} P\_k^{BATP} - \frac{P\_l^{BATP}}{\eta\_{dh}}, 2 \le k \le 24\\ \eta\_{\min} E\_{BAT} \le E\_l \le \eta\_{\max} E\_{BAT}, 1 \le t \le 24\\ 0 \le P\_l^{BATP} \le I\_l^{ch} P\_{\max}^{BATP}\\ 0 \le P\_l^{BATP} \le I\_l^{dis} P\_{\max}^{BATP}\\ 0 \le I\_l^{ch} + I\_l^{dis} \le 1\\ \sum\_{t=1}^T \eta\_{ch} P\_l^{BATP} \Delta t - \sum\_{t=1}^T \frac{P\_l^{BATP}}{\eta\_{dh}} \Delta t = 0\\ E\_T = \eta\_0 E\_{BAT} \end{cases} (17)$$

In the formula, E1, Et denote the capacity of the battery in the first time period and t the t time period battery capacity, EBAT denote the total capacity of the battery, ET denote the capacity of the battery in the last time period of a dispatch period, η0, ηmin, ηmax represents the ratio coefficient of initial capacity, the minimum energy storage coefficient and the maximum energy storage coefficient, ηch, ηdis represents the efficiency of charge/discharge energy, Ich t , Idis t represent the Battery t time charge and discharge energy mark bit 0-1 variable.

#### (3) Constraints of hydrogen production system

The hydrogen production system consists of an electrolytic cell, a Hydrogen compressor, and a hydrogen storage tank.

### ➀ Electrolytic cell model

At present, the most commonly used electrolyzer in industrial production is alkaline water electrolyzer, which has fast reaction speed and mature technology. The hydrogen production efficiency of the electrolyzer and the power of the electrolyzer can be regarded as a linear relationship under stable operation [21]. The unit hydrogen production rate is assumed to be ηH2 , kg/(kW h),The hydrogen yield mH2 t at t time is the product of the hydrogen yield ηH2 and the power PED t input to the cell [22]:

$$m\_t^{H\_2} = \eta\_{H\_2} P\_t^{ED} \tag{18}$$

The electrolyzer shall meet the minimum safe power and maximum power constraints during operation:

$$P\_{\min}^{ED} \le P\_t^{ED} \le P\_{\max}^{ED} \tag{19}$$

In the formula: PED min, PED max respectively represents the minimum safe power and the maximum operating power when the electrolyzer is running.

At the same time, the electrolytic cell should also meet the power climbing constraints:

$$\left|P\_{l+1}^{ED} - P\_l^{ED}\right| \le P\_{rp}^{ED} \tag{20}$$

In the formula: PED rp indicates the maximum climbing power of the electrolyzer.

### ➁ Hydrogen compressor model

To facilitate storage and transportation, hydrogen is compressed into high pressure hydrogen using Hydrogen compressor, and the power consumption of the hydrogen compressor [23] needs to be satisfied:

$$P\_t^{HC} = \frac{R\_{H\_2} m\_t^{H\_2} T\_{ln\mathcal{K}}}{3600 \eta\_{HC} (\kappa - 1)} \left[ (P\_{out} / P\_{in})^{\frac{\kappa - 1}{\kappa}} - 1 \right] \tag{21}$$

$$0 \le P\_t^{HC} \le P\_{\text{max}}^{HC} \tag{22}$$

In the formula: RH2 is the specific heat capacity of hydrogen Changshu, Tin is the compressor input hydrogen temperature, ηHC is the compressor efficiency, κ is the isentropic index of hydrogen, Pout/Pin is the compression ratio.

#### ➂ Hydrogen storage tank model

The hydrogen storage tank is used to store the compressed hydrogen, and its mathematical model and constraints are:

$$\begin{cases} m\_1^{HS} = \rho\_0 M\_{HS} + m\_1^{H\_2} - L\_1^{H\_2} \\ m\_k^{HS} = m\_{k-1}^{HS} + m\_k^{H\_2} - L\_k^{H\_2}, 2 \le k \le 24 \\ \rho\_{\text{min}} M\_{HS} \le m\_t^{HS} \le \rho\_{\text{max}} M\_{HS}, 1 \le t \le 24 \\ m\_T^{HS} = \rho\_0 M\_{HS} \end{cases} \tag{23}$$

In the formula, mHS 1 represents the hydrogen storage capacity of the hydrogen storage tank in the first period of the dispatching period, mHS k represents the hydrogen storage capacity of the hydrogen storage tank in the k period of the dispatching period, mHS T represents the hydrogen storage capacity of the hydrogen storage tank in the last period of the dispatching period, ρ0, ρmin, ρmax represents the initial hydrogen storage ratio coefficient, the minimum hydrogen storage ratio coefficient and the maximum hydrogen storage ratio coefficient respectively, and MHS represents the total capacity of the hydrogen storage tank.

### **5 Two-Stage Robust Programming Model for H2-RES**

The first stage of the two-stage distributed robust optimization model based on renewable energy hydrogen production system proposed in this paper is to optimize the capacity of the hydrogen production system according to the local renewable energy characteristics, electric load and hydrogen load, including the capacity configuration of electrolytic cell, hydrogen compressor and hydrogen storage tank. The optimization goal is the construction cost. The second stage is to optimize the real-time scheduling scheme with the lowest system operation cost under the "worst" operation scenario that the system may encounter in the future. Then feed back the optimization results of the second stage to the first stage to further formulate the best planning scheme. The two-stage planning model is shown in Fig. 2.

**Fig. 2.** Two-stage programming model

The two-stage robust optimization model is as follows:

$$F\_3 = \min\_{\mathbf{x}} \left\{ F\_1 + \max\_{\mathbf{u}} \min\_{\mathbf{y}} \{ F\_2 \} \right\} \tag{24}$$

In the formula: x is the decision variable of the first stage, that is, the capacity configuration of the hydrogen production system; u is the scene of the worst scenery; y is the decision variable of the second stage, that is, after the configuration of the hydrogen production system and the worst-case scenario of the most economic scheduling scheme.

In this paper, we use the k-means Clustering Method to reduce M wind power and photovoltaic power scenes into typical discrete scenes with uncertain and random characteristics u1, u2,..., uk, the occurrence probabilities of various scenarios are obtained to simulate the output uncertainty of renewable energy. The initial probability of each discrete scenario is expressed in p0 k.

The purpose of scene reduction analysis is to replace a large number of complex scene features with a small number of representative scenes, and construct an uncertain set to describe the distribution of scenery output. The comprehensive norm constraint set composed of [22] 1-norm and ∞-norm restricts the probability distribution of renewable energy output scenario, as shown in Eq. (25).

$$\Omega = \left\{ p\_k \, \middle| \begin{array}{l} p\_k \ge 0, k = 1, 2, \dots, K \\ \text{s.t.} \\ \sum\_{k=1}^{10} p\_k = 1 \\ \sum\_{k=1}^{10} |p\_k - p\_k^0| \le \lambda\_1 \\ \max\_{k=1,2,\dots,K} |p\_k - p\_k^0| \le \lambda\_\infty \end{array} \right\} \tag{25}$$

In the formula: is the probability distribution feasible region of renewable energy output scene, where Pk is the probability of the typical scene uk, which λ1, λ∞ is the probability allowable deviation value of 1-norm and ∞-norm respectively, which can be obtained from Eq. (26).

$$\begin{cases} \lambda\_1 = \frac{k}{2M} \ln \frac{2k}{1 - \alpha\_1} \\ \lambda\_\infty = \frac{1}{2M} \ln \frac{2k}{1 - \alpha\_\infty} \end{cases} \tag{26}$$

In the formula: α1, α∞ is the confidence level of 1-norm and ∞-norm uncertainty probability respectively.

The two-stage distribution robust optimization model is a min max min structure. In order to facilitate analysis, the worst scenario of renewable energy output is represented by the worst probability distribution of renewable energy output. The two-stage distribution robust model of the proposed system can be transformed into the following form:

$$F\_3 = \min\_{\times} \left\{ F\_1 + \max \left\{ \sum\_{k=1}^{10} p\_k \min\_{\mathbf{y}} \{ F\_2 \} \right\} \right\} \tag{27}$$

### **6 Two-Stage Robust Model Solving Method**

To solve the two-stage distributed robust optimization problem, a column constraint generation algorithm (C & CG) is used to solve the decomposition problem. Compared with Benders decomposition algorithm, C & CG algorithm has fewer iterations and higher accuracy. C & CG algorithm is used to decompose the two-stage distributed robust problem into main problem and sub-problem.

The main problem is to solve the optimal capacity allocation of the hydrogen production system based on the probability distribution of the initial worst-case scenario, and to obtain the maximum real-time operating cost with the lowest operating cost as the objective in the worst-case scenario, and provide a lower bound for the model:

$$\begin{cases} \min A^T \mathbf{x} + U \\ U \ge \sum\_{k=1}^{10} p\_k \min \{ \mathbf{B}^T \mathbf{y}\_k \} \end{cases} \tag{28}$$

In the formula, *AT* is the coefficient matrix of the primary decision variable, *x* is the primary decision variable, *U* is the auxiliary variable of the main problem objective function and *BT* is the coefficient matrix of the secondary decision variable.

Based on the optimal capacity configuration of the hydrogen production system solved by the main problem, the sub problem calculates the operation with the lowest operation cost as the goal in each scenario in parallel, and provides the upper bound value to the model. The worst scene probability is updated in the probability distribution feasible region of the data-driven wind and solar output scenario, and the scheduling optimization of the system is carried out. The sub problem can be expressed as:

$$\max\_{\{p\_k\} \in \Omega} \sum\_{k=1}^K P\_k^q \left[ \min\_{\mathbf{y}\_k \in \{\mathbf{x}, p\_k\}} \left(\mathcal{B}^q\right)^T \mathbf{y}\_k^q \right] \tag{29}$$

The iterative solution process of the main problem and sub problem by using C & CG algorithm is as follows:

Step 1: Initialization, set the maximum number of iterations nmax; convergence accuracy ζ = 10−3, the number of initialization iterations n = 1, set the scenery output benchmark scenario u0 as the worst scenario uq, initialization U = +∞, The upper bound of the objective function is U = +∞ and the lower bound is L = −∞, the historical data are clustered to obtain K discrete scenes with typical time and the initial probability distribution p0 k.

Step 2: substitute the worst scenario uq into the main problem for solution, obtain the optimal capacity solution xq of the hydrogen production system, and take the optimal solution obtained from the main problem as a new lower bound Lq.

Step 3: substitute xq into the subproblem and consider the uncertainty of wind power output, and calculate the output plan of each unit when the operation cost is the lowest in each scenario in the subproblem in parallel.

Step 4: find the wind power output expectation and corresponding decision variables yq that maximize the operation cost in the probability distribution feasible region of the data-driven wind power output scene, take the sum of the sub problem optimization result K k=1 Pq k (Bq)Ty q k and the main problem result (Aq) Txq as the upper bound, and update the bad scene uq+1 and probability distribution Pq+1 k .

Step 5: determine Uq−Lq ≤ ε whether satisfied, if satisfied, the iteration convergence and get the optimal solution; If not satisfied, then update the worst scenario and its probability, n = n + 1, and return to step 2 (Fig. 3).

**Fig. 3.** Solution flow of two-stage robust optimization model

The framework of two-stage distributed robust optimization model based onH2-RES is shown in Fig. 4.

## **7 Case Analysis**

#### **7.1 Basic Data and Model Parameters**

In order to verify the feasibility of the model and method in this paper, an example is constructed based on the actual data of Chongli renewable energy large-scale hydrogen production project in Zhangjiakou, Hebei Province. Taking the renewable energy hydrogen production system shown in Fig. 1 as the research object, CPLEX commercial solver is used for modeling and solving in matlab 2020a.

In Zhangjiakou renewable energy hydrogen production project, there are three fans and one photovoltaic array. The rated power of each fan is 2 MW and the rated power of photovoltaic array is 3 MW. Set the optimal scheduling cycle as 24 h, and take 1 h as the unit period. The renewable energy output data of the past one year is taken and reduced to 10 typical discrete renewable energy output scenarios with uncertain and random characteristics by K-means clustering method, and the corresponding probability of

**Fig. 4.** The whole frame

each scenario is obtained to drive the two-stage distributed robust optimization model of H2-RES. The data of renewable energy output before and after clustering is shown in Figs. 5 and 6. Figure 5 (a) and (b) respectively show the historical data of fan output and photovoltaic output in the past year Fig. 6 shows the 10 types of renewable energy output scenarios obtained by clustering.

**Fig. 5.** Historical data of available in process energy output

During the 2022Winter Olympic Games, more than 400 hydrogen buses were applied to Zhangjiakou competition area, and their daily hydrogen load was supplied by the renewable energy hydrogen production project in Zhangjiakou area. This paper selects the hydrogen load and electric load of typical days and the renewable energy output data of the next day predicted according to the historical renewable energy output data, and

**Fig. 6.** Clustering results of renewable energy output

makes a case analysis on the dynamic scheduling optimization after the static configuration ofH2-RES hydrogen production system in the first stage. Figure 7 shows typical daily load demand and predicted renewable energy output data.

The purchase and sale price in the calculation case adopts the pricing method of time of use price. The prices of electricity purchased and sold in different time periods are shown in Fig. 8.

**Fig. 7.** Load daily demand and renewable energy force prediction data

**Fig. 8.** Purchase electricity-based electricity price

The parameter values of main equipment of the H2-RES system are shown in Table 1.

**Table 1.** Important parameter values of H2-RES.

#### **7.2 Analysis of Optimizing Static Configuration Stage**

In this paper, the historical scenery output data are clustered by K-means method, and 10 groups of initial scenes and their probabilities are obtained. The comprehensive norm constraint set is used to constrain the probability distribution of wind and solar output scenarios, in which the 1-norm constraint confidence is set to 0.5 and ∞-norm constraint confidence is set to 0.99. Build a two-stage robust optimization model forH2-RES system. The static configuration of hydrogen production system obtained by iteration according to C & CG algorithm is shown in Table 2.

The capacity configuration of the optimized hydrogen production system is close to that in the actual project. The capacity of the actual hydrogen production system in Zhangjiakou renewable energy hydrogen production project is shown in Table 3. According to the configuration obtained from the simulation of the example, it is suggested to increase the capacity of the hydrogen storage tank in the project to 220–250kg.

**Table 2.** Optimized capacity configuration of hydrogen production system

**Table 3.** Actual capacity of hydrogen production system on site

#### **7.3 Flexible Electric Load Optimization Analysis**

The response of electric load demand after considering flexible load is shown in Fig. 9. The blue bar represents the electric load predicted at the dispatching time, the orange bar represents the flexible electric load that can be transferred at the dispatching time, the yellow bar represents the flexible electric load that can be reduced at the dispatching time, and the red curve represents the electric load after considering the flexible load, which can also be expressed as the electric load after demand response.

It can be seen from the figure that the transferable electric load in period 1, period 3, period 5, period 7, period 9–10 and period 22–24 is transferred to period 14–21, and the reducible load in period 2, period 4, period 6, period 8–9 and period 11–21 is reduced on the basis of meeting the acceptable reduction times of users. It effectively smoothes the power load curve of the system, and then improves the wind power consumption and economic benefits of the dispatching plan.

**Fig. 9.**  The optimal operation strategy of each unit of the system is shown in Fig. 10. The blue bar represents the renewable energy output plan, the orange bar represents the power purchase plan of the system to the power grid, the green bar represents the power sales plan of the system to the power grid, and the yellow bar represents the charging and discharging plan of the battery. Above the horizontal axis represents the charging plan, below the horizontal axis represents the discharge plan, the purple bar represents the power consumption plan of the hydrogen production system, and the red curve represents the power load after demand response.

It can be seen from the figure that in these 24 periods, most of the power output of renewable resources is used for the power consumption of hydrogen production system. In periods 1–7 and 14, the output of renewable energy can not meet the power load and power consumption of hydrogen production system. It is necessary to purchase power from the power grid to meet the power demand. In periods 10, 12–13, 15 and 17, 22–24, the output of renewable energy can fully meet the electrical load and the electrical power required by the hydrogen production system, and the excess electricity is used to sell electricity to the power grid and charge the battery. In this strategy, more electricity is purchased to charge the battery in the first and seventh periods when the output of the available energy is insufficient and the electricity price is low, and the battery is discharged in the eighth to ninth periods, the eleventh periods, the fourteenth periods and the eighteenth to twenty-first periods when the output of the available energy cannot meet the required electric power, so as to achieve the effect of peak shaving and valley filling. The charging and capacity status of the battery are shown in Fig. 11. The total capacity of the battery set in this paper is 1000 kW, the minimum capacity is limited to 100 kW and the maximum capacity is limited to 900 kW. The maximum charging and discharging power is 400KW. It can be seen that the charging power of the battery reaches the maximum charging state in period 1, 11 and 17, and the discharging power reaches the maximum discharging state in period 6 and 21. The capacity of the storage battery is 300 kW at the beginning of the dispatching period, reaches the allowable maximum capacity state in 11, 13 and 18 periods, and returns to the initial state at the last moment of the dispatching period.

**Fig. 10.** Electric power optimal operation strategy

#### **7.5 Hydrogen Load Supply Situation**

The hydrogen load supply is shown in Fig. 12. The green curve represents the realtime change of hydrogen in the hydrogen storage tank during the 24-h dispatching period, the red curve represents the change of hydrogen load during the 24-h dispatching period, and the blue curve represents the real-time change of hydrogen production of

**Fig. 11.** Battery charging and discharging power and electric quantity status

the hydrogen production system during the 24-h dispatching period. During the period 1–7, the hydrogen production of the hydrogen production system has excess hydrogen load. The excess hydrogen is stored in the hydrogen storage tank. It can be seen that the hydrogen in the hydrogen storage tank has been increasing. During the period 8, the hydrogen load has excess hydrogen production. At this time, the hydrogen in the hydrogen storage tank makes up for the hydrogen load. There is little difference between the hydrogen load and the hydrogen production during the period 9–13. In the period 14–21, except for the period 18, the hydrogen load is more than the hydrogen output, and the hydrogen load is far more than the hydrogen output in the period 15 and 19. In this period, the hydrogen load in the hydrogen storage tank is used to supplement the hydrogen load, the hydrogen load in the period 22–23 is nearly equal to the hydrogen output, and the hydrogen output in the period 24 is more than the hydrogen load, It can be seen that the hydrogen storage tank plays a role in maintaining the stability of hydrogen load during the whole dispatching period.

The capacity status of the hydrogen storage tank is shown in Fig. 13. It can be seen that the initial capacity proportion of the hydrogen storage tank is 0.25. When the hydrogen production of the hydrogen production system exceeds the hydrogen load, the hydrogen capacity status in the hydrogen storage tank will increase, otherwise it will decrease. In the last period of the dispatching period, the capacity status of the hydrogen storage tank will return to the initial capacity proportion, ensuring the normal and stable operation of the hydrogen storage tank in the next dispatching cycle.

**Fig. 12.** Hydrogen load supply situation

**Fig.13.** Capacity status of hydrogen storage tank

### **8 Conclusion**

This paper takes the hydrogen production system from renewable energy sources (H2 res) as the research object, fully considers the uncertainty of wind and solar output and the flexible load of electric load, and establishes a two-stage distributed robust optimization model. In the first stage, the system economy is taken as the optimization objective to determine the capacity of the hydrogen production system. The second stage takes the system operation cost as the goal, aims to optimize the real-time scheduling of the system, and uses the CCG algorithm to solve it. Finally, an example is given to verify the effectiveness of the proposed model, and the following conclusions are drawn:

(3) By considering the wind solar output scenario under the worst scenario, the capacity of the hydrogen production system obtained through the iteration of the algorithm is very close to the actual project, which can provide practical application value.

**Acknowledgement.** This research was supported by the Science and Technology Plan Project of Hebei Province of China (Grant No. 19210108D, 19214501D, 20314501D, F2021202022).

## **References**

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Capacity Optimization of Hybrid Energy Storage System in Microgrid**

Yanwei Jing1, Zhihao Zhao2, Wen Jiang3, and Tao Liang2(B)

1 Hebei Construction & Investment New Energy Group Co., Ltd., Shijiazhuang 050006, China 2 School of Artificial Intelligence, Hebei University of Technology, Tianjin 300130, China

<EMAIL_ADDRESS>
3 Jointo Energy Investment Co., Ltd. Hebei, Shijiazhuang 050051, China

**Abstract.** A hydrogen fuel station is an infrastructure for commercializing hydrogen energy using fuel cells, especially in the automotive field. Hydrogen, produced through microgrid systems of renewable energy sources such as solar and wind, is a green fuel that can greatly reduce the use of fossil fuels in the transportation sector. In this study, taking the Winter Olympics as the background, hydrogen production was carried out through the wind-solar hybrid microgrid system installed in Chongli, Zhangjiakou, so as to meet the fuel supply of hydrogen buses during the Winter Olympics. This analysis is the capacity optimization configuration design of the microgrid including the hydrogen production system, and the simulation analysis is carried out by using the Homer simulation software. In this study, NASA's ground-based meteorology and solar databases were used. Therefore, the annual average wind speed of the site is 5.72 m/s, and the annual average solar radiation is 5.08 kWh/m2/d. According to the optimization results obtained for the proposed configuration, different system configuration schemes are found, and a variety of schemes are compared to select the most economical capacity configuration scheme. It was finally shown that a microgrid including a hydrogen production system powered by renewable energy is economically feasible.

**Keywords:** Microgrid · Energy storage system · Hydrogen energy storage · Storage battery · HOMER Pro software

## **1 Research Status**

### **1.1 Research Status of Microgrid Capacity Optimization Configuration**

In recent years, with the construction of complementary microgrid optimization projects, my country has overcome many technical difficulties in energy. In the energy development stage, the "Eleventh Five-Year Plan for Energy Development" in 2007 proposed a renewable energy industrialization project [1], by reducing construction costs and adopting renewable energy as a key development technology on a large scale. Make full use of the abundant renewable energy sources such as wind energy, solar energy, biomass energy, etc., to drive the development of energy industrial production, and realize the scope construction. This is also the first time that the "distributed energy supply system" has been identified as the key to develop cutting-edge technologies. In terms of electric energy, the energy system adopts the dispatching method to realize the interactive operation between renewable energy such as wind and light and the energy storage system. In terms of electric energy demand, the complementary electric energy system realizes the co-generation of cooling, heating and electricity, and configures and operates in an optimal way according to the load demand, so as to realize the coordinated operation between energy sources [2]. In 2016, the country proposed the "Internet+" smart energy model, and the development time was determined in the interval of 2016–2030 [3]. Therefore, in the future, the complementary model will occupy an extremely important position in energy utilization.

In the aspect of capacity optimization design of microgrid, many scholars have made in-depth research on it. Qi Yan and other scholars have used intelligent algorithms such as the improved gray wolf algorithm and particle swarm algorithm to study the scheduling problem and economic optimization of the microgrid system from the perspective of intelligence, so as to obtain the optimal solution of the microgrid [4, 5]. Due to the late start of microgrid technology and related technologies have not yet matured, the investment in technology will generate huge costs, so economy is the key inspection criterion [6, 7]. Shao Zhifang and other scholars comprehensively considered the power supply side and the load side, studied the configuration optimization of the coordinated operation of the supply and demand sides of the off-grid microgrid, and obtained the configuration result with the minimum cost of the distributed microgrid system [8]. Zhang Zhiwen et al. took the remote areas of Guizhou as the background, and studied the capacity optimization configuration scheme of wind, solar, water, and storage power stations [9]. Tan Ying and other scholars have achieved the goal of reducing pollutant emissions by introducing renewable energy on the basis of diesel generators [10].

#### **1.2 Research Status of Hydrogen Energy Technology**

Hydrogen energy is a green and efficient secondary energy, so in the future, hydrogen energy will inevitably become an important part of my country's energy structure. At the same time, the relevant links of hydrogen production, hydrogen storage and hydrogen consumption have great economic value. As an intermediate medium, hydrogen energy can realize the conversion between electric energy and other energy sources. It is an ideal energy medium and can realize large-scale application of energy storage medium in the future [11].

A large number of foreign scholars and researchers use hydrogen as a renewable resource to generate energy savings. Hydrogen is a novel energy storage method. By combining with wind power and photovoltaic power generation systems, the impact of distributed power generation systems on the power grid can be improved [12, 13]. In remote mountainous areas, traditional resources cannot guarantee power quality, and the investment cost is high. As an energy carrier and conversion medium, hydrogen has the advantages of hydrogen-hydrogen refueling station-hydrogen bus construction.

The United States is the first country to use hydrogen and fuel cells as energy sources. Around the 1960s and 1970s, the United States had put forward the concept of "hydrogen economy". The United States has solved a series of technical problems in the hydrogen industry through a large amount of human and financial investment. In 1990, the United States formulated the "Five-Year Plan for Hydrogen Energy Research and Development", and in 1996, the "Hydrogen Energy Prospects Act" was promulgated, with the purpose of creating the universality of hydrogen energy. In 2012, US President Barack Obama submitted a financial plan totaling 3.8 trillion US dollars, of which 6.3 billion yuan was used for the development and construction of hydrogen energy, automotive alternative fuels and other projects. As of 2019, the United States has adopted hydrogen fuel vehicles as commercial vehicles, and at the same time has invested heavily in related hydrogen energy innovations. A series of events have proved that the hydrogen energy industry occupies an extremely important position in the energy development of the United States.

The EU is also one of the early regions involved in the field of hydrogen energy, and the EU has taken hydrogen energy as an important guarantee for energy security and transformation. In 1956, the University of Cambridge invented the total temperature alkaline fuel cell, which opened the prelude to the development of fuel cells. The EU has promulgated a series of policies to ensure the development and construction of the hydrogen energy industry, and plans to reach 33% of power generation by renewable energy in 2020, 45% by 2030, and 50% by 2040., the proportion of power generation will reach 97% in 2050 [14]. In 2011, Germany built the world's first wind-hydrogen power station with a power generation scale of 6 MW. In 2013, the German Audi company built a 6-megawatt E-Gas power conversion hydrogen project, marking that Audi became the world's first automobile company to use renewable energy. In 2019, Germany invested a total of 250 million euros in research on hydrogen energy vehicle projects, and plans to build 400 hydrogen energy filling stations by 2030.

China is also a big country in the use of hydrogen energy. In the "Energy Technology Revolution Innovation Action Plan (2016–2030)" [25], hydrogen energy has been classified as a key project of the energy technology revolution, and the construction and development of the hydrogen energy industry has also been included in my country. Energy strategy: My country has always focused on replacing some fossil fuels such as coal and oil by abandoning wind, water and other renewable energy sources, which can reduce costs and improve stability, which is more conducive to the construction of the hydrogen energy industry system and the construction of a national hydrogen energy industry network.

The continuous development of hydrogen energy technology has not only carried out in-depth research in key laboratories of universities, but also built a large number of hydrogen energy industry demonstration projects. In terms of hydrogen energy demonstration projects, it is mainly for applications in distributed power generation and new energy vehicles. Up to now, the number of hydrogen energy stations in operation in China has reached 14, which are located in Shanghai, Beijing, Guangdong and other places, and the first hydrogen refueling station in China that uses wind-solar hybrid electrolysis of water to produce hydrogen has been in Dalian has been completed, and the scale level has reached 70 MPa, which can provide energy for hydrogen vehicles in the three northeastern provinces [15].

### **2 Microgrid Structure and Modeling Research**

#### **2.1 Microgrid Structure**

Complementary microgrid is based on the characteristics of various distributed power sources to perform joint power generation, thereby effectively avoiding the disadvantage of poor reliability of a single power source. Through the differences in the output characteristics of distributed power sources such as wind power generation, photovoltaic power generation and lithium-ion batteries, they are combined into a complementary micro-grid system to ensure that the output power of the micro-grid remains balanced at various time periods and under different conditions, and improve the micro-grid. System stability: The complementary microgrid takes its own structural characteristics as a reference, and obtains the effects of the lowest total cost, the best power supply reliability and stability. Figure 1 is the microgrid architecture diagram of the research object of this paper. Among them, wind turbines and solar cells are the main power sources of the system, which are set to maintain the maximum output power all the time, and the lithium-ion battery system is the backup power supply of the system. When the output of wind turbines and solar cells is insufficient, the stable operation of the microgrid system is guaranteed.

**Fig. 1.** Overall structure of the wind-solar-hydrogen integrated microgrid system

#### **2.2 Distributed Power Model**

#### **2.2.1 Fan Model**

Wind power generation is a process of energy conversion. First, wind energy is converted into mechanical energy of a motor by a fan and then converted into electrical energy. At present, three-phase permanent magnet synchronous generators are mostly used in small wind power generation systems, and grid-connected generators such as double-feedback asynchronous generators, cage asynchronous generators, and permanent magnet synchronous generators are also widely used [16].

The size of the wind speed directly determines the power generation of the wind turbine, because the wind resource has relatively large fluctuation and randomness. At present, domestic and foreign scholars have carried out a lot of research on the distribution of wind speed, among which the most representative is the two-parameter Weibull distribution model [17]. This model has a good fit to the wind speed, and the probability density formula is as follows:

$$f(\nu) = \frac{k}{c} (\frac{\nu}{c})^{k-1} \cdot \exp\left[-\frac{\nu}{c})^k\right] \tag{1}$$

where: *v* represents the wind speed here; *k* represents the Weibull shape factor, *k* > 0; *c* represents the Weibull scale parameter, *c* > 1; *vc* represents the cut-out wind speed; *ve* represents the rated wind speed.

The Weibull shape factor, the scale parameter is calculated as follows:

$$f(\nu) = \frac{k}{c} (\frac{\nu}{c})^{k-1} \cdot \exp\left[-(\frac{\nu}{c})^k\right] \tag{2}$$

$$c = \overline{\mathbf{v}} / [\Gamma(1 + 1/k)] \tag{3}$$

where σ represents the standard deviation; *v* represents the average wind speed; - represents the Gamma function.

The functional relationship between the output power of the wind turbine and the wind speed can be obtained as the output power function [4]:

$$P\_{WT}(\boldsymbol{\nu}) = \begin{cases} 0, & 0 \le \boldsymbol{\nu} < \boldsymbol{\nu}\_{cl} \\ P\_r \frac{\boldsymbol{\nu} - \boldsymbol{\nu}\_{cl}}{\boldsymbol{\nu}\_r - \boldsymbol{\nu}\_{cl}}, & \boldsymbol{\nu}\_{cl} \le \boldsymbol{\nu} < \boldsymbol{\nu}\_r \\ P\_r, & \boldsymbol{\nu}\_r \le \boldsymbol{\nu} < \boldsymbol{\nu}\_{\infty} \end{cases} \tag{4}$$

In the formula: *PWT* represents the real-time power generated by the fan; *v* represents the real-time wind speed; *vci* represents the cut-in wind speed; *v*∞ represents the cut-out wind speed; *vr* represents the rated wind speed.

Fans are mainly divided into two categories: fixed pitch fans and variable pitch fans. The pitch of the fixed pitch fan cannot be changed, so when the actual wind speed is greater than the rated wind speed, the power output of the fan will decrease instead; since the variable pitch fan can change its own pitch, when the wind speed is greater than the rated wind speed, its output power remains rated Power does not change. In this paper, the variable pitch fan is selected as the research object (Table 1; Fig. 2).

**Table 1.** Air fan parameters

**Fig. 2.** Power output curve of the wind power generator

#### **2.2.2 Photovoltaic Model**

As a kind of renewable energy, solar energy comes from the energy generated by the continuous nuclear fusion reaction inside the sun [18]. It can be regarded as a kind of energy with huge reserves and no pollution. With the continuous consumption of fossil resources, photovoltaic power generation has received more and more attention due to its cleanliness and pollution-free. Photovoltaic power generation has the characteristics of safety, no resource consumption, random installation, and simple construction. The principle of solar photovoltaic power generation is to use the photovoltaic effect (Photovoltaic effect) [19] generated when semiconductor materials receive light, thereby converting light energy into direct current electricity.

There are many factors that affect the output power of photovoltaic cells, such as light intensity, temperature of photovoltaic cells, panel shadows, etc. [30]. The output power of photovoltaic cells is as follows:

$$P\_{pv}(t) = P\_{STC} \frac{L\_C(t)}{L\_{STC}} [1 + \mu(T\_C - T\_{STC})] \tag{5}$$

In the formula: *Ppv* represents the actual power generated by the solar photovoltaic panel; *PSTC* represents the rated power of the solar photovoltaic panel; *LC* represents the current ambient light intensity; *LSTC* represents the light intensity in the ideal environment, 1 kW/m2; μ represents the power temperature coefficient, − 0.0047 °C; *TC* represents the solar photovoltaic panel during operation Surface temperature; *TSTC* indicates the surface temperature of the solar photovoltaic panel in an ideal environment.

Among them, the comprehensive calculation of real-time temperature and light intensity is adopted through the HOMER Pro simulation software, as follows:

$$T\_C = T\_a + (T\_{C, \text{not}} - T\_{a, \text{not}})(\frac{G\_T}{G\_{T, \text{not}}})(1 - \frac{\eta\_c}{\tau a}) \tag{6}$$

In the formula, *Ta* represents the actual temperature; *TC*,*noct* represents the photovoltaic panel temperature under the rated state; *Ta*,*noct* represents the actual temperature defined by NOCT; *GT* represents the light intensity; *GT*,*noct* represents the light intensity defined by NOCT; η*c* represents the efficiency of the solar photovoltaic panel; τ, *a* indicates the care for the penetration and absorption rate of solar photovoltaic panels.

#### **2.2.3 Lithium-Ion Battery**

The service life and discharge degree of a lithium-ion battery have a great relationship with the number of times the battery is charged and discharged. The degree of discharge of the battery is the ratio of the amount of electricity released by the battery to the rated capacity, expressed by. Usually the condition is less than or equal to 80% to prolong the life of the battery. The state of charge represents the ratio between the battery capacity and the rated capacity of the battery in a steady state at a temperature of 25 °C, and is generally expressed. The state of charge of the lithium battery is constantly changing dynamically, and its state of charge will calculate the amount of electricity consumed or absorbed in the previous period and update it at each time point.

The state-of-charge formula for charging and discharging a lithium-ion battery is shown in. The relationship between the state of charge and the depth of discharge is shown below.

$$SOC(t+1) = SOC(t) - \frac{P\_{BAT}(t) \cdot \Delta t}{Q\_R \cdot \eta\_{dis}} \quad P\_{BAT}(t) \ge 0 \tag{7}$$

$$SOC(t+1) = SOC(t) - \frac{P\_{BAT}(t) \cdot \Delta t}{Q\_R \cdot \eta\_{ch}} \quad P\_{BAT}(t) \le 0 \tag{8}$$

$$DOD = 1 - SOC\tag{9}$$

In the formula, *SOC*(*t* + 1), *SOC*(*t*) represents the state of charge of the lithium ion battery at *t* + 1, *t*; *PBAT* (*t*) represents the charge and discharge power of the lithium ion battery per unit time, the value during charging is less than 0, and the value during discharging is greater than 0; η*dis* represents the discharge efficiency of the lithium ion battery; η*ch* represents The charging efficiency of a lithium-ion battery; *QR* is the rated capacity of the battery.

#### **2.2.4 Electrolyzer Model**

The working process of the electrolytic cell is a redox reaction, which conforms to the law of conservation of matter. In the process of electrolysis of water, 96485.31 C of electricity will be consumed for every 1 mol of electron change. Therefore, the amount of gas produced by the electrolysis process is positively related to the current. The alkaline solution is only to improve the conductivity of the solution, and does not participate in the actual electrolysis process, so it will not produce consumption.

According to the formula, it can be concluded that 1 unit of hydrogen is generated by electrolysis and 2 units of electrons are transferred. The specific relationship between the rated power of the electrolyzer and the hydrogen content is expressed as follows:

$$P\_{N-ele} = \frac{Q\_N \cdot 2 \cdot N\_A}{V\_M \cdot C\_O \cdot 3600} V\_N \frac{1}{\eta\_{ele}} \tag{10}$$

$$\mathcal{Q} = \frac{P\_{\tan k}}{P\_{N-ele}} \mathcal{Q}\_N \tag{11}$$

In the formula: *PN*−*ele* is the rated power of the electrolysis process of the electrolytic cell; *QN* is the rated hydrogen production rate; *P*tan *k* is the equivalent power of volume hydrogen; *NA* is the constant 6.021023; *VM* is the molar volume, 24.5 L/mol; η is the electrolytic cell efficiency of 75%.

#### **2.2.5 Hydrogen Storage Tank Model**

The hydrogen storage tank is a device that stores the hydrogen produced by the electrolyzer and provides fuel for the fuel cell. The hydrogen storage tank is generally composed of a container, a valve, a hydrogen storage material, and a gas guiding structure. The hydrogen storage method of the hydrogen storage tank has the advantages of large capacity and high safety factor. By electrolyzing water to produce hydrogen from excess electrical energy, it not only reduces the charging and discharging pressure of batteries in the microgrid, but also can store hydrogen to meet the use of hydrogen. The specific energy conversion relationship:

$$P\_{el-\tan k}(t) = P\_{gen-el}(t) \times \eta\_{el} \tag{12}$$

In the formula, *Pel*− tan *k* (*t*) represents the energy of hydrogen charged in the time hydrogen storage tank,*Pgen*−*el*(*t*)represents the excessive power generation in the microgrid and the energy flowing to the electrolyzer, η*el* is the efficiency of the alkaline electrolyzer.

#### **2.2.6 Converter Model**

As a device that converts electrical energy, converters are generally divided into DC/AC inverters, DC/DC choppers, AC/DC rectifiers, AC/DC/AC voltage conversion and frequency conversion, etc. [20]. The use of current transformers can meet the input and output requirements of distributed power and energy storage equipment.

In the microgrid system, wind turbines and solar photovoltaics can generate alternating current and direct current, and the converter can convert the electric energy to alternating current and direct current. In the entire microgrid system, converters are required between the supply and demand of equipment to ensure the power exchange between AC and DC system components. The capacity expression of the converter is shown below.

$$P\_{innerter} = \frac{E\_{load,\text{max}}}{\eta\_{innerter}}\tag{13}$$

In the formula: *Eload*,max represents the maximum load in the microgrid; η*inverter* represents the power conversion efficiency of the converter, and the calculation formula is as follows.

$$
\eta\_{inverter} = \frac{P\_{out}}{P\_{in}} \tag{14}
$$

When the converter is working, the input electrical power will be consumed as the energy inside the device, and no power will be generated. An electrical power proportional to the input is then output. When the rated power is reached, the output will be limited due to temperature and its own limitations. When the input is too large, the output power remains unchanged, and the efficiency is reduced by the formula. The converter selected in this paper has a conversion efficiency of 90%.

## **3 Optimization Objectives and Constraints**

### **3.1 Optimization Goals**

In this microgrid system, the optimization objective is selected as the total net present cost of the system (Net Present Cost, NPC).

### Total System Cost

The total net cash cost of the system refers to the difference between the total cost and the benefit obtained in the whole life cycle of the microgrid. The cost of microgrid mainly includes initial equipment investment, operation cost, replacement consumption, fuel consumption cost, environmental pollution control cost and power grid purchase cost. The total benefit of the microgrid is the grid-connected benefit of the residual value of equipment and excess electricity. The microgrid system in this paper is an offgrid type and does not require an external power grid. Moreover, the distributed power sources in the microgrid system are all renewable and clean energy sources, and there is no environmental pollution problem. Therefore, the pollution emission penalty can be ignored in the net cash cost of this system. Compared with the power purchase cost of the power grid, only four parts are considered: the investment cost of the equipment in the system, the operation and maintenance cost, the replacement cost and the equipment residual [21].

The total net cash cost of the microgrid system is:

$$C\_{NPC} = C\_{CNPC} + C\_{RNPC} + C\_{SNPC} + C\_{OMNPC} \tag{15}$$

In the formula, *CCNPC* represents the investment cost of related devices in the microgrid; *CRNPC* represents the replacement cost of the device in the microgrid; *CSNPC* represents the residual value of the device in the microgrid; *COMNPC* represents the operation and maintenance cost of the device in the microgrid.

#### **3.2 Constraints**

#### **3.2.1 Equipment Operation Constraints**

(1) Power generation constraints of the fan system

$$0 \le P\_{WT} \le P\_{WT.\max} \tag{16}$$

In the formula, represents the maximum generating power of the fan system.

(2) Power generation constraints of photovoltaic solar panels

$$0 \le P\_{PV} \le P\_{PV.\max} \tag{17}$$

In the formula, represents the maximum power generation of photovoltaic solar panels.

(3) Li-ion battery output power and SOC constraints

$$SOC\_{\min} \le SOC(t) \le SOC\_{\max} \tag{18}$$

$$-P\_{bat.d\max} \le P\_{bat} \le P\_{bat.c\max} \tag{19}$$

$$SOC(t + \Delta t) = SOC(t) - \frac{\eta\_{bat} P\_{bat}(t) \Delta t}{E\_{bat}} \tag{20}$$

In the formula: *SOC*min, *SOC*max respectively represent the minimum and maximum state of charge of the lithium-ion battery; *Pbat*.*c* max, *Pbat*.*d* max respectively, represent the maximum charge and discharge power of the lithium-ion battery; η*bat* represent the conversion efficiency of the lithium-ion battery; *Ebat* represent the lithium-ion battery capacity; *t* represent the time step.

#### **3.2.2 Capacity Constraints of Microgrid-Related Equipment**

*SWT*. min ≤ *SWT* ≤ *SWT*. max (21)

$$S\_{PV.\min} \le S\_{PV} \le S\_{PV.\max} \tag{22}$$

$$S\_{BAT.\min} \le S\_{BAT} \le S\_{BAT.\max} \tag{23}$$

$$S\_{H\text{ESS.min}} \le S\_{H\text{ESS}} \le S\_{H\text{ESS.max}}\tag{24}$$

$$\mathcal{S}\_{CON.\min} \le \mathcal{S}\_{CON} \le \mathcal{S}\_{CON.\max} \tag{25}$$

In the formula: *SWT*. max, *SWT*. min respectively represent the maximum and minimum capacity of the fan system; *SPV*. max, *SPV*. min respectively represent the maximum and minimum capacity of the photovoltaic solar panel; *SBAT*. max, *SBAT*. min respectively represent the maximum and minimum capacity of the lithium-ion battery; *SHESS*. max, *SHESS*. min respectively represent the hydrogen energy storage system capacity The maximum and minimum values; *SCON*. max, *SCON*. max represent the maximum and minimum values of the converter capacity.

### **3.3 Comparison of Hydrogen Production Capacity and Gasoline Production Capacity**

In this paper, the use of hydrogen generated by wind and solar resources can effectively reduce the demand for gasoline, thereby greatly reducing the production of carbon dioxide, carbon monoxide and other particulate matter. According to the lower heating value of hydrogen and gasoline fuel [22], the microgrid system is calculated. The consumption of gasoline (kg) that can be replaced by the hydrogen produced, the specific calculation relationship is as follows:

$$M\_{GFuel} = \frac{M\_{H\_2} \times LHV\_{H\_2}}{LHV\_{GFuel}} \tag{26}$$

where: represents the annual hydrogen production of the microgrid system; represents the minimum heating value of hydrogen (119.9 MJ/kg) [23], and represents the minimum heating value of gasoline (43.4 MJ/kg) [24].

Therefore, the annual emissions of carbon dioxide and carbon monoxide that can be reduced by hydrogen production in the microgrid system are expressed as follows:

$$A\_{CO\_2} = M\_{GFuel} \times SE\_{CO\_2} \tag{27}$$

$$A\_{CO} = M\_{GFuel} \times SE\_{CO} \tag{28}$$

In the formula:, respectively represent the specific emission factors of carbon dioxide and carbon monoxide in the combustion process of gasoline, in which the emission coefficient of carbon dioxide is 2.3 kg per kilogram of gasoline, and the emission coefficient of carbon monoxide is 0.00766 kg per kilogram of gasoline [25].

## **4 Simulation Results and Analysis**

### **4.1 Introduction of HOMER Simulation Software**

The HOMER simulation software is developed by the US Department of Energy Renewable Energy Laboratory (NREL) based on C/C++. It has been widely used in microgrid systems and distributed power sources in renewable energy. HOMER contains a large number of ready-made models, mainly including wind turbine models, solar photovoltaic models, grid models and load models, and operators can build new models according to their own needs. The biggest advantage of this simulation software is that it can convert the microgrid system model built by the operator into a set of related schemes, and use the scheme sensitivity to analyze, and can conduct simulation on the investment situation, energy and capital flow conditions in the simulation on the premise of actual operation. Simulation: After building the microgrid system model, the operator can use the HOMER software to obtain the capacity configuration with the lowest net cash cost, and perform data analysis on the required results [22, 26]. HOMER simulation software has the following features.

(1) System simulation

The characteristic of HOMER software is that it can simulate the system model. By simulating a system, the operator can obtain the model of the combination of various equipments. By setting different parameters, HOMER software can generate a large number of simulated systems. The operator can set the time step of the simulation according to the needs, which is generally between 1 min and 1 h. During the simulation process, the software takes into account the investment cost of the equipment. Operation and maintenance costs. Replacement costs and environmental treatment costs, etc.; finally obtain the corresponding system configuration results, the cost ratio of each equipment, the proportion of power generation, the operation of the equipment, etc.

## (2) Process optimization

The HOMER software considers all possible combinations during operation and ranks the system results according to the selected optimization variables. Due to the "noderivative" algorithm, the design process of determining the minimum cost of the microgrid system can be greatly simplified, and the simulation optimization results of the system will be arranged in an increasing manner according to the total net cash cost.

(3) Sensitivity analysis

Under normal circumstances, the built system is relatively complex, and the operator cannot master all aspects of the system. Therefore, a large number of simulations and comparisons are required to better understand the importance of some variables and parameters. HOMER software has a sensitivity analysis function, which can provide the operator with the functions of all variables, such as light intensity, wind speed, etc., and can also understand the changes of various variables and parameters in the microgrid system under the optimal state conditions. At present, HOMER software has become the software of choice when many foreign scholars study the economics of distributed energy and microgrid.

### **4.2 HOMER Software Principle and Evaluation Index**

## **4.2.1 Software Principle**

HOMER simulation software has now been widely used in the planning and construction of smaller-scale microgrid systems. In the construction of the model, the first step is to select the constituent equipment and models in the microgrid system, such as fan systems, photovoltaic solar panels, electrolyzers, hydrogen storage tanks, energy storage batteries, etc.; in the second step of the model system Input of relevant parameters, such as the local geographical location of the research object, natural resources such as wind and light, the relevant cost of the equipment in the system, and the service life, etc.; Finally, through simulation, various combination schemes and each equipment in the system can be obtained. Sensitivity analysis can also be used to obtain the influence of different parameter conditions on the capacity configuration results of the microgrid system. For the situation that cannot be run, the HOMER simulation software will give specific adjustment parameters [26]. The flow chart of the calculation principle of the simulation software is shown in Fig. 3.

**Fig. 3.** Flowchart of software calculation principle

### **4.3 Microgrid System Modeling Based on HOMER Software**

### **4.3.1 Optimal Capacity of Microgrid System**

Taking Chongli, Zhangjiakou as the research object, the capacity allocation optimization of the microgrid system is carried out through the timing load and local wind and solar resources. The installed capacity of the hydrogen storage tank and the installed capacity of the converter.

$$S = \{S\_{WT}, S\_{PV}, S\_{BAT}, S\_{ELE}, S\_{HT}, S\_{CON}\} \tag{4.1}$$

where: *SWT* represents the installed capacity of the fan system; *SPV* represents the installed capacity of the solar photovoltaic system; *SBAT* represents the installed capacity of the lithium-ion battery energy storage system; *SELE* represents the installed capacity of the electrolyzer; *SHT* represents the installed capacity of the hydrogen storage tank; *SCON* represents the installed capacity of the converter.

### **4.3.2 Microgrid System Structure**

In this paper, Zhangjiakou Chongli (latitude: 40.5; longitude: 114.5; altitude: 1200 m; the test wind speed altitude is 10 m) is used as the research object. The specific local data are shown in Table 2. Build a simulation structure through the HOMER simulation software, and set relevant parameters: the power of the electrical load is 2400 kWh/d, of which the peak power is 183.32 kWh/h, and the demand of the hydrogen load is 730 kg/d, of which the peak demand is 72.11 kg/h; The initial capacity of the hydrogen storage tank is 80%, the initial capacity of the lithium-ion battery is 80%, the minimum capacity is 30%, and the working efficiency of the electrolyzer is 75%. The life of the simulated system is 35 years, the maximum allowable power shortage rate is 0.5%, the actual annual interest rate is 8%, and the expected expansion rate is 2%. The load following strategy (LC) and the cyclic charging strategy (CC) are adopted. Controls the run strategy.

**Table 2.** Local scenery and natural resources of the study subjects

According to Table 2, it can be concluded that the local wind energy and sunlight resources of the research object are sufficient, and a micro-grid system with wind turbine system and solar photovoltaic power generation based on renewable energy can be built. In this microgrid system, the installed capacity of the distributed power generation is restricted by its own volume and floor area, and the optimal variables of the microgrid system are in the range of (units), kW, kg, and kW. Other equipment variables in the microgrid system are not constrained, and the given equipment optimization variables are optimally configured and combined within the specified variation range. Figure 4 shows a typical local daily load curve. The cost parameters of related equipment in the microgrid system are shown in Table 3.

According to the data in Table 2, the HOMER simulation software is used to obtain the discrete data of local wind energy, light resources and load throughout the year. The discrete annual hourly wind speed data and light intensity data are shown in Figs. 5 and 6. The obtained discrete data is used as the input data of the system simulation, and the system simulation is carried out.

In the HOMER simulation software, by referring to the inputted microgrid system parameters, load data and the local wind speed, light intensity and other data of the

**Fig. 4.** Typical daily load curve

**Table 3.** Cost parameters of the equipment related to the microgrid

research object, the power generation of the distributed power generation in the microgrid system for 8760 h in a year can be obtained. The hourly power generation is compared with the load. The simulation step size of each hour not only proves the accuracy of the simulation optimization results, but also reduces the calculation time of the optimization process. The discrete hourly load data for the whole year are shown in Figs. 7 and 8.

**Fig. 5.** Hourly wind speed data for the year after discrete

**Fig. 6.** Data on hourly light intensity for the year after discrete

#### **4.4 System Simulation Results and Analysis**

#### **4.4.1 Optimization Results and Analysis**

Compared with other professional optimization software, HOMER simulation software simulates with the conditions set in advance, arranges the simulation results and the size of the net cash cost, and outputs the equipment configuration scheme required by the load, and the configuration scheme of the final equipment optimization results. As shown in Table 4.

**Fig. 7.** Electric load data for the full year after discrete

**Fig. 8.** Hydrogen load data for the full year after discrete

**Table 4.** Capacity configuration results of the microgrid system

From Table 4, it can be concluded that after the HOMER simulation software sets specific conditions and performs system simulation, the optimal combination scheme of microgrid system equipment is 2 wind turbines, 2000 kW solar photovoltaic battery, and 2000 kW lithium-ion battery capacity. 86 pieces, electrolyzer capacity 2800 kW, hydrogen storage tank capacity 600 kg converter 2682kW, system control operation strategy is load following control strategy. In this scenario, the total net cash cost of the microgrid system is 138.75 million yuan. In all simulation schemes, the utilization rate of renewable energy is 100% because they are based on wind energy and solar energy, which ensures the non-polluting of the microgrid system, which is in line with the "carbon peak and carbon neutrality" advocated by the current society. Dual carbon policy.

In the optimal system configuration scheme, the electric energy in the microgrid is mainly supplied by wind energy and solar energy jointly, but in other combination schemes, the electric energy is only supplied by wind energy or solar energy alone. A microgrid system where energy sources are mixed for power supply has more economic advantages than a single system. In the microgrid system, the distributed power generation units are all renewable resources. With the continuous development of distributed renewable power technology, the corresponding microgrid costs will continue to decline, so the integrated microgrid system technology has a very broad development. Prospect: From the results of the scheme in Table 4, the total net cash cost of the optimal scheme and the capacity configuration of the related equipment in the microgrid system can be obtained. The summary chart of the cash flow of the microgrid system according to different investment cost types of the optimal scheme is shown in Fig. 9. As shown in the figure, it can be concluded that in the initial investment cost, wind turbines account for the largest proportion of 38.28%, the investment cost of solar photovoltaic cell systems accounts for 14.85%, and the investment cost of electrolyzers accounts for 23.82%. The investment cost of the hydrogen storage tank accounted for 9.92%, the investment cost of the converter accounted for 8.25%, and the investment cost of the lithium-ion battery energy storage system accounted for 4.88%. It is comprehensively explained that the wind turbine system occupies most of the investment cost in the microgrid system, so it is also the main power generation unit of the microgrid system.

**Fig. 9.** Summary of system cash flow distinguished by cost type

From Fig. 9, it can be clearly seen that, except for the lithium-ion battery energy storage system, the initial investment cost of related equipment in the microgrid system is far greater than the maintenance and replacement costs of the equipment. The maintenance cost and replacement cost of the lithium-ion battery energy storage system are far greater than the initial investment cost, which is completely different from the total cost distribution of other related equipment. The initial investment cost, replacement cost and operation and maintenance cost of the lithium-ion battery energy storage system account for the proportion of its own total investment cost is 23.69%, 42.28% and 34.03% respectively. The replacement cost of the fan system and the solar photovoltaic cell system is far greater than the operation and maintenance cost of the equipment.

Figure 10 shows the cash summary of the microgrid system according to the operating years. It can be concluded that the initial investment in the microgrid system is 13.96 million yuan, the equipment replacement cost is 3.777 million yuan, the operation and maintenance cost is 139,700 yuan, and the system recovery cost is 173.5 10,000 yuan, Fig. 10 shows the cash flow of the hybrid microgrid system over its useful life.

**Fig. 10.** Annual cash flow by component

#### **4.4.2 Optimum Scheme Determination and Analysis**

On the premise of the known wind energy, light energy resources and the specific cost of related equipment, the simulation software has made the best equipment configuration plan: 2 wind turbines, 2000 kW solar photovoltaic battery capacity, 86 lithium-ion battery capacity, Electrolyzer capacity 2800 kW, hydrogen storage tank capacity 600 kg and converter 2682 kW. In the optimal combined configuration system, the power generation amount and the power generation proportion of the relevant power generation units in the system operation for one year are shown in Table 5. From the data in the table, it can be concluded that the power generation proportion of the wind turbine system is 80.6%, and the solar photovoltaic power generation proportion is 80.6%. The power generation of the battery accounts for 19.4%, which is far less than the power generation of the wind turbine system. Therefore, the wind turbine plays the main role of power generation in the microgrid system.

The output of the power generation unit in each month of the year is shown in Fig. 11. From the figure, the output of the power generation unit in each month can be obtained. The output of the wind turbine system is much larger than that of the photovoltaic cell. However, the output of photovoltaic cells is greatly affected by the environment. From June to September, the power generation of photovoltaic cells accounts for a larger proportion than other times of the year. The power generation ratio of wind turbines is relatively small from June to September compared with other times. Therefore, the wind-solar complementary power generation method can make up for the volatility and

**Table 5.** Power generation and proportion of power generation units of the microgrid system

intermittent shortcomings of natural resources to a certain extent, and ensure sufficient power generation. Ensure the stable operation of the microgrid system. Figures 12 and 13 show the heat maps of wind turbines and solar photovoltaic cells in the microgrid system at different times of the year. From Fig. 12, it can be concluded that in spring and winter, the power generation output of wind turbines is relatively sufficient, which is more in line with the local wind energy situation of the research object. From Fig. 13, it can be concluded that the power generation of solar photovoltaic cells in a day varies greatly, generally concentrated between 11:00 and 14:00. In the horizontal time span, solar photovoltaic cells generate more electricity during summer than at other times.

**Fig. 11.** Monthly power generation of the system components in the optimal configuration

When the simulation software is used to configure the capacity of the microgrid, the hydrogen storage level of the hydrogen storage tank and the SOC state change of the lithium-ion battery in the system for 8760 h in a year are obtained, which are shown in

**Fig. 12.** Heat map of wind turbine

**Fig. 13.** Heat map of power generation of solar photovoltaic cells

Figs. 14 and 15, respectively. From the pictures, it can be seen that the hydrogen storage capacity of the hydrogen storage tank in summer and autumn is less than that in spring and winter, but the hydrogen storage capacity of the system can well meet the hydrogen demand of the hydrogen filling station, which proves that the relevant capacity selection of the system is correct. The overall level of the SOC state of lithium-ion batteries in summer and autumn is lower than that in spring and winter. Therefore, compared with the two seasons of summer and autumn, the power supply in spring and winter is more abundant, and the reliability of power supply of the system is more stable.

## **4.5 Hydrogen's Ability to Replace Gasoline and Reduce Carbon Emissions**

From the hydrogen produced by the microgrid system, the amount of gasoline that can be replaced with hydrogen as a transport fuel can be calculated. From this, it is possible to calculate the amount of carbon dioxide and carbon monoxide emissions that can be reduced by using hydrogen as a fuel. The specific results are shown in the following table. According to the data in the table, the use of hydrogen as fuel can replace 495.21 tons of gasoline every year, which can lead to a reduction of 1138.98 tons and 3.80 tons of carbon dioxide and carbon monoxide emissions respectively. It can greatly reduce

**Fig. 14.** Hydrogen storage capacity of hydrogen storage tank

**Fig. 15.** Annual SOC change of lithium battery

carbon emissions, which is more in line with the "dual carbon" policy advocated by the government (Table 6).

**Table 6.** Annual gasoline replacement and carbon emission reduction

### **5 Conclusion**

In this study, the simulation results show that the optimized hybrid microgrid system consists of 2000 kW photovoltaic modules, 2 wind turbines, 86 batteries, 2682 kW inverter, 2800 kW electrolyzer and 600 kg hydrogen tank. The total net cash cost and renewable energy utilization rate of the optimized microgrid system are 138.75 million yuan and 100%, respectively. In this way, the supply of hydrogen bus fuel during the Winter Olympics is guaranteed, and it is also in line with the dual-carbon policy of "carbon peaking and carbon neutrality" advocated by the current society. At the same time, the annual hydrogen production of the micro-grid system can replace the use of 495.21 tons of gasoline, and it is expected to reduce carbon dioxide and carbon monoxide emissions by 1,138.98 tons and 3.80 tons, respectively.

### **References**

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Multivariate Based Alkaline Electrolyzer Digital Twin Model Construction**

Tao Liang1, Zicong Liu1(B) , Hexu Sun2, and Jianxin Tan3

1 School of Artificial Intelligence, Hebei University of Technology, Tianjin 300130, China<EMAIL_ADDRESS>
2 School of Electrical Engineering, Hebei University of Science and Technology, Shijiazhuang 050018, China

3 Hebei Construction & Investment New Energy Group Co, Ltd., Shijiazhuang 050006, China

**Abstract.** Electrolytic water hydrogen production systems are highly coupled and operate under complex and dangerous conditions, making it difficult to carry out extreme experiments on physical objects. In this paper, the alkaline electrolyzer is studied and mathematical and three-dimensional models are developed for it. The System operation data shows that temperature, pressure and alkaline flow rate all have effects on the hydrogen concentration in oxygen and voltage. Among them, hydrogen concentration in oxygen is one of the important factors affecting the safety of the system, and changing both pressure and alkali flow rate respectively will cause significant changes in hydrogen concentration. Based on the system operation data, a multivariate nonlinear fitting of the empirical equation using Matlab was performed to establish the voltage model, Faraday efficiency model, hydrogen concentration in oxygen model and system pressure model of the alkaline electrolyzer. And the model simulation results were analyzed and verified theoretically, which were consistent with the actual engineering. The mathematical model of the alkaline electrolyzer is combined with the 3D model, and the digital twin model of the alkaline electrolyzer is controlled in real time by PLC. The mapping of the alkaline electrolyzer in the virtual space is realized, which provides an experimental platform for the subsequent study of wide power fluctuation.

**Keywords:** Alkaline electrolyzer · Digital twins · Mathematic model · Multivariate · Nonlinear

## **1 Introduction**

As the "ultimate energy source for mankind", hydrogen energy has the advantages of high calorific value, recyclability, cleanliness and non-pollution, which have strengthened the position of hydrogen energy in the future energy system in various countries [1]. Globally, more and more cities are actively adopting hydrogen strategies, and the development and innovation of hydrogen production technology is in full swing [2, 3]. "Green hydrogen, which is produced by powering electrolytic cells with renewable energy sources such as wind and light, is favored by scholars worldwide because of its low cost and zero carbon emission [4, 5]. The alkaline solution with high capacity and low cost is widely used to produce hydrogen by electrolysis [6], but due to the randomness and fluctuation of wind and light, the safety parameters of the system will exceed the critical value after acting directly on the alkaline electrolyzer, and the efficiency of hydrogen production will be greatly reduced by frequent starting and stopping, so the alkaline electrolyzer is not well adapted to the wide power fluctuation of renewable energy sources. In order to better study the control strategy to adapt to the wide power fluctuation, it is necessary to build a high-power alkaline electrolytic water hydrogen production digital twin system to realize the virtual mapping of the hydrogen production system in order to test the safe and stable operation conditions of the alkaline electrolyzer with wide power.

Alkaline electrolyzers with wide power fluctuations can reduce the efficiency of hydrogen production and increase the hydrogen content in oxygen of the system, thus increasing the danger of the system, and a lot of studies have been conducted at home and abroad to investigate the factors affecting the hydrogen concentration in oxygen. Zhang et al. [7] found that the system pressure can affect the hydrogen content in oxygen by experimenting with a 250 kW electrolyzer, and the electrolyzer can be operated stably at a wide power range of 30–100% by adjusting the system pressure, but they did not compare the effects of other process parameters. Ning et al. [8] conducted an experimental study on the electrolyzer with wide power from the perspective of safety and showed that proper adjustment of lye flow could stabilize the hydrogen content in oxygen within the safety range, but the system pressure was not considered. In order to study the control method of wide power, the establishment of mathematical model of the electrolyzer is particularly important. Fang et al. [9] proposed and simulated a control strategy for a modular switching electrolyzer based on the empirical equation given by Ulleberg [10], and the simulation results showed that this control strategy improved the hydrogen production rate. Ulleberg [10] established a thermal model and a mathematical model of the alkaline electrolyzer based on thermodynamics, heat transfer and electrochemical theory, and this model is applicable and has been widely used in the study of mathematical models of electrolytic cells. However, Ulleberg only considered the effect of temperature and ignored the effect of other factors on the electrolyzer. Mónica et al. [12] added the effect of system pressure to Ulleberg's model and developed a semi-empirical mathematical model for a 15KW electrolyzer, but this literature did not consider the alkaline flow rate, which was shown to have an effect on the hydrogen content in oxygen [8, 14]. Jiang et al. [11] developed a digital twin model of an alkaline electrolyzer based on experiments and principles with temperature as a variable, but did not visualize and control the model results in real time.

In this paper, the alkaline electrolyzer is studied and its mathematical model and three-dimensional model are established. The mathematical model includes voltage model, Faraday efficiency model, hydrogen concentration in oxygen model and system pressure model. The voltage model and the hydrogen concentration in oxygen model not only consider the pressure and temperature, but also take into account the alkali flow rate which has a great influence on both of them; the alkali flow rate is also used as one of the variables in the Faraday efficiency model, but the influence is very small. In this paper, a three-dimensional model of the hydrogen production system is also developed, since few studies have shown the mathematical model more visually and have controlled and tested it in a simple way. Therefore, a more accurate mathematical model of the alkaline electrolyzer is developed, simulated and validated, and finally combined with the 3D model to form a digital twin model of the alkaline electrolyzer.

## **2 Alkaline Electrolyzer Digital Twin Model Framework**

The digital twin model of the alkaline electrolyzer will be divided into a physical object layer, a data acquisition and control entity layer, an alkaline electrolyzer digital twin core entity layer, and an alkaline electrolyzer digital twin model application layer. The layers are interconnected with each other and progress towards the electrolyzer digital twin model layer by layer. The framework of the digital twin model of the alkaline electrolyzer is shown in Fig. 1.

**Fig. 1.** Alkaline electrolyzer digital twin model framework

**Fig. 2.** Process flow chart of electrolytic water to hydrogen system

### **2.1 Alkaline Electrolyzer Digital Twin Model Hierarchy**

The physical object layer is the physical object of the alkaline electrolytic cell. The hydrogen production system of electrolytic water studied in this paper mainly includes alkaline electrolytic cell, gas-liquid separation and post-processing system. The process diagram of the hydrogen production system of electrolytic water is shown in Fig. 2. The power supply supplies direct current to the electrolytic cell, and the gas produced by the alkaline electrolytic cell flows to the gas separator and scrubber through the alkaline liquid heat exchanger. The lye brought out by the gas is returned to the electrolytic cell through the lye filter under the action of the lye circulating pump. The data acquisition and control entity layer is the various sensors and control flow in the hydrogen production system of electrolytic water. This paper focuses on the core entity layer of digital twins. The established mathematical model is tested in the virtual simulation platform, and the model is controlled and verified by PLC. Finally, the running data are transmitted to the three-dimensional model in real time to realize the construction of the digital twin application layer of the hydrogen production system.

### **2.2 Mathematical Modeling Framework for Alkaline Electrolyzer**

The mathematical modeling process of alkaline electrolyzer integrates the methods of mechanism modeling and data modeling, updates the empirical equation based on experimental data and theoretical analysis, and then uses the operational data of the hydrogen production system to fit the empirical equation nonlinearly, and finally establishes the mathematical model of alkaline electrolyzer.

The mechanism modeling is based on the operation mechanism of the alkaline electrolyzer, the derivation and demonstration of the equations using the knowledge in the field of electrochemistry. The final mathematical model is suitable for the studied alkaline electrolyzer.

## **3 Alkaline Electrolyzer Digital Twin Model Construction**

#### **3.1 Alkaline Electrolyzer Mathematical Model Construction**

#### **Modeling of alkaline electrolyzer voltage characteristics**

The most commonly used voltage model was proposed in 2003 by Ulleberg [10], who derived an empirical equation for the voltage model of alkaline electrolyzers based on thermodynamics and electrochemical properties of alkaline electrolyzers, as shown in Eq. (1):

$$U = U\_{\rm rev} + \frac{r\_1 + r\_2 T}{A} I + s \ln(\frac{t\_1 + t\_2/T + t\_3/T^2}{A} I + 1) \tag{1}$$

where Urev is the reversible voltage, T is the bath temperature, I is the given current, and A is the area of the electrode. s is a specific factor, related to the type and power of the electrolytic bath.

Ernesto Amores et al. [12] based on experiments with a 15KW alkaline electrolyzer, proposed that the voltage model should incorporate the effect of system pressure, but still does not consider the effect of lye flow rate on voltage. The magnitude of the flow rate directly affects the conductivity of the lye and thus the voltage of the alkaline electrolyzer. Therefore, the voltage model of the alkaline electrolyzer should include the effect of the lye flow rate, as in Eq. (2):

$$U\_{cell} = U\_{rev} + (a+b+c)I\_s + s\ln[(t\_1 + \frac{t\_2}{T} + \frac{t\_3}{T^2})I\_s + 1] \tag{2}$$

In Eq. (2):

$$a = a\_1 + a\_2 T \tag{3}$$

$$b = b\_1 + b\_2 p \tag{4}$$

$$c = c\_1 + c\_2 v \tag{5}$$

In Eq. (5), v is the alkaline flow rate, and including the alkaline flow rate as a variable in the model will make the voltage model of the alkaline electrolyzer more accurate.

$$U\_{cell} = U\_{rev} + [(a\_1 + b\_1 + c\_1) + a\_2T + b\_2p + c\_2\nu]I\_s + s\ln[(t\_1 + \frac{t\_2}{T} + \frac{t\_3}{T^2})I\_s + 1] \tag{6}$$

Equation (6) is the voltage of each cell, and the total voltage of the alkaline electrolyzer is the number of cells multiplied by the cell voltage.

$$U\_{elec} = n\_{cell} \cdot U\_{cell} \tag{7}$$

#### **Modeling of Faraday efficiency characteristics of alkaline electrolyzer**

In electrolytic water hydrogen production systems, the amount of hydrogen produced per unit time is closely related to the amount of electricity consumed by the alkaline electrolyzer per unit time, and the Faraday efficiency is defined as the ratio of the actual hydrogen produced by the system per unit time to the theoretical amount of hydrogen produced per unit time, which can be expressed by an empirical equation, derived by Ulleberg et al. [10]:

$$
\eta\_F = \frac{I\_s^2}{f\_1 + I\_s^2} \cdot f\_2 \tag{8}
$$

To take the role of temperature and flow rate into account, Eq. (8) is modified by updating *f*1, *f*2 as a function of temperature and flow rate as variables:

$$f\_1 = f\_{11} + f\_{11}T + f\_{\forall 1}V \tag{9}$$

$$f\_2 = f\_{22} + f\_{l2}T + f\_{l2}v \tag{10}$$

#### **Modeling of hydrogen concentration characteristics in oxygen in alkaline electrolyzer**

In this paper, we address the modeling of hydrogen concentration in oxygen. According to the previous discussion, the hydrogen content in oxygen can be modeled theoretically based on temperature, pressure, and lye flow rate, etc. Hug et al. [13] in 1993 gave an empirical formula for calculating the hydrogen concentration in oxygen:

$$c\_{HO} = C\_1 + C\_2T + C\_3T^2 + (C\_4 + C\_5T + C\_6T^2)e^{\frac{C\_7 + C\_8T + C\_9T^2}{I\_3}} \tag{11}$$

Mónica et al. [12] adds the effect of system pressure, but still does not take into account the effect of alkali flow, this paper adds the effect of alkali flow on the basis of Eqs. (11), (12) makes the calculation of hydrogen concentration in oxygen more accurate.

$$c\_{H0} = \left[C\_1 + C\_2T + C\_3T^2 + (C\_4 + C\_5T + C\_6T^2)e^{\frac{C\_7 + C\_8T + C\_9T^2}{I\_5}}\right]$$

$$+ \left[E\_1 + E\_2p + E\_3p^2 + (E\_4 + E\_5p + E\_6p^2)e^{\frac{E\_7 + E\_8p + E\_9p^2}{I\_5}}\right]$$

$$+ \left[F\_1 + F\_2v + F\_3v^2 + (F\_4 + F\_5v + F\_6v^2)e^{\frac{F\_7 + F\_8v + F\_9p^2}{I\_5}}\right] \tag{12}$$

#### **3.2 Alkaline Electrolyzer 3D Model Construction**

In this paper, we firstly established a 3D model of the hydrogen production system by using Sketch Up, and then imported the established 3D model into the corresponding topology editor. Based on the established 3D model, this paper uses HT for Web to bring the 3D model closer to the physical entity, mainly by using WebGL and other technologies to visualize the flow of liquid in the system and the circulation pump operation and other physical movements, as shown in Fig. 3.

**Fig. 3.** HT for web-based digital twin model for hydrogen production system

## **4 Simulation Study of Digital Twin Model of Alkaline Electrolyzer**

In this paper, the parameters of the constructed mathematical model of the alkaline electrolyzer were determined based on the single-day operating data of the 1MW alkaline electrolyzer in Chongli, Zhangjiakou, by using Matlab to perform multiple nonlinear regression on the model. The fitting results are also elaborated and analyzed. The parameters of the alkaline electrolyzer are shown in Table 1.

**Table 1.** Parameters of 1 MW alkaline electrolyzer.

#### **4.1 Alkaline Electrolyzer Voltage Model Simulation Study**

The simulation of the voltage model is carried out according to Eq. (6), and there are four parameters in the updated voltage model, so two of them are fixed separately, and the surface plot of the voltage model is drawn with the other two parameters as variables. As shown in Fig. 4, this paper analyzes the factors affecting the alkaline electrolyzer voltage with (temperature-current density), (pressure-current density), and (lye flow-current density) as variables, respectively.

**Fig. 4.** Results of the voltage model by fixing different parameters: (a) (P = 1.5 MPa, v = 18.5 m3/h); (b) (T = 78 °C, v = 18.5 m3/h); (c) (P = 1.5 MPa, T = 78 °C)

Figure 5 shows more clearly the effect of temperature, pressure and flow on the cell voltage, from which it can be seen that temperature has the most dramatic effect on pressure, which is the reason why the literature [10] only uses temperature as the only variable in the cell voltage model. In Fig. 5(a, b, c) are taken for different temperature, pressure and flow rate to observe the variation of the cell voltage. Where Fig. 5(c) plots the cell voltage for different lye flow rates, it can be seen that there is a slight decrease in voltage as the lye flow rate increases. The increase in the lye flow rate leads to an increase in the amount of lye cooled per unit time, which leads to a decrease in the lye temperature. The voltage tends to increase as the temperature decreases, which is also shown in Fig. 4(a). On the other hand, the increase in the flow of lye will take away the air bubbles adhering to the electrode in time, which will lower the resistance and therefore the voltage of the cell. It can be seen that the latter cause has a greater effect on the voltage than the former one, because the change in resistance directly affects the voltage, and therefore it will present a slight decrease in voltage.

**Fig. 5.** Cell voltage at different parameter values: (a) temperature; (b) pressure; (c) lye flow

#### **4.2 Simulation Study of Faraday Efficiency Model for Alkaline Electrolyzer**

The simulation study of Faraday efficiency model was carried out according to Eqs. (8), (9) and (10), and the Faraday efficiency of alkaline electrolyzer was plotted with (temperature-current density) and (alkali flow-current density) as variables, respectively, as shown in Fig. 6.

In Fig. 7(a), since an increase in temperature leads to a faster movement of the anions and cations in the alkali solution, the resistance of the electrolyte decreases, which can lead to a small amount of current not being used to produce hydrogen and therefore leads to a decrease in Faraday efficiency. In Fig. 7(b), it can be seen that the effect of alkali flow rate on Faraday efficiency is not very large. It was stated earlier that an increase in the lye flow rate leads to a decrease in temperature, but it also leads directly to a decrease in resistance, a cause also explained in the voltage model, and these two causes have opposite effects on the Faraday efficiency of similar order of magnitude. Therefore, the effect of the lye flow rate on the Faraday efficiency is weak.

#### **4.3 Model Simulation Study of Hydrogen Content in Oxygen**

According to the mathematical model of hydrogen concentration in oxygen established in this paper, such as Eq. (12), the variation law of hydrogen concentration in oxygen is plotted with temperature, pressure, and lye flow as variables, as shown in Fig. 8(a), (b), and (c) in Fig. 9 respectively plot the curves of the hydrogen concentration in oxygen varying with the current density under different temperatures, pressures, and lye flow rates. In Fig. 9(a), the current is fixed, and as the temperature increases, the concentration of hydrogen in oxygen increases, and the increase in temperature causes the hydrogen dissolved in the alkali solution to escape and the thermal motion of the gas molecules to accelerate, thereby increasing the diffusion rate. An increase in pressure will lead to an increase in the solubility of the gas, but it will also increase the diffusion rate of gas molecules, as shown in Fig. 9(b). The final result is that the increase in pressure will increase the hydrogen content in oxygen. The lye circulates between the electrolytic cell and the separator under the action of the lye circulation pump. If the flow rate of the lye increases, the amount of lye returned to the hydrogen-oxygen separator per unit time will also increase. Moreover, the high permeability of hydrogen will cause a small amount of hydrogen to dissolve in the lye, which will lead to an increase in the concentration of hydrogen in oxygen, as shown in Fig. 9(c).

### **5 Conclusions**

Based on the data and mechanism, this paper constructs a digital twin model of a 1MW alkaline electrolyzer, including a voltage model, a Faraday efficiency model, a hydrogen concentration model in oxygen, and a system pressure model. The construction of the model is based on data and mathematical formulas, and the simulation results are consistent with the theoretical analysis.

In this paper, we use digital twin technology to simulate the operating characteristics of the alkaline electrolyzer to ensure the safety of the real system operation. The operation

**Fig. 6.** Results of the Faraday efficiency model by fixing different parameters: (a) v = 18.5 m3/h; (b) T = 78 °C

**Fig. 7.** Faraday efficiency at different parameter values: (a) temperature; (b) lye flow

**Fig. 8.** Results of the hydrogen content in oxygen model by fixing different parameters: (a) (P = 1.5 MPa, v = 18.5 m3/h); (b) (T = 78 °C, v = 18.5 m3/h); (c) (P = 1.5 MPa, T = 78 °C)

characteristics of the hydrogen production system are complex, and the mathematical models of the valve separator and compressor have not been completed, and the digital twin model of the whole hydrogen production system is yet to be solved.

**Fig. 9.** Hydrogen content in oxygen at different parameter values: (a) temperature; (b) pressure; (c) lye flow

**Acknowledgment.** This research was supported by the Science and Technology Plan Project of Hebei Province of China (Grant No. 19210108D, 19214501D, 20314501D, F2021202022).

## **References**

280 T. Liang et al.

**Open Access** This chapter is licensed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license and indicate if changes were made.

The images or other third party material in this chapter are included in the chapter's Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the chapter's Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder.

# **Construction and Simulation of Digital Twin Model and Electrolyzer Wide Power Adaptation Model for Alkaline Electrolytic Water Hydrogen Production**

Zhe Zhang1, Wenbo Yang2, Liwei Wang3(B) , Tao Liang2, and Zicong Liu2

1 Science and Technology Innovation Research Academy (Hebei), CAICT Institute Co., Ltd., Baoding 071000, Hebei, China

2 School of Artificial Intelligence, Hebei University of Technology, Tianjin 300130, China

3 Guantao County Party Committee of Handan City, Hebei Province, Handan 057450, Hebei,

China<EMAIL_ADDRESS>
**Abstract.** Combining the framework of digital twin and the working mechanism of electrolytic water hydrogen production, a digital twin model of alkaline electrolytic water hydrogen production is constructed, and the influence of electrolyzer cell voltage by temperature and pressure is analyzed according to the mathematical model of electrolytic water hydrogen production. In order to improve the adaptability of the electrolyzer of the hydrogen production system to the power fluctuation of renewable energy input, a wide power adaptation model with multiple electrolyzers sharing one set of gas-liquid handling device is proposed. The case study shows that by reasonably selecting the electrolyzer model of the hydrogen production system, the use of the wide power adaptation model can effectively adapt to the fluctuation of wind power and improve the adaptation capability of the electrolyzer to wide power fluctuations.

**Keywords:** Electrolytic water to hydrogen · Digital twins · Electrolyzer · Wide power

## **1 Introduction**

As a green energy source with high calorific value, diverse sources, clean and environmental protection, and high conversion efficiency, hydrogen energy has been recognized as a clean energy carrier with zero emission and zero pollution. Hydrogen energy, which is called the ultimate energy in the 21st century, has received attention and research from scholars all over the world, and more and more countries are putting the development of hydrogen energy in the forefront of energy development [1, 2].

Electrolytic water to hydrogen technology is widely used in the hydrogen production industry for its simple preparation process, clean product and high purity. To achieve large-scale hydrogen production from renewable energy sources, the input energy for hydrogen production from electrolytic water is usually generated from renewable energy sources such as wind and light energy, whose input power is volatile and uncertain [3]. The electrolyzer is the core part of the electrolytic water hydrogen production process, and its performance has a great influence on the electrolytic hydrogen production system. Frequent fluctuations in the input power of the electrolyzer will cause the input current to fluctuate as well, resulting in frequent starts and stops of the electrolyzer, which will not only reduce the service life of the electrolyzer itself, but also lead to a decrease in its hydrogen production, and even affect the purity of the product and the concentration of hydrogen in oxygen, thus affecting the safety of the whole electrolytic water hydrogen production system [4]. Therefore, the mathematical model and simulation of hydrogen production from electrolytic water plays an important role in the safety of electrolytic water system. Ulleberg proposed an advanced mathematical model for alkaline electrolyzers based on basic thermodynamics, heat transfer theory and electrochemical relationships, which can be used to predict the voltage, hydrogen production, efficiency and operating temperature of electrolytic cells in electrolytic water systems [5]. Tijani et al. investigated the main parameters affecting the performance of the electrolyzer by means of basic thermodynamic and electrochemical reaction-related models [6]. Shen X. et al. developed a mathematical model of the equivalent impedance characteristics, electrothermal characteristics and power regulation characteristics of an alkaline electrolyzer [7]. Górecki et al. described the voltammetric characteristics of the electrolyzer and considered the effect of the concentration of potassium hydroxide solution on the hydrogen production, and verified the correctness of their model experimentally by varying the electrolyte concentration [8]. The electrolyzer model developed in the above literature provides a valuable reference for modeling and simulation of hydrogen production from alkaline electrolytic water, but does not take into account the effect of fluctuations in input power on the electrolyzer.

Since the operating condition of the electrolyzer is limited by the fluctuation of renewable energy input power, the lower power limit of the electrolyzer is generally set at 20–25% of the rated power to utilize as much renewable energy as possible. To improve the ability of electrolyzer to resist the fluctuation of renewable energy input power and to improve the hydrogen production rate of electrolytic water hydrogen production system, one can consider changing the electrode material of electrolyzer, increasing the surface area of electrode, optimizing the diaphragm material, using advanced electrolyte or adding new catalyst, etc. However, the research on the electrolyzer material is a long and complicated process, which cannot meet the demand of electrolyzer to adapt to wide power in the short term. Secondly, the feasibility of changing the structure of the electrolytic water hydrogen production system and optimizing the control strategy of the electrolytic system has been proved and more and more scholars have studied it. Fang R et al. proposed the combination of supercapacitor and modular control strategy to optimize the operation mode of the electrolyzer considering the effect of wind power fluctuation on the electrolyzer, thus extending the life of the electrolyzer and improving the hydrogen production [9]. Hong Z. et al. controlled the electrolyzer array by a segmented fuzzy control method as a way to improve the hydrogen yield of the electrolytic water hydrogen production system considering the efficiency of hydrogen production from wind power [10]. Shen et al. proposed a control strategy for the rotation of alkaline electrolytic water hydrogen production electrolyzer arrays, which enables the electrolyzer arrays to operate or shut down in different operating states sequentially according to the rotation cycle, improving the safety of the electrolytic water hydrogen production system and extending the service life of the electrolyzer [11]. Liu et al. developed a wide power adaptation model for alkaline electrolyzers to improve the adaptability of electrolyzers to input power fluctuations and to improve the level of wind power consumption [12]. The above literature does not provide a clearer description of the power settings for the wide power model of the electrolyzer.

Based on the above research, this paper proposes a digital twin-based alkaline electrolytic water hydrogen production model and a multi-electrolyzer adaptive wide power model, which combines the working mechanism of alkaline electrolytic water hydrogen production and digital twin technology to construct a digital twin framework for alkaline electrolytic water hydrogen production. And it is verified by simulation that the wide power model proposed in the paper can improve the ability of the electrolyzer module to adapt to wind power fluctuations.

### **2 Alkaline Electrolytic Water Digital Twin Framework**

Digital twin technology has attracted much attention in the fields of intelligent manufacturing and energy monitoring and analysis, and realizing information, digitalization and intelligence in the new energy field is a hot research topic in the energy field [13, 14]. Applying digital twin technology to the field of alkaline electrolytic water hydrogen production, which is a data visualization presentation of electrolytic water hydrogen production system, this paper gives the framework of renewable energy electrolytic water hydrogen production digital twin by combining the framework of digital twin and the working mechanism of electrolytic water hydrogen production.