Engineering and Design Tools - TSOC 302 and TSOC 303 - 7.5 Modelling With Matlab - Simulink
Matlab is a mathematics package which has particularly strong capabilities at manipulating matrices. A useful introductory guide is ref. MS1. The part that we are interested in is the Simulink simulation part of the package. This is intended for analysing the performance of control systems and the behaviour of dynamic systems.
Once Matlab is started from the icon, Simulink is started by typing simulink [rtn] in the command window.
7.5.2 Practical Details
Systems are modeled by dragging and dropping appropriate elements into a modeling window. A range of elements are available from libraries including:
values are set by right clicking with the cursor over it then clicking on Block parameter and entering
the appropriate value in the parameter form that is shown and then clicking OK.
For example if a torque is to be applied as an input to a rotary system and the value of the angular acceleration is the required output, then a gain element is required and the parameter needed - the gain constant - is equal to the inverse of the equivalent moment of inertia. If the angular velocity is required then the angular acceleration is fed as the input to an integrating element which provides velocity as the output.
To connect a link into an existing link (e.g. to provide a feedback link) place the cursor over the position on the link where you want the branch to start then press [cntrl] and the left hand mouse button and take the link to the required input port or summing point and release the mouse button.
For anything other than a simple model it is a good idea to include a number of oscilloscopes at different places in the model so that any unexpected results can be investigated.
Check the Start and Stop times are appropriate by clicking on the Simulation tab and clicking on the Simulation parameters sub - menu. The time step settings should be left set to auto initially.
The simulation is run by picking the Start command from the Simulation menu.
To view results click on the auto-scale icon (the binoculars) on all the oscilloscope windows.
Think - do the results look believable? Carry out some sort of check if at all possible.
MS1. 'An Introduction to Matlab', by D M Etter and D C Kuncicky, Prentice Hall, 1999.
Return to module introduction
David J Grieve, 16th July 2002.