A quasi-steady-state lap time simulator, written from scratch in MATLAB, that answers the question race engineers and aerodynamicists ask every day: how much lap time is a change to the car worth?
It simulates an estimated 2025-spec Formula 1 car around Silverstone's racing line, measures the lap time value of mass, power, tyre grip, downforce and drag, and is validated against Max Verstappen's real 2025 pole lap telemetry. A 2026-style hybrid power unit model then asks where a limited amount of battery energy should be spent on a lap.
run_power_unit.m swaps the single 745 kW power figure for a 2026-style split: a ~400 kW combustion
engine plus a 350 kW MGU-K that only works while the battery has energy, with up to 8.5 MJ harvested
per lap (Honda: 2026 regulations).
The chassis, tyres and aero stay the 2025 car's, so only the power unit changes.
| Result | Silverstone | Monza |
|---|---|---|
| MGU-K energy needed to deploy 350 kW everywhere | 21.4 MJ | 22.0 MJ |
| Energy braking alone recovers (MGU-K, rear axle) | 2.78 MJ (33 % of 8.5) | 2.21 MJ (26 %) |
| 8.5 MJ spent from the start line until empty | 1:31.537 | 1:27.089 |
| 8.5 MJ spent only below a speed threshold | 1:29.714 (276 km/h) | 1:25.724 (276 km/h) |
| What the deployment strategy is worth | 1.82 s | 1.36 s |
| Each extra MJ per lap | 0.50 s | 0.53 s |
| Overtake mode's extra 0.5 MJ (The Race) | 0.25 s | 0.28 s |
What it shows
- Braking cannot pay for the battery. Even at 350 kW, braking recovers only about a third of the 8.5 MJ allowed at Silverstone and a quarter at Monza, which has few heavy braking zones. The rest has to be harvested on throttle or while lifting, which this model does not include yet, and is why energy management dominates the 2026 rules.
- Where the energy is spent matters as much as how much there is. Spending it out of slow corners and holding a target speed on the straights beats spending it from the start line until empty by 1.4–1.8 s on the same 8.5 MJ. Energy spent at the end of a long straight mostly fights drag, whose power rises with v³, so it buys little time.
- The naive strategy runs out about 2.3 km into the lap and is down to engine power alone for the rest of it (orange trace above).
- Each megajoule is worth about half a second a lap, and overtake mode's 0.5 MJ about a quarter of a second, if it is spent well.
Model notes. The threshold rule deploys full MGU-K power below the target speed and, above it, only the small top-up needed to hold that speed; the target is found by bisection so the lap uses exactly the energy available. Harvest is MGU-K braking power on the rear axle (42 % of braking power, capped at 350 kW and 8.5 MJ per lap) with a 90 % battery round trip. Not modelled yet: 2026 active aero (the low-drag straight mode), the lower 2026 minimum mass, harvesting on throttle ("super clipping") or while lifting, and any speed-dependent MGU-K limits. With 2025 drag and no low-drag mode, the 400 kW engine alone holds only about 270 km/h, so absolute lap times and top speeds are pessimistic; the comparisons between strategies are the result.
| Result (Silverstone) | Value |
|---|---|
| Simulated lap | 1:24.826 vs 2025 pole 1:24.892 (tyre grip calibrated to the pole time) |
| +10 kg of mass | +0.31 s per lap, inside the 0.3–0.4 s paddock rule of thumb (The Race) |
| +0.1 m² of downforce (CL·A) | −0.37 s per lap |
| +0.1 m² of drag (CD·A) | +0.58 s per lap |
| Break-even L/D for a new aero part | 1.56: a part that adds downforce at a better ratio to drag than this makes the car faster here |
| Speed trace vs real pole lap | correlation r = 0.959; the error is concentrated in the medium and high-speed corners (see Validation) |
Tyre grip moves lap time the most because it acts in every corner and every braking zone. Per percent, extra mass costs more than extra power gains.
Each contour is lap time relative to the baseline car over a ±30 % grid of downforce and drag. Following any line of constant L/D towards more downforce still gets faster, so at Silverstone downforce is worth having even when drag rises in proportion.
run_validation.m downloads Verstappen's 2025 Silverstone pole lap from the free
OpenF1 API, integrates the speed samples into distance, lines the
two laps up by best match of their speed traces, and compares them corner by corner.
| Corner | Sim min speed [km/h] | Real min speed [km/h] | Sim − real |
|---|---|---|---|
| Abbey | 254 | 309 | −55 |
| Village | 97 | 110 | −13 |
| The Loop | 89 | 89 | 0 |
| Brooklands | 126 | 180 | −54 |
| Luffield | 113 | 116 | −3 |
| Copse | 317 | 304 | +13 |
| Maggotts | 271 | 305 | −34 |
| Becketts | 245 | 271 | −26 |
| Chapel | 163 | 230 | −67 |
| Stowe | 174 | 239 | −65 |
| Vale | 111 | 106 | +5 |
| Club | 119 | 121 | −2 |
Real speed data arrives at about 3.7 samples per second, so real minimum speeds can read slightly high.
What the comparison shows
- Slow corners match well. The Loop, Luffield, Vale and Club are within 5 km/h, Village within 13 km/h.
- Medium and high-speed corners are 26–67 km/h too slow (Abbey, Brooklands, Maggotts–Becketts–Chapel, Stowe), and the sim is 5–20 km/h too fast on most straights. Tuning grip to the pole time traded one error for the other.
- The racing line is the main cause, not the car. At those corners, the real speeds on the dataset's racing line would need 5–7.5 g of cornering (Abbey: 309 km/h on a 100 m radius is about 7.5 g), so the real car must be driving a wider, faster line than the dataset's.
- Re-fitting the car confirms it.
run_calibration.mfits μ, CL·A and CD·A to the real trace (fminsearch). The best fit (μ 1.83, CL·A 5.45 m², CD·A 1.56 m²) only lowers the RMS speed error from 18.0 to 14.3 km/h, so most of the error comes from geometry the car parameters cannot fix.
The car is a point mass with a mass, an engine power, a tyre friction coefficient and two aero coefficients. At every metre the car is assumed to be in balance (quasi-steady-state).
1. Track curvature. A spline through the racing line is resampled every 1 m and its curvature κ = 1/R is computed, then lightly filtered (5 m Gaussian) because double derivatives amplify noise in measured coordinates:
2. Tyre load grows with speed. Downforce adds to weight, so grip per kilogram rises with v²:
3. Cornering speed limit. At the limit, all lateral grip supplies the centripetal acceleration:
4. Friction ellipse. Grip is shared between cornering and accelerating or braking:
5. Forward pass (accelerate) with whichever is smaller, grip or power, minus drag and rolling resistance:
6. Backward pass (brake). The same integration run in reverse finds every braking point; drag helps here.
7. Lap time. The car's speed is the lowest of the three limits, and
The MATLAB implementation was cross-checked against an independent Python implementation of the same model: both give 1:24.826.
lap-time-sim/
├── run_lap.m Simulate one lap: lap time, peak g, plots, per-metre CSV
├── run_sensitivity.m Parameter sensitivities, break-even L/D, downforce/drag map
├── run_validation.m Compare with Verstappen's 2025 pole lap (OpenF1 telemetry)
├── run_calibration.m Fit grip, downforce and drag to the real lap
├── run_power_unit.m 2026-style power unit: energy balance, deployment strategy, value per MJ
├── cars/
│ ├── car_f1_2025.m Vehicle parameters (estimates)
│ └── car_f1_2026_pu.m Same car with ICE + MGU-K + battery energy limits
├── src/
│ ├── load_track.m Racing line -> evenly spaced points + curvature
│ ├── apex_speed.m Cornering speed limit
│ ├── simulate_lap.m Forward/backward passes, lap time
│ ├── simulate_lap_pu.m Same with ICE + MGU-K, deployment rules, harvest and battery energy
│ ├── solve_deployment.m Bisection: spend exactly the energy available
│ ├── get_openf1_lap.m Download and cache a real lap from OpenF1
│ ├── compare_to_telemetry.m Align sim and real laps, corner table, time delta
│ └── plot_*.m Figures
├── data/tracks/ Silverstone and Monza racing lines (TUMFTM, LGPL-3.0)
└── results/ Plots and CSVs produced by the scripts
Requires base MATLAB only (developed in R2024b; no toolboxes).
- Set MATLAB's Current Folder to this repository.
- Run
run_lap.m. The Command Window showsLap : 1:24.826and plots are saved toresults/. - Run
run_sensitivity.mfor the parameter study and aero map (441 laps). - Run
run_validation.mto download the real lap (internet needed the first time; cached indata/telemetry/) and compare. - Run
run_calibration.mto fit μ, CL·A and CD·A to the real lap. - Run
run_power_unit.mfor the 2026 power unit study (about 10 s; prints a summary and saves the plots andresults/power_unit_summary.csv).
To try another car, copy cars/car_f1_2025.m. To try Monza, change the track settings at the top of run_lap.m.
- Power unit. Harvesting on throttle ("super clipping") and lift-and-coast, 2026 active aero, and a true optimal-control deployment (per-corner energy allocation) instead of a single speed threshold.
- Racing line from real data. Build the line from the real car's position data (OpenF1
location) instead of the dataset line, then re-run the calibration. This targets the largest error found above. - Tyre and vehicle model. Load-sensitive grip, front and rear axles, load transfer and aero balance (the point mass reaches about 7 g, more than a real car).
- Aero. Ride-height sensitivity and DRS are not modelled; the 2025 car parameters are estimates.
- Front-wing CFD link. Feed downforce and drag changes from an OpenFOAM front-wing study into the sensitivity model to quote a wing design in seconds per lap.
- Racing lines: TUMFTM racetrack-database, LGPL-3.0
(licence in
data/tracks/LICENSE_racetrack-database). - Telemetry: OpenF1, downloaded on demand and not redistributed here.
- Reference times: 2025 British GP qualifying, Verstappen 1:24.892 (FIA).
Shourya Patel, Physics (Mechanical Engineering minor), Stony Brook University LinkedIn · GitHub





