Professional Documents
Culture Documents
Session VII
Introduction to SIMULINK
Rajeev Madazhy
Email: rmadaz1@lsu.edu
Dept of Mechanical
Engineering
LSU
Department of Mechanical Engineering, LSU
Session VII
Last Session.
Engineering Applications using MATLAB.
Solving non linear differential equations
Algorithm analysis for four bar linkage problem
Other mechanical problems
Session VII
Introduction to Simulink
Solving simple problems using Simulink
Session VII
Simulink..
Simulink is a program that runs as a companion to
MATLAB
Simulink provides a graphical user interface (GUI) that
is used
in building block diagrams, performing simulations, as
well as
analyzing results of dynamic systems.
In Simulink, models are hierarchical so that you can
view a
system at a high level, then double click on blocks by
using
the mouse to go down through
the design levels.
Session VII
Getting started..
Lets get started with a simple example of simulating a sin
wave.
Opening Simulink.
Session VII
Session VII
Session VII
Session VII
Session VII
To add the first block to the diagram, point the mouse at the
Sine
Wave block in the Sources library window and press the left
button.
Create a new model window by clicking on to the new icon at
the
toolbar.
Without releasing the left mouse button, drag the mouse to
the
new model window and release the mouse button.
Department of Mechanical Engineering, LSU
Session VII
Simulink model
window.
Session VII
sources
integrator
Linear
Mux
connections
Scope
sinks
Session VII
Session VII
Cont
Session VII
Cont
Session VII
Final model.
Session VII
Giving model
parameters..
The sine wave block
Double click on the sine wave block and examine the data
fields.
Sine wave block parameters:
Amplitude
Frequency (rad/sec) =
0.25*2*pi
Phase(rad)
Sample time
Session VII
Session VII
Integrator Block.
None
Initial Conditions
Limit Output
Not checked
Not checked
Not checked
Absolute tolerance
auto
Session VII
Session VII
Simulation parameters.
Session VII
Session VII
Cont.
To better fit the display in the scope window, click on the Fit
View button
. The scope window should similar to the
following.
Session VII
Example 2.
d2
d
2
2
y
(
t
)
y
(
t
)
y
(
t
)
u (t )
n
n
n
2
dt
dt
Given that:
K 1; 0.5; n 4
Obtain the velocity and displacement response
Department of Mechanical Engineering, LSU
Session VII
Number
Integrator
Sum
Scope
Step I/P
Gain
1
3
Session VII
Final Model.
Session VII
Similarly give the gains for the second and the third
one as shown in the model window.
Session VII
Session VII
Simulation parameters.
Session VII
Session VII
Session VII
References.
Session VII
Looking back.
Session VII
Thank You
Session VII