Beruflich Dokumente
Kultur Dokumente
00
Printed in Great Britain. # 2005 TEMPUS Publications.
49
50 N. Patrascoiu
parameters. For the respective controls, the steps GRAPH display. To do this, the INDEX
of values corresponding to the real values of these ARRAY nodes are used for the input and the
parameters are chosen. The values set by these output. The right signal is selected to set the
controls represent the inputs for the script node index input of these nodes using the corres-
with real data type. ponding button on the front panel, so as to
Because the input vector has two components display the same signal by its connection to the
for generating the right signals, two blocs are built Matlab scrip input.
on the front panel. These two blocs are represented The right sequence of the simulation program is
in diagram bloc by a CASE structure with three necessary in order that the number of samples of
subdiagrams, which generates the standard signals the vector t, which represents the simulation time
(i.e. IMPULSE, STEP and RAMP). The subdia- in Matlab, is the same as the number of samples of
grams contain, respectively, Impulse Pattern.vi, the signal generation pattern. To do this in Matlab
Pulse Pattern.vi and Ramp Pattern.vi, and these script, the vector t that specifies the time samples
can be adjusted by the corresponding controls. for the simulation should have 5/0.01 1 501
Also, the control panel can be used to set para- components. It is also necessary for the number
meters such as amplitude, width (given by START of samples of the Ramp Pattern to be 501. For
TIME end STOP TIME) and delay (given by Stop Time control, Relative time (seconds) in the
START TIME) using either a knob or a slide Format & Precision option should be selected.
control (Fig. 4).
With the two arrays that contain the input
pattern, the BUIL ARRAY node can be used to CONCLUSIONS
obtain a new array that has values arranged in
rows that represent for a real system the input The Matlab lsim function simulates the (time)
signals. For a graphic representation of these, it response of continuous or discrete linear systems
can use a graphic display WAVEFORM GRAPH to arbitrary inputs and lsim (sys, u, t) produces a
type. The input vector requires a transpose array plot of the time response of the LTI model sys to
so that a vector can be obtained that is arranged in the input time history. If this function is incorpo-
two columns and in order that it can use the rated into a Matlab simulation program, such as
TRANSPOSE 2D ARRAY node to rearrange adding Matlab script to a LabView program called
the elements of the 2D array such that the 2D Virtual Instrument (VI), the input u can be
array [i, j] becomes a transposed array [j, i]. produced by a different signal generation function
Similarly, the same node is used at the output of in VI.
the Matlab script node because the output vector LabView starts Matlab and, if using the plot
of this node must be in rows and must have three (t,y) instruction after the lsim instruction in
columns that correspond to the three output Matlab script, a new Matlab window appears
signals. The input and the output terminals of labeled Figure No. 1, which displays the graphical
the Matlab script node corresponding to the responses of the DC motor outputs. In Fig. 7, the
input and output signals must be in Real Matrix similarity between the LabView and Matlab results
type. can be observed.
The input and output signals have different By means of controls placed on the front panel
forms and different value ranges (Figs 5 and 6), of the VI, the model parameters and the input
so that a selection of these signals is necessary signal parameters can be set. For example, where
using the AutoScale option of the WAVEFORM the load torque has a significant value, as shown in
54 N. Patrascoiu
Fig. 6, negative values appear for displacement program, it is possible to make comparisons
and speed outputs. This means that the motor between data acquired from a real system and
axle starts spinning the other way round. data obtained from a mathematical model of the
Also, because LabView is a data acquisition system.
REFERENCES