Control mechanisms: open-loop and closed-loop

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Control mechanisms: open-loop and closed-loop

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A heater runs for exactly 30 minutes and then switches off, no matter how warm the room is. Which type of control mechanism is this?
A Open loop
B Closed loop
2. A thermostat compares the room temperature with the target and switches the heater on or off. Which type of control mechanism is this?
A Closed loop
B Open loop
3. Which statement about a feedback signal is correct?
A It sends information about the result back to the control mechanism
B It tells the system to ignore the result and keep going
4. Which system is open loop?
A A sprinkler that stops when a soil moisture sensor reads wet enough
B A sprinkler that waters the garden for 10 minutes every morning
5. What does a closed-loop control mechanism have that an open-loop one does not?
A A timer that runs for a set time
B A feedback signal from the result

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1timer.run(10) AThis is open loop, not closed loop. It runs for a fixed time and never reads the temperature, so there is no feedback signal.
2if temp < target: heater.on() BAn open-loop control: the heater runs for a set time and never checks the result
3A feedback signal is a measurement of the result that is sent back to the controller Cheater.on() and wait(600) and heater.off()
4An open-loop system acts for a set time or amount and does not check the result DA timer is open loop, but this code uses a sensor reading as feedback, which makes it closed loop.
5Thermostat (closed loop): heater.on() for 10 minutes, then heater.off() Etemp = sensor.read()
6Timer (open loop): if sensor.read() > 25: fan.off() FA closed-loop control: it uses the temperature reading as a feedback signal to decide what to do next

Definitions

control mechanism

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
heater = ON ____ 10 heater = OFF
2.
reading = readSensor() IF reading < ______ THEN heater = ON
3.
temp = readSensor() IF temp _ target THEN heater = ON
4.
WHILE temp < target DO heater = ON temp = __________()
5.
temp = readSensor() error = ______ - temp IF error > 0 THEN heater = ON

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A # Open loop: thermostat
B while True:
C temp = read_sensor()
D if temp < 20: heater_on()
Question 2
A timer = 600
B pump_on()
C sleep(timer)
D pump_on()
Question 3
A target = 22
B temp = target
C if temp < target:
D heater_on()
Question 4
A temp = read_sensor()
B if temp > 20:
C heater_on()
D else:
E heater_off()
Question 5
A target = 22
B temp = read_sensor()
C error = target - temp
D adjust(target)

Answer Key

Control mechanisms: open-loop and closed-loop
Section A: Quick Questions
Q1
A — Open loop
Q2
A — Closed loop
Q3
A — It sends information about the result back to the control mechanism
Q4
B — A sprinkler that waters the garden for 10 minutes every morning
Q5
B — A feedback signal from the result
Section B: Match the Pairs
Q1
timer.run(10) → An open-loop control: the heater runs for a set time and never checks the result
Q2
if temp < target: heater.on() → A closed-loop control: it uses the temperature reading as a feedback signal to decide what to do next
Q3
A feedback signal is a measurement of the result that is sent back to the controller → temp = sensor.read()
Q4
An open-loop system acts for a set time or amount and does not check the result → heater.on() and wait(600) and heater.off()
Q5
Thermostat (closed loop): heater.on() for 10 minutes, then heater.off() → This is open loop, not closed loop. It runs for a fixed time and never reads the temperature, so there is no feedback signal.
Q6
Timer (open loop): if sensor.read() > 25: fan.off() → A timer is open loop, but this code uses a sensor reading as feedback, which makes it closed loop.
Section C: Definitions
Q1
control mechanism — Decides what a system does next. Open loop ignores the result (a timer); closed loop uses a feedback signal from the result (a thermostat).
Section D: Fill in the Blanks
Q1
heater = ON WAIT 10 heater = OFF
Q2
reading = readSensor() IF reading < target THEN heater = ON
Q3
temp = readSensor() IF temp < target THEN heater = ON
Q4
WHILE temp < target DO heater = ON temp = readSensor()
Q5
temp = readSensor() error = target - temp IF error > 0 THEN heater = ON
Section E: Spot the Error
Q1
A — A thermostat reads the temperature with a sensor and uses it to decide what to do, so it is a closed loop. The comment should say 'Closed loop: thermostat'.
Q2
D — An open-loop timer switches the pump on, waits, then switches it off. Line 4 repeats pump_on(), so the pump never stops. It should be pump_off().
Q3
B — A closed loop needs a feedback signal from the real world. Setting temp to target means the heater never sees the actual temperature. It should be temp = read_sensor().
Q4
B — The thermostat should turn the heater on when the feedback shows the room is too cold. The test should be temp < 20, not temp > 20.
Q5
D — In a closed loop the adjustment uses the feedback (the error between target and measured value). Passing only target ignores the result. It should be adjust(error).