A Conic Model for Electrolyzer Scheduling

The hydrogen production curve of the electrolyzer describes the non-linear and non-convex relationship between its power consumption and hydrogen production. An accurate representation of this curve is essential for the optimal scheduling of the electrolyzer. The current state-of-the-art approach is based on piece-wise linear approximation, which requires binary variables and does not scale well for large-scale problems. To overcome this barrier, we propose two models, both built upon convex relaxations of the hydrogen production curve. The first one is a linear relaxation of the piece-wise linear approximation, while the second one is a conic relaxation of a quadratic approximation. Both relaxations are exact under prevalent operating conditions. We prove this mathematically for the conic relaxation. Using a realistic case study, we show that the conic model, in comparison to the other models, provides a satisfactory trade-off between computational complexity and solution accuracy for large-scale problems.


A. Background
Renewable hydrogen produced via electrolysis is widely acknowledged as a key priority to achieve a clean energy transition. Several countries in Europe and globally have published national hydrogen strategies to support the largescale development of electrolyzers [1]. For instance, the 2020 EU Hydrogen strategy sets an electrolyzer capacity target of 40 GW by 2030 [2]. Developing this technology on a large scale poses several challenges, including the scale-up of manufacturing processes, the improvement of system design and materials, the establishment of a supportive policy framework, and the definition of new business models [3], [4].
Hybrid power plants consisting of renewable power sources (wind and/or solar) and electrolyzers create synergies based on cross-commodity arbitrage between electricity and hydrogen markets [4]. The plant operator can dynamically control the system to take advantage of volatile electricity prices: selling electricity directly when power prices are high and producing and selling hydrogen when power prices are low [5]. In this way, the cost of hydrogen production, which mainly depends on the cost of electricity [6], is reduced. This requires the development of optimal scheduling models aiming at maximizing the profit of the hybrid power plant.
To accurately capture the operational space of the hybrid power plant, those models should be aware of the underlying Fig. 1. Schematic efficiency (black) and hydrogen production (red) curves for an alkaline electrolyzer. P min and P max refer to the minimum and maximum operating range, respectively. P η,max is the power consumption corresponding to the peak efficiency. This figure is plotted based on the methodology in [11] applied to data from [9] and [10].
physics of its components. This poses a challenge particularly for modeling the electrolyzer, for which the relationship between its power consumption and hydrogen production is non-linear and non-convex. We refer to this relationship as the hydrogen production curve, which does not have a known analytical expression. As the technology is still in an early stage of development, manufacturers disclose very limited information on technical characteristics. From modeling perspective, two main questions arise: First, how to best approximate the hydrogen production curve under limited information availability? Second, how to deal with computational complexity of the non-linear hydrogen production curve when optimizing dispatch strategies?

B. Electrolyzer hydrogen production modeling: Status quo
The dashed red curve in Figure 1 shows a schematic hydrogen production curve of an alkaline electrolyzer. To better illustrate the non-linear physics of the electrolyzer, the black curve depicts the ratio of hydrogen production to power consumption, the so-called efficiency curve. The efficiency peaks at around 20-40% of the electrolyzer capacity [7], for which the corresponding power consumption of the electrolyzer is denoted as P η,max . For power consumption levels higher than P η,max , the efficiency declines almost linearly due to the effect of overpotentials in the polarization curve [8]. For consumption levels below P η,max , the efficiency drops rapidly due to increasing Faraday losses [9]. This non-linearity needs to be incorporated into operational decision-making problems of the electrolyzer through the hydrogen production curve (red). For a more detailed analysis of the physics and technical modeling of the electrolyzer, the interested reader is referred to [9]- [11].
Currently, there is no widely adopted approach for modeling the hydrogen production curve in a computationally tractable way. It is a common practice in the literature to introduce relatively strong simplifications for the hydrogen production curve. For instance, a constant efficiency is used in [5] and [12]. In [13], a first and second-order polynomial approximation for the hydrogen production curve is proposed. Although the second-order polynomial exhibits a smaller error, it has been eventually discarded due to its computational complexity. In [14], it has been shown that a linear hydrogen production curve is not suitable when the electrolyzer frequently operates at partial load, i.e., in the range between P min and P max in Figure 1. Instead, they propose a piecewise-linear hydrogen production curve and assess the impact of neglecting a detailed electrolyzer model. However, additional binary variables, one for each linearization segment, need to be introduced, increasing the computational burden.

