Skip to content
Tactiverge

Derivative action and damping

How reacting to the rate of change lets a controller brake before it overshoots, what under-, over- and critically damped responses look like, and why derivative action hates noise.

Lesson 4 of 6 · 30 min · Self-paced · Free

Braking before the wall

When you run towards a doorway, you do not wait until you are in it to slow down. You see that you are approaching fast and start braking early. Your decision depends not only on how far you are from the doorway, but on how fast that distance is shrinking.

A proportional controller only looks at how far. It pushes hard while the error is large and keeps pushing, a little less, all the way to the set point. If the thing it moves has inertia, like a robot arm, a cart or a drone, the arm arrives with speed and sails past. The third term of PID, derivative action, adds the missing information: the rate of change.

Systems that bounce

Some plants respond smoothly to a push, like a heater warming a room. Others carry momentum and can bounce, like a mass on a spring. A robot joint with a flexible gearbox, a car's suspension and a camera gimbal all behave a bit like a mass on a spring.

Engineers describe a spring-like system with two numbers: how fast it naturally wants to oscillate, and how strongly it resists oscillating. The second is the damping ratio, written ζ (zeta). It sorts step responses into three families:

  • Underdamped (ζ < 1): the output rises quickly, overshoots and rings before settling. The smaller ζ, the bigger and longer the ringing.
  • Critically damped (ζ = 1): the fastest possible response that never overshoots.
  • Overdamped (ζ > 1): no overshoot, but sluggish; the output creeps up to its final value.

For an underdamped system of this standard type, the overshoot depends only on ζ:

overshoot = exp(−π · ζ / √(1 − ζ²))

Working it through: ζ = 0.2 gives about 53 % overshoot, ζ = 0.4 about 25 %, ζ = 0.6 about 9.5 %, and ζ = 0.7 about 4.6 %. A door closer on a heavy door is tuned near critical damping: it shuts firmly but does not bounce.

What derivative action does

The derivative term multiplies the rate of change by a gain Kd:

action = Kp · error + Ki · (sum of error) + Kd · (rate of change of error)

Suppose the set point is fixed and the arm is moving towards it. The error is shrinking, so its rate of change is negative, and the derivative term pushes against the motion. The faster the arm approaches, the harder it brakes. When the arm is still, the derivative term is zero and does nothing. Its whole job is to resist motion, which is exactly what physical damping does. In effect, derivative action adds damping.

You can see this in the maths for a mass-spring plant. For the explorer's second-order plant with time constant τ = 1 s, damping ζ = 0.4 and gain K = 1, under proportional plus derivative control, the closed loop is again a mass-spring system with

natural frequency   ωn = √(1 + Kp)
damping ratio       ζ_closed = (0.8 + Kd) / (2 · √(1 + Kp))

With Kp = 2 and no derivative, ζ_closed = 0.8 / 3.46 ≈ 0.23, which predicts about 47 % overshoot: much bouncier than the plant on its own, because the proportional gain stiffens the "spring" without adding any damping. Add Kd = 1 and ζ_closed rises to 1.8 / 3.46 ≈ 0.52, predicting about 15 %. Critical damping needs 0.8 + Kd = 3.46, so Kd ≈ 2.66.

Checking it in the explorer

Choose the 2nd order plant with τ = 1 s and ζ = 0.4. Select PID and set Ki = 0, so only the P and D terms act, and Kp = 2. Then step Kd up. The explorer reports approximately:

Kd = 0     overshoot 46 %    settling 8.4 s
Kd = 0.5   overshoot 28 %    settling 5.9 s
Kd = 1.0   overshoot 14 %    settling 3.2 s
Kd = 2.0   overshoot 0.5 %   settling 2.3 s
Kd = 2.66  overshoot 0 %     settling 3.6 s
Kd = 3.0   overshoot 0 %     settling 4.2 s

These agree with the formula to within a percent or two; the small differences come from the explorer's digital sampling and its filtered derivative. Notice something surprising: the fastest settling is not at critical damping. A touch of underdamping, here ζ ≈ 0.8 at Kd = 2, lets the output rise faster and only just kiss the 2 % band. Past critical damping the response gets steadily more sluggish. Derivative action, like the other terms, can be overdone.

Notice also that the steady-state error stays at 0.333 throughout. Derivative action acts only on change, so it cannot fix a steady error. That is still the integral term's job.

Explorer 02 — Feedback control

Measure, compare, correct

OUTPUT y vs SETPOINT r0.00.51.0Ts 1.30sCONTROL EFFORT u0.02.0012345678910TIME (s)
  • Setpoint r = 1
  • Closed-loop output
  • Open loop (u = r/K)
  • ±2 % band
