A
Sumulated First Order System Using LabView
Introduction
The diagram below shows a simulated first order system with the following
properties.
-
The system satisfies a
difference equation.
-
Outputk+1
= DecayFactor*Outputk + Gain*Inputk
-
The Gain is not the DC
gain. Rather the DC gain is given by:
-
DC Gain = Gain/(1 - DecayFactor)
-
The output of the block
(when implemented as a vi) is the string labelled "Output String".
The numerical value of the output is converted to a string to facilitate
using with TCP/IP communication which can only transmit strings.
Those features are implemented in the diagram below.

In the diagram above, note the following.
-
The output is stored in
a shift register.
The
front panel for this vi is shown below.

Note the following in the front panel.
-
You can input the port
to use. Choose any unsed port. The one shown, 2055,
is a good choice since it is unlikely to be used by anything else in the
system.
-
The address must also
be entered. Although it shows localhost when the vi loads, you should
type the IP address of the remote computer there. The form is www.xxx.yyy.zzz,
the standard format for IP addresses.
-
Information you can enter
here is:
-
The desired output,
-
The proportional gain.
-
Information displayed
is:
-
The Measured Output -
numerically and on a "thermometer" display.
-
The Error - numerically
and on a "thermometer" display.
-
The number of iterations
the loop has run.
This
vi can get data from any remote system that is set up to provide data on
the measured output, and then act on a control effort signal that is sent
to it. The system is at the remote computer and connected to it with
any kind of computer controlled instruments (We have used IEEE488/GPIB
instruments) and the control algorithm is implemented in the LabView program
above.