C. Contributions and Paper Organization
Existing approaches to modeling the non-linear hydrogen production curve are either inaccurate, resulting in sub-optimal operational decisions, or do not computationally scale well for large optimization problems. Some examples for largescale problems involving electrolyzers are the operation and planning of complex power-to-x systems with further downstream chemical processes; the trading problem in multiple markets for electricity, hydrogen, and ancillary services; the operation of individual stacks of large-scale electrolyzers; and the scheduling problem under uncertainty, e.g., when the electrolyzer is part of a renewable-based hybrid power plant.
This paper takes a new perspective on modeling the hydrogen production curve based on convex relaxations, ensuring both accuracy and computational scalability for largescale problems. Starting from the state-of-the-art piece-wise linearization method, we derive a corresponding linear relaxation that does not require binary variables. As our main contribution, we propose a conic relaxation of a quadratic approximation of the hydrogen production curve, resulting in the so-called conic model. We mathematically prove that the conic relaxation is exact for prevalent operating conditions. This model can be readily applied to the large-scale optimization problems mentioned above, among others. We numerically compare the conic model to the state-of-theart piece-wise linearization method and its linear relaxation counterpart, and verify ex-post its well-performance in terms of solution quality, i.e., operational decisions, and reduced computational complexity.
The remainder of this paper is organized as follows. Section II introduces the system setup and the optimal scheduling problem of the hybrid power plant. Section III provides an overview of the different approaches to model the non-linear hydrogen production curve, including the proposed relaxations. Those relaxations are exact under prevalent operating conditions, which we prove for the conic model in Section IV. Section V compares the modeling approaches, and Section VI concludes.

II. SCHEDULING PROBLEM
We consider a hybrid power plant as shown in Figure 2, consisting of a wind farm, an electrolyzer system, and a hydrogen demand. Hereafter, we refer to the electrolyzer Fig. 2. Schematic representation of a hybrid power plant. The electrolyzer system includes the hydrogen compressor and other auxiliary components.
as a system including all necessary auxiliary components, including transformers, rectifiers, pumps, coolers, heaters, and compressors, in addition to the electrolyzer device. Following the current common practice, we assume that hydrogen is sold at a fixed price and that there is an upper limit on the hydrogen demand for a given time interval, which, e.g., represents the capacity of a tube trailer. As we do not consider any constraints on the total hydrogen production directly, it is effectively restricted by the total hydrogen demand. We, therefore, use the terms total hydrogen production and demand interchangeably. For the sake of simplicity, we assume that there is no minimum level of hydrogen demand. Electricity generated by the wind farm can either be sold to the grid at a perfectly known price or used for hydrogen production through the electrolyzer. Without loss of generality and to avoid discussion about the carbon intensity of the hydrogen produced, we assume that the hybrid power plant never buys electricity from the grid. 1 In the following, we introduce a model for the optimal dayahead scheduling problem of the given hybrid power plant. The modeling of the hydrogen production curve and the proposed relaxations will be presented in Section III. To ease notational clarity, we use upper-case and Greek symbols for parameters, and lower-case symbols for variables. Let t ∈ T denote the set of time steps, which is divided into n ∈ N subsets H n ⊆ T , such that ∪ n∈N H n = T and ∩ n∈N H n = ∅. For example, t ∈ T could be 8760 hours of the year, whereas H n , ∀n ∈ {1, 2, ..., 365}, indicates the set of 365 days.
The operator of the hybrid power plant maximizes the total profit from selling power f t to the grid at the day-ahead power price λ t , and selling hydrogen h t at a constant price χ > 0. The only operational expense considered is the startup cost K su indicated by the binary variable z su t : where x, y, and z denote the set of variables corresponding to the balance of the hybrid power plant, the hydrogen production curve, and to the operational states of the electrolyzer, respectively. These three sets will be defined later. The power balance within the hybrid power plant is enforced by where W t denotes the deterministic day-ahead forecast of the wind power production and p t is the day-ahead schedule for the power consumption of the electrolyzer at time t. Constraints (1c) prohibit purchasing power from the grid. In each subset of time steps H n , e.g., over every day n ∈ N , the total hydrogen production is limited by the hydrogen demand D max n , which, e.g., represents the capacity of an available tube trailer for hydrogen transportation: Constraints (1e) ensure that the hydrogen production is nonnegative. The set of variables x is defined as We consider three operational states for the electrolyzer, namely on, standby, and off [5], [11], [13], [14]. In the on state, the electrolyzer is consuming power and producing hydrogen. Below a certain minimum power consumption, the electrolyzer has to be turned to standby or off. In standby, the electrolyzer does not produce hydrogen but consumes a small amount of power to keep the system running and be able to turn on immediately. On the contrary, in the off state, the electrolyzer does not consume any power but takes several minutes and a significant amount of electricity to be switched back to the on state. Modeling these operational states and transitions in the scheduling problem requires binary variables. The three operational states, i.e., on, off, and standby, are indicated by binary variables z on t , z off t , z sb t , respectively. They constrain the feasible power consumption of the electrolyzer as Constraints (2a) ensure mutual exclusiveness of the operational states. The corresponding power consumption is constrained by (2b) and (2c) based on the standby, minimum, and maximum power consumption levels P sb , P min , and P max , respectively. Constraints (2d) and (2e) define a cold startup z su t ∈ {0, 1} when the electrolyzer changes from off to on state. Lastly, the operational states and transitions are restricted to be binary by (2f). The set of variables z is defined as z = {z on t , z sb t , z off t , z su t }. The hydrogen production curve (HYP), illustrated by the red curve in Figure 1, relates the power consumption to the hydrogen production of the electrolyzer in a general form of In the following section, we present three different approximation and/or relaxation models for (3), including our proposed conic model. Each model ends up in a set of constraints that replaces (3), which is part of the optimal scheduling problem of the hybrid power plant (1a)-(3).

