Derivative Control Calculator
Compute the derivative term of a PID controller using ud = Kd · de/dt — with three-way solving for the output, the derivative gain, or the error rate, a live error-signal schematic, and companion PID context.
Derivative action anticipates the future error
While the proportional term reacts to how big the error is right now and the integral term reacts to how long it has persisted, the derivative term reacts to how fast the error is changing. It is, in effect, a prediction: if the error is currently 1.0 and growing at 0.5 per second, the derivative term "sees" an error of about 1.5 one second ahead. This makes it a stabilizing influence in most loops — it opposes rapid changes and provides phase lead, which is exactly what is needed to push the crossover frequency of a lagging plant back up while preserving stability margin.
In practice, the derivative is always filtered
A pure differentiator has gain that rises without limit as frequency increases, so any sensor noise is amplified enormously. A step change in the setpoint produces an impulsive spike in de/dt — the notorious "derivative kick". Real PID controllers therefore filter the derivative with a first-order low-pass (usually with a time constant of about Kd/N·Kp with N typically 8–20), or apply derivative on the measurement instead of the error so that setpoint changes do not excite it. This is why the simple formula ud = Kd·de/dt should be understood as the ideal case — the real implementation always has a filter in front of it.
Too much derivative causes chattering
If Kd is too large, the derivative term amplifies quantisation noise, sensor vibration and electrical interference faster than the loop can smooth it out. The actuator ends up chattering back and forth, heating up, wearing out, and producing audible noise. The classic symptom is a control output that looks fine at low gain and then suddenly buzzes or hisses when Kd is increased. The fix is either to reduce Kd, increase the filter time constant, or use a lower-noise sensor. As a rule of thumb, Kd should be the last gain you add during tuning, and it should be added slowly with a watchful eye on the actuator output.
The derivative kick and how to avoid it
When the setpoint changes abruptly — a step — the error jumps by the same amount, so de/dt momentarily spikes toward infinity. In a digital controller with a 100 ms sample time and a step of 1.0, de/dt = 10 /s for one sample, and ud = 10·Kd — a single enormous pulse that can saturate the actuator. The standard remedies are: (1) ramp the setpoint rather than stepping it, (2) compute the derivative on the measurement y instead of the error e = r − y (so the derivative only responds to real plant motion), or (3) use setpoint weighting. All three preserve the stabilizing effect of the derivative while eliminating the kick.
How to Use This Calculator
The derivative term relates three quantities: ud, Kd and de/dt. Pick which one you want the tool to solve, then fill in the other two.
1. Choose what to solve for
Pick ud, Kd or de/dt from the toggle. The calculator rearranges ud = Kd·de/dt automatically for whichever variable you choose.
2. Choose how to enter de/dt
Switch between "Direct de/dt" — where you type the rate in per second — and "From Δe and Δt" — where you provide two consecutive error samples and the sample time, and the calculator computes de/dt = (ek−ek−1)/Δt for you.
3. Use realistic presets
Presets cover typical values: derivative outputs from 0.01 to 100, derivative gains from 0.001 to 1000, error rates from 0.01 to 100 per second, and sample times from 1 ms to 1 s.
4. Read the result and verdict
The result card shows the solved value plus the sign, which indicates whether the error is growing or shrinking. A colour-coded verdict classifies the derivative action from inactive through very small, small, moderate, strong, very strong and dominant.
5. Check the schematic and charts
The schematic shows a live error-vs-time curve with a tangent line whose slope is de/dt, alongside a stacked panel showing the multiplication of de/dt by Kd to give ud. The main chart plots ud against de/dt for three Kd values.
6. Switch to Advanced for depth
Advanced mode adds a ud vs. Kd chart, a sensitivity analysis, and full PID context — with editable Kp, Ki and error inputs, it computes the proportional, integral and derivative contributions side by side and shows their sum as the total controller output.
What This Tool Offers
Built around the classic derivative-control relation ud = Kd·de/dt, the fundamental link between error rate, derivative gain and the anticipatory term of a PID controller.
Three-way solving
Solve for the derivative output, the derivative gain, or the error rate. The calculator rearranges the formula for whichever variable you choose.
Direct or discrete input
Enter de/dt directly, or enter two consecutive error samples plus the sample time and let the calculator compute the derivative using the standard backward-difference approximation.
Live derivative schematic
An error-vs-time plot with a tangent line whose slope is the error rate, side-by-side with a stacked panel showing the multiplication of de/dt by Kd and the sign interpretation.
Derivative-strength verdict
Each result is classified from inactive through very small, small, moderate, strong, very strong and dominant, with a coloured badge and growing/shrinking indicator.
Full PID context
In advanced mode, edit Kp and Ki alongside the derivative gain, and see the proportional, integral and derivative contributions computed side by side with their sum as the total controller output.
Reference tables
A derivative-term lookup grid, a typical tuning table by loop type, and a full variable reference with notes on filtering and the derivative kick.
Reference Tables & Conversions
A quick three-field solver, a ud lookup grid, and typical Kd values by loop type.
Quick derivative solver — enter any two, read the third
ud Lookup — Kd vs. de/dt
Computed from ud = Kd · de/dt. Values are the derivative output.
| Kd | de/dt = 0.1 | de/dt = 1 | de/dt = 10 | de/dt = 100 | de/dt = −1 | de/dt = −10 |
|---|
Typical Kd and Sample Times by Loop Type
Representative values for common PID-controlled plants. Actual tuning depends strongly on the plant dynamics, the sensor, and the actuator.
| Loop type | Typical Kd | Sample time | Derivative filter | Notes |
|---|---|---|---|---|
| Slow thermal process (kiln, furnace) | 0.001 – 0.1 | 1 – 10 s | 10 – 100 s | Very long time constants; derivative rarely needed |
| Flow control loop | 0.01 – 0.5 | 100 ms – 1 s | 1 – 10 s | Flow is noisy; derivative often filtered heavily |
| Level / pressure loop | 0.05 – 1 | 100 ms – 1 s | 0.5 – 5 s | Level loops often PI-only |
| Motor speed loop | 0.1 – 5 | 1 – 20 ms | 20 – 200 ms | Derivative useful for load disturbance rejection |
| Motor position servo | 1 – 20 | 100 µs – 1 ms | 1 – 20 ms | Derivative on measurement is standard |
| CNC axis (with velocity feedforward) | 5 – 100 | 50 – 500 µs | 0.5 – 5 ms | High-gain derivative for tight tracking |
| Quadcopter attitude loop | 10 – 200 | 250 – 2000 µs | 1 – 10 ms | Rate gyro provides the derivative signal directly |
| High-speed robot joint | 20 – 500 | 100 – 500 µs | 1 – 5 ms | Low filter time constant for high bandwidth |
| Audio power amplifier (compensation) | 0.5 – 5 | Continuous | µs range | Derivative implemented as phase lead network |
| Switching power supply (D control) | 10 – 1000 | 1 – 10 µs | 10 – 100 µs | Type-III compensator uses derivative-equivalent zero pair |
Variable Reference
| Symbol | Meaning | Typical range | Units |
|---|---|---|---|
| ud | Derivative term of the controller output | −1000 – 1000 | — |
| Kd | Derivative gain | 0.001 – 1000 | — |
| de/dt | Rate of change of the error | −10⁴ – 10⁴ | per second |
| e | Error = setpoint − measurement | — | — |
| Δt | Sample time | 1 µs – 10 s | s |
| Tf | Derivative filter time constant | — | s |
| N | Derivative filter divisor | 8 – 20 | — |
| Kp, Ki | Proportional and integral gains | — | — |
What Does ud = Kd · de/dt Measure?
The derivative term of a PID controller is a prediction of where the error is heading. If the error is currently 2 units and growing at 1 unit per second, the derivative term effectively acts on an anticipated error of 2 + Kd·1, which grows as the error accelerates. This anticipatory action is what gives derivative control its characteristic role in the PID family: it is the only term that responds to the future, not the present or the past. By opposing rapid changes in the error, it adds damping to the closed-loop system and lets the designer push the crossover frequency higher — and therefore the bandwidth and speed — without sacrificing stability margin.
The formula itself is deceptively simple: multiply the derivative gain by the time derivative of the error. But the implications are subtle. The derivative term is inherently noise-sensitive, because differentiation amplifies high-frequency content. A pure differentiator would have infinite gain at infinite frequency, which is impossible to implement and undesirable even if it were possible. Real PID controllers therefore always filter the derivative — typically with a first-order low-pass whose time constant is a fraction of the derivative time — and often apply the derivative to the measurement rather than the error so that setpoint changes do not produce impulsive spikes.
Derivative Control Formula
The defining relationship for the derivative term is:
Rearranged to solve for the other two unknowns:
de/dt = ud / Kd
In a discrete-time controller, the derivative is approximated by a backward difference:
ud ≈ Kd · ( ek − ek−1 ) / Δt
With a first-order filter to limit noise amplification, the real implementation is:
And the total PID output combines all three terms:
Derivative Variables
| Symbol | Meaning | Notes |
|---|---|---|
| ud | Derivative output | The contribution of the D term to the total controller output |
| Kd | Derivative gain | Sets how strongly the controller reacts to error rate |
| de/dt | Error rate | The instantaneous slope of the error signal, in error-units per second |
| ek, ek−1 | Consecutive error samples | Used with Δt to compute the backward-difference derivative |
| Δt | Sample time | The interval between consecutive controller updates |
| Tf | Derivative filter time constant | Limits high-frequency gain and suppresses sensor noise |
| N | Derivative filter divisor | Typically 8–20; higher N means less filtering |
How Each Variable Affects the Result
The relation is linear in both variables — doubling Kd doubles ud at the same error rate, and doubling de/dt doubles ud at the same gain. The sign of ud is the product of the signs of Kd and de/dt: if the error is growing (de/dt > 0) and Kd is positive, ud is positive and the controller pushes harder in the corrective direction. If the error is shrinking (de/dt < 0), ud is negative and the controller eases off — this is exactly the damping behaviour that derivative control provides.
The magnitude of Kd that is appropriate depends entirely on the plant and the units of the error and time. For a thermal loop where the temperature changes by tenths of a degree per minute, Kd might be 0.01. For a servo where the position error changes by meters per millisecond, Kd might be 1000. There is no universal "correct" value — the gain is chosen during tuning to hit a specific phase-margin or bandwidth target, and it is always traded against noise amplification and actuator chatter.
The choice of sample time Δt also matters. If Δt is very long compared to the plant dynamics, the backward difference becomes a poor approximation of the true derivative and the controller effectively sees a delayed and distorted version of the error rate. If Δt is very short, the difference ek − ek−1 is dominated by sensor noise. In practice, a common rule is to sample at least 10–20 times faster than the closed-loop bandwidth, so that both the derivative and the integral are computed with adequate resolution.
Derivative Control Calculation Examples
ud = 1 × 1 = 1.000
Kd = 5 / 2 = 2.500
de/dt = 10 / 20 = 0.500 /s
de/dt = (1.5 − 1.4) / 0.1 = 1.0 /s
ud = 2 × 1.0 = 2.000
Frequently Asked Questions
Use derivative action when the plant has significant lag or inertia and you need to add phase lead to the loop to hit a bandwidth or settling-time target without sacrificing stability margin. Classic examples: motion control (where inertia makes the plant second-order), temperature control of a large mass, and any loop where you find yourself reducing Kp to keep the loop stable. Do not use derivative when the sensor is very noisy, when the plant is dominated by pure delay (dead time), or when the actuator cannot tolerate rapid changes. In those cases, PI-only control or a Smith predictor is usually better.
The derivative kick is the impulsive spike in ud that occurs when the setpoint changes abruptly. Because the error e = r − y jumps by the same amount as the setpoint step, de/dt momentarily spikes toward infinity, and the derivative term produces a large, short pulse at the controller output. This is usually harmless but can be startling — it can saturate the actuator, produce audible noise, or trip protection circuitry. The standard fix is to apply the derivative to the measurement instead of the error: replace de/dt with −dy/dt. Because the plant output y cannot change instantaneously (physical plants have inertia), the derivative of the measurement is smooth, and the kick disappears. This is called "derivative on measurement" and is the default in most industrial PID controllers. A second option is to ramp the setpoint rather than step it.
Because differentiation amplifies high-frequency content. A pure differentiator has gain proportional to frequency, so any noise at 1 kHz is amplified 1000× more than noise at 1 Hz. Real PID controllers always include a first-order filter on the derivative term to limit this. The filter time constant is usually set to about Kd/(N·Kp) where N is typically 8–20; this caps the high-frequency gain of the derivative path at about N·Kp and rolls it off above the filter corner. If your derivative is still noisy with the filter in place, either reduce Kd, increase the filter time constant, or improve the sensor. Using a rate gyro or tachometer as a direct velocity measurement is often much cleaner than differentiating a position signal.
The backward difference (ek − ek−1)/Δt is only an approximation of the true derivative. If Δt is too long, the approximation misses curvature in the error signal, and the controller effectively sees a delayed and filtered version of the true rate. If Δt is too short, the difference is dominated by measurement noise and quantisation. A good rule of thumb is to sample at 10–20 times the desired closed-loop bandwidth, and to make the derivative filter time constant at least a few sample periods long so that the filter has enough resolution to work. In a digital implementation, this usually means sampling at 1–10 kHz for servo loops, 100–1000 Hz for motor speed loops, and 1–10 Hz for thermal loops.
Two common parameterisations are in use. In the "parallel" or "independent" form used by this calculator, ud = Kd·de/dt directly. In the "standard" or "ideal" form, the controller is written u = Kp·(e + (1/Ti)∫e dt + Td·de/dt), where Td is the "derivative time" in seconds. The two are related by Kd = Kp·Td. So if a loop is tuned with Kp = 2 and Td = 0.5 s, the equivalent Kd in parallel form is 1.0. Both forms describe the same physical behaviour; the choice is a matter of convention. Most modern tuning guides use the standard form because Td has a clear physical interpretation — it is the "prediction horizon" of the derivative action, in seconds.
The gain Kd is normally non-negative, but the derivative output ud can be positive or negative because it depends on the sign of de/dt. When the error is growing (de/dt > 0), ud is positive and the controller pushes harder. When the error is shrinking (de/dt < 0), ud is negative and the controller eases off — even reversing the corrective direction slightly if the error is closing fast. This sign-alternating behaviour is precisely what gives derivative control its damping character: it acts as a "brake" on the error signal, opposing whichever direction the error is moving. Some advanced controllers use a negative Kd deliberately as part of a non-minimum-phase compensator, but for standard PID this is unusual.
For most industrial applications, on the measurement. The reason is the derivative kick: if the derivative is computed from the error e = r − y, then a step change in the setpoint r produces a step change in e and therefore an impulsive spike in de/dt. Applying the derivative to y instead eliminates this spike, because y is the plant output and cannot jump discontinuously. The control loop still gets the same stabilizing phase lead from the derivative — it responds to how fast the plant is actually moving, not to what the setpoint is doing. The only disadvantage is that the derivative no longer anticipates setpoint changes, which slows the initial response slightly. For high-performance tracking (e.g., CNC, robot trajectories), setpoint weighting or setpoint ramping is often used in combination with derivative-on-measurement to get the best of both worlds.
Tune the derivative last. Start with Kp only — increase it until the loop is fast enough but still stable. Then add Ki and increase it until steady-state error is eliminated but before the loop starts to oscillate from integral action. Finally, add Kd and increase it slowly, watching both the loop response and the actuator output. The derivative should reduce overshoot and settling time, and should let you push Kp slightly higher. Stop when either (a) you hit your performance target, or (b) you see actuator chatter or audible noise — that is your noise limit. In the Ziegler-Nichols tuning rules, Kd is set to about Kp·Tu/8 where Tu is the ultimate period, but these rules tend to be aggressive; most practitioners end up with somewhat less derivative than Z-N suggests.
Variables
| Symbol | Quantity | Unit |
|---|---|---|
| u_d | Derivative control output signal | |
| Kd | Derivative gain | |
| de/dt | Rate of change of the error |
What it means
Derivative control acts on the rate of change of error, providing a damping effect that reduces overshoot and improves stability. It is sensitive to noise, so a low‑pass filter is often added. It is part of the PID controller. Understanding derivative action helps in tuning for faster response without oscillation.
Worked example
Derivative Control Output – Two Detailed Examples
Real‑World| Parameter | Value |
|---|---|
| Kd | 1 |
| de/dt | 5 |
| Parameter | Value |
|---|---|
| Kd | 2 |
| de/dt | 2.5 |
Common mistakes
- Derivative control output: u_d = Kd·(de/dt) – reacts to the rate of change of error.
- Noise sensitivity: Derivative amplifies measurement noise – use low‑pass filtering.
- Derivative on measurement: Often implemented as −Kd·(dy/dt) to avoid setpoint kick.
- Units: Kd has units of output per (error per time) – e.g., V/(unit/s).
- Anticipatory: Derivative action predicts future error – improves settling time.
Applications
Derivative control output, u_d = K_d·(de/dt), responds to the rate of change of the error, providing a damping effect that improves stability and reduces overshoot. This term is essential in systems with significant inertia or lag. Engineers use it to anticipate future errors and to counteract sudden changes. Combined with P and I terms, it forms the complete PID controller. By tuning K_d, they can improve transient response without increasing steady‑state error. This formula is widely used in motion control, robotics, and high‑performance automation.
- Vibration damping and overshoot reduction in positioning systems
- Motor speed control with rapid load changes
- Automatic steering and stabilisation in vehicles
- High‑performance servo systems
- Robust control in uncertain environments
Related calculators · Control Systems
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.