TL;DR:
Open-loop control sends a command and hopes. Feedback control measures the result and corrects the command.
Disturbances such as a weak battery, a slope or a draft are what make open loop drift off target.
Open loop is fine when the system is predictable and an error is cheap. Add feedback when it is not.
A toaster and a heating thermostat both make heat, but only one of them knows what happened. Put your toast in a toaster and it runs for the time you set, whether the bread was frozen, whether the kitchen was cold, or whether the slot was already warm. A thermostat in a house behaves in a very different way: it watches the room and keeps changing what it does. That difference is the first big idea in control.
What each one does on a robot
In open-loop control the controller picks a command and sends it, without looking at the result. In closed-loop control, also called feedback control, a sensor measures the result, the controller compares it with the target, and the difference (the error) decides the next command. The signal travels in a loop: command, effect, measurement, error, command.
A robot is full of both. A robot that drives forward for two seconds at a fixed motor command is open loop. A robot that drives until its wheel encoders say 1 m has passed is closed loop, because the measurement ends the motion.
Sensors close the loop
The sensor is what makes a loop closed. Without it the controller cannot tell if the world followed its command. With it, the controller can notice that the robot is 10 cm short and do something about it. The price is extra hardware, extra code and the need to deal with the sensor's own noise and delay (see sensor noise and how to smooth it).
Feedback also brings risk. A loop with too much gain or too much delay can oscillate. That is why controllers such as the PID in tuning a PID controller step by step need tuning.
Worked example: a toaster timer vs a thermostat
The toaster (open loop). You set 120 seconds. The element heats the bread for exactly that time. If the bread is frozen, the toast comes out pale. If the toaster is already hot from the previous slice, it comes out dark. The timer has no idea. It only works well when everything stays the same each time.
The thermostat (closed loop). You set the room to 20.0 °C. The thermostat measures the temperature and turns the heater on when the room falls below 19.5 °C and off when it rises above 20.5 °C. The 1 °C gap is called hysteresis, and it stops the heater switching on and off every few seconds.
Open a window on a cold day. This is a disturbance, something that pushes the system away from the target without being part of the command. The room cools faster than before, so the thermostat sees 19.5 °C sooner and runs the heater longer. It does not know about the window; it only sees the temperature. A timer that ran the heater for 10 minutes every hour would just let the room get cold.
The same thing on a robot. You tell a robot to drive 1.0 m by running it at 0.5 m/s for 2 s. With a fresh battery that works. With a weak battery the speed is 0.45 m/s, so the robot travels 0.45 × 2 = 0.90 m, which is 10 cm short. With feedback from an encoder, the robot keeps driving until the measured distance reaches 1.0 m, and the battery no longer matters to the final position.
Disturbances
A disturbance is anything you did not command but which changes the outcome:
battery voltage dropping through the run;
a slope, a carpet, or a rough floor;
a heavier payload than you tested with;
wind on a drone;
one wheel slipping on dust.
Feedback exists to cancel the effect of disturbances you cannot predict. If you could predict every disturbance exactly, you would not need a sensor. In the real world you cannot.
When open loop is fine
Open loop is simpler, cheaper and cannot oscillate. Use it when:
the system responds in a known way, like a stepper motor driven well within its torque limit;
the task is short, so errors do not have time to grow;
a small error does not matter, like a robot's eyes opening a few milliseconds early;
a sensor would cost more than the problem is worth.
Many robots mix the two: they use open loop for coarse motion and feedback for the last bit, or they use feedback on the quantity that matters (position at the end) and open loop for the rest.
Where it goes wrong
Sensor error. Feedback trusts the sensor. A wrong reading leads to a confident wrong action.
Delay. If the measurement is old, the controller corrects a situation that no longer exists, and the loop can swing.
Saturation. If the motor is already at full power, the controller can ask for more and nothing happens.
Open-loop surprises. Open loop works until the day a disturbance appears, and then it fails with no warning.
Safety: A feedback loop with a faulty sensor can drive a motor harder and harder, because it never sees the target being reached. Put limits on the output, set a timeout so a motion that takes too long gets cancelled, and keep an emergency stop that cuts motor power without relying on the controller.
How real robots use it
A wheel controller that holds a set speed, a drone that holds a level attitude, an arm joint that holds an angle and a thermostat in a 3D printer's heated bed are all feedback loops. Small robots often combine them with a plan: a state machine chooses what the robot is doing (see state machines for robot behavior), and feedback loops carry out each step.
Try it yourself
Make the robot drive "1 m" in two ways. First open loop: run both wheels at a fixed command for a fixed time and measure the distance with a tape. Repeat with a charged battery and a tired one, and note the difference. Then use encoder counts to stop at 1 m. Repeat the battery test. The spread in your measurements shows what the feedback bought you.
Frequently asked questions
Is feedback always better than open loop?
No. It handles disturbances, but it needs a sensor, adds code, and can oscillate if tuned badly. When the system is predictable and errors are cheap, open loop is the better choice.
What is the error in a control loop?
The error is the target minus the measured value. It is the signal the controller uses to decide how much to correct.
