This preview shows page 1. Sign up to view the full content.
Unformatted text preview: alf of the speed of the second.
Each engineer has come up with a design, as shown below. Assume the motors have a resistance
of approximately 5Ω and that rotational speed is proportional to voltage. For each design, indi
cate the voltage across each of the motors. Your answer only needs to be within 0.5V of the correct
answer. 4.1 Jody
+10V M+ Mmotor 10 1KΩ
M+ Mmotor 1KΩ 0.05 1KΩ
M+ Mmotor 1KΩ 0 Midterm 2 Solutions — Spring 10 7 4.2 Chris
+10V M+ Mmotor 10 100Ω
M+ Mmotor 100Ω 0.45 100KΩ
M+ Mmotor 0 100KΩ 4.3 Pat +10V 10
M+ Mmotor 1KΩ +
1KΩ 1KΩ  M+ Mmotor 4 +
1KΩ  M+ Mmotor 2 Midterm 2 Solutions — Spring 10 8 4.4 Kim
+10V 10 M+ Mmotor 100Ω +
100KΩ 100Ω M+ Mmotor  5 +
100KΩ M+ Mmotor  2.5 4.5 Jamie 10 +10V
M+ Mmotor 1KΩ +
1KΩ M+ Mmotor 1KΩ 5 +
1KΩ  M+ Mmotor 2.5 Midterm 2 Solutions — Spring 10
Scratch Paper 9 Midterm 2 Solutions — Spring 10 10 5 Composition (5 points)
+
— n1
d1 n2
d2
n3
d3 Write an expression for the system function for this whole system, in terms of n1 , d1 , n2 , d2 , n3 , d3 ,
which are the numerator and denominator polynomials of the system function for each of the
component systems. d3 n1 n2
d1 d2 d3 + n1 n2 n3 Midterm 2 Solutions — Spring 10 11 6 OOP (6 points)
If a procedure has no side effects but may be used multiple times, then a convenient concept
for efﬁciency is called memoization – we keep track of whether the procedure has previously
been called with a particular argument, and the value computed at that time. If it has already
been computed, we just return the saved value, otherwise we do the computation, store away the
value for future use, and return the value.
Here is an object oriented approach for memoization, with one piece missing. We assume that
proc, the procedure to be “memoized”, has a single argument.
class Memo:
def __init__(self, proc): self.proc = proc self.history = {} def val(self,arg):
if arg in self.history: print ’found’, arg, ’in history’ return self.history[arg] el...
View
Full
Document
 Spring '11
 LeslieKaelbing
 Electrical Engineering

Click to edit the document details