III. MODELING THE HYDROGEN PRODUCTION CURVE
There is currently limited information available on the technical characteristics of electrolyzers. Therefore, we compute a hydrogen production curve using the process explained in [14], which is based on empirical relationships found by [9] and [10]. We refer to it as the experimental hydrogen production curve HYP-X, which does not have a closed-form analytical expression. Note that it is unnecessary to compute HYP-X if operational data on power consumption and hydrogen production is available, e.g., as in [16]. The models introduced next can then directly be constructed from the operational data. The three 2 models that replace (3) are 1) HYP-MIL: The current state-of-the-art piece-wise linear approximation, 2) HYP-L: A corresponding linear relaxation, 3) HYP-SOC: A second-order cone relaxation of a quadratic approximation. These three models along with HYP-X are illustrated in Figure 3, together with their efficiency curves. For illustration clarity, Figure 3 shows two segments only for HYP-MIL and HYP-L. In general, any finite number and position of segments can be chosen depending on the desired tradeoff between accuracy and computational complexity. Model HYP-SOC is a relaxation of a quadratic approximation of the experimental hydrogen production curve such that the corresponding efficiency reaches its maximum at the power consumption P η,max . 3 A close-up on model HYP-SOC is shown in the inset plot on the right side of Figure 3. Let p * and h * denote the optimal power consumption and optimal hydrogen production of the electrolyzer, respectively. The actual hydrogen production corresponding to p * , according to the experimental hydrogen production curve HYP-X, is indicated by point H1. Model HYP-SOC may not be able to attain this point as it utilizes an approximation of the experimental curve, which is illustrated by the blue dashed line. The solution to HYP-SOC may therefore be located at h * = H2. We call the discrepancy between H1 and H2 approximation error. For models HYP-MIL and HYP-L, this error is always non-negative and its magnitude can be controlled by the number of linearization segments. This is not the case for HYP-SOC, where the approximation error can be either positive or negative, and is limited by the shape of the quadratic approximation.
In contrast to the non-convex approximation HYP-MIL, models HYP-L and HYP-SOC further admit the point h * = H3, located in the blue shaded area, when the relaxation of the hydrogen production curve is inexact. We refer to the discrepancy between H2 and H3 as relaxation gap. The magnitude of the gap depends on the exactness of the relaxation, which is further discussed in Section IV. Note that for model HYP-SOC, depending on the optimal power consumption p * , the approximation error and relaxation gap may offset each other. Fig. 3. Approximation (blue dashed) and relaxation (blue shaded) of the experimental non-convex (black) hydrogen production and efficiency curves using two segments (except HYP-SOC). The experimental hydrogen production and efficiency curves are taken from [14], based on [9], [10]. For an example optimal power consumption p * , the actual amount of hydrogen produced according to the experimental curve is indicated by point H1. Points H2 and H3 denote solutions when the relaxation HYP-SOC is exact and inexact, respectively.
In the following, we present the mathematical formulations for all the models.

A. HYP-MIL
The state-of-the-art approximation of the hydrogen production curve [14], [18], [19] follows a piece-wise linearization approach as The hydrogen production on each linear segment s is determined by (4a), where B s and C s denote the slope and intercept of the underlying segment, respectively. These coefficients have to be determined ex-ante by choosing fixed linearization points on the original non-linear hydrogen production curve and performing a linear interpolation between them (see Figure 3). In addition, variable p s,t is the power consumption corresponding to segment s at time t. Binary variable z s,t indicates whether the electrolyzer operates on segment s at time t. Constraints (4b) enforce that the power consumption on each segment is between the lower and upper bounds P s and P s , respectively, if the segment is active. Constraints (4c) ensure that only one segment can be active when the electrolyzer is in on state. The power consumption of the electrolyzer is then defined by (4d) depending on the operational state.
For |S| = 1, model HYP-MIL represents a linear hydrogen production curve, which does not require binary variables, as done in [13]. The interested reader is referred to [14] for a more detailed explanation of the approximation of the hydrogen production curve based on piece-wise linearization and a discussion on the impact of the number of segments.

