The D term: noise, derivative filter and set-point kick

Why derivative action amplifies noise and kicks the output on set-point changes. The derivative filter: Tf and the coefficient N in the ideal and parallel forms, D on measurement, choosing Ts and Tf. Examples from the D-filter tool.

In short. A derivative amplifies fast changes — and so measurement noise and set-point steps. That is why in a PLC the D term is almost always filtered (time constant Tf) and computed on the measurement, not on the error. If PV is noisy and Td helps little, it is simpler to turn D off: PI works well in most process loops. The D-filter tool converts Tf and N.

Derivative filter

D without a filter:   D(s) = Kd·s                    (Kd = Kc·Td)
D with a filter:      D(s) = Kd·s / (Tf·s + 1)
high-frequency gain:  Kd / Tf
filter cut-off:       fc = 1 / (2π·Tf)

The meaning of N depends on the form — always state it next to N:

FormHow the filter is setTfUnits of N
IdealTf = Td / NTd/Ndimensionless, usually 5…20
Parallel (MathWorks)Kd·N·s / (s + N)1/N1/s

Example: noise

Ideal form Kc = 2, Td = 10 s, N = 8 → Tf = 10/8 = 1.25 s, fc = 0.127 Hz. Kd = Kc·Td = 20 s; the high-frequency gain is Kd/Tf = Kc·N = 16 instead of infinity.

Entering the same "N = 8" in the MathWorks parallel form gives Tf = 1/8 = 0.125 s — a filter 10 times weaker.

-2-1012010203040time, sunfilteredfiltered, Tf 1.25 strue derivative
A sine with ±0.02 noise sampled every 0.1 s (the D-filter tool example: Td 10 s, N 8 in the ideal form → Tf 1.25 s). Noise is amplified by 1/Ts without the filter; the filter removes it at the cost of a small lag.

Estimate at Ts = 0.1 s: a PV noise step of 0.04 between samples gives without a filter Kd·0.04/Ts = 20·0.04/0.1 = 8 % of output in one sample; with the filter (backward Euler) — Kd/(Tf + Ts)·0.04 = 20/1.35·0.04 ≈ 0.6 %.

Open the example in the D-filter tool

Set-point kick

On a set-point step the error changes instantly and D on error produces an output pulse. D on measurement uses −dPV/dt: the set point does not enter it.

D on error:        uD = Kc·Td · d(SP − PV)/dt
D on measurement:  uD = −Kc·Td · dPV/dt
05020406080100120time, soutputD on errorD on measurement
PID Kc 1.82, Ti 51 s, Td 5.3 s, Tf = Td/10, set-point step 0 → 1 at t = 10 s. With D on the error the output jumps to 8.1 for one sample; with D on the measurement it never exceeds 2.3.

Example (aggressive IMC PID, section model): Kc = 1.82, Ti = 51 s, Td = 5.3 s, Tf = Td/10, set-point step 0 → 1. D on error — the output reaches 8.1 for one sample; D on measurement — no more than 2.3. The response to disturbances is the same: with a constant set point dPV/dt = −de/dt.

P can be computed on the measurement too (set-point weight b = 0): then there is no output step at all on a set-point change, but set-point tracking becomes slower.

How to choose

  1. Whether D is needed at all: with a small θ/τ and a noisy PV — rather not. D helps on slow processes with noticeable dead time and a clean signal (temperature).
  2. D on measurement — by default.
  3. N = 5…20 in the ideal form (Tf = Td/N). A smaller N filters more but also weakens D.
  4. Ts ≤ Tf/2…Tf, otherwise the discrete filter works poorly (discretisation).
  5. A PV (analog input) filter acts on the whole controller and adds delay — its time constant becomes part of θ (filtering).

Typical mistakes

  • N of one form entered into a block of another — the filter is Td times stronger or weaker.
  • Td without a filter on a noisy PV — the output "trembles", wearing the valve and drive.
  • A heavy PV filter instead of a D filter — less noise, but the loop gets slower and more oscillatory.
  • D on error in a loop with frequent set-point changes.

Limits

The noise estimate is for a single step; real noise has a spectrum and the effect depends on its frequencies. How the filter is set and where D is computed in a particular block — check the documentation of its version.

Loading the map…

Sources

  1. MathWorks — PID Controller block: Filter coefficient (N), ideal and parallel forms, Derivative on measurement (R2026b) — MathWorks
  2. Åström & Murray — Feedback Systems, 2nd ed. (2020), ch. 11 «PID Control», §11.5 Implementation: filtering the derivative, set-point weighting — Caltech / Lund University

Updated 2026-10-12