Simulink Overview: open simulink to open simulink Library Browser
Simulink Overview: library browser and building a model Double click to edit parameters Brief description on the top Right click for more setup options
Simulink Overview: useful blocks Source – for inputs Math operations – for connections User defined fcn – for nonlinearity Sink – for outputs Discrete – for G(z) Continuous – for G(s)
Simulink example: PID controller parameters are set/changed in the workspace In workspce: tout as simulation time, retrieve results via u.signals.values
Simulink interaction with MATLAB workspace Read parameters from workspace directly Read input signals from workspace: Sources From workspace Dump outputs into workspace or a.MAT file Retrieve the system model from.mdl file via linmod(): need specifying input/output ports generate a state space model does not require opening simulink or the model
Simulink example: using subsystem + in/out ports Ex6.8: with PID controller PID controller as a subsystem Main control loop
MIMO case – build each channel When simulink continuous-time single loop with few blocks – coding discrete-time slightly more complex – coding simulink otherwise Draft a block diagram before building simulink model keep things tidy & good for debugging (Jun