Liquid Level Mathematical Description

advertisement
Liquid Level Mathematical Description
Paul Petzar
Phil Wetzel
Jim Ritter
September 25, 2003
Abstract
In this lab, we determined a mathematical description of the water column apparatus. By
finding step and steady state responses to motor voltages, we found a first order transfer
function that approximates the operation of the system very closely, G(s), where the input
is the voltage minus 2.34V and the output is the height above the pressure sensor.
G s  
9.63
8.81  1
This description is only correct if the water column is already at the pressure sensor or
higher.
Introduction
The apparatus consists of a water jug with a valve at the bottom and a clear plastic tube
sticking out the top. Refer to Figure 1 below for a diagram. A small electrically powered
pump draws water out of the bottom of the jug and drops it into the top of the tube via
surgical tubing. The apparatus described in this report is labeled as “Liquid Level System
#3” and bears a mark “DEAS ROCKS” near the motor. This is important as each system
has a slightly different motor and orifice
size, which causes both drain and pump
rates to change.
Before finding a mathematical description
of the system, we must define its inputs
and outputs. For the purpose of this lab,
we defined input as voltage supplied to
the pump motor and output as the height
of the water column above the pressure
sensor measured in inches.
We have two methods of measuring the
height of the water in the column. First,
there is a differential pressure sensor with
its input mounted near the bottom of the
tube. The pressure sensor provides a
voltage output that can be converted to
Figure 1: Liquid Level Apparatus
inches. The second height measurement
available is marker hashes on the plastic
tube, marked in inches above the pressure sensor’s input. It is important to note that both
of these methods measure height of the water column with respect to the pressure sensor,
which is mounted about four inches above the orifice. This is only relevant in determining
drain velocity, so in this document and in our mathematical model we measure height of
the water with respect to the pressure sensor unless otherwise stated.
Procedure
The electric pump was powered by a variable six volt supply, allowing us to change the
system’s input on the fly. The pressure sensor required twelve volts, which we powered
with a 25V variable supply. The output from the pressure sensor was measured with an
oscilloscope, providing the ability to download the data to a desktop workstation via a
GPIB instrument interface.
We first found a relationship between the height of the water column as marked by the
hashes and the output of the pressure sensor. This relationship turned out to be linear, and
is shown in Appendix A.
We then measured the steady state response of the system by finding the stable final height
of the water column for different motor voltages, which is shown in Appendix B. The
relationship was found to be nearly linear, allowing a fit with R2 = .9956.
These measurements were followed by step response measurements for different voltages
in an effort to find a time constant (Appendix C).
Results
The steady state response of the system behaved linearly with respect to the voltage
applied to the pump, as long as the input voltage was about 2.4V. The pump was not able
to push enough water to maintain a height above the pressure sensor at any voltage below
2.4V. The data for these measurements are available in Appendix B, but can be fitted by a
linear curve (Equation 1) with an R2 of .9956.
hsensor  9.63V pump  23.31
Equation 1
The step response of the system is an exponential decaying growth that resembles the step
response of a first order system. Working with this information, we decided to try to find a
first order transfer function that would describe the column height as a function of voltage
input to the motor.
A time constant was found by averaging the time constants found graphically from step
responses at 3, 3.5, 4, and 4.5 volts (shown in Appendix C), and found to be about 8.81
seconds. If we ignore the behavior of the column at low levels and the resulting offset, we
obtain the transfer function in Equation 2.
G s  
9.63
8.81  1
Equation 2
To account for the offsets and lower limit of input voltage for linear operation, our system
diagram appears in Figure 2. To reiterate, this system is only correct in linear operation,
defined as input to the system at 2.4V or above and present output of the system at zero
inches or greater (with respect to the sensor).
2.4V
Input
+
G s  
9.63
8.81s  1
Output
Figure 2: System Block Diagram
Conclusion
The liquid level system is described by a first order transfer function with very good
accuracy. This transfer function should be usable as a starting point for designing a control
system for controlling the height of the water column.
Appendix A – Pressure Sensor Output
To calibrate the pressure sensor, we found its output voltage for a series of known water
column heights. Again, all following heights are measured with respect to the pressure
sensor, not the orifice.
Voltage
Height
(Pressure)
16.3
3.32
10.6
2.345
5.6
1.522
8.1
1.962
14.3
2.962
22
4.18
14
2.869
3
1.12
2
0.931
1.1
0.793
Table A1: Pressure Voltage vs. Column Height
Table A1 is graphed and curve fitted in Figure A1:
Pressure Sensor Output
(V)
Pressure Sensor Output vs. Column Height
5
y = 0.1629x + 0.6198
R2 = 0.9996
4
3
2
1
0
0
5
10
15
Height (inches or marks)
Figure A1: Pressure Sensor Output vs. Column Height
This data results in the relationship
Vsensor  .163hsensor  .620 (Volts),
or
hsensor  6.13Vsensor  3.8 (inches)
20
25
Appendix B – Steady State System Response
Table B1 contains three trials of the steady state response of the system. In each trial and
voltage, the system input was adjusted to the listed voltage and the height of the column
was measured after it stabilized. Some of the data points vary wildly across trials, as for
some reason the motor’s flow rate varied substantially and unpredictably. The motor could
be “steady” across a range as great as an inch and a half during a five minute period.
Voltage
2.340
2.500
2.600
2.650
2.688
2.750
2.875
3.000
3.125
3.250
3.375
3.500
3.750
4.000
4.250
4.375
4.500
Height (1)
Height (2)
0
0.7
1.4
1.8
2.6
4
4.5
6.6
6.4
7
9.7
10.4
12.5
16
17.5
19.4
24
Height (3)
0
0.7
1.3
1.8
3
3.3
4.5
5.3
6.4
7.2
9.7
10
12.3
15
17.5
19.4
22.7
0
0.7
1.35
1.8
2.75
2.5
4.5
5
6.4
7.5
9.7
10.5
12.4
14.5
17.5
19.4
24
Average
0.00
0.70
1.35
1.80
2.78
3.27
4.50
5.63
6.40
7.23
9.70
10.30
12.40
15.17
17.50
19.40
23.57
Table B1
Figure B1 plots the data from Table B1 and shows a linear curve fit.
Height vs. Motor Voltage
Column Height (inches)
25
20
y = 9.6266x - 23.318
R2 = 0.9956
15
10
5
0
-5
0
1
2
3
4
5
Motor Input (V)
Figure B1
This data gives the linear relationship between Motor Input and Column Height discussed
in the Results section.
Appendix C – System Step Responses
The following graphs are the timed step response of the system to voltage inputs. The
trials shown below were not continued to steady state since the final values were already
known from the results discussed in Appendix B.
On each graph, the steady state height is shown with a light triangle on the Y axis, and .63
of the steady state height is marked with a black diamond. These marks were used to
graphically determine the time constant of each trial.
3 Volt from Zero
1
Height (V)
0.8
0.6
0.4
0.2
0
-0.2
0
5
10
15
time (s)
Figure C1: 3 Volt Step Response, τ = 9.25 s
20
25
Appendix C, continued:
Height (V)
3.5 Volt from Zero (2.45 stable)
2.5
2
1.5
1
0.5
0
-0.5 0
20
10
30
time (s)
Figure C2: 3.5 Volt Step Reponse, τ = 8 s
Height (V)
4 Volt from Zero (3.47V stable)
3.5
3
2.5
2
1.5
1
0.5
0
-0.5 0
10
20
time (s)
Figure C3: 4 Volt Step Response, τ = 8.5 s
30
Appendix C, continued:
4.5 Volt from Zero (4.52V stable)
5
Height (V)
4
3
2
1
0
-1 0
10
20
30
time (s)
Figure C4: 4.5 Volt Step Response, τ = 9.5 s
The time constants from each trial, when averaged together, yield a system time constant
of 8.81.
Download