0% found this document useful (0 votes)
25 views

A Two-Tank Liquid Level Control System Case Study

The document presents a case study on a two-tank liquid level control system, focusing on the modeling and simulation of hydraulic systems. It discusses the mathematical modeling of interconnected tanks, including the equations governing liquid flow and the verification of simulation models. The study emphasizes the importance of accurate modeling for practical applications in automatic control engineering.

Uploaded by

Glan Devadhas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
25 views

A Two-Tank Liquid Level Control System Case Study

The document presents a case study on a two-tank liquid level control system, focusing on the modeling and simulation of hydraulic systems. It discusses the mathematical modeling of interconnected tanks, including the equations governing liquid flow and the verification of simulation models. The study emphasizes the importance of accurate modeling for practical applications in automatic control engineering.

Uploaded by

Glan Devadhas
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 11
zz iversi San Jose State Uni A ARTICLE FAU TN: 541884 Printed: 8/1/2013 9:13 AM Number: 107462883 i TA Borrower: CSJ Lending Sting: “FGH,GAS GW MZF Nu Patron: Funan Burors Journal Titi: Coninuois system serutaton Volume: Issue: MonthiYear: 1995 Pages: 153-162 Article Author: Murray-Smith. J Article Title: Case Study | — A Two-Tank Liquid Level Control System NOTICE: This material may be protected by Copyright Law (Title 17. U.S.C.) Call#: QA76.9.C65 M87 1995 Location: Charge Maxcost: 25.001FM Shipping Address: ‘San Jose State University King Library ILL 129 10th St San Jose. CA 96192-0028 ‘Supplied by FGM Interlibrary Loan Florida Atlantic University Libraries 777 Giades Road, LY-3 214 Boca Raton, FL 33431 Odyssey: 208.107.44.79 Arie! Email: librarysis-group@sjsu edu Fax: 408-924-2721 Billing Notes; LVIS CASE STUDY I - A TWO-TANK LIQUID LEVEL CONTROL SYSTEM. 10 10.1 INTRODUCTION Systems involving tanks containing liquid are found in many industrial situations. Examples include blending and reaction vessels in chemical processes and boiler systems in electrical power stations. The design of automatic control systems for the regulation of liquid level is thus of consider- able practical importance and requires an appropriate mathematical model of the plant (the system to be controlled) as a starting point. This chapter is concerned with the modeling of hydraulic systems of this kind and with discussion of methods for the verifi- cation and validation of a simulation model of a laboratory-scale system involving two interconnected vessels. The primary variables for hydraulic systems are pressure, mass and mass flow rate. For any vessel holding a mass of fluid M, the rate of change of mass in the container must equal the total mass inflow rate (Q) minus the total mass outflow rate (Q). That is am dt (0.1) The mass of fluid, M, is related to the volume of fluid in the vessel, V, by the equation M=pV 10.2) where p is the fluid density. For an incom- pressible fluid p is constant and thus M= pV 40.3) Figure 10.1 shows a typical vessel of rectan- gular cross-section. If A is the surface area of the tank, it is possible to relate the mass of liquid, M, to the liquid height, H, through an equation M=pAH (10.4) The hydrostatic pressure at the base of the vessel is then P=pgH (105) where g is the gravitational constant. For the system of Fig. 10.1, if the pressure at the I, to Fig. 10.1 A tank of rectangular cross-section con- taining liquid and having an inflow rate Q, and an outflow rate Q, for liquid depth H. 154 Case study I surface of the liquid and at the outlet are the same and equal to P, (say, atmospheric pressure) the pressure difference between the tank base and the outlet is given by (P, + P) ~ P,, which is simply P. The output flow rate Q, is dependent on P and, for the case of laminar flow, is conventionally described by an equation of the form (10.6) where R is the fluid resistance. Assume now that Q, is known (as a func- tion of time) and that we want to be able to predict the system behavior in terms of the liquid height H. From equations (10.1), (10.4), (10.5) and (10.6) one may write dh pA =Q, 10.7) ar (10.7) ps R so that st R (10.8) It should be noted here that Q, is the mass flow rate and thus Q,/p is the volume flow rate. Let Q,, denote this quantity, so that (10.9) It is important to note that the relationship describing the flow at the outlet of the vessel is not always that shown in equation (10.6) and the form of expression which is appropri- ate depends upon the nature of the outlet. For example, if the outlet is simply a hole in the side wall of the tank, a condition known as orifice flow occurs. In this case, if the size of the orifice is small, and the pressure variation over the orifice area is thus negligible com- pared with the average orifice pressure, it can be shown (by using the principle of conserva- tion of energy) that the mass flow rate through the orifice is given by Q can(22) Cua2gH)? (10.10) ? where a, is the orifice area and C, is the dis- charge coefficient. If, on the other hand, the outlet is through a pipe with turbulent flow, the appropriate relationship is (al where R, is a constant. Practical hydraulic components, such as valves, can be described by equation (10.6) for small pressure drops but have to be described by equation (10.11) in many cases owing to turbulence at typical operating conditions. 10.11) 10.2 MODELING OF A PAIR OF INTERCONNECTED TANKS When a hydraulic system incorporates more than one liquid storage vessel the principle of conservation of mass, equation (10.1), may be applied to each element in turn. However, there is coupling between the vessels, and the nature of this coupling depends upon the precise configuration of the vessels and upon the operating conditions. The interconnected tanks being modeled in this chapter are bench-top systems intended for use in teach- ing the principles of automatic control engin- ering [1]. Figure 10.2 is a schematic diagram of the system being considered. It consists of a con- tainer of volume 61 having a center partition which divides the container into two sepa- rate tanks. Coupling between the tanks is provided by a number of holes of various diameters near the base of the partition, and the extent of the coupling may be adjusted pump ‘Modeling of a pair of interconnected tanks 155 Fig. 10.2 A pair of interconnected tanks. through the insertion of plugs into one or more of these holes. The system is equipped with a drain tap, under manual control, and the flow rate from one of the tanks can be adjusted through this. The other tank has an inflow provided by a variable-speed pump, which is electrically driven. Both tanks are equipped with sensors which measure the pressure at the base of each tank and thus provide an electrical output voltage propor- tional to the liquid level. 10.21 A NONLINEAR MATHEMATICAL MODEL Following the approach used in section 10.1 the equation describing tank 1 in Fig, 10.2 has the form dH, Aap =Qu- Qu (10.12) where H, is the height of liquid in tank 1, Qy is the input volume flow rate and Q,, is the volume flow rate from tank 1 to tank2 and A, is the cross-sectional area. Similarly for tank 2 we can write dH: anal (10.13) v1 Quo where H, is the height of liquid in tank 2 and Q,, is the flow rate of liquid out of tank 2. Considering the holes connecting the two tanks and the drain tap all as simple orifices allows the flow rates to be related to the liquid heights by the following two equations Qu =C.,a,(2¢(H,-H,))'? 10.14) and Quo = Ca.a(2¢(H2—H))"? (10.15) where a, is the cross-sectional area of the orifice between the two tanks, a, is the cross- sectional area of the orifice representing the drain tap, H, is the height of the drain tap above the base of the tank and g is the gravie tational constant. 156 Case study 1 10.2.2. LINEARIZATION OF THE MODEL For control system design studies it is appro- priate to consider a linearized model in which the model variables represent small variations about steady-state values. Thus, the input flow variable is q,,, representing small variations about a steady flow rate Q,, Similarly, the other variables represent small variations about steady values 4,, in Quir Jes in Q,,, ft, in H, and hy in H,, In the steady state Qu =Qn = Qe (10.16) dh a (10.17) oy 40.18) From equation (10.14) it is clear that Q,, is a function of both H, and H,, Hence, in deriv- ing a linearized representation, the small variation in flow, q,, must depend on the steady levels H, and H, about which the system is operating. In general, one may therefore write gy 2 28a, 38 Qu aH, . 3H. (10.19) Differentiating equation (10.14) partially with respect to H, and H, in turn gives ati(2g)"? 3G Hye) (0020) Similarly Qn 5, - Cinta(2g)"” to Sa ye 1020 Substituting for q,, and g,,.in equations (10.17) and (10.18) gives dh, An gy della — (10.22) dl Are = ath; — hy (10.23) Spe ails hd (10.23) where a, (10.24) and Cayo(2g)? p= oes 10.25) 3H, Hy? (1025) Reorganization of equations (10.22) and (10.23) gives a second-order state-space model as follows Oy a 1 i,| |- | JE mA OA, a] 4b Thy a ~Gaw hh} | (10.26) ‘Taking Laplace transforms it is possible, in a few steps, to obtain the transfer function descriptions relating the depth h, and the depth h, to the input flow rate q,,. These are as follows: hs) quls) ea ae: (10.27) and (a +a,) Ay 1y(s) Ga (is 4] qu(S) 4 Ai + Aes + Agra) © AAs ee, aan (10.28) These. transfer functions both involve a pair of simple real poles and the charac~ Simulation of the nonlinear coupled-tank system teristic equation may be written in both cases as (4sTI+sT,) = 14 Aer Aaa + Ara) 5 im rAd e.g (10.29) aa; or 149 +T)+8'TT =0 (10.30) where (10.31) and 147, = fet Aas + Aer 49.39) a2 103 PROGRAMS FOR SIMULATION OF THE NONLINEAR COUPLED-TANK SYSTEM Figure 10.3 shows part of a simulation program for the nonlinear model of the coupled-tank system based on equations (10.12) to (10.15). This program is written using the SLIM language and the complete 157 source program is included as a .SLI file (TANKS. SLI) on the diskette. Nominal para- meter values corresponding to a real labora- tory-scale coupled-tank system are as shown in Table 10.1. A data file is provided on the diskette for this nominal set of parameters. Figure 10.4 shows an XANALOG block diagram for this simulation model. Some preliminary results based on the sim- ulation program of Fig. 10.3 and the given bywanre DERIVATIVE 5 QL==cO1#Al #SORT(2.08G*(H2-H1)) core 10 2 TP(HI=H2)5,6,6 ‘ (Q1=cD1AL*S0RT(2.08G*(HI-H2)) Goro 10 10 IP(H2-113)7,7,8 7 9020-0 Goro 20 8 (Qo=co2*A2esoRT(2.08G#(H2-H3) ) Gore 20, 20 CONTINUE DiL=(1.0/a)*(ar-01) ii2=(2-0/a)4(01-00) HiethTE6(DiN 1110) Ha=1NTEG(DH2 120) DERIVATIVE. END TYPE T, HISS,H2sS, H1,H2 IP(T=THAX) 50, 50,60 50 DYNAMIC END 60 stor Fig, 103 Listing of part of a SLIM program (TANKS. SLI) for simulation of the two-tank system described by equations (10.12) to (10.15). Table 10.1 Parameter values for the coupled-tank system Parameter Cross-sectional area, tank no. 1 Cross-sectional area, tank no. 2 Orifice area, between tanks Orifice area, outlet from tank no. 2 Coefficient of discharge, intertank orifice Coefficient of discharge, outlet orifice from tank no. 2 Gravitational constant Pump calibration constant Depth sensor calibration constant Height of outlet above : base of tank A 0.0097 m* A 0.0097 m* a, 0.00003956 m’ 4, 0.000385 m* Cu 0.75 ca 05 g 9.81 ms? G 0.000072 m’s" V" G 33.33 Vm" H O03ms : 158 Case study 1 Fig. 10.4 XANALOG block diagram for simulation of the two tank system. Note the use of submodels and their associated icons. parameter set are shown in Fig. 10.5. These show the changes of depth #, and k, versus time for a number of different initial condi- tions. Are these results meaningful? Is the mathematical model adequate and does the simulation program represent the model to a sufficient degree of accuracy? In order to answer these questions in a satisfactory way one must first consider carefully how this simulation can be verified and how the model can be validated. 103.1 INTERNAL VERIFICATION OF THE SIMULATION PROGRAM ‘The simulation program for the coupled-tank system isa very simple one. The first stage of internal verification is concerned with check- ing that the structure of the simulation program is consistent with the mathematical model. This involves working backward from the statements in the program, especially those within the derivative section, to ensure that when translated back to the form of dif- ferential equations they are the same as those of the original model. Checks should also be made of the parameter values used in the program or in the parameter input file to ensure that they correspond exactly to the parameter set of the model itself. The second stage of internal verification is concerned with numerical accuracy. In the case of fixed-step integration methods, com- Parisons can be made of results obtained with Simulation of the nonlinear coupled-tank system 159 ° 100 200 ° 100 200 ‘300 400 0 300 400 ‘ “ ig. 10.5 Simulation results (from SLIM) for the two-tank system model for three sets of initial condi- tions. The input flow rate was the same in all the cases, with a value of 16.67E-06 m’ s* (1000 cm’ min’). The continuous line represents the depth H, and the dashed line denotes H,. Note particularly the case where the two tanks are both initially empty. Can grounds, during the first part of the response? a number of different sizes of integration steplength and with different integration techniques. This provides the user with some understanding of the sensitivity of results to the steplength and of the overall suitability of the numerical methods chosen. In the case of variable-step integration algorithms, tests can be carried:out to compare results with differ- you explain the behavior of the system, on physical ent settings of the relative and absolute error limits and with different values :of the minimum integration step to be allowed. In both cases, some comparisons can be made using a number of different values of the . communication interval to ensure that inter- esting events in the simulation model are not being hidden from the user simply because of 160 Case study I an inappropriate choice of this parameter to checking a mathematical model which can which determines the interval between provide a basis for any definitive statement output samples. about the overall validity of that model. Statements about model validity must be made in the context of an intended applica- tion. In the case of the coupled-tank system, the computer simulation is to be used as a The discussion of validation in Chapter 9 basis for the design of an automatic control shows clearly that there is no single approach system which will ensure that a given level is 1032 EXTERNAL VALIDATION OF THE SIMULATION MODEL Table 10.2 Comparisons between system and simulation model variables under steady-state conditions for a number of operating points a H, H, Hy H, measured ——model_-——menstered. model (cm'min") (om) (cm) (on) (cm) 1000 50 84 3.4 68 1500 131 15.2 97 6 2000 25.0 247 18.9 18.3 100 200 300 400 500 600 t ® ig- 10.6 Simulation results for H, (dashed line) and the corresponding measured response of the real ‘system for an experiment involving doubling of the input flow rate from Q,, = 1000 cm’ min" to Q,, = 2000 ‘cm’ min’ at time f = 50 s. Note the initial steady-state difference between the measured and simulated responses. Simulation of the nonlinear coupled-tank system maintained in one of the tanks. There is par- ticular interest therefore in the accuracy of the model in predicting steady-state conditions and in predicting the form of small transients about any given steady operating point. Such comparisons are very easily made in the case of small-scale laboratory equipment of this Kind, and agreement between steady-state measurements and steady-state model predic- tions is generally quite good for upper parts of the operating range. Table 10.2 shows some typical results obtained from measurements on the real system and corresponding tests on the simulation model. Differences between the steady-state liquid levels in the simulation model and in the real system, for smaller values of input flow rate, are significant and vary slightly with operating point. Figures 10.6 and 10.7 show some comparisons in terms of dynamic tests. In Fig. 10.6 discrepan- cies between the model and system results are shown for a test involving quite a large = q cm on, em ° 00 161 change in operating conditions. Figure 10.7 shows measured response data for small- perturbation step tests carried out about one chosen operating point. Time constants esti- mated from measured step responses such as these, from which the error plots of Fig. 10.7 were derived, can also be compared with values determined from the linearized model in the form of equations (10.27) and (10.28). ‘The discrepancies in the model exposed by the steady-state tests, and the large perturba- tion responses, are believed to arise mainly because of the limitations of equations (10.14) and (10.15) in describing the relationships between output flow and the liquid level in each tank. These equations apply to an ideal simple orifice and the actual physical effects at the tank outlets do not agree exactly with this simplified model. With closed-loop control added to the real system, and to the simulation model, the agreement can be shown to be significantly Fig. 10.7 Plots showing differences between model predictions and measured values for H, and H, for small perturbation step tests carried out at one chosen operating point. The step input was applied at time 12250 s. Note the initial steady-state errors between the simulation model variables and the corresponding, measurements and the increased steady-state error value for H, after the transient has died away. 162 Case study 1 closer. This is important since the equipment is intended to be used for investigations of closed-loop control. In simulation studies involving control system design applications there is always particular interest in the overall robustness of the control system and the effect which modeling errors and uncer- tainties may have on the performance of the closed-loop system. Although control systems are normally designed using linearized models, simulation studies carried out on a proposed closed-loop system using a non- linear model of the plant can often be highly illuminating. Such an investigation may reveal problems with the proposed design which would otherwise only come to light during the commissioning and testing of the real system. 10.4 DISCUSSION This case study provides an illustration of a relatively simple nonlinear system which can be modeled in a classical way using physical laws and principles. The simulation model is easily implemented using either equation- oriented or block-oriented tools. The rela tively simple nature of the system, and the variables which are accessible for measure- ment in the rea] hardware, make this an interesting but straightforward system for the application of external validation methods. Possibilities for using the simulation program TANKS.SLT as a basis for further investigations on your own fall into two main areas. One obvious topic to consider would involve investigation of the effect of changing the form of relationship used to describe the discharge nonlinearities. A second area for independent study would involve adding feedback control. Control system design studies could be carried out using the linear- ized form of the mathematical model and dif- ferent controllers could then be compared in terms of their sensitivity to changes in operat- ing points or to changes in plant parameters, such as the coefficients of discharge. REFERENCE 1. Wellstead, P.E. (1981) Coupled Tanks Apparatus: Manual, TecQuipment International, Long Eaton, Nottingham.

You might also like