Economic Model Predictive Control for Multi-Energy System Considering Hydrogen-Thermal-Electric dynamics and Waste Heat Recovery of MW-level Alkaline Electrolyzer

.


Introduction
Energy sustainability and carbon emission reduction have received increasing attention worldwide due to the rapid depletion of fossil fuels and related environmental pollution problems.Some relevant works have recently focused on natural resources optimization [1,2], CO 2 emission of industrial processes [3], providing feasible solutions for energy-saving and carbon reduction.Another alternative solution is to exploit clean fuels for end-consumers such as chemical industries and transportation.In particular, green hydrogen from water-electrolysis technologies consuming renewable electricity is highly considered as a promising solution, due to its significant contributions to energy decarbonization, emission reduction and sustainability.The technoeconomic feasibility of hydrogen energy via renewable power has been explored globally [4][5][6].The renewable-based green hydrogen has been proved to be already cost-competitive in niche applications like wind parks integrated with power-to-gas facilities in Germany and Texas for small and medium-scale supply, and will have a continuous cost reduction within a decade [7].
Moreover, the water-electrolysis system (i.e.electrolyzer) converting power to hydrogen (P2H) also offers flexibility via load regulation and energy storage to a multi-energy system (MES) [8], which supports optimal operations of distributed energy resources (DERs) [9].Several rule-based strategies (RBSs) have been presented to manage the energy flow between electrolyzers and other DERs in order to achieve an optimal sizing in various MES setups, such as standalone hybrid energy system with storage [10][11][12], an off-grid wind-hydrogen production system [13], a grid-connected wind-hydrogen system [14,15].In the RBSs, the operation of DERs follow pre-set rules.For instance, a simple power balancing rule under excess renewable power in an off-grid system is to first allocate the excess power to charge battery-ESS (BESS), then hydrogen-ESS (HESS) [10,12].The main drawback of the RBSs is their inefficiency of operating systems incorporated with numerous DERs due to the increased level of rule complexity.Meanwhile no economic criteria in the RBS possibly causes a relatively higher operation cost.To overcome these barriers, the authors use a unit commitment framework to formulate a mixed-integer linear programming (MILP) based operation strategy [ 16 17], which is integrated into the sizing algorithm for a standalone microgrid with BESS and HESS.Besides, the daily optimal operation on electrolyzer installed in an active distribution network [18], electricity-hydrogen integrated energy system [19] and a microgrid [20,21] are presented to minimize the systems' operation cost, where the waste heat recycled of electrolyzer is considered.In addition, the economic model predictive control (EMPC) strategies employing an economic-related objective function for real-time control under complex and uncertain conditions, have lately been proved to effectively manage the portfolio of energy usage for a hydrogen-based MESs [22].The authors adopt the EMPC controller to minimize the operation costs of HESS, meanwhile enforcing the fulfillment of dynamic constraints of HESS especially involving the switching between different operating modes formulated by a mixed-logic framework [23].Similarly, the dynamic state-switching constraint of HESS with the mixed-logic framework is also considered and integrated into an EMPC controller [24], where an optimal economic operation of a hydrogen-based microgrid is conducted while participating in different electricity markets.In [25], the authors utilize a particle swarm optimization (PSO) algorithm to solve an EMPC controller to achieve the optimal economic dispatch of a hydrogen-based microgrid.A bi-level decision framework proposed in [26] incorporates EMPC-based operation management into investment planning, which also demonstrates the effectiveness of using EMPC to achieve operation cost reduction.In [27], a data-driven algorithm and MPC are integrated into a two-level hierarchical MPC for optimally managing a hybrid ESS-based building microgrid.The data-driven algorithm can improve the MPC model accuracy, and in real-time adjust the cost function to satisfy the annual self-consumption rate at the minimum cost.
A summary of the aforementioned studies is given in  consumed vs hydrogen production (E-H relation) in an AE, via assuming a constant electrolysis efficiency for AE in its operation range, or utilizing a piece-wise linearization method to assume a constant efficiency for each piece of the operation range.Besides, an empirical linear function is also directly utilized to formulate the E-H relation.These assumptions of a constant electrolysis efficiency possibly misestimate the operating states of electrolyzer like stack temperature and hydrogen production.Several studies try to improve the model accuracy by utilizing a nonlinear electrolyzer model.In [28], the nonlinear efficiency is captured by using polynomial fitting to follow the electrolyzer's polarization performance curves.Similarly, a smoothing spline method in [25] is used to fit experimental data of E-H relation.In both studies, complex nonlinear optimization models are derived and solved by the PSO algorithm.However, these PSO algorithms cannot always ensure converging to an accurately global optimum, especially for the nonlinear optimization models with multi-partial optimism.Another limitation is that only fewer works considered the possibility of waste heat recovered during electrolysis excepting [18][19][20][21], which is an important revenue stream for MW-scale electrolyzers.
Therefore, further research is needed regarding how to integrate nonlinear dynamic behaviors of MW-level AE due to heat recovery and varying electrolysis efficiency into a techno-economic optimal operation problem that can be solved within a timeframe for real-time operation.In this respect, this paper develops an EMPC oriented operation strategy for an MES integrated with a power-to-hydrogen&heat (P2H 2 ) model for AE.The main contributions of this paper include: (1) Clarifying an integrated P2H 2 model to characterize the nonlinear interaction of electricity-heat-hydrogen energy flow in an AE system, considering its dynamic heat recovery and varying electrolysis efficiency.This model distinguishes itself by exploiting the enhanced operational flexibility of AE due to enabling waste heat recovery.

