The problem
Early-stage EV design needs fast energy estimates across many cycles and variants. Quasi-static backward models do this in seconds by assuming the cycle is followed exactly. Students need to understand both how to use such a tool and when its assumptions break down.
Objectives
- Set up the QSS Toolbox library in MATLAB and Simulink.
- Build a battery electric vehicle model from QSS blocks: drive cycle, vehicle, gearbox, motor and battery.
- Compute energy per kilometre on several cycles and separate the loss contributions.
- Cross-check the result with an independent Simulink road-load calculation.
- Discuss the limits of the quasi-static, backward-facing approach.
What you need
Tools and toolboxes
- MATLAB — Running the QSS models, loading cycles and parameters, scripting comparisons.
- Simulink — QSS models are Simulink diagrams built from the toolbox library; also used for the independent cross-check model.
- QSS Toolbox (ETH Zurich, free third-party) — The library of quasi-static vehicle, gearbox, motor and battery blocks with efficiency-map based losses.
Software
- MATLAB and Simulink (check the QSS Toolbox documentation for the releases it supports)
- QSS Toolbox
- CSV speed traces for IDC, MIDC, WLTP or NEDC
Extra parts and data
None beyond the software above.
Key concepts
- Quasi-static model
- Each time step is treated as a steady operating point: from the cycle's speed and acceleration, the required force, torque and power are computed through each component using efficiency maps.
- Backward-facing
- Calculation flows from the wheels back to the battery, so the cycle is followed by definition. It cannot reveal whether the powertrain is strong enough unless limits are checked explicitly.
- Efficiency map
- A table of component efficiency against speed and torque. The QSS motor block uses one to turn mechanical power into electrical power.
- Loss breakdown
- Splitting the battery energy into road-load, drivetrain, motor and battery losses shows which component improvement would most reduce consumption.
Step-by-step guide
- 1
Install and explore the toolbox
Add the QSS Toolbox folder to the MATLAB path and open its Simulink library. Open and run the example models supplied with it, and read the block masks to see which inputs each block expects (speed, acceleration, gear ratio, efficiency maps). Note any compatibility warnings with your MATLAB release and record the version you used. Sketch the signal flow of one example model on paper, from cycle to battery, before building your own.
Checkpoint: An example model from the toolbox runs and produces its consumption result without errors.
- 2
Define the example vehicle
Choose an example compact car: mass 1500 kg, Cd 0.30, A 2.2 m², Crr 0.010, wheel radius 0.30 m, single-speed ratio 9:1, a 40 kWh battery. Enter these into the vehicle and gearbox block masks or into a parameter script that the masks reference. Keep all parameters in one script so variants are easy to create and compare. Record the source or assumption behind each value in a comment next to it in the script.
Checkpoint: A parameter script and a model diagram with the example values visible in the block masks.
- 3
Load the drive cycles
Convert IDC, MIDC and WLTP speed traces to the format the QSS drive-cycle block expects (time, speed and computed acceleration), using a consistent 1 s step. Compute acceleration with a central difference, and check for spikes caused by noisy or rounded data. Save each cycle as a MAT file so the model can switch between them. Plot the cycles together on one figure so their speed ranges and stop patterns can be compared at a glance.
Checkpoint: Speed and acceleration plots for each cycle with no unrealistic acceleration spikes, and distances matching the published values.
- 4
Build the BEV model
Connect the drive-cycle, vehicle, gearbox, electric motor and battery blocks from the QSS library to form a battery electric vehicle. Use the motor efficiency map supplied with the toolbox or a generic map scaled to the example rating, and set the battery parameters. Add To Workspace blocks for wheel power, motor electrical power and battery power. Check the sign convention for regenerative power in each block before trusting the battery energy result.
Checkpoint: The model runs for each cycle and outputs battery energy and Wh/km.
- 5
Check limits explicitly
Because the model is backward-facing, compare the required motor torque and power at every time step with the motor's limits and flag violations. Plot required torque against speed over the motor envelope. If WLTP's high-speed phase exceeds the limits, note it rather than ignoring it, because the backward model would otherwise report a consumption the car cannot achieve. Report the share of cycle time spent above each limit alongside the count.
Checkpoint: A torque–speed plot with operating points and envelope, and a count of any limit violations per cycle.
- 6
Break down the losses
From the logged powers, integrate energy at each interface: wheel tractive energy (positive and negative), gearbox losses, motor losses and battery losses. Express each as Wh/km and as a share of battery energy. Compute how much braking energy is recovered and how much is lost to friction brakes under the regen limit. Present the breakdown as a Sankey-style or stacked bar chart so the dominant loss on each cycle is obvious to a reader.
Checkpoint: A loss-breakdown table per cycle whose terms sum to the battery energy within 1 per cent.
- 7
Cross-check with an independent model
Build a minimal Simulink backward calculation from the road-load equation, using the same parameters and a constant efficiency equal to the cycle-average efficiency from QSS. Compare wheel energy exactly and battery energy approximately. Differences in wheel energy point to parameter or acceleration-calculation differences. Use exactly the same acceleration calculation in both models, because small differences in how acceleration is derived from the speed trace change inertia energy noticeably on stop-start cycles such as IDC.
Checkpoint: Wheel energy from both models agrees within 1 per cent; battery energy differences are explained.
- 8
Variant study
Write a script that changes one parameter at a time (mass, CdA, Crr, gear ratio, motor map) and reruns the model on all cycles. Present the change in Wh/km as a tornado chart for each cycle. Because QSS runs fast, you can also sweep two parameters together and present a contour plot, for example mass against CdA. Label each bar with the absolute change in Wh/km as well as the percentage.
Checkpoint: A tornado chart for each cycle and one contour plot.
- 9
Report
Write up the toolbox setup, model structure, parameters, cycle comparison, loss breakdown, cross-check and variant study. Include a section on the limits of the quasi-static method: no driver dynamics, no transient thermal effects, and the need for explicit limit checks. Cite the toolbox as a third-party academic tool and record the version used. Add an appendix with the exact block parameters and cycle files used, so the results can be reproduced.
Checkpoint: A report with reproducible scripts and a clear statement of method limitations.
Testing & validation
- Cycle distances match published definitions.
- Loss terms sum to battery energy within 1 per cent.
- Wheel energy matches an independent road-load calculation.
- Limit violations are detected and reported rather than hidden.
Expected results
A QSS Toolbox EV model with energy consumption and loss breakdowns on several cycles, a cross-check against an independent model, and a variant study showing the parameters that matter most on each cycle.
Take it further
- Add a two-speed gearbox block and compare consumption.
- Model a series hybrid with the toolbox's engine and generator blocks.
- Compare results with a forward-facing Simulink model of the same car.
- Add an auxiliary load profile for air-conditioning.
Viva and review questions
What is the main limitation of a backward-facing model?
It assumes the vehicle follows the cycle exactly, so it never shows whether the motor or battery is too weak unless you check required torque and power against limits separately.
Why is the QSS approach useful despite that?
It is very fast and transparent, so you can run many cycles and design variants in minutes and see exactly how each component's efficiency affects consumption.
How did you compute acceleration from the cycle?
From the speed trace using a central difference on a uniform time grid, after checking for spikes caused by rounding in the published data.
Learn it at DIYguru
These DIYguru courses and programmes teach what this project needs.
- CourseCertification Course in MATLAB-SIMULINK, QSS & Advisor Toolbox for EV Design
- CourseAdvanced Certification Course in EV Design & Simulation using MATLAB
- ProgrammeAdvanced Nanodegree Certification Program in EV Engineering, Design, Simulations, and Analysis
- ProgrammePCP in EV Electrical Design & Simulation
