Professional Documents
Culture Documents
An introductory tutorial
ES205 Analysis and Design of Engineering Systems Rose-Hulman Institute of Technology
R. Layton 2001
Before we start
You should have network access to software through Application Explorer on your desktop. If not, contact the Technical Services Center (TSC):
Help Desk at 877-8989 Dial 6000 and say "Help Desk" Visit the TSC in Crapo Hall, Room G-139 E-mail to helpdesk@rose-hulman.edu
Launch Matlab
Application explorer (ZENworks) [All] Matlab 5.3
Launch Simulink
In the MATLAB command window, at the >> prompt, type simulink and press Enter
Click the new-model icon in the upper left corner to start a new Simulink file
Select the Simulink icon to obtain elements of the model
Your workspace
Library of elements Model is created in this window
You might create a new folder, like the one shown below, called simulink_files Use the .mdl suffix when saving
x 3sin 2t
Initial condition x (0) 1. First, sketch a simulation diagram of this mathematical model (equation) (3 min.)
Simulation diagram
Input is the forcing function 3sin(2t) Output is the solution of the differential x ( 0 ) 1 equation x(t)
x
1 s
3sin(2t) (input)
x( t ) (output)
integrator
Place your cursor on the output port (>) of the Sine Wave block
Simulation results
To verify that this plot represents the solution to the problem, solve the equation analytically. The analytical result,
3 x(t ) 1 2 2 cos2t
Example 2
2nd-order mass-spring-damper system zero ICs input f(t) is a step with magnitude 3 parameters: m = 0.25, c = 0.5, k = 1
m x cx kx f (t )
The simulation diagram for solving the ODE is created step by step. After each step, elements are added to the Simulink model.
m x cx kx f (t )
(continue)
(continue)
Add a gain (multiplier) block to eliminate the coefficient and produce the highest-derivative alone
m x
summing block
1 m
(continue)
1 m
1 s
1 s
Add a scope from the Sinks library. Connect output ports to input ports. Label the signals by double-clicking on the leader line.
(continue)
Connect to the integrated signals with gain blocks to create the terms on the right-hand side of the EOM
m x
summing block
1 m
1 s
c
1 s
cx
kx
Double-click on gain blocks to set parameters Connect from the gain block input backwards up to the branch point. Re-title the gain blocks.
c=0.5
k=1.0
Bring all the signals and inputs to the summing block. Check signs on the summer.
+ -
f(t) input
m x 1 m
1 s
c
x x
k
1 s
x(t) output
cx
kx
Double-click on Step block to set parameters. For a step input of magnitude 3, set Final value to 3
Results
x k m
c 1 x x f (t ) k k
k n 2.0 m
c 0.5 n k
K 1 1 k
Expect the system to be underdamped. Expect to see overshoot. Expect output magnitude to equal input magnitude. Input has magnitude 3, so does output.
Static gain is 1.
End of tutorial