matlab代写-ME 3017
时间:2022-04-05
ME 3017 computer HW Spring 2022 Mechanical Engineering, Georgia Institute of Technology
Reporting: You should provide sufficient details of your approach and results (numbers, codes, plots,
etc.) to justify your answers. Answers without justification will not receive points. Create a single WORD
or PDF file containing all descriptions, derivations, plots, codes, and upload it to Canvas. Do not forget to
attach the honor statement below with your signature. You are responsible for providing sufficient
justifications of your statements in the report. Justification with numbers must be given in the written
document. Note that the grader will NOT run submitted MATLAB scripts to reproduce numbers and
verify your answers. You must clearly show numerical values in your document. You will lose points if
numbers to justify your answers are missing.
Documentation You must document any assistance that you received from any person or any reference.
The use of online services in particular Chegg.com and CourseHero.com, but not limited to, is
strictly prohibited. DO NOT upload any course materials to online tutoring services. If this honor
statement is not attached to your assignment, you will receive a zero for the assignment.
ME 3017 Computer Homework
You are strongly encouraged to use MATLAB R2020a or later.
Problem 1: You will perform vibration analysis of a string of a musical instrument (e.g., guitars).
This analysis is also called standing wave analysis. Assume that the string is modeled by a total
of 9 masses connected by 10 springs (i.e., undamped) as shown in the figure. Both ends of the
string are connected to a rigid wall.

Figure: Mechanical modeling of a string. Typical vibration modes (standing waves).
k1
m1
x1
m2
x2
k2
m3
x3
k3
m9
x9
k9
k10
m4
x4
On my honor, I pledge that I have neither given nor received inappropriate aid in the preparation of this
assignment including online tutoring services. I collaborated with or received assistance from
___________________________________
Your signature
ME 3017 computer HW Spring 2022 Mechanical Engineering, Georgia Institute of Technology
Part 1-1: Assume m1= m2= m3=m4= m5= m6 =m7 =m8=m9=1. (∑ 91 = 9). k1= k2= k3=k4= k5= k6=
k7= k8=k9= k10=k=500. Find all natural (resonant) frequencies. Cleary show how many
vibration modes are there in this model. (HINT1: in vibration analysis, we number the vibration
modes in in ascending order. Mode 1 has the smallest (slowest) natural frequency, Model 2 has
the second smallest natural frequency…Follow this rule.) (HINT2: the lowest mode (Mode 1)
should be around 7 rad/sec.)
Part 1-2: Continue 1-1. Sketch all vibration
modes (mode shapes) following the sample
shown below. A sample mode is shown below
that may not be accurate. Use MATLAB to show
relative (or normalized) magnitudes of the
displacements.
Figure (right): Plot of a mode shape (sample
mode) (MATLAB “stem” command was used in
this plot)

Part 1-3: Continue 1-1. Assume m’s are given as in 1-1. Now you change the value for k (note
that k1= k2= k3=k4= k5= k6= k7= k8=k9= k10 still holds!), but so that Mode 5 is EXACTLY at 50
rad/sec (be careful. It is not 50Hz). By trial and error, k to satisfy the requirement. Note: within
2% is considered “close enough” in this course.

Part 1-BONUS Challenge Problem (OPTIONAL):
Now you can change all k and m values (they don’t have to take the same value anymore). Find
new masses from m1 to m9 and/or new spring constants from k1 to k10 so that ALL the
natural frequencies are between 50 rad/sec and 325 rad/sec. The answer is not unique.





-1
-0.8
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
1
0 1 2 3 4 5 6 7 8 9 10
ME 3017 computer HW Spring 2022 Mechanical Engineering, Georgia Institute of Technology
Problem 2: Consider the same structure given in the previous problem. Now assume a damper
is attached to each spring as shown below. Also assume a force input is applied to the 4th mass
(m4) to “slap” that string at that point. Assume m1= m2= m3=m4= m5= m6 =m7 =m8=m9=m=1.
(∑ 91 = 9). k1= k2= k3=k4= k5= k6= k7= k8=k9= k10=k=500. d1= d2= d3=d4= d5= d6= d7= d8=d9=
d10=d=1.

Part 2-1: 1) Find the transfer function from input f to the displacement of Mass 4 (x4). You
may use MATLAB commands such as “ss” and “ss2tf,” and convert the state-space model to a
transfer function.
2) Plot the gain diagram of the transfer function and discuss the association between the
peaks in the gain plot and the resonant (natural) frequencies found in Problem 1-1.

Also, 3) compute all poles and confirm that all modes are underdamped.



