0% found this document useful (0 votes)
35 views10 pages

6 Coupled Tanks Level Control An Effective Course Project and Its Software Design

Coupled tanks controller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views10 pages

6 Coupled Tanks Level Control An Effective Course Project and Its Software Design

Coupled tanks controller
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

COUPLED-TANKS LEVEL CONTROL: AN EFFECTIVE

COURSE PROJECT AND ITS SOFTWARE DESIGN


Jianchu Yao and Loren Limberis
Department of Engineering,
East Carolina University

Abstract balance of the tanks considered; and Sultan et al.


provided the system model in the discrete form,
This paper presents the development of a which can be readily realized in digital
coupled-tanks level control project and its controllers [9]. Various advanced algorithms,
software design. The project consists of five including sliding mode control [2], neural
consecutive laboratory activities that cover the network control [4], and fractional-order
entire process of sensor and actuator calibration, proportional integral control [3], have been
industrial process modeling, controller design, investigated in 2008 alone.
system integration, and system performance
evaluation. The project has been administered The broad industrial applications, along with
three times to junior students in a general its physical characteristics, make coupled-tanks
engineering program. End-of-course survey apparatuses ideal for education purposes to
results show that this design project serves as an teach controls-related topics, such as: dynamic
effective tool to connect control concepts to a system modeling, control algorithm design,
real-life application example. Evaluative system specifications, stability, parameter
feedback from the students reveals that the tuning, etc. Engineering educators have
project possesses features that motivate student recognized these opportunities since the early
learning and improve learning outcomes. The 1990’s. They have used coupled-tanks
paper emphasizes the LabVIEW software laboratories to authenticate control theory,
design for this control project including the deepen student understanding, sharpen their
front panel and the diagram of the digital hands-on skills, and promote their enthusiasm
controller. for the engineering profession. Among these
efforts, Wellstead utilized a scaled model of
Introduction coupled tanks in their control laboratories [10].
Grega et al. developed a laboratory activity to
Control of coupled tank levels is found in teach control design, in which the system
many industrial processes in the pharmaceutical utilized an IBM/AT computer running DOS as
and chemical-related industry. To obtain a the controller [1]. This experimental setup
constant supply flow from a second tank to a could also support other concepts, such as
bioreactor, for example, a first tank is usually digital filtering, A/D and D/A conversion, signal
used to remove possible upstream flow transmission, and sensor calibration. Other
variations [1]. Finding and developing effective educators attempted to take advantage of the
modeling theory and control schemes has Internet connectivity to extend laboratories to
become increasingly attractive to many non-traditional settings where otherwise
researchers over the past few years [2-7]. A laboratories would not be possible due to
number of modeling approaches have been physical and geographical limitations [11, 12].
explored [7-9]. For example, Rehan et al started
with the basic thermal-fluid laws (e.g., Although the current literature supports that
Bernoulli’s law) to model the process with coupled-tanks related projects are utilized
thermal loss and pump delay considered but not successfully in engineering education, most of
included in the model [8]; Fernandes et al. used these efforts were designed in curricula within
differential equations to describe the input- the context of traditional electrical or
output relationship [7] with only the flow
COMPUTERS IN EDUCATION JOURNAL 53
mechanical engineering programs. For many into tank 1 by a variable speed electric pump,
other engineering programs, such as general then flows from tank 1 into tank 2 through an
engineering (GE), their curricula do not usually orifice that connects the two tanks at the bottom,
allow thorough coverage of the techniques for and finally runs out of tank 2 through a drain.
system modeling and control (e.g., state space The input pump, the inter-tank orifice, and the
modeling, Z-transform, etc.), yet still require outlet drain tap govern the flow rates Q1, Q12,
their students to have knowledge of industrial and Q2 and subsequently determine the water
processes and to be able design control systems levels H1 and H2 in the two tanks. The goal is to
for these processes. control tank 2 water level by adjusting the input
flow rate of the input pump.
This paper presents the development of a
series of laboratory activities designed around a Transfer Function of the Plant:
LabVIEW-based level controller for a couple-
tanks apparatus. The laboratory series aims to If assuming the two tanks are identical and
providing GE students experience of industrial their cross section is constant, the system can be
plant modeling, sensor and actuator calibration, modeled with a 2nd-order transfer function [15]:
digital controller design, and system
performance testing. The paper is not intended 1
H 2 ( s) n
to reiterate the modeling and algorithm design G p ( s) = =
Q1 ( s) (1 + sT1 )(1 + sT2 ) (1)
aspects of the laboratory, as they can be
conveniently found in existing literatures [2, 8,
9, 11-14]. It instead focuses on the design of the where H2(s) is the tank 2 level, Q1(s) is the flow
LabVIEW software used in the laboratory and rate into tank, and the time constants T1 and T2
discusses several practical issues observed are determined by:
during our experiments. The entire project is
A2 A( 2m + n)
briefly introduced just to provide the context. T1T2 = T1 + T2 =
More detailed information about the project mn and mn (2)
(e.g., student assignment, project assessment,
etc) may be found in [14]. where A is the cross-sectional area of the tanks,
and m and n are further given by:
Theory
c1 a1 2 g c2 a2 2 g
m= n=
Figure 1 illustrates the schematic model of a H1 − H 2 H2 − H3
couple tank apparatus. Water is first pumped and (3)

