Вы находитесь на странице: 1из 16

Experiment # 07

MODELING AND CONTROL OF A


LIQUID TANK:
WATER LEVEL REGULATION & FLOW RATE CONTROL

Professor Chao-Chung Peng


CONTENT
Section 1: LEARNING TARGET......................................................................................................... 3

Section 2: SYSTEM DESCRIPTION OF A LIQUID TANK ..................................................................... 4

2.1 Experimental Hardware Instrument................................................................................... 4

2.2 Mathematical Modeling..................................................................................................... 4

2.2 Model Reduction ............................................................................................................... 6

2.3 Steady State Analysis ........................................................................................................ 7

2.4 Experimental Procedure .................................................................................................... 7

Section 3: WATER LEVEL REGULATION EXPERIMENT .................................................................... 8

3.1 Pressure Sensor Unit Conversion Table ............................................................................ 8

3.2 First-Order System Identification ..................................................................................... 9

3.3 Controller Design and Analysis....................................................................................... 10

Section 4: FLOW RATE CONTROL EXPERIMENT ............................................................................ 13

4.1 Unit Conversion Table of Sensor .................................................................................... 13

4.2 Pump Dynamics Identification ........................................................................................ 14

4.3 Controller Design and Analysis....................................................................................... 15

Section 5: CONCLUSION ................................................................................................................ 16


Section 1: LEARNING TARGET

So far, for the automatic control system course, we have learned lots of classical
control theories. In those theories, linear systems are usually considered. However, for
most of real applications, systems are usually nonlinear. Hence, in this teaching material,
we firstly focus on the mathematical modeling of a liquid tank, which is a nonlinear system.
Next, linearization is applied to get the linearized model and the corresponding transfer
function. Therefore, we can use certain design analysis techniques on a given transfer
function, including controller design. Moreover, in the real world, most of system
parameters are unknown or cannot be described exactly. So, system identification will be
one of the learning targets.
Briefly, if one wants to use theoretical method that we have learned in the course
to design a controller, first step we need to do is learning how to find system models. The
purpose of experiment is using a liquid tank to practice how to get linearize system
mathematical model and identify system parameters simultaneously. Based on the
modeling and identification results, we will further learn how to design a continuous
control and then realize it in a discrete environment. Finally, comparing the mathematical
system model together with the result of experiment, we are able to verify that whether the
real system response is in accordance with our system identification model. In this course,
we consider a liquid tank to be our experimental platform. The tank system has been widely
used in industrial applications especially in chemical/energy-reproduction process
industries.
Section 2: SYSTEM DESCRIPTION OF A LIQUID TANK

2.1 Experimental Hardware Instrument

Fig. 1. A liquid tank model and the real plant.

In this experiment, a G30A/EV (LEVEL-PRESSURE-FLOWRATE


TRANSDUCERS ) model, as shown in Fig. 1, from Elettronica Veneta Company is used.
The goal of this experiment is to regularize a prescribed liquid level (or the so-called
leveling control) suffering from water leakage. This can be taken as a robust control design
issue for system subject to unknown external perturbations.

2.2 Mathematical Modeling

In the following, we are going to consider a single tank for flow rate control and
water level regulation.
Firstly, a single tank subject to pump dynamics can be modeled as follows
h A = (
1
SA
Q p c hA ) (1)

Q p = (v p Q p )
1
(2)

where the parameters are defined as follows:
hA : water level S A : water tank area
c : valve resistance Q p : supplied flow rate
: time constant : voltage scaling factor
v p : applied control input voltage
For the water leveling dynamics, taking the linearization procedure w.r.t to the
( )
equivalent points h A , Q p gives
c 1
h A = h A + Q p (3)
2S A hA SA
Since the system (3) is now linear, applying the Laplace transform leads to
1 2 hA 2 hA
h A (s ) SA c c
= = =
Q p (s ) c
1
(4)
s+ c s +1
2S A
s +1
hA
2S A hA c
2S A hA
Considering a standard 1st order transfer function shown as follows
G (s ) =
K
(5)
Ts + 1
From (3) and (4), one can find that
2S h
T = A A
c
(6)
2 hA
K =
c
Moreover, (6) also reveals that
T
SA = (7)
K
Next for the linear pump dynamics (2), the transfer function can be represented by

Q p (s )
= =
v p (s )
(8)
s+
1 s + 1

