Engineering & Inventions · Machines & robotics
Why automatic controllers overshoot and oscillate
A controller that corrects too hard, or on an out-of-date reading, swings past its target and back. Meet the three-term PID controller, the way engineers tune it and the failures no tuning can fix.

What you will learn
- Say what each of the three control terms does with the error
- Explain why proportional control alone leaves a standing offset
- State what causes a control loop to become unstable
- Predict what raising each gain does to overshoot, settling and stability
Lesson 1 of 4 · 6 min
How a ship's helmsman became the PID controller
In 1922 an engineer named Nicolas Minorsky was designing automatic steering for US Navy ships. He started by watching a helmsman. The helmsman didn't steer on the current course error alone. He also allowed for how long the ship had been off course, and for how fast the error was changing.
Minorsky turned those three habits into mathematics. The result is the PID controller, short for proportional, integral, derivative. It's now used to hold temperatures, pressures, speeds and practically any other quantity that can be measured.
A PID controller works from one number, the error. That's the gap between the value you want, called the setpoint, and the value a sensor measures, called the process variable. The controller responds to the error in three ways at once and adds the results to get its output, such as how far to open a valve.
The proportional term looks at the present. A large error now gives a large output. The integral term looks at the past. It adds up the error over time, so a small error that won't go away builds into a large push.
The derivative term looks ahead. It reads how fast the error is changing and pushes against that change, which damps the motion before it overshoots.
Each term has a gain, a number that sets its weight. Set a gain to zero and that term drops out. A PI controller, with no derivative term, is common, because derivative action is sensitive to noisy measurements.
Proportional control on its own has a flaw that's easy to miss. It needs an error to produce any output. If the error ever reached zero, the output would drop to zero too, and whatever was holding the process in place would be gone. So the loop settles a little short and stays there. That leftover gap is called the steady-state error, or offset.
Steam engines showed it first. James Watt's governor, a set of spinning steel balls on a spindle, became the industry standard for holding an engine's speed. Yet the speed still varied with the load. The heavier the load, the bigger the gap between the speed wanted and the speed delivered.
Minorsky met the same flaw at sea. Proportional steering held a course against small disturbances, but a stiff, steady gale left the ship off its heading.
The integral term is the fix. It keeps adding up the leftover error, and its push grows until the error is gone. Then it stops growing and holds, supplying the steady output that proportional action never could.
Try to recallA purely proportional temperature controller settles about two degrees below its setpoint and stays there. Why, and what removes the gap?
Proportional output is generated by the error. It's the error times a gain, so at zero error the heater would get no signal at all. The loop comes to rest at whatever error produces just enough output to hold the temperature, and here that's two degrees short. The controller isn't broken.
The integral term removes the gap. It adds up the error over time, so a lasting two-degree gap keeps raising the output. As the temperature climbs, the proportional share shrinks and the integral share replaces it. At zero error the integral term stops growing and holds.
Minorsky's controller went to sea on the Navy ship USS New Mexico. With the proportional and integral terms, the ship wandered about 2 degrees either side of its course. Adding the derivative term cut that to a sixth of a degree, better than most helmsmen could manage.
The Navy didn't adopt it, because the crews resisted. The idea outlived the objection. A PID controller reacts to the error now, to its past and to where it's heading.
Lessons in this topic
How a ship's helmsman became the PID controller
A PID controller reacts to how big an error is now, how long it has lasted and how fast it's changing. See what each of the three terms does, and why the first one alone always falls short.
Why a controller that pushes too hard starts to swing
A strong correction is fine. A strong correction based on an out-of-date reading makes a loop swing wider and wider. See why, and what raising each of the three gains does.
Tuning a controller by making it oscillate on purpose
The classic way to set a controller's three gains is to push the loop into oscillation and then back off. Follow the steps, the formula built on them and the risks.
The failures tuning can't fix
Windup, noise and step changes break a correctly tuned loop. Each has its own fix, and none of them is a gain.
Three quick stories from this topic
The helmsman in the controller
The three-term PID controller was worked out in 1922 from watching a ship's helmsman
Nicolas Minorsky noticed that a helmsman reacts to how far off course the ship is, how long it has been off, and how fast the error is changing. Those became the controller's proportional, integral and derivative terms.
It beat the helmsmen
In trials on USS New Mexico, two of the terms held the ship within 2 degrees of its course. Adding the third cut that to a sixth of a degree, better than most helmsmen could manage.
The Navy passed
The Navy didn't adopt the system, because personnel resisted it. The same three terms now regulate temperatures, pressures, speeds and flow rates across industry.
The torpedo's secret
An 1860s torpedo kept its depth with a pendulum its inventor named The Secret
The Whitehead torpedo's depth sensor alone proved inadequate. Set to react strongly, it overshot and became unstable. A pendulum that sensed the dive angle damped the swings, because the angle shows how fast the depth is changing.
Too much gain
Steering by depth alone was proportional control. With the gain too high it became unstable and overshot, so the torpedo couldn't hold a depth.
Derivative control before it had a name
The pendulum detected the dive or climb angle, and so the rate of change of depth. Reacting to that rate is what engineers now call derivative control.
Integral windup
A controller can overshoot its target because of error it stored while at full power
While a heater runs flat out toward a new setpoint, the controller's integral term keeps adding up the gap. That total can't make the heater work any harder. It holds the heat on after the target is reached, until the overshoot drains it.
It has to be paid back
The loop overshoots and keeps going until an error of the opposite sign unwinds the stored total.
Not a tuning problem
Suspend integration outside the controllable region, bound the total or back-calculate it. No choice of gains fixes windup.
Sources
- PID controller - Wikipedia, Wikimedia Foundation
- Control theory - Wikipedia, Wikimedia Foundation





