Self Balancing Robot
PID, Lead-Lag, LQR Controller
A self-balancing two-wheeled robot designed and built end-to-end — from physical assembly to embedded firmware to control system design. Starting with a classical PID controller, the project progressively deepened in rigor: a lead compensator was derived analytically to improve phase margin, then replaced by a discrete-time LQR controller designed in state-space and discretized via the Tustin (bilinear) transform. Final tuning incorporated deadband filtering and direction hysteresis to eliminate chatter and improve real-world stability. The result is a physical system that holds balance through active feedback — a complete loop from sensor to actuator, running in real time on constrained hardware.

What I Learned
I believe "You don't know how something works until you do it yourself". This was an amazing learning exercise that solidified my knowledge in PID, Lead/Lag, and LQR Controllers.