Finite-TimeControl for a Coupled Four-Tank Liquid Level System Based on the Port-Controlled Hamiltonian Method

,is work investigates the finite-time control problem for a nonlinear four-tank cross-coupled liquid level system by the portcontrolled Hamiltonian (PCH) model. A fixed-free methodology is exhibited which can be used to simplify the controller design procedure. To get an adjustable convergent gain of the finite-time control, a feasible technique named damping normalization is proposed. A novel parameter autotuning algorithm is given to clarify the principle of choosing parameters of the PCH method. Furthermore, a finite-time controller is designed by a state-error desired Hamiltonian function, and the relationship between the settling time and a parameter is given, which can be applied in practical engineering easily to adjust the settling time according to the industrial need. Finally, simulation and experimental results verify the effectiveness of the proposed algorithm.


Introduction
e control of a coupled four-tank liquid level system (CFTLLS) has been studied extensively, which has typical nonlinearity, strong coupling, great inertia, and large time delay, and play an important role in many practical applications such as food processing, petrochemical industry, alcohol distillation processing, and water treatment facilities. Many conventional control methods have been applied to the liquid level control system, for instance, sliding mode control strategy [1], backstepping method [2], predictive control [3], fuzzy control [4], and fractional order method [5]. In engineering practice, one not only wants to reach the target level and maintain the state but also to control the reach time as soon as possible or within a range of scope due to safety or economic concerns. is inspires us to research a method to resolve this problem.
Different from the asymptotical stabilization in view of Lyapunov stability, the finite-time stabilization (FTS) can guarantee a system to achieve control objectives in finite time, which is important in practical applications such as traffic accident emergency assistance system, process control, and pursuit problem. e study of FTS can be traced back to 1963 [6]. e finite-time control technique has exhibited good performances such as fast convergence, disturbance rejection, and high accuracy. Many algorithms have been proposed to realize FTS, including adding a power integrator control [7,8], homogeneous control [9], command-filtered backstepping control [10][11][12][13], and terminal sliding mode control [14]. Recently, Yu et al. [10] proposed a finite-time command-filtered backstepping approach. Xue et al. [15] put forward a sufficient condition on the finitetime interval. Meanwhile, Ben Njima et al. [16] presented a finite-time stabilization approach of CFTLLS by solving some linear matrix inequalities. Cheng et al. [17] designed a robust finite-time controller and applied it to CFTLLS. To get a simpler finite-time control with adjustable settling time, the port-controlled Hamiltonian (PCH) theory absorbed our attentions. For many nonlinear systems, PCH theory has been studied extensively, presented early in [18,19]. Its well structure and the energy-based principle supply a nice tool to stabilize a class of system, and the computational complexity can be reduced effectively. Recently, a method named interconnection and damping assignment passivity-based control (IDA-PBC) has been presented and extended widely [20][21][22][23][24][25][26][27][28][29]. is method has been applied to process control [30][31][32]. To obtain FTS of the PCH system, Wang and Feng [33] investigated the global finite-time stability and stabilization of nonlinear PCH systems. Yang and Wang [34] obtained the finite-time H ∞ control design procedure for a class of nonlinear time-delay Hamiltonian systems. Fu et al. [35] investigated a composite finite-time disturbance observer controller. e theories about FTS based on the PCH method put forward in these papers are impeccable, but they are rarely used in CFTLLS, whose inherent complex nonlinearity leads to the confusion of solving the problem of FTS. e motivations of this paper are twofold. Firstly, some finite-time controllers of CFTLLS display good performance, but the settling time cannot be adjusted arbitrarily, and the controller is complicated. A simpler method to solve this problem will be widely used in engineering practice. Especially, for many multinode and multitask process control systems with logical order, if a large number of nodes logically require longer control time, it will take a longer time to achieve the control target on subsequent nodes. So, solving this problem has more practical meaning. Secondly, few papers illustrated the choice principle about parameters such as interconnection matrix or damping matrix of a desired PCH system, although good effectiveness is shown. It is necessary to find a vivid and distinct way to give a direction to select or determine these parameters. Motivated by the above discussions, the attention of this paper is mainly focused on solving the problem of the finite-time control of CFTLLS via the PCH method, in which the settling time can be adjusted easily.
e main merits of this paper are as follows: (1) the PCH model of CFTLLS is established. (2) A fixed-free methodology is proposed to satisfy the constraint conditions at equilibrium points of CFTLLS and to adjust parameters adaptively to meet different practical control targets which can be applied to practical engineering expediently. (3) A finite-time control law of CFTLLS is presented which can reduce or eliminate the effect of lumped disturbances. (4) A method named damping normalization is proposed to obtain the relationship between the settling time and the minimum eigenvalue of a matrix, which can be used to adjust the settling time easily. e rest of this paper is organized as follows. In Section 2, we give the problem formulation and briefly review some preliminaries of the PCH theory. e main results of this paper are developed in Section 3, where the stabilization and finite-time control of CFTLLS based on the PCH method are studied. Section 4 presents the simulation results and experimental results, which is followed by the conclusion in Section 5.
Notations: throughout this article, for a matrix P ∈ R n×m , P T denotes its transpose, and P > 0( ≥ 0) indicates that P is a positive definite (positive semidefinite) matrix. For a real symmetric matrix Q, λ Q denotes the eigenvalues of it.

