All learning experiments

FOUNDATIONS

PID controller: the complete visual guide

Understand proportional, integral and derivative control through the signals inside a real closed loop.

u(t)=Kpe(t)+Kie(t)dt+Kdde(t)dtu(t)=K_p e(t)+K_i\int e(t)\,dt+K_d\frac{de(t)}{dt}

A PID controller repeatedly compares a desired setpoint with a measured process value. It combines the present error, accumulated error and rate of change into a command for the actuator.

01

The feedback loop

The controller is only one part of the system. The actuator applies its command to a plant, a sensor measures the result, and that measurement returns to the controller. Delay, saturation, noise and sample time all change what tuning can achieve.

SIGNAL VIEW 01

P, I and D leave different fingerprints

The same unit error creates an immediate proportional push, a growing integral contribution, and a short derivative pulse.

P, I and D leave different fingerprintsThe same unit error creates an immediate proportional push, a growing integral contribution, and a short derivative pulse. Series shown: Proportional, Integral, Derivative. Key insight: P reacts now · I remembers · D anticipates movement.0255075100-0.10.20.50.91.3Normalized time →Term contribution
READ THE PLOTP reacts now · I remembers · D anticipates movement
02

Three different jobs

Proportional action supplies immediate correction. Integral action removes persistent offset. Derivative action adds damping by reacting to movement, but it must be filtered because measurements are never perfectly clean.

RESPONSE VIEW 02

Three tunings, three recognizable shapes

Low gains are calm but slow, a balanced loop settles quickly, and an aggressive loop trades speed for overshoot and ringing.

Three tunings, three recognizable shapesLow gains are calm but slow, a balanced loop settles quickly, and an aggressive loop trades speed for overshoot and ringing. Series shown: Too soft, Balanced, Aggressive. Key insight: The fastest rise is not automatically the best loop.0255075100-0.10.30.71.11.4overshootNormalized time →Process value
READ THE PLOTThe fastest rise is not automatically the best loop
03

A tuning is a trade-off

A faster rise is not automatically better. A useful tuning balances tracking, disturbance rejection, overshoot, actuator effort, robustness and measurement sensitivity for the actual plant.

LOOP VIEW 03

The controller acts before the plant catches up

After a setpoint step, controller output moves first. The process value follows the plant dynamics while the error closes toward zero.

The controller acts before the plant catches upAfter a setpoint step, controller output moves first. The process value follows the plant dynamics while the error closes toward zero. Series shown: Setpoint, Controller output, Process value, Error. Key insight: Read controller output and process value together.0255075100-0.20.20.61.01.4Normalized time →Normalized signal
READ THE PLOTRead controller output and process value together