16. Embedded, robotics and real-timePID control
PID control
A PID controller is the most common way to make a machine hold a target, like a thermostat holding a temperature or a drone holding its altitude. It looks at the error, the gap between where you are and where you want to be, and combines three reactions: push in proportion to the error right now (P), push harder if a small error has lingered for a while (I, for integral), and ease off if the error is shrinking quickly so you don’t overshoot (D, for derivative). Tuning means choosing how much weight each part gets. Too little and the system is sluggish; too much and it oscillates.
In this lesson: A drone holding altitude with live gain sliders.