Case Project - Control System in LabVIEW PDF
Case Project - Control System in LabVIEW PDF
University
College
Department
of
Electrical
Engineering,
Information
Technology
and
Cybernetics
Case Project
Faculty of Technology,
Tel: +47 35 57 50 00
Fax: +47 35 57 54 01
Table of Contents
Table
of
Contents
....................................................................................................................................
ii
1
Modeling
...........................................................................................................................................
3
1.1
Air
Heater
..................................................................................................................................
3
1.2
Level
Tank
..................................................................................................................................
4
2
Simulation
.........................................................................................................................................
6
2.1
DAQ
Device
...............................................................................................................................
6
2.1.1
DAQ
Assistant
....................................................................................................................
6
2.2
Model
Implementation
.............................................................................................................
8
2.2.1
Model
Adjustment
.............................................................................................................
9
3
Control
System
...............................................................................................................................
11
3.1
Discrete
Low-pass
Filter
..........................................................................................................
11
3.2
Discrete
PI
Controller
..............................................................................................................
12
3.3
Control
System
........................................................................................................................
12
3.4
Controller
Tuning
....................................................................................................................
13
ii
1 Modeling
1.1
Air Heater
Heater:
The
air
is
heated
by
an
electrical
heater.
The
supplied
power
is
controlled
by
an
external
voltage
signal
in
the
range
(min
power,
max
power).
Temperature
sensors:
Two
Pt100
temperature
elements
are
available
(some
of
the
Air
Heaters
have
only
one).
You
can
use
Temperature
sensor
1
in
this
assignment.
The
range
is
,
and
this
voltage
range
corresponds
to
the
temperature
range
(with
a
linear
relation).
A
simple
mathematical
model
of
the
system
could
be:
!"# =
1
!"# + ! ! + !"#
!
Where:
Modeling
!"#
is
the
environmental
(room)
temperature.
It
is
the
temperature
in
the
outlet
air
of
the
air
tube
when
the
control
signal
to
the
heater
has
been
set
to
zero
for
relatively
long
time
(some
minutes)
!"# = 21.5
Note!
All
of
the
devices
are
slightly
different.
It
is
necessary
to
run
som
experiments
in
order
to
find
the
optimal
values
for
your
device.
The
procedure
is
described
later.
1.2
Level Tank
The LM-900 Level Tank equipment will be used in this Lab Work:
Control
Signal:
A
pump
fills
the
tank
with
water
from
the
reservoir.
The
pump
speed
can
be
controlled
by
a
voltage
signal
in
the
range
0 5.
The
pump
can
be
controlled
by
an
external
voltage
signal
at
the
FROM
PC
connector.
Measurement
Signal:
The
measurement
is
a
voltage
signal
in
the
range
0 5
available
at
the
TO
PC
connector.
This
voltage
range
corresponds
to
a
level
range
of
0 20 ,
approximately
(unless
you
need
a
more
accurate
relation,
you
can
assume
this
range
in
your
applications).
Control System in LabVIEW
Modeling
Scaling:
You
need
to
scale
the
signal
0 5
to
0 20.
The
following
linear
relationship
applies:
= +
A
very
simple
(linear)
model
of
the
water
tank
is
as
follows:
! = ! !"#
or
=
1
!"#
! !
Where:
!"#
[3/]
is
the
outflow
through
the
valve
(this
outflow
can
be
modeled
more
accurately
taking
into
account
the
valve
characteristic
expressing
the
relation
between
pressure
drop
across
the
valve
and
the
flow
through
the
valve).
2 Simulation
2.1
DAQ Device
We
we
will
use
a
USB-6008
DAQ
unit
in
order
to
read
data
from
the
process
()
to
the
PC,
and
write
data
()
from
the
PC
to
the
process.
Simulation
Loopback
Test
(Analog
Out
connected
to
Analog
In):
Front
Panel
Example:
Control System in LabVIEW
2.2
Simulation
Model Implementation
The
model
(Level
Tank
or
Air
Heater)
should
be
implemented
using
the
blocks
(Integrator,
Transport
Delay,
Summation,
Multiplication,
etc.)
from
the
Simulation
palette
in
LabVIEW:
Air
Heater:
The
Air
Heater
model
can
be
implemented
as
a
Simulation
Sub
System:
Level
Tank:
The
Level
Tank
model
can
be
implemented
as
a
Simulation
Sub
System:
Simulation
This
means
that
we
plot
the
output
of
the
model
and
the
process
and
compare
them
after
a
change
in
the
control
signal.
If
they
are
almost
identical,
we
have
found
good
model
parameters,
if
not,
we
need
to
adjust
the
modelparameters
and
try
again.
LabVIEW
Example:
10
Simulation
Front
Panel
Example:
3 Control System
This
is
a
typical
block
diagram
of
the
system:
Since
LabVIEW
is
a
graphical
development
environment,
this
can
easly
be
implemented
in
LabVIEW.
3.1
1
! + 1
! !!!
!
Perform
simulations
to
make
sure
the
filter
works
as
expected.
Explain/Show
how
you
do
this.
Why
do
we
use
a
low-pass
filter?
11
12
3.2
Control System
Discrete PI Controller
!
!
! !!!
!
3.3
Control System
Implement
a
control
system
using
the
discrete
PI
controller
created.
Use
the
mathematical
model
of
the
system
in
the
simulations.
You
should
also
test
our
control
system
on
the
real
process
(Level
Tank
or
Air
Heater).
Note!
You
need
to
install
the
NI-DAQ-mx
driver
that
makes
it
possible
to
use
the
USB-6008
device
together
with
LabVIEW.
Set
up
hardware
and
software
according
to
the
sketch
below:
13
Control System
Make
sure
to
use
your
low-pass
measurement
filter
created
in
a
previous
task.
3.4
Controller Tuning
Use
the,
e.g.,
Skogestads
method
in
order
to
find
proper
PI
parameters
for
the
system.
Skogestads
method:
In
this
task
we
assume
the
following
process:
=
!"# ()
=
!!"
()
+ 1
The
Skogestads
method
assumes
you
apply
a
step
on
the
input
()
and
then
observe
the
response
and
the
output
(),
as
shown
below:
14
Control System
If
we
have
a
model
of
the
system
(which
we
have
in
our
case),
we
can
use
the
following
Skogestads
formulas
for
finding
the
PI(D)
parameters
directly:
Tip!
In
this
task
we
can
e.g.,
set
! = 10
and
= 1.5
(or
try
with
other
values
if
you
get
poor
PI
parameters).
Telemark
University
College
Faculty
of
Technology
Kjlnes
Ring
56
N-3918
Porsgrunn,
Norway
www.hit.no