TL;DR
A proportional controller pushes the system toward its target in proportion to the error. That works, but the system often overshoots the target and rings back and forth. A PD controller adds a second term that pushes against the rate at which the output is changing, which is like a brake that grows with speed. The result is much less overshoot and a response that settles. The name comes from its two parts: proportional and derivative.
Builds on: Feedback Control, Ordinary Differential Equation · Leads to: Transfer Function, Lyapunov Stability
This lesson explains a mathematical idea from engineering. It is not advice for building or operating any equipment.
Where it's used
Robot joints and servo motors. A motor that turns a robot's elbow must reach an angle quickly and stop there without swinging past it. Engineers commonly use a PD loop, with the angle error feeding a proportional term and the measured angular speed feeding a derivative term, so the arm arrives smoothly.
Multirotor drones. The attitude, meaning the tilt of the body, is held by fast feedback loops on each axis. Those loops are often PD-type, because the gyroscope measures the rate of rotation directly, and that rate is exactly the derivative term needed to damp the motion.
Positioning stages. Machines that move a tool or a read head to a precise position use feedback with damping so the head lands on target without ringing. The derivative term is what keeps the settling time short.
How it works
We take the smallest useful case: a unit mass that a controller pushes along a line. Let the position be , the target be metre, and the force be . Start at rest at .
- Set up the plant. With a unit mass, Newton's second law says the acceleration equals the force, so . Check: a force of newtons gives an acceleration of metres per second squared.
- Use proportional control only. Choose with . The push is four times the error. Check: at the start the error is , so the force is newtons.
- Watch the mass move. The mass accelerates toward the target. At the start the force is , so the acceleration is , and the mass speeds up. Check: the speed starts at zero and grows, so the motion starts gently.
- Pass the target. The force becomes zero when , but the mass has built up speed by then. Check: the mass keeps moving past the target, so the error becomes negative and the force pushes back.
- Keep oscillating. Without any damping the mass swings back and forth between and , forever. Check: the midpoint of the swing is , the target, and the amplitude is .
- Add the derivative term. Now choose , with . The new term uses the speed , the derivative of position, not the error. Check: when the mass moves fast toward the target, is large and the push back is strong, so the mass slows before it overshoots far.
flowchart LR R["Target r"] --> E["Error r minus y"] E --> P["Proportional term Kp times error"] Y["Position y"] --> D["Derivative term minus Kd times speed"] P --> S["Sum is the force u"] D --> S S --> M["Unit mass: y'' = u"] M --> Y
The math
For a plant whose output should follow a setpoint , the PD law is
where is the proportional gain and is the derivative gain. The derivative term uses the rate of change of the output, written .
Step 1 in symbols: the plant
A unit mass obeys , where is the second derivative of position, the acceleration. This is a double integrator. A mass with drag or a spring would add terms, but the unit mass keeps the algebra short.
Step 2 in symbols: the closed loop
Substituting the PD law into the plant gives
This is a second-order linear differential equation with constant coefficients, the kind studied in ordinary differential equations. The term acts like friction, and acts like a spring pulling the output toward .
Step 3 in symbols: where it settles
At steady state the output stops changing, so and . The equation gives , so exactly. With no constant load, a proportional controller on this plant also settles at . So the derivative term does not change the final value. It changes only the path to it.
Step 4 in symbols: the characteristic equation
Write the solutions as exponentials (exponential functions). This gives the characteristic equation
Define the natural frequency and the damping ratio . Then the equation becomes . When the roots are complex, and the response oscillates while it decays. When there is no overshoot.
Step 5 in symbols: the step response and overshoot
For , with and , the response is
The peak occurs at and its size is times the target, so the overshoot fraction depends only on .
Worked examples
Take a unit mass, , , , and start at at rest.
- The equation is , so and .
- The solution that starts at rest is .
- Check the start: .
- At s, , so . The target is reached.
- At s, , so . The overshoot is percent.
- The motion continues between and forever, because nothing removes energy.
Interpretation: proportional control reaches the target but overshoots it by the same amount it started below it, and it never settles. The derivative term is the fix.
Take the same unit mass with and , so .
- Natural frequency: .
- Damping ratio: .
- Damped frequency: .
- Peak time: s.
- The overshoot exponent is , so the overshoot factor is .
- Peak value: , so the overshoot is percent instead of percent.
- Steady value: , with no error.
Interpretation: adding the derivative term cut the overshoot from percent to about percent, while keeping the zero steady error. The damping ratio is the number that controls this.
A cart of mass kg is pushed by a motor with force . Let N/m and N s/m, and let the target be m.
- Newton's law: , so .
- Divide by 2: . In the standard form , the coefficient of is .
- Natural frequency: rad/s.
- Damping ratio: .
- Overshoot factor: .
- Peak position: m, which is m past the target.
Interpretation: the cart overshoots by about 44 percent, because the derivative gain is too small for this mass and stiffness. Doubling to gives and an overshoot of percent, so the same cart stops much closer to the target.
Try it: With and the same , and m, what is the peak position? Answer: , so the overshoot factor is and the peak is m.
Common mistakes and tradeoffs
It is tempting to think that the derivative term acts on the error. In fact the standard PD law differentiates the output, not the error. When the setpoint jumps, an error-based derivative would produce a large sudden push, which is why many designs use instead of .
It is tempting to think that more derivative gain is always better. In fact the derivative term amplifies noise, because differentiating a noisy measurement gives large spikes. Real designs filter the derivative signal and keep modest.
It is tempting to think that a PD controller removes steady error from a constant load. In fact the steady state in the examples has only because the plant has no constant disturbance. A constant force such as gravity on a lifted arm leaves a steady error with PD control, and an integral term is needed to remove it.
When to use it. Use PD control when the plant has inertia and the output must reach its target quickly without much overshoot, and when a measurement of the output's rate is available or can be estimated.
When not to use it. When the plant has delays or sensor noise is high, a large derivative term can destabilise the loop or amplify noise. In those cases a lower derivative gain, a filter, or a different design is needed.
| Controller | Steady error from a constant load | Overshoot for the unit mass example |
|---|---|---|
| Proportional, | yes | percent, and it never settles |
| PD, , | depends on the load; zero in the example | percent |
| PID | none | depends on the tuning |
History
In 1922 Nicolas Minorsky, working on automatic ship steering for the US Navy, described a control law that combined a proportional term with a term based on the rate of change of the error. His paper is one of the first clear statements of the idea that later became the PID controller.
Engineers used such laws in process plants and servo systems through the 1930s and 1940s. The tuning methods that engineers used in those decades were largely empirical, based on watching the response to a step input.
Control theory later gave a precise account of why the derivative term works. The damping ratio of the closed loop, which the examples use, comes from this analysis, and it became the standard tool for choosing gains.
Recap
- A proportional controller reaches the target but overshoots and can oscillate forever when the plant has inertia.
- The PD law adds a force that opposes the speed of the output.
- For a unit mass the closed loop is , with steady state .
- The damping ratio controls the overshoot; gives about percent.
- Adding an integral term removes steady errors from constant loads, which is the step to full PID control, and transfer functions describe the same loop in the frequency domain.
Next, read Lyapunov Stability for a general test of whether a loop like this one settles, and Feedback Control if the basic loop is not yet clear.
Check yourself
QuestionRecall: what does the [[derivative|derivative term]] in a PD controller act on, and why does that damp the motion?Show answer
It acts on the rate of change of the output, . When the output moves quickly, the term pushes against that motion, which slows the approach to the target and reduces overshoot. It adds damping without changing the final value.
QuestionComputation: for a unit mass with and , what are the natural frequency and the damping ratio ?Show answer
. The damping ratio is . This is the critically damped case, so there is no overshoot.
QuestionWhy: suppose a constant force from gravity acts on the mass in the opposite direction to the controller. Why does a PD controller then leave a steady error, and how big is it?Show answer
At steady state the velocity is zero, so the derivative term contributes nothing. The force balance becomes , so the error is . The derivative term cannot remove this, because it is zero at steady state. Only an integral term, which keeps adding up the error, can push the error to zero.
QuestionApplied: an engineer says a higher derivative gain always makes the loop safer. Is this right?Show answer
No. A higher derivative gain adds damping, which reduces overshoot in the ideal model. But it also amplifies noise in the measured rate and can destabilise a loop with delays. The gain has to be chosen to balance speed, overshoot and noise.