Skip to main content
emobility.academy
M.TechEnergy managementAdvanced About 9 weeksMATLAB & Simulink

Equivalent Consumption Minimisation Strategy (ECMS) for a Fuel-Cell Hybrid

Implement the Equivalent Consumption Minimisation Strategy (ECMS) for a fuel-cell and battery hybrid in Simulink, with an adaptive equivalence factor that keeps the battery charge-sustaining, and compare it with rule-based control and a dynamic-programming benchmark on hydrogen use and fuel-cell stress.

Tools: MATLAB · Simulink

Equivalent Consumption Minimisation Strategy (ECMS) for a Fuel-Cell Hybrid: Electric scooter wiring and power-flow trainer board at DIYguru
Representative photo from DIYguru's EV lab, not of this specific project.

The problem

Rule-based power splits for fuel-cell hybrids are easy to tune but leave hydrogen savings on the table. ECMS turns the global optimisation into an instantaneous one by assigning battery energy an equivalent hydrogen cost. Its performance depends heavily on the equivalence factor, which must adapt to the drive cycle to keep SOC in range, and this makes it an instructive M.Tech-level control problem.

Objectives

  • Build a fuel-cell hybrid model with a polarisation-based hydrogen map and a battery buffer.
  • Implement instantaneous ECMS with a constant equivalence factor.
  • Add an adaptive equivalence factor based on SOC feedback.
  • Compare with rule-based control and a DP benchmark.
  • Analyse sensitivity to the equivalence factor and adaptation gains.

What you need

Tools and toolboxes

  • Simulink — Vehicle and powertrain model, ECMS controller as a MATLAB Function block, and test harness.
  • Simscape Electrical (optional) — Physical battery and converter models; an equation-based battery in Simulink is enough for energy studies.
  • MATLAB — Hydrogen maps, the DP benchmark, parameter sweeps with sim() and analysis.

Software

  • MATLAB R2023b or later
  • Simulink
  • CSV drive-cycle data (WLTP, MIDC, FTP-75)

Extra parts and data

  • Published PEM fuel-cell polarisation and system efficiency data — ECMS results depend directly on the shape of the fuel-cell efficiency curve, so it should come from a public datasheet or paper rather than assumed values.

Key concepts

Equivalent consumption
Instantaneous cost = hydrogen flow of the fuel cell + s · battery power / lower heating value of hydrogen, where s is the equivalence factor converting battery energy into hydrogen terms.
Equivalence factor
A larger s makes battery energy look expensive, so the fuel cell supplies more; a smaller s drains the battery. The right value depends on the cycle.
Adaptive ECMS
s is adjusted online from SOC error, for example s = s₀ + Kp·(SOC_ref − SOC) + Ki·∫(SOC_ref − SOC) dt, keeping SOC near its target without knowing the cycle.
Pontryagin link
ECMS is closely related to Pontryagin's minimum principle, where the equivalence factor corresponds to the co-state; for the right constant value on a known cycle, ECMS approaches the optimal solution.

