You are on page 1of 17

Introduction to Simulink

Peter Dannenmann

Introduction to Simulink

What is Simulink?

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

High-Level Simulation Tool

Models are implemented


graphically by combining
function blocks provided by
libraries

Introduction to Simulink

What is Simulink?
Simulink is typically used for

Quasi-continuous
simulation

Event-controlled simulation

Typical systems to be
simulated are

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

Technical systems

Biological-technical
systems

Business processes

and many others

Introduction to Simulink

What is Simulink?
Introductory Video What is Simulink? provided by The MathWorks, Inc.
Here we will show the link to the video, e.g.
http://youtu.be/ZWykSmtZ-zc

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

Introduction to Simulink

My first Simulink Model


Remember the Model
Development Life Cycle
presented in Chapter 1
Simulink is the tool we use
here to implement the
mathematical model

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

Introduction to Simulink

My first Simulink Model


Mathematical operations are
represented by function blocks
provided by several libraries
Equations are modelled by
dragging and dropping blocks
from the library to the model
editor and connecting blocks
according to the equations

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

Introduction to Simulink

My first Simulink Model


Tutorial Video Modelling Algebraic Equations provided by The MathWorks,
Inc.
Here we will show the link to the video, e.g.
http://youtu.be/6cOBtlWw2CI

Tutorial Video Modifying Block Parameters provided by The MathWorks, Inc.


Here we will show the link to the video, e.g.
http://youtu.be/yDIYSJejbbo

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

Introduction to Simulink

Numerical Integration in Simulink


Order of execution of function blocks in Simulink
Source function blocks are executed first
Then function blocks are executed along the lines propagating the signals

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

Introduction to Simulink

Numerical Integration in Simulink


Uc

Remember the charging


capacitor that we used as an
example in homework 3.4 in
chapter 1

C
U

I (t ) =

d
U U c (t )
=
Q (t ) =
dt
R

Dr. Peter Dannenmann

When we want to simulate the


charging process in a quasicontinuous simulation we have
to use the differential equation
shown here.

Q (t )
C
R

t + t

Q (t + t ) = Q (t ) +

Modelling and Simulation using MATLAB

I (u)du
t

Introduction to Simulink

Numerical Integration in Simulink


Modelling the numerical integration of differential equations
In our example, the current I loading the capacitor depends on the charge Q inside it
However, also the charge Q inside the capacitor depends on the current I
Such circular dependencies are called signal feedback

I (t ) =

d
U U c (t )
Q (t ) =
=
dt
R

Q (t )
C
R

t + t

Q ( t + t ) = Q ( t ) +

I (u)du
t

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

10

Introduction to Simulink

Numerical Integration in Simulink


Tutorial Video Modelling Systems with Signal Feedback provided by The
MathWorks, Inc.
Here we will show the link to the video, e.g.
http://youtu.be/8o2H43UmZ1Q

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

11

Introduction to Simulink

Grouping Signal Lines


Lots of data have to be
modelled to represent a
system.
These data have to be
transferred between the single
function blocks as signal lines
Example: Water parameters.
(See application Modelling of
a Water Treatment Plant)
Grouping is necessary to avoid
simulation models that are
overloaded with signal lines

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

12

Introduction to Simulink

Grouping Signal Lines


Grouping Signal Lines: Models
are structured better.
In combination with
hierarchical modelling
techniques (see next unit), big
simulation models remain
easily readable and
understandable.

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

13

Introduction to Simulink

Grouping Signal Lines


Tutorial Video Grouping Multiple Signals into one Signal Line provided by
The MathWorks, Inc.
Here we will show the link to the video, e.g.
http://youtu.be/DbxL8giSq_A

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

14

Introduction to Simulink

Hierarchical Structuring of Simulink Models


Without hierarchical structuring
larger simulation models
become crowded and
confusing.

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

15

Introduction to Simulink

Hierarchical Structuring of Simulink Models


Hierarchical structuring is
performed by introducing
subsystems.
Subsystem: Part of the model
that describes a logical or
physical sub-unit of the
complete system.
Hierarchically structured, also
large and complex simulation
models remain readable and
comprehensible.

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

16

Introduction to Simulink

Hierarchical Structuring of Simulink Models


Tutorial Video Creating Subsystems provided by The MathWorks, Inc.
Here we will show the link to the video, e.g.
http://youtu.be/eOniebWs9rU

Tutorial Video Improving Model Readability provided by The MathWorks, Inc.


Here we will show the link to the video, e.g.
http://youtu.be/pXEB4r15rfs

Dr. Peter Dannenmann

Modelling and Simulation using MATLAB

17

You might also like