Chapter 11 Instructor Notes — Lap-Time Simulation

Chapter: Lap-Time Simulation: Putting the Physics Together to Predict a Lap from First Principles · Exercises · Quiz · Case Study 1 · Case Study 2 · Key Takeaways · Discussion guide

Chapter 11 closes Part I by assembling everything students have built (grip envelope, aero, power unit, brakes, setup, circuit) into a quasi-steady-state (QSS) lap simulator, the lapsim.py module of Box Box. The real lesson is methodological: an "out of the box" model built from earlier chapters' fits misses by seconds, calibration on whole laps brings it within about 2%, and the honest way to use it is for differences, not absolute lap times.

Learning objectives

By the end of the session, students should be able to:

  1. Describe a QSS lap simulator as three ceilings and a minimum: the corner limit $v_{\max}(s)$, a backward (braking) pass and a forward (acceleration) pass, with $T = \oint ds/v$.
  2. Explain how a track's curvature is built from the location feed, and why every smoothing window rounds off real corners.
  3. Explain why median fits from earlier chapters are not limits, and why the uncalibrated simulator is slow everywhere.
  4. Calibrate a model on whole laps, compare at matched track positions, and test it out of sample with cross-validation.
  5. Report a noise floor (two real laps against each other) and judge a model against it.
  6. Recognise non-identifiable parameters and say why a bounded fit can be the honest one.
  7. Use the calibrated simulator for sensitivity studies: downforce vs drag, mass, power vs energy.

Threshold concept

This chapter has no designated threshold concept. It is, however, where the Chapter 1 idea that grip is a budget becomes an algorithm: the friction ellipse limits braking and acceleration in each pass. Check that students can say where the budget appears in the code.

Suggested 75-minute session plan

Time Segment What happens
0–8 min Hook "Can we predict a pole lap from physics alone?" Show the preset (uncalibrated) result: slower than reality at all 42 dry qualifying sessions, by a median 10.46 s in 2025 and 6.73 s in 2026. Ask: is the physics wrong, or the inputs?
8–25 min Concept Draw the three ceilings on the board for one corner: the corner limit, the braking curve coming back from it, the acceleration curve leaving it. The simulated speed is the lowest of the three. Add the 2026 energy budget: an unconstrained lap wants about 21.7 MJ at Monza and Las Vegas against an 11 MJ budget.
25–42 min Live demo Run code/03_forward_backward.py to show the three passes, then open the saved output of code/04_calibration.py (too slow to run live) and code/06_calibrated_trace.py for the Silverstone 2026 calibrated trace and its residual. Point at the 2,900–3,900 m fast sequence, where the smoothed track makes the model a mean 32.7 km/h too slow.
42–62 min Activity Pairs run code/05_sensitivity.py (or read its output) and fill a table for Monaco, Monza and Singapore: +10% downforce vs −10% drag. Each pair predicts the ratio before looking. Debrief: about 7:1 at Monaco, about 1:1 at Monza.
62–75 min Wrap-up The noise floor: two real laps differ by a median RMS of 5.1 km/h (2025) and 6.2 km/h (2026); the calibrated model is about three times worse. Exit ticket: "Name one question this simulator can answer well and one it cannot."