Table 1
Current studies regarding optimal energy transaction of hydrogen-based energy system.(2) Developing an EMPC-MILP based operation optimization model to implement the optimal daily operation of MES integrated with the nonlinear P2H 2 model.This optimization model integrates MILP with a post-evaluation of optimal solutions, which is computationally efficient and fast to find precise solutions than directly solving nonlinear optimization problems.(3) Validating the feasibility of the proposed operating strategy based on real data of a Danish energy island Bornholm.(4) The proposed method contributes to additional benefits of 59% and 38% on operation cost savings compared to RBS and the economic strategy without P2H 2 model, respectively.
The remainder of this paper is structured as follows.Section 2 presents the system configuration of the MES in Bornholm Energy Island.In section 3, the integrated P2H 2 model of AE is introduced.Section 4 describes the EMPC-MILP based operating strategy in detail.In section 5, comparative case studies and relevant sensitivity analysis are presented.Some conclusions and future work are provided in section 6.

System configuration of Bornholm Energy Island
Bornholm Island is a bright Green Energy Island in the Baltic Sea, and developing towards an MES involving electricity, heat and gas, which currently consists of renewable power plants like wind turbine (WT) system, waste-based combined heat and power (CHP) plant, as well as various residential and industrial buildings [29].Moreover, the Danish Government has approved to establish it into a low carbon energy island in 2030 [30] particularly by making use of Power-to-X technologies like P2H, therefore it is crucial to optimally deploy the placement of Powerto-X plants [31] and unleash their operational flexibility from optimal dispatch strategies.
Given that the current configuration and prospect in Bornholm island, this paper utilizes a hypothetical MES integrated with P2H technologies to equivalently imitate a practical Bornholm Energy Island in the future.As depicted in Fig. 1, apart from the actual WT, CHP plant and electrical load in Bornholm, the equivalent MES also includes a battery-ESS (BESS) and hydrogen-ESS (HESS) comprised of an AE plant, hydrogen tank and fuel cell plant.The MES is connected to two external energy systems including an electrical power system (EPS) and a district heating system (DHS).The EPS is linked through a common AC bus which also integrates various power plants and loads, while the DHS is indirectly connected to AE through an additional heat exchanger (HE).Meanwhile, the stored hydrogen in a hydrogen tank could be directly sold to hydrogen consumers.
To achieve optimal economic operations of this MES, an EMPC-MILP based operating strategy is developed.The basic idea is to make optimal decisions (U) to optimize the portfolio of energy usage and production in the MES, and its transactive energy with external EPS and DHS.Particularly, the real operating data of Bornholm island in terms of the power production from wind and CHP, the gross consumptions of demands and the energy prices, are utilized to validate the technoeconomic feasibility of the proposed operating strategy.All the parameters of the MES are listed in Appendix A.

