PID control

Proportional, integral and derivative action, offset, a driving picture of all three, and what good and bad tuning look like.

Control and automation, page 2 of 63 min readUpdated 4 November 2026All 6 pages

A PID controller works out how hard to act from three things: how big the error is now, how long it has lasted, and how fast it is changing. Proportional, integral and derivative. Most of the controllers holding temperatures, pressures and levels on board are PID controllers.

An interactive PID controller loads here. It needs JavaScript; the sections below explain everything it shows.

Proportional action

The output moves in proportion to the error: a big error, a big correction; a small error, a small one. On its own, proportional control leaves a small permanent error, the offset, because it needs some error to keep any output at all. Turn the gain up and the offset shrinks, but too much gain makes the loop overshoot and oscillate.

Integral action

The integral action adds up the error over time. As long as there is any error at all, it keeps moving the output a little further, until the error is gone. That removes the offset. Too much integral action makes the loop slow to settle and liable to overshoot.

Derivative action

The derivative action looks at how quickly the error is changing and acts against it, like easing off the throttle as you come up to the speed you want. It helps a slow process settle without overshoot. Because it reacts to rapid change, it also reacts to noise, so it is used carefully, often only on slow temperature loops.

Example: holding a set speed

You want to drive at 80 km/h. P: the further below 80 you are, the harder you press the pedal. I: if you are still a little slow after a while, you press a little harder, and keep doing so until you reach 80. D: as you approach 80 quickly, you ease off early so you do not shoot past it.

Tuning

Each action has a setting, and choosing them is tuning. A well-tuned loop answers a change quickly, settles with little overshoot and holds steady. A badly tuned one hunts, swinging up and down around the set point, or is so sluggish it never quite gets there.

On board: cooling water and lube oil temperatures, boiler drum level and pressure, fuel viscosity, and the speed governors of the engines all use some form of PID control.
Tuning in practice

Tuning means choosing three numbers: the gain, the integral time and the derivative time. Each one trades speed against stability, and a slow process with a delay in it, like most temperature loops, needs gentle settings.

SettingToo littleToo much
GainSlow, with a large offsetOvershoot, then hunting up and down
Integral (a shorter integral time is more)The offset takes a long time to goOvershoot and slow swings
DerivativeMore overshoot on a slow loopJumpy output that reacts to noise

A loop that hunts, swinging steadily either side of the set point, usually has too much gain or too much integral action for the delay in the process. Before retuning, check the obvious: a sticking valve or a faulty sensor makes a well-tuned loop hunt too.

Check yourself
1. Which action removes the offset left by proportional control?
The integral action.
2. Why is derivative action used carefully?
It reacts to fast change, so it also reacts to noise.
3. A loop keeps swinging above and below its set point. What is it called?
Hunting, a sign of poor tuning, often too much gain.

Going for your ETO CoC oral?

The full PID control notes (T07), the quiz bank and the questions MMD surveyors have actually asked, each with a model answer, are in the Elec-Buddy app.

Start your free trial

Sources

Where the figures on this page come from, by book and printed page or by regulation.

  • Åström, K.J. and Hägglund, T. Advanced PID Control (ISA, 2006), chapter 3, 3.2 The PID Controller: proportional action normally leaves a steady-state error, which falls but does not vanish as the gain rises, while the response grows more oscillatory (p.65-67); integral action makes the output agree with the set point in steady state, faster but more oscillatory as the integral time is shortened (p.67-68); derivative action as prediction of the error, improving stability (p.68-69); 3.3 Filtering the Derivative: an ideal derivative turns high-frequency measurement noise into large swings of the output (p.73).
  • Elec-Buddy notes: T07 Control Systems and PLC (proportional, integral and derivative action, offset, integral windup, tuning and hunting), T09 Ship Machinery (viscosity and temperature control loops, governors).
  • Drawn for Elec-Buddy: the driving picture is a teaching analogy for the three actions.
  • The lab is a teaching model, not a particular engine: the water temperature follows the valve with a lag of 20 s and a dead time of 4 s, and the numbers are chosen so the behaviour is easy to see. An automated test checks that it behaves as this page describes.