Skip to content
Tactiverge

Control systems

Setpoint and error

Also called: setpoint · reference · target · error signal · e = r − y

Definition

The setpoint (or reference) is the value you want; the error is the setpoint minus the measured value. Controllers act on the error.

Picture it

Positive error means 'not there yet, push up'; negative means 'gone past, push down'. Keeping the sign convention consistent across code, plots and gains avoids the classic bug where a controller runs away from its target.

The maths

e(t) = r(t) − y(t)
SI units used in this entry
QuantityUnitSymbol
ratiodimensionless1

Worked example

A greenhouse setpoint is 24 °C and the sensor reads 21.5 °C. What is the error? What is it if the reading is 25 °C?

  1. e = 24 − 21.5 = 2.5 °C (heat needed)
  2. e = 24 − 25 = −1 °C (too warm)

Answer2.5 °C, then −1 °C.

✓ The 2 numbers in this answer are recomputed from scratch by an automated test.

Common misconceptions

  • Misconception: Defining error as y − r flips every gain's sign.
  • Misconception: Changing the setpoint suddenly creates a large error spike, which derivative-on-error amplifies.