Problem Formulation and Preliminaries
Consider the CFTLLS which is shown in Figure 1. e process model can be expressed as where the state variable x i , i � 1, 2, 3, 4, denotes the liquid level of tanki, that is, h i in Figure 1; u j , j � 1, 2, denotes the desired output flow rate of electric control pump j produced by the control law which will be designed in the following section; and a k , k � 1, 2, . . . , 8, and A i are the cross-sectional area of flow control valve mvk and the cross-sectional area of tanki, respectively. e control objective of this article is to establish a finitetime control law u jFTC , j � 1, 2, such that the liquid level of every tank can reach the target level from initial states in finite time and the settling time can be adjusted arbitrarily.
Next, some preliminaries on the PCH theory are briefly reviewed.
Consider the following nonlinear PCH system:  2 Complexity where the state variable x ∈ R n , the control input u ∈ R m , H(x): R n ⟶ R is the Hamiltonian function, skew-symmetric matrix J(x) � − J T (x), and R(x) � R T (x) ≥ 0. As mentioned in [20], assume there are matrices, and a desired Hamiltonian function H d (x): R n ⟶ R that verifies the so-called match condition where g ⊥ (x) is a full-rank left annihilator of g(x), that is, g ⊥ (x)g(x) � 0, and H d (x) can get the minimum at x * , with x * ∈ R n , the equilibrium point to be stabilized. en, the closed-loop system with the controller with x * being a (locally) stable equilibrium point. It will be asymptotically stable if, in addition, x * is isolated minimum of H d (x) and the largest invariant set under the closed-loop dynamics (7) contained in Meanwhile, a lemma about local finite-time stabilization and an inequality are reappeared as follows, which are important to obtain the main results of this paper. Lemma 1. (see [8,36]). Consider the dynamical system Suppose there exists a continuously differentiable function V(x): D ⟶ R, real numbers p > 1 and k > 0, and a neighborhood U δ ⊂ D⊆R n of the origin such that V(x) is positive definite on U δ and holds along the trajectories of system (9) starting from any x 0 ∈ U δ ⊂ R n ; then, the origin is a locally finite-time stable equilibrium point in U δ . Furthermore, the settling time of system (9) with respect to x 0 satisfies Lemma 2. (see [37]). Let x i be a real number for all 1 ≤ i ≤ n and 0 < p ≤ 1. en,

