Back
 AM  Vol.11 No.9 , September 2020
Non-Linear Tank Level Control for Industrial Applications
Abstract: Tank level control is ubiquitous in industry. The focus of this paper is on accurate liquid level control in single tank systems which can be actuated continuously and modulation of the level setpoint is also required, for example in cascade control loops or supervisory Model Predictive Control (MPC) applications. To avoid common problems encountered when using fixed gain or adaptive/gain scheduled schemes, an accurate technique based around feedback linearization and Proportional Integral (PI) control is introduced. This simple controller can maintain linear performance over the full operating range of a uniform tank. As will be demonstrated, the implementation overhead compared to a regular PI controller is negligible, making it ideal for industrial implementation. Implementation details and parameter identification for adaptive implementation are discussed. Simulations coupled with experimental results using a large-scale laboratory level control system using commercial industrial control equipment validate the approach, and illustrate its effectiveness for both level tracking and disturbance rejection.

1. Introduction

1.1. Motivation

Tank level control is one of the most commonly encountered applications in industry [1] [2] [3]. A range of level control systems and methods are commonly used in industry. The control of liquid levels, for example in process tanks, is an important function. Examples include hot water storage tanks where water is periodically removed, and the level needs to be restored ready for the next wash cycle, effluent treatment plants, reaction vessels and steam boilers. The focus of this paper is on accurate liquid level control in single tank systems, where actuation (typically through a pump or proportional valve) can be modulated continuously (c.f. on/off type control actions). Specifically, accurate level control of plant where modulation of the level setpoint is also required is considered; such situations commonly arise in cascade control loops [4], for example, or situations in which supervisory Model Predictive Control (MPC) is implemented [5]. Such schemes can often occur in practice when a level control system is integrated into a wider plant Distributed Control System (DCS) employing supervisory optimization schemes above the plant control interface levels [1] [3] [5].

A complication of level control in such situation arises due to the non-linear equations of the level dynamics themselves. The typical industrial solution for regulatory control is to use a Proportional-Integral (PI) or Proportional Integral-Derivative controller which is tuned around a particular (fixed) operating point (tank level), using a linear approximation of the dynamics for tuning purposes. Although the linear approximation is accurate around the chosen operating point, if the system is perturbed away from this operating point (for example due to a disturbance or setpoint change), performance deteriorates rapidly. This arises since the linear approximation employed to tune the PI controller becomes less accurate due to non-linearity, and a fixed gain controller is not able to adapt or re-schedule its gains to match the new process conditions. The focus of this research is to develop a simple but effective solution to this issue.

1.2. Previous Work

A variety of advanced control schemes have been proposed to improve performance in such situations (e.g. non-linear MPC, adaptive/predictive control, gain scheduling, fuzzy logic control [5] - [10]). Although adaptive and adaptive/predictive controls such as [6] and [7] can be effective for tracking and adapting to slowly varying process parameters, a drawback lies in the time taken to adjust to quickly varying parameters; as this would be the case for level control after a setpoint change or disturbance, performance would deteriorate. An additional drawback of adaptive schemes is the added implementation complexity of parameter estimation and adaptation schemes, which may render industrial implementation (e.g. on a Programmable Logic Controller (PLC)) difficult (or impossible) in some cases (although recent work has proposed efficient schemes to overcome this, see e.g. [8] [9]). The computational overheads of non-linear MPC are also prohibitive for PLC implementation [5]. Gain scheduling schemes based around PI/PID controls have been found to perform well and have a much simplified implementation over adaptive schemes, but require a significant and time-consuming effort at the design stage to correctly tune. This occurs due to the need to linearize the non-linear tank dynamics at numerous operating points over the working range of the controller, with controller tuning to meet a specification at each point then required [10]. Fuzzy logic design often aims to mimic the operation of gain-scheduled approaches, and hence require similar effort at design time, but have heavier implementation overheads than gain schedulers [8] [9].

1.3. Contributions

In this paper, a very accurate technique based around feedback linearization and PI control is employed, in order to create a simple controller which can maintain linear performance over the full operating range of a uniform tank. Unlike previous gain-scheduled approaches, there is no significant effort required at design time, and unlike adaptive or fuzzy schemes, the implementation overhead is negligible. Taken together, it is argued that the approach is ideally suited for industrial implementation, for example on a PLC which may be operating within the framework of a DCS. The paper includes a discussion on the use of (linear) parameter estimation techniques within an adaptive control framework, although this clearly increases the implementation overheads. A simulation study coupled with experimental tests on a large-scale laboratory level control system using industrial control equipment illustrates the effectiveness of the proposed approach for both tracking and disturbance rejection.

