PID loops that will not settle
A loop that will not settle is usually not a tuning problem. A valve that does not move where it is told. A measurement that arrives late. A controller executing too slowly, or an integral term with nowhere to go. Change gains on top of any of those and you get a loop that is badly tuned for a reason you still have not found.
This page covers what shows up most often on a running plant: startup overshoot, reset windup, dead time, an autotune that never finishes, and the arithmetic of proportional band and reset units that makes people copy the wrong numbers from one controller into another. Check the valve, the measurement, and the scan rate first. Then tune.
Why does my temperature PID overshoot the setpoint on every startup, and how do I stop it?
Startup overshoot is usually reset windup during heat-up, not bad gain. The integral keeps accumulating while the heater sits pinned at 100%, and all that stored action has to be spent above setpoint before the output comes back down.
On a cold start the error is large and the output saturates at 100%. The process still moves at its own pace. Meanwhile the controller adds that error to the integral every scan, so by the time the process value reaches setpoint the integral holds enough action to keep the heater on well past it. Retuning for startup is the wrong fix. It buys a sluggish loop for the rest of the run. One exception: a loop that also overshoots on a small setpoint step once it is hot really does have too much gain, or too little derivative on a lag-dominant process.
- Ramp the setpoint. If the output never pins, the cause is gone rather than compensated for. On an electric heater 2 to 10 °C/min is a workable place to start, but the test is whether the output stays off the 100% stop, not the number.
- Use setpoint weighting on the proportional term. Lower the weight toward 0 and the kick on a setpoint change shrinks, while load rejection stays where it was. Siemens PID_Compact calls it PWeighting.
- Use cutback if the controller has it. On Eurotherm, cutback high and cutback low are entered in display units and set how far out from setpoint the output starts backing off. Overshoot, raise cutback high. Undershoot, raise cutback low. Left on Auto, several Eurotherm models compute them as 3 × the proportional band. Other vendors sell the same idea as an approach band, overshoot suppression, or an anti-reset-windup band.
- Lengthen integral time. 60 s to 120 s halves the rate the integral fills during heat-up.
- Make derivative act on process value, not error. In Siemens PID_Compact that is DWeighting = 0.0.
If the loop holds setpoint cleanly once it is there and only overshoots on the way up, the gains are fine. The trip is the problem.
What causes integral (reset) windup, and how do I stop the PID from overshooting after the valve has been pinned wide open?
Windup is the controller integrating error while the final element is already at its limit. The integral grows to a number the valve can never act on, and it comes back as overshoot before the output leaves the stop.
The integral is a running sum. It knows nothing about the actuator. A valve already at 100% has nothing left to give, and the block keeps integrating anyway unless something stops it.
- Back-calculation, sometimes called integral tracking. The block feeds the limited output back into the integrator. Tracking time constant Tt is usually set equal to Ti on a PI controller, or to √(Ti × Td) on a full PID.
- Conditional integration. Freeze the integral whenever the output is at a limit and the error would drive it further into that limit.
- Real output limits. If the valve is mechanically stopped at 80%, set the controller's output high limit to 80%, not 100%.
- Cascade tracking. A master whose slave is in manual or on local setpoint will wind up unless it tracks the slave through an external-reset or back-calculation input.
Most complaints that look like windup never reach the algorithm. Output at 100% with no response usually means the valve is not moving. Packing friction. A positioner out of calibration. Air supply below the actuator's bench range. A hand block valve someone closed. Check stem position against controller output before you touch a gain. Output at 100% and the stem at 60% is not a tuning problem.
Why does dead time make a control loop go unstable, and how much gain do I have to give up?
Dead time adds phase lag and attenuates nothing. The loop reaches 180° of lag with full gain still in hand, and the gain you can use falls roughly in inverse proportion to the delay.
A pure delay of θ seconds has an amplitude ratio of 1.0 at every frequency and a phase lag of ωθ. It hits −180° at ω = π/θ with no loss of magnitude at all. For a pure dead-time process under proportional-only control, sustained oscillation occurs at a controller gain of Kc = 1/Kp with a period of 2θ. Real processes add lag on top. The dependence still holds: the Ziegler-Nichols open-loop PI rule is Kc = 0.9τ / (Kp × θ), dead time in the denominator, so doubling it from 10 s to 20 s halves the usable gain and stretches the closed-loop response out in proportion.
- θ/τ below 0.2 — lag dominant. PI control is easy and tolerant of sloppy numbers.
- θ/τ near 1 — the practical limit for an ordinary PID.
- θ/τ above 1 — dead-time dominant. Tuning buys very little. A Smith predictor or a physical change is the real answer. The Smith predictor only helps while its model of the process stays close; let the gain or the delay drift away from the model and it does worse than the PID it replaced.
Much of the dead time in a loop is installation, not chemistry. That part is cheaper to remove than to tune around. A transmitter moved closer to the point of action, a shorter sample line, a faster analyzer cycle, a lighter thermowell, transmitter damping cut from 10 s to 1 s — any one of them buys more than a tuning change. The controller adds its own: a PID executing every 10 s adds up to 10 s of dead time, averaging half a scan. Transport delay down a long line is genuine process dead time. None of this touches it.
My Siemens PID_Compact autotune sits at "tuning in progress" and never finishes — how do I fix it?
Usually pretuning never started at all. The gap between setpoint and process value is too small: PID_Compact requires |Setpoint − Input| greater than 0.3 × |InputUpperLimit − InputLowerLimit| and greater than 0.5 × |Setpoint| before it will step the output.
Work through these in order. Watch Input, Output, State and ErrorBits on a trend, not the tuning dialog.
- Setpoint gap. With input limits of 0 to 200 °C the block needs 0.3 × 200 = 60 °C of gap, so pretuning from a process value of 20 °C needs a setpoint above 80 °C. The setpoint also has to sit inside the input limits. Too close and you get ErrorBits 0008h, error at start of pretuning, process value too close to setpoint, with the block telling you to run fine tuning instead.
- Start command. Pretuning runs when Mode = 1 is latched by a rising edge on ModeActivate, or from the commissioning dialog. Writing Mode without the edge does nothing and looks exactly like a hang.
- Call location. PID_Compact has to be called from a cyclic interrupt OB, OB30 by default, not from OB1. Called from OB1 the sampling time is not constant, tuning does not complete, and the block typically raises the sampling-time error 0800h.
- Unsettled process value. Pretuning waits for a stable PV before it steps the output. A drifting or oscillating PV leaves the block sitting at State = 1 with no error bit set. This is the one that looks most like a hang.
- Output limits. OutputUpperLimit and OutputLowerLimit have to match what the actuator can really do, or the step the tuner is waiting for never happens.
- Mode conflict. ErrorBits 0020h covers pretuning requested when it is not permitted, in automatic mode or during fine tuning. ManualEnable and Reset must both be FALSE.
- Download. Configuration edited in the editor but not downloaded to the instance DB leaves the block running the old values.
Check the clock against the process before you call it stuck. Pretuning on a vessel with a 30-minute time constant legitimately takes hours, and the block shows you nothing while it waits.
How do I convert proportional band to gain — is it really just 100 divided by PB?
Yes, when the band is stated in percent of span. A 25% band is a gain of 4, a 200% band is a gain of 0.5. No, when the controller states PB in engineering units.
100/PB holds only when the process value and the output are both in percent of their own spans. Eurotherm and many other temperature controllers state the band in engineering units instead, and then the divisor is the input span: Kc = span / PB. A controller ranged 0 to 1200 °C with Pb = 20 °C has a gain of 1200 / 20 = 60, not 5.
- Reset units are reciprocal. 2 repeats/minute = 0.5 minutes/repeat = 30 seconds/repeat. Entering "2" in a field that wants the other unit is off by a factor of 4 in this example and by more elsewhere.
- Seconds or minutes. Siemens PID_Compact takes Ti and Td in seconds, and Emerson DeltaV works in seconds per repeat. Allen-Bradley PLC-5 and SLC 500 PID instructions and many DCS blocks work in minutes per repeat.
- One vendor is not one convention. The ControlLogix PID and PIDE in dependent form take reset in minutes per repeat and rate in minutes. The same instruction in independent form takes Ki and Kd as gains, not times, so the numbers are not interchangeable between the two forms inside one processor. Read the form bit before reading the numbers.
- Dependent or independent form. In the dependent (ISA) form, gain multiplies the integral and derivative terms as well, so changing gain changes all three actions. In the independent form it does not. Numbers moved between the two forms without conversion are wrong by a factor of Kc.
Write the units beside every number before you move tuning from one controller to another. Most complaints that a replacement controller "tunes differently" are a units mismatch, not a different algorithm.
How do I tune a PID loop by hand if there's no autotune button?
Step test in manual. Read process gain, dead time, and time constant off the trend, then put those three numbers into a tuning rule instead of adjusting gains by trial and error.
Trial and error on live gains costs hours, and the numbers it produces do not survive the next process change. A step test gives you numbers that do.
- Put the loop in manual, let the PV settle, and record output and PV.
- Step the output far enough to see clearly above the noise, typically 5 to 10%, and wait for a new steady value.
- Process gain Kp = ΔPV% / ΔOutput%. A 10% output step that moves the PV 20% of span gives Kp = 2.0.
- Dead time θ is the time from the step until the PV first moves.
- Time constant τ is the time from first movement until the PV has covered 63.2% of its total change.
- PI tuning, SIMC or lambda: Kc = τ / (Kp × (λ + θ)) and Ti = τ, capped at 4(λ + θ). Setting λ = θ gives Kc = τ / (2 Kp θ), a starting point that survives a wrong estimate of τ. Increase λ to make the loop slower and safer.
- Ziegler-Nichols open loop PI: Kc = 0.9τ / (Kp θ), Ti = 3.33θ. About twice as aggressive as SIMC at λ = θ, and aimed at quarter-amplitude decay, which most plants find too oscillatory.
- Filter the derivative. Derivative on an unfiltered noisy PV puts the noise straight into the valve. A filter of Td/8 to Td/10 is standard, and most blocks apply one by default.
Run the step test at least twice, in both directions. If Kp differs by more than about 20% up versus down, the process is nonlinear or the valve has hysteresis, and no single set of gains will hold across the range. Leave derivative off on flow, level, and most pressure loops. Flow is fast and noisy; conventional starting numbers are gain 0.2 to 0.5 with reset 3 to 12 s. Temperature is where derivative earns its place, usually Td = Ti/4 to Ti/6.
When tuning a cascade loop, do you tune the inner slave loop or the outer master loop first?
Slave first, with the master in manual. Do not touch the master until the slave holds its own setpoint cleanly.
The master's process includes the slave. Tune the master first, then change the slave, and the master's tuning is no longer valid.
- Put the master in manual. Step the slave's setpoint and tune the slave as a standalone loop.
- Put the slave in cascade. Step the master's setpoint and tune the master against the response it now sees.
- The slave should be at least 3 times faster than the master, and 5 times or better is what you want. A jacket-temperature slave settling in 4 minutes under a reactor-temperature master settling in 30 minutes is a good ratio. Two loops that both settle in 2 minutes are not a cascade worth building.
- Tune the slave for speed, not smoothness: aggressive gain, short reset, no derivative. Some overshoot on the slave is acceptable because the master corrects it.
Check the windup path before you leave. Slave in manual, slave on local setpoint, slave output saturated: in each case the master has to stop integrating, through external reset, back-calculation, or whatever the block calls its tracking input. A master with no tracking path winds up every time an operator puts the slave in hand.
What's the best PID tuning software, and is a free PID simulator good enough to learn on?
There is no best. On one loop on one controller the limit is the quality of your bump test, not the software. A free simulator will teach you the shape of a response and nothing at all about what your valve does.
The paid packages buy scale and evidence, not better arithmetic. PlantTriage (originally ExperTune, later part of Metso and then Valmet), Control Station's LOOP-PRO, Emerson DeltaV InSight, and PiControl's PITOPS watch hundreds of loops continuously, rank them by the cost of poor control, and pull valve stiction out of closed-loop data without a bump test. 400 loops and no idea which 20 are hurting you: that is worth money. One heater loop is not.
- Free is enough to learn on. A first-order-plus-dead-time simulator teaches what gain, reset, and rate each do to a curve, and that is most of the education. A spreadsheet will do it. So will the Python control or simple-pid libraries, Scilab and Xcos, or a browser FOPDT tool.
- Better still, simulate in the controller you will deploy on. PLCSIM with PID_Compact, or Studio 5000 Logix Emulate with a PIDE, teaches the block's real parameter names, real units, and real quirks.
- What no simulator teaches: valve stiction, transmitter damping, a plugged impulse line, a heavy thermowell with a 60 to 120 s response, or an analyzer on a 4-minute cycle. Those are the reasons real loops do not settle.
Buy monitoring software when the problem is finding the bad loops among many. Do not buy it expecting it to tune a loop whose valve does not move.
How do I set the setpoint and deadband (differential) on a mechanical pressure switch?
Setpoint first, on the main range adjustment. Deadband second, on the separate differential adjustment. Verify both by cycling the switch with a hand pump, not by watching the process.
A mechanical pressure switch has two numbers: the actuation point and the reset point. The difference between them is the deadband, also called the differential. On a fixed-differential switch only the setpoint moves and the reset follows it. On an adjustable-differential switch the two adjustments interact. That is why the order matters.
- Kill power before the cover comes off. On a pump or compressor switch such as the Square D 9013FSG the terminals are at line voltage, 120 or 240 V, and they sit right where your hand goes for the adjustment nuts.
- Square D 9013FSG, the common pump switch: the large center nut is the range nut and the small nut is the differential nut. Turning the range nut clockwise raises cut-in and carries cut-out up with it, holding the differential roughly constant. The differential nut raises cut-out only, widening the differential. A factory 40/60 switch has a 20 psi differential. Adjustable range and differential vary by part number across the FSG family. Read the label on the switch in front of you rather than assuming a figure for the family.
- Industrial switches such as the United Electric 100 Series work the same way, with a main setpoint adjustment and, on adjustable-deadband models, a separate deadband adjustment. Adjustable deadband typically covers something on the order of 5 to 20% of the switch's setpoint range, and the exact numbers are on the datasheet for that type number.
- Verify with a pump, not the process. Isolate the switch, connect a hand pump and a calibrated gauge, raise pressure slowly until the contact changes to get the rising setpoint, lower it until the contact changes back to get the reset, and subtract for the deadband. Repeat at least 3 times. Do not take the hand pump above the switch's proof pressure.
Size the deadband wider than the normal ripple on the line. Otherwise the switch chatters and short-cycles the pump or compressor. If the trip point wanders between cycles by more than the manufacturer's repeatability figure, commonly around ±1% of range, the switch is worn and no amount of adjustment will hold it.
When this page runs out
If the valve, the measurement, and the scan rate all check out and the loop still will not settle, the problem has usually left the controller. An exchanger is fouling. A compressor is on recycle. Two loops are fighting over the same variable. Those are process engineering questions. Multivariable interaction, model predictive control, and open-loop-unstable loops such as exothermic reactor temperature are work for a control systems engineer with the process model in hand, and Bridges Industrial will say so rather than tune around them. SIL verification or a PE stamp on a safety instrumented function belongs with a functional safety consultancy. And if the loop lives inside a packaged skid still under warranty, the OEM's application engineer knows its interlocks better than anyone outside it will.
Reference material, not a site-specific engineering recommendation. Verify against your own procedures, permits, and the manual for the device in hand.