0% found this document useful (0 votes)
59 views18 pages

Simulink: Dr. Samir Al-Amer

SIMULINK is a MATLAB program used to simulate dynamic systems. It contains block libraries for sources, sinks, continuous, discrete, and other system components. To build a model: 1. Select blocks from libraries and drag them to the workspace 2. Connect blocks by specifying inputs and outputs 3. Set block parameters and run the simulation Common block types include sources like steps and sine waves, linear blocks like integrators and gains, and sinks to display or save output. Block diagrams represent systems as interconnected blocks. SIMULINK is used to model and simulate a wide range of systems.

Uploaded by

Ariq U Uy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views18 pages

Simulink: Dr. Samir Al-Amer

SIMULINK is a MATLAB program used to simulate dynamic systems. It contains block libraries for sources, sinks, continuous, discrete, and other system components. To build a model: 1. Select blocks from libraries and drag them to the workspace 2. Connect blocks by specifying inputs and outputs 3. Set block parameters and run the simulation Common block types include sources like steps and sine waves, linear blocks like integrators and gains, and sinks to display or save output. Block diagrams represent systems as interconnected blocks. SIMULINK is used to model and simulate a wide range of systems.

Uploaded by

Ariq U Uy
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 18

SIMULINK

Dr. Samir Al-Amer


SIMULINK
 SIMULINK is a power simulation program that
comes with MATLAB
 Used to simulate wide range of dynamical
systems
 To run SIMULINK
 Run MATLAB

 Click on the SIMULINK icon on tool bar

 SIMULINK automatically open a work file and


the main libraries.
To be able to use SIMULINK

 You need to learn to do the following


 manipulate blocks
 use blocks to build models

 run simulation

 modify simulation parameters


SIMULINK BASICS
 A systems is represented by a block diagram
 You select the block from a library of blocks
 You need to know the library that contains the
block that you need
 click on the library name and you will see a list of
blocks in that library
 click on the block that you want and drag it to the
work file
 click on the block to select its parameters
 Connect it to other blocks
SIMULINK LIBRARIES
 Sources
 Sinks
 Continuous
 Discrete
 Function & Tables
 Math
 Nonlinear
 Signals & Systems
 Subsystems
General Procedure
 Open the library that contains the block of
interest
 Click on the block that you need and drag it to
the work area
 Click the left mouse button to see and modify
the block parameters.
 You can do the above by clicking the right
button and select the block parameters.
 Connect the input and outputs of the block
SIMULINK LIBRARIES

 Sources Used to generate input signals


 Sinks Used to display results/signals
 Continuous To represent continuous systems
 Discrete To represent discrete systems
 Math Some mathematical functions
Source
to generate input signals

 Step to generate step input


 Ramp to generate ramp input
 sine Wave to generate sine wave input
 Clock
 Constant
 Pulse generator
 Signal Generator
 …
Constant (SOURCE LIBRARY)
 The output of the constant block is a
constant number
Select the source library
click on the constant block
drag the block to the work file

Constant click on the block


update the parameters of the block
(change the constant)
Connect the block to other blocks
Step (SOURCE LIBRARY)
 The output of the step block is step function.
User can select step time, initial value (value
before step time) and final value (the value after)
Select the source library
click on the step block
drag the block to the work file
click on the block
step
update the parameters of the block
(change the step time, Initial value and
final value )
Connect the block to other blocks
Linear

 SUM
 GAIN
 Derivative
 Integrator
 State Space
 Transfer function
…
Gain (Linear library)

 Gain
select linear library
drag the GAIN to the work file
K click on GAIN to select the gain.
You can rotate gain block
gain
connect it to other blocks
Integrator (Linear library)

 INTEGRATOR
select linear library
drag the INTEGRATOR to the
work file
You can adjust initial conditions if
needed.
integrator
connect it to other blocks
Sink
 Display displays the numerical value of the signal
 Scope plot the signal
 To File save in a file
 To Workspace store the signal in a MATLAB
variable in the MATLAB
workspace
Sink
 To Workspace store the signal in a MATLAB
variable in the MATLAB
workspace.

workspace.

This is very useful when you want to do further


processing to the result of the simulation.
---click on the box to select the variable name---
Block diagrams for SIMULINK
Simulation
 simulate the following system
x  2 x  x  sin(2t )
x(0)  x (0)  0

define
x1  x  x1  x2
 
x2  x  x 2  sin(2t )  2 x2  x1
Example

+
sin -
-

sum integrator integrator

gain

adjust gain , sum and sine blocks


 Do the three exercises in the handout

You might also like