B. HYP-L
The piece-wise linearization of the hydrogen production curve (4a)-(4e) becomes computational challenging with an increasing number of segments due to the required binary variables. A natural idea would then be to relax (4a), which allows to remove the associated binary variables. By this, (4a)-(4e) reduce to The power consumption of the electrolyzer in on state is now given by p t . Constraints (5a) are an intersection of hypographs of concave functions and are therefore convex [20]. The set of constraints (5a)-(5c) is equivalent to (4a)-(4d) when (5a) is binding at the optimal solution. In contrast to the piece-wise linearization, this formulation is computationally efficient even for a comparatively high number of segments.
C. HYP-SOC By looking into the experimental hydrogen production curve in Figure 1, one may hypothesize that it has a quadratic shape. This is further supported by a semi linear power-tohydrogen conversion efficiency for power consumption levels higher than P η,max . Accordingly, we approximate the experimental hydrogen production curve HYP-X by a second-order polynomial: where A < 0, B > 0, and C < 0. As mentioned earlier, the second-order polynomial can be straightforwardly fitted to operational data of the electrolyzer, if available. This is a great advantage over models HYP-MIL and HYP-L, as it does not require choosing the number and the location of linearization points. Constraint (6) is a non-convex quadratic equality constraint. With binary variables required for modeling the operational states of the electrolyzer, the resulting optimization model would be a mixed-integer non-linear programming (MINLP) problem, which is generally hard to solve with existing offthe-shelf solvers, even to locally optimal solutions. In contrast to existing approaches in the literature, e.g., as in [13], we propose using a relaxed version of (6), which can be amended to include the operational states of the electrolyzer as For every time step t that the electrolyzer is on, i.e., z on t = 1, (7a) enforces a convex quadratic inequality constraint for A < 0. This constraint can be reformulated into an efficiently solvable rotated second-order cone (SOC) constraint, as shown in the online companion [17]. In the following, we stick to the convex quadratic form as we find it to be more intuitive here. The set of constraints (7a)-(7c) is equivalent to (6) when (7a) is a binding constraint for every time t at the optimal solution. If it is not binding, i.e., there is a difference between the right and left-hand side of constraint (7a), then the relaxation gap is non-zero. This is illustrated by the discrepancy between points H2 and H3 in Figure 3.
Accounting for binary variables needed to model the operational states of the electrolyzer, the resulting problem is a mixed-integer second-order cone programming (MISOCP) problem, which is efficiently solvable by existing off-the-shelf solvers like Gurobi, Mosek, and CPLEX, that directly support convex quadratic constraints.

D. Summary
An overview of the three models is given in Table I. Hereafter, we use terms HYP-MIL, HYP-L, and HYP-SOC, not only to refer to the hydrogen production curve, but also to the resulting scheduling problem of the hybrid power plant.
The objective function (1a) is common to all three models. We group the constraints into three groups. The first group consists of all constraints related to the hybrid power plant as a system, which are all linear. The second group includes all constraints related to the operational states of the electrolyzer, requiring binary variables. The first and second group are common to all three models. The third group depends on the model of the hydrogen production curve that replaces constraint (3), i.e., the state-of-the-art piece-wise linear approximation (HYP-MIL), a linear relaxation counterpart (HYP-L), or the proposed conic relaxation (HYP-SOC). Due to the binary variables z for modeling the operational states, the resulting scheduling problem of the hybrid power plant becomes either a mixed-integer linear programming (MILP) or a MISOCP problem. When neglecting the operational states, models HYP-L and HYP-SOC reduce to a linear programming (LP) or a second-order cone programming (SOCP) problem, respectively. This is not the case for model HYP-MIL, which requires additional binary variables for the piecewise linearization of the hydrogen production curve.
We define the set of variables related to the hydrogen production curve y as y L = y SOC = { p t }, and y MIL =

