Lesson 5 — Integral Control

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

Lesson 5 · Objective

Integral Control

By the end of this lesson you'll be able to explain why integral control exists and, mechanically, what it actually does: it takes the error signal and accumulates it over time. That's the whole idea — not a new instantaneous reaction to error like proportional, but a running total that keeps growing for as long as any error remains.

Quick Refresher: SP, PV, CO

A fast recap of the three terms you've already seen in earlier lessons:

SP

Setpoint — the target value you want the process at.

PV

Process Variable — the actual, measured value right now.

CO

Controller Output — the signal sent to the final control element (the valve, the pump) to correct error.

Where We Left Off

Lesson 4's problem: a proportional-only controller always settles near setpoint, never exactly at it. That permanent gap — offset — never closes on its own, no matter how long you wait. Before we show you the automatic fix for that gap, you're going to try closing it by hand, the way operators always used to.
Try It Yourself

Manual Reset — The Real Dial

Before we get to the automatic fix, see how operators used to handle this problem by hand. It wasn't a mode switch: the controller stayed in Auto the whole time. Manual Reset was a dedicated bias setting, the same CO = Bias + Kp × Error baseline from Lesson 4, that the operator dialed in by hand until the offset closed. Below, the controller is already in Auto, P-only, with that bias sitting at 0% — dial it up yourself until the level lands exactly on setpoint.

Manual Reset
Auto, P-only, Kp = 3, Setpoint = 50%. Manual Reset (bias) starts at 0% — the level will settle well below setpoint. Click Start, dial Manual Reset up until PV lands exactly on setpoint (try around 65%), then try bumping the Outflow and see what happens.
🔧 Manual Reset
Watch for the catch: once you've dialed Manual Reset in and the level sits right on setpoint, drag the Outflow slider to a new value (try 35%). A brand-new offset appears immediately — your bias was correct for the old load, not the new one, and it has no way to follow. That's the real weakness of manual reset: it's a one-time fix for one specific load condition. Any time the load changes, you'd have to walk back over and dial it in all over again by hand — now watch the automatic version handle that continuously, no matter what changes.

Concept

What Is Integral Control?

You just watched manual reset solve the problem for one load — and then fail the instant that load changed. Integral control is how engineers automated that exact correction so it runs continuously, without anyone ever walking over and touching a dial again.

Where proportional reacts to how big the error is right now, integral reacts to how long error has been sticking around. It keeps a running total — think of it as the area under the error curve — and adds that accumulated total into the controller output.

CO
=
Bias
+
Kp × Error
+
Ki × ∫Error dt

That last piece — Ki × ∫Error dt — just means "Ki times the running total of error, accumulated over time." Don't let the ∫ symbol intimidate you: all it's saying is keep adding up error as time passes. The longer error sticks around, and the bigger it is while it's there, the bigger that running total grows.

SETPOINT (SP) ERROR (SP − PV) PROPORTIONAL Kp × Error INTEGRAL Ki × ∫Error dt SUM CONTROL VALVE PROCESS PV ✓ Proportional reacts to error's size right now — Integral reacts to how long it has stuck around

The Sum block adds the Proportional term, the Integral term, and bias together to produce CO — the two terms react to the same error signal in two very different ways.

Why this closes the offset: proportional's output depends only on error right now — the instant error hits zero, its contribution drops to zero too. Integral doesn't have that problem: even with error at zero, whatever it has already accumulated stays right where it is, still adding into CO. That's what lets CO settle at a nonzero value with zero error — something P alone could never do.

Concept

Ki: The Accumulator — and Why It's Called "Reset"

If Kp is a multiplier on error, think of Ki as a dial on how fast the accumulator fills. A bigger Ki means the same lingering error piles up into a bigger contribution faster; a smaller Ki means it takes longer for the same error to add up to much.

A Name From an Older Era

You'll sometimes see this term called Reset instead of Integral — on older controllers, in some industrial documentation, and in the tuning-unit name "repeats per minute." That's not a different concept, it's an older name for the exact same thing — and you've actually already done the manual half of that history yourself, a couple of pages back.

