Simulation parameters. • Algorithm's for numerical integration. • SIMULINK–
Libraries Signals&Systems, Subsystems. Matlab/Simulink. Dipl.-Ing. U. Wohlfarth
...
Simulink Basics
SIMULINK Basics
Matlab/Simulink Dipl.-Ing. U. Wohlfarth
Simulink Basics Content • What’s SIMULINK? • SIMULINK–Libraries Sources, Sinks und Math • Simulation parameters • Algorithm’s for numerical integration • SIMULINK–Libraries Signals&Systems, Subsystems
Matlab/Simulink Dipl.-Ing. U. Wohlfarth
SIMULINK Basics What’s Simulink? • Graphical modelling of dynamic systems by signal flow graphs • Addition to MATLAB (Toolbox) • Simulink–Additions: Blocksets (SimPower-Systems, SimMechanics) Sine Wave
−1
Clock Product1 80
Gain
Product3
eu Math Function
Product2
−1
Mux
gedaempfte Sinusschwingung
Gain1
Constant
Matlab/Simulink Dipl.-Ing. U. Wohlfarth
1
SIMULINK Basics Starting SIMULINK • Blocks are basic elements
• Blocks characterized by input, output, name, icon
• Double click opens Block P arameters dialog
Matlab/Simulink Dipl.-Ing. U. Wohlfarth
3
SIMULINK Basics SIMULINK block libraries Sources and Sinks Block library Sources: • Generation of signals • Import data from MATLAB workspace • Import of data from files
untitled.mat
1
Step
Signal Sine Wave Generator
From File
1 In1
Constant
simin
Ramp
Repeating Pulse Generator Sequence
From Workspace
Block library Sinks: • Graphical display of signals • Write data to MATLAB workspace • Write data to files
untitled.mat To File Scope XY Graph
simout
1 Out1
To Workspace
Matlab/Simulink Dipl.-Ing. U. Wohlfarth
4
SIMULINK Basics Example for Sources and Sinks
Signal 1
Signal 2
1 s Integrator
Scope
Signal Builder
Signal Builder : bsp sigbuild.mdl Signal Builder Dialog box for group of three signals
Matlab/Simulink Dipl.-Ing. U. Wohlfarth
5
SIMULINK Basics SIMULINK block library Math Opertions Block library Math: • Arithmetic, logical and relational operators • Mathematical and trigonometric functions etc. 1 eu Product
Math Function
Sum
Gain
AND
1
Logical Operator
Slider Gain
0)
While Iterator Subsystem
u1 else
If Enabled Subsystem
etc. Matlab/Simulink Dipl.-Ing. U. Wohlfarth
26
SIMULINK Basics Conditionally executed subsystems / Masking Conditionally Executed Subsystems • Execution controlled by control signal • comprise Enable or Trigger Masking of subsystems • building a new block from a subsystem • easier parametrization of complex subsystems • Setting up of user defined libraries Matlab/Simulink Dipl.-Ing. U. Wohlfarth
27
SIMULINK Basics Masking of subsystems Example bspmask.mdl x