Why do the Simulation of Fuel Cell System and Fuel Cell I-V Characteristics examples not work in R2024b Update 7?
15 views (last 30 days)
Show older comments
MathWorks Support Team
on 11 Dec 2025 at 0:00
Answered: MathWorks Support Team
on 11 Dec 2025 at 16:12
After installing MATLAB R2024b Update 7, the 'Simulation of Fuel Cell System' and 'Fuel Cell I-V Characteristics' examples throw an error. Why do these examples no longer work, and is there a workaround to allow me to use these workflows in R2024b after Update 7?
Accepted Answer
MathWorks Support Team
on 11 Dec 2025 at 0:00
To fix non-physical current-voltage characteristics, the equations and parameters of the Fuel Cell block have changed. However, the current versions of the Fuel Cell System and Fuel Cell I-V Characteristics examples continue to use non-physical model constraints and parameter values to produce meaningful results, which cause simulation failures.
Any models that you created using these examples as a starting point might also include non-physical constraints and parameter values and therefore experience similar simulation issues.
Workaround
To prevent this issue, arrange the blocks and connections in your Simulink models to match the configuration of blocks and connections used in the Simulink models of these examples provided in R2025b Update 1 or later.
Then, update these parameters:
Inside the FuelCellSystemData.m script:
Eoc = 65; % Open-circuit voltage [V]
A = 0.024; % Tafel slope [V]
Ri = 0.078; % Internal resistance [Ohm]
i0 = 0.3; % Nominal exchange current [A]
i_lim = 225; % Collapse current [A]
N_cell = 65; %Number of cells per module
number_unit = 10; %Module units (Series)
pH2_nom = 1.5e5; % Nominal H2 pressure [Pa]
pO2_nom = 1.0e5; % Nominal O2 pressure [Pa]
thermal_mass = 15000; % Thermal mass [J/K]
T_init = 338.15; % Initial stack temperature [K]
T_nom = 338.15; % Nominal stack temperature [K]
Qfuel0 = 2.0; % Initial fuel flow rate [lpm]
Rload = 62.5;
Vset = 0.9*N_cell*number_unit; % Setpoint voltage = 0.9 V per cell
pH2 = 2.5; % Pressure_H2
Inside the FuelCellIVCharacteristicData.m script:
Tsim = 360;
I_array = [1 5 15 26 37 48 62 76 86 97 110 124 138 155 170 188 202];
V_array = [64 61 58 56.5 55 53.5 52 50.5 49.5 48.5 47.2 45.7 44.5 43 41.5 40 39];
FuelCell.OpenCircuitVoltage = 65; % Open-circuit voltage [V]
FuelCell.TafelSlope = 0.024; % Tafel slope [V]
FuelCell.InternalResistance = 0.078; % Internal resistance [Ohm]
Nu = 1;
pAir = 1.0; pH2 = 1.5;
FuelCell.ExchangeCurrent = 0.3;
FuelCell.CollapseCurrent = 225;
FuelCell.NomH2_Pressure = 1.5e5;
FuelCell.NomAir_Pressure = 1.0e5;
FuelCell.InitVoltage = 65;
FuelCell.InitTemperature = 338.15;
FuelCell.NomTemperature = 338.15;
FuelCell.Qfuel = 90;
FuelCell.Qair = 375;
FuelCell.Concentration = [99 21 1]; %[H2 O2 vapor]
Ncell = 65; % Number of elementary cells
0 Comments
More Answers (0)
See Also
Categories
Find more on Magnetic Elements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!