Following a trajectory · University · about 30 min
A ramp leaves a proportional controller permanently behind, and the model knows how to fix it.
[1 mark]A proportional controller with K = 1.5 per second chases a reference moving at 10 cm/s. How far behind does it settle, in cm to 2 decimal places?
[1 mark]The reference speed is now fed forward, but the model is 10 percent out. With the same v = 10 cm/s and K = 1.5, what steady error is left, in cm to 2 decimal places?
[1 mark]Why can a proportional controller never catch a reference moving at constant speed?
[1 mark]This simulates a robot whose real speed is 90 percent of the model's, chasing a 10 cm/s ramp, first with gain alone and then with the reference fed forward. What does it print?
V, K, DT = 10.0, 1.5, 0.1
for ff in (0.0, 1.0):
pos = 0.0
for tick in range(300):
ref = V * tick * DT
err = ref - pos
pos += 0.9 * (ff * V + K * err) * DT
print(ff, round(err, 2))[1 mark]Which statements about feedforward and feedback are right?
Tick every answer that is true.
[1 mark]A robot running feedforward plus feedback is stuck against a chair leg. What does the feedforward term do?
Drive the same 10 cm/s ramp twice: once with proportional control alone, once with the reference speed fed forward as well. Average the size of the error over the last few seconds of each leg, and print p only: and with ff:. Plot ref, actual and error.
from bugbot import * import math connect() DT = 0.1 V_REF, K = 10.0, 1.5
Plan your program here, then type it in and press Run.
v / K against your measured p only number. How close is the prediction?K = 5. Does the error fall by the factor the formula says, and what does the motion look like?