Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
Homework 2: Open-Loop & Closed-Loop Driving
Note:
? The broad goals of this assignment are:
o To implement a basic closed-loop control algorithm, which requires the use of a
feedback loop directly monitoring the variable to be controlled.
o To compare results with a corresponding open-loop implementation of the same task.
? Guidelines:
o If you are an undergraduate student, you are permitted to work in groups of no more
than two students. However, if you prefer to work on your own, that is fine too!
o Submit the report by responding to this assignment posting in Blackboard.
o Each group must work on its own in completing this assignment! Feel free to consult
with others in developing solution ideas, but the final code implemented must be your
work product alone. Refer to the Syllabus, where the policy on academic integrity is
outlined, our classroom discussions on this topic, and consult with me and/or the GTA if
you have any questions!
Background:
In Homework 1 we drove the robot using velocity commands that were either fixed entirely
or fixed over driving segments (the ‘6’ & ‘9’ patterns). In all cases, the program did not
incorporate the right feedback, even as we implemented a control system! This is because we
were not monitoring the proper variable as the robot drove. The aim of this assignment is to go
one step further by driving the robot using the proper feedback to guide it.
Let us take the circle path of HW1 as an example. We set the velocity of the robot and then
drove it for the estimated time it would take to travel a distance equal to the circumference of
the circle. However, this strategy assumes that the robot achieves the desired velocity
immediately, even though it is starting from a stationary position. This would obviously not be
true in practice. In fact, we can prove it would not by getting the robot to trace a full circle after
it has had time to reach the target velocity. The circle would be slightly different in this
situation.
Furthermore, even if the robot achieves the commanded velocity instantaneously, typically
the ground is non-uniform in terms of its friction characteristics as well as flatness. So, in
practice velocities are not constant all the time. The vehicle’s internal speed control system
tries to maintain the commanded velocities, but it cannot achieve this instantaneously. That is,
the velocity fluctuates from moment to moment, just like when we drive a car.
2
We can in a sense say that in HW1 we implemented an open-loop control system, because
we did not monitor the correct target quantity of distance traveled. Instead, we monitored
drive time, which is inherently based on the assumption that the velocity will hold steady. In
this homework we will monitor distance traveled instead, which is downstream from time of
travel, and is not dependent on the assumption of a steady velocity. It is a better indicator of
whether we have traveled as far as we want. In fact, we will do both so that you can compare
the results obtained.
Figure 1: Desired Triangular Robot Path
C
B
A
AB = 3 meters
Angle A = 60
0
Angle B = 60
0
x
y
NOT TO SCALE!
3
Tasks:
1. Drive the robot counterclockwise around the triangular path shown in Figure 1 from the
assumed starting position of the origin of the World Frame. First, do it with an open-loop
strategy as follows:
a. Drive the robot straight at a chosen fixed forward velocity ‘v’ for the estimated time to
complete the first side of the triangle. For this part set ?? = 0.
b. Then, stop the robot at the corner reached and rotate it in place for the estimated time
to point to the next vertex, based on a chosen rotational rate ‘?’. This is known as a
stop-turn-go strategy.
c. Similarly, navigate the rest of the triangle.
d. Plot the path of the robot using odometry values.