Phase 01 · Week 3 · 90 minutes

Day 17: Open-loop versus closed-loop control

Dynamics and feedback · Why robots overshoot, oscillate, saturate, and fall over.

Chapter 03 · Dynamics and feedback

Today in the field story

One problem, then the next

The Cold-Storage Door Tuning incident began with a timed command that never checked the resulting position. Draw that open-loop path, then close it with a fresh measurement, target-minus-measurement error, and another bounded decision. Plant a reversed encoder sign and show how software that appears to subtract error can still create physically positive feedback.

Why now

PID only makes sense inside a correctly signed and repeatedly measured closed loop.

Ignore today

Ignore integral and derivative terms; establish a proportional baseline and stop condition first.

Unlocks next

A minimal feedback loop whose individual PID contributions can be inspected.

Understand

Build the physical picture first

Open loop is giving an instruction without checking the result. Closed loop adds a measuring path: request, act, measure, compare, correct, and repeat.

An open-loop controller chooses a command from time, a planned trajectory, or a model but does not use the measured output to correct the next command. It can be simple and fast, yet an unexpected slope, payload, low battery, or obstruction creates an error it cannot see.

A closed-loop controller measures the actual output y, compares it with the reference r, and forms an error such as e=r-y. Negative feedback chooses the command direction so that the next response tends to reduce this error. A wrong sensor sign or motor sign can turn that helpful loop into positive feedback that drives the error larger.

Feedback is not automatically safe or stable. The measurement can be noisy or late, the command can saturate, and the physical mechanism can respond much more slowly than expected. The loop must therefore include explicit units, sign conventions, timing, output limits, and a safe failure path.

Feedforward and feedback are partners, not enemies. A known model can request the effort likely needed for the planned motion, while feedback corrects remaining model error and disturbances. Week 3 uses simple feedback first so every signal in the loop remains visible.

Words you need

Name each idea precisely

Setpoint

The requested value the controller should track.

Physical example:

A wheel-speed setpoint of 0.5 m/s.

Measurement

The sensed estimate of the system's actual output.

Physical example:

An encoder-derived wheel speed of 0.42 m/s.

Error

A declared comparison between request and measurement, commonly e=r-y.

Physical example:

0.50-0.42=0.08 m/s of positive speed error.

Open-loop control

Command generation without measured output correcting the next command.

Physical example:

Running a motor for a fixed time and assuming it reached the intended angle.

Closed-loop control

Command generation that repeatedly uses measured output to reduce error.

Physical example:

Reading an encoder and adjusting motor effort until the joint reaches the target.

Visual model

See the relationship

Math, one line at a time

Work through today’s relationship

Prerequisite rescue · optionalChange over time and feedback

Velocity, acceleration, and control error explain whether a robot settles, overshoots, or becomes unsafe.

Δx/Δt
change in position divided by elapsed timeUnit: metres per second (m/s)
e = target − measured
control errorUnit: same unit as the target
u
bounded actuator commandUnit: device-specific
  1. A wheel moves from 1 m to 1.6 m in 0.2 s, so Δx = 0.6 m.

  2. Average velocity is 0.6/0.2 = 3 m/s.

  3. If the target is 2 m and measured position is 1.6 m, error e = 0.4 m; a controller converts that error into a limited command.

Programmer analogy

A feedback loop resembles an event loop that checks state repeatedly, but a missed deadline changes physical motion, not just screen responsiveness.

Position changes by 0.5 m in 0.25 s. What is average velocity?

0.5/0.25 = 2 m/s.

Closed-loop control first computes error, then a command:

e=ry=108=2 cm,u=Kpe=(0.5 command/cm)(2 cm)=1 commande=r-y=10-8=2\ \mathrm{cm},\qquad u=K_p e=(0.5\ \mathrm{command/cm})(2\ \mathrm{cm})=1\ \mathrm{command}

Trace two proportional feedback updates

