6.01 Final Exam Spring 2011: Name: Section
6.01 Final Exam Spring 2011: Name: Section
6.01 Final Exam Spring 2011: Name: Section
01 Final Exam
Name:
Spring 2011
Section:
Enter all answers in the boxes provided. Clearly written work will be graded for partial credit.
During the exam you may
For sta use: 1. 2. 3. 4. 5. 6. 7. 8. total: /8 /8 /6 /18 /11 /18 /15 /16 /100
Spring 2011
4 I V1
V2
Express the relation between V1 and V2 as an equation, and enter the equation in the box below.
equation:
Spring 2011
+ R +
Part a. Enter the dierence equation that relates the input sequence x[n] and output sequence y[n] for this system.
dierence equation:
Part b. Enter the pole(s) of the system in the box below. If there are multiple poles, separate them with commas. If there are no poles, enter none.
poles:
Spring 2011
Part c. Assume that you are given a feedback system whose performance is determined by a gain factor K. The following table species the two poles that result for six dierent values of K. The poles are rst described by their real and imaginary parts. The same poles are then also described by their magnitude and angles.
0.3 0.1j 0.6 0.2j 0.9 0.3j 1.2 0.4j 1.5 0.5j 3.0 1.0j
Spring 2011
3 OOP (6 points)
You are given the following (incomplete) denitions:
class MITstudent: GIR = [5.111, 7.011, 8.01, 8.02, 18.01, 18.02,
rest1, rest2, instlab,
hass1, hass2, hass3, hass4,
hass5, hass6, hass7, hass8]
DEPT = []
def __init__(self, AP = []):
self.taken = AP
def take(self, courses):
for course in courses:
self.taken.append(course)
def doneReq(self, req):
missing = []
for r in req:
if not r in self.taken:
print r + is missing
missing.append(r)
return len(missing) == 0
def done(self):
# your code here
class Course62(MITstudent): DEPT = [6.01, 6.02, 18.03, 6.041, 6.002, 6.003, 6.004, 6.005, 6.011, 6.013, 6.033, 6.115, 6.813, 6.336, 6.AUT, 6.AUP]
Note that the denition for each subclass of MITstudent, such as Course62, will dene a DEPT attribute specifying the departmental requirements. This code is intended to be used to track the courses taken by a student, and to test whether the student has satised all of the GIR and departmental requirements. A sample use is shown below:
Chris = Course62([18.01])
Chris.take([5.111, 18.02, 8.01, hass1])
Chris.take([18.03, 8.02, 6.01, hass2])
Chris.take([6.02, 6.041, 7.011, hass3])
Chris.take([6.002, 6.003, 6.013, hass4])
Chris.take([6.004, 6.005, 6.011, hass5])
Chris.take([6.013, 6.115, 6.336, hass6])
print Done? , Chris.done()
Chris.take([6.AUT, 6.033, 6.813, hass7])
Chris.take([6.AUP, random, random, hass8])
print Done? , Chris.done()
Spring 2011
3.1 Done
Write the done method of the MITstudent class so that it checks both the GIR and department requirements and returns a boolean (True if both requirements are complete; False otherwise).
def done(self):
3.2 Take
The previous denitions have one fundamental aw: they dont take into acount that 6.01 and 6.02 together satisfy the Institute Lab requirement instlab under the GIRs. We can address this aw by adding a take method to the Course62 class to handle this issue. Write the take method below; do not duplicate existing code.
def take(self, courses):
Spring 2011
Thus Link(20,10) species a link that takes 20 minutes to walk or 10 minutes to drive. If one of these options is not available (e.g., it is a footpath, or a freeway), then the time can be assigned a very large numerical value (called far). For example, Link(3,far) species a footpath that takes 3 minutes to walk and cannot be driven.
Spring 2011
Spring 2011
A
10, far 50, 20
B
50, 20 10, 2 1, far
C
far, 10
E
50, 20
D
30, 10 50, 20
G
Here it is, formalized in Python. It is like the maps we have used before, but instead of a single cost associated with each link, we have an instance of the class Link.
far = 1000000000 map1 = {A : [(B, (C, B : [(A, (D, (E, C : [(A, (D, (F, D : [(B, (C, (G, E : [(B, (G, F : [(C, (G, G : [(E, (D, (F, Link(10, far)), Link(50, 20))], Link(10, far)), Link(10, 2)), Link(50, 20))], Link(50, 20)), Link(1, far)), Link(far, 10))], Link(10, 2)), Link(1, far)), Link(30, 10))], Link(50, 20)), Link(50, 20))], Link(far, 10)), Link(50, 20))], Link(50, 20)), Link(30, 10)), Link(50, 20))]}
Assuming that the person always has the option to take a car, what is the best path for a person with dm = 0.1 from A to G? What is its cost? best path = associated cost =
Spring 2011
10
Spring 2011
If the person has a car available initially and starts in location A, what is the initial state?
11
Spring 2011
In the grid on the left, in each state there are four actions that lead to four other states. In the one on the right there are eight actions per state. In all the questions, assume that the following two pruning rules apply. Pruning Rule 1: Do not consider a path that visits the same state twice. Pruning Rule 2: If multiple actions lead to the same state, consider just one of them. Note that a path of length 1 has exactly one action and a path of length 2 has exactly 2 actions.
12
Spring 2011
Using BF+DP in the 4-action grid, how many paths of length 1 are ever added to the agenda? Using BF+DP in the 4-action grid, how many paths of length 2 are ever added to the agenda? Using BF+DP in the 8-action grid, how many paths of length 1 are ever added to the agenda? Using BF+DP in the 8-action grid, how many paths of length 2 are ever added to the agenda?
13
Spring 2011
5.4 Heuristics
The Manhattan distance between two states (x1 , y1 ) and (x2 , y2 ) on the grid is:
|x2 x1 | + |y2 y1 |
Assume that we are using A* search and we use this distance as an heuristic.
Yes/No?
Explain briey.
Yes/No?
Explain briey.
14
Spring 2011
15
Spring 2011
Starting from the initial belief state, what is the belief state of a state estimator after performing action up and then performing action door-close? 0 up down 1 2 3 4
16
Spring 2011
Starting from the initial belief state, what is the belief state of a state estimator after performing action up for two steps? 0 up down 1 2 3 4
17
Spring 2011
0 up down
Starting from the initial belief state, what is the belief state after the observation-action sequence:
0 up down
18
Spring 2011
(1i )R i R
motor M+ M
19
(1o )R o R
The dependence of the pot resistances on shaft angle is given in terms of , which varies from 0 (most counterclockwise position) to 1 (most clockwise position). The resistance of the lower part of the pot is R and that of the upper part is (1 )R, where R = 1000. Notice that if i > o , then the voltage to the motor motor (VM+ VM ) is positive, and the motor turns clockwise (so as to increase o ) i.e., positive motor voltage clockwise rotation. Part a. Determine an expression for VM+ in terms of i , R, and VS . Enter your expression in the box below.
VM+ =
Spring 2011
Part b. The following circuit produces a voltage Vo that depends on the position of the input pot.
VS
R1 Vo R2 (1i )R i R
Determine an expression for the voltage Vo in terms of i , R, R1 , R2 , and VS . Enter your expression in the box below.
Vo =
20
Spring 2011
Part c. The following circuit produces a voltage Vo that depends on the positions of both pots.
VS R
(1i )R i R (1o )R o R Vo
Determine an expression for Vo in terms of i , o , R, and VS . Enter your expression in the box below.
Vo =
21
Spring 2011
Assume that we are provided with a circuit whose output is is possible to design a motor controller of the following form
+10V
motor i volts o M+ M
R4
R3 R2 R1 VC
so that the motorshaft angle (which is proportional to o ) will track the input pot angle (which is proportional to i ).
R2 =
22
Spring 2011
R2 =
23
Spring 2011
1/2
R1 R2
R3
8.1 Analysis
Let H1 represent the system that results when R1 is a wire, R2 is a delay, and R3 is a delay. Let H2 represent the system that results when R2 is a wire, R1 is a delay, and R3 is a delay. Let H3 represent the system that results when R3 is a wire, R1 is a delay, and R2 is a delay. Fill in the following table with properties of H1 , H2 , and H3 . system function pole(s) converge? oscillate?
H1 =
H2 =
H3 =
8.2 Recommendation
Which delay should your company remove?
1 or 2 or 3 or none:
Briey explain.
24
Spring 2011
1/2
R1 R2
R3
25
Spring 2011
26
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.