# Control and systems: feedback, stability and how machines are made to behave: Proportional, integral, derivative: what each action fixes and what it costs

Source page: https://www.materialinsights.org/learn/engineering/control-and-systems/p3/

[All courses](https://www.materialinsights.org/learn/) / [Understanding Engineering](https://www.materialinsights.org/learn/engineering/) / [Module 11: Control and systems: feedback, stability and how machines are made to behave](https://www.materialinsights.org/learn/engineering/control-and-systems/) Part 3 of 5

## Proportional, integral, derivative: what each action fixes and what it costs

Most loops in factories, cars and appliances use some mix of three simple actions: push back in proportion to the error, push according to the error's running total, and push against how fast the error is changing. No calculus is needed to understand them. What matters is what each one repairs, what each one breaks, and how to tell which is missing in a loop that misbehaves.

### 3.1 Proportional action pushes back in proportion to the error, so it is quick and simple but leaves a lasting gap

Proportional action says: the bigger the error, the harder I push. The ratio between the push and the error is the gain. The float valve and the governor are proportional controllers. So is a driver who presses the pedal harder the further below the speed limit the car has fallen.

Its virtue is speed. A high gain makes the loop respond briskly, because even a small error calls up a strong correction. Its flaw is the lasting gap you met in the tank and the governor. If a steady disturbance needs a steady push to counter it, a proportional controller can only produce that push by keeping a steady error. In words: the lasting error is roughly the disturbance divided by the gain. Doubling the gain halves the gap, but never removes it.

Cruise control shows the numbers. A car drives at 90 km/h and meets a 3 per cent upward slope. The pull of gravity along the road is the car's weight times the slope.

The last two rows carry the trade-off. Raising the gain tenfold cuts the gap to under 1 km/h and makes the loop nearly ten times faster, but the controller now demands 600 N for each km/h of error. Any throttle limit, sensor ripple or delay in the engine's response then becomes a problem, which is the subject of Part 4. Rows 4 and 5 also show something worth remembering: the car on its own is a slow system, with a time constant of about half a minute, and feedback makes it respond in seconds.

Data Worked estimate 3: a car's cruise control on a 3 per cent hill at 90 km/h

| Quantity | Working | Result |
|---|---|---|
| Extra force from the slope | 1,200 kg x 9.8 m/s2 x 0.03 | 353 N; at 25 m/s that is 8.8 kW of extra power |
| Power needed on the level at 90 km/h (25 m/s) | air drag 0.5 x 1.2 kg/m3 x 0.7 m2 x (25 m/s)2 = 262 N; rolling 0.01 x 1,200 x 9.8 = 118 N; 380 N x 25 m/s | 9.5 kW |
| No control (pedal held, engine power stays 9.5 kW) | solve 9.5 kW = speed x (air drag + 118 N + 353 N) | speed falls from 90 to about 59 km/h |
| How fast the net force changes with speed near 90 km/h | air drag rises by 2 x 262 N / 25 m/s = 21 N per m/s; engine pull at fixed power falls by 9,500 W / (25 m/s)2 = 15 N per m/s | 36 N per m/s |
| Car's own time constant | mass / that slope = 1,200 kg / 36 N per m/s | about 33 s |
| Proportional control, gain 60 N per km/h (216 N per m/s) | gap = 353 N / (216 + 36 N per m/s) | 1.4 m/s, 5.0 km/h; time constant 1,200 / 252 = 4.8 s |
| Gain ten times larger (600 N per km/h) | gap = 353 N / (2,160 + 36 N per m/s) | 0.16 m/s, 0.6 km/h; time constant about 0.55 s |

Assumed: drag area 0.7 m2, air density 1.2 kg/m3, rolling resistance coefficient 0.01, and engine power held constant when the pedal is held. Rows 4 to 7 use a straight-line approximation around 90 km/h, which is why they would put the uncontrolled speed nearer 55 km/h than the 59 km/h of the full balance. Every result is calculated. A 1,200 kg car on a long hill really does lose tens of km/h if the driver does nothing. Method for forces and power: Force, motion and energy.
 Source: Bloomfield, How Things Work (Wiley, 2015), ch. 2, 'The Laws of Motion, Part 2', section 2.2, 'Wheels', friction and power

- Bloomfield, How Things Work (Wiley, 2015) · ch. 1, 'The Laws of Motion, Part 1', section 1.1, 'Skating', force, mass and acceleration
- Bloomfield, How Things Work (Wiley, 2015) · ch. 2, 'The Laws of Motion, Part 2', section 2.2, 'Wheels', friction and power
- Kosky et al., Exploring Engineering (Academic Press, 2013) · ch. 8, 'Computer Engineering', section 8.5, cruise-control logic example

### 3.2 Integral action keeps adding up the error until the gap is gone, at the price of slowness and overshoot

Integral action keeps a running total of the error over time and pushes in proportion to the total. A small error that lasts is no longer ignored: its total grows, so the push grows, and the push stops growing only when the error is exactly zero. That is why integral action removes the lasting gap. On the hill, the car is slightly slow, the total builds, the throttle opens further and the speed creeps up to the set point. Then the error is zero and the throttle stays where it is, just enough to hold the hill.

Picture a shopkeeper who notes each evening how far the shelf is below its target and orders a little more each day, in proportion to the cumulative shortfall. The shelf will fill exactly. But orders still in transit keep arriving after the shelf is full, so he overshoots, and only then begins to order less.

That is the cost. The running total is a memory, and it must be paid down by an error of the opposite sign, so integral action always adds overshoot and slows the settling. Used alone it can make the loop swing.

A second cost is windup. If the actuator is saturated, as a throttle at full opening on a steep climb, the error persists and the total keeps swelling though more asking changes nothing. When the hill ends, the huge stored total holds the throttle open and the car surges well above the set speed until the total has drained. The cure is anti-windup: stop adding while the actuator is at its limit. Without it, a controller can recover from a long saturation slowly and violently.

So integral action trades accuracy for calm. Process plants use it nearly everywhere, because lasting errors in temperature, flow or level waste product and money. Where a gap of a few per cent is harmless, as in a float valve, it is left out.
 Common misreading

#### A controller that has reached the set point has not stopped acting

A reader may think that when the error is zero the controller has nothing left to do. With integral action that is wrong. At the set point the controller output is whatever the process needs to stay there, and it is the stored total that holds that value. On the hill, the throttle sits at a high steady opening even though the speed error is zero. If the hill changes, it is the error's reappearance that moves the throttle again. A zero error means no change is demanded, not no effort.

- Åström and Murray, Feedback Systems: An Introduction for Scientists and Engineers (Princeton University Press, 2008) · ch. 10, 'PID Control', https://www.cds.caltech.edu/~murray/amwiki/PID_Control.html, integral action and integrator windup

### 3.3 Derivative action reacts to how fast the error is changing, so it brakes early, but it magnifies noise

Approaching a red light, a driver does not wait until the light is reached. They judge how fast it is coming and ease off early. That is derivative action: a push that depends on the rate at which the error is changing, not on its size. If the error is shrinking fast, derivative action pushes against the correction, as if to say: you are already closing quickly, so ease off.

In the language of Vibration, waves and resonance in machines and structures, proportional action behaves like a spring, because the push depends on how far from target. Derivative action behaves like a damper, because it opposes motion. Adding it takes the swing out of a loop, much as a shock absorber stops a car bouncing. That is its fix: less overshoot, and a loop that can take a higher gain before it rings.

Its cost is noise. A sensor reading always jitters a little. The jitter is small in size but wild in rate, and the rate is what derivative action amplifies. The output then twitches, wearing valves and heating motors. Engineers filter the signal and keep the derivative setting small. Many process loops, such as flow and pressure, work well with proportional and integral action only, because their measurements are noisy and a little overshoot is harmless. Derivative earns its place where the process is slow and smooth, such as a large furnace, or where measurements are clean and fast, such as the shaft encoder on a robot joint.

A controller using all three is called PID. Setting its three numbers is called tuning, and it is done partly by calculation and partly by trial with the plant running. Newer methods, such as controllers that predict the next few seconds using a model, are used where PID struggles, but PID remains the workhorse. The table sums up the three.

Data The three actions side by side

| Action | Responds to | What it fixes | What it costs | Everyday picture |
|---|---|---|---|---|
| Proportional | size of the error now | speed of response; part of the gap | a lasting gap; rings if the gain is too high | float valve, driver pressing harder when slower |
| Integral | total of past error | lasting gap, completely | slower settling, overshoot, windup | shopkeeper ordering by cumulative shortfall |
| Derivative | rate of change of error | overshoot and ringing | amplifies sensor noise | driver easing off as the light nears |

Many loops use only P or PI. Each added action fixes one fault and creates another, so the choice is a trade-off, not a ladder of improvements.
 Source: Åström and Murray, Feedback Systems: An Introduction for Scientists and Engineers (Princeton University Press, 2008), ch. 10, 'PID Control', https://www.cds.caltech.edu/~murray/amwiki/PID_Control.html

- Åström and Murray, Feedback Systems: An Introduction for Scientists and Engineers (Princeton University Press, 2008) · ch. 10, 'PID Control', https://www.cds.caltech.edu/~murray/amwiki/PID_Control.html, derivative action and filtering
- Vincenti, What Engineers Know and How They Know It (Johns Hopkins University Press, 1990) · ch. 3, 'Establishment of Design Requirements: Flying-Quality Specifications for American Aircraft, 1918-1943', static and dynamic stability and oscillations that damp out
- Feynman, Leighton and Sands, The Feynman Lectures on Physics, vol. I (Caltech online edition) · further reading: ch. 21, 'The Harmonic Oscillator', https://www.feynmanlectures.caltech.edu/I_21.html

### Check your understanding

A proportional-only cruise control holds 5 km/h below the set speed on a hill. What is the simplest change that removes this gap completely?
 Integral action keeps adding up the error, so its push grows until the error is zero. Derivative action only reacts to change, and lowering the gain would widen the gap.

What is windup?
 While the actuator is at its limit the error persists, and the integral total keeps growing. When the limit ends the stored total takes a long time to drain, causing a large overshoot.

Why is derivative action used sparingly on a noisy flow measurement?
 Noise is small in size but fast in rate. Derivative action responds to rate, so it magnifies the jitter into large output changes.

[← Part 2: Sensors, actuators and on-off control: the hardware of a loop](https://www.materialinsights.org/learn/engineering/control-and-systems/p2/)[Mark read · Part 4: Stability, delay and hunting: how a loop goes wrong →](https://www.materialinsights.org/learn/engineering/control-and-systems/p4/)

## Other sections

- [Module overview](https://www.materialinsights.org/learn/engineering/control-and-systems/index.md)
- [Open loop and closed loop: measure, compare, correct](https://www.materialinsights.org/learn/engineering/control-and-systems/p1/index.md)
- [Sensors, actuators and on-off control: the hardware of a loop](https://www.materialinsights.org/learn/engineering/control-and-systems/p2/index.md)
- [Stability, delay and hunting: how a loop goes wrong](https://www.materialinsights.org/learn/engineering/control-and-systems/p4/index.md)
- [Systems and the machines of today](https://www.materialinsights.org/learn/engineering/control-and-systems/p5/index.md)
- [Key terms, quiz and sources](https://www.materialinsights.org/learn/engineering/control-and-systems/review/index.md)
