Skip to main content
ACS Omega logoLink to ACS Omega
. 2022 May 20;7(22):18605–18611. doi: 10.1021/acsomega.2c01275

Model-Predictive Control for the Three-Tank System Utilizing an Industrial Automation System

Jukka Kortela 1,*
PMCID: PMC9178774  PMID: 35694502

Abstract

graphic file with name ao2c01275_0008.jpg

A three-tank process has difficulty in controller design because of nonlinear flow and interactions between tanks. This paper addresses the design methodology of the model-predictive controller (MPC) for the three-tank system. The control performance of the proposed MPC controller is compared with the proportional plus integral (PI) controller by both simulations and experiments on the real three-tank pilot with the industrial ABB 800xA automation system. The MPC controller shows a faster response for the two tanks: In the simulation, the settling times are about 120 s for both tanks of the MPC controller. On the other hand, the settling times for the PI controller are about 200 s for the first tank and 150 s for the second tank. The experiments confirm these results.

1. Introduction

Typical processes require the simultaneous control of several variables related to one system. Each input may affect all system outputs. The liquid level is one of the important controlled variables in modern process control, and control accuracy plays an important role in improving product quality and enhancing economic benefits. The three-tank system is a typical multivariable system with features of strong coupling and nonlinearity, which gives it great research value in the study of liquid level control.1

Many control methods have been proposed for the liquid level tracking control problem of the three-tank system. An interval type-II fuzzy logic systems (IT2FLS) is presented by Sahu and Ayyagari,2 and it is compared with a linear quadratic regulator (LQR). The test results show that the response is oscillatory when the liquid level is controlled by the LQR controller. In contrast, IT2FLC can achieve a much faster and better response. A method for a rough controller based on rough set theory (RST) was proposed by Aixian and Yun3 for the control of the liquid levels of the three-tank system. The key element in designing a rough controller is extracting rule sets from human behavior data according to the RST algorithm. The results show that the method of the rough controller (RC) is feasible, and the control performance is satisfactory.

The simplest form of the coupled multivariable system of the level control is the two-tank system with 2 inputs and 2 outputs presented by Essahafi.4 First a state space model is developed for the system. Then the unconstrained model-predictive control (MPC) is designed. The simulation results show that the MPC controller allows a good disturbance rejection and robustness. di Capaci et al.5 present three different formulations of MPC to handle static friction in control valves. The quadruple-tank process is used as a testing simulation environment. It is observed that stiction embedding nonlinear MPC only can guarantee good performance in set-points tracking and also stiction compensation. Piñón et al.6 validate the multiple-input multiple-output adaptive predictive controller (MIMO-APC) with the two simulated processes: a quadrotor drone and the quadruple-tank process. The simulation shows excellent set-point tracking behavior in the quadruple tank, in comparison to that with the control strategies previously reported in the literature.

Nonlinear model predictive control (NMPC) uses a more accurate nonlinear model for the control of the three-tank system.7 An experimental stability study of NMPC was carried out on the quadruple-tank process by Raff et al.8 The results showed that NMPC does not naturally guarantee closed loop stability. The closed loop asymptotic stability can be achieved with the NMPC approaches developed in theory. Yu et al.9 developed a controller composed of a feed-forward and feed-back controller for the three-tank systems. An improved cuckoo algorithm is proposed to solve the optimization problem involved in the developed nonlinear model predictive control. However, measurement and model mismatches lead to large errors in the experiment. In the nonconvex problem, an optimal solution cannot be guaranteed. In addition, an optimization problem can be too large to be solved online. A novel algorithm for utilizing the bees algorithm in an MPC is proposed by Sarailoo et al.10 in order to control a class of nonlinear systems. However, the computational burden is still too heavy to implement.

MPC is able to handle constraints in the MIMO systems and attenuate disturbances since the optimization problem is solved online with new measurements. Compared with, for example, the PID controller, MPC can achieve a faster response and no overshoot.11 In order to show the effectiveness of the MPC controller, the control performance of the proposed MPC controller is compared with the PI controller by both simulation and experiments. For the PI controller, there are well-established methods for tuning and stability analysis. Therefore, it is used in comparison. The main contributions of this paper are summarized as follows: (1) The nonlinear model of the three-tank system is presented, and the parameters of the simulation model are identified as close as possible to model the real system used in the experimental setup. (2) The state-space-based MPC is implemented by taking into account the computational burden. (3) The parameters of PI controllers are tuned and detuned with the well-established methods. In addition, the performance of the MPC and PI controllers are evaluated with the time-integral performance criteria. (4) The test results are validated on an experimental benchmark using the industrial automation technology with a new OPC UA communication technology where the advanced control is implemented on a remote computer independent of the used automation system.

