Escolar Documentos
Profissional Documentos
Cultura Documentos
Virtual Virtual Model Model Design Design (in (in Matlab) Matlab)
Jirka Roubal
roubalj@control.felk.cvut.cz http://support.dce.felk.cvut.cz/pub/roubalj/
Department of Control Engineering, Faculty of Electrical Engineering Czech Technical University in Prague www.cvut.cz 2009
1/19
ZRS
Contents
1. Simulink Model in Matlab 2. Mask of the Subsystem 3. VR Model 4. Examples
References
R OUBAL , J. (2009), Jirkovy stranky [online]. [cit. 2009-01-16], http://support.dce.felk.cvut.cz/pub/roubalj/ . EK , P. & R OUBAL , J., H U S
SPOL .
verze. http://support.dce.felk.cvut.cz/pub/roubalj/ . T HE M ATHWORKS (2008), The Mathworks [online]. [cit. 2008-07-20], http://www.mathworks.com/ .
J. Roubal, CTU in Prague 2/19
ZRS
u [V] and the system output is the level of the uid in the tank h [m].
the rotary-pump The minimum and maximum of the input voltage
3/19
ZRS
SPOL .
200x) (1)
(t) = ko h
h(t) + bu(t)
In the blocks in Figure 2 are lled variables condition of the integrator block 1/s.
J. Roubal, CTU in Prague
4/19
ZRS
Create subsystem. If
we doubleclick on the blue block in Figure 3, the model of the system (shown in Figure 2) will be opened.
If we click by right button of the mouse on the subsystem (blue block shown in Figure 3), we can Mask
Subsystem ... and draw some picture on the block, see Figure 5, set some
ZRS
Scope enough Limit data points to last and Save data to workspace - the data can be used in Matlab workspace to plot
Note, it is appropriate to set in the the graphs.
(a) Scope
6/19
ZRS
ZRS
ZRS
ZRS
Then, the model in the Simulink looks like in Figure 8(a) and if we doubleclick on the model, we can set the model parameters in the dialog window, see Figure 8(b).
(a) Subsystem
Figure 8: Subsystem with the mask in Simulink model and dialog window of the masked subsystem
10/19
ZRS
VR Model
3 VR Model
Now, we add from the VR Toolbox library blocks VR gure 10(b), we click on
and set the VR Signal Expander as in Figure 10(a) and in the dialog window shown in Fi-
New button. The VRML editor will open, see Figure 11, where we put some objects and change the name of the object (default name is Transform) and save the WRL le. Then, in dialog window, shown in Figure 12, click on scale in the water
branch. Then we can connect the output of the VR expander to the input of VR Sink, see Figure 13.
Figure 9: Simulink model of the system with Virtual Reality toolbox blocks
J. Roubal, CTU in Prague 11/19
ZRS
VR Model
(b) VR Sink
12/19
ZRS
VR Model
ZRS
VR Model
ZRS
VR Model
The Simulink model with the Virtual Reality of the Water Tank can be found in (R OUBAL , J. 2009).
15/19
ZRS
Other Examples
4 Other Examples
Several models with virtual realities were prepared within the students bachelor thesis and are described in (R OUBAL , J. et al. 200x).
16/19
ZRS
Other Examples
17/19
ZRS
Other Examples
ZRS
Questions ...
Questions ...
Prepare a Simulink model with the Virtual Reality within your semestral work.
19/19