0% found this document useful (0 votes)
15 views32 pages

Simulink 2

Uploaded by

Mab Abdul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views32 pages

Simulink 2

Uploaded by

Mab Abdul
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

Introduction to SIMULINK

1
Simulink
2

Used to model, analyze and simulate dynamic systems


using block diagrams.
Simulink is a graphical, “drag and drop” environment for
building simple and complex signal and system dynamic
simulations – therefore is easy to use.
It allows users to concentrate on the structure of the
problem, rather than having to worry about a programming
language.
We simulate a model to study the behavior of a system –
need to verify that our model is correct
Launch Simulink
3
Create a new model
4

Click the new-model icon in


the upper left corner to
start a new Simulink file

Create new model under


file/new/model.
Your workspace
5
Simulink- libraries
6

Sources: blocks that have only output, generators,


constant,...
Sinks: blocks that have only input, scope, to worspace..
Continuous; integrator, transfer function..
Discrete: discrete transfer function, unite delay,
memory..
Math operations: gain, product, sum, trigonometric
functions..
User defined functions: S-function, S-function builder,..
SimPowersystem: Electrical blocks – electrical sources,
machines, measurements, ….
Libraries ….
7
Creating a model
8

Model is created by choosing the blocks from different


libraries, dragging them to model window and linking
them.
The parameters of block (shown on picture, sine wave
parameters), can be reached with double click on the block.
Select an input block
9

Drag a Sine Wave block from


the Sources library to the model
window
Select an operator block
10
Select an output block
11

Drag a Scope block from the Sinks library to the model


window
Connect blocks with signals
12

Place your cursor on the


output port (>) of the
Sine Wave block
Drag from the Sine Wave
output to the Integrator
input
Drag from the Integrator
output to the Scope
input
Arrows indicate the
direction of the signal
flow
Set block parameters
13

The parameters of block (shown on picture, sine wave


and integrator parameters), can be reached with
double click on the block
Configuration parameters
14

Numerical solver method, start time, stop time (it


can be also set directly)...
Run the simulation
15

In the model window, from the Simulation pull-down


menu, select Start
Simulation results
16

Double-click on the Scope to view the simulation results


Summary
17

Type the following 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
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Thanks
32

Questions ??

You might also like