Controllers for Buggy Racing
Buggy, properly Sweepstakes, is a CMU race in which small aerodynamic vehicles are pushed uphill by runners and coast the downhills on gravity alone, reaching around 35 mph. There is a person inside steering.

This project, for CMU 24-677 (Modern Control Theory), asked what happens when the person is replaced by a controller. The buggy was modeled with bicycle dynamics, lateral and longitudinal, and driven around a Webots simulation of the course. Five controllers were built in order of increasing capability, each addressing a specific way the previous one lost time.

Results
| Controller | Lap time | What changed |
|---|---|---|
| PID | 330 s | Separate longitudinal and lateral loops, tuned by hand. |
| State feedback, pole placement | 200 s | Uses the full state vector rather than tracking error alone, with closed-loop poles placed for damping. |
| LQR | 120 s | Optimal gains from the Riccati equation, trading state error against control effort. |
| MPC | 120 s | Optimizes over a receding horizon, so track constraints enter the control problem directly. |
| EKF-SLAM | 160 s | Same control quality without being given the map or its own pose. |
The first three steps are the interesting part of the progression. Hand-tuned PID loses time everywhere, because the two axes are tuned in isolation and neither knows what the other is doing. Pole placement recovers most of that by treating the buggy as one coupled system. LQR goes further by computing the gains rather than guessing them: the largest single improvement in the set, and close to halving the lap.


MPC matched LQR rather than beating it. On a fixed, known course with a well-behaved model, there is little left for a receding horizon to exploit; its advantage is handling constraints and disturbances, and this track presents few of either. It would be expected to pull ahead on a course with tighter limits or a less cooperative model.

Racing without a map
The last controller solves a harder problem than the other four. EKF-SLAM builds the map and estimates the buggy’s pose within it at the same time, so the controller steers against an estimate that is itself uncertain, rather than against ground truth handed to it by the simulator.

Why 160 s is not a regression. Read as a single column, EKF-SLAM looks slower than LQR’s 120 s. It is the cost of dropping the assumption that the vehicle knows where it is, which is exactly the assumption that has to go before any of this can leave the simulator.