The robot as a system · University · about 30 min
A step response: top speed, time constant and dead band, measured rather than assumed.
[1 mark]A first order system follows v(t) = v_max * (1 - exp(-t / tau)). This prints the fraction of the final value reached after 1, 2 and 3 time constants. What does it print?
import math
for n in (1, 2, 3):
print(n, round(1 - math.exp(-n), 3))[1 mark]A step response settles at 20 cm/s with a time constant of 0.25 s. What is the speed at t = 0.25 s, in cm/s to one decimal place?
[1 mark]Step response readings are taken every 0.1 s from the moment of the step. This estimates v_max from the last five readings and tau from the first reading at or above 63.2 percent of it. What does it print?
speeds = [0.0, 6.8, 11.5, 14.5, 16.6, 18.0, 18.9, 19.3, 19.7, 19.9, 20.1, 19.9, 20.0, 20.1, 19.9]
dt = 0.1
v_max = sum(speeds[-5:]) / 5
target = 0.632 * v_max
for i, v in enumerate(speeds):
if v >= target:
break
print("v_max:", round(v_max, 1))
print("tau:", round(i * dt, 1))[1 mark]The time constant is 0.25 s. How long after the step, in seconds, should you wait before readings measure the settled level rather than the rise?
[1 mark]The dead band is 15. A controller's output spends most of its time around 10. What does the robot do?
[1 mark]Which of these are part of measuring a step response honestly?
Tick every answer that is true.
Run a step to full forward power, plot the speed as speed, and print two lines: v_max: and tau:.
from bugbot import * connect() speeds = [] forward(100)
Plan your program here, then type it in and press Run.
imu()[1] as the measurement. Is tau the same?tau a property of the machine or of the size of the step?