Tech_Interview_Prep

Control Systems & PID

The feedback loop that keeps a robot at a target state — proportional, integral, and derivative control, and why all three matter.

What it is

A PID controller is the standard feedback control loop for keeping a system (a motor's speed, a robot arm's position) at a target value despite disturbances — computing a correction from the error between target and actual state.

Key points

  • Proportional (P): correction proportional to the current error — reacts immediately, but alone it typically leaves a persistent steady-state error, never quite reaching the target.
  • Integral (I): accumulates past error over time, eliminating that steady-state error — but too much integral gain causes overshoot and oscillation.
  • Derivative (D): reacts to the rate of change of the error, dampening oscillation and improving stability — sensitive to sensor noise, since it's effectively differentiating a noisy signal.
  • Tuning is the practical skill: the three gains (Kp, Ki, Kd) are tuned against the specific physical system's dynamics — a generic "correct" set of gains doesn't exist independent of the system being controlled.