9 lamped
masses
10 springs
and
10 dampers
k1, d1
m1
x1
m2
x2
m3
x3
m9
x9
k2, d2
k3, d3
k10, d10
k9, d9
f
m3
x4
k4, d4
ME 3017 computer HW Spring 2022 Mechanical Engineering, Georgia Institute of Technology
Part 2-2: Continue 2-1. Assume the force input is modeled as a delta
function with a magnitude of 5 at t=0. Assume zero initial conditions.
Plot x4 versus time. Confirm that the displacement never settles
because the structure does not have any damping.
Part 2-3: Continue 2-1. Assume the force input is now modeled as a
sine function with a frequency of one of the resonant modes (e.g.,
mode 1 which again should be around 7 rad/sec). Assume zero
initial conditions. Plot x4 versus time (at least for 100 seconds).
Confirm that the input excites the resonant frequency.
Part 2-4: Continue 2-3. Now the force input is a sine function
with a frequency that is NOT one of the resonant modes (e.g., 9
rad/sec which should be between Mode 1 and Mode 2). Plot x4
versus time (at least for 100 seconds). Confirm that the input
does NOT excite the resonant frequency as much as the
previous input did. Compare plots in Part 2-3 and Part 2-4 and qualitatively discuss that the
key difference is.
Part 2-5: Continue 2-1. By trial and error, determine the damping coefficient d such that six
(6) poles are overdamped or critically damped, and the rest are still underdamped.




tO
f(t) ( ) sin , 0f t t tω= ≥
t
f
0
5 ( )f tδ=
ME 3017 computer HW Spring 2022 Mechanical Engineering, Georgia Institute of Technology
Problem 3: Identify the linear approximation of the nonlinear system provided in the SIMULINK
file named “problem3Release.slx.” The true transfer function is in the form of ( )( )
( )
sTN sG s e
D s
−= ,
for which the following properties are known.
Identify N(s), D(s) and time delay T. Since this is a computer HW, the assignment does not
expect that everyone can identify the TF very accurately. An approximation of G(s) that is
reasonably close to the true transfer function is acceptable. You may numerically approximate
the time-delay element by the Pade approximation if not separable from N(s) or D(s) (see
https://www.mathworks.com/help/control/ref/pade.html)
Show representative plots, such as impulse, step, ramp responses and the bode diagrams, of
the given system and your identified system to justify your answer.
Hint 1: Focus on frequency ranges between = 0.1 and = 500; beyond 500

, the
nonlinearities of the simulator begin to dominate. For responses with multiple frequencies (sines
with sinusoidal envelopes), check the gain for the ENVELOPE; it may help to average a few of
the peaks.
Hint 2: There is a filter with order 2 that is one directional (high-pass or low-pass; no notch/band
filters) with the cut-off frequency of = 1. But there may be other filters in the system.
Hint 3: There is at least one undamped resonant frequency (similar to Problem 1). Because of
this mode, the system (excluding the time delay element) is marginally stable.

SIMULINK file download Instructions:
(1) Go to CANVAS Files- homework – Spring 2022 Computer Project.
(2) Download computerhwp3.zip. Extract this file on your PC/MAC. You will find a)
problem3Release.slx (SIMULINK block file), 2) binary mex files (blackbox_sf***), and 3) other
files. You should locate the Simulink slx file and an appropriate binary mex file in the same
folder:
A necessary binary file is dependent on the operating system. If you are not certain, simply
unzip the provided file and leave the folder unchanged. There should be ALL binary files.
[64 bit Windows]: blackbox_sf.mexw64
[64 bit Mac OS]: blackbox_sf.mexmaci64
(3) Run “runthisfilefirst.m.” The slx model should open and run. Some sample input blocks (,
step, ramp, sinusoidal inputs) are given for your convenience.
MAC users must take one more step to allow mex file to run. See “to mac MALTAB
users.docx” in the same folder.
Trouble shooting:
If you see the error shown below, do a) and (only MAC users) b) .
ME 3017 computer HW Spring 2022 Mechanical Engineering, Georgia Institute of Technology
a) MATLAB file path. Make sure that the current path
is the folder that you are working.
Type >>ls. You should see the files and other
binary files listed.

If you are not sure how to change the current folder (matlab path), double click
“runthisfilefirst.m” and allow MATLAB to change the folder. Hit “Change Folder.”

b) Security: ONLY for MAC users. You need to allow MATLAB to run the binary file:
blackbox_sf.mexmaci64.
Go to: System Preferences >Security & Privacy >General. Allow ***.mexmaci64 to be open.
(4) You can give an arbitrary input to the plant and observe the output. For example, you can
give a step input. You may use the other block and observe the frequency response.
ME 3017 computer HW Spring 2022 Mechanical Engineering, Georgia Institute of Technology
HINT for Problems 1 and 2: Vibration analysis alternative solution of 2-mass system (see
vibration analysis handout)
2
2
2 0
2
Am k k
Bk m k
ω
ω
 − + −  
=   − − +   
2
2
2
0 2
0
0 2
1/ 0 2
0 1/ 2
21
2
m k k A
m k k B
A m k k A
B m k k B
A k k A
B k k Bm
ω
ω
ω
 −      
− + =      −      
−       
=       −       
−     
=     −     
Omega^2 is the eigen value of the matrix on the right-hand side.
2 2
2
1,2 1,2
2 / / 2 2 2det 0
/ 2 /
3,
k m k m k k k k k k
k m k m m m m m m m
k k
m m
λ
λ λ λ
λ
λ ω
− −        = − − = − − − + =       − −        
= =

Same answer (obviously)
[A,B] is the eigenvector of the matrix (NOTE. The eigenvectors are normalized).
>> [vv,dd]=eig(1/m*[2*k -k; -k 2*k])
vv =
-0.7071 -0.7071
-0.7071 0.7071
dd =
1 0
0 3
>> figure; plot(vv(:,1))
>> figure; plot(vv(:,2))
essay、essay代写