Derivative kick and derivative filtering: why raw Kd slams the output
Stop derivative kick on setpoint steps: derivative-on-measurement, setpoint weighting, Td/N filtering, and when to switch D off.
Derivative action is the PID term that plant engineers love on a slow, clean temperature loop and hate on everything else. In the textbooks it “looks ahead” and damps overshoot. On a real controller it differentiates a noisy PV and, unless you are careful, it differentiates the setpoint too. A recipe step then produces a spike on the controller output that saturates a heater or slams a valve, after which everyone disables D and never turns it back on. That spike is derivative kick. It is not a mysterious plant nonlinearity. It is Kd · de/dt applied to a discontinuous error.
This article works the algebra, puts numbers on a heater and a flow loop, and separates three different fixes that get confused in DCS menus: derivative on measurement, setpoint weighting (two-degree-of-freedom PID), and a derivative filter Tf = Td/N. You need the first two to survive a setpoint change. You need the third to survive the transmitter. You sometimes need to set Kd = 0 and stop pretending. Structure advice lives in P, PI, PD or PID; the documentation shows how PID Solver 360 implements the filtered term. The plots belong in the simulator.
What the D term is supposed to do
In parallel form the three contributions are
u = Kp e + Ki ∫ e dt + Kd de/dtwith e = SP − PV. The derivative term is large when error is changing fast. On a lag-dominant plant that is useful: as PV approaches SP, de/dt goes negative (error shrinking), so D reduces the output before you arrive, which cuts overshoot. That is the same idea as a damper on a mass. In ISA form,
u = Kp [ e + (1/Ti) ∫ e dt + Td de/dt ]
Kd = Kp TdTd is a time. On the electric oven the library PID has Kp = 3.8, Kd = 25, so Td = 25/3.8 ≈ 6.6 s. The process time constant is 120 s and the dead time is 15 s; a Td of about half the dead time is the classical neighbourhood (Ziegler–Nichols uses Td = 0.5 L = 7.5 s). D is pulling against a delay, not against a 2 s flow loop.
The industrial implementation is never the pure s in those equations. Pure differentiation of a sampled PV is unstable in the useful sense: it turns one bit of ADC noise into a full-scale output. Every serious PID uses a filtered derivative and, on process controllers, almost always takes that derivative from the measurement. If your PLC still differentiates error with no filter, you do not have a PID. You have a noise amplifier with a heater attached.
Derivative kick is a setpoint discontinuity
Suppose D acts on error, unfiltered, and the setpoint jumps by ΔSP in one scan of length dt. PV has not moved. Then
Δe = ΔSP
de/dt ≈ ΔSP / dt
u_D ≈ Kd · ΔSP / dtThat is the kick. It lasts one sample in the unfiltered discrete derivative, or a short burst if you use a backward difference. It has nothing to do with the plant gain. It is inversely proportional to the sample time: a faster PLC makes a worse spike for the same Kd.
Oven numbers. Recipe step 170 → 180 °C, ΔSP = 10 °C, Kd = 25 %·s/°C, scan dt = 0.5 s as in the library simulation:
u_D ≈ 25 × 10 / 0.5 = 500 %The heater demand jumps by five times full scale on that sample from D alone. Proportional adds Kp ΔSP = 3.8 × 10 = 38 % on the same instant. Integral has not had time to move. The output hits 100 % (or 0 %) regardless of where you were. Operators call that “the PID kicked the valve.” They are right.
A smaller, still ugly case: 1 °C SP nudge, same Kd and dt:
u_D ≈ 25 × 1 / 0.5 = 50 %A one-degree recipe trim slams fifty percent of heater range. If you were sitting at 64 % fire to hold 180 °C, you are now on the stop. Anti-windup, which you still need on a 0–100 % heater (anti-windup explained), does not remove the spike; it only stops the integral making the spike last longer.
Flow numbers, to show why D should already have been off. Suppose someone enables Kd = 0.2 on the flow example “for damping,” dt = 0.02 s, SP step 40 → 45 L/min:
u_D ≈ 0.2 × 5 / 0.02 = 50 %A 5 L/min (0.3 m³/h) setpoint change slams half the valve from D. The process τ is 2 s; you did not need that. Set Kd = 0.
Derivative kick scales as Kd ΔSP / dt. Faster sampling makes a worse kick if D still sees the setpoint. That is the opposite of the usual “faster scan is always better” instinct.
Derivative on measurement removes kick at the source
The error is e = SP − PV. Its derivative is dSP/dt − dPV/dt. A step in SP makes dSP/dt a delta. A step in SP does not make dPV/dt jump; the plant has not moved. If you differentiate −PV instead of e, the setpoint step produces zero D contribution. Proportional and integral still see the new error and still move the output in a controlled way.
ISA with derivative on PV:
u = Kp [ (SP − PV) + (1/Ti) ∫(SP − PV) dt − Td dPV_f / dt ]The minus sign is easy to get wrong in a roll-your-own PLC. If you subtract Td dPV/dt you have the correct damping: a rising PV reduces u on a reverse-acting heater. If you add it, D is positive feedback on the measurement and the loop can run away.
This single structural change eliminates classical derivative kick on SP steps. It does not eliminate a kick when the PV jumps — a bad thermocouple freeze-and-release, a transmitter range change, a radar that loses the surface on a tank. Those are measurement faults; filtering and bad-PV detection are the answers, not D on error.
Almost every process DCS has a “deriv on PV” or “deriv on error” bit. It should be on PV for ovens, dryers, jackets and most analogue loops. Motion controllers sometimes differentiate error because the trajectory generator already provides a smooth SP and a feedforward; that is a different industry. If your oven SP is a step from a recipe manager, you are in the process world: D on PV.
In PID Solver 360 you can compare the same Kd with D on error versus D on PV on the temperature plant. The PV trend may look similar after a second or two; the OP trend will not. Kick is an OP phenomenon. Always plot the controller output.
Setpoint weighting and two-degree-of-freedom PID
Derivative on PV is a special case of setpoint weighting. The two-degree-of-freedom (2DOF) PID uses different errors for P, I and D:
e_P = b · SP − PV
e_I = SP − PV
e_D = c · SP − PVu = Kp [ e_P + (1/Ti) ∫ e_I dt + Td de_D / dt ]b is the proportional setpoint weight, c the derivative weight. Integral must use the true error (b is not applied to I) or you will not get zero steady-state offset.
Standard industrial choices:
b = 1,c = 0— full P on SP, D on PV only. No derivative kick. SP steps still jump the P term byKp ΔSP.b < 1,c = 0— softer SP response, same load-disturbance rejection (load rejection usesb = 0effectively, because a load does not change SP). This is the real reason 2DOF exists: you can detune the setpoint path without detuning disturbance rejection.b = 0,c = 0— I-PD: only integral sees the SP. Setpoint response is slow and often overshoot-free; P and D fight PV only. Common on motion and on some temperature ramps.c = 1— D on error. This is the kick configuration. Avoid it on stepped setpoints.
On the oven, Kp ΔSP = 38 % for a 10 °C step with b = 1 is a large but finite OP jump, unlike the 500 % D spike. If even 38 % is too much (you are near a fuel-gas limit), set b = 0.4 so the P jump is 15 %, and let integral finish the job over Ti ≈ 60–120 s. Load rejection when someone opens the oven door is unchanged, because that event is a PV move, not an SP move. That is the 2DOF bargain.
Do not confuse b with a setpoint filter. A first-order SP filter also kills kick and P jumps by turning the step into a ramp; it changes the command the operator asked for. Weighting keeps the SP as entered and changes only how P and D see it. Ramping the recipe (2 °C/min) is still the right operational choice when product quality forbids overshoot; see temperature controller tuning. Weighting is the controller-side tool when the SP must be a step.
The filter Tf = Td/N is what makes Kd usable at all
Even with D on PV, the term is Kd dPV/dt. A noisy PV has a derivative that is mostly noise. The standard fix is a first-order filter on the derivative (or equivalently a filtered differentiator):
D(s) = Kd · s / (Tf s + 1) applied to −PV
Tf = Td / NN is the filter ratio, typically 8 to 20. N → ∞ is raw derivative. N = 8 means Tf is one-eighth of Td: a fairly heavy filter. N = 20 is lighter, more lead, more noise.
On the oven, Td ≈ 6.6 s:
| N | Tf | Comment |
|---|---|---|
| 8 | 0.82 s | Safer with a slightly noisy well |
| 10 | 0.66 s | Typical process default |
| 20 | 0.33 s | Clean block RTD, short scan |
The filtered differentiator applied to a step in its input has an immediate peak and an exponential decay. If you still had D on error, a SP step of amplitude A would produce
u_D(t) = (Kd / Tf) · A · e^(−t/Tf)Peak = Kd A / Tf = Kd A N / Td. For N = 10, Td = 6.6 s, Kd = 25, A = 10 °C:
peak = 25 × 10 / 0.66 ≈ 380 %The filter reduces the infinite unfiltered spike to 380 %, which is still saturation. A derivative filter is not a cure for derivative kick. It turns a one-sample needle into a short pulse that is still huge. Kick is cured by c = 0 (D on PV). The filter is a cure for noise on PV.
Noise gain of the filtered differentiator at high frequency approaches Kd / Tf = Kp N. With Kp = 3.8 and N = 10 that is a high-frequency gain of 38 from PV dither to OP. A 0.2 °C thermocouple wriggle becomes 7.6 % heater dither. That may be acceptable on an SSR; it is ugly on a fuel valve. If the OP trend looks like the PV noise spectrum, increase Tf (smaller N) or reduce Td before you touch Kp.
Implementation details that bite:
- Some PLCs filter the PV first, then take a raw difference. That is a PV filter plus D, and you have added lag to P and I as well. Document it; retune
Lupward. - Some faceplates hide
Nand fix it at 8 or 10. Fine. Do not then add a second 2 s PV filter without knowing. - Discrete forms (backward Euler vs Tustin) change the peak slightly. At
dt = 0.5 sandTf = 0.66 syou have fewer than two samples in the filter; that is marginal. Either run a faster scan or a largerTf. A filter time shorter than ~2–3 samples is not a filter.
The same N = 8–20 band is wrong for a flow loop only because Td should already be zero. If Td = 0, N does not matter. Do not enable a tiny Td “so the filter has something to do.”
Why raw Kd is unusable even without a setpoint step
Unfiltered derivative of a sampled signal has magnitude ~ 1/dt at the Nyquist frequency. For dt = 0.5 s that is a gain of 2 per (°C/s) in the difference, times Kd = 25, times whatever one-bit noise you have. More honestly, the spectrum of industrial noise is broad, and |s| grows until a filter stops it. Without Tf there is no stop.
Symptoms of raw or over-light D:
- OP chatters at the scan rate or at a few hertz; PV looks almost quiet because the plant cannot follow.
- Actuator air consumption is high; packing wears; SSR thermal cycling increases.
- Operators put the loop in manual “because automatic hunts,” but the PV in manual is no noisier than before. The hunt was the controller.
Compare a temperature loop with Kd = 25, N = 10, D on PV, to the same loop with Kd = 25, no filter, D on error, in the simulator. The first can be a reasonable heat-up. The second is an OP square wave. If your DCS cannot show OP at scan rate, you will miss this on a 1-minute historian trend. Look at live OP.
A modest PV filter and a derivative filter stacked together can make D pointless: you have delayed the measurement so much that the “look-ahead” is looking at the past. If you need 2 s of damping to make a pyrometer usable, you probably wanted PI, as on flow.
Kick versus filter versus 2DOF: use the right tool
Three problems get one nickname on the unit (“the derivative is too strong”). They are not the same.
Setpoint spike on OP, PV still quiet. That is kick. Set c = 0 or “deriv on PV.” Optionally lower b or ramp SP. Do not only increase N; you will still saturate.
OP noisy while SP is constant. That is noise through D (and maybe through P). Increase Tf (lower N), reduce Td, add a short transmitter damping, or set Kd = 0. Check the meter: a failing thermocouple looks like a tuning problem.
Overshoot on a large SP step with a clean OP. That is not kick; that is Kp/Ti and saturation. Use anti-windup, a ramp, SIMC with a larger τc, or 2DOF b < 1. See how to tune a PID and tuning methods. Derivative may still help the approach if it is on PV and filtered; it will not fix windup.
Load disturbance sluggish after you set `b = 0`. If you accidentally applied weighting to the integral or used a heavy SP filter on a loop that also needs to reject loads, you detuned the wrong path. 2DOF with c = 0 and b maybe less than 1 should leave load rejection almost identical to full PID.
A short table for the faceplate:
| Symptom | First change | Not the first change |
|---|---|---|
| OP spike on SP step | D on PV (c = 0) | Bigger N alone |
| OP dither, SP constant | Lower N or Td, or Kd = 0 | More Kp |
| Overshoot after saturation | Anti-windup, ramp | More Td |
| Slow door-open recovery | More Kp or shorter Ti, keep D | Set b = 0 by habit |
When to disable D entirely
Derivative earns its keep when three things are true at once: the plant has enough lag or delay that extra phase helps, the PV is quiet enough that Kp N times the noise is an acceptable OP dither, and the actuator can survive that dither. Temperature with an RTD in a well usually qualifies. A clean jacket RTD qualifies. Many position loops qualify.
Disable D when any of the following is true.
The loop is a fast flow or a noisy DP. Flow best practices: τ of a few seconds, orifice noise, PI only. A level on a bubbling DP is the same story unless it is a tight, filtered drum.
You cannot take D on PV. If the controller form is locked to D on error and you cannot upgrade, a SP step will kick. Either ramp every SP, set Td = 0, or replace the block.
`Td` is shorter than a few samples after you pick a sane `N`. Then D is not doing physics; it is amplifying one sample. Increase scan rate or drop D.
The actuator is a large valve you care about. Fuel-gas, large steam, slurry. A few percent of extra dither is packing and seat wear. Prefer PI plus a better inner loop (flow cascade) over PID on the big valve.
Operators have already learned to put the loop in manual on every recipe change. That is kick or noise. Fix the structure. If the culture is “D is banned on this unit,” a well-filtered D on PV can still be right for the oven — but you must show them the OP plot, not the textbook sentence about damping.
You identified a tiny `L` and a tiny `τ`. There is no phase to buy back. D will not make a 0.3 s hydraulic loop behave like a servo unless you have a real motion controller.
Disabling D is not a moral failure. Most process loops worldwide run PI. The oven is the exception that should keep a filtered, PV-based Td of several seconds. The library temperature gains keep Kd = 25 for that reason; the library flow and integrating-level gains keep Kd = 0 for the other reason.
A numeric walk-through you can reproduce
Load the temperature example: K = 2.5 °C/%, τ = 120 s, L = 15 s, Kp = 3.8, Ki = 0.06, Kd = 25, 20 → 180 °C, 0–100 % power.
Run 1: D on error, no filter (or N huge). On the first sample after the SP step, OP pegs at 100 %. You cannot see the 500–8000 % requested D on a saturated plot; you only see a stick at the limit. That is kick plus a large P term (3.8 × 160 = 608 %) on a cold start. Even a small 180 → 185 °C step will show a needle on OP if you are not saturated. Add a derivative filter with N = 10; the needle becomes a pulse, still saturating. This run is the bad actor.
Run 2: D on PV, N = 10, anti-windup on. The 20 → 180 °C start still saturates because P and the error are huge; that is not kick, that is a 160 °C step on a 100 % heater. After the output comes off the stop, OP should be smooth on the scale of seconds, not ticking at the scan. Overshoot of order 10 °C is a tuning/quality choice, not a kick artefact.
Run 3: from a steady 180 °C hold, step SP to 190 °C, D on PV, N = 10. P jump = 38 %. D should not spike positive with the SP; as PV starts to rise, D should reduce fire slightly (damping). If OP spikes up with the SP, you are still on error.
Run 4: same 10 °C step, b = 0.3, c = 0. P jump = 11 %. Rise is slower; overshoot usually smaller. Door-open disturbance (treat as a PV dip) should still pull fire up promptly.
Run 5: copy the same Kd = 25 onto the flow example. OP becomes unusable. Set Kd = 0 and go back to PI. That is the control-room demonstration that ends arguments.
Use the auto tuner to get Td from IMC or SIMC-PID, then immediately apply c = 0 and N ≈ 10 before you fall in love with the setpoint plot. Check margins in gain and phase margin: a derivative filter adds a high-frequency pole that slightly reduces the phase you thought you bought. N = 8 costs more phase than N = 20. If the filtered PID is nervous, you wanted a larger IMC λ, not N = 40 with a huge Td.
The optimiser will happily increase Kd to cut a simulated overshoot on a noise-free model. Add noise, or penalise OP total variation, or you will download a differentiator. Metrics in closed-loop simulation should include the OP, not only PV overshoot.
Pitfalls in DCS conversion and commissioning
ISA `Td` typed into a parallel `Kd` box. On the oven, Td = 6.6 s is not Kd = 6.6. Parallel Kd = Kp Td ≈ 25. A factor of Kp error either kills D or makes it violent.
Series (interacting) PID. Some blocks couple Ti and Td. Converting without the series–parallel map, listed in the docs, gives you a different controller than the simulation.
Scan time change after tuning. Kick (if D is on error) and the discrete filter both depend on dt. Retune Tf if you move from 0.5 s to 0.05 s.
Two filters plus a well. Thermowell lag is already in L. Adding 1 s transmitter damping and N = 8 on Td = 7 s is legitimate; adding 5 s damping on top is a new plant.
Direct-acting D sign error. If OP rises when PV rises on a heater, stop. You inverted D or the loop action.
Cascade masters. A temperature master writing to a flow slave should put filtered D on the master PV if anywhere, never on the flow slave. The slave is PI. Kick on the master becomes a flow-SP spike; D on PV plus a modest b keeps the inner loop from seeing a recipe step as a 50 % flow demand.
Level. Integrating tank level rarely wants D. A noisy level plus Kd is a valve that follows splashing. Averaging level wants a quiet OP; see integrating level control.
A practical rule set
Use D on lag-dominant, clean measurements. Implement it as a filtered differentiator on PV with N between 8 and 20. Use 2DOF (b ≤ 1, c = 0) so that recipe steps do not hit the actuator like a hammer. Never expect the filter to fix kick. Never expect D to fix windup or a bad valve. On flow, on most pressure DP loops, and on surge level, set Kd = 0 and spend the effort on PI and on the mechanical plant.
The term is simple. The faceplate options are not. If you remember only one calculation, remember u_D ≈ Kd ΔSP / dt for D on error, and the filtered peak Kd ΔSP / Tf which is still enormous. Then turn D onto the measurement, pick Tf = Td/N, and look at the output. The oven will keep the damping. The flow loop will keep its packing. That is derivative used as an engineer uses it, not as a third box that came with the block.
Put this into practice — model your process, auto-tune it and check the stability margins.
Launch PID Solver 360