You are on page 1of 6

Project Portion of Final (Take Home)

ME444/644
Fall 2017
Due Monday (Dec 18th) at Beginning of Class or Before
SUBMISSION: Email Zip File with: (1) writeup (2) Matlab code (with Simulink Models) in separate folders
for each problem (i.e., don’t turn in one folder with all Matlab files in it, instead there should be multiple
folders in your Zip File where each folder holds the Matlab files it needs for the problem of interest). You
just need one writeup that covers all the problems, just make sure you use appropriate headings.
Diagrams (if applicable) may be drawn by hand and scanned into writeup, use appropriate captions
when including tables or figures in your writeup.

1. This is the take home portion of your exam, an in class portion will be given the day of the
final.
2. You must work individually, but you may ask for assistance from the instructor during
office hours or other arranged times.
3. Discussing any part of the exam with another student is considered unethical (i.e.,
cheating) and is not permitted.
4. Any cheating will result in an automatic “F” for the entire term.
5. Additional written and/or oral justification for any answer may be requested by
the instructor.
6. The exam is open-book, open-notes, you must use MATLAB (or other computational
software).
7. You may build off or use any examples/code given in class.
9. Partial credit given at the discretion of the instructor.

I have read, understood, and agree to abide by the exam rules:

Student Signature:

Printed Name: Farhanki J Sawor


Problem 1
In this problem there are several changes made from the codes given by instructor. To begin
with, there is no constraint applied, so therefore, any lines with constraint codes are muted (or
deleted) such as defining any constraints (Line 38), adding Lagrange multiplier terms (Line 72),
double time derivative of configuration constraints (Line 80), and lambda lines. Next, Q nc is
defined is matrix form with variable ‘B’ which is a torsion (Line 58). After running the script
codes, ‘qdotdot1’ and ‘qdotdot2’ are obtain, then the results are copied and pasted into ‘output
(1)’ and ‘output (2)’ in the function file code. Again, ‘Lambda1’ expression for ‘output (3)’ is
muted because there is no constraint. I also add an extra input for the torsion in the function file,
and it is defined as ‘B=inputs (5)’. For the Simulink model, I add two step blocks and insert the
−π
parameters as given in the problem. I also change the initial condition for θ1=θ 2=
2
(integrator 1) andθ̇1=θ̇ 2=0 (integrator 2). At the end, I plot the kinetic energy, potential energy,
and the summation of total energy as shown on the Fig.2 below. The graph shows that the total
energy remains constant after 0.5 s which would make sense because of conservation of energy.

Figure 1: plot of 𝜃1 and 𝜃2 vs. time.


Figure 2: A graph of kinetic energy, potential energy, and the sum of both as a function of time
Problem 2

For problem 2, the code are relatively identical to problem 1. However, the only change is the
non-conservative equation (Qnc) which is also defined as ‘Qnc = [M-b*gendot(1);-
b*gendot(2)];’ in line 62. Also, in the function file, I copy ‘qdotdot1’ and ‘qdotdot2’ from the
script file and paste them into ‘output (1)’ and ‘output (2)’. Again, ‘Lambda1’ expression for
‘output (3)’ is muted because there is no constraint. Then, I add the damping coefficient which is
given in the problem 2. For the Simulink model, there is no change made. As a result, Fig.2
describes that the total energy of kinetic and potential decrease exponentially which make sense
because the dampers slow down the oscillation of two members over time.

Figure 3: plot of 𝜃1 and 𝜃2 vs. time.

Figure 4: A graph of kinetic energy, potential energy, and the sum of both as a function of time
Problem 3

For this problem, the students are required to calculate, plot, and simulate 3 member of bars
which are connected. The parameters and other conditions are similar to problem 1. Since the
problem has 3 link members, so I calculate V cm3 and add it to the script codes. Next step is to find
new kinetic energy and potential energy equations. After running the script code, the equations
for ‘qdotdot 1’, ‘qdotdot 2’, and ‘qdotdot 3’ are obtained which then copied and pasted into the
function file. In the same function file, there are also several parameters added for the third link
such as q3, qdot3, length, mass and moment of inertia. For the Simulink model, there is nothing
changed between problem 1 and problem 3. Lastly, for three link plot and system energy, I just
add the codes for third member by following the pattern from original codes. These two plots are
shown in the figures below.

Figure 5: plot of 𝜃1, 𝜃2, and 𝜃3 vs. time.

Figure 5: A graph of kinetic energy, potential energy, and the sum of both as a function of time

You might also like