The robot as a system · University · about 20 min
plot(): reading a control loop as a chart instead of a column of numbers.
[1 mark]Which three lines, plotted together, answer most questions about a feedback loop?
Tick every answer that is true.
[1 mark]The error stays large while the plotted command sits flat at 100. What is happening?
[1 mark]The error settles smoothly, but to a steady value that is not zero. What does that shape mean?
[1 mark]The error overshoots zero, comes back, and overshoots again by less each time. What does that shape mean?
[1 mark]The plotted error gets bigger on every tick. What are the likely causes?
[1 mark]A chart shows the error as a fuzzy band around zero, and the rotation command jitters along with it. What is reaching the motors?
[1 mark]A plot of believed y from odometry() and true y from position() shows two lines that start together and slowly separate. What does that picture show?
Drive into the green zone under proportional control, plotting two lines as you go: error and rotation.
from bugbot import *
connect()
def wrapped(a):
return (a + 180) % 360 - 180Plan your program here, then type it in and press Run.
heading() and imu()[0] together. What is the gap, and is it constant?