Q1
Input
pump
Tank 1 Tank 2

H1
H2 Drain
Q12 Q2

Figure 1. A coupled-tanks system.


54 COMPUTERS IN EDUCATION JOURNAL
where: P .O . = 100 e − πζ 1− ζ
(6)
c1 = discharge coefficients of the orifice
between the two tanks; 4
c2 = discharge coefficients of the drain tap; Ts = . (7)
a1 = cross sectional area of the inter-tank ζω n
orifice;
a2 = cross sectional area of the drain tap; Once the system performance requirements are
H1 and H2 = steady state levels in tank 1 and specified, the damping ratio ζ and natural
tank 2, for a given input flow rate; frequency ωn can be found analytically with
H3 = height of the drain tap from the bottom of these equations. The desired closed-loop
the tanks; transfer function can subsequently be found
g = gravitational constant (386.22 with equation (4).
inch/second2);
The Controller Transfer Function
In these equations, the tank levels (H1 and H2)
can be measured with sensors; the other Once the plant transfer function Gp(s) and the
symbols represent the system constants. Note desired closed-loop transfer function Gcl(s) are
that, since it is usually very difficult to separate determined, the controller’s transfer function
the cross sectional area of the inter-tank orifice Gc(s) can be readily found by:
a1 and the drain tap opening area a2 and their Gcl ( s )
discharge coefficients c1 and c2, the products Gc ( s ) = (8)
c1a1 and c2a2 are used as single quantities, (1 − Gcl ( s ))G p ( s )
which can be obtained from system dynamic
response experiments [14]. This s-domain transfer function needs to be
converted into a difference equation that can be
Desired Closed-Loop Transfer Function: implemented as a digital controller. The
difference equation takes the form of:
If a 2nd-order closed-loop system is desired, its
transfer function Gcl(s) can be represented in a Q1 = k1e(n) + k2e(n − 1) + k3e(n − 2) +
form as shown in the following equation: k4Q1 (n − 1) + k5Q1 (n − 2) (9)

ωn2 where:
G cl ( s ) =
s 2 + 2ζω n s + ω n Q1 : flow rate to be determined by the
2
(4)
controller;
where ζ is the closed-loop system damping ratio e(n) : deviation of level 2 from the present
and ωn is the natural frequency. sample cycle;
e(n − 1) : deviation of level 2 from the previous
The parameters used to measure dynamic sample cycle;
system performance, which usually include e(n − 2) : deviation of level 2 from the sample
performance measures such as rising time (Tr1), cycle before the previous;
percentage overshoot (P.O.), and settling time Q1 (n − 1) : flow rate of the previous sample
(Ts), can be represented in terms of ζ and ωn cycle;
[16], as shown in equations (5) - (7): Q1 (n − 2) : flow rate of the sample cycle before
2.16ζ + 0.6 the previous;
Tr1 = k1 , k 2 , k 3 , k 4 , and k 5 : control coefficents.
ωn (5)