1.4. Structure

The remainder of the paper is organized as follows. Section II introduces the system model, and provides an insight into the non-linearity of the process under consideration. Section III develops the non-linear control strategy, presents tuning formulae, discusses how linear parameter estimation may be employed within an adaptive framework and also describes implementation aspects. Section IV provides simulation-based and experimental validation of the approach, while Section V concludes the paper.

2. One Tank System Model

A schematic of the main components of a single uniform cross sectional tank is as depicted in Figure 1. For this tank, the following differential equation is easily obtained:

A T h ˙ ( t ) = Q i n ( t ) Q o u t ( t ) (1)

where AT represents the cross-sectional area of the tank and Q i n / Q o u t represents the input and output flows respectively. Assuming that the input control signal is represented by u ( t ) , the pump/valve has an effective flow gain K v , and the output flow is through an aperture of effective area A O , Equation (1) may be rewritten using Bernoulli’s equation as follows:

A T h ˙ ( t ) = K v u ( t ) A O 2 g h ( t ) (2)

Figure 1. Schematic of the single tank system.

Which can be re-written:

h ˙ ( t ) = b u ( t ) a h ( t ) (3a)

With : b = K v A T , a = A O 2 g A T (3b)

This is clearly a non-linear dynamic equation since the tank outflow depends upon the square root of the current tank level h ( t ) . However since x = x / x , a simple change of variables in (3) enables it to be put into the form of a linear equation, with a time-varying parameter a ( t ) which is a function of the parameter a and the current level h ( t ) :

h ˙ ( t ) = b u ( t ) a ( t ) h ( t ) (4a)

With : a ( t ) = A O 2 g A T h ( t ) = a h ( t ) (4b)

Note that when h ( t ) = 1 , the parameter a ( t ) is equivalent to a , and hence a can be thought of as the nominal pole location for a unit level height. This pole location is effectively scaled by the reciprocal of the square root of the current level h ( t ) . Denoting “s” as the usual time derivative operator, a 1st order time-varying “transfer function” is easily created from (4):

h ( t ) u ( t ) = b s + a ( t ) (5)

So it is seen that both the static gain and effective time constant of this 1st-order process are functions of the instantaneous level h ( t ) .

3. Non-Linear PI Control Strategy

3.1. 2-DOF PI Principle

Control of a first order system is easily achieved by the use of a PI controller. In order to maintain both tracking and regulation performance, to avoid the presence of an additional transmission zero in the forward path it is common to use a 2-DOF controller (see e.g. [11] for a general description and tuning rules for such controllers) such as that depicted in Figure 2.

This controller structure has the advantage of removing the controller zero from the closed loop dynamics if a regular error-activated PI controller was employed. It is advantageous in the current context as, with a simple modification, it produces linear closed-loop behavior for both tracking and regulation regardless of the current operating point h ( t ) . To see how this may be obtained, consider that for a first-order process, the closed loop dynamics when such a PI controller is employed is easily obtained through algebra and is given by:

h ( t ) r ( t ) = b K i s 2 + ( a + b ) K p s + b K i (6)

By setting b K i = ω n 2 and ( a + b ) K p = 2 ζ ω n , one easily sees that (6) is simply the standard form of a unit-gain second-order transfer function. By comparing co-efficients, the controller is tuned for a desired damping ratio ζ and natural frequency ω n as follows:

K p = 2 ζ ω n a b (7a)

K i = ω n 2 b (7b)

3.2. Non-Linear Controller

Now, observe that only the model parameter b appears in (7b). Let us substitute for a our height-varying quantity a ( t ) into (7a) and manipulate further:

K p = 2 ζ ω n a ( t ) b (8a)

= 2 ζ ω n b a b h ( t ) (8b)

Considering the required state feedback signal K p h ( t ) appearing at the summing junction to form u ( t ) in Figure 2, and again using the identity x = x / x this signal may be written as the combination of two sub-components:

Figure 2. 2-DOF Linear PI Controller.

K p h ( t ) = h ( t ) 2 ζ ω n b h ( t ) a b h ( t ) (9a)

= h ( t ) 2 ζ ω n b h ( t ) a b (9b)

Separation of these two components with opposing signs gives the simple non-linear PI controller structure as shown in Figure 3. The controller is effectively a regular PI controller-giving the control signal u ( t ) as in Figure 2, with the addition of an extra linearizing control signal u ( t ) where the latter signal is formed as the feedback gain K l applied to the square root of the current level h ( t ) . This controller is tuned to give the desired damping ratio ζ and natural frequency ω n for a (linear) second-order closed loop as follows:

