Professional Documents
Culture Documents
Lecture Overview
What is Simulink?
How to use Simulink
Getting Start with Simulink
Building a model
Lecture Overview
What is Simulink?
How to use Simulink
Getting Start with Simulink
Building a model
Type simulink
on Matlab command window
SEARCH window
BLOCK set
for model construction
LIBRARY
Lecture Overview
What is Simulink?
How to use Simulink
Getting Start with Simulink
Building a model
Building a Model
Simulink Block Diagram pictorial model
of a dynamic system
Each block represents an elementary
dynamic system that produces an output
(either continuous or discrete output)
Lines represent connections of block
inputs to block outputs
u
(Input)
x
(states)
y
(Output)
This is the
Sine Wave block is
from the Sources library
Sources library
The Gain
block is
from the
Math library
The Mux block is from
the Signals &Systems library
These are
from the
Sinks library
A connected Model
Gain value = 5
Lecture Overview
What is Simulink?
How to use Simulink
Getting Start with Simulink
Building a model
1
&
x&
Bx& Kx f t
1
&
x& 2 x& 2 x f t
2
Time, s
Step
Sources
Sum
Math Operation
Gain
Math Operation
Integrator
Continuous
Sinks
&
x&
x&
&
x&
x&
2
RUN
Simulation
Lecture Overview
What is Simulink?
How to use Simulink
Getting Start with Simulink
Building a model
Example 2: Transfer
Function (1)
Use the same mass-spring-damper
system example and simulate the
response using transfer function
approach 1
&
x&
2 x& 2 x f t
X (s)
1
2
F ( s ) 2s 2 s 2
Example 2: Transfer
Function (2)
STEP 1: Creating Blocks
Select BLOCK set
Step
Sources
Transfer Function
Continuous
Sinks
Example 2: Transfer
Function (3)
STEP 2: Making connections
Example 2: Transfer
Function (4)
STEP 3: Set Parameters
Set Step time =0
Example 2: Transfer
Function (5)
STEP 4: Running Simulation
1
2
RUN
Simulation
Example 2: Transfer
Function (6)
Same output as before (Slide 21)
Lecture Overview
What is Simulink?
How to use Simulink
Getting Start with Simulink
Building a model
Inport
(named from sum
Outport
(three outports)
Lecture Overview
What is Simulink?
How to use Simulink
Getting Start with Simulink
Building a model
Set Slope
Set Start time for Ramp function
Set initial value
0
Start at 0 s
Start at 5.01 s
t(s)