Electrochemical model
AE system is a kind of commercial water-based electrolyzer with MW-level application currently.It mainly consists of an electrolyzer stack combined with many cells and ancillary devices [18,32].Fig. 2 shows the topology and internal power flow of AE system consuming DC electricity to produce hydrogen while releasing waste heat during the electrolysis process.Regarding the electrical part, a temperature-based U-I model is utilized to characterize the relation between stack voltage and current while considering the stack temperature effect [32], which can be formulated by: Besides, the electrolysis efficiency could be approximately characterized by the ratio of the cell voltage and thermoneutral voltage [33], which can be expressed by: The detailed formulations of (1) and thermoneutral voltage in (2) are presented in Appendix B according to [34][35][36], which are indicated that the f i () in ( 1 Equation ( 3) implies that f 4,5 () with respect to the stack temperature and consumed power captures the nonlinear power flow relation in AE system due to the nonlinear relation between time-variant temperature and electrolysis efficiency.Many researchers try to simplify the power flow relation into a linear model by assuming a constant efficiency meanwhile ignoring the impact of time-variant stack temperature.However, this assumption will naturally reduce the model accuracy on the dynamic behaviors of AE.

Dynamic temperature model
In terms of heat-transfer process, as shown in Fig. 2, a water cycling subsystem is setup to provide an allowable operating temperature for the AE system.Considering the AE stack as an equivalent thermal tank with a lumped capacitance, the discrete dynamic temperature response can be modelled by [32]:  temperature evolution appears in a nonlinear process under the variable consumed power.

Hydrogen production model
Regarding the hydrogen production of the AE system, the higher heat value (HHV) of hydrogen Q hhv is introduced to evaluate the total hydrogen production rate, due to the relatively low operating temperature of AE [37].Hence, the mass rate of hydrogen produced over a time horizon can be expressed by: Assuming a constant Q hhv , the mass rate of hydrogen produced will be proportional to the consumed power to produce hydrogen (P H2 t ).Thus, it will nonlinearly vary with the consumed power, because of the nonlinear relation between and consumed power according to (3).

Integrated P2H 2 model
Combining the three sub-models formulated by (1)~( 5), an integrated P2H 2 model with high nonlinearity is obtained, as visualized in Fig. 3(a).It characterizes the interaction of the AE stack from a crosssectoral perspective including electricity, thermal and hydrogen, by capturing the dynamic behavior of stack temperature and electrolysis efficiency.Compared to the traditional P2H role, more operational flexibility could be unlocked by introducing the additional flexibility from the power-to-heat aspect.As depicted in Fig. 3(b), the area ABC characterizes the operation range of AE which represents the crosssectoral power interaction in terms of P heat t , P H2 t and P ely t , considering the dynamic behaviors of stack temperature and electrolysis efficiency.However, if assuming a constant operating temperature like 70 • C, the new operation tracking is restricted to be operating only with the line CD (the black dotted line) instead, thereby lowering the operational flexibility.In addition, it also indicates the electrolysis efficiency is varying with different operating points instead of a constant value, and the relation between P heat t and P H2 t is visibly nonlinear especially in a relatively low electrolysis efficiency.
Therefore, the presented P2H 2 model can better unleash the potentially operational flexibility from a cross-sectoral perspective, meanwhile more accurately modelling the dynamic response of AE by characterizing the dynamic evolution of electrolysis efficiency during the operating process.However, the high nonlinearity of this model would arise some challenges for optimally designing the real-time control strategies and scheduling the operation of AE system.

EMPC-MILP based operating strategy
In order to achieve an economic operation of MES, an economic operation model is firstly developed, where the objective of minimizing the operation cost is conducted while constrained by physical limits of MES.Furthermore, in order to handle the computation complexity due to the nonlinearity of the P2H 2 model, an EMPC-MILP solution is proposed to implement the economic operation model meanwhile keeping the model accuracy of AE system.The economic operation model in the EMPC framework can be formulated as MILP model considering a determined electrolysis efficiency, which is easy and fast to solve.Also, the EMPC framework will update the determined electrolysis efficiency based on the P2H 2 model and solutions of the MILP optimizer in each prediction horizon, thereby retaining the model accuracy of the P2H 2 model for AE system.

Objective function
The optimization objective in the economic operation model is aiming to achieve the minimization of total operation cost consisting of the variable operation cost, and the utilization costs for BESS and HESS [16].The variable operation cost over a given prediction horizon N p at time k can be formulated by: where the first term describes the cost of electricity purchased from external EPS, and the second term shows the penalty cost for wind curtailment.Besides, the revenues from selling heat recovered of AE and selling hydrogen are considered as well, as denoted by the third and fourth terms respectively.Regarding the utilization costs for BESS and HESS, a major concern of battery is its aging and degradation, which determines the allowable lifetime of BESS.Thus the utilization cost of BESS during charging and discharging mainly considers its capital cost and degradation [16] as given by (7).HESS utilization costs is composed of the capital cost, and the operation and maintenance cost as expressed by (8).A binary variable δ fc t is introduced for the fuel cell to determine on/off states, but the electrolyzer is assumed to always be operating to prevent the repeated startup, thereby avoiding an additional startup cost.16) ~ (17).The power production of fuel cell plant is limited by (18).Besides, the operation of AE system should follow the developed P2H 2 model as indicated by (1) ~ (5).Moreover, due to the AE stack always been operating, the consumed power of AE is constrained by (19), meanwhile following an operating temperature limit by (20) for the safe operation of AE stack.