Controller

Gains

2.0
1.5
0.20

Applies the command the model says is right, u = r / K, without ever measuring.

More controls

Plant

Plant model

Like motor speed or an oven: τ·ẏ = −y + K·u. K = 1.

1.0 s

Real-world effects

0.000

Noise only affects the closed loop: the derivative term amplifies it.

Rise 10–90 %
0.72 s
Overshoot
0.0 %
Settling 2 %
1.30 s
Steady-state err
0.333
theory r/(1+Kp·K) = 0.333

State

P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.

P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.

How to read this

The top panel shows the setpoint (dashed line at 1) and the plant's true output after a step command at t = 0. The solid line is the controlled system; the dotted line is open loop. The bottom panel shows the control effort u the actuator is asked to deliver.

Rise time is how long the output takes to go from 10 % to 90 % of where it ends up. Overshoot is how far it passes that value. Settling time is when it stays inside ±2 % for good. Steady-state error is the gap left at the end: P control always leaves one on these plants; integral action removes it.

Assumptions & limitations
  • Linear plant models with known, constant parameters (K = 1). Real motors and heaters have friction, dead zones and parameters that drift with temperature and wear.
  • Controller runs every 10 ms and holds its output between samples; the plant is integrated with 4th-order Runge–Kutta at the same step. There is no transport delay, which real systems almost always have.
  • The derivative acts on the measurement (not the error) through a 50 ms low-pass filter, a common practical choice that avoids a spike when the setpoint jumps.
  • Sensor noise is white Gaussian and seeded for repeatability; it is added only to the measurement, never to the true output.
  • Metrics are computed on the true output up to the disturbance time (or 10 s); a response still moving at the end of the window is reported as not settled.
  • Open loop uses the exact plant gain to pick its command. That flatters it: any modelling error would show up as steady-state error.
Choose the 2nd-order plant (τ = 1 s, ζ = 0.4), select PID and set Ki = 0 and Kp = 2. Raise Kd from 0 to 3 and watch overshoot fall. Then add sensor noise of 0.01 and watch the control effort become jagged as Kd grows.

The catch: derivative action amplifies noise

A rate of change is a difference divided by a time step. Real sensors are noisy, and dividing a small random wobble by a small time step makes a large number.

A worked example. A position sensor reads with random noise of about ±0.01 (standard deviation 0.01), and the controller updates every 0.01 s. Even if the arm is perfectly still, two successive readings differ by a random amount with standard deviation √2 × 0.01 ≈ 0.014. Dividing by 0.01 s gives a fake velocity of about 1.4 units per second, in a random direction, every update. With Kd = 1, that is 1.4 units of random action. Compare the proportional term: Kp = 2 times noise of 0.01 is only 0.02. The derivative term has made the noise seventy times worse.

The actuator then receives a jagged command. A motor driven this way buzzes, heats up and wears its gears, even if the arm's average position looks fine.

Engineers use two standard defences:

  1. Filter the derivative. Smooth the rate estimate with a low-pass filter, so that quick random jumps are averaged out while genuine motion still comes through. The explorer does this with a 0.05 s filter. In a simulation of the noisy case above, the filter cuts the random part of the actuator command from about 1.5 to about 0.2. The price is a little delay in the derivative's reaction.
  2. Take the derivative of the measurement, not the error. If the set point jumps suddenly, the error jumps too, and its "rate of change" for that one instant is enormous. A controller that differentiates the error gives the actuator a violent kick at every set point change. Differentiating the measured output instead gives the same braking during normal motion, because when the set point is fixed the two rates are equal and opposite, but no kick. The explorer uses this form.

When to use derivative action

Derivative action is most useful on plants with inertia and little natural damping: robot joints, quadcopter attitude, positioning stages. It is often left out on slow, smooth plants such as temperature control, where there is little to brake and the noise cost outweighs the benefit. Many industrial loops run as PI only.

Knowledge check

Check your understanding

  1. 1. A step response rises, overshoots by 30 % and rings a few times before settling. How would you describe it?
  2. 2. The set point is fixed and a joint is moving quickly towards it. What does the derivative term do?
  3. 3. A sensor has noise with standard deviation 0.02 and the controller samples every 0.01 s. Roughly how large is the noise in a raw, unfiltered rate estimate?
  4. 4. Why do many controllers take the derivative of the measured output rather than of the error?
  5. 5. On a lightly damped plant under P control with steady-state error 0.333, you add derivative action. What happens to the steady-state error?

Go further

  • Wikipedia — Damping ↗

    Covers the damping ratio and the underdamped, critically damped and overdamped cases, with diagrams of each response.