You are on page 1of 13

EL 256

MATLAB & SIMILINK

FOR ENGINEERS
06 – Simulink

Electrical and Electronic Engineering


SIMULINK
2

❑ What is Simulink

 Simulink is a graphical environment for building signal and system


dynamic simulations.

 In Simulink, systems are drawn on screen as block diagrams.


 Many elements of block diagrams are available for constructing
various dynamic systems

 The parameters of each signal and system block can be configured


by the user
SIMULINK
3

❑ What is Simulink
 Pressing on the “Simulink” button will create the appearance of the
“Simulink Start Page” shown . from where a blank model can be
produced by

 selecting the “Blank Model->Create Model” option.


SIMULINK
4

❑ Simulink Start Page


 selecting the “Blank Model->Create Model” option.
 After choosing the “Create Model” option, the Simulink window will
appear, as shown
SIMULINK
5

❑ Simulink Window
 After choosing the “Create Model” option, the Simulink window will
appear, as shown
SIMULINK
6

❑ Simulink Window
 Alternatively, Simulink can be started by typing “simulink” at
the Matlab command prompt
 >> simulink
 The Simulink library should appear

 Click File-New to create a new workspace, and drag and


drop objects from the library onto the workspace.

 Selecting Simulation-Start from the pull down menu will run


the dynamic simulation. Click on the blocks to view the data
or alter the run-time parameters
SIMULINK
7

❑ Simulink Library Browser


 The Simulink Library Browser contains all the blocks that are
available in the Simulink arranged according to applications and
operations. By clicking on the “Library
 Browser” option from the Simulink header toolstrip, it can be
accessed. The appearance of the Simulink Library Browser window
is shown
SIMULINK
8
SIMULINK
9

❑ Simulink Library Browser


 In the Library Browser window, different fields appeared on the
left side, such as Simulink, Aerospace Blockset, Audio Toolbox, etc.
 In each of these fields, there are many subfields that incorporate
several distinctive blocks. All of these blocks can be utilized to
create a new model.
 Any of the blocks from this browser can be dragged to the Simulink
Model Design window.
 There is a search option at the top of the browser, through which
any particular block can be searched by the name as well.
SIMULINK
10

❑ Building a simple model


 To build a simple model to add inputs:
 Drag the block named “Add” into the Simulink Model Design
window from
 “Simulink Library Browser->Simulink->Math Operations->Add.”
SIMULINK
11
SIMULINK
12

❑ Building a simple model


 To build a simple model to add inputs:
 Add connecting lines
SIMULINK
13

❑ Special Variables in Matlab


 Special variables:
 ans : default variable name for the result
 pi:  = 3.1415926…………
 eps:  = 2.2204e-016, smallest amount by which 2 numbers can differ.
 Inf or inf : , infinity
 NaN or nan: not-a-number
 Commands involving variables:
 who: lists the names of defined variables
 whos: lists the names and sizes of defined variables
 clear: clears all varialbes, reset the default values of special variables.
 clear name: clears the variable name
 clc: clears the command window
 clf: clears the current figure and the graph window.

You might also like