Proportional control and its limits
Act in proportion to the error: how the gain trades speed for stability, why a steady error can remain, and the ideas behind integral and derivative action.
40 min · Self-paced · Free
Gentler when close, stronger when far
When you park a bicycle against a wall, you do not ride at full speed and then slam the brakes. You slow down as you get closer. That is the intuition behind proportional control: make the action proportional to the error.
action = Kp · errorKp is called the proportional gain. It is a number you choose. A large gain means "react strongly to any error"; a small gain means "react gently". When the error is large, the action is large. As the error shrinks, the action shrinks with it, so the system eases into the set point instead of crashing past it — at least, that is the hope.
A model simple enough to compute by hand
To see what the gain does, we will use a deliberately simple model. A robot moves along a line. Its position is measured once per time step. At each step, the controller computes the error and moves the robot by Kp times that error. In symbols, with set point 100:
error = 100 − position
position_next = position + Kp · errorEach step closes a fraction Kp of the remaining gap. Start every run at position 0.
Kp = 0.5
step 0: 0.0
step 1: 50.0
step 2: 75.0
step 3: 87.5
step 4: 93.75
step 5: 96.875Each step halves the error. The robot approaches 100 smoothly and never overshoots. It is stable, but it takes a while.
Kp = 1.0
step 0: 0
step 1: 100It closes the whole gap in a single step. In this idealized model, that is perfect. Real systems are never this clean, as you will see.
Kp = 1.5
step 0: 0.0
step 1: 150.0
step 2: 75.0
step 3: 112.5
step 4: 93.75
step 5: 103.125Now it overshoots: it jumps past 100, then comes back too far, and so on. The swings shrink each time, so it does settle, but the motion is wobbly.
Kp = 2.0 and beyond
With Kp = 2 the position goes 0, 200, 0, 200, … forever: a sustained oscillation. With Kp = 2.5 it goes 0, 250, −125, 437.5, … — each swing is larger than the last. The system is unstable. A real robot doing this would hit its limits or break something.
What the example teaches
This toy model captures the central trade-off of feedback control:
- Low gain: stable and smooth, but slow.
- Higher gain: faster, but overshoot appears.
- Too high a gain: oscillation, then instability.
In real machines, the trouble usually comes from delay and inertia. A motor cannot change speed instantly, and a sensor reading is always slightly old. The controller is steering using a picture of the recent past, so an aggressive response arrives too late and too strongly. This is why the perfect Kp = 1 result is fragile: add a little delay to the model and it starts to overshoot too.
Try it yourself
The explorer below simulates a feedback loop. Raise and lower the gain and watch how quickly the response rises, how far it overshoots and whether it settles. Look for the gain where the response first starts to overshoot, and the point where it stops settling at all.
Explorer 02 — Feedback control
Measure, compare, correct
- Setpoint r = 1
- Closed-loop output
- Open loop (u = r/K)
- ±2 % band
Gains
Applies the command the model says is right, u = r / K, without ever measuring.
More controls
Plant
Like motor speed or an oven: τ·ẏ = −y + K·u. K = 1.
Real-world effects
Noise only affects the closed loop: the derivative term amplifies it.
- Rise 10–90 %
- 0.72 s
- Overshoot
- 0.0 %
- Settling 2 %
- 1.30 s
- Steady-state err
- 0.333
- theory r/(1+Kp·K) = 0.333
State
P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.
P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.
How to read this
The top panel shows the setpoint (dashed line at 1) and the plant's true output after a step command at t = 0. The solid line is the controlled system; the dotted line is open loop. The bottom panel shows the control effort u the actuator is asked to deliver.
Rise time is how long the output takes to go from 10 % to 90 % of where it ends up. Overshoot is how far it passes that value. Settling time is when it stays inside ±2 % for good. Steady-state error is the gap left at the end: P control always leaves one on these plants; integral action removes it.
Assumptions & limitations
- Linear plant models with known, constant parameters (K = 1). Real motors and heaters have friction, dead zones and parameters that drift with temperature and wear.
- Controller runs every 10 ms and holds its output between samples; the plant is integrated with 4th-order Runge–Kutta at the same step. There is no transport delay, which real systems almost always have.
- The derivative acts on the measurement (not the error) through a 50 ms low-pass filter, a common practical choice that avoids a spike when the setpoint jumps.
- Sensor noise is white Gaussian and seeded for repeatability; it is added only to the measurement, never to the true output.
- Metrics are computed on the true output up to the disturbance time (or 10 s); a response still moving at the end of the window is reported as not settled.
- Open loop uses the exact plant gain to pick its command. That flatters it: any modelling error would show up as steady-state error.
The stubborn leftover error
Now add something realistic: a constant disturbance. Suppose the robot sits on a slight slope, so that every step it slides back 5 units regardless of what the controller does.
position_next = position + Kp · error − 5With Kp = 0.5, where does the robot end up? It stops changing when the controller's push exactly cancels the slide:
Kp · error = 5
error = 5 / 0.5 = 10The robot settles at 90, not 100. A permanent gap like this is called steady-state error. It happens because a proportional controller needs an error to produce any action at all. If the error were zero, the action would be zero, and the slope would win.
Doubling the gain to Kp = 1 halves the steady-state error to 5. But, as we saw, raising the gain eventually causes overshoot and instability. Proportional control alone cannot remove the error completely.
Integral and derivative: the ideas
Engineers solved this long ago by adding two more terms. You will meet the details later; here is the intuition.
Integral action keeps a running total of past error. While even a small error persists, the total keeps growing, and so does its push. It only stops growing when the error is truly zero. This is what removes steady-state error: on the slope, the integral term gradually builds up exactly the push needed to hold the robot at 100. The cost is that a large stored total can cause overshoot of its own.
Derivative action looks at how fast the error is changing. If the robot is rushing towards the set point, the derivative term applies the brakes before it arrives, reducing overshoot. Its weakness is noise: a jittery sensor reading looks like rapid change, so derivative action is usually filtered.
Put together, the three terms form the PID controller — proportional, integral, derivative:
action = Kp · error + Ki · (sum of past error) + Kd · (rate of change of error)PID controllers are among the most widely used control algorithms in engineering, found in everything from drones and 3D printers to industrial processes. Choosing the three gains, called tuning, is a skill that combines mathematics, simulation and careful experiment.
Project
Paper or spreadsheet project: tune a controller
Using the model position_next = position + Kp · (100 − position) − d, explore by hand, with a spreadsheet, or with a short program:
- With d = 0, compute ten steps for Kp = 0.3, 0.8, 1.2 and 1.9. Plot all four on one graph.
- Repeat with d = 5. For each gain, predict the final position using error = d / Kp, then check your prediction against the computed values.
- Write a short paragraph recommending a gain, and explain the trade-off you made between speed, overshoot and steady-state error.
No hardware is needed for this project.
Deliverables
- A table or plot of ten steps for each gain, with and without disturbance
- Predicted versus computed steady-state values
- A justified gain recommendation in one paragraph
Knowledge check
Check your understanding
Go further
- MIT OpenCourseWare — 2.14 Analysis and Design of Feedback Control Systems ↗
A university course that develops these ideas with full mathematics. Useful as a map of where feedback control goes next.
Sign in to track your progress. Reading is free without an account.