Control systems

PID controller

The PID controller is the workhorse of industrial control — running more than 90% of all feedback loops on Earth, from chemical plants to quadcopters — and it does its job with three gut-simple instincts about the error. Proportional (P): push back in proportion to how big the error is right now — far from target, push hard. Integral (I): if a small error has lingered, keep accumulating and pushing until it's wiped out — this is what finally kills steady-state error. Derivative (D): watch how fast the error is changing and anticipate — if you're racing toward the target, ease off early so you don't overshoot.

The controller output is just u = Kp·e + Ki·∫e dt + Kd·(de/dt), and tuning means choosing the three gains. Crank Kp for speed (but too much oscillates); add Ki to erase the residual offset (but too much causes sluggish wind-up and overshoot); add Kd to damp the wobble (but it amplifies sensor noise). The beauty is that you need no accurate model of the plant — engineers tune PID by feel or by recipes like Ziegler-Nichols, which is exactly why it's everywhere. The limitation is the flip side: with no model, PID can't anticipate complex dynamics the way a model-based controller can.

u(t) = Kp·e(t) + Ki·∫e(t) dt + Kd·de(t)/dt

Integral wind-up is the classic PID gotcha: when the actuator saturates (a valve fully open), the integral keeps piling up uselessly, then dumps a huge overshoot when the error finally reverses. Real PID code includes 'anti-windup' to clamp the integral.

Also called
three-term controllerproportional-integral-derivative controllerPID 控制