COMPUTERS IN EDUCATION JOURNAL 55


Project Development 1. Calibrate the level sensors and the pump:
The students experimentally determine the
Project Overview voltage-level relationship of the level
sensors and the voltage-flow rate
Figure 2 illustrates the setup of the coupled- relationship of the pump. These
tanks level control design project, including: the relationships are fitted with appropriate
LabVIEW controller on a laptop, the NI ELVIS linear models (polynomials) and
station, and the coupled-tanks apparatus. The programmed into LabVIEW.
functions of each are briefly described in the
text boxes in the figure. In this setup, the 2. Model the coupled-tanks process with a
project utilizes a PP-100 coupled-tanks transfer function: The students conduct a
apparatus manufactured by KentRidge dynamic response experiment to
Instruments [13]. The system uses a personal mathematically obtain c1a1 and c2a2 and find
computer with LabVIEW as the controller. A the plant transfer function Gp(s) using
PCMCIA, multifunction input/output card equations (1), (2), and (3).
(DAQCardTM-6062E) from National
Instruments is supplied with the computer. This 3. Obtain the closed-loop transfer function:
multifunction card has sixteen 12-bit analog-to- The students use equations (2) through (7) to
digital conversion channels and two 12-bit find the desired closed-loop transfer
digital-to-analog output channels. function Gcl(s) from the system performance
specifications provided by the instructor.
The project is divided into five lab sessions as
listed below. Detailed description of the 4. Determine the controller’s transfer function:
individual activities could be found in [14]. The students find Gc(s) with equation (8)
and convert it into a difference equation
with provided MATLAB code.

LabVIEW Controller:
Receives the tank level
signals and computes via
the digital controller to
find the voltage output to
the pump. Level
NI ELVIS Station: Sensors
Connects the DAQ card and
the Kentridge apparatus.

Pump
Reservoir

Coupled-tanks Apparatus: The two


level sensors measure the tank levels
and the pump adjusts the input flow to
ensure tank 2 reaches the set level.

Figure 2. The integrated experimental setup.


56 COMPUTERS IN EDUCATION JOURNAL
5. Integrate the designed controller with the The operational controls include a sliding
coupled-tanks apparatus: The students control ① that sets the desired tank 2 level, a
program the collected calibration data (for
level sensors and pump) and the designed knob ② that allows manual adjustment of the
controller into a provided LabVIEW pump speed, a switch ③ that changes the
controller template (detailed next); Step-
input and impulse-disturbance response control modes (AUTO/MAN), a switch ④ to
experiments are conducted and the students start recording measured data into a spreadsheet
evaluate and analyze the system file, and a “STOP” button ⑤ to terminate the
performance with respect to the provided
specifications. controller. The graphical indicators ⑥ and ⑦
display the two tank levels. To ease the student
LabVIEW Controller Design learning, graphical components were well
organized and labeled. Colors were used to help
After the process of modeling the plant and students differentiate component functions,
designing the controller, a LabVIEW controller system status, and operation modes.
template is developed for the students’ use in
their experiment. Several practical issues LabVIEW Program Diagram:
deserve attention to make the program better
suited to student learning needs. Specifically, The diagram of the LabVIEW program (Figure
the software should: 4) provides all the logic and calculations
involved in the application. A “while-loop”
• Allow adjustment of set levels and display
structure is used in the program to realize
dynamic level changes;
periodic sampling and control of the coupled-
• Allow input of control coefficients
tanks apparatus. The system is set to sample
( k1 , k 2 , k 3 , k 4 , and k 5 in difference equation
and control every 2 seconds to satisfy the
(9)) and help students understand the theory Nyquist sampling theorem, since the plant
behind the equation; usually has time constants in the range of
• Sample the tank levels and adjust the pump 30~200 seconds [3, 10]. According to their
speed at an appropriate sampling rate; functions, the diagram can be largely divided
• Support both manual adjustment of the into five parts (see Figure 4):
variable speed pump (MAN) and automatic
control of the tank level (AUTO) and 1. Analog Input: This is the front end of the
seamlessly switch between the two control signal flow where the two tank level
modes (AUTO/MAN) signals are read into the computer from the
• Record data in an appropriate format for data acquisition card. The “DAQ
students to conveniently analyze the data Assistant” module was set to sample every
0.2 seconds. Possible noise is filtered by
The following paragraphs describe the front taking the arithmetic average of every 10
panel and the diagram of the LabVIEW samples (resulting in an overall sampling
controller template and explain how the period of 2 seconds as stated earlier).
designed software meets the above 2. Level Calibration and Display: The two
considerations. level signals (voltage) are converted to real
level quantities (in inches) using the
LabVIEW Front Panel: calibration polynomials obtained from the
first lab session. Fourth-order polynomials
The front panel (Figure 3) consists of are currently used, but the order of the
graphical components in two categories: polynomials can be easily changed as
operational controls and graphical indicators.