Solution in EMPC-MILP framework
Based on the previous objective functions and constraints represented by (1) ~ (20), the economic operation model over a given horizon N p in a general manner can be formulated by: min U,Δ ( J op + αJ bess + βJ hess where two weight factors (α and β equal 0.1)are used to scale the utilization costs of BESS and HESS, in order to highlight the significance of the first variable operation cost, thereby exploiting the operational flexibility of DERs as possible on contributing to an economic operation.In (21), the constraints related to the function f(.) are nonlinear due to the strong nonlinearity of the P2H 2 model, and several binary variables are introduced.Therefore, the economic operation model is formulated as a typical mixed-integer nonlinear programming (MINLP) which is not easily fast to find the global optimal solutions when directly solving it.However, Fig. 3 indicates the nonlinearity of P2H 2 model is essentially due to the nonlinear relation between electrolysis efficiency and power consumed.When utilizing a constant efficiency, the dynamic temperature model and hydrogen production model will be thus linearized.Consequently, in the presented EMPC-MILP solution, the state variables in ( 21) are replaced with the new forms by (22), and considering a constant electrolysis efficiency given by (23).The original MINLP will be accordingly converted to be a MILP which is easy to solve based on existing commercial solvers (e.g.Gurobi [38]).Meanwhile, the utilized constant efficiency will be continuously updated in the plant modular of the EMPC framework before receding the prediction horizon.
η ely t|k = η ely opt|k (23) Fig. 4 shows the control diagram of the proposed EMPC-MILP based algorithm for implementing an economic operation of MES.The detailed implementing procedure is as follows: Step 1: To sample the historical data of Bornholm island in terms of the electricity profiles and energy prices over a prediction horizon N p at time k.The initial values of state variables and electrolysis efficiency are given as input profiles.
Step 2: According to ( 22) and ( 23), the optimizer could be modelled as a MILP optimization under a given η ely opt .Solving the MILP optimization, the optimal control sequence u opt is obtained.But only the first element u opt (0|k) is chosen as the final optimal control demands while the remaining solutions are discarded.Hence, the control horizon equals one hour.
Step 3: To predict the states variables at time k + 1 in the nonlinear plant model, using a series of linear temporal functions indicated by ( 4), ( 12) and ( 16) based on the obtained u opt (0|k) and state variables at time k.Besides, the electrolysis efficiency at time k + 1 is also predicted according to the developed nonlinear P2H 2 model by inputting P ely opt in u opt (0|k) and T ely opt at time k, and hence obtaining the updated η ely opt .
Step 4: To recede the prediction horizon by increasing k to k + 1, and returning to step1and repeating step (1) ~ step (4) until -finishing the whole simulation (N = 24 h).

Case description
In order to validate the proposed EMPC-MILP based operating algorithm for MES, the real data of Bornholm island in 2018 are used as input datasets for the proposed algorithm to evaluate its performance and relevant robustness, and the whole algorithm is run on the Julia 1.5.3 with JuMPv0.21.6.
Firstly, as shown in Fig. 5, the energy portfolio of wind power, CHP power, demands and energy prices in Bornholm island on June 21, 2018  are utilized, where energy prices include the day-ahead electricity price for DK2 from Nordpool [38] and the heat price offered by a DHS operator in Denmark.Besides, a constant low price of about 0.9 € is adopted to sell hydrogen considering the deployment of the hydrogen energy towards a decreasing price in the future.In order to evaluate the economic benefits and superiority of the proposed algorithm, three cases under different operating strategies are conducted for comparisons, based on the given energy portfolio: • Case 1: Rule-based strategy [39] • Case 2: MILP based strategy with constant electrolysis efficiency • Case 3: The proposed EMPC-MILP based strategy with the P2H 2model Case 1 is set as a baseline related to a non-economical operating strategy, where an improved RBS is carried out for the MES of Bornholm island.The detailed principle is presented in our previous work [39].The deployment of network power (P net ) between the two ESSs groups follows the rules: 1) BESS has a higher priority than HESS; 2) after meeting the BESS and HESS, the rest power will be exchanged with the external power grid.Thus, the cost-effectiveness of the proposed strategy (Case 3) can be directly proved by their comparisons between Case 1 and Case 3. Case 2 executes an economic optimization-based operation strategy with the assumption of constant electrolysis efficiency of AE, just like what a few studies have done [23,24].Such a case will facilitate the economic operation for an MES compared with RBS.However, the assumption of constant electrolysis efficiency might lead to an inaccurate estimation of the gross operation cost, and even some physical states break operation limitations.Consequently, the impact and importance of varying electrolysis efficiency in the proposed strategy can be revealed from the comparisons between Case 2 and Case 3.
In addition, to evaluate the robustness of the proposed algorithm and clarify the impact of input parameters, the sensitivity analysis of this algorithm is conducted.The performance comparison of the aforementioned three cases is implemented by choosing different initial states of ESSs, and different energy portfolios on other days in 2018 particularly including a wind-rich day with negative electricity price (January 1, 2018) and a wind-deficit (December 9, 2018) day.

