Lab Session 7
Lab Session 7
t = 0:0.1:50;
m = 2; % value of mass (Kg)
fv = 0.7; % value of viscous damping (N-sec/m)
k = 1; % value of spring constant (N-sec/m)
s = tf('s'); % sets up transfer function input mode
sys = (1/(m*s^2+fv*s+k));
y = step(sys,t);
plot(t,y);
grid on;
This complete system can also be converted into a subsystem. To build a subsystem, select all the components
except the step input and the scope blocks. Now right-click on the selected components and select "Create
Subsystem" from the options.
Steps:
1.Create a subsystem and change its name Subsystem to MSD Model.
2. Write click on Model and go to
Mask Create Mask;
Mask editor window will appear where all the parameter are added. Make following changes and preview them;
(i) In Icon & Ports Tab, type image(‘imagename.jpg’);
The path of icon image should be the same as for simulink model.
(iv) In documentation tab, we can type the model type, and little introduction about the model.
Watch the Video Demo: How to create mask of a subsystem in Simulink Matlab
https://youtu.be/6V-HdFza2JM
Or follow the tutorial here,
http://tutorialhunk.com/how-to-create-mask-of-subsystem-in-simulink/