Where "Reset" comes from: on the Manual Reset exercise two pages ago, you played the operator — dialing the bias up by hand until the offset closed, then watching it break the moment the load changed. That wasn't just a simulation of an old idea; it's literally what "manually resetting" a controller meant on old proportional-only pneumatic controllers, decades before "integral" was a button on a screen. Offset never closed by itself, exactly like you just saw, so a human operator had to walk over and manually nudge the controller's output to kill the remaining gap — that manual nudge was the "reset." When engineers later figured out how to automate that same nudge — using pneumatic mechanisms that mechanically integrated error over time — they called the result "automatic reset." That automatic reset is exactly what the integral term does today. Reset and Integral are simply two names, from two different eras, for the same job you just did by hand.

That history is also where the odd-sounding tuning unit "repeats per minute" comes from (or its flip side, minutes per repeat, also called reset time, Ti = Kp ÷ Ki): it's literally counting how many times per minute the automatic action "repeats" the correction a human used to make by hand.

Reset Automatic Reset Repeats per Minute Reset Time (Ti)

Some controllers even let you switch the whole tuning display between styles — a "plain" view (P/I/D), a "gains" view (Kp/Ki/Kd), and an "industrial" view that shows Reset (and Rate, for the D term you'll meet in a later lesson) instead of the raw numbers. Same underlying math every time — just a different label on the same knob, exactly like proportional band was a different label for Kp back in Lesson 4.

The takeaway: whatever a controller happens to call it — Ki, Integral, Reset, repeats per minute — you're always adjusting the same thing: how aggressively the accumulator responds to error that's been hanging around.
Live Illustration

Side-by-Side: P Alone vs. P + I

Same setpoint step, same process, run through two controllers side by side — the only difference is whether Ki is zero or not. Watch where each one settles.

Setpoint (SP) Process Variable (PV) Offset
P Only
Settles below setpoint — offset remains, same as Lesson 4.
P + I
Walks the rest of the way in — settles exactly on setpoint.
This is the payoff. Both panels start from the exact same setpoint step and the exact same proportional response. The only thing added on the right is a small, steadily accumulating integral contribution — and that alone is enough to walk the process the rest of the way home and hold it there, with zero error, forever. That's the entire reason integral control exists.
Guided Exercise

Add Ki Yourself

The button below opens the real PID simulator in its own tab, already set up for this exercise — this lesson tab stays open behind it, so just switch back (or close that tab) when you're done.

Add Ki Yourself
Kp is fixed at 3 (P-only to start). Click Start, let it settle, then bump the Outflow to reproduce Lesson 4's offset — then type in the suggested Ki value and watch that gap close completely.
🎯 Add Ki Yourself
What to try: Kp stays locked at 3 the whole time — the only thing you're touching is Ki. Start it, bump the outflow, watch the familiar offset show up, then type Ki = 0.3 and watch it close.
Guided Exercise

Too Aggressive: When Ki Is Too High

Last page, Ki = 0.3 walked the level smoothly up to setpoint and held it there. That doesn't mean bigger is always better — push Ki too high and the same accumulator that closes offset so nicely can start working against you.

Here's why: the integral term keeps adding correction into CO for as long as any error remains, at a rate set by Ki. If Ki is too large, that correction piles on faster than the process can actually respond — by the time the level catches up to setpoint, the accumulator has already added way more correction than was needed, so the level sails right past it. Then the sign of the error flips, the accumulator starts unwinding the other way, and the whole thing overshoots again before it finally settles. That's the same oscillation risk you saw with Kp set too high back in Lesson 4 — just driven by the accumulator instead of the instantaneous gain.

Too Aggressive Ki
Kp is still fixed at 3. This time Ki starts at 1.5 — much higher than the 0.3 you just used. Click Start, let it settle, then bump the Outflow the same way as before and watch the response overshoot and oscillate instead of walking in cleanly.
🎯 Too Aggressive Ki
What to try: Kp stays locked at 3, just like last page — only Ki changed, starting at 1.5 instead of 0.3. Start it, bump the outflow the same way, and watch for overshoot and oscillation instead of a clean walk-in. Then back Ki down and watch the difference for yourself.
Live Demo

Tune It Yourself

The button below opens the real PID simulator in its own tab, already set up for this exercise — this lesson tab stays open behind it, so just switch back (or close that tab) when you're done.

Tune It Yourself
Free tuning, both Kp and Ki unlocked (Kd stays at 0 — no derivative yet). Step the Setpoint or bump the Outflow to create a disturbance, then explore how the two gains trade off against each other.
🎛 Tune It Yourself

The Core Idea

Saturation & Integral Windup

Back in Lesson 3, you learned about saturation — when the calculated controller output would exceed what the valve or pump can physically deliver, so the real CO pins at 0% or 100% no matter how much bigger (or smaller) the math says it should be. At the time, you were told there was a specific problem that saturation sets up for integral control. Here it is.

What Goes Wrong

Remember, the integral term doesn't care whether CO can actually act on the error — it just keeps adding error into its running total, every instant error exists. Now picture what happens while CO is saturated:

  • Error is large — the valve is already maxed out trying to correct it, but it isn't enough (or the process just hasn't caught up yet).
  • The integral term keeps accumulating that error anyway, growing bigger and bigger — even though CO is already pinned and literally cannot move any further to act on it.
  • Eventually the disturbance clears and PV starts catching up toward setpoint. But CO doesn't come off saturation right away — it stays pinned, because the accumulated integral total is still enormous and has to unwind first.
  • By the time CO finally does come off the limit and starts correcting normally again, PV has already sailed past setpoint — a bad overshoot caused entirely by that backlog of accumulated error the integral term built up while it couldn't do anything useful with it.