K p = 2 ζ ω n b (10)

K l = a b (11)

K i = ω n 2 b (12)

In order to select appropriate values for natural frequency and damping ratio from natural design specifications, the following relations hold for determining these two parameters from settling time ts (in seconds) and percent overshoot os (in %) for an underdamped second order system [1]:

ζ = ln ( o s / 100 ) 2 π 2 + ln ( o s / 100 ) 2 (13)

ω n = 4.6 ζ ω n (14)

Closer observation of the control procedure reveals that it is a form of feedback linearization non-linear control [12], with a state-feedback controller with forward path integrator forming the control. Substituting the non-linear state feedback term u ( t ) = K l h ( t ) into Equation (3) and using u ( t ) = u ( t ) + u ( t ) illustrates the method of loop linearization:

Figure 3. 2-DOF Non-linear PI Controller.

h ˙ ( t ) = b u ( t ) a h ( t ) (15a)

= b [ u ( t ) + u ( t ) ] a h ( t ) (15b)

= b [ u ( t ) + K l h ( t ) ] a h ( t ) (15c)

= b u ( t ) + a h ( t ) a h ( t ) (15d)

= b u ( t ) (15e)

In other words, the non-linear state feedback cancels the effective pole and forces the process to behave as a weighted integrator of the control input term u ( t ) . Designing the linear state feedback term K p and integrator term K i is then trivial to achieve the required closed loop damping and natural frequency/settling time.

3.3. Self-Tuning/Adaptive Control Action

In some situations, it will be useful to implement a self-tuning and/or adaptive version of the non-linear controller. Adaptive controllers can be implemented using either direct or indirect approaches [13]; the latter is most commonly encountered. In an indirect approach, an estimation algorithm is first used to estimate the parameters of the controlled system on-line, and these parameters are used to calculate the controller gains. A block diagram of the typical layout of a self-tuning indirect adaptive controller is as shown in Figure 4. The adaptive controller in this context is formed by combining the on-line Exponentially Weighted Recursive Least Squares (EW-RLS) algorithm with the control law as described in the previous Section, using Equations (10), (11) and (12) to implement the tuning rules and map the parameter estimates to the controller gains, incorporating the design specification.

In the adaptive controller, the EW-RLS estimator is used to estimate the value of the process model parameters in real-time, and is appropriate for use in embedded adaptive control applications in which the model dimension is not excessive [13] [14]. In the general case, the EW-RLS algorithm is defined by the following expressions:

Figure 4. Indirect adaptive control scheme.

β ^ ( t ) = β ^ ( t 1 ) + K ( t ) e ( t ) (16)

e ( t ) = y ( t ) x T ( t ) β ^ ( t 1 ) (17)

K ( t ) = P ( t 1 ) x ( t ) λ + x T ( t ) P ( t 1 ) x ( t ) (18)

P ( t ) = 1 λ [ P ( t 1 ) K ( t ) x T ( t ) P ( t 1 ) ] (19)

where β ( t ) is the vector of estimated parameters of the system, y ( t ) is the current measured output of the system under consideration, x ( t ) is a vector of shifted previous input and output measurements of the system (regression variables), K ( t ) is the estimator gain vector, P ( t ) is the covariance matrix, e ( t ) is the prior residual error and λ is the forgetting factor. In the context of this paper, only two parameters are required to be estimated, yielding a trivial implementation. From Equation (3), the two unknown parameters a and b are linear in the measurements of u ( t ) and h ( t ) , with the square of the latter being easy to calculate and its first derivative being obtainable numerically, e.g. using the trapezoidal rule [1]. Hence, although the dynamics are non-linear, the unknown parameters can be identified using EW-RLS directly.

3.4. Implementation

Equations (10), (11) and (12) above result in very simple design formulae to achieve the specified (linear) closed-loop behavior for the non-linear plant. In terms of a digital control implementation (e.g. on a PLC, microcontroller or within a DCS framework), several implementations are possible; the simplest is as follows. Applying Euler integration to the integral action of the controller, the following recursive equations result and can be employed for implementation:

I ( k ) = I ( k 1 ) + r ( k ) h ( k ) T s (20)

u ( k ) = k i I ( k ) k p h ( k ) + k l h ( k ) (21)