Key numbers students should leave with

  • Preset model: slower at 42 of 42 dry sessions; median +10.46 s (13.1%) in 2025 and +6.73 s (8.8%) in 2026. Median apex uses 1.002 (2025) and 0.957 (2026) of the Chapter 1 envelope, so about half of all apexes exceed a median fit.
  • Calibrated, out of sample (two-fold cross-validation): median |lap error| 1.66 s (2.29%) in 2025 and 1.38 s (1.77%) in 2026; median RMS speed error 18.9 and 18.1 km/h.
  • Noise floor: median RMS 5.15 km/h (2025) and 6.19 km/h (2026) between a session's best and next-best real laps.
  • What the fit says about the cars: the aero term fell to 0.68 of its 2025 value (Chapter 3 found 0.70); fitted 2026 energy 11.68 MJ, inside the 11–12 MJ the qualifying rules allow. The braking scale was bounded at 1.2 because a free fit ran to an unphysical 1.9 for a 0.3 km/h gain.
  • Sensitivities (median over circuits): +10% downforce −2.127 s (2025) / −1.494 s (2026); −10% drag −0.856 / −0.573 s. Downforce beats drag at 40 of 42 sessions.
  • Mass: a median 0.0330 s/kg (2025) and 0.0331 s/kg (2026) per lap, range 0.021 (2026 Monaco) to 0.055 (2025 Losail), consistent with the race-data fuel effect upper bound of 0.033 s/kg.
  • 2026 energy: a 10% bigger MGU-K is worth a median 0.002 s; one extra megajoule is worth 0.372 s.
  • Mexico City 2026 (Case Study 1): air density 21.2% below the other sessions' median; the thin air costs a simulated +1.680 s net (drag-only −1.180 s, downforce-only +2.695 s).

Common misconceptions and remedies

Misconception Remedy
"A simulator built from physics should be right without tuning." Show the preset miss at 42 of 42 sessions. Earlier chapters fitted medians; a pole lap lives at the limit.
"Within 1.4 s means the model is good." Compare with the noise floor. A correct total can hide a trace that is wrong in detail (RMS three times the floor).
"In-sample error tells us how well it predicts." In-sample 1.16 / 1.37 s vs out-of-sample 1.66 / 1.38 s. Insist on cross-validation for any model with fitted parameters.
"Fitted parameters are the car's real values." They are effective values; the 2026 drag area, energy and traction share trade off between folds (non-identifiable). Label them 🧪.
"Less drag is always the setup answer for a fast track." Even at Monza 2025, +10% downforce (−1.548 s) roughly matches −10% drag (−1.474 s).
"In 2026, more power means more speed." With energy fixed, extra MGU-K power is worth almost nothing; energy is the currency.

Exercises to assign

  • Core (everyone): Part A — A1–A5; Part B — B1 (corner limit by hand), B2 (braking distance), B7 (mass and fuel), B9 (cross-validation arithmetic).
  • Code lab: Part C — C1 (Analyze this session — 2026 Monaco GP qualifying) and C2 (Test the smoothing window). Add C5 (lap time per kg everywhere) because it feeds the strategy chapters.
  • Judgment: Part D — D2 (the Monza wing frontier) and D4 (Judge the model). D3 (the fuel decision) is a good bridge into Part II.
  • Stretch: Part C — C6 (out of sample by design); Part E — E2 (a two-axle simulator) or E3 (an optimal energy strategy) for engineering students.
  • Interleaving: Part M — M1 (with Chapter 1) and M4 (with Chapter 7).

Lab tips

  • Run order: 01–03 any time → 04_calibration.py → then 05, 06, the case studies and the checkpoint. Everything after 04 reads its fitted parameters from code/_cache/fitted_params.pkl.
  • Runtime: the shared helper ch11_common.py builds and caches lines, tracks and aligned laps in code/_cache/ on first use (about 80 s). 04_calibration.py takes about 6–7 minutes (noise floor, two-fold cross-validation and the final fit): assign it as pre-lab homework or use its saved output (code/_out_04.txt). One simulated lap takes about 30 ms, so the sensitivity scripts are quick.
  • No network is needed; all outputs are saved as code/_out_*.txt for comparison.
  • Gotcha — absolute lap times: later chapters should use the fitted values from this chapter (or rerun 04), not the presets.
  • Gotcha — wet sessions: 2025 Las Vegas and 2026 Interlagos qualifying are excluded as wet, and 2025 Baku has no usable laps; the study set is 42 sessions.
  • Gotcha — comparisons: compare simulated and real laps on the location-based line, not on integrated distance.

Connections