Improved Coupled Tank Liquid Levels System Biology Essay

Published: Last Edited:

This essay has been submitted by a student. This is not an example of the work written by our professional essay writers.

-Improved Coupled Tank Liquid Levels System Based on Hybrid Genetic-Immune Adaptive tuning of PI Controller. Abstract: The accuracy and stability of many systems in chemical and process industries which has Two-Input Two-Output (TITO) is one of the key factors of process which have cross coupling between process input and output. Unlike traditional neural network weight adaptation using gradient descent method, Hybrid Genetic-Immune technique was utilized for adaptive tuning of neural network weights adjustment and fine tuning the controller's parameters. Firstly, the TITO is modeled in Simulink and the HGA-AIS algorithm is implemented in MATLAB. Secondly, the performances of proposed method also compared with GA and Artificial Immune System (AIS) alone. Finally, the result shows that HAIS-GA have superior features, stable convergence characteristic and good computational efficiency.

Key words: AIS, GA, level control, water tank


Liquid tank systems play important role in industrial application such as in food processing, beverage, dairy, filtration, effluent treatment, pharmaceutical industry, water purification system, industrial chemical processing and spray coating. A typical situation is one that requires fluid to be supplied to a chemical reactor at a constant rate. An upper tank can be used for filtering the variations in the upstream supply flow. Many times the liquid will be processed by chemical or mixing treatment in the tanks, but always the level of the fluid in the tanks must be controlled. Vital industries where liquid level and flow control are essential include petrochemical industries, paper making industries, and water treatment industries [1].

In order to achieve high performance, feedback control system is adopted. Classical PID controller is widely applied in industry control such as temperature control, speed control, position control, but it is difficult for PID regulation to reach the aim of high speed and short transition time and small overshoot [2]. Advanced control methods also have been proposed by several researchers such as sliding mode control[3] and nonlinear back stepping control[4], tuning methods based on optimization approaches with the aim of ensuring good stability robustness have received attention in the literature[5,6].

Accurate model and its parameters which capture the characteristic of the coupled tank system are required for designing its controller for achieving a good performance. In this project a new Hybrid Genetic-Immune technique utilized for adaptive tuning of neural network weights adjustment and fine tuning the controller's parameters. The two optimization methods are Artificial Immune System (AIS) and the Genetic Algorithm (GA). Two processes are included in the HAIS-GA which, the first one is AIS where the algorithm is able to improve local searching ability and efficiency. In the HAIS-GA, the last generation from the AIS process will be made an input for the next process (GA). The validation shows that proposed method are better compared to those obtained from AIS and GA alone.


A) Artificial Immune System

People often turn to nature whenever seeking new ideas to solve computational problems that has become much complex. The vertebrae immune system has been greatly attended to as it is a good potential source of inspiration. It is thought of as the possibility to glean different insights and alternative solutions, compared to other biological-based methods. Due to a wide variety of problems ranging from optimization, fault tolerance, data mining, bioinformatics and robotic systems being opposed with the development of solutions, the field of Artificial Immune System (AIS) has become popular with its high distribution. It is also highly adaptive, self-organizing in nature, capable of maintaining memories of past encounters while continually able to learn about upcoming encounters that has never been approached. From over the past few years, AIS-based works span from theoretical modeling and simulation to more variety of application. Interest in the AIS field has been increasing among many of new works inclusive in this field of research today [7-9].

To make it understandable, the properties of an immune system; being robust, fault tolerant, dynamic and adaptive, it is very suitable to be emulated in a computer system. The following are basic elements that compose an Artificial Immune System (AIS):

A representation for the components of the system (e.g., binary strings, vectors of real numbers, etc.).

The evaluation of the interaction between individuals and their environment in any ways through a set of mechanisms. Normally, such environment is simulated through an affinity function based on the objective function in the case of optimization.

The adaptation procedures which indicates how a system behavior changes over time. Example of such adaptation procedure consists of mutation operators.

B) Genetic Algorithm

Genetic Algorithm (GA), an intelligent optimization technique with searching procedures that are based on natural selection and genetics. In the early 1970s was when GAs is first set to form. Usually, GAs is used to optimize, solve difficult search and machine-learning problems that has resisted automated solutions previously [10,11]. It used to quickly and reliably solve difficult problems. With existing simulations and models, these algorithms are easy to interface and to be hybridized. There are three major operators; selection, cross-over and mutation, with addition to four control parameters; population size, selection pressure and cross-over and mutation rates, that is included in GAs. It also directs population-based optimization methods. The discussion within this article mainly focuses on the selection and mutation operators [11]. Three main stages in Genetic Algorithm are included and they are the reproduction, cross-over and mutation. The following section of the article explains these stages.

C) PID Controller

A combinational PI controller with neural network structure for controlling the liquid level coupled tank system.

Putting aside the rapid evolution in control hardware, the proportional-integral-derivative (PID) controller still retains as the workhorse in process industries. Controller output is adjusted according to the size of the error in the P action (mode). The steady state offset is eliminated the I action (mode) and the future trend is anticipated via the D action (mode). These useful functions are sufficient for a large number of process applications and the transparency of the features leads to wide acceptance by the users [12] as shown in Fig.1.

Figure 2: PID controller

In PID controller design methods, the most common performance criteria are IAE, ISE, MSE and ITAE performance criterion formulas are as follows:


Integral of Absolute Magnitude of the Error (IAE)