COMPUTERS IN EDUCATION JOURNAL 57


① ⑥ ⑦
Figure 3. The LabVIEW front panel of the level controller.

1. Analog Inputs 2. Level Calibri. & 5. Data Storage


Display

4. Analog Output (Pump)


3. Controller

Figure 4. The LabVIEW diagram of the level controller.


58 COMPUTERS IN EDUCATION JOURNAL
needed. The calibrated levels are displayed in within the configured DAQ range. If not, the
the front panel. output voltage will be replaced with the upper
3. Digital Controller: This part implements the or lower voltage limit value to avoid possible
controller shown in equation (9). A formula false operation.
node realizes the difference equation, which 5.Data Storage: If the “Start” switch for data
first uses placeholders for the control recording is turned on, the change of the two
coefficients. Students will replace the tank levels with respect to time is saved as
placeholders with their control coefficients three columns in an Excel spreadsheet. The
found from the labs. Shift registers are used to program allows users to select desired file
keep data from previous cycles for calculation name and path where data are saved. Data can
in the present cycle. One practical issue in this be used to analyze the system performance.
part of the program deserves attention: the Figure 5 shows an example that illustrates the
calculated controller output (i.e., the liquid step response of tank 2 level after a set point
flow rate going into tank 1) might be negative, step change of from 4 inches to 6 inches.
which is obviously not logical. Therefore, the
program changes any negative flow rate into The switch between the manual and automatic
zero to better fit the realistic condition. control modes allows students to manually
4. Analog Output: The speed of the pump is adjust the pump speed and, therefore, the input
adjusted by the voltage signal through the flow. This can shorten the waiting time in cases
output channel of the DAQ card. The pump where tank levels have to change significantly
calibration data from lab session 1 are used in making the labs more efficient.
a formula node to convert the value of the
required flow rate from the controller into a Results
corresponding voltage. Note that any unit
The design laboratory project has been taught
inconsistencies between plant modeling and
three times to undergraduate GE students at East
pump calibration can be addressed here by
Carolina University. The project was used to
introducing a simply conversion equation.
connect these control concepts, design and
Similar to the “Digital Controller”, the
program ensures the obtained output voltage is

Level after change

Level before change

Figure 5. System Step Input Response.


COMPUTERS IN EDUCATION JOURNAL 59
analysis skills, and software tools responded. Nonetheless, the results show that
(MATLABand LabVIEW). Junior engineering both student groups were very confident about
students in the ICEE 3050: Sensors, their control system design and analysis skills
Measurements, and Controls class spent five were improved after the project.
weeks, one activity per week, to design the
controllers. Most of the students had some Discussion
differential equation background but no prior
knowledge of controls and system modeling Running these three rounds of experiments in
(e.g., Laplace-transform, transfer function, state the GE program demonstrated that the coupled-
space). tanks level control design laboratory project can
serves as a vehicle to facilitate active learning,
A five point Likert scale survey (1-Strongly encourage students to make logical connections
disagree; 2-Disagree; 3-Neutral; 4-Agree; and 5- between control theory and real world processes,
Strongly agree) was administered at the end of and enhance learning outcomes. The end-of-
the project to collect students’ opinion about the project surveys indicate that the students
project [14]. The same survey was used in 2007 appreciated the integration of mathematic
and 2009. The survey results are summarized in models with physical systems and enjoyed the
Figure 6. Overall, the average scores for all opportunities to acquire hands-on design
eight questions are around 4 points, experience. Although many students expressed
demonstrating that the students were able to that the modeling and design with MATLAB
achieve all the laboratory objectives. had been challenging and sometimes frustrating
Comparing the results from the two years, due to the fact that they did not have MATLAB
however, one may find that most of the background, most of them were excited once
questions’ responses from 2009 are slightly they saw the final results from their equations
lower than those from 2007, which is surprising working to control the system. Survey results
and inconsistent with the instructor’s intuitive also showed that the students liked the fact that
perception. This may be partially explained by they could visually observe level changes
the fact that only 9 out of 25 students in the without the aid of any electronic equipment
2007 class responded to the survey due to some such as an oscilloscope, since the system time
timing issues, while all 18 students from 2009 constant is in order of seconds. Many