This paper presents a MPC for the three-tank system. The paper is organized as follows: section 2 presents the dynamic models of the three-tank system. Section 3 presents the MPC controller for the three-tank system. The simulation results are presented in section 4. The experimental work and results are presented in section 5, followed by the conclusions in section 6.

2. Modeling of the Three-Tank System

The three-tank system consists of tanks named T1, T3, and T2 with the same cross-sectional area Ab, as shown in Figure 1. These cylindrical tanks are connected serially to each other by the cylindrical pipe with cross-sectional area Ac. Liquid is collected in a reservoir and is pumped back into tanks T1 and T2 with pumps 1 and 2 to maintain their levels. All of the tanks are equipped with a piezoresistive pressure transducer, which measures the liquid level in the tank.

Figure 1.

Figure 1

Three-tank system.

Q1 and Q2 are the flow rates of pumps 1 and 2, respectively. The flow rate provided by the pump is proportional to the DC voltage applied to its motor.

The tanks are equipped with manually adjustable valves and outlets V13, V32, V3O, VL1, VL3, and VL2 for the purpose of simulating clogs as well as leaks. In the tested system, valves V13, V32, and V3O were open, and the leakage valves VL1, VL3, and VL2 were closed.

The mass balance of the three-tank system is given as follows.1

2. 1a
2. 1b
2. 1c

where Ab is the cross-sectional area of the tank, hi (i = 1, 2, 3) is the level of the tank i, Qi (i = 1, 2) is the flow rate of the pump i, qmn (mn) is the flow rate from tank m to tank n, and qLi (i = 1, 2, 3) is the leakage flow rate of the tank i. The flow rates between the tanks and flow rate out from the tank 2 are given by

2. 2a
2. 2b
2. 2c

where αij ∈ [0,1] denotes the outflow coefficient between tank i, j and out from the tank 2, Ac denotes the cross-sectional area of the connecting pipe, and vmn (mn) denotes the flow velocity. By assuming that h1 > h3 > h2 and the density of the liquid is constant in the three tanks and using Torricelli’s law based on Bernoulli’s law, the flow velocity between the tanks and out from tank 2 is as follows:

2. 3a
2. 3b
2. 3c

Inserting eqs 2 and 3 in eq 1, we get the model equations as follows:

2. 4a
2. 4b
2. 4c

where g is the gravity constant. The linearized state-space model parameters are given by

2. 5
2. 6

where A is the state matrix, B is the input matrix, C is the output matrix, D is the matrix that describes which inputs affect directly the outputs, and h1s, h2s, and h3s are the operating points of the three levels, respectively.

3. Model Predictive Control for the Three-Tank Pilot System

3.1. State-Space Model-Based MPC

As it was possible to develop the detailed physical model of the three-tank system, it was a natural choice to use the linearized version of that model directly with the MPC. The inputs for the MPC are the reference values for the two water levels (r) and the measured process outputs for the levels (y). The outputs for the MPC are the manipulated variables, two water pump speeds (u). The linear state-space system for the MPC is as follows:12

3.1. 7

where x are the states, E is the disturbance matrix, and d are the disturbances.

3.2. Regulator

The process is described by the model

3.2. 8

where H(kj) are the impulse response coefficients. Using eq 8, the regularized l2 output tracking problem with the input, the input rate of movement, and the output constraints are formulated as

3.2. 9

where Δu(k) = u(k) – u(k – 1), Np is the prediction horizon, r is the future target vector, Qz is the tracking error weight matrix, and S is the move suppression factor weight matrix. The vectors Z, R, U, and D are defined as

3.2. 10

Then the predictions by the step response model (eq 8) are expressed as

3.2. 11

Φ, Γ, and Γd are composed as

3.2. 12

and

3.2. 13

