control-lab
# ~/projects/control_lab.py
control_lab = Project(
status=Status.ACTIVE,
started=date(2026, 8, 31),
tags=["python"],
)A playground for control theory: textbook systems with known dynamics and known gotchas, each one walked through the full chain of model, linearize, discretize, control and estimate.
How it works
The lab is generic machinery, and each system is its customer:
- Harness: five roles meet at fixed boundaries, with a visualizer driven by scripted motion before any dynamics exist.
- Simulation core: a fixed-step RK4 written here rather than imported, checked against a symbolic derivation. The controller runs at a coarser, exact multiple of the integrator’s step.
- Control and estimation: discretization, pole placement, LQR, observers and a Kalman filter, each cross-checked against an independent reference.
Why
To re-derive control theory instead of calling it, and to build it as production-shaped software: typed configs, reproducible runs, and results keyed by their config.
Where it stands
The first system is a cart with an inverted pendulum, and the lab is being proven on it. Next on the list is an electric boiler, with dead time and slow thermal mass.