Skip to content
Tactiverge

School/◇ Explorer/Week 25

Open loop or closed loop?

A robot was told to roll exactly 40 wheel-turns to a door. On a polished floor it stopped a hand's width short. What was it missing?

About 25 min · 3 goals · Checked by automated tests; not yet reviewed by an educator

1.Why should I care?

Feedback is the idea that makes machines dependable in a messy world. Your fridge, a car's cruise control, a drone hovering in the wind: all of them measure the result of what they did and adjust. It's the most important idea in this term.

  • ◇ Explain the difference between open-loop and closed-loop control.
  • ◇ Identify the measured result that is fed back in a closed loop.
  • ◇ Calculate the gap between where a system is and where it should be.

2.Predict

Two kettles heat water. Kettle A heats for exactly 3 minutes. Kettle B heats until its sensor reads 100 °C. Someone fills both with very cold water. Which one boils?

Guess first. Being wrong here is how the surprise works.

3.Discover

Use only the proportional setting (leave any others at zero). Set a target and watch the measured output chase it. Change the plant or add a disturbance if the lab offers one, and watch the loop correct for it.

Explorer 02 — Feedback control

Measure, compare, correct

A controller compares the setpoint with what the sensor reports and pushes the plant to close the gap. Tune the gains and watch speed, overshoot and accuracy trade against each other.

OUTPUT y vs SETPOINT r0.00.51.0Ts 1.30sCONTROL EFFORT u0.02.0012345678910TIME (s)
  • Setpoint r = 1
  • Closed-loop output
  • Open loop (u = r/K)
  • ±2 % band
Controller

Gains

2.0
1.5
0.20

Applies the command the model says is right, u = r / K, without ever measuring.

Plant

Plant model

Like motor speed or an oven: τ·ẏ = −y + K·u. K = 1.

1.0 s

Real-world effects

0.000

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.
Can't use the interactive? Read a description instead

The feedback lab can be replaced by this description: a target value is set, and the system's measured output starts below it. Each moment, the controller pushes in proportion to the gap between target and output, so the output rises quickly at first and then more slowly as the gap shrinks. If something knocks the output down, the gap grows and the controller pushes harder until it recovers.

4.Watch

→ Watch for the arrow that carries the measurement back to the start: that arrow is the 'closed' part of the loop.

A clear whiteboard explanation of why feeding the measured result back into the controller beats acting from a plan alone.

Length: see YouTube · captions on YouTube · source

Nothing loads from YouTube until you press play.

5.Understand

Open loop: act from a plan

Open-loop control decides what to do in advance and never checks the result. A toaster on a timer, a robot told 'drive 40 wheel turns'. Simple and cheap, but if the world isn't exactly as expected, the result is wrong and nobody notices.

Closed loop: measure and correct

Closed-loop control measures the result and uses it to decide what to do next. The measurement is fed back, which is why it's called feedback. It's a sense–think–act loop aimed at a target.

The gap drives everything

The thinking step usually starts with one subtraction:

gap = target − measured value

Big gap: push hard. Zero gap: you've arrived. Negative gap: you've gone too far, so push back. The controller doesn't need to know why it's off, just how far.

Explain it another way

Walk to a door with your eyes shut, counting steps: open loop. Walk with your eyes open, adjusting as you go: closed loop. Eyes open wins every time someone moves the door.

Worked example 1

A robot wants to be 200 cm along a corridor. Its encoder says it's at 165 cm. What's the gap, and what should it do?

gap = 200 − 165 = 35 cm. Positive, so keep driving forwards. If it later reads 207 cm, the gap is −7 cm: it has overshot and should reverse a little.

Common mix-ups

  • Closed loop means the machine is switched off.
    ✓ It means information goes round in a circle: act, measure, feed back, act again.
  • Feedback needs to know what caused the error.
    ✓ It only needs the gap. Slip, slope or a push all show up the same way.

6.Practice

Practice, not a test. Wrong answers get a hint and another try.

Practice 1

Which of these is closed-loop?

Practice 2

A heater wants the room at 21 °C. The thermometer reads 17.5 °C. What is the gap (target − measured), in °C?

°C

Practice 3

A robot's target is 80 cm. It measures 86 cm. What is the gap, in cm? (It can be negative.)

cm

Practice 4

A closed-loop robot is pushed back 10 cm by a friend. What happens?

7.Apply it

Find two machines at home: one open-loop and one closed-loop. For the closed-loop one, name what it measures, what its target is, and what it changes to close the gap.

8.Reflect

Concepts: Open-loop and closed-loop control