Quiz3 2015 Solutions

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

ENGINEERING ANALYSIS 3

SYSTEM DYNAMICS
A
Quiz No. 3, 10 May 2015

Name: (1pt)____________________________________ Please also put your name on the back


of the last page!

My LECTURE section starts at: 9:30am / 2:00pm / 3:30pm

My DISCUSSION section starts at: 12:30pm / 2:00pm / 3:30pm

On my honor I have neither given nor received help on this quiz and I will not discuss
content of the quiz with other students until 5pm. (1pt)___________________________
Sign your name above

You may NOT use notes or books or calculators or phones for this quiz. Do not ask for
clarification of the questions. There are 5 problems. Answer Problems I through III on
the scantron form – only scantron answers will be graded for these problems. There is
only one correct answer for all parts of Problems I through III. Answer Problems IV-V in
the quiz booklet and show all work. Good luck!

Useful formulas
2
Momentum: p = mv Quadratic formula for ax + bx + c = 0 :
Conservation of momentum: mava + mbvb = mava’ + mbvb’
2
Kinetic energy: KE = ½mv −b ±  b 2  − 4ac
2
Potential energy: mgh (gravity); ½kx (spring) x = 
Conservation of energy: [PE + KE]i = [PE + KE]f + Elost 2a
jy
Euler formula: e = cos y + jsin y; e-jy = cos y – jsin y

d d
sin x = cos x cos x = −sin x
dx dx
For the questions in Problems I, II, III, choose the correct answer. In the case of True/False, answer as
true (A) or false (B). A statement is FALSE if it is not ALWAYS TRUE.

Problem I. (15 pts, 1 pts each)

Question 1. Fill in the letter “A” for “true” on number “1” on the scantron form. This identifies your version
of the quiz. Fill in the scantron bubbles for the remaining questions as instructed above and for each
question below.