Step-by-step guide

  1. 1

    Set up the model and data

    Use example vehicle values: 1,600 kg FCEV, 80 kW stack, 1.5 kWh battery at 250 V. Build the fuel-cell system hydrogen map: hydrogen flow against net system power, including compressor load, from the polarisation curve and Faraday's law. Build the battery as an OCV and resistance model. Drive the model from WLTP bus power at a 1 s energy-management step.

    Checkpoint: A hydrogen flow against net power curve that is convex over most of the range, with peak system efficiency at part load.

  2. 2

    Implement a rule-based baseline

    Implement load-following with SOC correction and a slew-rate limit, as a reference controller. Tune it on WLTP for charge sustenance. Record hydrogen use corrected for final SOC difference, fuel-cell power rate RMS and number of start-stops. All later strategies will be compared against these numbers on the same cycles. Fix the baseline's tuning before implementing ECMS and do not change it afterwards, so later comparisons are not biased by tuning effort spent on one method only.

    Checkpoint: Baseline metrics recorded with final SOC within a few per cent of the start.

  3. 3

    Write the ECMS cost function

    In a MATLAB Function block, create a grid of candidate fuel-cell powers between zero and the stack limit, respecting the slew limit from the previous step. For each candidate, the battery supplies the rest; compute battery current and its chemical power including resistive loss. Evaluate equivalent cost = hydrogen flow + s · P_batt,chem / LHV and pick the minimum among feasible candidates.

    Checkpoint: For a constant demand and fixed s, the chosen fuel-cell power matches a hand evaluation of the cost curve.

  4. 4

    Tune a constant equivalence factor

    On WLTP, run ECMS for a range of constant s values with a SimulationInput sweep. Plot final SOC against s. Use bisection to find the s that ends the cycle at the starting SOC. Record hydrogen use for that value. Note how sensitive final SOC is to s: a small change can deplete or overcharge the battery. Also record hydrogen use at s values on either side of the tuned value, to show how quickly consumption changes as the factor moves away from its best value.

    Checkpoint: A final-SOC-against-s plot crossing the starting SOC, and the corresponding tuned s value.

  5. 5

    Show the robustness problem

    Use the s tuned on WLTP to run MIDC and FTP-75. Final SOC will usually drift away from the target, showing that a constant factor tuned on one cycle does not transfer. Plot SOC trajectories for the three cycles on one figure. This motivates the adaptive version. Quantify the drift as the final SOC error on each cycle, and note whether a drained or overcharged battery would trigger a limit in a real vehicle.

    Checkpoint: SOC trajectories on held-out cycles that drift noticeably with the WLTP-tuned constant s.

  6. 6

    Add adaptive equivalence

    Make s a function of SOC error with a PI law and limits on s, updated every step. Choose the gains so SOC returns to the reference within a few minutes without oscillating. Run all three cycles with the same gains. Watch the trace of s in the Simulation Data Inspector; it should vary moderately around the tuned constant value.

    Checkpoint: All three cycles end with SOC within a few per cent of the reference using one set of gains.

  7. 7

    Compute a DP benchmark

    Solve the same problem by dynamic programming on each cycle, with battery SOC as state and fuel-cell power as control, using the same hydrogen map and battery model and requiring final SOC equal to initial SOC. Verify the DP with a grid-convergence check. The DP result is the lower bound on hydrogen use. Use the same time step, hydrogen map and battery model as ECMS so that the gap measured reflects the strategy and not modelling differences. Record DP run time and grid size for the report.

    Checkpoint: DP hydrogen use below every real-time strategy on each cycle, with grid-convergence evidence.

  8. 8

    Compare strategies

    Tabulate SOC-corrected hydrogen use, gap to DP, fuel-cell power rate RMS, start-stops and SOC range for rule-based control, constant-s ECMS (on its tuning cycle and on others) and adaptive ECMS. Plot fuel-cell power trajectories. ECMS often operates the fuel cell more aggressively, so report stress as well as hydrogen. Present both absolute values and gaps to DP, and mark clearly which results are on the cycle used for tuning and which are on held-out cycles.

    Checkpoint: A table across three cycles and four strategies, with both efficiency and stress metrics.

  9. 9

    Add a stress term

    Add a penalty on fuel-cell power change to the ECMS cost, w·(ΔP_fc)², and sweep the weight w. Plot hydrogen use against fuel-cell power rate RMS to show the trade-off between efficiency and stack smoothness. Choose a weight that keeps most of the hydrogen saving while cutting stress. Re-tune the adaptive gains if needed for each weight so charge sustenance is maintained, and report the final SOC error alongside the trade-off curve.

    Checkpoint: A trade-off curve with a selected weight and its hydrogen and stress figures.

  10. 10

    Sensitivity analysis

    Vary battery size, hydrogen map shape (for example a flatter efficiency curve) and adaptation gains. For each, record gap to DP and charge sustenance. Identify which parameters change conclusions and which do not. This strengthens the thesis beyond one parameter set. Change one parameter at a time from the nominal case, keep all other settings fixed, and report each result as the change in gap to DP relative to nominal, so the effects can be compared directly.

    Checkpoint: A sensitivity table showing which parameters move the gap to DP by more than a stated amount.

  11. 11

    Write up

    Document the model, data sources, ECMS derivation and its link to Pontryagin's principle, tuning method, adaptive law, DP benchmark, comparisons, stress trade-off and sensitivity. State the limitations: quasi-static fuel-cell model, no thermal or humidity dynamics and simulation only. Release the scripts and data needed to reproduce the tables. Include the equivalence factor traces and SOC trajectories for each cycle, as these show how the adaptive law behaves and help reviewers judge its robustness.

    Checkpoint: A thesis chapter with reproducible results and a clearly stated recommendation.

Testing & validation

  • Hydrogen map consistent with Faraday's law and the polarisation data.
  • ECMS choice matches a hand evaluation for fixed inputs.
  • Charge sustenance of adaptive ECMS on three cycles with one gain set.
  • DP benchmark verified by grid convergence.
  • SOC-corrected hydrogen and stress metrics for every strategy.

Expected results

A constant and adaptive ECMS for a fuel-cell hybrid, benchmarked against rule-based control and DP on three cycles, with a hydrogen-versus-stack-stress trade-off and a sensitivity study.

Research angle for your M.Tech thesis

Research questions: how close does adaptive ECMS come to the DP optimum for fuel-cell hybrids across cycles it was not tuned on, and what is the cost in stack stress? Metrics: SOC-corrected hydrogen per 100 km, gap to DP, fuel-cell power rate RMS, start-stops and SOC excursion. Baselines: rule-based load following, constant-s ECMS and DP. Credible results need public fuel-cell data, consistent models between DP and ECMS and testing on held-out cycles. A careful study of the efficiency–stress trade-off with adaptive equivalence, or a new adaptation law that improves robustness, is suitable for a conference or journal submission.

Take it further

  • Predict the equivalence factor from route information or speed preview.
  • Add fuel-cell degradation to the cost function.
  • Compare with model predictive control over a short horizon.
  • Extend to a fuel-cell, battery and supercapacitor system.

Viva and review questions

What does the equivalence factor represent physically?

It converts battery energy into the hydrogen that will eventually be needed to replace it, accounting for the average efficiencies of the fuel-cell and battery paths.

Why does a constant equivalence factor fail on a different cycle?

The correct value depends on the future load, so a value tuned for one cycle under- or over-values battery energy on another and SOC drifts.

How is ECMS related to Pontryagin's minimum principle?

Minimising the Hamiltonian at each instant is equivalent to minimising equivalent consumption, with the co-state playing the role of the equivalence factor.

Learn it at DIYguru

These DIYguru courses and programmes teach what this project needs.

Related EV projects

All 100 MATLAB & Simulink EV projects