Lesson 13 of 2240 minutes

Open- and Closed-Loop Control

Start with the lesson question, connect the representations, and test the model with evidence.

controlopen loopclosed loopfeedbacksetpointmeasurementerrordisturbance

Learning objectives

  • Distinguish open-loop and closed-loop control.
  • Explain setpoint, error, gain, overshoot, and stability.
  • Tune and evaluate a simple feedback controller.
Lesson flowHook, model, explanationShow guidance

Inspect the opening phenomenon

Predict what changes, then name the evidence.

Apply in the lab

Name the evidence before reading the answer.

Read only what helps

Then use the lab and recall check.

More when needed

Transcript and resources stay available below.

Course progress

AI & Robotics Foundations · Feedback and Control · Lesson 13

Open- and Closed-Loop Control

In progress

Decision challenge

Observe the phenomenon. Then connect the representations.

Use the opening example to make a prediction, identify evidence, and explain which model supports it.

Can This Robot Correct Its Own Error?

Predict why the same timed command stops differently on tile and carpet.

Open-loop control acts without outcome feedback; closed-loop control measures error and corrects what it can observe and influence.

Before

Predict why the same timed command stops differently on tile and carpet.

During

Trace setpoint, measurement, error, command, and feedback.

After

Name one failure feedback cannot correct.

Reference drawerTranscript, source notes, scripts, and package status stay tucked away until you need them.6 files

Lesson reading

live

40 min

Video script

draft

Transcript fallback

available

courses/ai-robotics/modules/05-feedback-and-control/lessons/01-open-and-closed-loop-control/video-transcript.md

Compare Two Robot Stopping Controllers

draft

25 min

Mastery check

live

7 questions / 10 min

Transcript for accessibility and fallback

# Video transcript The same two-second drive command stops at different places on tile and carpet. Open loop sends a preset command without measuring final position, so a disturbance survives as error. Closed loop sets a target, measures position, and computes error as setpoint minus measurement. The controller updates its command, the robot moves, and the sensor closes the loop. Repeat until error and motion are within tolerance. Feedback corrects observed error—not every failure. Sensor bias, delay, actuator limits, and unobserved hazards can still defeat the system. If the sensor says 0.82 metres and the target is 1.00 metre, the signed error is plus 0.18 metre.

Reading lab

Core explanation

Connect the lesson's words, diagrams, graphs, evidence, and equations.

The same command, a different result

A small robot is told to drive for two seconds and stop at a green line. On a smooth floor it nearly succeeds. On carpet it stops short; after a gentle push it travels sideways. The command did not change, but the world did.

Predict: What information would let the robot correct while it is still moving?

Where this fits in your learning path

In the previous module, you learned to observe, record, and replay robot evidence. This lesson turns that evidence path into an action path: a controller uses a current measurement—not merely a log saved for later—to revise what the robot does next.

Follow this three-lesson progression:

  1. This lesson: decide whether outcome information closes the loop and compute signed error.
  2. Next: use proportional control to turn error into command, then reason about overshoot and stability.
  3. Then: combine proportional, integral, and derivative terms and tune them from evidence.

You do not need calculus or ROS 2 code here. Keep asking one question: does the measured outcome change the current command?

Open-loop and closed-loop robot control

Two information structures

An open-loop controller sends an action without using a measurement of the controlled outcome to revise that action. A timer-driven motor command is open loop with respect to final position.

A closed-loop controller measures an output, compares it with a desired value, and uses the difference to update its command. The loop repeats while the task runs.

ElementQuestionRobot example
SetpointWhat do we want?stop at position 1.00 m
MeasurementWhat do we observe?encoder estimate 0.82 m
ErrorHow far and in which direction?e = 1.00 - 0.82 = +0.18 m
ControllerWhat command follows from that error?keep driving forward
PlantWhat physical system responds?motors, wheels, chassis, floor
FeedbackWhat measurement returns?updated position estimate

The sign matters. If the measurement is 1.07 m, then e = 1.00 - 1.07 = -0.07 m; the robot has passed the target.

