Feedback control · University · about 25 min
What a controller should do when the actuator has nothing left to give.
[1 mark]A PI controller with conditional integration, run on four errors. What does it print?
KP, KI, DT = 1.5, 0.7, 0.1
integral = 0.0
for error in (30, 40, 30, 10):
want = KP * error + KI * integral
cmd = max(-55, min(55, want))
if abs(want - cmd) < 0.01:
integral += error * DT
print(round(cmd, 2), round(integral, 2))[1 mark]drive() is asked for 250 and then for 6. What does the robot get each time?
[1 mark]What is the name of the anti-windup method that stops accumulating the integral while the actuator is saturated?
[1 mark]With back-calculation, integral -= (want - cmd) / Kt. If want = 62.1, cmd = 55 and Kt = 2, by how much is the integral reduced? Give two decimal places.
[1 mark]A robot switches from manual driving to a PI controller and jumps. What is the fix?
[1 mark]A diagonal drive command saturates the lateral axis but not the forward one. What happens?
The same blocker, the same 12 cm. Run a PI controller with anti-windup, keep KI at 0.7, plot error and i term, and be settled 12 cm from the blocker, within 3 cm, from 21 seconds onwards. Without protection the integral winds up on the way in and the robot is not settled until about 25 seconds; with it, about 15.
from bugbot import * connect() KP, KI = 1.5, 0.7 TARGET = 12.0 DT = 0.1 integral = 0.0
Plan your program here, then type it in and press Run.
i term charts side by side.