Professional Documents
Culture Documents
I t d ti t Introduction toSimulink Si li k
Trento,762012
Generalinformation
SIMULINK is a MATLAB toolbox for the simulation of dynamic systems It has a graphical editing interface that allows system modeling in a bl k diagrams block di fashion. f hi It is capable of dealing with linear, linear nonlinear, nonlinear continuous time, time discrete time, multivariable and multirate (different sampling time) systems. Blocks are included in general/specialized libraries, e.g. signal and control system ones.
Basicblocklibraries
Simulationofadynamicsystem
1. Model definition
2. Model codification
Simulationofadynamicsystem
Simulation:
Define model parameters p Compute theinitial state Define inputtime history Compute time behaviour Analyze results Modeling C difi i Codification
Iterative process
Simulationofadynamicsystem
Matlab andsimulink areintgrated onewiththeother
Writearrays Vout,t MATLAB WORKSPACE Inthe simulation instants SIMULINK MODEL
R dR,C Read RC
Simulationofadynamicsystem
Simulation parameters/settings
Example Modeldefinition
Simplemechanicalsystem
ACCELERATION
SPEED
DISPLACEMENT
Example codificationinSimulink
METHODN 2 Transferfunction Canbeapplied pp only ytolinearsystems: y transferfunctioncanbe definedaspolynomialratio FromequationofmotionsusingtheLaplacetransformthetransfer functionisderived
Time domain Laplace domain
TF T.F
Example codificationinSimulink
METHODN 2 Transferfunction
Todefineatransferfunction,numeratoranddenominatorpolynomial coefficientsareneeded
Example codificationinSimulink
METHODN 3 Statespacerepresentation Canbeapplied pp only ytolinearsystems y Statespacematricesareneeded
State equation
Output equation
I Simulink In Si li k the th bl block kState St t Space S i devoted is d t dto t this thi operation ti
Example codificationinSimulink
METHODN 3 Statespace representation
Example proportionalcontrol
Onthepreviousexampleaproportionalcontrollerisapplied:thecontrol actionisproportionaltothepositionerror