Figure 6. End-of-project Survey Results.


60 COMPUTERS IN EDUCATION JOURNAL
commented that this intuitive visual impact intermediate results. However, this proved to be
motivated their interests. difficult: the discharge condition and the
opening of the inter-tank orifice and drain valve
In the survey, some students also expressed are not directly measurable and may vary
that they enjoyed using LabVIEW in the project significantly from apparatus to apparatus, which
and hoped to have more opportunity to work on in turn results in substantial variations in the
LabVIEW programming, which was not obtained plant transfer function. It usually
surprising. From the student learning requires the instructor to go through all the steps
perspective, LabVIEW’s graphical with several apparatuses before he or she can
programming not only makes it easy to make knowledgeable decisions when helping
understand the signal flow of the controller, it students verify their plant models.
also allows students to develop human-machine
interface skills. From a laboratory developer Conclusions
perspective, LabVIEW expedites the teaching
tools development without spending significant This paper presented a project that helps to
time on programming, thanks to the existence of teach controls to undergraduate engineering
powerful functional components for data student. The project requires students to go
acquisition, signal processing, and descriptive through each individual block of a closed-loop
graphical components. Additionally, a coupled control system and it efficiently ties all the
tanks apparatus can be flexibly configured into a controls concepts, design and analysis skills to a
1st-order system with a single tank, a 2nd-order practical example. This paper has detailed the
coupled system, a 2nd-order cascaded system, or development of the LabVIEW-based digital
multiple-input-multiple-output system, [13]. controller used in the project. The features of
This configuration flexibility improves the the graphical programming language LabVIEW
equipment’s cost efficiency. eases the development of the teaching modules
and enhances student learning. Experience from
During the past three years, a few practical running the project three times in a GE program
logistic issues that may negatively affect the demonstrates that the integrative project can
project progress have been observed. Prior make teaching-learning process effective and
awareness of these concerns can allow one to efficient.
prepare accordingly, which should prevent
occurrence of the following incidents: (1) Acknowledgement
students occasionally found level sensor
readings from later lab sessions inconsistent The authors want to thank Mr. Bruce Peterson,
with previous sessions and had to re-calibrate the lab supervisor, for preparing the lab
the sensors due to the poor repeatability of some equipment during the last three years.
capacitive level sensors. Keeping one or two
spare stations may rescue the teaching plan in References
case the equipment does not cooperate; (2) the
1. W. Grega and A. Maciejczyk, "Digital control of
pump, because it has to overcome a head a tank system," IEEE Transactions on
pressure, does not produce any flow when the Education, vol. 37, 271 - 276 1994.
given voltage is lower than 2 volts. It is
important for the students to account for this 2. S. Aydin and S. Tokat, "Sliding mode control of
deadband in their pump calibration; and (3) a coupled tank system with a state varying
given the fact that later activities, e.g., controller sliding surface parameter," in International
design, are built upon the success of the earlier Workshop on Variable Structure Systems, 2008,
ones (modeling of the plant), it is vital for the pp. 355 - 360.
instructor to be able check the students’

COMPUTERS IN EDUCATION JOURNAL 61


