---
title: Feedback and control
url: https://doc.liz6.com/en/theory/02-control-theory/01-feedback-and-control
locale: en
area: theory
tags:
- Control theory
- Theory
date: 2026-09-10
modified: 2026-09-10
description: A heater holds 40 °C at 40% power while the room is at 20 °C. A window opens and the room falls to 10 °C. Will the same action still hold the target? An action's effect depends on the environment; feedback adjusts the action using the observed result. This chapter starts with arithmetic. The next derives the time evolution from energy balance.
---

# Feedback and control

A heater holds 40 °C at 40% power while the room is at 20 °C. A window opens and the room falls to 10 °C. Will the same action still hold the target? **An action's effect depends on the environment; feedback adjusts the action using the observed result.** This chapter starts with arithmetic. The next derives the time evolution from energy balance.

## Separate the target, action and result

Let $r$ be the target, $y$ the actual temperature, $y_m$ the sensor reading, and $u$ the heating duty ratio: 0 is off and 1 is full power. Define error as $e=r-y_m$. The controller maps observations into an action; the plant turns that action into a physical response.

<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 430" width="380" height="430" role="img" aria-labelledby="control-loop" data-diagram-theme="native" style="max-width:100%;height:auto;display:block;margin:auto"><title id="control-loop">Signals in a feedback loop</title><defs><marker id="control-loop-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M0 0L10 5L0 10Z" fill="currentColor"/></marker></defs><rect x="44" y="12" width="300" height="52" rx="8" fill="var(--reading-surface,#f3f5f9)" stroke="currentColor"/><text x="194" y="44" text-anchor="middle" font-size="16" fill="currentColor">Reference r</text><path d="M194 65v28" fill="none" stroke="currentColor" marker-end="url(#control-loop-arrow)"/><rect x="44" y="94" width="300" height="52" rx="8" fill="var(--reading-surface,#f3f5f9)" stroke="currentColor"/><text x="194" y="126" text-anchor="middle" font-size="16" fill="currentColor">Error e = r − yₘ</text><path d="M194 147v28" fill="none" stroke="currentColor" marker-end="url(#control-loop-arrow)"/><rect x="44" y="176" width="300" height="52" rx="8" fill="var(--reading-surface,#f3f5f9)" stroke="currentColor"/><text x="194" y="208" text-anchor="middle" font-size="16" fill="currentColor">Controller → action u</text><path d="M194 229v28" fill="none" stroke="currentColor" marker-end="url(#control-loop-arrow)"/><rect x="44" y="258" width="300" height="52" rx="8" fill="var(--reading-surface,#f3f5f9)" stroke="currentColor"/><text x="194" y="290" text-anchor="middle" font-size="16" fill="currentColor">Plant → output y</text><path d="M194 311v28" fill="none" stroke="currentColor" marker-end="url(#control-loop-arrow)"/><rect x="44" y="340" width="300" height="52" rx="8" fill="var(--reading-surface,#f3f5f9)" stroke="currentColor"/><text x="194" y="372" text-anchor="middle" font-size="16" fill="currentColor">Measurement yₘ = y + n</text><path d="M44 366H18V120H43" fill="none" stroke="currentColor" marker-end="url(#control-loop-arrow)"/></svg>

| Quantity or component | In this example | Distinction |
| --- | --- | --- |
| Reference $r$ | Desired 40 °C | A target is not a measurement |
| Plant | Heater, vessel and thermal process | The algorithm is not the whole plant |
| Actuator and $u$ | Applied heating duty | Requesting 120% cannot produce 120% |
| Measurement $y_m$ | Sensor reading | Bias and noise may be present |
| Disturbance | Ambient cooling or extra heat load | It need not enter through the controller |

Open-loop operation follows a predetermined action; closed-loop operation uses output measurements to revise it. Timed heating can be appropriate when its errors and operating conditions meet the task. Feedback adds sensing, computation and actuation, along with new failure paths.

## Why a fixed action stops working

Assume maximum heating power of 1000 W and heat-loss coefficient of 20 W/K. At equilibrium, heating equals heat loss:

$$1000u=20(y-y_a),\qquad y=y_a+50u.$$

With ambient $y_a=20$, $u=0.4$ gives 40 °C. With ambient 10, it gives 30 °C. This is the eventual equilibrium; temperature does not jump there when the window opens.

Keep a baseline $u_b=0.4$ and add proportional feedback:

$$u=u_b+K_p(r-y_m).$$

For accurate measurements, no saturation and $K_p=0.04\ \mathrm{K}^{-1}$, the new equilibrium satisfies $y=10+50[0.4+0.04(40-y)]$. Thus $y=36.67$ °C and $u=0.5333$. Feedback helps, but leaves 3.33 K error: proportional action needs that error to sustain the additional heating. [PID control](04-pid-control.md) introduces an integral state that can retain the correction.

**Feedback and control · Experiment**

Same 40 °C initial state; ambient changes at 100 s. Fixed action leaves an offset, P feedback reduces it, and exactly matched feedforward cancels the ambient change. Thermal capacitance 2000 J/K, loss 20 W/K, maximum power 1000 W.


Predict the final temperatures for all three strategies before changing the ambient temperature. Compare the temperature and action timelines. The model has thermal capacitance 2000 J/K, no measurement noise, and an ambient step at 100 s. Every strategy starts at 40 °C.

## Feedforward and feedback

If ambient temperature is measured and the equilibrium model is accurate, compute

$$u_{\mathrm{ff}}=\frac{20(r-y_a)}{1000}.$$

An ambient fall from 20 to 10 °C changes this action immediately from 0.4 to 0.6. It need not wait for an output error. This depends on accurate measurements, parameters and available power. If the actual heat-loss coefficient is 25 W/K, using 20 underestimates the necessary action.

A common combination is $u=u_{\mathrm{ff}}+u_{\mathrm{fb}}$: feedforward anticipates known changes; feedback corrects residual error. Neither automatically identifies sensor bias. Perfect cancellation in this experiment results from the exact match between the feedforward calculation and the plant model.

## Negative feedback is not a stability guarantee

For heating, a low measured temperature causes more heating, which raises temperature and opposes the original error. A cooling actuator requires a different controller sign. The entire chain determines feedback direction.

Time matters too. Old sensor readings and delayed actuators can make a controller keep correcting an error that has already changed. Later chapters separate feedback direction, stability and response quality. A delay-free first-order thermal plant with positive proportional negative feedback does not oscillate merely because its positive gain increases; an oscillation explanation must identify additional dynamics or delay.

Also separate **tracking** from **disturbance rejection**. Changing the target from 40 to 45 °C tests tracking. Keeping the target at 40 while cooling the room tests rejection. These signals enter different paths, so one reference-step test does not establish complete performance.

## Check your understanding

A sensor always reads 2 °C high. If feedback eventually makes its reading 40 °C, what is the actual temperature?

<details><summary>Reasoning</summary>

38 °C. Zero measured error only establishes agreement between the reference and the sensor. More gain cannot identify the bias; calibration or independent observations are needed.

</details>

With ambient 10 °C, a 1000 W heater and 20 W/K heat loss, can a stronger controller reach 70 °C?

<details><summary>Reasoning</summary>

The required power is $20(70-10)=1200$ W. Full power supports only 60 °C at equilibrium. Check feasibility before asking whether the error converges.

</details>

## Further reading

The [python-control cruise-control example](https://python-control.readthedocs.io/en/stable/examples/cruise-control.html) combines a plant, load changes, feedback and actuator limits. Transfer the modeling approach; the thermal parameters and calculations here are independently constructed.
