TactivergeLite

Lite / Engineering Complex Systems / 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 · Full interactive version

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.

Predict

In the usual manual procedure, which gain is set first?

  1. Ki
  2. Kd
  3. Kp
  4. All at once
Guess first, then reveal

Kp first, with I and D off, until the response is fast but starts to overshoot. Then D to tame the overshoot, then a little I to remove the remaining error.

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.

What the interactive shows (text version)

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.

You can also open the interactive on the full site when you have a faster connection.

Watch (optional)

Watch for: 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.

“A PID Tuning Guide | Understanding PID Control, Part 4” by MATLAB (opens YouTube; streaming video uses a lot of data)

The video is optional. Everything you need is in this lesson's text.

Understand

A procedure

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

Intuitive

Like seasoning soup: add one thing at a time, taste after each, and write down what you added so you can make it again.

Technical

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.

Applied

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

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. You've set Kp. Overshoot is 18 % and the spec is 10 %. What next in the procedure?
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?

s

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.

Reflect

Which change in your log surprised you most, and what did it reveal about the system?

Write your answer on paper or in your own notes. Lite never stores what you write.

← I removes the error, D adds the dampingHitting the wall: saturation and windup →