PCH Model of CFTLLS.
To utilize the passivity and energy balance property of the PCH method, we transform model (1) into the PCH model and propose a general routine to get the equilibrium point. So, en, the PCH model of CFTLLS can be obtained. It is difficult to satisfy constraint condition (5) at the equilibrium points of CFTLLS with those parameters. e following fixed-free methodology can obtain them and can be easily used in practical engineering with some degrees of freedom. If the practical needs changed, some parameters can also be adjusted adaptively based on this methodology.
Firstly, the equilibrium point x * � [x 10 , x 20 , x 30 , x 40 ] T should be fixed according to the actual demand, and some parameters can be determined reasonably. For CFTLLS, a set a * � a 1 , a 2 , a 5 , a 6 , a 7 , a 8 should be assigned beforehand.
And then, from (1) at the equilibrium point ( _ x * � 0), it is obtained that So, u 0 � [u 10 , u 20 ] T can be obtained as Furthermore, when the set a * is assigned, the uncertain parameter set a \ * � a 3 , a 4 can be calculated from (15) as follows: 30 , Remark 1. e selection of a * can be arbitrary provided reasonably. e set a \ * can be considered to be degrees of freedom to match some equations or need some requirements. Obviously, a 1 and a 2 can also be used as a \ * , but some parameters cannot be chosen as a \ * such as A i , i � 1, 2, 3, 4, because they cannot be adjusted. Based on this routine, an arbitrary equilibrium point can be obtained by adjusting a \ * adaptively. It is very useful in practical engineering. is routine can also be used for more sophisticated PCH models.

Remark 2.
e meaning of "adjusting a \ * adaptively" here refers to that the set a \ * can be solved from (17) when the desired equilibrium point needs to be changed, which is common in industrial applications. [33,36], we select the desired Hamiltonian function H d (x) as

e Finite-Time Control Law of CFTLLS. Inspired from
where r � 2μ/(2μ − 1), μ > 1, is a real number. For CFTLLS, once the Hamiltonian function H(x) and desired Hamiltonian function H d (x) are selected as (13) and   4 Complexity (18), respectively, matrices J(x), R(x), and g(x) can also be calculated as mentioned in Section 2. Furthermore, From eorem 1 in [36], to get a finite-time control law based on the PCH model, all parameters about J d (x) and R d (x) should be predetermined or calculated such that match condition (5). For system (2) with the n-dimensional state variable, the number of parameters of J d (x) is about (1/2)n(n + 1) considering the symmetry of it. And the parameters of R d (x) are more complex because of the positive semidefiniteness of it.
Deeply studied match condition (5), it is found that R d (x) (4) plays a key role in the stabilization in view of damping energy. Once system (2) is considered as a dissipation system, it is easy to get the point that when the energy of a system is extracted to zero or the energy from the outside is equal to the energy created inner, it will be stable at last. So, we get a simple technique to determine parameters about J d and R d to stabilize system (2) based on the PCH method as follows.
Theorem 1. (damping normalization). Consider system (2). Assume the desired damping matrix R d (x): where I is the identity matrix, ra �→ � [ra 1 , ra 2 , . . . , ra n ] is a positive real row vector, and interconnection matrix J d (x) where J a (x) � − J T a , the desired Hamiltonian function H d (x) is selected as (18), and match condition (5) is satisfied. en, the closed-loop system with u � α(x) (6) is global finite-time stable, and the settling time T(x 0 ) satisfies (11), and the parameters of J a (x) can be autotuned. Furthermore, if t 0 � 0 and μ is predetermined, then T(x 0 ) is proportional to Proof. From (21), (22), and match condition (5), according to preliminaries about PCH mentioned in Section 2, one can get the global asymptotically stability of system (2). To get the finite-time stability of system (2), the desired Hamiltonian function H d (x) is selected as (18). Now, choose H d (x) as a Lyapunov function candidate; then, as illustrated in eorem 1 in [33], along x(t), it is obtained that where ρ ≔ min λ R d (x) > 0. Since μ > 1, from Lemma 2 and (23), it follows that Because ρr μ > 0 and from (18), μ > 1, according to Lemma 1 and preliminaries on the PCH theory, it is obtained that the control law (6) is the finite-time controller of system (2) if H d (x) is selected as (18) and J d (x) and R d (x) are such as match condition (5).
Let us recall the proof procedure of eorem 1 in [36] about k and the settling time function (11). From the form of R d (x) in (21), it can be obtained that ρ � min ra 1 , ra 2 , . . . , ra n . In engineering practice, the initial state and the control target can be assigned in advance as the practical need, r or μ should be predetermined, so the scalar k in (11) can be calculated. Now, the relationship between the settling time T(x 0 ) and the parameter ra �→ is obtained. Next, the procedure of parameter autotuning is illustrated. Substituting (21) and (22) into (5), one can obtain Complexity 5 Note that g(x) is an m × n matrix, so g ⊥ (x) is an n × m matrix. From (25), if ra �→ is assigned, unknown parameters in matrix J a (x) can be calculated accurately. Now, eorem 1 can be obtained. [36], where J(x), R(x), and g(x) are prefixed, and the Hamiltonian function and desired Hamiltonian function are changed; that is to say, these two functions are to be changed at the same time which will lead to the system model to be changed. e damping normalization method in this paper can supply more optimized control laws for the fixed system model; that is to say, J(x), R(x), and g(x) and the Hamiltonian function can all remain unchanged. Remark 5. e meaning of parameter autotuning here refers to the accurate solution of these parameters such as J a (x) can be obtained from (5) and (22) other than estimated by experience judgement. Once other elements are determined, these parameters will be adjusted automatically.

