The short answer
PID Control for Pumps and Valves
PID control continuously calculates the difference between a setpoint and a measurement, then adjusts an output to close that gap. The proportional term responds to the size of the current error, the integral term eliminates the steady-state offset that proportional alone leaves behind, and the derivative term responds to how fast the error is changing. Most pump and pressure loops in water and wastewater run well with proportional and integral only.
Key points
- Proportional reacts to how far off you are. Integral reacts to how long you have been off.
- Derivative amplifies noise and is left off in most water and wastewater loops.
- Tune the process, not the number: know whether your loop is fast (pressure) or slow (level).
- Anti-windup and bumpless transfer are not optional extras on a real installation.
- Persistent oscillation is often a mechanical or measurement problem, not a tuning problem.
What the three terms do
- Proportional (P)
- Output contribution proportional to the present error. Larger gain means a stronger, faster response and a greater tendency to overshoot and oscillate. Proportional alone always leaves a residual offset, because zero error would mean zero output.
- Integral (I)
- Accumulates error over time and drives the residual offset to zero. This is what actually gets you to setpoint. Too much integral action makes the loop slow to settle and prone to overshoot after a disturbance.
- Derivative (D)
- Responds to the rate of change of the error, adding damping and anticipation. It also multiplies measurement noise, which is why it is usually zero on flow and pressure loops fed by real field transmitters.
Know your process before you touch a number
Loops fail far more often from a mismatch between tuning and process dynamics than from an arithmetically wrong constant.
| Loop type | Speed | Typical starting approach |
|---|---|---|
| Discharge pressure on a booster pump | Fast — seconds | Moderate gain, moderate integral, no derivative |
| Flow control with a valve | Fast — seconds | Low gain, fast integral; flow signals are noisy |
| Wet well or tank level | Slow — minutes | Low gain, slow integral; often averaging rather than tight control |
| Chemical dose paced to flow | Feed-forward dominant | Flow pacing with trim, not pure feedback |
| Temperature | Slow with dead time | Low gain, slow integral, derivative sometimes useful |
Level control deserves special mention because the instinct is wrong. Most wet well level loops do not want tight control. They want the level to drift within a band while flow out stays steady, which is easier on the pumps and the downstream process. Tuning a level loop as if it were a pressure loop produces a station that hunts constantly and wears out.
A practical tuning procedure
- 1
Prepare and get permission
Confirm with operations that you may disturb the process. Know how to get back to manual instantly. Record the existing constants before changing anything, because the loop you are about to detune was at least running.
- 2
Verify the measurement first
Trend the process variable in manual at a fixed output. If it is noisy, drifting, or stepping, fix that before tuning. No set of constants compensates for a bad signal, and you will chase your tail for an afternoon.
- 3
Start with proportional only
Set integral to its minimum effect and derivative to zero. Increase gain until a small setpoint change produces a response that overshoots slightly and settles. If it oscillates continuously, halve the gain.
- 4
Add integral
Introduce integral action gradually until the residual offset disappears within an acceptable time. Too fast and you will see overshoot returning; back it off.
- 5
Test against a real disturbance
A setpoint step is not the same as the disturbance the loop actually faces. Start another pump, open a valve, let the plant do what it normally does, and watch how the loop recovers.
- 6
Document what you did
Record the final constants, the date, the operating conditions, and what the loop was doing before. The next person will need this, and so will you in eight months.
Integral windup
When the output is saturated at 100% and the error remains, the integral term keeps accumulating even though more output is impossible. When the process finally responds, that accumulated integral has to unwind before the output comes back, and the loop massively overshoots.
This is exactly what happens when a pump is called to hold pressure while a downstream valve is closed. The loop winds up for minutes. The valve opens and the pump slams to full speed and stays there far too long.
- Enable anti-windup, output clamping, or back-calculation in the instruction — the name varies by platform, but nearly every modern PID block has it.
- Set the output limits to the real usable range. If the drive cannot run below 30 Hz, tell the loop that.
- Hold or reset the integral when the loop is not in control: pump off, drive in local, valve in hand.
Bumpless transfer
When a loop switches from manual to automatic, the controller must pick up from the current output rather than from whatever it last calculated. Without bumpless transfer, the output jumps the moment an operator hands control back, which teaches operators that automatic mode is dangerous and leaves the loop permanently in manual.
When it is not a tuning problem
Before another round of constants, rule out these. All of them look like poor tuning on a trend.
| Symptom | Likely cause | Check |
|---|---|---|
| Steady oscillation at a fixed period | Valve stiction, or gain too high | Step the output in manual and watch whether the valve moves smoothly |
| Output moves, process does not | Valve not stroking, drive in local, closed isolation valve | Trend output against actual position feedback |
| Fast erratic output | Noise on the measurement amplified by gain or derivative | Trend the raw process variable in manual |
| Loop wanders slowly and never settles | Integral far too slow, or an unmeasured disturbance | Look for another loop fighting the same process |
| Overshoots badly after every disturbance | Integral windup | Confirm anti-windup is enabled and limits are realistic |
| Two loops fighting | Interacting control, such as two pumps holding the same pressure | Take one to manual and see whether the other stabilizes |
Frequently asked questions
- Do I need the derivative term?
- Usually not, in water and wastewater. Flow, pressure, and level signals carry enough noise that derivative action mostly amplifies it. Derivative earns its place on slow processes with real thermal or transport lag.
- Why does my pressure loop oscillate only at low flow?
- Process gain changes with operating point. A pump and a system curve are not linear, so tuning that suits high flow is often too aggressive at low flow. Tune at the worst-case condition, or use gain scheduling if the platform supports it.
- Can I use one set of tuning constants for both pumps?
- If the pumps and drives are identical and piped symmetrically, usually yes. Verify by running each individually and watching the response, because impellers wear at different rates and a station rarely stays symmetric.
- What is the difference between proportional band and gain?
- They are reciprocals scaled by 100: proportional band equals 100 divided by gain. A gain of 2 is a 50% proportional band. Increasing gain and decreasing proportional band mean the same thing, which is why copying a number between platforms without checking the convention can invert your intent.
- Should the PID run in the PLC or in the drive?
- In the PLC for anything the plant depends on. The controller has the full process picture, the interlocks, and the historian. A drive-resident PID is convenient for a standalone booster but leaves the control strategy invisible to SCADA and difficult to change.
Related topics
- Deadband and HysteresisWhy a single setpoint chatters, how a deadband turns it into a start point and a stop point, how wide to make it, and where deadbands belong in alarms, level control, and controller outputs.
- Filtering Analog InputsHow to damp a noisy analog input in the controller without hiding a real process change: the first-order filter, the moving average, the median, where each belongs, and what never to filter.
- Distribution Pressure ControlHow a booster or high service pump station holds discharge pressure with variable speed pumps, how pumps are staged, and what stops the system hunting.
- How to Create a PID Loop in a PLCSet up a PID instruction from scratch: scale the PV and CV, pick the action, set the execution rate, configure limits and anti-windup, tune conservatively, and test the manual and auto transitions before it controls anything.
- 4-20 mA Current LoopsWhy the industry standardized on current instead of voltage, how a two-wire loop is powered, what the live zero buys you, and how to read a loop with a meter.
- Analog Scaling: Raw Counts to Engineering UnitsThe arithmetic that turns an analog card reading into feet, psi, or gallons per minute — plus the range mismatches that silently corrupt it.
Direct contact
Have a controls question?
Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.