Control Algorithm for Two-Tank System using Multiparametric Programming

The two-tank system consists of two connected tanks, where the goal is to control the liquid levels in both tanks by manipulating the inflow rates. This study proposes a control algorithm for a two-tank system based on multiparametric programming. In this work, the flow rate is determined using multiparametric programming. The simulation studies demonstrate the proposed work’s effectiveness by comparing its performance with and without noise. Results show accurate and robust regulation of liquid levels, minimizing control effort and making it suitable for systems with dynamic variations or parameter uncertainties. In conclusion, the implementation of multiparametric programming is able to estimate the value of the output for the control algorithm of the two-tank system.


Introduction
The two-tank system is a common control problem used in process control and optimization.It involves controlling liquid levels in two interconnected tanks [1].The amount of fluid in the tanks must be maintained and regulated continually to achieve the intended output and meet the control objectives, such as product quality.A fundamental issue in the process industries is the regulation of liquid level in tanks and flow between tanks [2].For instance, if liquid is not adequately regulated, it will overflow and present a safety hazard.As a result, it is necessary to control the flow between the two tanks and the tank system's liquid level.
Several papers have addressed different approaches to controlling tank systems.Barat and Mandal [3] proposed an uncertainty and disturbance estimator-based control method for liquid level control in a coupled-tank system, demonstrating better performance compared to a PID controller.In a couple tank system [4] the evaluation using PD and PID controllers are proposed.The result shows that the PID controller fulfilled all objectives related to control.But, the study did not investigate the effect of uncertainties and measurement errors on the performance of the control algorithms.In [5], the internal model controller (IMC) and optimal PID control have demonstrated efficacy in controlling the liquid level in the tanks where the settling time and overshoot of the controllers can be improved by using appropriate tuning methods.Urrea and Páez designed and compared four control strategies for an inverted conical tank system, including classical PID, gain scheduling, internal model control, and fuzzy logic [6].The classical PID controller effectively controls liquid levels near the operation point but struggles with farther points.Modern controllers are more effective in compensating for overshoot and oscillation.This study examines contemporary plant control methods, such as control flow employing multi-parametric programming, which is anticipated to improve the system's controllability and stability.
The objective of multi-parametric programming is to attain the optimal values of decision variables that maximize a specified objective function, while satisfying constraints.These constraints can be inequalities or equalities and involve decision variables and parameters.The goal is to find the best solution that meets all the constraints while maximizing or minimizing the objective function.This approach has been applied in process system engineering [7].It allows for considering multiple objectives and the trade-off between them, providing a holistic perspective for decision-making.
In this study, multiparametric programming is used to control flow rate.Multiparametric programming is a mathematical optimization technique that deals with problems involving multiple parameters.It allows for optimising a system over a range of parameter values rather than a single fixed value.In the context of the two-tank system, multiparametric programming can be used to find the optimal control strategy for maintaining the desired liquid levels in the tanks under various operating conditions.The multiparametric programming approach involves formulating an optimization problem considering system dynamics, constraints, and objective functions.In this case, the parameters include the operating conditions such as inflow rates, outflow rates, tank sizes, and desired liquid levels.By defining a parametric optimization problem, one can obtain a solution valid for a range of parameter values, allowing for robust control of the two-tank system.

Two-tank System
As shown in Figure 1, a two-tank system is proposed in this study, where the output from tank 1 is input for tank 2 [8].The two-tank system's mathematical model is given in Equations (1) and Equation (2).For this system, height of liquid in tank 1 is given as ℎ ! and height of liquid in tank 2 is ℎ " and flow of liquid into tank 1 is  #$ .The parameter used in the two-tank system is given in Table 1.
ℎ  Flow of liquid into the tank 1 5 m 3 /s

Control algorithm for a two-tank system using multiparametric programming
This study aims to regulate the liquid levels in the second tank through multiparametric programming to manipulate the inflow and outflow valve flow rates.Hence, after the mathematical model of a twotank system is developed, an explicit control algorithm is formulated using multiparametric programming (MPP) [9].The objective function in this work is to minimize the error between   and   to explicitly obtain the input voltage,   as a function.The   will be the control element in the two-tank system.The formulation of MPP is given below: Obj function = : ;ℎ < !( + 1)−ℎ !( + 1)? " + ;ℎ < " ( + 1) − ℎ " ( + 1)?
Subject to: Equation (1) and Equation ( 2) ℎ " (0) = 30 These equations are then will be solved symbolically using Mathematica software.The solution will allow us to derive   , as an explicit control function and the solution is given as in Equation (10).Equation ( 10) is then substituted in the two-tank model, as shown in Figure 2.

Result and discussion
The result of simulation for  #$ using multiparametric programming method performed without and with noise are illustrated in Figure 3 and Figure 4, correspondingly.The simulation is performed for 100 sec for the time step of 0.1.The proposed work of multiparametric programming to evaluate  #$ using the explicit function as obtained in Equation ( 9) able to determine  #$ = 5 m 3 /s in without noise scenario.However, in noisy scenarios, the simulated  #$ was influence by noise.These results show that the explicit function developed by MPP can evaluate flow of liquid into tank 1,  #$ either noise-free or noisy scenarios.
In this work, the aim is to control the liquid levels in the tanks by manipulating the flow rates of the inlet using multiparametric programming.By implementing the explicit function as shown, the output of the two-tank system is demonstrating in Figure 5.It is observed that the output result of the two-tank system with MPP has a little decrement since the MPP system is now controlling the output.Nevertheless, the proposed work successfully controlled the two-tank system using the proposed MPP algorithm.

Conclusion
In this work, the two-tank system with multiparametric programming is proposed.Multiparametric programming allows simultaneously considering multiple parameters and constraints, improving performances and robustness.The proposed work successfully regulates the levels of liquid in the tanks through the utilization of multiparametric programming.The advantages of using MPP for two-tank systems include enhanced performance, better handling of constraints and improved stability.The explicit nature of the controller enables faster computation times and reduced computational complexity compared to other optimization techniques.

Figure 2 .
Figure 2. Simulink block of two tank system with MPP control algorithm.

Figure 5 .
Figure 5.The output response of the two-tank system.

Table 1 .
Parameters of the two-tank system. )