This whole phenomenon — the integral term over-accumulating during saturation, then causing a big overshoot once the actuator is freed up again — is called integral windup (or just "windup").

Recognizing windup on a trend
1. CO pins CO sits at 0% or 100% and stays there — the controller is asking for more than the actuator can deliver.
2. PV starts recovering PV begins heading back toward setpoint — the process is responding even though CO can't go any further.
3. CO stays pinned anyway CO doesn't back off — it stays pinned well after PV started moving the right way, and PV sails past setpoint. The accumulator built up a backlog while saturated and has to unwind before CO can come off the limit.

Part 3 is the tell. Parts 1 and 2 alone are just a saturated loop working hard — normal and healthy. It's only windup when CO refuses to back off after the process has already started recovering. A loop that's simply tuned too aggressively also overshoots, but its CO comes off the limit as soon as the error shrinks; a wound-up loop's does not. Same overshoot, different cause, different fix. Most modern controllers ship with anti-windup built in, so this shows up mainly in older or hand-written PID code and in cascade / split-range setups where the secondary is in manual.

PV / SP CO time → Setpoint PV 1. CO pins at 100% 2. PV starts recovering 3. CO still pinned — PV overshoots

On the next page, you'll watch this happen live.

Live Demo

Watch Windup Happen — and the Fix

The button below opens the real PID simulator in its own tab. This demo is click-driven — follow the steps below in order to see CO pin, the I-term run away past 100 with Anti-Windup off, then snap back the instant you turn it on again.

Watch Windup Happen — and the Fix
Start the sim, watch it settle, turn Anti-Windup OFF, step the setpoint to saturate CO, watch the I-term climb far past 100 — then turn Anti-Windup back ON and watch it snap instantly back to normal.
▶ Watch Windup Happen
What you're seeing: the I-term readout and trend trace are now live on this page. With Anti-Windup off, the accumulator is free to run past the 0-100 band while CO is pinned; turning Anti-Windup back on clamps it straight back — that snap is the fix working in real time, not just a description of it.

How Windup Is Generally Handled

Real controllers don't just let this happen unchecked — there are standard ways to stop it, and you just saw the simplest one demonstrated live above:

  • Anti-windup clamping — the integral accumulator is simply stopped (clamped) from growing any further the moment CO hits its saturation limit. It can still shrink if error reverses sign, but it can't keep piling up while CO is already maxed out and unable to act on it.
  • Conditional integration — a close cousin of the same idea: the controller only lets the integral term accumulate under conditions where doing so would actually still help (for example, only while CO is not saturated, or only while error is pushing CO further into the limit rather than away from it).

Either approach does the same basic job: keep the accumulator from building up a backlog it can't use, so there's nothing left to unwind — and overshoot — once the actuator comes free again.

Review

Review

Coming up in Lesson 6: we'll keep building on P and I — stay tuned for what completes the picture.