IV. ON THE EXACTNESS OF THE CONIC RELAXATION
Models HYP-L and HYP-SOC are exact when inequality constraints (5a) and (7a), respectively, are binding at the optimal solution. In the following, we derive sufficient conditions for model HYP-SOC to be exact as well as necessary and sufficient conditions for it to be inexact. Similar analytical results can be obtained for HYP-L. Focusing on HYP-SOC, if (7a) is not binding at optimum, i.e., the relaxation gap is nonzero, an intuitive interpretation is that a fraction of hydrogen produced is being wasted or that an unnecessarily high amount of power is being consumed. This fraction is depicted by the difference of points H2 and H3 in Figure 3.
In the following, we always assume that a solution to problem HYP-SOC exists, as p = 0, f = W , and z off = 1 is trivial. Recall we assume that the hydrogen price is positive, as stated in Section II. Now, we provide analytical results for the exactness of relaxation (7a).
Theorem 1: If the maximum total hydrogen production constraint (1d) is not binding at optimum, then the relaxation (7a) is exact.
Proof: See Appendix A. This theorem applies to a wide range of relevant use cases wherein the total hydrogen production is unconstrained. This could be the case wherein hydrogen production facilities are located next to large hydrogen consumers or a direct connection to hydrogen pipeline infrastructure or large storage facilities exists. In some real-life applications, however, the maximum total hydrogen production is constrained, e.g., by the capacity of available tube trailers for hydrogen transportation. For that case, we derive another theorem providing a sufficient condition for exactness based on electricity prices being positive.
Theorem 2: Suppose the maximum total hydrogen production (1d) is binding at optimum for sub-period n. If the power prices are positive λ t > 0, ∀t ∈ H n , then the relaxation (7a) is exact.
Proof: See Appendix B. Intuitively, when the power price is positive, Theorem 2 implies that increasing the power consumption of the electrolyzer is unprofitable if additional hydrogen cannot be sold. To complete our analyses, we now focus on cases with nonpositive electricity prices, which constitute a highly profitable business case for an electrolyzer. When buying power from the grid and spilling wind is not allowed, there is a monetary incentive for the electrolyzer to maximize its consumption of local wind power production, even if the hydrogen demand is already satisfied.
Theorem 3: Let T − n ⊆ H n be the subset of hours in subperiod n, such that λ t ≤ 0, ∀t ∈ T − n . If the total hydrogen production in those hours equals the maximum demand, i.e., t∈T − n h t = D max n , such that (1d) is binding at optimum for sub-period n, then there exists at least one time step t ∈ T − n for which the relaxation (7a) is inexact.
Proof: See Appendix C. While Theorem 3 states that relaxation (7a) is inexact when it is economically most profitable for the hybrid power plant, the necessary conditions are hardly met in practice. We demonstrate this based on a realistic case study in Section V and argue that the relaxation (7a) is exact under prevalent operating conditions. Note that the theorems stated here, including Theorem 3, extend to the case where the electrolyzer is allowed to buy electricity from the grid and wind spillage is allowed.
The necessary condition for inexactness of relaxation (7a) stated in Theorem 3 can be checked a priori. For each subperiod n, one can evaluate in advance if the total maximum possible hydrogen production during hours with non-positive prices is greater than or equal to the maximum demand, i.e., where P t = min{W t , P max } ∀t ∈ T . It follows from Theorem (3) that if condition (8) is not fulfilled, then the relaxation is exact. The converse is not necessarily true. If the relaxation (7a) is inexact, model HYP-SOC may obtain a solution like H3 in Figure 3. In those cases, the corresponding relaxation error can be substantially reduced by including a linear underestimator to the hydrogen production curve. Additionally, an exact solution can be restored a posteriori as, e.g., shown in [21] in the context of AC optimal power flow. We leave this for future research.
V. NUMERICAL STUDY We consider a hybrid power plant consisting of a 1-MW electrolzyer and a 2-MW wind farm. Hourly wind capacity factors for year 2019 are obtained from the Renewable.ninja web platform [22] for a wind farm located in Eastern Denmark. The day-ahead electricity prices in the same year for the corresponding bidding area (DK2) are taken from [23]. The electrolyzer has a minimum operating power of P min = 0.15 MW and a standby power consumption of P sb = 0.01 MW. We assume a cold-startup cost of K su = C50, borrowed from [13]. Hydrogen is sold at a fixed price of χ = C2.1/kg. The public repository [17] contains the input data and code implementation in the Pyomo package [24], [25] for Python, where optimization models have been solved by the Gurobi solver [26].