For questions 2-5: Given the following state equations for state variables x1 and v2, identify the correct
! !
elements, Aij, for matrix [A] when put into matrix form ( x ' = [ A] x ) ,
! ! x1 $ ! A A12 $
11
where x  = # & and [ A ]  = # &.
"v2 % #" A21 A22 &%

l
State equation 1: x1'  = − 2 v2
l1
k ! l2 $ b
State equation 2: v2'  =  # & x1  −  v2
m " l1 % m
Answers for questions 2-5:
l2 k ! l2 $ b
A. 0 B. 1 C. − D. # & E. −
l1 m " l1 % m
A 2. What is the value of A11?
C 3. What is the value of A12?
D 4. What is the value of A21?
E 5. What is the value of A22?

For questions 6-8: the following questions are about analytic solutions to linear, homogeneous,
constant-coefficient differential equations (DEQs). Are the following True (A) or False (B)?
A 6. If x1 and x2 are solutions to a DEQ, then x3 = px1 + qx2 is a solution to the same DEQ, where p and q
are constants.
B 7. If x1 and x2 are solutions to a DEQ, then x3 = px1 * x2 is a solution to the same DEQ, where p is a
constant.
B 8. It is possible to have roots to the characteristic equation for a real system (i.e., positive values for
mass, spring constant, damping constant) that are r = 2 ± j

For questions 9-15, given that r = -3 ± 5j (where j = −1 ) are the roots of a characteristic equation,
are the following True (A) or False (B)?
-3t
B 9. A solution to the DEQ is x = e
-5t
B 10. A solution to the DEQ is x = e
-3t 5jt
A 11. A solution to the DEQ is x = e e
B 12. A solution to the DEQ is x = sin(5t) + cos(5t)
-5t
B 13. A solution to the DEQ is x = e (sin(3t) + cos(3t))
-3t
A 14. A solution to the DEQ is x = e (sin(5t) + cos(5t))
B 15. A solution to the DEQ is x = sin(3t) + cos(3t)
Problem II. (13 pts, 1 pt each)
For questions 16 – 28, the matlab code below is supposed to use the Euler method to follow the time-
evolution of a system consisting of two springs, a mass, a damper, and a force of gravity applied to the
mass starting at t = -5 seconds with a constant time step of dt = 0.01 seconds. The damper in this case
has a time-varying damping constant b, which is given by b(t) = 5 + 0.1t. It is known that the given state
equations in the code are implemented correctly. There are some mistakes in the provided code that
cause error messages after clicking Run in MATLAB, and there may be logical errors in programming
which would not produce error messages, but rather wrong answers for the time evolution of the system.

01 clear
02 xs1 = zeros(501,1); % initialize state variable vectors and initial conditions
03 xs2 = zeros(501,1);
04 t = zeros(501, 1);
05 vm = zeros(501, 1);
06 t(1) = -5;
07 k1 = 10; % parameters
08 k2 = 20;
09 m = 5;
10 b(step) = 5 + 0.1*t;
11 dt = .01; % incremental timestep
12 for step = (2:500)
13 xs1prime = -vm(step); % state equations
14 vmprime = (k1*xs1(step) - k2*(-xs1(step)) - m*g - b(step)*vm(step)) / m;
15 xs1(step+1) = xs1(step) - dt*xs1prime ; % update equations using Euler method
16 vm(step+1) = vm(step) + dt*vmprime;
17 t(step+1) = t(step) + 1;
18 end
19 xs2 = -xs1; % state variable dependency

Answer the following questions 16 - 28 as True (A) or False (B)?

B 16. In lines 10 and 12-17, the variable ‘step’ must be replaced by ‘i’.
B 17. m is not defined.
A 18. The sign of the dt term in line 15 is incorrect (should be added instead of subtracted).
B 19. Each state equation must have its own ‘for’ loop instead of what is done here.
A 20. Line 17 updates time incorrectly.
B 21. The program will not function as desired if time starts at t<0 (as on line 6).
A 22. This program will not function as desired if the ‘for’ loop starts at step = 2 (as on line 12).
B 23. The Euler method will not work for a time-varying b.
A 24. In line 10, the implementation of b(t) is done incorrectly.
A 25. The program calculates the state variables for a time duration of less than 10 seconds.
B 26. The initial conditions specified in lines 2-6 will result in no motion occurring for the entire duration.
A 27. In line 19, it is valid to calculate xs2 outside the loop if xs2 is dependent on xs1 in this system.
A 28. After making all necessary corrections to the current code, an additional line of ‘plot(t, xs2)’ at the
end of the code would output a plot of the displacement of the second spring (dependent variable)
versus time (independent variable).
Problem III. (20 points) Two blocks of mass 1kg and 3kg float in outer space with no friction and
negligible gravity. Velocities of masses are absolute velocities. All questions refer to a fixed coordinate
system. Take positive to the right.
V1   V2  

m1 = 1 kg k = 1200 N/m m2 = 3 kg

• They are connected by an ideal spring with a linear constitutive law and a relaxed length of 2m,
so that when the masses are 2m apart the spring exerts no force on them.
• The spring constant is 1200 N/m
• At a particular moment it is observed that the masses are exactly 2m apart, but they are not going
at the same speed; V1 = 2 m/sec and V2 = 6 m/sec. Thus, both are moving to the right but mass
#2 is moving faster.
• Careful! It is NOT TRUE that the masses are stopped when the spring is most stretched or most
compressed!

29. What is the momentum of mass #1? (1 pt)


A) 20 kg*m/s
B) 2 kg*m/s -> p1 = m1v1
C) 36 kg*m/s
D) 18 kg*m/s

30. What is the momentum of mass #2? (1 pt)


A) 20 kg*m/s
B) 2 kg*m/s
C) 36 kg*m/s
D) 18 kg*m/s -> p2 = m2v2

31. What is the total momentum of the system? (1 pt)


A) 20kg*m/s -> ptotal = p1 + p2
B) 22 kg*m/s
C) 38 kg*m/s
D) 54 kg*m/s

32. What is the total energy of the system, kinetic + potential? (3 pts)
A) 54 joules
B) 108 joules
C) 2 joules
D) 56 joules -> when spring displacement = 0: total energy = KE + PE = 0.5m1v1^2 +
0.5m2v2^2 + 0

33. Given that there are three state variables for this system, what is the state equation for the spring? (4
pts)
A) x’ = -100*x
B) x’ = V2 + x/3
C) x' = V2 - V1 -> using definition of spring velocity
D) x’ = V1 - 300x + V2/3
E) not enough information provided to determine
34. Think about the motion of the system given the information above. When the masses are farthest
apart (when the spring is the most elongated), the velocities of the two masses are (Hint - no equations
needed, or can use answer to 33…..): (4 pts)
A) Equal -> at longest stretch, spring velocity = 0, so two ends move at same velocity
B) Both zero
C) Impossible to tell

35. When the masses are farthest apart, the total momentum of the system is: (2pts)
A) 20kg*m/s -> no external forces, so momentum conserved
B) 2 kg*m/s ptotal = 20 kg*m/s = (m1 + m2)*v_masses -> v_masses = 5 m/s
C) 36 kg*m/s
D) 18 kg*m/s

36. What is the maximum displacement of the spring from its relaxed length? (4 pts)
A) 0.10 m
B) 1 m
C) 0.20 m
D) 0.58 m

At longest stretch: total energy = 56 J = KE + PE


