Lesson 8 — Auto-Tuning

INST 2755 · PID Section Rebuild (draft, not yet packaged as SCORM)

Lesson 8 · Objective

Letting the Controller Tune Itself

Last lesson you tuned a loop by hand. The procedure works — but you did all the measuring: bump it, watch it, adjust, go round again.

Most controllers have a button that does the measuring part for you. By the end of this lesson you should be able to say what that button actually does to your loop, decide whether pressing it is a good idea right now, and recognise the four ways a loop can behave once you have tuned it.

What's ahead: why auto-tune exists, what it does to a running process (this is the part that matters), the two ways controllers measure a process, the named rules that turn those measurements into numbers, a live auto-tune you run yourself, and the four damping regimes on sight.

Why It Exists

Why There's a Button At All

A plant has hundreds of control loops. Tuning one by hand the way you did last lesson takes real time — bump, watch, adjust, wait, repeat — and loops need retuning when equipment is replaced or the process changes.

So the obvious question: could the controller do the bump-and-measure step itself? It can. That is all auto-tune is.

Keep the scale of it in perspective: auto-tune does not replace knowing how to tune. It replaces the tedious measuring step. Everything you learned last lesson is still how you check its work — and how you fix it when it gets the answer wrong.

The Part That Matters

What Auto-Tune Does to Your Loop

Auto-tune is not a diagnostic that sits quietly and watches. It deliberately upsets your process in order to measure it. It takes the loop off automatic, moves the output on its own, and waits to see what the process does about it.

On a Real Plant

Same rule as last lesson, and it applies harder here: operations has to know before you press it, and your site's procedures apply.

The difference is that you are handing the output to an algorithm that will keep going regardless of what looks wrong downstream. When you tune by hand you can stop mid-move. An auto-tune routine will not.

Two Things It Can't Do For You

  • It can't work on a loop that won't sit still. The measurement is "I moved the output this much and the process did that" — if something else is already moving the process, that answer is meaningless. Let the loop settle first.
  • It can't tell a bad process from a bad tune. Run it on a loop with a sticking valve and it will measure the sticking valve, fit a model to it, and hand you confident-looking numbers that are wrong. The mechanical checks from Lesson 7 page 2 come first, every time.

Concept

Two Ways to Measure a Process

Every auto-tune you will meet in industry works one of two ways. Both are just organised versions of "poke it and watch."

1 · Step Response (the reaction curve)

Move the output a known amount — say 10% — and record what the measurement does. Three things come out of that curve: how long before anything happens at all (dead time), how fast it then moves, and where it ends up. That is enough to describe the process.

2 · Relay Oscillation

Deliberately make the loop cycle. The controller flips its output between two fixed levels depending on which side of setpoint the measurement is on, which drives a small, steady oscillation. Then it measures that oscillation's period and amplitude. Different information, same purpose.

Different vendor, different button, same two ideas. Rockwell's PIDE Autotuner, Beckhoff TwinCAT, Siemens PID_Compact, Emerson DeltaV — every one of them comes down to a step response or a relay oscillation. Nobody has a secret third method. Learn these two and you understand all of them.

The simulator you are about to use does the step-response version.

Concept

Turning a Measurement Into Numbers

Measuring the process gets you a description of it — so much dead time, moves at such a rate. It does not get you Kp, Ki and Kd. Something has to do that conversion, and that something is a tuning rule: a published formula that takes the measurements in and hands tuning numbers out.

These are the three names you will run into. You do not need the formulas — just recognise the words when an engineer, a vendor manual, or a controller screen uses them.

Ziegler–Nichols Lambda / IMC Cohen–Coon
  • Ziegler–Nichols — the oldest, and the most aggressive. Fast, and it tends to leave the loop livelier than some plants want.
  • Lambda / IMC — has a "how gentle do you want it" knob, so you can ask for a slower, smoother response on purpose.
  • Cohen–Coon — built for loops with significant dead time.
So an auto-tune does exactly two things: measure the process, then run a tuning rule on the measurement. That is the whole trick. Some controllers let you pick which rule; many just use one and do not tell you which.
Live Demo

Run One Yourself

The auto-tune control has been sitting on the simulator panel since Lesson 4 — visible, and locked. This is where it unlocks.

The button below opens the tank-level loop in its own tab with auto-tune enabled. This lesson tab stays open behind it, so switch back when you're done.

Auto-Tune the Tank
Start the sim, let the level settle, then open Auto-Tune, run a bump test, and look at what it identified before you apply anything.
⚙️ Auto-Tune the Tank

What You're Looking At

  • The bump is the measurement. The loop leaving setpoint for a minute is not the test going wrong — it is the test.
  • It shows you its work. The results step gives you the model it identified and draws that fitted model on top of what actually happened. If those two curves do not sit on each other, the auto-tune did not understand your process and you should not trust its numbers.
  • Apply is a separate decision. Reading the result and accepting it are two different steps, on purpose.
This one uses Ziegler–Nichols. It does not offer you a choice of rule — plenty of real controllers do not either. So expect a fairly lively tune, and expect to soften it afterwards using exactly what you learned last lesson.
Live Illustration

Recognition

The Four Ways a Loop Can Behave

Whether a human or an algorithm is doing the tuning, this is what they are watching for. Four trends below, same loop, four different tunings. Decide what each one is before you reveal the answer.

Trend A — what is this?

Well damped. It goes where it is told, does not overshoot, and stays put. For most loops this is what you are aiming for.

Trend B — what is this?

Converging — a decaying oscillation. Each swing is smaller than the last, so it does settle. Stable, but livelier than most plants want. Usually a sign of slightly too much gain.

Trend C — what is this?

Sustained — constant-amplitude oscillation. Every swing the same size, forever. The loop is on the knife edge: not running away, but never settling either. This exact condition is what Ziegler–Nichols' closed-loop method goes looking for — you turn the gain up until you get this, then measure it.

Trend D — what is this?

Diverging — an unstable loop. Each swing bigger than the last. On real equipment this ends with the valve slamming between its limits. Back the gain off, now.
The useful habit: after any tune — yours or an auto-tune's — give the loop a setpoint change and watch which of these four you got. That is the whole test, and it takes thirty seconds.

Review

When Not to Trust It

Auto-tune gives you a starting point, not an answer. Treat whatever it hands back the same way you would treat numbers off an old loop sheet: put them in, disturb the loop, and watch what happens.

If what comes back looks wrong — it hunts, it is sluggish, the fitted curve never matched the recorded one — you are not stuck. You fall back on the manual procedure from Lesson 7. That is why you learned it first.

Review

Coming up in Lesson 9: cascade loops — two controllers in series, where one loop sets the other's setpoint, and which one you tune first. Go to Lesson 9 — Cascade Loops →