A. Exactness of the proposed conic relaxation
As discussed in Section IV, the exactness of the relaxation in HYP-SOC depends on the power prices and total hydrogen production. The latter is affected by the wind power availability. To validate our analytical results in Section IV, we consider four different cases with different profiles of wind power availability and power prices: Case (a): Mostly negative hourly power prices and low wind power availability, Case (b): Solely positive hourly power prices and comparatively high wind power availability compared to that in Case (a), Case (c): Some negative hourly power prices and comparatively high wind power availability as in Case (b), Case (d): Mostly negative hourly power prices as in Case (a) and comparatively high wind power availability as in Case (b). For each of the four cases, we build an illustrative case study for a time period of one day (24 hours). For that, we select different combinations of two realistic wind profiles (low and high wind) [22] and three power price profiles (solely positive, some negative, and mainly negative prices) [23]. The data is visualized in the top row of Figure 4. Among the four illustrative days, the one representing Case (c) is the only one that combines wind and price profiles of the same day in 2019. Note that the two price profiles in Cases (c) and (d) correspond to the two days in 2019 with the highest number of hours with negative power prices.
To create a situation where the maximum daily hydrogen production constraint (1d) becomes binding, we choose a rather low hydrogen demand of D max = 252.7 kg for all cases. This value corresponds to the amount of hydrogen that is produced when the electrolyzer is operated in full-load operation 60% of the time. The optimal power consumption, hydrogen production, and the relaxation gap for Cases (a)-(d) are shown in the bottom row of Figure 4. Recall that by relaxation gap, we refer to the discrepancy between right and left-hand side of constraint (7a), which is illustrated by points H2 and H3 in Figure 3. Note that all results on the exactness of the relaxation of the hydrogen production curve presented in this subsection can be similarly obtained for model HYP-L.
In Case (a), despite frequent negative power prices, there is not enough wind power over the day available such that the total hydrogen demand (1d) reaches the upper limit. The comparably higher wind power availability in Case (b) in combination with low but positive power prices results in a binding maximum total hydrogen demand. For both Cases (a) and (b), it follows immediately from Theorem 1 and Theorem 2, respectively, that the relaxation HYP-SOC is exact.
The maximum total hydrogen production is binding in Case (c) too. It is, however, non-binding for the 12 hours with negative prices only. Hence, it does not fulfill the necessary condition for the inexactness of relaxation (7a) as stated in Theorem 3. Note that the operation during hours with negative prices is preferred even if operating in hours with positive prices is profitable. Case (d) has an even higher number of hours with negative prices (17 hours), such that the hydrogen demand becomes binding during the operation in those hours only. This satisfies the necessary and sufficient conditions stated in Theorem 3. As a consequence, relaxation (7a) is   The pink line shows the hydrogen production corresponding to a zero relaxation gap, which is illustrated by the shaded area (grey). When the relaxation (7a) is exact, i.e., the gap is zero, the green and pink lines coincide.
inexact at optimum, leading to a non-zero relaxation gap equal to the shaded area in Figure 4. 4

B. Comparison of the solution quality
This section compares the models proposed in Section III in terms of profit, dispatch decisions, and hydrogen production. The dataset for year 2019 includes 95 hours with negative electricity prices, spread across 20 days. Based on the heuristic proposed in Equation (8), we found that for the year 2019, the proposed relaxations are exact for a maximum hydrogen demand above D max = 296.3 kg, corresponding to the hydrogen produced when the electrolyzer runs in full-load operation 70.4% of the time. 5 Therefore, we choose a maximum daily hydrogen demand corresponding to 90%, which ensures that the relaxations HYP-L and HYP-SOC are always exact. This implies that HYP-L results in the same dispatch decisions as HYP-MIL. Therefore, we do not explicitly report the results for model HYP-L.
We use the term HYP-MILi for i ∈ {1, 2, 10, 24} to refer to model HYP-MIL with i linearization segments. Model HYP-MIL24, i.e., model HYP-MIL with 24 segments, is used as a benchmark in the following. A detailed explanation on how we choose the location of linearization points is given in Section 3 of the online companion [17]. The interested reader is further referred to [19] for a different choice of linearization points.
We first compare the different models in terms of dispatch decisions for a selected day of 2019, where the hydrogen production is not limited by wind power availability. Figure 5(a) shows the wind profile, electricity prices, and optimal electrolyzer power consumption of HYP-MIL24, which is chosen as a benchmark. For each model formulation, the 4 Note that for model HYP-SOC the solver reports a solution where all time steps have a non-zero feasibility gap. This is not necessarily always true, as multiple optimal solutions exist in this case. When solving the same case study with the linear relaxation HYP-L, the aggregated relaxation gap is fully allocated to the minimum possible number of time steps. 5 For the relaxations to be inexact for more than 2 days, an unrealistically low maximum hydrogen demand below 25% is necessary. This demonstrates that the relaxations are exact under prevalent operating conditions. hourly relative difference of the optimal power consumption compared to the benchmark, denoted as γ t , is defined as where p * t is the optimal power consumption of the electrolyzer in hour t obtained from the underlying model and p * ,MIL24 t is that of the benchmark. The relative difference γ t is shown for all models in Figure 5(b). For models HYP-MIL1 and HYP-MIL2, the relative difference is comparatively large in hours where the electrolyzer operates at partial loading. This is the case when the electricity price is in the range of 31 to 43 C/MWh (cf. Appendix in [14]). The average daily difference, i.e.,γ = ( t |γ t |)/24 for HYP-MIL1 and HYP-MIL2 is 36% and 21%, respectively. In comparison, HYP-SOC exhibits a significantly better performance, with an average error of around 5%. To achieve a similar solution quality with HYP-MIL (and HYP-L), at least 10 segments are needed.
To validate the robustness of our findings presented in Figure 5, we solve the different models for the entire year 2019 and compare the profit and dispatch results. To fairly compare the different models in terms of hydrogen production, an ex-post analysis is performed to take the model-specific approximation errors into account. The ex-post analysis consists of solving the underlying optimization problem, fixing the optimal power consumption of the electrolzyer, and then calculating the corresponding hydrogen production based on HYP-X, indicated by point H1 in Figure 3. The reason of the ex-post analysis is that the model determines the choice of dispatch decisions (i.e., how much power should be sold to the grid and how much power should be consumed by the electrolyzer), while the actual hydrogen production depends on the electrolyzer physics and not on the approximated model that is adopted in the scheduling problem. Note that we do not account for the hydrogen production corresponding to the approximation error in the scheduling problem, which could potentially make the maximum hydrogen production constraint (1d) binding. Table II presents the annual profit, electricity sales, and hydrogen production, as a difference compared to the HYP-MIL24 benchmark. While the total annual profit is similar for all models, the share of hydrogen production and power sales for HYP-MIL1 and HYP-MIL2 differ substantially compared to the HYP-MIL24 benchmark. Due to the inaccurate approximation of the hydrogen production curve, the number of hours when it is profitable to produce hydrogen is considerably reduced, leading to approximately 14% and 7% less hydrogen production, respectively. The corresponding monetary loss is partially compensated by an increase in wind energy sold to the grid. The HYP-SOC shows a higher accuracy in decision making, with a difference in hydrogen production lower than 1% compared to the benchmark. Similarly to the one-day example, at least 10 segments are necessary to achieve the same results with HYP-MIL as with the conic model.