To clarify, the height of the Λ matrix is one smaller than Np. Therefore, for the case of Np = 6, Λ is composed as

3.2. 14

and

3.2. 15

Compared to the Λ matrix, the height of the matrices HS and Mu–1 are same as that of Np. Therefore, for the case of Np = 6, HS and Mu–1 are composed as

3.2. 16

and

3.2. 17

Then the optimization problem 9 is expressed as

3.2. 18

where

3.2. 19
3.2. 20
3.2. 21

The state-space-based MPC regulator problem 9 is solved by the solution of the following convex quadratic program

3.2. 22

where

3.2. 23
3.2. 24

In order to remove offset, a control system that can remove asymptotically constant nonzero disturbances is designed. The original system is augmented with a replicate of the constant, nonzero disturbance model.13

3.2. 25

where η are the integrating disturbance states, and the vectors wk, ξ(k), and vk are zero mean white noise disturbances for the states, integrating disturbance states, and the output equation, respectively. In the designed input disturbance model, Bd = B, Ad is the unit matrix, and Cη is the zero matrix. For the completeness, the measured disturbances d have been included in the augmented model. However, they are 0 in the three tank model. The states and the disturbances are estimated as follows:

3.2. 26

and the predictions of the future augmented states are obtained by

3.2. 27

where Lx and Lη are the filter gain matrices for the state and the disturbance, respectively. The observability of the augmented system is a necessary and sufficient condition for a stable estimator to exist. If the nonaugmented system (eq 7) is observable and the following condition holds

3.2. 28

the augmented system (eq 25) is observable.

If the constraints are not active, the closed loop system is stable and the system model is augmented with a number of integrating disturbances equal to the number of measurements (nη = p), and there is zero offset in controlled variables.

4. Simulation Results

The performance of the developed MPC controller was compared with the PI controller first in the simulation environment. Since the system is relative slow, 1 s was chosen as the sampling time for the simulation. After substituting by the system parameters in Table 1 and discretizing the model, the model is

4. 29

Table 1. Three-Tank System Parameters.

cross-sectional area of the tank (Ab) 0.0154 m2
cross-sectional area of the pipes (Ac) 5 × 10–5 m2
valve opening position (αij) αij = 0.84
maximum flow rate constraint (Qmax) 1.2 × 10–4 m3/s
maximum level (hmax) 0.63 m
operating point Q1 = 5.5 × 10–5 m3/s
  Q1 = 3.4 × 10–5 m3/s
  h1 = 0.40 m
  h2 = 0.23 m
  h3 = 0.31 m

Simulations are carried out for the three-tank system for 500 s. The input limits for the MPC controller were u1,min = 0, u1,max = 1.2 × 10–4, Δu1,min = −1 × 10–6, and Δu1,max = 1 × 10–6 m3/s for the flow rates Q1 and Q2. The output limits were y1,min = 0 and y1,max = 0.63 m for the liquid levels h1 and h2. The MPC controller is tuned with

4.

and the prediction horizon Np = 40. The parameters of PI controllers were tuned with the Ziegler–Nichols approximate model PID tuning rules14 and were detuned with the closed loop method15 similar to the one presented by Shamsuzzoha and Skogestad.16 Detuning factor used is F = 1. The resulting parameters of PI controllers are Kp = 2.1 × 10–3 and Ti = 21 for both liquid levels. In addition, an anti-windup technique was used to eliminate integral term accumulation beyond the saturation limits of the inputs. Figures 2 and 3 show the three-tank level response and input flow rates of the PI controller and the MPC controller. The MPC controller provides a faster response than the PI controller. The first tank level reaches the steady state after 100 s and the second tank after 40 s, taking into consideration the maximum flow rate, while it takes over 175 s for the PI controller for both tanks.

Figure 2.

Figure 2

System response using PI controller (above). System response using MPC controller (below).

Figure 3.

Figure 3

Input flow rates using PI controller (above). Input flow rates using MPC controller (below).

The time-integral performance criteria were used to evaluate the performance of the controllers.14 The integral absolute error (IAE) of the MPC controller for the level of tank 1 was 8.76, and for the level of tank 2, it was 1.49. In comparison, the IAE of the PI controller for the level of tank 1 was 12.17, and for the level of tank 2, it was 5.56.

5. Experimental Work