Remark 3. eorem 1 is induced by the illustrative examples in
To apply eorem 1, we define J a (x) as the following form, and R a (x) as

Complexity
By substituting (19), (26), and (27) into (25), one can obtain where It is obvious that (28) and (29) make up a system of sixvariable first-order equations for ja ij , i, j � 1, 2, 3, 4, i < j. e number of equations in a system of equations depends on the number of columns of the matrix g(x), i.e., the number of controls. For CFTLLS, these two equations can only obtain the exact solutions of two unknown parameters.
To solve those unknown parameters of J a , let ja 12 � 0, ja 14 � 0, ja 23 where According to eorem 1 and (6), the finite-time control law of CFTLLS can be obtained as follows: where

Simulation
Results. e parameters we used here are listed in Table 1, where a 3 and a 4 can be calculated from (17) and ra i � 10, i � 1, 2, 3, 4, can be changed according to practical engineering. According to (11), T(x 0 ) can be calculated as T(x 0 ) ≤ 1.4708 s when the initial state x 0 � 0. Figure 2 shows that, within about 1.5 sec x i , i � 1, 2, 3, 4, can reach to the value of the control target.
To verify the relationship between T(x 0 ) and the parameter ra i , i � 1, 2, 3, 4, proposed in eorem 1, the values are changed as follows. When rd ≔ ra i � 20, i � 1, 2, 3, 4, T(x 0 ) ≤ 0.7354 s; that is to say, when rd is greater twice, the settling time T(x 0 ) is less twice. And when rd � 30, T(x 0 ) ≤ 0.4903 s. Figure 2 illustrates the corresponding results.
To show the better performance of the proposed method compared with the sliding mode control, the sliding surface is given as follows: and the reaching law is expressed as where m > 0 and k > 0. From (35), (36), and (1), the sliding mode control law can be obtained as Complexity , u 2SMC (x) � 1 c 2 /A 2 a 6 / a 6 + a 7 + 1/A 3 a 7 / a 6 + a 7 It is generally known that once the derivative of Lyapunov function _ V ≤ − aV 1/2 , where a > 0 and V � 1/2s 2 , then the system can be stable within a finite time t r ≤ 2V 1/2 (0)/a. Figure 3 shows the liquid levels under the sliding mode control law (37), in which c 1 � 0.12, c 2 � 0.12, and k � 1 when m � 5, 10, or 15. Compared with Figure 2, the proposed method in this paper shows better performance of the steady state, especially from local enlarged drawings based on the same scale.
Furthermore, as mentioned in the Introduction section, the finite-time control technique has good disturbance rejection performances. To facilitate the verification of this merit, a comparison between the finite-time control law proposed in this paper and the disturbance attenuation (in the L 2 sense) is illustrated in the following. e disturbance attenuation part of the control law can be obtained from [33]. Consider the following PCH system with external disturbances: where τ ∈ R q is the disturbance, g τ (x) ∈ R n×q is the disturbance gain, and x, J(x), R(x), and H(x) are the same as those in system (2). Let be the penalty signal, where h(x) is a weighting matrix. From eorem 5 in [33] and Proposition 6 in [21], a finite-time controller with the disturbance attenuation part of system (38) is obtained as follows: where c > 0 is the disturbance attenuation level. Let h(x) � I; we obtain   Complexity To get closer to the actual situation, we limit the input between 0 and 100. Disturbances are rejected into tank1 at 200 s and into tank2 at 600 s, respectively. Figure 4 shows the simulation results, in which xi, i � 1, 2, 3, 4, denotes the liquid level of tanki under the controller u FTS (x) (33) and xiL2, i � 1, 2, 3, 4, denotes the liquid level of tank i under the controller u L2 (x) (41). From Figure 4, the levels of tank3 and tank4 are not affected by disturbances of tank1, and the same result can be illustrated for disturbances at 600 s under two controllers. It shows that the two controllers have disturbance rejection performance, even if there are small differences between them. So, from the view of control, without the disturbance attenuation part in (41), the finite-time control law (33) has advantages of disturbance rejection. Figure 5 shows the inputs under the finite-time control with disturbances. It shows that, at 200 s, inputs can be quickly changed when disturbances are rejected into tanks. It is noted that although the effectiveness under the finite-time control is better than the sliding mode control, inputs illustrate large fluctuations within valid values. is is a research direction one can study further.