C. Comparison of the computational performance
We now compare the different models in terms of their solution time, and then analyze how it scales with the problem size. To do so, we extend the deterministic day-ahead scheduling problem proposed in Table I to a two-stage stochastic problem and run it for a single day using different numbers of scenarios ω ∈ Ω. We assume perfect foresight for the electricity prices but uncertainty in wind power production. In the second stage,  the electrolzyer adjusts its power consumption to minimize the real-time imbalance cost based on the scenario-specific wind power realization. Owed to the fast dynamics of the electrolyzer, we further assume that it is able to change its operational states compared to the day-ahead schedule. The stochastic model formulation is reported in the online companion [17]. We use the same price profile as in the case study reported in Figure 5. For the wind power scenarios, the first 24 hours of the dataset provided in [27] are used. The problem was solved using a High Performance Computing Cluster node with two AMD EPYC 7551 processors clocking at 2 GHz and using a maximum of 8 threads. As this section focuses on the computational performance only, we do not further elaborate on the quality of the solution for the stochastic model and look solely at in-sample results. Table III summarizes the number and type of variables and constraints in each of the hydrogen production curve models. Figure 6 shows the computational time for the different models in a range of 1-500 scenarios. All proposed models are solved within 5 seconds for up to 10 scenarios. By increasing the number of scenarios, the number of binary variables in the HYP-MIL model increases comparatively fast, as shown in Table III. For 24 and 10 segments, the linear relaxation HYP-L is solved approximately 80% faster than the corresponding HYP-MIL, while achieving the same solution. For 100 scenarios, the HYP-SOC model is almost three times faster than HYP-L10 and almost two times faster than HYP-L2. Even for 500 scenarios, the HYP-SOC model shows a satisfactory computational performance compared to both HYP-MIL and HYP-L. This might be attributed to the avoidance of binary variables and the comparably lower number of constraints required to model the hydrogen production curve, even if the constraints are conic instead of linear.

