School/□ Systems Engineer/Week 17
Tuning to a written spec
Two engineers tune the same motor. One takes 10 minutes, one takes an afternoon. Both meet the spec. What did the first one do differently?
About 40 min · 3 goals · Checked by automated tests
1.Why should I care?
Tuning by trial and error eventually works, but nobody can repeat it, check it or improve it. A procedure plus a log turns tuning into evidence.
- ◇ Follow a documented manual tuning procedure (P first, then D, then I) against a written specification.
- ◇ Keep a tuning log that lets someone else reproduce the result.
- ◇ Recognise when a specification cannot be met and say why.
2.Discover
In the Robotics Workbench (Systems Engineer mode), tune a joint or wheel speed controller against this spec: overshoot ≤ 10 %, 2 % settling ≤ 1 s, zero steady-state error. Follow P → D → I, logging every change: setting, overshoot, settling, error.
Can't use the interactive? Read a description instead
The workbench lets you set controller gains and run a step test, reporting overshoot, settling time and steady-state error. Following the procedure, raising P speeds the response, adding D reduces overshoot, and a small I removes the remaining error.
3.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
You've set Kp. Overshoot is 18 % and the spec is 10 %. What next in the procedure?
4.Apply it
Submit your Workbench tuning log (at least six rows) with the final gains and a one-paragraph justification. If you couldn't meet the spec, say which line failed and what hardware change would fix it.
5.Understand
A procedure
- I and D off. Raise Kp until the response is quick with modest overshoot. 2. Add Kd until overshoot meets the spec. 3. Add Ki until steady-state error is gone within the settling limit. 4. Re-check every line of the spec, because each change affects the others.
A tuning log
One row per test: gains, conditions (set point, load, noise), and every metric in the spec. Change one gain at a time. A log lets a teammate reproduce your result, shows why you stopped, and catches the moment something got worse.
When the spec can't be met
Sometimes no gains meet everything: the actuator can't push hard enough, noise rules out much D, or delay limits the gain. Then the honest result is 'not achievable with this hardware', with the evidence, and a proposal: faster sensor, bigger motor, or a relaxed spec.
Explain it another way
Like seasoning soup: add one thing at a time, taste after each, and write down what you added so you can make it again.
Manual tuning is a coordinate search over (Kp, Kd, Ki). Rule-based methods (for example step-response rules) give a starting point from a plant's K, τ and delay; model-based methods place closed-loop poles directly.
Industrial commissioning engineers log every change because a plant may be retuned years later by someone else. The log is part of the deliverable.
Worked example 1
Log excerpt: Kp 2 → OS 0 %, ts 2.1 s; Kp 5 → OS 18 %, ts 1.6 s; Kp 5, Kd 0.2 → OS 6 %, ts 0.9 s; but e∞ = 0.04. Next step?
Add a small Ki to remove the 4 % error, then re-check OS and ts, since I tends to add overshoot. If OS rises above 10 %, nudge Kd up.
Common mix-ups
- Once it passes the spec once, tuning is done.
✓ Check it again under other conditions (load, noise, set points) the spec covers. One passing run is not a design.
6.Watch
→ Note the difference between manual tuning, rule-based tuning and model-based tuning, and when each is appropriate.
Walks through tuning a real loop step by step and what each gain does to the response.
Length: see YouTube · captions on YouTube · source
Nothing loads from YouTube until you press play.
The video is optional: everything you need is also in the lesson text and the interactive.
7.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 2
Which tuning-log entry is most useful?
Practice 3
You can't get settling under 1 s without the motor hitting its current limit. What is the right report?
Practice 4 · a fresh version every time
A second-order system has ωn = 5 rad/s and ζ = 0.6. Estimate its 2 % settling time ts with the rule of thumb ts ≈ 4/(ζ·ωn).
Practice 5 · a fresh version every time
A step response peaks os = 50 % above its final value. Assuming a standard second-order system, what is its damping ratio ζ?
8.Predict
In the usual manual procedure, which gain is set first?
Guess first. Being wrong here is how the surprise works.
9.Reflect
Concepts: Tuning a PID controller · Reproducibility and documentation · Evaluation metrics