Benefits on wind curtailment reduction
Fig. 6 shows the power scheduling results of different DERs in the MES under the three cases.During the wind-deficit period (at 6:00-14:00), Fig. 6(a) and (b) show the BESS and fuel cell are forced to generate electricity as much as possible to compensate for the local production shortage from WT and CHP.Due to their capacity limits, the MES needs to purchase electricity from the grid.Fig. 6(c) shows the amounts of electricity purchased from the grid are almost the same in  1 Cost_pur: electricity cost purchased from grid. 2 Cost_cur: wind curtailment cost. 3Cost_H 2 : Cost of selling hydrogen (negative value means revenue). 4Cost_heat: Cost of selling heat to DHS (negative value means profits).

Table 4
Comparison of various cost terms under three cases (€).

Benefits on operation cost reduction
Table 3 summarizes the detailed comparisons of the variable operation costs under the three cases.It shows Case 3 prompts the lowest curtailment cost of 2039.71€due to effectively avoiding enormous wind curtailment.It also contributes to the highest profits from selling hydrogen compared to the other two cases, and higher profits of heat recovery than Case 1. Accordingly, the sharp reduction of wind curtailment cost and higher profits from selling hydrogen in Case 3 overall arise to the lowest variable operation cost (Cost_op) of 2877.64€than Case 1 and Case 2, as shown in Table 4.It also indicates that the proposed algorithm is able to achieve an economic operation of BESS and HESS by optimizing their charging/discharging power of BESS and power produced by fuel cell, decreasing utilization costs to a lower level than Case1 and Case2.Therefore, the proposed algorithm ensures the lowest total operation cost (Cost_sum) of 5560.49€, which implies additional cost savings of 59% (9217.07€)and 38% (5404.74€)compared to Case 1 and Case 2, respectively.