where integer k represents discrete time index, r ( k ) is the reference at step k , h ( k ) is the measured height at step k , I ( k ) is the integral of error at step k and T s is the sample time (in seconds). The gains k p , k l and k i are as given in Equations (10), (11) and (12). In terms of choice of sample time, given that the dynamics of most industrial level control applications are slow-moving, then multiples of one second will normally suffice, without causing undue computational burden. As with all physical control implementations, reset windup can be protected against by clamping the integrator output when the calculated control signal u ( k ) reaches an upper or lower saturation limit. For details of the implementation of the EW-RLS algorithm, an efficient implementation for model structures such as Equation (3a) is given in reference [14].

4. Evaluation

In this section, a number of studies are described which were carried out to evaluate the effectiveness of the proposed non-linear controller both in simulation and on a large-scale experimental laboratory process rig.

4.1. Simulation Study

A simulation-based experiment was carried out on a small simulated tank within the Matlab®/Simulink® environment. The tank dynamics were assumed to be as follows:

h ˙ ( t ) = 2.0 u ( t ) 0.5 h ( t ) (22)

The control design procedure as outlined in Section 3 was then applied to design a closed loop system with setting time of 13 seconds and 4.321% overshoot (natural frequency ω n = 0. 5 and optimal damping ζ = 0. 7 0 71 ), to yield a closed-loop reference dynamics given by:

0.25 s 2 + 0.7071 s + 0.25 (23)

A Simulink model of the proposed controller and tank is as shown as Figure5. In the simulation, a series of three setpoints (50 mm, 100 mm and 150 mm) were successively applied at 0 seconds, 50 seconds and 100 seconds respectively. In addition, three small alternating disturbance flows were also introduced at 25 seconds, 75 seconds and 125 seconds. The total simulation time was 150 seconds. The results obtained are as shown in Figure6. The Figureshows the commanded setpoint level (black trace) versus time, and also the simulated actual level (red trace) also versus time. For this Figure, it can clearly be observed that linear behaviors are achieved across the range of commanded levels, with the required overshoot and setline time being achieved in each case. Disturbance rejection is quick, effective and uniform at each of the three operating levels.

Figure 5. Matlab®/Simulink® model of the controller.

Figure 6. Simulated tracking and disturbance rejection.

4.2. Experimental Study

In order to further evaluate the proposed control method described in the previous Section on real industrial hardware, a second experiment was carried out on an existing test facility at Teesside University, as shown in Figure 7. The configuration of the rig for the purposes of this paper was to control the level of water in the holding tank using an inverter-connected pump, with the drain outflow value to the sump set at 50% open. Level was instrumented using an accurate float sensor. Control signals to and from the rig were implemented by 4 - 20 mA current loops to a local Schneider® PLC, with TIA-232 link to a local PC executing Simulink© for data acquisition purposes. The Modbus protocol allows setpoint, control signal and level sensor signals to be read/written in real-time from a Simulink® model executing within the Real-Time Windows Target environment. For generation of control code for embedded targets directly from Simulink© models, the interested reader is referred to [15], for example.

The control cabinet and PLC are depicted in Figure 8, which also shows the inverter driving the pump motor, power supply/protection and analog interfaces. Previous experiments on System Identification have been carried out on this rig, and w.r.t. Equation (3), the following model parameters have been identified from a drain-and-fill test:

h ˙ ( t ) = 0.0122 u ( t ) 0.00497 h ( t ) (24)

Comparison of the model tank level with the real tank level during the drain-and-fill test is as shown in Figure 9. The calibrated model fits the data with accuracy > 90%, with the main deviation occurring with the tank being close to empty, away from the main operating points of the test rig.

The control design procedure as outlined in Section 3 was then applied to design a closed loop system with setting time 100 seconds and 4.321% overshoot (natural frequency ω n = 0.0 65 and optimal damping ζ = 0. 7 0 71 ), to yield a closed-loop reference dynamics given by:

Figure 7. Experimental test rig.

Figure 8. Experimental test rig control cabinet.

Figure 9. Model level comparison to real level.

0.25 s 2 + 0.7071 s + 0.25 (25)

The settling time was chosen to be 100 seconds to prevent problems due to saturation of the pump, as values significantly shorter than this lead to saturation and integral action clamping. The controller was then implemented within the PLC, using a sample time of one second. A function block implementation was created, implementing Equations (16) and (17). Only a very small amount of instructions (analog read/write operations, addition, multiplication, square root and memory read/write operations) were required. An experiment was carried out in which two-level setpoints (0.5 m and 1.0 m) were applied at 0 seconds and 250 seconds. The total simulation time was 500 seconds. The results obtained are as shown in Figure 10.