5.1. System Description

The experimental setup consists of the remote PC running Matlab software, two servers running ABB System 800xA software, the cabin with ABB PM856A PLC and IO cards, and the Amira DTS200 three-tank system represented in Figure 4. Figure 5 shows the piping and instrumentation diagram of the three-tank system. The first two channels of the AO820 card are received for the physical connections of two pumps. Two EPH Electronik inverters (GS24S) have been added between the AO card and the pumps. Table 2 presents the electrical connections of the invertors. Channel 2 receives the voltage from the adapters to provide power for the invertors since they are electrically isolated. Channel 5 sends out the needed signal for the pumps, while channel 8 receives the signal from the analog card (AO820).

Figure 4.

Figure 4

Automation configuration of the three-tank system.

Figure 5.

Figure 5

Piping and instrumentation diagram of the three-tank system.

Table 2. Three-Tank System Parameters.

channel description
1  
2 + power from 12 V DC adaptor
3 – power from 12 V DC adaptor
4 ground (GND)
5 + output signal to the pumps
6 – output signal to the pumps
7 + 10 V bridged to channel 9
8 0–10 V from the AO820 card
9 + 10 V bridged from channel 9

Level measurements P-101, P-301, and P-201 are wired to AI801 with the RealIO data type. These sensors measure the liquid level and send the 4–24 mA analog signal to AI801 (analog input card).

Six valves in the three-tank system define the input/output arrangements. The valves have electronic actuators. Channels 5–16 of the DO801 card are reserved for six valves: the on and off mode is implemented on each valve. Two SCHRACK relays (RT78725) have been allocated for each valve, one for the on and the other for off mode.

The connections to ABB PM856A PLC and cards are defined in the ABB Control Builder M Professional. Furthermore, the channels of the cards are connected to related variables that are defined in the application. Then the application is downloaded to PLC so that the variables are available on the OPC server. In addition, the Unified Automation UAGateway wrapper/proxy shows OPC servers as folders in its address space.

The MPC controller and PI controllers are implemented on a remote PC through MATLAB software. The communication between PC and PLC relies on the OPC UA wrapper through an Ethernet communication protocol.

5.2. Results

Next, the performance of the developed MPC controller was compared with the PI controller in the experimental setup. Due to the OPC UA read and write delays in MATLAB, 2.5 s was chosen as the sampling time for the experimental setup. After the system parameters are substituted in Table 1 and the model discretized, the model is

5.2. 30

The parameters of the MPC controller and PI controllers are the same as in the simulation. Figures 6 and 7 show the three-tank system level response and input flow rates of the PI controller and the MPC controller. The MPC controller shows a faster response for two tanks, the settling times are about 120 s for both tanks. On the other hand, the settling times for the PI controller are about 200 s for the first tank and 150 s for the second tank. In addition, overshoots for the levels of the tanks using the MPC controller are 9% for the first tank and 6% for the second tank, while for the PI controller, they are 12% for the first tank and 15% for the second tank.

Figure 6.

Figure 6

Level responses in experimental setup using the PI controller (top). Level responses in experimental setup using the MPC controller (bottom).

Figure 7.

Figure 7

Input flow rates in the experimental setup using the PI controller (top). Input flow rates in the experimental setup using the MPC controller (bottom).

The IAE of the MPC controller for the level of tank 1 was 5.38, and for the level of tank 2, it was 1.79. In comparison, the IAE of the PI controller for the level of tank 1 was 5.54, and for the level of tank 2, it was 2.24.

The MPC and PI controller perform in a similar way when the levels are rising due to the physical limit of 1.2 × 10–4 m3/s for both flow rates. However, the MPC controller shows the faster settling times for both liquid levels. In addition, the MPC controller can automatically decouple the interactions between the tanks, which results in a lower overshoot in tank 2 in the simulation and in experiment setup. The wilder input variations in the MPC controller are due to the rate of change constraints on the inputs.

6. Conclusions

This paper presents the MPC controller for the three-tank system. The simulation results showed the effectiveness of the proposed controller. After that, it has been implemented for the experimental three-tank system setup. The experimental results showed that the settling times are about 120 s for both tanks with the MPC controller, whereas the settling times for the PI controller are about 200 s for the first tank and 150 s for the second tank. In addition, the experimental setup shows how the MPC can be implemented in the remote PC utilizing the new OPC UA communication standard in the industrial automation system.