Benefits on operation flexibility of ESSs
Fig. 7 illustrates the proposed P2H 2 model can enable the AE system to produce hydrogen and simultaneously recover waste heat, which unleashes cross-sectoral flexibility of the AE system.Fig. 7(a) shows the amount of heat recovered in Case1 is quite rare during the electrolysis process even absorbing heat from DHS to maintain the required temperature of electrolyzer most of time.In contrast, both Case 2 and Case 3 during 15:00-24:00, recycle much waste heat due to the economic incentive to earn profits from heat recovery.It should be noted that the electrolyzer in the two cases needs the heat supplying from DHS to maintain the lowest temperature during 6:00-14:00, which is because the low consumed power causes the low heat production by itself.Besides, Fig. 7(b) indicates Case 3 brings a higher benefits than Case 2 via hydrogen selling, thereby exploiting more profits from hydrogen.
Due to the time-variant heat recovered, the stack temperature is also varying, as shown in Fig. 8.It illustrates Case 3 brings a more stable operating temperature response with slightly varying around the initial set-point of 60 • C, which implies the proposed algorithm is expected to maintain the ideal operating temperature by pre-setting a desired operating point.Besides, the SOCs in Case 2 and Case 3 do not reach their maximum (80% rated capacity), which indicates the high charging power of battery is not be restricted by its capacity limitation, thus the cost-optimization algorithm enhances the operational flexibility of BESS to some extent compared to RBS.Similarly, the hydrogen tank has more flexibility in Case 2 and Case 3, because their VLH is adjusted to a lower level instead of being limited by its maximum capacity.
It is thus concluded that the proposed strategy is able to unleash more operational flexibility of ESSs via optimal operation, performing more reserved capacity in operations.Moreover, it enables the crosssectoral flexibility of the AE system from recovering heat and producing hydrogen meanwhile avoiding large deviation of operating temperature.

Impact of input energy portfolios
Firstly, considering two energy portfolios under two typical days representing a wind-rich and wind deficit period in 2018, at which negative electricity prices occurred, the results of operation cost are summarized in Table 5.During the wind-rich day, the proposed algorithm is expected to earn a profit of 720.14€ for MES, instead of paying for its operations like what is required with the other two algorithms (4340.12€and 19436.23€).This is mainly due to the sharp drop of Cost_op of − 3209.66 € in Case 3, by utilizing the free wind-based electricity to produce the green hydrogen, achieving a considerable reduction of Cost_cur and more profits of selling hydrogen.Moreover, the high negative electricity price will bring additional profits owing to purchasing power from grid, and lead to a negative Cost_pur in the three

€/MWh
Penalty cost for wind curtailment (C cur t|k ) 67

€/kg
1 Electricity cost (C ele t|k ) is the day-ahead hourly price in Nordpool. 2Heat cost is equal to the price provided by DHS operator in Denmark.
cases.Therefore, the proposed algorithm will force electrolyzer to continuously consume power for a high hydrogen production rate for a longer time, thereby earning much profit Cost_H 2 of 3849.93€.Besides, the three cases have almost same utilization costs of BESS and HESS, especially the same Cost_hess of 2129.11€.
During the wind-deficit day, wind curtailment will not happen and the curtailment cost equals zero in the three cases.Overall, the EMPCbased algorithm still contributes to a preferable operation cost with the lowest value of 7054.83 € especially turning out a visible operation cost reduction compared with Case 1.This mainly benefits from the high profits of selling hydrogen of about 1243.78€ which is several times than that in the other two cases.It should be noted that the cost optimization mechanism in Case 2 also facilitates a lower cost of purchasing electricity and more heat recovered, thereby bringing a relatively low total operation cost of 7169.04 €.
Therefore, the proposed EMPC-based algorithm is expected to a dramatic reduction in operation cost even additional profits can be obtained under the wind-rich scenario with negative electricity price, meanwhile maximize the profits of selling hydrogen on the wind-deficit day thereby still effectively reducing the total operation cost.
Furthermore, the daily operation costs of the whole year are calculated based on daily energy portfolios, as shown in Fig. 9.In terms of the Cost_op and Cost_hess, both Case 2 and Case 3 have a visible lower level than Case 1 overall during the whole year, due to the economic optimization incentive in their operating strategies.Also, Cost_bess is quite close among the three cases.Consequently, the proposed algorithm in Case 3 can bring a preferable Cost_sum over the whole year, which is always much lower than RBS in Case 1 and as low as the traditional economic strategy in Case 2. Hence, it has good robustness to variations of input energy portfolios at different operating periods.
Nevertheless, the economic optimization in case 2 is based on the assumption of constant electrolysis efficiency, which inevitably causes a deviation of the real operating states of AE and ESSs.Fig. 10 compares the operating temperature of AE and the VLH of hydrogen tank during the whole year when implementing the three operating strategies.It indicates that Case 2 will frequently cause AE to operate at an abnormal temperature point which even reaches to be less than 10 • C on some operating days and strongly exceeds the preset boundary.This will be not practically feasible for a safe operation on AE, and fail to implement the operating strategy for MES.Besides, the VLH in Case 2 is also over the maximum capacity of hydrogen tank for some days.However, the proposed EMPC-MILP based algorithm fully considers the dynamic behavior of electrolysis efficiency by continuously updating it before each optimization calculation, hence the number of abnormal temperature points is dramatically reduced, moreover completely ensuring a normal VLH within the required range over the whole year.It should be noted that the RBS is improved by updating the electrolysis efficiency between two regulating events as well.Case 3 can therefore ensure more feasible scheduling for the electrolyzer in the MES meanwhile creating a preferable lower operation cost over the whole year, compared to the other two cases (which only satisfy either physical limitations or economic operations instead).

