Skip to content
Nalanda

engineering / ConceptENG-CN-024demonstrated-principle

Feedback control

feedback control measures the gap between what a system is doing and what it should do and acts to shrink that gap, but too much action or too much delay makes the gap oscillate instead of closing.

Essence

a household thermostat is the crudest controller, all-or-nothing; make the correction proportional to the error instead and a new art appears, acting hard enough to correct quickly without overshooting into a hunt.

Requirement

Hold a system at a target despite disturbances you cannot predict. An oven must sit at its set temperature while the door opens and the kitchen cools; a motor must hold speed as its load changes; a shower must stay warm while a tap runs elsewhere in the house. The disturbances arrive on their own schedule, so no plan of action fixed in advance can hold the target. The design answer is to keep measuring: compare what the system is doing against what it should be doing, and act on the gap.

One boundary is drawn before anything else. The feedback-loops entry owns the anatomy of the loop itself: balancing versus reinforcing loops, the thermostat as the household story, and the qualitative intuition that delayed correction produces hunting. That material is imported here by pointer, without retelling. This entry's burden begins where that one hands off: how strongly to correct, what a chosen strength costs in standing error, and where stronger correction tips into oscillation. The loop is borrowed; the numbers are new.

Variables

Five quantities run the whole analysis. The setpoint S is the value the system should hold, here a temperature in degrees. The measured value T is what the sensor reports. The error e = S - T is the gap between them, positive when the system sits below target. The control action u is what the controller does about the gap, here the number of degrees the actuator adds in one time step, negative values meaning it cools instead of heats. The gain K is the controller's aggressiveness, the degrees of action applied per degree of error. The delay is how stale the measurement is when the controller acts on it, counted in steps: a delay of one means each step's action is computed from the reading taken one step earlier.

Design choices

The simplest law that grades its response is proportional control:

u = K e

A large gap draws a strong push, a small gap a gentle one, a closed gap nothing. The household thermostat, by contrast, is on-off control, the crudest possible gain: full power below the setpoint, none above. The proportional controller is its refinement, a dial in place of a switch.

Two consequences follow from the law itself, and both are worth deriving before naming.

The standing error comes out of one line of algebra. Suppose the system leaks heat at a constant d degrees per step, a door left ajar. In steady state the correction must replace exactly what leaks, so K e = d, which forces e = d / K. The loop settles d / K degrees below its setpoint and stays there, because under pure proportional action zero error means zero action, and zero action cannot fight a constant drain. Control engineers call this droop, or steady-state offset. Raising the gain shrinks it; nothing in the proportional law removes it.

The stability trade is the price of that raise. A higher K corrects faster, but a controller acts on the information it has, and when that information is stale the strong push lands on a system that has already moved. The over-corrected loop passes its setpoint the way a mass on a spring passes equilibrium, the corrective action playing the restoring force and the error the displacement. The analogy breaks at the source of the momentum: the oscillator coasts through equilibrium on stored kinetic energy, while the loop has no inertia at all and overshoots purely because it acts on old news. Whether the resulting swing dies out or grows depends on how the gain compares against the delay, and that is a numerical question. The next section constructs the answer rather than asserting it.

Worked example

Take a bath whose actuator can heat or cool, shifting the temperature by u degrees each step, with a sensor reading that arrives one step old. The setpoint is S = 60 degrees and the bath starts at 50, so the error starts at 10. Each step the controller computes u = K times the error measured one step earlier, and the temperature moves by u. For the opening step the stale reading equals the current one, since the bath has been sitting at 50 for a while.

At a modest gain, K = 0.2:

step T (degrees) e = 60 - T action u applied
0 50.0 10.0 2.0
1 52.0 8.0 2.0
2 54.0 6.0 1.6
3 55.6 4.4 1.2
4 56.8 3.2 0.88
5 57.68 2.32 0.64
6 58.32 1.68 ...

The error shrinks every step and the loop closes on 60 without crossing it. The stale reading costs a little speed and nothing else.

Now re-trace the same bath, same one-step delay, at K = 1.5:

step T (degrees) e = 60 - T action u applied
0 50.0 10.0 15.0
1 65.0 -5.0 15.0
2 80.0 -20.0 -7.5
3 72.5 -12.5 -30.0
4 42.5 17.5 -18.75
5 23.75 36.25 26.25
6 50.0 10.0 ...

Read step 1 closely: the bath is already 5 degrees above target, yet the controller, still holding the step-old reading of 10, heats hard a second time. From there every big push lands after the gap has changed sign, and each correction feeds the swing it meant to kill: the error runs 10, then -5, -20, -12.5, 17.5, 36.25, and though it does not grow at every single step, its swings from one extreme to the other, +10 to -20 to +36.25, widen without settling. The delay is what does the damage. On a fresh reading the same K = 1.5 would over-correct and cross the setpoint, yet each crossing would shrink, since the error would flip sign and drop to half its size every step. Stale information is what turns over-correction into growth. The constructed behavior has a name, instability, and the widening swing around the setpoint is oscillation.

Failure modes

Instability from excess gain or delay is the failure the table just built: for a given delay there is a gain ceiling, and for a given gain there is a delay the loop cannot survive. Tuning a controller is finding that boundary and staying inside it with margin.

Acting on a noisy measurement is the quieter failure. The proportional law amplifies whatever the sensor reports, noise included, so a reading that jitters produces an action that jitters K times harder. The sensors entry makes the floor concrete: a sensor resolves real change only above its noise floor, and a controller tuned hot will chase phantom errors the measurement invented below that floor, wearing the actuator and disturbing the very quantity it guards.

Limits and boundary conditions

This is a conceptual, proportional-only treatment on a stepwise model; real plants respond continuously and carry lags of their own. The droop derived above is permanent under pure proportional action, and removing it takes integral action, which accumulates the error over time. Anticipating a swing before it grows takes derivative action. Deciding stability for a general plant, rather than for one traced table, takes the dynamic machinery of Laplace transforms and transfer functions. All of that is deferred to the later control entries; nothing here licenses a stability verdict on a system you have not traced.

Build with it

Design a proportional controller of your own. Pick a temperature target and start the system 10 degrees below it. The plant: the actuator shifts the temperature by u degrees per step, and the measurement the controller sees is two steps old, one step staler than the worked example. Choose a gain. Predict, before tracing anything, whether the loop settles, overshoots and then settles, or oscillates, given that delay. Then verify by hand-tracing the loop for at least eight steps at your chosen gain and delay, with the same table discipline as above. If it oscillates, apply one stated remedy, either lower the gain or act on a fresher measurement, and re-trace. Success: the trace confirms your predicted behavior, and the applied remedy demonstrably stops the oscillation in the re-trace.

Primary sources and further reading

  • Norman S. Nise, Control Systems EngineeringStandard undergraduate text; develops proportional control, steady-state error, and the stability analysis this entry treats conceptually.
  • Karl J. Astrom and Richard M. Murray, Feedback Systems: An Introduction for Scientists and Engineers (2008)Introduction to feedback for non-specialists; source for the gain, droop, and delay-instability trade in plain terms.
Feedback control · Nalanda