Integral of the Square of the Error (ISE)

Mean Square Error (MSE)

Integral of Time multiplied by Absolute Error (ITAE)


The coupled tank system considered in this study is shown in Fig. 2 where Qi = {Qi1, Qi2} are the inlet flow rate to tank 1 and tank 2, Q12 is the liquid flow rate from tank 1 to tank 2 through orifice, Qo= {Qo1, Qo2} are the outlet flow rate of tank 1 and tank 2 and h = {h1, h2} denotes the liquid level of tank 1 and tank 2, respectively. In this simulation, the target is to control the level in two tanks by the inlet liquid flow from two pumps. The process input are u = {u1(t), u2(t)} (voltage input to pumps) and the output are h = {h1(t), h2(t)} liquid level in tank 1 and tank 2 respectively [13,14].

The nonlinear plant equations can be obtained by mass balance equations and Bernoulli's law. After linearization process, the linear plant equations can be obtained as:

Fig. 2: Schematic of coupled tank process


where A is the cross sectional area of tank 1 and 2 (cm2), a is the cross sectional area of outlet hole of tank 1, tank 2 and the cross sectional area of jointed opening between tank 1 and tank 2 (cm2)

β1 = the valve ratio at the outlet of tank 1, β2 is the valve ratio at the outlet of tank 2

βx = the valve ratio between tank 1 and tank 2, ,are the steady-state water level of tank 1 and tank 2

g = the gravity (cm2 sec-1)

k1, k2 = The gain of pump 1 and pump 2 (cm3 Vsec-1), respectively

From the linear plant Eq. 1, it can be transformed to yield a nominal block transfer function of the form (2):


Through simple algebraic manipulation, the transfer matrix Gij(s) yields to:


Provided that T1 is the time constant of tank 1, T2 is the time constant of tank 2 and Tx is the time constant interaction between tank 1 and 2.

According to transfer matrix Gij(s) in (2) and (3), the transfer functions of coupled-tank process are second order form which have cross coupling between process input and outputs. The decoupling controllers are required for minimizing the effects from cross coupling and transform TITO plant transfer function into SISO form. This is where neural network structure is introduced at which can be functioning as the de-coupler controller.


There are two major processes contained within the proposed algorithm, the AIS and GA, in terms the AIS process is initiated with the following procedures:

From the best population in AIS, generate initial population of individuals

Compute the fitness values of each of the individuals in the current population.

Individual selection for reproduction.

Application of the crossover and mutation operator.

Compute the fitness value of each individuals

Select the best individuals to create the new population.

Repeat steps 3 to 6 until a pre-defined stopping criterion is attained.

First step, usual AIS are used for particular generation. For example, within 100 generation, the best population will be moved on to the next process replacing the usual random population used in the GA. Second step, GA uses an input from the best population obtained in AIS in its procedures in this new method. The flowchart Fig.3 shows the hybrid of AIS-GA.

Fig.3 Hybrid AIS-GA


The parameters of the coupled tank system are taken as follows:

Cross sectional area of tank 1 and tank 2, A = 66.25 (cm2).

Height of each tank H = 18.5 (cm).

Area of the coupling orifice, a = 0.1963 (cm2).

Valve ratio at the outlet of tank 1, β1 = 0.35903.

Valve ratio at the outlet of tank 2, β2 = 0.345848.

Valve ration of the outlet between tank 1 and tank 2, βx = 0.38705.

Gravitational rate g = 981 cm sec-12.

The liquid levels of the coupled tank system are required to follow step responses within the range of 0~300 cm (0-100%). System responses namely the liquid level for both tank 1 and tank 2 are observed. The minimum and maximum values of the controlled manipulated variables are capped to umin = 0 volt and umax = 5 V.

To control the water level of the tank system, according to the trials, the following GA and AIS parameters are used to verify the performance of the H(AIS-GA)-PID controller parameters:

Population size: 20;

Total Iteration : 100;

GA iteration : 50;

AIS iteration : 50;

Clone size factor : 5;

The performance of GAs, AIS, HAIS-GA are analyzed on the basis of ITAE, ISE, MSE and IAE. Fig. 4-7 shows the step response for MSE ITAE, ISE and IAE error appreciated the amount of improvement in the HSIA-GA method compare to GA and AIS, clearly in the overshoot, settling time and rising. Finally, table1 shows that both HAIS-GA methods shows better ITAE, ISE, MSE and IAE for design a PID Controller for couple tan system.

Table 1: Comparison among GA, AIS, HAIS-GA for Design a PID Controller























% Overshoot
















Settling Time
















Figure 4: Step response of MSE error using GA, AIS and HAIS-GA

Fig. 5: Step response of ITAE error using GA, AIS and HGA-AIS.

Fig. 6: Step response of ISE error using GA, AIS and HGA-AIS.

Fig. 7: Step response of ITAE error using GA, AIS and HGA-AIS.

VI. Conclusions

The application of proposed Hybrid of GA with AIS was successful designed a PID controller of a couple tank system, constructed, and tested. From the results can conclude according the performance criterion ISE, MSE, IAE, and ITAE that the hybridization optimization method that used to tune the PID parameters that make the system more stability and better performance in terms the overshoot, Rising time and settling time. In addition, HAIS-GA method achieved better results compared with GA optimization method and AIS optimization method if applied separately under same circumstances in terms of the number of generation, population size, crossover factor, mutation factor, and so on.