Impact of initial states of ESSs
Considering June 21, 2018 as an operating day, the operation costs under different initial states of ESSs in terms of the SOC, VLH and operating temperature (T ely ) of AE stack are evaluated for the three operating strategies.Fig. 11 indicates that Case 3 always has a lower variable operation cost (Cost_op) and approximate the same utilization cost of ESSs (Cost_bess, Cost_hess) regardless of initial SOC, compared to the other two cases.Accordingly, the lowest total operation cost Cost_sum always occurs in Case 3 whatever the initial SOC value is, due to the dominance of Cost_op in the total operation cost.Similarly, when changing either the initial VLH or operating temperature of the AE system, Case 3 always has much lower in Cost_op meanwhile little difference in Cost_bess and Cost_hess, compared to the other two cases, accordingly always achieving the lowest Cost_sum.Therefore, the proposed EMPC-MILP based algorithm can also have good robustness to variations of input initial states of ESSs.

Conclusion
This paper presents an EMPC-MILP based optimal operating strategy for an MES integrated with a P2H 2 model of AE to unleash its operational flexibility cross the energy sectors of electricity-heat-hydrogen. The internal nonlinear interaction of the electricity-heat-hydrogen energy flow of AE is characterized by the presented P2H 2 model.Moreover, the EMPC-MILP framework is used to integrate the P2H 2 model into a MILP-based economic operating model which is computationally effective and ensures the AE model accuracy by continuously updating the P2H 2 model before each receding horizon.The real data of Bornholm island in 2018 are used to test the proposed method, and results have revealed that: 1) The proposed EMPC-based operating strategy can achieve an economic operation for MES via optimally scheduling various DERs.It contributes to additional operation cost savings of 59% (9217.07€)and 38% (5404.74€)compared to RBS and the economic strategy without P2H 2 model respectively.Especially in the cases of a windrich day with negative electricity prices, the MES can even earn profits of about 720.14€ from its operation.2) Compared to the RBS, the proposed algorithm unleashes more operational flexibility of MES performing in effectively reducing the operation costs meanwhile enhancing the wind integration by wind curtailment reduction.3) Compared to the traditional economic operating strategy, the proposed algorithm reduces the deviation of operating states regarding stack temperature and hydrogen level from their allowable operating ranges due to the real-time evolution of AE model, thus contributing to feasible scheduling for electrolyzers meanwhile ensuring more economic benefits.
Regarding future work, the proposed operating optimization model still needs to be extended under a stochastic scenario by considering the uncertainty of wind power, and also introducing an electricity market mechanism to explore more flexibility services for grid stability and reliability.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Fig. 1 .
Fig. 1.System configuration of an equivalent MES for Bornholm island.

Fig. 2 .
Fig. 2. Topology and power flow in AE system.

Fig. 6 .
Fig. 6.Power scheduling results of MES under the three cases: (a) Discharging power of BESS; (b) Produced power of full cell; (c) Purchased power from grid (d) Charging power of BESS; (e) Consumed power of electrolyzer; (f) Wind curtailment.

Fig. 7 .Fig. 8 .
Fig. 7. Heat and hydrogen production performance of AE system under the three cases: (a) Recovered heat; (b) Selling hydrogen.

Fig. 11 .
Fig. 11.Operational costs with different initial SOC, VLH and stack temperature under the three cases.

Table 2
Total wind curtailment and power purchased under three cases.

Table 3
Comparison of variable operation cost under three cases (€).

Table 5
Detailed comparison of operation cost under three cases at the two typical dates (€).

Table A1
Parameters of various HESS.

Table A3
Boundaries of exchanged power with grid and wind curtailment.

Table A4
Unit cost of various energy sectors.