TH1: modeling from scratch
Weight: 25%. Suggested release: week 2. Estimated effort: 8–12 hours. Use the engine only as an independent check where requested, not as a substitute for derivation.
Required systems
Implement a scalar oscillator or pendulum, a free rigid body, and a planar two-link point-mass arm. The point-mass arm uses massless links and angles measured from downward vertical as in Lecture 6. Keep the model assumptions explicit.
Required work
- Derive the state equations and units. For the arm, derive M and c from kinetic and potential energy and verify the unit-parameter mass matrix at the aligned pose.
- Implement explicit Euler, semi-implicit Euler where applicable, and RK4. Compare fixed-final-time convergence on the oscillator against its analytic solution.
- Integrate a free body's quaternion and angular velocity using the wxyz body-to-world convention. Compare normalized Euler and exponential attitude updates on constant angular velocity, then study torque-free dynamics.
- Measure quaternion norm, energy, and world angular-momentum drift. Explain why one invariant alone is insufficient.
- Design one independent check of the arm dynamics: symbolic differentiation, finite-difference energy/power balance, or an equivalent carefully matched engine model. Matching link length alone is insufficient.
Required evidence
Include timestep-refinement plots with labeled axes, an error table or machine-readable CSV, analytic checks, and at least one deliberately broken convention whose effect you diagnose. Restore the correct implementation in the submitted runnable default.
Rubric
- 30%: derivations, assumptions, and units.
- 25%: numerical methods and quaternion conventions.
- 25%: quantitative convergence and invariant checks.
- 10%: interpretation of a failure or mismatch.
- 10%: reproducibility and attribution.
Submit source, YAML configs, tests, results, and a report of at most six pages. Do not claim exact energy conservation for the normalized RK4 reference. Optional variational integration is enrichment rather than a core requirement.