Stateflow hysteresis control, corrected powertrain geometry, shaft-power fuel accounting, and parameter sweep optimization.
Version 8 represents a major accuracy overhaul across three independent subsystems. While V6 introduced the burn-coast control philosophy, several fundamental modeling errors were identified and corrected in V8 that significantly affect simulation fidelity and fuel predictions.
The most impactful corrections were a wheel radius error that had been halving the engine RPM throughout the powertrain, a driver strategy that lacked an upper speed cutoff causing the engine to run continuously, and an energy model computing fuel consumption from net vehicle force rather than engine shaft power. Each of these issues independently produced incorrect results — together they made quantitative fuel predictions unreliable.
V8 also introduces the first full parameter sweep with Shell competition scoring (km/L), producing actionable design sensitivity rankings for the engineering team.
r_w was set to 0.508 m (the wheel diameter)
instead of 0.254 m (the radius). This caused engine RPM to be calculated at half the true value,
pushing the operating point below the valid engine map range and returning NaN torque values.
RPM_idle was set to 1800 RPM, below
the engine map minimum of 2708 RPM. Updated to match the dyno map lower bound.
v_low_on and coasts when velocity exceeds v_high_on.
F_net × v, which underestimates fuel input. The corrected path integrates engine
shaft power (T_engine × ω_engine), then divides by engine efficiency and fuel LHV.
v_low_on) implementedv_actual ≥ v_high_onv_actual ≤ v_low_on
Stateflow State Machine — V8 DriverStrat
Throttle Command — clean square wave with correct upper cutoff
With the corrected wheel radius and Stateflow upper cutoff, the velocity profile now behaves physically correctly — the vehicle accelerates during burn, peaks at v_high_on, then decelerates along an exponential decay curve during coast.
Velocity vs Time — correct oscillation between v_low_on and v_high_on
Coast Shape Diagnostic — exponential fit confirms correct physics
Standard run: v_low=6.5, v_high=7.5, G=10, m=100 kg, Cd=0.30, t_end=200s
SweepV8b evaluated four design parameters independently across a 1000s simulation window. Middle-80% window averaging eliminates startup transients and incomplete end-cycles.
Speed Band Efficiency Map (km/L) — optimum at v_low=5.5, v_high=7.0
Speed Band Fuel Map (g) — wider band consistently reduces fuel
Gear ratio swept from G=7 to G=14. The km/L variation across this entire range was only ±3.3%, confirming gear ratio has minimal effect on efficiency. The practical constraint is keeping engine RPM within the valid dyno map range (2708–8708 RPM) at operating speed.
Gear Ratio Sweep — km/L (left) and engine RPM at v_target (right). Red lines mark valid map RPM bounds.
Gear Ratio vs Fuel — minimal variation confirms low design sensitivity
Mass swept from 80 kg to 200 kg. Every 10 kg of additional mass costs approximately 30–40 km/L. Rolling resistance scales directly with mass, requiring more frequent and longer burn cycles to maintain speed.
Mass vs Shell Score — monotonic penalty; 80 kg gives 735 km/L vs 419 km/L at 200 kg
Mass vs Fuel — near-linear relationship confirms rolling resistance dominance
Cd swept from 0.10 to 0.50. Reducing Cd from 0.50 to 0.10 nearly doubles the Shell score from 500 to 933 km/L.
Cd vs Shell Score — near-linear improvement with reduced drag
Cd vs Fuel — smooth monotonic relationship
Percentage improvement from worst to best value within each sweep range — higher value means higher design priority.
Full System Overview — DriverStrat, Powertrain, VehicleDynamics, EnergyModeling
Powertrain Subsystem — torque map lookup, gear ratio, drivetrain efficiency
Representative output from analyzeV8_shell_eco.m and SweepV8b.m.
=== Shell Eco Run Results (V8) === Distance: 1451.1 m Energy (mech): 2.8 kJ Fuel consumed: 2.02 g Avg Speed: 7.23 m/s Shell Score: 536.1 km/L --- Coast Shape Fit --- Linear RMSE: 0.00525 m/s Exponential RMSE: 0.00066 m/s Result: CURVED (exponential) — physics correct --- Sweep Summary (V8b) --- Speed band: v_low=5.5, v_high=7.0 → 704.5 km/L Gear ratio: G=13.00 (RPM=3421) → 659.3 km/L Mass: m=80 kg → 734.7 km/L Drag coeff: Cd=0.10 → 933.2 km/L --- Sensitivity Ranking --- Speed band: 26.0% Gear ratio: 3.3% Mass: 75.3% Drag coeff: 86.5%