Setpoint, Process Variable and Error | Skill-Lync Resources
Easy Process Control Control Loop Analysis

What is the relationship between setpoint, process variable, and error in a control loop?

By the Skill-Lync engineering team · Last updated

Answer

Setpoint (SP) is the value you want, process variable (PV) is the value the sensor measures, and error is SP minus PV. The controller turns that error into an output that moves the valve or heater. A P-only loop leaves some error after a setpoint change, and integral action removes it.

What is the relationship between setpoint, process variable and error?

The setpoint (SP) is the value you want, the process variable (PV) is the value the sensor reports, and the error is the gap between them: e = SP − PV. The controller turns that gap into a controller output (CO), which moves the valve, heater or drive that pushes PV toward SP.

If PV equals SP the error is zero and the output holds. If they differ, the output moves. SP, PV and error share units, so a 10 °C error is simply 10 °C.

SignalSymbolWho or what sets itExample: heated water tank
SetpointSPOperator, recipe or a master controller70 °C
Process variablePVThe sensor and transmitter60 °C measured
ErroreThe controller, every scan70 − 60 = 10 °C
Controller outputCOThe controller algorithmSteam valve opening, in %

Only PV comes from the plant. See the elements of a feedback loop for the sensor, controller and final element around it, and open-loop vs closed-loop control for why the PV is fed back at all.

Is error always SP minus PV?

In most textbooks and controllers, yes: error is SP − PV. The catch is that vendors differ in how they describe the action, and some define direct and reverse action by what the output does when PV rises above SP. Check the manual of your controller before trusting a sign.

SourceWhat the document says
Michigan Tech CM3310, lecture 6u = Kc(yset − y) = Kce, where e is "the error signal"
Emerson DeltaV PID (Beall)Standard-form diagram labelled "Error = SP − PV"
Siemens PID_Compact (application example, 2017)The controller determines "the system deviation between setpoint and process value"; the control direction can be inverted, for example for cooling
Yokogawa YVP110 PID block (IM 21B04C01-01E)Direct Acting true: "The output increases when the input PV is greater than the setpoint SP." False: it decreases.

What do direct and reverse action mean?

Reverse action means the output goes down when PV goes up, which is what a heater needs. Direct action means the output goes up when PV goes up, which is what a cooling valve needs. Choose the one that opposes the deviation, otherwise the loop pushes PV away from SP.

The Yokogawa definition above is the cleanest test: with PV above SP, does the output rise (direct) or fall (reverse)? A steam valve on a tank heater must close when the tank is too hot, so that loop is reverse acting. A cooling-water valve on the same tank must open, so it is direct acting. The sibling page on direct and reverse acting controllers goes through more cases.

LoopPV rises, so the output should…Action
Steam or electric heater, temperature controlfall (less heat)Reverse
Cooling-water valve, temperature controlrise (more cooling)Direct
Inlet valve, tank levelfall (less inflow)Reverse
Outlet valve, tank levelrise (more outflow)Direct
Flow loop, valve opening raises the flowfall (close the valve)Reverse
Vent valve, pressure controlrise (vent more)Direct

Why does a P-only loop leave a steady error?

A proportional controller only produces an output change when there is an error. To hold a new output after a setpoint change, the loop must keep some error. For a first-order process that leftover error, the offset, is the setpoint change divided by (1 + KcKp), so it shrinks with gain but never reaches zero.

The Michigan Tech notes derive it: the closed loop gets a new time constant τp/(1 + KpKc) and reaches only the fraction KpKc/(1 + KpKc) of the setpoint. Offset is zero "only when KpKc → ∞", so P-only suits cases where some offset is tolerable, such as surge-tank level.

$$\text{offset} = \frac{\Delta SP}{1 + K_c K_p}, \qquad \tau_{cl} = \frac{\tau}{1 + K_c K_p}$$

Worked example: raising a tank from 60 to 70 °C