st
Again referring to the 1 order TF gives
T =
(9)
K =
Therefore, from the flow rate experiments, the pair ( , ) can be easily obtained via
applying a step input test.
Based on (4) and (8), the transfer function representation between the applied voltage and
the water level output can be described by
2 hA
h A (s ) Q p (s ) h A (s ) c
= =
v p (s ) v p (s ) Q p (s ) s + 1 2 S A
(10)
hA
s +1
c
which is clearly a 2nd order system.
One can further represent (10) by
2 h A
h A (s ) c
=
v p (s ) 2S h 2S h
A A
s 2 + + A A s + 1
c c


S A
=
c + 2S A h A c
s2 + s+ (11)
2S A h A 2S A h A
c
2 h A 2S A h A
=
c c + 2S A h A c
s2 + s+
2S A h A 2S A h A
n2
=
s 2 + 2 n s + n2
where
2 h A c + 2S A hA c
= , 2 n = , n2 = (12)
c 2S A h A 2S A h A

2.2 Model Reduction

Note that providing the dynamics of water leveling is very sluggish and the transient
response of the pump cam be ignored (i.e., 0 ), then the overall system dynamics could
be governed by
h A =
1
SA
(
v p c h A ) (13)
Under this circumstance, the linearized model becomes
h A (s ) 2 h A / c
=
Q p (s ) 2 S A h A / c s + 1
(14)

and thereby
2S h
T = A A
c
(15)
2 h A
K =
c
In the following experiment, (14) is considered for water leveling regulation.
2.3 Steady State Analysis

When the system reaches steady state; that is,


h A = 0
(16)
Q = 0 p

From (1), it reduces to

SA
(
1 ss
Q p c h Ass = 0 ) (17)

v ssp Q pss = 0 (18)


which can be further represented by
Q pss = c h Ass (19)
v ssp = Q pss (20)
Form (19) and (20), it gives
c
v ssp =hA ss
(21)

This equation shows that the relation between the supplied voltage v ssp and the water level
h Ass is actually nonlinear.

2.4 Experimental Procedure

Step 1: Measure the relatively ratio of physical unit between water level and voltage,
finding out their mathematical relationship. Since our main focusing point is controlling of
the water level, we must realize the scaling factor between the ADC voltage and the real
water level height.
Step 2: This step is identifying tank system (first-order system). Because of ripple
in low water value, there is difficult to get an accurate measurement when using voltage to
measure. This phenomenon is usually caused by certain nonlinearities existing in the
physical model. To avoid this situation, a better solution is to increase the voltage after the
water level in a specific height.
Step 3: According to the experimental model, designing proper control parameters
for PI controller based on what we have learned about the concept of controller design, and
then make it into discrete form and realize it into the experiment system. Finally, compare
and analyze the experimental result.
Section 3: WATER LEVEL REGULATION EXPERIMENT

3.1 Pressure Sensor Unit Conversion Table

First, fill up the tank, and drain the water slowly (or by a step-by-step manner).
Read the measurement data and fill them into Table. 1. Based on the result, plot a graph
with the result data. You will obtain a linear curve as shown in Fig. 2. Finally, from the
graph, find out the linear relationship between data; that is, the scaling factor.
Table. 1. Conversion table between water level and sensor
Voltage after
Water level(mm) Voltage (V)
translation(V)
500
450
400
350
300
250
200
150
100
50
0

6
Pressure Sensor Voltage(volt)

-1
0 50 100 150 200 250 300 350 400 450 500
Water Level(mm)

Fig. 2. Ideal linear relationship between water level and pressure sensing voltage.
From Fig. 2, it can be observed that the scaling factor between the water level and
ADC voltage is approximately ________mm almost equal____1____volt. After finishing
sensor calibration, go for the next step: system identification.

3.2 First-Order System Identification

Recall a 1st order system, the step response is illustrated in Fig. 3. For the
1st order system, the input/output transfer function can be modeled as
Y (s )
G (s ) =
K
=
U (s ) Ts + 1
(22)
where the input U (s ) is applied voltage and the corresponding system output Y (s ) is the
water level. For (22), T represents the time constant and K is a gain value. Both the
values need to be identified.

Fig. 3. First-order system step response


3

2.5

2
Applied Voltage(volt)

1.5

0.5

0
0 50 100 150 200 250 300
Time(s)

Fig. 4. Excitation signal and the corresponding response


Fig. 5. Experiment and simulation comparison

Applying the stair-like step input, where the holding time for each step is 300 secs.
Then one can observe the output response as shown in Fig. 4.
Based on output response and the definitions of Time Constant and Steady-State, we
are able to estimate T=________K=________.
Finally, using Simulink to simulate and compare with the experiments that we just identify.

3.3 Controller Design and Analysis

In the liquid tank experiment, a PI controller is applied for the system to achieve
desired water level reference. Let the PI controller as

U (s ) K
C ( s) = = KP + i (23)
E (s ) s

