Controls and Systems · Chapter 10 of 10 · Advanced
PID Control and Tuning
Three terms, each answering a different question: how big is the error, how long has it persisted, and how fast is it changing. The PID controller is the workhorse of industrial control, and tuning it is the craft.
Readiness check
This closing chapter combines the whole course. Tick only what you can do closed-notes.
- Form a closed-loop transfer function.
- Recall what an integrator does to steady-state error.
- Match a denominator to the standard second-order form.
- Relate ζ and ωn to overshoot and speed.
- Read a pole location as a response.
The core idea
A PID controller acts on the present error (P), its accumulated past (I), and its predicted future (D). Tuning the three gains places the closed-loop poles where the response specs demand.
Gc(s) = Kp + Ki/s + KdsI removes steady-state errortune to place ωn and ζThe proportional term reacts to the current error, giving speed but leaving a residual offset. The integral term sums the error over time, driving even a tiny offset to zero, the reason a PI loop tracks a step exactly. The derivative term reacts to how fast the error changes, adding damping and anticipation but amplifying noise. Combined, the three gains shape the closed-loop characteristic equation, so tuning is choosing them to place the poles, by pole placement or by a recipe like Ziegler-Nichols, until overshoot, settling, and steady-state error all meet spec.
The skills, taught in order
Five skills cover each control action, the combined controller, and how to tune it.
10.1 Proportional action
The proportional term u = Kpe scales the control by the current error. Raising Kp speeds the response and shrinks the steady-state error, but a finite Kp always leaves some offset on a type 0 plant, and too much gain reduces the stability margin.
10.2 Integral action
The integral term accumulates error, so it keeps acting until the error is exactly zero. It raises the system type by one and removes steady-state offset, at the cost of adding phase lag that can slow the loop or erode its margin.
10.3 Derivative action
The derivative term responds to the rate of change of error, adding damping and a measure of anticipation that reduces overshoot. Its weakness is noise: differentiating a noisy measurement amplifies it, so derivative action is usually filtered.
| Term | Acts on | Benefit | Cost |
|---|---|---|---|
| Proportional | present error | speed, smaller error | residual offset |
| Integral | accumulated error | zero steady-state error | added lag |
| Derivative | rate of error | damping, anticipation | noise amplification |
10.4 The combined PID controller
The full controller Gc(s) = Kp + Ki/s + Kds blends all three. Many loops use only PI (no derivative, for noise) or PD; the choice depends on whether steady-state accuracy or damping is the priority.
10.5 Tuning
Tuning sets the three gains. Pole placement chooses them so the closed-loop characteristic equation matches a target ωn and ζ. Empirical recipes such as Ziegler-Nichols start from the gain and period at the stability limit, giving a quick first cut that is then refined.
Engineering connection: PID brings together every idea in the course, steady-state error, pole placement, and stability margin, into the controller that runs most of the world's machines.
Worked example 1: proportional control of a first-order plant
A plant G(s) = 1/(s + 1) is controlled by a proportional gain Kp = 9 in unity feedback. Find the closed-loop pole, the DC gain, and the steady-state error to a unit step.
- ProblemFind the closed-loop pole, DC gain, and step error for the loop in Figure 1.
- Given / findG(s) = 1/(s + 1), Kp = 9, unity feedback. Find the pole, T(0), and ess.
- AssumptionsProportional control only; type 0 plant.
- ModelForm T = KpG/(1 + KpG); the DC gain gives the step error from ess = 1 − T(0).
- EquationsT = 9/(s + 1 + 9) = 9/(s + 10)ess = 1 − T(0)
- SolveThe closed-loop pole is at −10. DC gain T(0) = 9/10 = 0.9. The steady-state error is 1 − 0.9 = 0.1.
- CheckThe same error follows from Kp = 9 as a position constant: ess = 1/(1 + 9) = 0.1. Proportional gain sped the loop tenfold but could not remove the offset.
- ConclusionProportional action buys speed but always leaves an offset on a type 0 plant. Closing that gap is the job of the integral term next.
Worked example 2: PI tuning by pole placement
Add integral action to the same plant: Gc(s) = Kp + Ki/s on G(s) = 1/(s + 1). Choose the gains to place the closed-loop poles at ωn = 4 rad/s and ζ = 0.7, and confirm the steady-state step error is zero.
- ProblemFind Kp and Ki for the target poles, and the step error, for the loop in Figure 2.
- Given / findGc = Kp + Ki/s, G = 1/(s + 1), target ωn = 4, ζ = 0.7. Find Kp, Ki, ess.
- AssumptionsUnity feedback; the closed-loop is second order, so its poles match the standard form exactly.
- ModelForm the characteristic equation and match it to s² + 2ζωns + ωn².
- Equations1 + GcG = 0 ⇒ s² + (1 + Kp)s + Ki = 02ζωn = 1 + Kp, ωn² = Ki
- SolveKi = ωn² = 16. From 2(0.7)(4) = 5.6 = 1 + Kp, Kp = 4.6. The integrator makes the loop type 1, so the step error is 0.
- CheckWith ζ = 0.7 the overshoot is about 5 percent and the settling time is 4/(ζωn) = 4/2.8 = 1.4 s, a clean response, and the integrator guarantees perfect step tracking.
- ConclusionTwo gains placed the poles for the desired transient and removed the steady-state error at once. This pole-placement tuning is PID design in miniature, the capstone of the course.
Misconceptions and diagnostics
| Mistake | Symptom | Diagnostic question | Correction |
|---|---|---|---|
| Expecting P to remove offset | Residual error on a type 0 plant | "Is there an integrator in the loop?" | Only integral action drives steady-state error to zero. |
| Adding integral without checking stability | Sluggish or oscillatory loop | "Did the extra lag erode the margin?" | Verify the closed-loop poles after adding 1/s. |
| Unfiltered derivative | Noisy, jittery control signal | "Is the measurement noisy?" | Filter the derivative term or drop it. |
| Tuning gains blindly | Trial-and-error with no target | "What pole location am I aiming for?" | Place the poles from ωn and ζ, then refine. |
Practice ladder
A plant 1/(s + 2) has proportional gain Kp = 8. Find the closed-loop pole and the step error.
Show answer
T = 8/(s + 2 + 8) = 8/(s + 10), pole at −10. ess = 1/(1 + Kp) where Kp here is 8/2 = 4, so ess = 0.2.
For the Worked Example 2 plant, retune the PI controller for ωn = 6 rad/s and ζ = 0.7. Find the gains.
Show answer
Ki = ωn² = 36. 1 + Kp = 2(0.7)(6) = 8.4, so Kp = 7.4. A faster target needs higher gains.
A proportional loop has T = 20/(s + 25). What is its steady-state step error, and what would adding integral action change?
Show answer
T(0) = 20/25 = 0.8, so ess = 0.2. Adding integral action would raise the loop to type 1 and drive that error to zero, at the cost of an extra pole to manage.
Pick a real PID loop (a 3D-printer hotend, a motor speed controller). Describe what each term contributes and which you would tune first.
What good work looks like
P for speed, I for zero offset, D for damping, with a sensible tuning order (often P then I, D last and filtered) tied to the loop's noise and accuracy needs.
Working with AI, and proving it yourself
Use AI as an examiner, not a solver
Portfolio task
Design a PI or PID controller for a real plant: state a target overshoot and settling time, choose the gains by pole placement, and confirm the steady-state error and a stability margin.
Retrieval and spaced review
Closed notes. Answer out loud, then reveal.
1. Write the PID controller.
Gc(s) = Kp + Ki/s + Kds, acting on present, past, and rate of error.
2. What does each term do?
P gives speed, I removes steady-state error, D adds damping.
3. Why does integral action remove offset?
It raises the system type by one, so the error must reach zero for the integrator to stop.
4. What is the cost of derivative action?
It amplifies measurement noise, so it is usually filtered or omitted.
5. How does pole placement tune a controller?
Choose the gains so the closed-loop characteristic equation matches a target ωn and ζ.
Textbook mapping
| Item | Mapping |
|---|---|
| Primary source | Ogata, Modern Control Engineering, Chapter 8 (PID Controllers and Modified PID Controllers) |
| Cross-reference | Nise, Ch. 9 · Robotics and Mechatronics |
| Core topics | 10.1 Proportional · 10.2 Integral · 10.3 Derivative · 10.4 Combined PID · 10.5 Tuning |
| Engineering connection | PID unites steady-state error, pole placement, and margins into one controller. |
| Read next | Return to the Controls and Systems hub and integrate the course. |