Fuel cell calculator (PEM stack, hydrogen use, FCEV)
The MATLAB 6 kW, 45 V PEM stack at 133.3 A uses 0.3259 kg of hydrogen an hour at 99.56 % utilization and turns 55 % of its lower heating value into electricity. At 85 lpm and the same 6 kW, the current falls to 109.5 A and the voltage rises to 54.8 V. This calculator rebuilds the MathWorks Fuel Cell Stack block in steady state, then gives hydrogen per km for a fuel cell car. Free, runs in your browser.
MathWorks Fuel Cell Stack block (R2024b) and the power_fuel_cell example · NIST CODATA and WebBook · fueleconomy.gov and Toyota UK (Mirai) · checked against an independent solution (1,458 checks at build) · Updated 23 Nov 2026
65 cells, 65 °C, fuel 1.5 atm, air 1 atm. Fitted: R = 0.07833 Ω, i0 = 0.29197 A, nominal Uf,H2 = 99.56 %.
Stack parameters (the block's mask)
What voltage, power, hydrogen flow, efficiency and heat does the stack give at a current?
On the block's V-I curve: nominal hydrogen and oxygen utilization at every current (what the block's "Plot V-I characteristic" draws). Below i0 the Tafel term is held at zero, so V(0) = Eoc. No mass-transport region: the block assumes stacks do not operate there.
Utilization is how much of the hydrogen you feed actually reacts. What is it at 50 and 85 lpm, and why does the current fall at 6 kW?
Air is held at the nominal flow, as in the example, which drives only the fuel flow. Each table row is a steady state: the block's 1 s response time and the converter transient are not modelled.
| t (s) | lpm | Uf at I | I at P | V | Uf | η |
|---|
How much hydrogen does a fuel cell car use per 100 km, how far does a tank go, and how much fuel cell power does top speed need?
Preset: a Mirai-sized car. From Toyota UK's spec sheet: kerb 1,900-1,950 kg, Cd 0.29, 5.6 kg tank, 108 mph top speed. Our assumptions: frontal area 2.3 m² (about 0.83 × its 1,885 × 1,470 mm), Crr 0.009, the efficiencies, and 55 % for the fuel cell system (the 6 kW stack's nominal stack efficiency; a real system also powers its air compressor). The battery is charge-sustaining: what it stores from braking it gives back, so all net energy comes from hydrogen. Road load and cycles are those of the EV powertrain sizing calculator.
The stack gives 37 to 65 V; the example's bus is 100 V. What duty cycle and currents does an ideal boost stage need?
Ideal boost in continuous conduction. For switching and conduction losses use the converter loss calculator; for inductor and capacitor ripple, the buck converter calculator covers the same L and C sizing steps.
Type what your report states. Uses the stack parameters above.
- Type at least one number, or fill the typical report numbers.
What does the MATLAB 6 kW fuel cell stack model compute?
It turns a polarization curve into a circuit. The Fuel Cell Stack block in Simscape Electrical's Specialized Power Systems library (removed in R2026a, still in the R2024b documentation) is a voltage source Eoc, a Tafel activation term and an internal resistance. You give it the voltage at 0 A and 1 A and the nominal and maximum operating points, and it fits the rest:
For the 6 kW 45 Vdc stack of the power_fuel_cell example (65 V and 63 V at 0 and 1 A, 45 V at 133.3 A, 37 V at 225 A, 65 cells, 65 °C) the fit gives:
These match the block's own "View cell parameters" dialog (0.07833 Ω, 0.29197 A, α = 0.60645), which is how we know the fit is the block's. The stack makes 5,999 W at the nominal point and 8,325 W at the maximum point; on the fitted curve power keeps rising to 9,300 W at 335 A, but that is past the block's last data point. The detailed model then lets pressures, temperature, composition and flows change, through the utilizations below. Tab 1 draws the curve and puts your current on it.
How do you calculate fuel utilization in a fuel cell?
Divide the hydrogen that reacts by the hydrogen you feed. The block writes it with the flow in litres per minute at the stack temperature and the supply pressure (the 60000 converts l/min to m³/s; pressures go into the formula in pascals):
At the nominal point the block sets the hydrogen utilization from the rated efficiency, and the oxygen utilization from the nominal air flow (300 lpm gives 59.3 %):
For the example, at 133 A:
To hold the nominal 99.56 % at 133.3 A the fuel must be 50.06 lpm (the dialog's 50.06); at 225 A, 84.5 lpm. The temperature in the formula is 338 K: the block adds 273, not 273.15, and only 338 K reproduces its 50.06 lpm. For a target of 80 % at 133 A you need 62.16 lpm. A utilization above 100 % means more hydrogen reacting than you feed: the stack is starved. The block's documentation only says "the stack output power is limited by the fuel and air flow rates supplied"; this calculator stops and flags it.
Why does the fuel cell current decrease when the fuel flow increases?
Because the voltage rises and the load wants the same power. The example's converter holds 100 V on a 6 kW RL load, so the stack must deliver about 6 kW whatever its voltage. In the first 10 s the regulator keeps Uf,H2 at 99.56 %: the stack settles at 133.3 A and 44.99 V. At 85 lpm the same current would use only 58.5 % of the hydrogen, so far more unreacted hydrogen stays in the anode. The block's partial pressures and Nernst voltage:
At 99.56 % utilization the anode holds almost no hydrogen (0.0066 atm); at 85 lpm it holds about a hundred times more. The Nernst voltage grows with the logarithm of that pressure, and the block also raises the exchange current with PH2 + PO2, which cuts the activation loss. The stack's voltage at 6 kW goes from 44.99 V to 54.80 V: 4.10 V from the higher open-circuit voltage, 3.84 V from the smaller activation loss and 1.87 V from the smaller resistive drop at the lower current. With V up, I = P/V falls to 109.5 A. The chart in tab 2 shows both curves and the 6 kW line through the two points. Several reports read about 55 V and 110 A off the scope here, which this steady-state model reproduces.
Stack consumption falls with the current (49.86 to 40.94 lpm), but the fuel fed went up, so efficiency on the fuel fed drops from 55.0 % to 32.4 %: in this model unreacted hydrogen is fuel lost. That is the example's "the stack consumption and the efficiency will decrease".
How much hydrogen does a fuel cell stack use?
Two electrons per H2 molecule, and every cell in series carries the full current:
As a gas flow that is 49.84 lpm of fuel at 338 K and 1.5 atm (the block's "Stack consumption" in lpm) and 60.38 slpm at 0 °C and 1 atm (its slpm output; the dialog shows 60.38). The block's slpm reference temperature is not printed in its documentation: 273 K and 1 atm is the one that reproduces both 60.38 slpm of fuel and 143.7 slpm of air. Air consumed is 177.9 lpm at stack conditions, against 300 lpm fed. Faraday's constant here is the block's 96,485 C/mol; NIST's CODATA value is 96,485.332 C/mol, 3.4 ppm higher, which does not change any digit shown.
What is fuel cell efficiency: LHV, HHV or the block's?
Three numbers are in circulation and reports mix them. The hydrogen's energy per electron pair is the heating value over 2F: 1.2532 V on the lower heating value (the block's Δh0 = 241.83 kJ/mol, NIST's water vapour formation enthalpy) and 1.4812 V on the higher (285.83 kJ/mol, liquid water).
The voltage efficiency counts only hydrogen that reacts. The block's nominal efficiency is defined on the LHV of the hydrogen fed, so it carries the utilization: rearranging its nominal-utilization equation gives η = Uf,H2 Vcell/1.2532 V, which returns exactly the 55 % it was given. Its documentation does not print the formula for the efficiency output; this definition is what reproduces the nominal 55 %. The heat the stack has to reject, if the product water leaves as liquid:
On the LHV basis (water leaving as vapour) it is 4,860 W. Either way the stack rejects about as much heat as it makes electricity.
How much hydrogen does a fuel cell car use per 100 km?
Work out the electrical energy the drive draws per km over a cycle, divide by the fuel cell system's efficiency and the hydrogen's lower heating value:
For a Mirai-sized car on WLTC class 3b with our assumed losses, that gives 168 Wh/km at the bus and 0.918 kg/100 km, so 610 km on a 5.6 kg tank. The official figures: Toyota UK's press pack gives 0.79 kg/100 km on WLTP with 19-inch wheels and 0.89 with 20-inch, and a 5.6 kg tank; fueleconomy.gov rates the 2025 Mirai XLE at 1.4 kg per 100 miles (0.870 kg/100 km) and 402 miles of range, which is 0.866 kg/100 km on that tank. Our estimate sits about 9 % above the middle of the WLTP band, which is the size of the uncertainty in the assumed frontal area, tyres and system efficiency.
Steady top speed (174 km/h) needs about 63 kW at the bus; the Mirai's stack is rated 128 kW and its motor 134 kW, the difference going into acceleration and the compressor. A 6 kW stack, the MATLAB example's, would carry a car like this only at low city speeds, which is why reports that hang a drive cycle on it see the stack saturate.
Why does the model need a boost converter?
The stack's voltage moves with load (65 V open circuit, 45 V nominal, 37 V at full load) and the bus must not. An ideal boost in continuous conduction:
After the step to 85 lpm the stack sits at 54.8 V, so the converter's duty cycle drops to 0.452 and its input current to 109.5 A: that is the controller doing what the example calls "very well regulated". The example's converter is an average-value model, so it has no switching ripple or losses; tab 4 is the same ideal stage.
What 76 public fuel cell reports do (as of 23 Nov 2026)
We read the 76 public Skill-Lync reports titled "Week 6 Fuel cell powered vehicle model" and similar, as of 23 Nov 2026, n = 76. 1 has almost no text of its own; many are image-heavy (38 have ten or more images), and numbers inside images were not read. The links are examples of reports that do it.
- 46 / 76Report uses the MathWorks 6 kW / 45 Vdc fuel cell stack example. report 1report 2
- 35 / 76Pastes the example description (Uf_H2 = 99.56 %, hydrogen utilization constant for the first 10 s). report 1report 2
- 16 / 76Pastes the example sentence "increase of the Nernst voltage so the fuel cell current will decrease". report 1report 2
- 19 / 76Mentions the Nernst voltage anywhere. report 1report 2
- 34 / 76States that the current decreases after the 10 s flow increase (any wording, pasted included). report 1report 2
- 14 / 76States a stack efficiency % read off their own scope. report 1report 2
- 18 / 76Replaces the ramp with their own flow input: a drive-cycle-derived or typed flow table (signal builder, repeating sequence, lookup). report 1report 2
- 46 / 76Mentions a drive cycle (UDDS, WLTP, NEDC, US06...). report 1report 2
What stands out: 16 reports paste the example's sentence about the Nernst voltage, and 0 of 76 explain in their own words why lower utilization raises it (the hydrogen partial pressure above). None computes the utilization or the hydrogen per km with their own numbers. 14 read a stack efficiency off their scope, from 20 % to 80 %; the scope reads 0 % whenever no fuel flows. These are first-party counts, a starting point rather than a measure of ability.
How we checked the calculator
An independent Python script, scripts/verify/fuelcell.py, rebuilds the numbers with its own code, and this page refuses to build if the browser code differs from it in any of 1,458 numbers or verdicts (49 further assertions run inside the script, 193 cases). It fits the curve by eliminating R instead of Cramer's rule, finds operating points by regula falsi instead of bisection, and integrates the drive cycles from the raw data files with its own resampler. The hand cases are the block's own parameter dialog: R, i0, α, both utilizations, 50.06 and 84.5 lpm, 506.4 lpm of air, En = 1.1288 V and 60.38 / 143.7 slpm, all reproduced. Two deliberate bugs (−44.43 → −44.3 in the Nernst equation, z = 1 in the LHV voltage) each make the build fail.
What this calculator does not cover
- Dynamics. The block's double-layer response time and the oxygen-depletion voltage undershoot are left out; every result is a steady state.
- Temperature and pressure changes in the detailed model. Tab 2 holds the nominal temperature and pressures; the exchange current's temperature term needs the block's activation energy, which depends on its unit convention.
- Mass-transport losses. The block assumes stacks do not operate there, so neither does this tool.
- Real FCEV energy management. Tab 3 treats the battery as charge-sustaining and the fuel cell system efficiency as one number; the stack's efficiency changes with load.
The fuel cell vehicle model is a week of Skill-Lync's hybrid and electric vehicle courses, next to battery, motor and drive cycle models in MATLAB and Simulink.
Frequently asked questions
What is fuel utilization in a fuel cell?
Fuel utilization is the share of the hydrogen fed to the stack that actually reacts. It is the reacted hydrogen, N × I / (2F) moles per second, divided by the hydrogen supplied. The MathWorks 6 kW stack runs at 99.56 % at its nominal point. Raising the fuel flow at the same current lowers it.
How do you calculate hydrogen consumption of a fuel cell?
Each H2 molecule gives two electrons, and every cell in series carries the full current, so the stack consumes N × I / (2F) mol/s of hydrogen. Multiply by 2.016 g/mol for grams per second. The 65-cell stack at 133.3 A consumes 0.0449 mol/s, 0.0905 g/s or 0.326 kg/h.
Why does the fuel cell current decrease when the fuel flow increases?
More fuel at the same current means lower utilization, so more unreacted hydrogen stays in the anode and its partial pressure rises. The Nernst voltage rises with the log of that pressure and the activation loss falls. The stack voltage goes up, and the converter draws the same 6 kW at less current.
What is the efficiency of a PEM fuel cell?
On the lower heating value, the voltage efficiency is the cell voltage divided by 1.2532 V. The MathWorks block also multiplies by the hydrogen utilization, because unreacted hydrogen is fuel spent too. Its 6 kW stack is rated 55 % at 0.692 V per cell. On the higher heating value the same cell gives 46.7 %.
What is the Nernst voltage of a fuel cell?
The Nernst voltage is the open-circuit voltage a cell would have at the actual temperature and gas partial pressures. It starts from 1.229 V at 298 K and changes by RT/2F times the log of the hydrogen pressure times the square root of the oxygen pressure. Low hydrogen pressure lowers it.
How much hydrogen does a fuel cell car use per 100 km?
The second-generation Toyota Mirai is rated 0.79 to 0.89 kg per 100 km on WLTP by Toyota UK, and 1.4 kg per 100 miles by the EPA, about 0.87 kg per 100 km. With its 5.6 kg tank that gives roughly 400 miles. This calculator estimates your car's figure from road load.
Why does a fuel cell vehicle model need a boost converter?
A stack's voltage falls as the current rises, from 65 V open circuit to 37 V at full load for the 6 kW stack. The motor drive wants a steady bus. The example's converter holds 100 V, so at 45 V the ideal boost duty is 0.55 and the input current is 133 A.
What is the difference between LHV and HHV for hydrogen?
The higher heating value counts the heat released when the product water condenses; the lower value does not. From NIST formation enthalpies, hydrogen's LHV is 241.83 kJ/mol, about 120 MJ/kg, and its HHV 285.83 kJ/mol, about 142 MJ/kg. Fuel cell efficiencies quoted for vehicles are usually on LHV.
Related on Skill-Lync
- EV range calculator (Wh/km and range on MIDC, WLTC and the EPA cycles for a battery car)
- EV powertrain sizing calculator (motor power, torque and gear ratio)
- Battery pack calculator (cells in series and parallel for the hybrid's buffer battery)
- Regenerative braking energy calculator (what braking can return to the battery)
- Converter loss calculator (switching and conduction losses of the DC/DC stage)
- EV courses compared
- All free engineering tools
Sources
- MathWorks, Fuel Cell Stack block reference, Simscape Electrical Specialized Power Systems, R2024b documentation: simplified and detailed model equations, utilizations, partial pressures, Nernst voltage, default parameters and the "Fuel Cell parameters" dialog. Njoya, Tremblay and Dessaint, A generic fuel cell model for the simulation of fuel cell vehicles, IEEE VPPC 2009 (the block's reference).
- MathWorks, 6 kW 45 Vdc Fuel Cell Stack example (power_fuel_cell), as archived 11 Jul 2024: the 6 kW RL load, 100 V converter, 99.56 % utilization, 50 to 85 lpm step.
- NIST CODATA: Faraday constant 96,485.33212 C/mol, molar gas constant 8.314462618 J/(mol·K). NIST Chemistry WebBook: water ΔfH° −241.826 kJ/mol (gas), −285.830 kJ/mol (liquid); H2 2.01588 g/mol. LHV 119.96 MJ/kg and HHV 141.79 MJ/kg derived from these.
- US DOE / EPA, fueleconomy.gov: 2024-2025 Toyota Mirai (74 MPGe, 1.4 kg H2 per 100 miles, 402 miles for the XLE).
- Toyota GB, Mirai press pack (27 Nov 2024): 5.6 kg tank, WLTP 0.79 / 0.89 kg/100 km, 128 kW 330-cell stack, kerb mass, Cd 0.29, dimensions.
- Skill-Lync, the 76 public fuel cell vehicle model reports, read 23 Nov 2026.