Take a water tank with inlet water at 35 °C. Each 1 % of steam valve adds 0.5 °C, with a 300 s time constant. At 50 % output it holds 60 °C. The operator moves SP to 70 °C. With P-only gain 2 %/°C the tank stops at 65 °C, 5 °C short.

These numbers are a teaching model for Skill-Lync's worked example, not a measured plant. The process gain is Kp = 0.5 °C per %, the bias (output at the starting steady state) is 50 %, and the transmitter spans 0 to 100 °C, so 2 %/°C is 2 % of output per % of span. With GAIN = 100/proportional band (Yokogawa YVP110 manual), the band is 50 %.

ControllerKcKpFinal PVOffsetFinal COτcl
P-only, Kc = 2 %/°C (band 50 %)165.0 °C5.0 °C60 %150 s
P-only, Kc = 8 %/°C (band 12.5 %)468.0 °C2.0 °C66 %60 s
PI, Kc = 4 %/°C, Ti = 300 s270.0 °C0.0 °C70 %150 s

Check the first row by hand. At 65 °C the error is 5 °C, so CO = 50 + 2 × 5 = 60 %. The tank then settles at 35 + 0.5 × 60 = 65 °C. The numbers agree, so the loop is in balance with the error still there.

Tank temperature after a setpoint step from 60 to 70 degrees C for three controllers 60 65 70 setpoint 70 0 10 20 time (min) PV (°C) P-only, Kc 2: settles at 65.0 P-only, Kc 8: settles at 68.0 PI, Kc 4, Ti 300 s: reaches 70.0
Tank PV after the setpoint moves from 60 to 70 °C at time zero. Quadrupling the gain cuts the offset from 5.0 to 2.0 °C but never removes it. The PI loop reaches 70 °C. Drawn from the closed-form first-order solutions used in the table.

How does integral action remove the error?

Integral action keeps adding to the output for as long as any error remains, so the loop can only rest at zero error. The Yokogawa controller manual says integral action "will automatically diminish the offset" that is "inherently unavoidable with proportional action alone".

In the example the PI loop ends at CO = 70 %, which is exactly what the tank needs to hold 70 °C (35 + 0.5 × 70). The integral term supplied the extra 20 % above the bias. The cost is a second dynamic term that can overshoot and wind up if the output saturates. See the purpose of integral action and proportional band and gain.

The same arithmetic holds when the cause is a disturbance instead of a setpoint change, since P-only needs a nonzero error to hold any output other than its bias. The regulatory vs servo control explainer covers how those two cases differ in tuning.

What happens if the action is wrong?

The error grows instead of shrinking. With direct action on the heater, a PV below SP lowers the output, the tank cools, the error rises, and the output runs to 0 %. The tank then heads to 35 °C, the temperature the inlet water gives with the steam off.

Try it: change SP, gain and action

Move the setpoint, change Kc, switch to PI, or flip to the wrong action.

Process variable (dashed = setpoint)

Controller output (%)

Loading...

Time axis 0 to 30 min. Explicit Euler, 1 s step, output limited to 0 to 100 %, same code as the table check.

Common interview follow-ups

Can the error be negative?
Yes. If PV is above SP, then e = SP − PV is negative. A reverse-acting controller then lowers its output, a direct-acting one raises it.
Are SP and PV in engineering units or percent?
Either, depending on the system. Yokogawa defines the proportional band as the input change, as a percent of span, that moves the output from 0 to 100 %. That is why gain and band are quoted per percent of span.
Why not simply raise the gain to remove the offset?
Because offset is zero only as KpKc goes to infinity. Michigan Tech's notes add that a large Kc amplifies measurement noise.

Related questions and resources

Simulate and tune control loops yourself

Skill-Lync's MATLAB course covers the scripting and Simulink skills used to build loops like the tank above. The free Control Systems book walks through the same closed-loop algebra.

View the course
Master These Concepts with IIT Certification
IIT Certified

Master These Concepts with IIT Certification

175+ hours of industry projects. Get placed at Bosch, Tata Motors, L&T and 500+ companies.

Relevant for Roles

Instrumentation Engineer Process Engineer Operator