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.

01

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.
0 or 1 weak itemsContinue with this chapter.
2 weak itemsRevisit integral action in Chapter 5.
3 or more weak itemsReview second-order response in Chapter 4.
02

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 skill works when: you match each term to its job and tune the gains to a target pole location.
The skill breaks down when: integral action is added without checking stability, or derivative gain amplifies measurement noise.
The concept. The PID controller splits the error into three parallel terms, present, past, and future, and sums them into the control signal that drives the plant.
03

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.

TermActs onBenefitCost
Proportionalpresent errorspeed, smaller errorresidual offset
Integralaccumulated errorzero steady-state erroradded lag
Derivativerate of errordamping, anticipationnoise 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.

04

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.

Figure 1. Proportional gain pushes the pole from −1 to −10, ten times faster, but leaves a 10 percent steady-state error because no integrator is present.
  1. ProblemFind the closed-loop pole, DC gain, and step error for the loop in Figure 1.
  2. Given / findG(s) = 1/(s + 1), Kp = 9, unity feedback. Find the pole, T(0), and ess.
  3. AssumptionsProportional control only; type 0 plant.
  4. ModelForm T = KpG/(1 + KpG); the DC gain gives the step error from ess = 1 − T(0).
  5. EquationsT = 9/(s + 1 + 9) = 9/(s + 10)ess = 1 − T(0)
  6. 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.
  7. 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.
  8. 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.
Result. Pole at −10, DC gain 0.9, steady-state error 0.1.
05

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.

Figure 2. The integral term raises the system to type 1, so the output reaches the command exactly. The gains are chosen so the closed-loop poles give the target damping and speed.
  1. ProblemFind Kp and Ki for the target poles, and the step error, for the loop in Figure 2.
  2. Given / findGc = Kp + Ki/s, G = 1/(s + 1), target ωn = 4, ζ = 0.7. Find Kp, Ki, ess.
  3. AssumptionsUnity feedback; the closed-loop is second order, so its poles match the standard form exactly.
  4. ModelForm the characteristic equation and match it to s² + 2ζωns + ωn².
  5. Equations1 + GcG = 0 ⇒ s² + (1 + Kp)s + Ki = 02ζωn = 1 + Kp, ωn² = Ki
  6. 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.
  7. 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.
  8. 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.
Result. Kp = 4.6, Ki = 16; the step error is zero.
06

Misconceptions and diagnostics

MistakeSymptomDiagnostic questionCorrection
Expecting P to remove offsetResidual 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 stabilitySluggish or oscillatory loop"Did the extra lag erode the margin?"Verify the closed-loop poles after adding 1/s.
Unfiltered derivativeNoisy, jittery control signal"Is the measurement noisy?"Filter the derivative term or drop it.
Tuning gains blindlyTrial-and-error with no target"What pole location am I aiming for?"Place the poles from ωn and ζ, then refine.
07

Practice ladder

Level 1 · Direct skill

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.

Level 2 · Mixed concept

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.

Level 3 · Independent problem

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.

Level 4 · Transfer to real engineering

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.

08

Working with AI, and proving it yourself

Use AI as an examiner, not a solver

"Check that I matched the characteristic equation to the target ωn and ζ."
"Give me three loops; I will say which term each one most needs."
"Tune this PID for me." Placing the poles yourself is the skill.
"Why is there still an offset?" Reasoning from system type is the point.

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.

Must include: a target ωn and ζ, the chosen gains, the steady-state error, and a margin check.
09

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 ζ.

TodayFinish this quiz and Levels 1 and 2 of the ladder.
+1 dayRe-derive the P and PI designs from a blank page.
+3 daysTune a controller for a new plant.
+7 daysCombine modeling, stability, and tuning into one design.
+30 daysRevisit the whole course through the Controls and Systems hub.
10

Textbook mapping

ItemMapping
Primary sourceOgata, Modern Control Engineering, Chapter 8 (PID Controllers and Modified PID Controllers)
Cross-referenceNise, Ch. 9 · Robotics and Mechatronics
Core topics10.1 Proportional · 10.2 Integral · 10.3 Derivative · 10.4 Combined PID · 10.5 Tuning
Engineering connectionPID unites steady-state error, pole placement, and margins into one controller.
Read nextReturn to the Controls and Systems hub and integrate the course.