A slider target is r=10 cm. Its first measurement is y=8 cm. Use e=r-y and a proportional rule u=0.5e, where u is a small simulated movement command in centimetres.

  1. Compute the first error: e=10-8=2 cm.

  2. Compute the first command: u=0.5×2=1 cm in the positive direction.

  3. After the simulated plant responds, measure again; suppose y becomes 9 cm.

  4. Compute the new error: 10-9=1 cm.

  5. Compute the new command: 0.5×1=0.5 cm.

  6. Confirm that the commands shrink as the measured output approaches the setpoint.

Result

The loop requests 1 cm, then 0.5 cm, because each fresh measurement reports a smaller error.

What this proves

Closed loop is a repeated information path, not one formula: measure again before deciding the next correction.

Physical examples

Where this appears in real life

Timed heater versus thermostat

A timed heater runs for five minutes regardless of room temperature; a thermostat measures temperature and switches based on the error from its setpoint.

Look for:

Open-loop timing cannot respond to an open window, while the closed loop detects the resulting temperature change.

Paper token placement

Slide a token once toward a target with your eyes closed, then repeat using small moves and a visual check after each move.

Look for:

The second method uses measurement to reduce error, but too-large corrections can still overshoot back and forth.

Hands-on exercise

Make the idea observable

Use a paper token, a ruler, and a target line 10 cm from the starting point. Keep every move manual.

  1. Run an open-loop trial: close your eyes, make one estimated 10 cm slide, then measure final error.

  2. Reset the token and declare e=target position minus measured position.

  3. Run a closed-loop trial using u=0.5e after each measurement.

  4. Stop after six corrections or when absolute error is at most 2 mm.

  5. Record measurement, error, and command for every step.

  6. Repeat with a deliberately reversed sign on paper only and explain why it would increase error; do not perform unsafe motion.

Observe

Correctly signed feedback usually reduces the error step by step, while the written reversed-sign sequence moves away from the target.

Done when

Your table distinguishes setpoint, measurement, error, and command, and you can point to the return measurement path in the visual.

Build today

Control a simulated pendulum or cart-pole; log setpoint, error, command, saturation, and settling time.

Evidence to save

DONE when a deterministic “Open-loop versus closed-loop control” failure test reports expected versus actual behavior and passes after the documented fix.

Common mistakes

Catch the wrong mental model

Wrong

Calling any automated command closed loop.

Better

It is closed loop only when measured output influences a later command.

Wrong

Assuming negative feedback from the minus sign alone.

Better

Verify the complete sensor and actuator sign chain; a reversed motor or encoder can make physical feedback positive.

Wrong

Believing feedback guarantees stability.

Better

Gain, delay, sampling, noise, saturation, and plant dynamics still decide the response.

Job connection

How this becomes employable evidence

Expose requested state, measured state, tracking error, command, freshness, and limit status so an operator can distinguish a bad request from a failed sensor or actuator.

Relevant target roles

  • Robot HMI / Control & Monitoring Engineer
  • Robotics Application / ROS 2 Integration Engineer

Chapter 03 interview drill

Interview questions: Open-loop versus closed-loop control

Practise a 60–90 second answer: define the idea, connect it to a physical robot, state assumptions, frames, and units when relevant, then finish with the failure signal or evidence you would inspect.

Primary interview scenario

Draw a wheel-speed feedback loop and explain how you would detect a reversed encoder sign before allowing full-power operation.

Answer shape: clarify the situation → trace the physical and software path → test the most likely boundaries → name the evidence that would confirm the result.

Technical follow-up questions

Q1What information closes a control loop?
Model interview answer

A measurement of actual output is compared with the request and influences a later command.

Q2Why can open loop work in one test but miss the target after a payload change?
Model interview answer

It does not measure and correct the different physical response caused by the new payload.

Q3What does a reversed sensor sign do to a correction loop?
Model interview answer

It can make a command increase the measured error, creating positive feedback and possible runaway.