Lesson 7 · Objective
How to Tune a Loop
By the end of this lesson you should be able to walk up to an untuned loop and get it tuned, in a sensible order, without chasing your own tail.
You have already met all three terms — and you have already tuned all three yourself, across ten graded tuning exercises. Nothing new gets invented here. What you get is the order to do it in, and one honest warning about why it never goes as neatly as the order suggests.
One Line on Each Term
Proportional reacts to how far off you are right now. On its own it can leave a permanent offset.
Integral removes that offset by accumulating error over time — at the cost of some of your stability margin.
Derivative reacts to how fast things are changing. It helps on slow, lagging processes and hurts on noisy ones.
In the Field
Where You Actually Start
Textbooks start every tuning discussion with a brand-new loop and a blank controller. That is almost never your situation. In the field you are far more often replacing or reconfiguring a controller that already exists — a failed transmitter, a card swap, a DCS migration, a controller that got wiped.
If you know the old settings, start there. Copy them in, put the loop in auto, and see what it does. You may be finished in two minutes.
That is not laziness — it is the fastest route to a working loop, and those old numbers quietly encode everything the last technician learned about that process. Somebody already did this work. Use it.
When You Don't Have Them
You will not always get that lucky. The controller may be genuinely new, the records may be gone, the process may have been modified since, or — it happens — the old tuning may simply have been bad and nobody ever fixed it. That is when you tune from scratch, which is what the rest of this lesson is about.
First, Make Sure There's a Loop Worth Tuning
Before any of it, the basics have to be right, and none of this counts as tuning:
- Acting direction — direct or reverse, from Lesson 3. A controller acting the wrong way cannot be tuned into working. It will walk the output straight to a rail every time, no matter what numbers you put in it.
- Ranges and units — the transmitter range in the controller matches the transmitter, and the output goes where you think it goes.
- Mechanical health — a sticking valve, a plugged line or a bad transmitter looks exactly like bad tuning on a trend, and you cannot tune it out. Stroke the valve and watch the PV respond before you touch a single gain.
Tuning is a live change to a running process. Every step below deliberately moves the controller output, so operations has to know it is happening, and you have to know how far you are allowed to move things.
Every site handles that differently — permissions, permits, management of change. Know what yours requires before you start.
Refresher
What P-Only, PI and PID Look Like
Before putting the terms in order, put them side by side one more time. The button below opens the tank-level process you have used since Lesson 4 — the same loop as tuning exercise 1 — in its own tab. This lesson tab stays open behind it, so just switch back when you're done.
Run the same disturbance three times — P-only, then PI, then PID — and watch what changes.
What You Should See
These are the measured results for that exact disturbance — outflow demand stepped from 50% to 70% — on this process:
| Structure | Where level ends up | Worst dip | Back on setpoint in |
|---|---|---|---|
| P-only Kp 3, Ki 0, Kd 0 |
43.3% — 6.7 points low, and it stays there | 43.3% | Never |
| PI Kp 3, Ki 0.3, Kd 0 |
50.0% — right on setpoint | 45.3% | about 53 s |
| PID Kp 3, Ki 0.3, Kd 1 |
50.0% — right on setpoint | 45.4% | about 54 s |
Notice the offset only showed up when the load changed. On a level loop like this one, P-only will chase a setpoint change all the way in with no offset at all — it is the load change that forces the valve to sit somewhere new, and P alone has no way to get it there without an error to push on.
The Core of the Lesson
The Procedure
This is the part worth writing on the back of a notebook. It is the standard manual tuning sequence, and it works because it lets you see what each term is doing before the next one muddies the picture.
- Turn I and D off. Set Ki and Kd to zero. Start with P alone. Watching for: nothing yet — you are just making sure only one term is moving the output, so whatever you see next is P and only P.
- Bring P up. Work it up until the loop answers a setpoint change briskly and then stops swinging on its own. Watching for: the PV coming up smartly and settling out. If it keeps swinging back and forth instead of settling, you have gone too far — back it off until the swinging stops, then take a little more off.
- Add I. A little at first, then more, until the offset is gone and the measurement lands on setpoint and stays there. Watching for: the last bit of gap closing up. Too much and the PV starts sailing past setpoint and cycling slowly back and forth — that is integral winding the output further than it needed to.
- Add D last, if at all. Only on a slow, lagging process, and only if the measurement is clean. Watching for: less overshoot on the way in. If the output starts twitching or chattering, the signal is too noisy for D — take it back out.
You will hear this step taught as "turn P up until it oscillates, then back off." That is the classic wording and you should recognise it. But deliberately driving a live process into oscillation is not something to do casually on running equipment — on a real unit that can trip something. Come up in steps, stop when the response is brisk and settles on its own, and do not go hunting for the edge unless you know exactly what is downstream of you and the operator has agreed to it.
The Point of the Lesson
They Interact — Expect to Go Back Round
Here is the thing the four-step list does not tell you: changing one term changes what the others should be. You do not set three numbers once and walk away. You set one, move on, and then come back and fix the first one.
The Rule Worth Remembering
It works the other way too: on a process where derivative is genuinely doing something, adding D lets you get away with a bit more P than you could without it, because D is damping the approach that the extra gain would otherwise overshoot.
See It Happen
This demo uses the heater from Lesson 6 — a slow, lagging process, which is where this effect is clearest. Same process, same setpoint step, three runs. Only the tuning changes.
| Run | Tuning | What it does | Settled in |
|---|---|---|---|
| 1 | Kp 4, Ki 0 | Comes up and settles out with no real hunting — but parks about 4 points short of setpoint. A reasonable P-only tune. | stable, but never reaches setpoint |
| 2 | Kp 4, Ki 0.03 | Gets to setpoint — and then will not sit still. It crosses setpoint back and forth 18 times before it finally settles. P did not change. | about 520 s |
| 3 | Kp 2.5, Ki 0.03 | Same integral. Only P came down — and the hunting is gone: two crossings, then in. | about 280 s |
| 3b | Kp 2, Ki 0.03 | Down a little further again — cleaner still. | about 140 s |
This is why tuning looks like fiddling from the outside. It is not indecision. It is the loop telling you that the last change moved the target.
One More Thing
Which Algorithm Your Controller Uses
Back on page 2 you were told to check the PID form before trusting somebody else's numbers. Here is what that setting actually is. All three forms use the same three terms — what differs is how they are wired together, and that changes what your numbers mean.
- Parallel (also called independent) — three separate gains, Kp, Ki and Kd, each minding its own business. Turn the gain up and you have changed proportional only. This is the form the simulator in this course uses.
- Standard (also called ideal) — one overall gain out front multiplying all three terms, with integral and derivative set as times: reset and rate. Here, turning the gain up makes the integral and derivative action stronger too. Most DCS controllers use this one.
- Series (also called real or classical) — the rate section feeds the reset section instead of sitting beside it, so the two interact. This is how pneumatic and early electronic controllers physically worked, which is why a lot of old tuning numbers are in this form.