Learning outcomes
- Separate physical assumptions from numerical choices.
- Write a first-order state-space model.
- Define a reproducible simulation experiment.
Prerequisites: Linear algebra, ODEs, and earlier lectures in this sequence.
What a model leaves out
A model is a deliberate approximation for a particular question. A point mass can predict translational motion while omitting attitude. A rigid body adds orientation and inertia while omitting elastic deformation. Contact introduces assumptions about compliance, friction, and impact. Greater detail helps only when the parameters and numerical treatment support the intended question.
State the modeling boundary before writing code: bodies, joints, reference frames, forces, geometry, sensors, and actuators. Record which effects are neglected. A simulator can solve an internally consistent model that is still physically inappropriate.
State-space form
For a mass-spring-damper,
A robot configuration can live on a manifold. MuJoCo stores configurations in qpos and tangent velocities in qvel, and their lengths can differ. We derive the geometry in week 2, but keep this distinction in every interface from the beginning.
Worked dimensional check
Take
For an undamped unforced oscillator,
Verification versus validation
Verification asks whether code solves the chosen equations. Compare against an analytic solution, refine the timestep, check units, and test invariants. Validation asks whether the model predicts observed physical behavior. It requires independent measurements and a declared operating range. Comparing two engines is useful cross-checking, but agreement does not establish physical validity.
The first practice produces energy and trajectory errors without a graphics window. Keeping rendering separate makes the experiment easier to automate.
Exercise
A pendulum animation looks plausible at 30 frames per second. What can you conclude? Answer: only that the displayed samples look plausible. You still need the physics timestep, integrator, units, initial conditions, and quantitative errors. A display frame is not necessarily a simulation step.
The CMU dynamics series and notebooks accompany this progression from equations to experiments CMU 16-715 CMU dynamics notebooks.