Fig. 6. System block diagram

The closed-loop transfer function is


y(s) C (s) G(s)
= (24)
R( s) 1 + C ( s) G ( s)
Based on the use of the PI controller, (24) can be further represented by
KPs + KI K

y(s) s Ts + 1 T 1 KK I s + T 1 KK I
= = 2 (25)
R( s) KPs + KI K s + T 1 (1 + KK P )s + T 1 KK I
1+
s Ts + 1
Recall the standard second-order characteristic equation
(s ) = s 2 + 2 n s + n2 (26)
Comparing the denominator of (25) and (26) gives
2 n = T 1 (1 + KK P )
2 (27)
n = T 1 KK I
For the closed-loop system, it is desired that the damping ratio satisfies that [0.5,0.7]
[ ]
While natural frequency range should be 3T 1 ,5T 1 . Note that inadequate selection
of control gain may cause input voltage higher than 8V and thus saturation phenomenon
will be induced.
Based on the identification result and considering = 0.6 and n = 4 (T ) , we get
1

Kp=________Ki=________.
Note that the controller is designed in the continuous domain, one must transform the
controller into the discrete domain (or z-domain) for realization purpose.
To this aim, consider the following simplest method; that is, the so-called backward z-
transform
1 z 1
s= (28)
Ts
where Ts denotes as a sampling period.
By substituting (28) into (23), the discrete time PI controller can be represented by
Ts
U (z ) = K P E (z ) + K I E (z ) (29)
1 z 1
The control forces can be further represented by the following input/output difference
equation.
( ) ( )
U (s ) 1 z 1 = K P 1 z 1 E (s ) + K I Ts E (s )
(30)
u (k ) = u (k 1) + K P e(k ) K P e(k 1) + K I Ts e(k )
which can be easily realized in a digital environment.
Since the aforementioned controller design is based on the linearized model (4), we
should firstly force the level reaching a prescribed equilibrium point. For example, 300mm
is considered to be an equilibrium point. When the water level reaches 300mm, switch to
the closed-loop control and the regulation reference command is changed to be 310mm.
Try to observe the experimental result. Fig. 7 demonstrates the experimental result by
controlled PI.
Fig. 7. Comparison between simulation and experimental results.
Section 4: FLOW RATE CONTROL EXPERIMENT

The experiment procedure can be summarized as follows:


Step 1: Measure the relatively ratio of physical unit between flow rate and voltage,
finding out their mathematical relationship. Our main focusing point is on the control the
flow rate.
Step 2: This step is to identify the pump dynamic system (which is a 1st-order
system). First, stabilize water of flume into a flow rate and try to give a step input test
signal. Observe the corresponding step response and determine the system coefficients.
Then, conduct a simulation to compare it.
Step 3: Choosing a PI controller based on what we have learn about the concept of
controller design, and apply into the experimental system, compare and analyze the
experimental result.

4.1 Unit Conversion Table of Sensor

Table. 2. Conversion table between flow rate and sensor


Voltage Input(V) Flow Rate(l/min) Sensor Voltage(V)
2
2.5
3
3.5
4
4.5
5
5.5
6
6.5
7
7.5
8
Sketch a graph by using the table and find a relation equation between sensor voltage and
flow rate:
Flow Rate = * Sensor Voltage + .
4.2 Pump Dynamics Identification

The detail of 1st-order system identification is the same as the one presented in the
previous water level experiment. When identifying system, set 3V input voltage and wait
for a steady state flow rate, and then increase the voltage input to 6V. After the system
reaches stable, use the second half response to do our system identification.
From Fig. 8, it clearly shows that the transient response of the flow rate (governed
by (2)) is much faster than the transient response of the water leveling (governed by (1)).
This is the main reason that the reduced dynamics (14) is applied for leveling control.

Fig. 8. Stair-liked response of flow rate.

Fig. 9. Identification and comparison of pump dynamics.


Based on the experiment, we can get the T=________K=________; Finally, try to
using Simulink to simulate and compare with the open-loop system that we just identify.
4.3 Controller Design and Analysis
In this section, we also consider a PI controller for flow rate control. The controller
configuration is already shown in Section 3.3.
For the experiment, one can set 1.0(l/min) as an initial flow rate and then set 1.5(l/min)
to be the new regulation point. Please provide your control gains and compare the
experimental result with the closed-loop simulation. Fig. 10 demonstrates the result.

Fig. 10. Comparison between simulation and experimental results.

The control gains are : Kp=________Ki=________


Section 5: CONCLUSION

(Please provide your observations and make some conclusions for this experiment. In
addition, highlight it if you found something important!!)

Вам также может понравиться