The problem
Fuel cells dislike rapid power changes and cannot absorb regenerative energy, so FCEVs carry a battery to handle transients and braking. The power split between fuel cell and battery decides hydrogen consumption, fuel-cell stress and whether the battery stays within its SOC window. A rule-based strategy is the usual starting point and a sound basis for later optimisation work.
Objectives
- Model a PEM fuel-cell stack with a polarisation curve and hydrogen consumption.
- Model the battery buffer and a boost converter on a common DC bus.
- Design thermostat and load-following power-split strategies with slew-rate limits.
- Compare hydrogen consumption, fuel-cell power variation and SOC deviation.
- Check charge sustenance over repeated drive cycles.
What you need
Tools and toolboxes
- Simulink — Vehicle load model, power-split controller and test harness.
- Simscape Electrical — Fuel Cell block or a polarisation-curve source, battery, averaged boost converter and DC bus; an equation-based Simulink model is an alternative.
- Stateflow (optional) — Thermostat on/off logic with SOC hysteresis; Simulink Relay blocks also work.
- MATLAB — Parameter scripts, hydrogen accounting and comparison plots.
Software
- MATLAB R2023b or later
- Simulink
- Simscape Electrical
- CSV drive-cycle data (WLTP, MIDC)
Extra parts and data
- Published PEM fuel-cell stack datasheet or polarisation data — A realistic polarisation curve and efficiency map are needed to calculate hydrogen consumption; values from a public datasheet are better than invented ones.
Key concepts
- Polarisation curve
- Cell voltage against current density, falling because of activation, ohmic and concentration losses. Stack power and efficiency follow from it.
- Hydrogen consumption
- From Faraday's law, hydrogen flow is N·I / (2F) moles per second for N cells at stack current I, which converts directly into grams per kilometre.
- Charge-sustaining operation
- Over a trip, the battery should end at about the same SOC it started with, so all net energy comes from hydrogen and strategies can be compared fairly.
- Slew-rate limit
- A cap on how fast fuel-cell power may change, for example a few kilowatts per second, protecting the stack from fuel starvation and degradation.
Step-by-step guide
- 1
Define the example vehicle
Use example values for a mid-size FCEV: 1,600 kg, Cd·A of 0.7 m², an 80 kW stack of about 370 cells, a 1.5 kWh, 250 V battery buffer and a 350 V DC bus. Take the polarisation curve from a published datasheet or a textbook model with activation, ohmic and concentration terms. Collect everything in a parameter script with units noted.
Checkpoint: A polarisation curve plot with stack peak power near the example rating and efficiency highest at low-to-mid load.
- 2
Build the load model
Drive a longitudinal model in Simulink with WLTP and MIDC traces and convert wheel power to DC bus power with motoring and regeneration efficiencies. Add an auxiliary load of 1 kW. Save the bus power as a timeseries so every strategy sees the same demand. Use a fixed-step solver at 0.1 s for the energy-management layer. Check that cycle energy and peak power are sensible for the example vehicle before using the profile, because every strategy comparison depends on this one demand signal.
Checkpoint: Bus power peaks of tens of kilowatts on WLTP, with negative regions during braking.
- 3
Model the fuel-cell system
Use the Simscape Electrical Fuel Cell block parameterised from the polarisation data, or an equation-based model in a MATLAB Function block that returns stack voltage for a commanded power. Add a balance-of-plant load, for example a compressor power proportional to stack current. Compute hydrogen flow from Faraday's law and integrate to grams. Plot net system efficiency against net power, including the balance-of-plant load, so the efficient operating region the strategies should favour is clear.
Checkpoint: At a constant commanded power, hydrogen flow matches a hand calculation from N·I / (2F) within 1 per cent.
- 4
Model the battery and converter
Model the battery as an OCV lookup against SOC with internal resistance, or use the Simscape Battery block. Represent the fuel-cell boost converter as an average model with constant efficiency, delivering commanded power to the bus. The battery connects directly to the bus and supplies or absorbs the difference between demand and fuel-cell output. Limit battery power to its rated charge and discharge values and log when a limit is reached, since a strategy that hits limits often is not acceptable.
Checkpoint: A power-balance check: demand equals fuel-cell output plus battery power, after losses, within 0.5 per cent at every step.
- 5
Implement a thermostat strategy
Switch the fuel cell between off and a fixed efficient power when SOC crosses lower and upper thresholds, for example on below 55 per cent and off above 65 per cent. Apply a slew-rate limit with a Rate Limiter block. Keep a minimum on-time to avoid frequent start-stops. This simple strategy is the baseline. Choose the fixed on-power near the peak of the system efficiency curve, and log the number of start-stops, since each one adds wear to the stack.
Checkpoint: On a repeated WLTP run the fuel cell cycles on and off, and SOC stays within the threshold band plus a small overshoot.
- 6
Implement a load-following strategy
Command fuel-cell power as filtered bus demand plus an SOC correction term k·(SOC_target − SOC), clamped between a minimum idle power and the stack limit, with the same slew-rate limit. The battery handles fast transients and all regeneration. Tune k so SOC returns to target within a few minutes without large power swings. Choose the filter time constant so the fuel cell sees only slow changes, and check that the slew-rate limit is rarely active once the filter is in place.
Checkpoint: Fuel-cell power follows a smoothed version of demand and SOC ends a cycle within a few per cent of its starting value.
- 7
Correct for SOC difference
Even with charge sustenance, final SOC differs slightly between strategies. Convert the SOC difference into an equivalent hydrogen mass using the average fuel-cell system efficiency and battery round-trip efficiency, and add it to the measured consumption. Without this correction, a strategy that drains the battery looks unfairly good. Report both uncorrected and corrected figures in the results, so readers can see how much the correction changes the comparison between strategies.
Checkpoint: Corrected hydrogen figures for both strategies with the size of the correction stated.
- 8
Compare strategies
Run both strategies on WLTP and MIDC, repeated enough times that end effects are small. Compute corrected hydrogen consumption in kg/100 km, fuel-cell power variation as the RMS of its rate of change, number of fuel-cell start-stops and battery SOC range. Present results in a table and overlaid plots from the Simulation Data Inspector. Use the same number of cycle repetitions for every strategy, and note the cycle-average power so readers can relate consumption to how demanding each cycle is.
Checkpoint: A comparison table across both cycles with consistent units and a written interpretation.
- 9
Sensitivity study
Sweep the slew-rate limit and the battery size in a scripted loop using SimulationInput arrays. Show how a tighter slew limit protects the stack but needs a larger battery to cover transients without leaving the SOC window. Plot hydrogen consumption and SOC range against slew limit for two battery sizes. Keep the controller gains fixed across the sweep so the effect seen comes from the slew limit and battery size, not from retuning, and record any runs where SOC leaves its window.
Checkpoint: Sweep plots showing the trade-off between stack smoothness, battery size and hydrogen use.
- 10
Report
Present the models with their data sources, both strategies, the SOC correction method, comparison and sensitivity results. State the limitations: steady-state polarisation model, no stack thermal or humidity dynamics, average converters and no degradation model. Note that this is a simulation-only study; hydrogen systems involve hazards that are out of scope. Attach the scripts that regenerate the comparison table and sweep plots, so the results can be checked and reused by a later project.
Checkpoint: A report with corrected consumption figures and a justified strategy recommendation.
Testing & validation
- Hydrogen flow matches Faraday's-law hand calculation.
- Bus power balance closes within 0.5 per cent at every step.
- Both strategies are charge-sustaining over repeated cycles.
- SOC-corrected hydrogen consumption reported for each strategy and cycle.
- Fuel-cell slew-rate limit respected throughout.
Expected results
An FCEV power-split model with thermostat and load-following strategies, compared on SOC-corrected hydrogen consumption, fuel-cell power smoothness and battery SOC range, with a sensitivity study on slew limit and battery size.
Take it further
- Implement ECMS and compare with the rule-based strategies.
- Add a supercapacitor alongside the battery.
- Add a simple stack degradation model linked to load changes and start-stops.
- Compute a dynamic-programming benchmark for the same cycle.
Viva and review questions
Why does an FCEV need a battery?
The fuel cell cannot absorb regenerative energy and should not follow rapid power changes, so the battery handles transients and braking while the fuel cell supplies average power.
Why correct hydrogen use for the final SOC difference?
A strategy that ends with a lower SOC has used battery energy that would later need hydrogen to replace, so without correction it would look more efficient than it is.
Where is a fuel cell most efficient?
At low-to-mid load, because voltage, and so efficiency, falls as current rises; at very low load, balance-of-plant power lowers system efficiency.
Learn it at DIYguru
These DIYguru courses and programmes teach what this project needs.