VI. CONCLUSION
An accurate representation of the non-linear and non-convex hydrogen production curve of the electrolyzer, which captures the relationship between power consumption and hydrogen production, is essential for its optimal scheduling. The current state-of-the-art modeling approach of the hydrogen production curve is based on piece-wise linear approximation. This approach requires to carefully select the number and the location of linearization points, which impacts the accuracy of dispatch decisions and the computational complexity. The accuracy increases with the number of linearization segments at the expense of adding one binary variable per segment. For our case study, we found out that using at least ten linearization segments yields sufficiently accurate dispatch decisions. To further highlight computational issues raised by the number of binary variables in the state-of-the-art piece-wise linear approximation, we developed a two-stage stochastic program where renewable power production uncertainty is modeled via scenarios. We showed that by growing the number of scenarios and therefore the number of binary variables (indicating active segments for every scenario), the computational time increases significantly, imposing a serious barrier.
This paper proposes two modeling approaches for the hydrogen production curve based on convex relaxations. The first one, HYP-L, is a linear relaxation of the state-of-the-art piece-wise linear approximation HYP-MIL, which does not require binary variables. Although this leads to a significantly improved computational performances compared to HYP-MIL, it still requires choosing the number and location of linearization points. Additionally, the high number of segments needed to ensure accuracy of the solution impacts the computational performance of large-scale problems.
Those barriers are resolved by our second model, HYP-SOC, which is a conic relaxation of a quadratic approximation of the hydrogen production curve. The quadratic approximation can be directly fitted to operational data of the electrolyzer, making it especially suitable in cases with limited information availability on the underlying physics of the hydrogen production curve. Based on a realistic case study, we showed that HYP-SOC provides a satisfactory trade-off between accuracy of decisions and computational performance for large-scale problems. Between the two proposed relaxations, HYP-SOC exhibits a slightly better computational performance than HYP-L for large-scale problems at the expense of moving from a (mixed-integer) linear to a secondorder cone problem. We conclude that the linear relaxation provides an appropriate choice if the model type is to be kept linear, otherwise we suggest to use the conic model.
We mathematically proved that the proposed conic relaxation is exact under prevalent operating conditions. Similar proofs can be derived for the linear relaxation. We further presented a heuristic to check the exactness of the conic relaxation a priori based on the wind power availability -this can be very useful in practice. An extreme case was presented to illustrate how a combination of prolonged negative electricity prices, high wind power availability, and a restrictive upper limit for hydrogen production may lead to an inexact solution. As the production of green hydrogen in hours with negative electricity prices may become an especially profitable business case in the future, further research should address how a potential non-zero relaxation gap can be reduced and a feasible yet optimal solution can be restored.
When disregarding the operational states of the electrolyzer, the two proposed relaxations of the hydrogen production curve are convex. This is a valuable property in cases where global optimality guarantees and meaningful dual variables are desired, e.g., in a market-clearing problem. Future research should explore how the proposed modeling approaches can be integrated into market-oriented applications. Additionally, the conic relaxation and exactness findings may be applicable to other components with similar non-linear physics, e.g., batteries with a semi-linear linear efficiency curve [28]. Finally, future work should focus on accurate modeling of the auxiliary assets and downstream processes, such as the compressor and methanol or ammonia production, which may introduce additional non-convexities to the optimal scheduling problem of an electrolyzer.

APPENDIX MATHEMATICAL PROOFS
Let (ẋ,ẏ,ż) denote a feasible point to problem HYP-SOC. For the following proofs, we assume that the set of binary variables z associated with the operational states of the electrolyzer is fixed toż. In this case, HYP-SOC reduces to a convex problem. We use (p * , h * , f * ) to denote an optimal solution to problem HYP-SOC for givenż.
Lemma 1: Suppose the electrolyzer is in standby or off state in time step t, such thatż sb t +ż off t = 1. Then, the relaxation (7a) is exact.
Proof: It follows from mutual exclusiveness of the states (2a) thatż on t = 0. Constraints (7a)-(7b) and (1e) ensure that that the hydrogen production h t and associated power consumptionp t are equal to zero. Relaxation (7a) is therefore exact when the electrolyzer is in standby or off state.
Without loss of generality, we assume that there exists a timestep τ ∈ T , for which the electrolyzer is in on-stateż on τ = 1. In this case, it follows from (7c) and (2a) that p τ =p τ . In the following, we will prove the exactness of relaxation (7a) under certain assumptions.

A. Proof of Theorem 1
Suppose that τ ∈ H n and h * τ < Q 2 (p * τ ) 2 + Q 1 p * τ + Q 0 , i.e., (7a) is inexact. We definè where is a small positive number, such thath τ ≤ Q 2 (p * τ ) 2 + Q 1 p * τ +Q 0 . Let the objective function (1a) be denoted by U . As the hydrogen price is positive χ > 0, U is always increasing in h t for a givenż. It follows directly that U (h, f * ) ≥ U (h * , f * ). As, by assumption, the total maximum hydrogen production is not constrained by the demand, such that (1d) is non-binding at h * , it is possible to find such thath is feasible. That contradicts the optimality of h * . Therefore, relaxation (7a) must be exact at optimum for a givenż when the electrolyzer is in on-state.
The exactness of relaxation (7a) for the case when the electrolyzer is in standby or off state follows from Lemma (1), which completes the proof.