Experimental Results.
e experimental platform is given in Figure 6. Different voltage values of a pump provide different pumping forces, which can draw water from the reservoir at a corresponding flow rate and inject it into the relevant tank through the manual valve. ese voltage values are obtained by Matlab/Simulink and PLC according to the control law. Standard modular-structured PLC, Siemens S7-300 series, is used for this experimental platform.
As shown in Figure 7, the liquid level can be reached to the control target within a short time under the finite-time    Complexity control of this paper under the voltage limit, and there is almost little overshoot.
Between the time 11:06 and 11:07, two disturbances were added to tank1. Obviously, the liquid level of tank1 shows a sharp from 8 cm to nearly 9 cm. Accordingly, the level of tank4 drops continuously and returns to 12 cm soon. At the same time, the liquid levels of tank2 and tank3 have hardly been affected. Between the time 11:12 and 11:13, a sharp disturbance was added to tank2. e liquid level of tank2 illustrates a sharp from 8 cm to nearly 10 cm. e level of tank3 drops continuously and returns to 12 cm soon correspondingly.
ese two disturbances were achieved by adding water into tanks.
Because the flow control valves are manual, some parameters such as a i , i � 1, 2, . . . , 8, cannot be adjusted with great accuracy. Under this condition, the results are consistent with the simulation results with disturbances and illustrate good robustness.

Conclusions
In this paper, a finite-time control for CFTLLS based on the PCH method has been proposed in which the settling time can be adjustable. By introducing a theorem of parameter autotuning and damping normalization, the procedure of control design can be simplified, and some parameters can be self-settled. A relationship between the settling time and the minimum eigenvalue of a matrix is obtained to adjust the settling time easily. And simulation and experimental results demonstrate the effectiveness of the proposed method. A future direction will consider the developments of adaptive PCH controllers for CFTLLS with input delay and uncertain parameters.

Data Availability
e data used to support the findings of this study are included within the article.