56 J = ½*(m1 + m2)*v_masses^2 + ½*k*x^2
56 J = ½*(4kg)*(5 m/s)^2 + ½*(1200 N/m)*x^2
x^2 = 1/100
x = 0.10 m
Problem IV. (25 pts) Consider the system shown. The
dampers and springs all behave ideally and linearly
according to f = bv and f = kx, etc. The blue dashed
5 arrows indicate the direction to assume for the forces
6 acting ON the lever and the velocities of these points on
3
the lever; these are NOT external forces to the system.
Force due to gravity is negligible in this system and
should be ignored.

m4 IV-1. Draw a free body diagram of the mass below:

l1 l2 f2, v2 f3
f1,, v1

m4
f2

IV-2. Answer the following in the appropriate box. Show your work for finding the state equations below
on this page!

list the state variable(s) x5, V4

f3 = b3v3
write constitutive laws for the f5 = k5x5
elements f6 = b6v6

If you take ‘positive’ V4 up: If you take ‘positive’ V4 down:


write the force balance
equations for the connections, f1 = f5 + f6 f1 = f5 + f6
mass and lever f1 = (ℓ2/ℓ1)*f2 f1 = (ℓ2/ℓ1)*f2
m4a4 = f3 – f2 m4a4 = f2 – f3

If you take ‘positive’ V4 up: If you take ‘positive’ V4 down:

write the geometric continuity v5 = v6 = -v1 v5 = v6 = -v1


equations v3 = -V4 = -v2 v3 = V4 = -v2
v1 = (-ℓ1/ℓ2)*v2 v1 = (-ℓ1/ℓ2)*v2

If you take ‘positive’ V4 up:


x5’ = (ℓ1/ℓ2)V4
find the state equation(s) V4’ = 1/m4 * [-b3V4 – (ℓ1/ℓ2)*(k5x5 + b6(ℓ1/ℓ2)V4)]

If you take ‘positive’ V4 down:


x5’ = -(ℓ1/ℓ2)V4
V4’ = 1/m4 * [-b3V4 + (ℓ1/ℓ2)*(k5x5 – b6(ℓ1/ℓ2)V4)]
Problem V. (25 pts) You are given the state equations for a 2-state system below:

x’ = - 2 x + V

V’ = - 4 x

SHOW YOUR WORK while answering the following questions about these state equations:

V-1. Put the state equations into second order form in terms of x only.

x’’ = -2x’ + v’ = -2x’ + (-4x) -> x’’ + 2x’ + 4x = 0

V-2. Put your system of equations into second order form in terms of V only.

V’’ = -4 x’ = -4 (-2x + V) = -2 (-4x) – 4V = -2(V’) – 4V -> V’’ + 2V’ + 4V = 0

rt
V-3. Assume a solution of exponential form x(t) = Ae . Substitute this into the second order diffeq for x (in
your answer to Problem V-1) to obtain a characteristic equation in r.
2 rt rt rt 2
Ar e + 2Are + 4Ae = 0 -> r + 2r + 4 = 0

V-4. Find the roots for r. Leave the answers in simplified radical form (do not put in decimal form).

r = ½*(-2) ± ½*sqrt [4 – 4(1)(4)] = -1 ± ½*sqrt(-12) = -1 ± ½*2*sqrt(-3) = -1 ± sqrt(3) j

V-5. Obtain a general solution for x(t) in exponential form.

x(t) = Ae[-1 ± sqrt(3)*j ]*t OR x(t) = e-t [A1e+sqrt(3)*j*t + A2e-sqrt(3)*j*t]

V-6. Write the general solution for x(t) in real form (sines and cosines, no need to “derive” in detail from V-
5, can write solution based on what we have learned and V-5).

x(t) = e-t [B cos (sqrt(3)*t) + C sin (sqrt(3)*t)]

V-7. Apply initial conditions x(0) = 5 and x’(0) = 2 to find the particular solution for x(t).

x(0) = 5 = (1)*[B*(1) + C*(0)] -> B = 5

x’(t) = e-t [(C*sqrt(3) – B) * cos (sqrt(3)*t) + (B*sqrt(3) – C) * sin (sqrt(3)*t)]

x’(0) = 2 = (1) * [(C*sqrt(3) – B)*(1) + (B*sqrt(3) – C)*(0)]


2 = C*sqrt(3) – 5
C*sqrt(3) = 7
C = 7/sqrt(3) = (7/3)*sqrt(3)

Particular solution: x(t) = e-t [5 cos (sqrt(3)*t) + (7/3)*sqrt(3)* sin (sqrt(3)*t)]


This page intentionally blank as scratch paper.

You might also like