The author declares no competing financial interest.

References

  1. Chiriţa D.; Florescu A.; Florea B. C.; Ene R.; Stoichescu D. A. Liquid level control for industrial three tanks system based on sliding mode control. Rev. Roum. Sci. Technol. Électrotech. Énerg. 2015, 60, 437–446. [Google Scholar]
  2. Sahu H.; Ayyagari R. Interval Fuzzy Type-II Controller for the Level Control of a Three Tank System. IFAC-PapersOnLine 2016, 49, 561–566. 10.1016/j.ifacol.2016.03.114. [DOI] [Google Scholar]
  3. Aixian P.; Yun G. Design and Application of Rough Controller in Three-Tank System. IEEE Xplore 2010, 144–148. 10.1109/CCIE.2010.155. [DOI] [Google Scholar]
  4. Essahafi M.Model Predictive Control (MPC) Applied To Coupled Tank Liquid Level System. arXiv 2014, 10.48550/ARXIV.1404.1498. [DOI] [Google Scholar]
  5. Bacci di Capaci R.; Vaccari M.; Pannocchia G. Model predictive control design for multivariable processes in the presence of valve stiction. J. Process Control 2018, 71, 25–34. 10.1016/j.jprocont.2018.09.006. [DOI] [Google Scholar]
  6. Piñón A.; Favela-Contreras A.; Beltran-Carbajal F.; Lozoya C.; Dieck-Assad G. Novel Strategy of Adaptive Predictive Control Based on a MIMO-ARX Model. Actuators 2022, 11, 21. 10.3390/act11010021. [DOI] [Google Scholar]
  7. Bamimore A.; Taiwo O.; King R. Comparison of two nonlinear model predictive control methods and implementation on a laboratory three tank system. IEEE Xplore 2011, 5242–5247. 10.1109/CDC.2011.6160244. [DOI] [Google Scholar]
  8. Raff T.; Huber S.; Nagy Z. K.; Allgower F. Nonlinear model predictive control of a four tank system: An experimental stability study. IEEE Xplore 2006, 237–242. 10.1109/CACSD-CCA-ISIC.2006.4776652. [DOI] [Google Scholar]
  9. Yu S.; Lu X.; Zhou Y.; Feng Y.; Qu T.; Chen H. Liquid Level Tracking Control of Three-tank Systems. Int. J. Control Autom. Syst. 2020, 18, 2630–2640. 10.1007/s12555-018-0895-y. [DOI] [Google Scholar]
  10. Sarailoo M.; Rahmani Z.; Rezaie B. A novel model predictive control scheme based on bees algorithm in a class of nonlinear systems: Application to a three tank system. Neurocomputing 2015, 152, 294–304. 10.1016/j.neucom.2014.10.066. [DOI] [Google Scholar]
  11. Salem F.; Mosaad M. I. A Comparison between MPC and optimal PID controllers: Case studies. IEEE Xplore 2015, 59–65. 10.1049/cp.2015.1607. [DOI] [Google Scholar]
  12. Maciejowski J. M.Predictive Control with Constraints, 1st ed.; Prentice Hall: Harlow, 2002. [Google Scholar]
  13. Pannocchia G.; Rawlings J. B. Disturbance models for offset-free model-predictive control. AIChE J. 2003, 49, 426–437. 10.1002/aic.690490213. [DOI] [Google Scholar]
  14. Ogunnaike B.; Ray W.. Process Dynamics, Modeling, and Control; Oxford University Press: New York, 1994. [Google Scholar]
  15. Shamsuzzoha M. Closed-Loop PI/PID Controller Tuning for Stable and Integrating Process with Time Delay. Ind. Eng. Chem. Res. 2013, 52, 12973–12992. 10.1021/ie401808m. [DOI] [Google Scholar]
  16. Shamsuzzoha M.; Skogestad S. The setpoint overshoot method: A simple and fast closed-loop approach for PID tuning. J. Process Control 2010, 20, 1220–1234. 10.1016/j.jprocont.2010.08.003. [DOI] [Google Scholar]

Articles from ACS Omega are provided here courtesy of American Chemical Society

RESOURCES