The Figureshows the commanded setpoint level (black trace) versus time, and also the simulated actual level (red trace) also versus time. For this Figure, it can clearly be observed that linear behavior was achieved across the two commanded levels, with the required overshoot and settling time being (approximately) achieved in each case, despite the presence of some noise affecting the level measurement.

5. Summary

The focus of this paper has been upon accurate liquid level control in single tank systems which can be actuated continuously, and modulation of the level setpoint is also required. A simple but accurate technique based around feedback linearization and Proportional Integral (PI) control has been introduced. It has been shown that this simple controller can maintain linear performance over the full operating range of a uniform tank, using only parameters estimated from a simple fill-and-drain experimental test. Implementation details have been discussed. Simulation results and experimental results on a large-scale laboratory level control system implemented using an industrial PLC illustrate the effectiveness of the proposed approach for both level tracking and disturbance rejection.

Figure 10. Experimental tracking of level setpoint.

It is concluded that the proposed scheme can potentially benefit industrial level control applications, both for stand-alone operations and those implemented within a wider supervisory control scheme within a DCS. Future work will focus on the application of feedback linearization to multiple chained tank applications.

Cite this paper: Short, M. and Selvakumar, A. (2020) Non-Linear Tank Level Control for Industrial Applications. Applied Mathematics, 11, 876-889. doi: 10.4236/am.2020.119057.
References

[1]   Dorf, R.C. and Bishop, R.H. (2004) Modern Control Systems. 10th Edition, Prentice-Hall, Englewood Cliffs, NJ.

[2]   Smith, R.S. and Doyle, J. (1988) The Two Tank Experiment: A Benchmark Control Problem. Proceedings of the American Control Conference, Atlanta, 15-17 June 1988, 403-415.
https://doi.org/10.23919/ACC.1988.4790058

[3]   Liptak, B.G. (2005) Instrument Engineers’ Handbook Volume Two: Process Control and Optimization. 4th Edition, CRC Press, Boca Raton, 2464 p.
https://doi.org/10.1201/9781420064001

[4]   Bolton. W. (2015) Instrumentation and Control Systems. 2nd Edition, Elsevier, Amsterdam.
https://doi.org/10.1016/B978-0-08-100613-9.00004-3

[5]   Camacho, E.F. and Bordons, C. (2004) Model Predictive Control. 2nd Edition, Springer Verlag, Berlin.

[6]   Cartes, D. and Wu, L. (2005) Experimental Evaluation of Adaptive Three-Tank Level Control. ISA Transactions, 44, 283-293.
https://doi.org/10.1016/S0019-0578(07)60181-5

[7]   Short, M. and Abugchem, F. (2017) A Microcontroller-Based Adaptive Model Predictive Control Platform for Process Control Applications. Electronics, 6, 88.
https://doi.org/10.3390/electronics6040088

[8]   Xiao, Q.H., Zou, D.Q. and Wei, P. (2010) Fuzzy Adaptive PID Control of Tank Level. 2010 International Conference on Multimedia Communications, Hong Kong, 7-8 August 2010, 149-152.

[9]   Sislin, R., Da Silva, F.V., Gedrite, R., Jokinen, H. and Rajan, D.K. (2016) Mathematical Modeling and Development of a Low Cost Fuzzy Gain Schedule Neutralization Control System. Engineering Letters, 26, 353-357.

[10]   Wang, M. and Crusca, F. (2002) Design and Implementation of a Gain Scheduling Controllerfor s Water Level Control System. ISA Transactions, 41, 323-331.
https://doi.org/10.1016/S0019-0578(07)60091-3

[11]   Vilanova, R., Alfaro, V.M. and Arrieta, O. (2011) Analytical Robust Tuning Approach for Two-Degree-of-Freedom PI/PID Controllers. Engineering Letters, 19, 204-214.

[12]   Slotine, J.J. and Li, W. (1988) Applied Non-Linear Control. Pearson Education, London.

[13]   Astrom, K.J. and Wittenmark, B. (1995) Adaptive Control. 2nd Edition. Addison Wesley, Boston.

[14]   Short, M. (2012) Fast Online Identification of Low-Order Time-Delayed Industrial Processes. Electronics Letters, 48, 152-153.
https://doi.org/10.1049/el.2011.3400

[15]   Kamiyama, T., Tamura, M., Soeda, T., Yoo, M. and Yokoyama, T. (2012) An Embedded Control Software Development Environment with Simulink Models and UML Models. IAENG International Journal of Computer Science, 39, 261-268.

 
 
Top