3. V. Bhambhani and Y. Chen, "Experimental 12. R. Irawan, M. Ooi, G. Yeung, E. Weyer, D.
study of fractional order proportional integral Nesic, and I. Mareels, "A virtual laboratory
(FOPI) controller for water level control," in The experience based on a double tank apparatus," in
47th IEEE Conference on Decision and Control, Proceedings of the 40th IEEE Conference on
2008, pp. 1791 - 1796. Decision and Control, 2001, pp. 2815 - 2820.

4. F. Sharifi and M. B. Menhaj, "A nonlinear 13. K. K. Sin and K. W. Lim, "APPLICATION
observer design via differential neural networks EXAMPLES OF THE KRi Coupled-Tank
for coupled tanks," in Canadian Conference on Apparatus PP-100'," K. I. P. Ltd, Ed., 1995.
Electrical and Computer Engineering, 2008, pp.
1457 - 1460. 14. J. Yao and L. Limberis, "A Project-Driven
Approach to Teaching Controls in a General
5. P. E. M. Almeida, F. Goncalves Jota, and C. Engineering Program," in 2008 Annual
Seixas Filho, "A novel real time integrated American Society of Engineering Education
environment for the design of practical fuzzy Conference, Pittsburg, MA, USA, 2008.
logic controllers," in Proceedings of Second
International Conference on Knowledge-Based 15. "Coupled Tanks Systems 1," www.control-
Intelligent Electronic Systems, 1998 pp. 155 - systems-principles.co.uk/whitepapers/ coupled-
164. tanks-systems.pdf.

6. W. Grega, "Minimum-time liquid level control," 16. R. C. Dorf and R. H. Bishop, Modern Control
in Proceedings of the Third IEEE Conference on Systems, 10 ed.: Pearson Prentice Hall, 2005.
Control Applications, 1994, pp. 793 - 794.
Biographical Information
7. J. M. Fernandes, C. E. de Souza, and G. C.
Goodwin, "An Application of Adaptive Scheme Dr. Jianchu (Jason) Yao joined the Department of
to Fluid Level Control," in American Control Engineering at East Carolina University as an
Conference, 1989 pp. 1886 - 1891 Assistant Professor in August, 2005. He received a
B.S. and M.S. degrees in electrical engineering from
8. M. Rehan, F. Tahir, N. Iqbal, and G. Mustafa, Shaanxi university of Science and Technology,
"Modeling, Simulation and Decentralized China, in 1992 and 1995, respectively, and the Ph.D.
Control of a Nonlinear Coupled Tank System," degree in electrical engineering from Kansas State
in Second International Conference on University in 2005. His research interests include
Electrical Engineering 2008. wearable medical devices, telehealthcare,
bioinstrumentation, control systems, and biosignal
9. A. S. Thulkarmine, M. R. A. Ghani, S. M. processing. His educational research interests are
Amin, and A. W. I. M. Hashim, "Self-tuning laboratory/project-driven learning and integration of
Controllers for a Coupled Tank Pilot Plant: research into undergraduate education. Dr. Yao is a
Evaluation and Comparison," in Canadian member of the American Society for Engineering
Conference on Electrical and Computer Education and a senior member of Institute of
Engineering, 1993, pp. 578 - 581. Electrical and Electronics Engineers.

10. P. E. Wellstead, "Teaching Control with Loren Limberis, PhD is an Assistant Professor in
Laboratory Scale Models," IEEE Transactions the Department of Engineering at East Carolina
on Education, vol. 33, pp. 285-290, AUGUST University. He earned his B.S. in electrical
1990. engineering and Ph.D. in bioengineering from the
University of Utah. Dr. Limberis was a research
11. C. C. Ko, B. M. Chen, J. Chen, Y. Zhuang, and analyst with Southwest Research Institute prior to
K. Chen Tan, "Development of a web-based his academic career. His research interests focus on
laboratory for control experiments on a coupled designing techniques to utilize nature’s highly
tank apparatus," IEEE Transactions on complex and sophisticated biological systems to
Education, vol. 44, pp. 76 - 86, Feb 2001 develop biohybrid devices for use in biotechnology
applications.

62 COMPUTERS IN EDUCATION JOURNAL

You might also like