grokkingstuff Home Blog Projects Wiki Calculators About

Stack Control: Electrolyzer & Fuel-Cell Load Following

date2026-07-24tags:ele: :control:

An electrolyzer stack is a device that turns electrical power into hydrogen by splitting water; a fuel cell does the reverse. Both are electrochemical reactors with dozens to hundreds of cells in series, and both have a control problem that looks deceptively simple — "follow the power setpoint" — but is in fact a layered constraint-satisfaction problem in which the thing you are controlling is a chemistry, not a motor[fn::The word "stack" is literal: individual cells — each a membrane-electrode assembly with gas diffusion layers — are bolted in series so their voltages add. The control problem is not per-cell but per-stack, and the stack is only as healthy as its worst cell. This is the central asymmetry of stack control.].

What makes stack control harder than, say, motor speed control is that the plant degrades. Every time you ramp the current, the membrane ages a little; every time you cross a humidity threshold, a cell may dry out or flood; the degradation is irreversible and cumulative. A controller that ignores this — that treats the stack as a time-invariant plant — will drive it to end-of-life prematurely. The control objective is therefore not just setpoint tracking but *tracking under a degradation budget*[fn::This is a form of economic model predictive control: the cost function includes not only the tracking error but a terminal penalty on accumulated degradation, discounted by the time value of stack life. The hard part is quantifying the degradation per unit of current excursion — there is no first-principles model that is both accurate and cheap enough to run online.].

The plant

A proton-exchange-membrane (PEM) electrolyzer stack has, at the cell level, a voltage–current relationship given by a polarization curve:

V_cell(i, T, λ) = E_rev(T) + η_act(i) + η_ohm(i, λ) + η_conc(i),

where E_rev is the reversible (Nernst) voltage — see Electrochemical Thermodynamics — η_act is the activation overpotential (Tafel kinetics, from Electrochemical Kinetics), η_ohm is the ohmic drop (dominated by membrane resistance, a strong function of water content λ), and η_conc is the concentration overpotential at high current. The stack voltage is N_cells × V_cell.

The control inputs are, in rough order of bandwidth:

1. Current (or power, if a DC/DC converter is upstream) — the fastest knob, milliseconds. 2. Water flow rate and temperature — the thermal-hydraulic loop, seconds to minutes. 3. Pressure — gas-side, minutes; affects Nernst voltage and cross-over. 4. Humidification — the slowest and the most consequential for membrane life.

The outputs you can measure: stack voltage, stack current (or you set current and read voltage), individual cell voltages (if instrumented — expensive but diagnostic gold), temperature in/out, pressure, and — if you are serious — an impedance spectrum.

The load-following loop

The primary loop is a power controller: the setpoint P* comes from an upstream signal (a solar profile, a grid dispatch, a wind curve), and the controller adjusts stack current i so that P = i × V_stack tracks P*. The catch is that V_stack depends on i, on T, on λ — so the plant gain dP/di is not constant. At low current the curve is flat (activation-dominated), at moderate current it is roughly linear (ohmic-dominated), and at high current it bends over (concentration-limited). A fixed-gain PI controller tuned at one operating point will be sluggish at low current and oscillatory at high current.

The standard fix is gain scheduling: precompute the polarization curve offline, invert it to get i* = f(P*, T, λ), and use the PI controller only for the residual. This works well when the polarization curve is known and stable. It fails when the stack degrades — the curve shifts, the schedule becomes stale, and the controller systematically over- or under-drives[fn::This is the argument for online impedance spectroscopy: the high-frequency resistance (HFR) extracted from a small-signal AC perturbation tracks membrane hydration in real time and can be used to update the gain schedule without waiting for a full polarization sweep. See Corrosion Monitoring for the EIS infrastructure; the same hardware serves both.].

Constraints and the safety layer

The load-following loop is wrapped in hard constraints that override it:

The constraint layer is typically a reference governor or a model predictive controller that computes the most aggressive current trajectory that satisfies all constraints over a horizon. This is where the control theory from Optimal Control (LQR for the inner loop) and Nonlinear Control (the constraints are nonlinear) meet.

Fuel-cell mode: the dual problem

In fuel-cell mode the stack consumes hydrogen and produces power. The load-following problem is inverted — the setpoint is a power demand and the controller adjusts reactant flows (air stoichiometry, hydrogen recirculation) to meet it. The added complexity is starvation: if you ramp the current faster than the air compressor can deliver oxygen, the cell voltage collapses locally and the cell is damaged in milliseconds. The air-starvation constraint is the binding one in automotive fuel cells and is the reason a fuel-cell car cannot accelerate quite as freely as a battery car — the compressor has a lag that the battery does not[fn::The Toyota Mirai and Hyundai Nexo manage this with an explicit feedforward from the accelerator to the compressor, running the compressor ahead of the current ramp so that oxygen is present when the current arrives. This is a non-trivial control problem because the compressor itself is a rotating machine with its own dynamics — you are, in effect, controlling a turbocharger to serve an electrochemical reactor. The intersection of meche turbomachinery and control theory is the real engineering frontier here; see Pumps & Turbomachinery for the turbomachinery side.].

Degradation-aware control

The frontier of stack control is degradation-aware MPC: include a degradation model in the cost function so the controller trades present performance against future life. The degradation model is empirical — it may be a function of current ramp count, time above a voltage threshold, humidity cycles, and start-stop events — and it is the weakest link in the chain, because the empirical fit is specific to a cell chemistry and a duty cycle. A degradation model trained on steady wind may be wildly wrong for solar, which is high-frequency and bursty.

The practical approach is conservative: run the standard load-following loop, overlay the constraint layer, and let the degradation model only trim the margins — never let it be the primary driver, because if the model is wrong you have traded life for nothing. This is the same epistemic humility that motivates robust control (see Robust Control): do not trust the model more than you have to.

Related