Worked comparison

Open-loop attempt:

  1. Command 40% motor effort for 2.0 s.
  2. A low battery reduces acceleration.
  3. The robot stops at 0.78 m.
  4. Nothing in the controller detects the 0.22 m error.

Closed-loop attempt:

  1. Set the target to 1.00 m.
  2. Measure position repeatedly.
  3. Compute error = target - measurement.
  4. Update the command until position and motion are within defined tolerances.

Feedback can reject some disturbances and model errors because their effects appear in the measurement. It cannot correct a failure that is not observed, arrives too late, saturates the actuator, or makes the measurement misleading.

Open loop is not automatically bad

Open loop can be appropriate when the environment is predictable, the action is brief, variation is harmless, measurement is unavailable, or a trusted lower-level controller already closes the relevant loop. A camera exposure pulse and a prevalidated gripper release may be open loop at one layer while motor current is closed loop underneath.

Closed loop is not automatically safe

A feedback loop depends on its sensor, estimator, timing, controller, actuator limits, and physical plant. Noise can make the command chatter. Delay can make correction arrive late. Excessive gain can cause overshoot or oscillation. A biased sensor can drive the robot confidently toward the wrong value.

Control structure is a claim about information flow—not a guarantee of accuracy or safety.

Retrieval practice

For each task, identify the controlled variable, setpoint, measurement, disturbance, and one unobserved failure:

  • a mobile robot stopping at a docking marker;
  • a robot arm holding a joint angle;
  • a fan running for five seconds to cool electronics.

Summary

  • Open loop does not use measured outcome to revise the current action.
  • Closed loop compares a setpoint with a measurement and acts on error.
  • Feedback helps only when the relevant effect is observable and timely.
  • One robot can contain nested open- and closed-loop decisions.
  • Evaluate the entire sensing–control–actuation path, not the label alone.

Sources and further study

Practice labCompare Two Robot Stopping ControllersOpen this when you are ready to apply the model, collect evidence, and check your explanation.25 min

Lab: Compare Two Robot Stopping Controllers

Objective

Compare preset-time and measurement-feedback stopping using a hardware-free table simulation.

Materials

  • Spreadsheet, calculator, or paper
  • Optional downloadable template: lab-worksheet.csv
  • Target position: 1.00 m
  • Time step: 0.5 s

Steps

  1. Open-loop trial: add 0.22 m each step for four steps. Record final error.
  2. Disturbed trial: use 0.16 m for step two, then 0.22 m. Record final error.
  3. Closed-loop trial: at each step measure position, compute e = 1.00 - position, and move by min(0.25, max(-0.25, 0.5e)) metres.
  4. Repeat with a −0.10 m disturbance after step two.
  5. Stop when absolute error is at most 0.03 m or after ten steps.
  6. Compare final error, number of updates, and maximum command.
  7. Add a +0.08 m sensor bias and explain why feedback may now converge to the wrong physical location.

Worksheet Columns

The downloadable CSV provides four trials and these columns: trial, step, start position, setpoint, measurement, signed error, unclamped command, applied command, disturbance, end position, and tolerance result. Keep metres in every position/error/command field. For the feedback trials, calculate signed_error_m = setpoint_m - measurement_m, then clamp 0.5 × signed_error_m to the interval [−0.25 m, +0.25 m]. Apply the listed disturbance once during that row.

Expected Result

The preset sequence changes little when error changes. The feedback sequence updates commands after observed disturbances, but sensor bias reveals that feedback cannot correct what it measures incorrectly.

Use the tolerance column to record yes only when abs(setpoint_m - end_position_m) ≤ 0.03 m. The nominal feedback trial should require multiple shrinking corrections rather than one full command, which makes the information loop visible in the table.

Reflection Questions

  1. Which variable was controlled and which signal closed the loop?
  2. Why did actuator limiting change convergence time?
  3. What safety check belongs outside the position controller?

Extension Challenge

Design a combined feedforward-feedback command and explain what each term contributes.