PID control

12 min read
On this page

Proportional action reacts to current error; integral action retains a correction; derivative action responds to change. Building on Response and stability, we first analyze continuous, unsaturated control and then identify implementation requirements.

P: immediate action from error

For , and , the thermal equilibrium error is

With target 40 °C, ambient 10 °C, baseline parameters, and , this is K. More gain reduces this offset but also increases noise in the action and exposure to limits.

P control does not universally require a steady-state offset. A plant with integral dynamics may track a step without offset in a stable proportional loop. State the plant, input, bias action and stability conditions.

I: store the correction in a state

Let denote the integral contribution itself:

has units ; is dimensionless duty ratio. Positive error increases . Zero error stops its change, rather than erasing it. At ambient 10 °C, maintaining 40 °C needs , so equilibrium stores . Zero error requires stability, feasibility, unbiased sensing and no persistent saturation.

PI adds a state. Its thermal characteristic polynomial is

For , it becomes , with roots . The oscillatory modes come from integral action, not an unexplained extra inertia in the original plant.

Preparing the visual
PID control · Experiment

Reference 40 °C; ambient 20→10 °C at 100 s; integral starts at zero. PID differentiates measurement with Kd=1 s/K and a 5 s filter. Requests are not clipped. Component curves exclude the 0.4 baseline.

Ambient falls from 20 to 10 °C at 100 s while the reference stays 40 °C. Compare P, PI and filtered PID, including separate P/I/D contributions. Requests are not clipped; the experiment reports whether they remain physically within 0–1. Constraints adds actuator saturation.

D: filter the measured trend

Ideal parallel PID is . Differentiating a step reference produces derivative kick. A common alternative differentiates the measurement through a filter:

Its measurement-to-action transfer is , with finite high-frequency gain. Derivative on measurement and derivative on error are different structures: only the latter directly differentiates reference changes.

For s/K, s, °C and °C, . Rising temperature reduces heating. Initialize the filter consistently, often from the first reading, to avoid an artificial startup spike. D uses observed trends; it does not predict unknown future disturbances.

Work through one update

For K, , and , the request is . A 1 s forward integral update gives . This convention calculates the current action before advancing the state; using updated states is another implementation that must be specified consistently.

Parameter forms also matter. corresponds to , , with filtering specified separately. Discrete coefficients depend on the sample period.

Tune against several requirements

First verify feedback direction, plant time scales and feasible actions. Start with P or PI; add D for an identified dynamic need. Test reference changes, load changes, measurement noise, initial-state errors and saturation. Record requested and applied action and integral state, not output alone. Empirical tuning is a starting point with assumptions, not a universal guarantee.

Check your understanding

Why can PI deliver more than the baseline after error becomes zero?

Reasoning

Zero error stops integration but retains , supplying the extra 200 W needed for the new heat loss.

Should noisy measurements automatically lead to more D?

Reasoning

No. Differentiation emphasizes rapid measurement changes. Distinguish actual dynamics from noise and compare filtering, bandwidth and action cost before adding derivative gain.

Further reading

The python-control cruise-control example illustrates PI with limits. MathWorks anti-windup examples distinguish back-calculation and conditional integration.