The answersDownload the PDF
Worksheet

U5.1 The feedback loop

Feedback control · University · about 25 min

BugBotLab
NameClassDate

What this lesson is about

Setpoint, error, controller, plant, measurement: the block diagram and the names.

Questions 6 marks in all

  1. [1 mark]The first loop is run on a list of distances instead of the sensor. What does it print?

    TARGET = 20.0
    for d in (60, 45, 30, 22, 18):
        error = d - TARGET
        print(error, max(-50, min(50, 2.0 * error)))
  2. [1 mark]With error = distance() - TARGET, positive drive() forwards, and the gain made negative by mistake, what happens?

    1. AThe robot drives away from the target as fast as the gain allows
    2. BThe robot approaches the target slowly
    3. CThe robot oscillates around the target
    4. DNothing, because the sign convention does not matter
  3. [1 mark]When does open loop control work?

    1. AWhen the plant is perfectly known and nothing disturbs it
    2. BWhen the gain is small
    3. CWhen the sensor is noisy
    4. DWhen the actuator saturates
  4. [1 mark]Follow a signal once round the feedback loop, starting at the comparison.

    Number the lines 1 to 5 to put them in the right order.

    1. plant
    2. sensor
    3. error = setpoint compared with measurement
    4. controller
    5. actuator
  5. [1 mark]Raising the gain of this loop typically buys which two qualities?

    Tick every answer that is true.

    1. ASpeed
    2. BAccuracy
    3. CStability
    4. DLess actuator effort
  6. [1 mark]In the lesson's table, what is the name for the robot and the mat, the thing being controlled?

The task: close the loop

Settle 20 cm from the wall, plotting the error as you go. The wall's face is 150 cm up the mat and the robot starts at 60.

from bugbot import *
connect()

TARGET = 20.0

Plan your program here, then type it in and press Run.

QR code
Do it on the robot
www.bugbotlab.com/learn/u5-1-the-feedback-loop/
The simulator checks it and tells you when it passes. Nothing to install, no account.

Challenges

  1. Reverse the sign of the gain and describe what happens, in one sentence, before you run it.
  2. Start the robot closer than the target. Does the same loop push it back out?
  3. Put a filter on distance() and see whether the loop is smoother, slower, or both.