The error-squared controller: a proposed for computation of nonlinear gain through Lyapunov stability analysis

This paper presents the computation of two limits for the nonlinear gain of the errorsquared controller considering two procedures and performance analysis so that a closed-loop system with this control algorithm is asymptotically stable in the Lyapunov sense. The first limit for the nonlinear gain is obtained using Lyapunov stability theorem. The second limit for the nonlinear gain is obtained computing a limit for a linear gain and then the procedure is generalized to the nonlinear case. Simulation results were made comparing the tuning methods proposed in this paper, for the error-squared controller, with other tuning conventional methods found in the literature. It shown that the limit computed from second method is more conservative.


Introduction
It is possible to create a controller with a continuous nonlinear function whose gain increases with the error.Such controller, described in Shinskey (1988) and applied in Sausen (2012), is called the error-squared controller.The gain can be expressed as (Equation 1) (1) where: is a linear part, is a nonlinear one and is the tracking error.If the controller is linear, but with the function becomes squared law.
In Shinskey (1988) are presented an errorsquared Proportional Integral (PI) controller used in control of surge and averaging level loops; and an error-squared Integral (I) controller that solves hysteresis cycling problems in level loops.These types of controllers have been useful to control surge tanks, but it is not recommended to be used for boilers, reboilers, or other vessels where thermal or hydraulic effects are prominent.
The error-squared controller can be used in liquid level control in production separators under load inflow variations, i.e., slug flow.It is observed that small deviations from the setpoint resulted in very little change to the output valve leaving flow almost unchanged.On the other, hand large deviations are opposed by much stronger control action due to the larger error and the law of the error-squared, thereby preventing the high liquid level in the vessel.The error-squared controller has the benefit of more stable flow rates for the downstream equipment process, with improvement in the response to different types of flow changes.

ActaScientiarum. Technology
Maringá, v. 36, n. 3, p. 497-504, July-Sept., 2014 Due to the nonlinear nature of the algorithm the error-squared controller cannot be tuned using conventional techniques.Since error-squared controllers are usually used to reduce slugging effects, conventional tuning methods would be difficult to configure.In literatureis discussed that gain calculated for the error-squared controller at the maximum level in processes surge tanks must be about 50% higher than the gain of the conventional controller.Usually the calculation must be repeated for the minimum allowable level and must be selected the higher of the two gains.
The closed-loop stability of the error-squared controller is an important issue, but the real objective of control is to improve performance of the process, that is, to make the output behave in a more desirable manner in relation to the process with controller.A way to describe the performance of control system is to measure certain signals of interest, such as, Integral Absolute Error (IAE), Integral Squared Error (ISE), and peak value in time (SHINSKEY, 1988).
In this context, the objectives of this paper are to determine two limits for the nonlinear gain of the error-squared controller, so that a closed-loop system with such controller is asymptotically stable in the Lyapunov sense and to realize a performance analysis.Following a comparison is made among the error-squared controllers with other three (3) control algorithms: the first, the conventional controller (CHEN, 1987) because this controller is used in most industrial control loops (ASTROM; HAGGLUND, 1995), the other two controllers are error-squared controller found in the literature suggested to be used to control the liquid level in production separators in the oil industry.

The models
Consider a linear time-invariant state-space system given by (Equation 2) (2) where: is state, is control signal, is output, and A, B, C are matrices of appropriate dimensions.The system is represented by the composition of the two state-space systems, the first one denotes the control actions P, I and D, and the second one denotes the process.Figure 1 presents the block diagram of system S, where is the proportional gain and is the reference, assumed zero with no loss of generality.Lyapunov stability analysis of the error-squared controller Stability theory plays a central role in systems theory and engineering.There are different kinds of stability problems in the study of dynamical systems.Stability of equilibrium points is usually characterized in the sense of Lyapunov, an equilibrium point is stable if all solutions starting at nearby points stay nearby; otherwise, it is unstable.
This section is concerned in determine a condition so that the closed-loop system presented in Equation ( 8) is asymptotically stable in the Lyapunov sense, on this account Lyapunov stability theorems give sufficient conditions for stability and asymptotic stability (SHUSHI et al., 2012).For this purpose are presented to follow two limits for the nonlinear gain of the error-squared controller that ensure the Lyapunov stability.The first limit for the nonlinear gain is obtained using Lyapunov stability theorem.The second limit is obtained computing a limit for the linear gain so that system presented in Equation ( 6) is asymptotically stable in the Lyapunov sense.By generalizing the procedure for the nonlinear case a limit is obtained for nonlinear gain .
Case 1: The first limit Initially consider the Lyapunov stability theorem.
Theorem 1: Let be and equilibrium point for the nonlinear system and be a domain containing Proof: See (KHALIL, 2002).
In the next theorem is enunciated conditions under which it can be concluded about stability of the origin as an equilibrium point for the nonlinear system by investigating its stability as an equilibrium point for the linear system.The theorem is known as Lyapunov's indirect method.
Theorem 3: Let be an equilibrium point of the nonlinear system , where is continuously differentiable and is a neighborhood of the origin.Let Then, the origin is asymptotically stable if for all eigenvalues of .The origin is unstable if for one or more of the eigenvalue of .
Proof: See (KHALIL, 2002).Now, assume that the system presented in Equation ( 4) is globally asymptotically stable in the Lyapunov sense.Then, according to Theorem 2 there symmetric positive-definite matrices and that satisfies Lyapunov equation (10) To follow it will be determined the limit first for the nonlinear gain of the error-squared controller.
Theorem 4: The system in Equation ( 8) is asymptotically stable in theLyapunov sense if (11) where: is the peak of the error signal.Proof: The system in Equation ( 8) can also be expressed (12) where: is nonlinear term.Defining the quadratic Lyapunov function (13) then its derivative is given by (14) substituting Equation (12) in Equation ( 14) is obtained (15) where: are scalars and depending on the state, since is a vector in order , is a symmetric matrix in order , and is a vector in order .Then, The first term on the right-hand side is negative-definite, while the second term is in general indefinite.Now, to find a condition on , so that the system in Equation ( 12), is asymptotically stable in Lyapunov sense, consider that the system can be linearized, conform Theorem 3, then the function satisfies the condition: (17) By developing the expression in Equation ( 14) is obtained (18) thus, for any there exits such that Considering that the first term on the righthand side in Equation ( 16), is a scalar, applying the norm 2 in the second term and substituting the term by peak of the error signal is found tha t therefore by Theorem 1 it is ensured that is negative-definite, so it is concluded that the origin of the system in Equation ( 8) is asymptotically stable in the Lyapunov sense.
Case 2: The second limit Initially consider the following Lemma.Lemma 5: A matrix of the form where is a squarerank-one matrix will: be symmetric; be rank 2, except for the special case is symmetric, in the case isrank 1; when is non-symetric, will have one positive and one negativeeigenvalue.
The Lemma 5 establishes that when is a non-symmetric matrix the state-space is partitioned into three subspaces: two with nonzero measure corresponding to and , and the zero-measure null space of .An important inequality is the Rayleigh-Ritz inequality (24) where: is a real symmetric matrix, and denote minimum and maximum eigenvalues of .
The procedure to be used follows by obtaining a limit for linear gain so that the system in Equation ( 6) is asymptotically stable in the Lyapunov sense.By generalizing the procedure to the nonlinear case, a limit is obtained for nonlinear gain such that asymptotic stability in the Lyapunov sense is guaranteed for system in Equation ( 8).
Theorem 6: The system in Equation ( 6) is asymptotically stable in the Lyapunov sense if (25) where: M is defined in Lemma 5, P and are given by Equation (9).Proof: Consider the system in Equation ( 6 Finally, there is no restriction on when , in this case always positivedefinite.Therefore the system in Equation ( 6) is asymptotically stable in the Lyapunov sense if .
Theorem 7: The system in Equation ( 8) is asymptotically stable in theLyapunov sense if (33) where: it is defined in Theorem 6 and ( 34) is the peak of theerror signal.Proof: Consider the system in Equation ( 8).Define a quadratic Lyapunov function As is symmetric positive-definite matrix, then , and M is an indefinite matrix, from of the inequality in Equation ( 31 . Let be the peak of the error signal then where is the interval defined in Equation ( 15).Finally, there is no restriction on when , in this case always positive definite.Therefore the system in Equation ( 8) is asymptotically stable in the Lyapunov sense if .

Results and discussion
In this section simulation results are presented using the computational tool Matlab, comparing the tuning methods for nonlinear gain derived in this paper (Theorem 4 and Theorem 7) with some tuning methods found in the literature.The controllers are applied in processes presented in (SKOGESTAD, 2004) and the tunings rules for the linear gain , integral time and nonlinear gain for each control algorithm are: (i) Conventional PI controller (PIConv): The linear gain and integral time used in this paper is the presented in Skogestad ( 2004); (ii) PI Error-squared controller 1 (CPIeq1): The tuning rule for according to Theorem 4; (iii) PI Error-squared controller 2 (CPIeq2): The tuning rule for according to Theorem 7; (iv) PI Error-squared controller 3 (CPIeq3): The tuning rule for presented in (FRIDMAN, 1994).
Process 1: Consider the transfer function of second order process (38) presentedin Skogestad (2004).The composition of the transfer function in Equation ( 38), with control actions P and I, considering the proportional gain and integral time results in the state-space system whose matrices are given by: (39) In the simulation was used initial condition .It is observed that for the simulation of the processes CPIeq1 and CPIeq2 the determination of the nonlinear gain depends on the maximum error of the process in closedloop.Here was assumed being that it is the peak of the error signal of the process with PI conventional controller.Figure 2 shows the development of the tracking error of the process with PI conventional controller and of the processes CPIeq1 and CPIeq2.It is observed that the error peaks are near justifying the selection.Initially it was computed the first nonlinear gain range presented in the Theorem 4, Equation ( 10), given by )).The limit for the nonlinear gain was chosen .Then the linear gain range was computed and the limit for the linear gain was chosen = 0.113.Finally it was computed the second nonlinear gain range presented in the Theorem 7, Equation (33), given by * (40) so that the limit for the nonlinear gain was chosen .Table 1 shows the tunings for the nonlinear gain and Figure 3(a) presents the outputs of the respective processes.It is observed that the nonlinear gain obtained in Theorem 7 (CPIeq2) is larger than both the nonlinear gain obtained in Theorem 4 (CPIeq1) and the nonlinear gain of the controller CPIeq3.It can be seen that processes CPIeq1, CPIeq2 and CPIeq3 have nonlinear gains that belong to the interval defined in the Equation ( 21), then as expected all processes have positive-definite Lyapunov functions and their derivatives are negativedefinite characterizing asymptotic stability in the Lyapunov sense, conform presented in Figure 3(b).   2 presents the results for these performance measures, together with the decrease of tracking errors (i.e., improved control action) compared to the PI conventional controller called and respectively to IEA and IEQ.
It is observed that the processes with PI errorsquared controllers have performance better that the process with PI conventional controller.The process with PI error-squared controller that presented better performance was the CPIeq2 with higher nonlinear gain, because the errorwas reduced by 7.34% to IEA and 4.84% to IEQ when compared to theconventional PIcontroller.Simulation results have shown that up to this system with PI error-squared controller has definite-negative derivative, then is asymptotically stable in the Lyapunov sense.Therefore the nonlinear gain is conservative.
Process 2: Consider the first order process in state-space system (41) that represents the liquid level system in Figure 4. To obtain the results were used the simulation parameters .
The PI error-squared controller will be applied so that the setpointis .Now, the composition of the state-space system in Equation ( 41) with the control actions P and I results in the system whose matrices are (43) The peak of the error signal this process in closedloop was assumed to be , that it is the maximum error of the process with conventional PI controller.Table 3 shows the tunings for the nonlinear gain as similar procedure outlined in Process 1. Figure 5(a) presents the outputs of the procbesses and Figure 5(b) presents the Lyapunov functions and its derivatives.As is expected all the process have positive definite Lyapunov function and negative-definite derivative, therefore the nonlinear gain is conservative.Table 4 shows that all the processes with error-squared PI controllers have performance better that the process with PI conventional controller.The process with PI error-squared controller that presented better performance was the CPIeq2, with higher nonlinear gain, because the errorwas reduced by 35.64 % to IEA and 31.32% to IEQ when compared to theconventional PIcontroller.

Conclusion
The stability properties of the error-squared controller were addressed.Two limits for the nonlinear gain were computed for the error-squared controller.Simulations results were presented, and it was showed that the second limit, from Theorem 7, is more conservative than the others ones.Additionally, it was observed that the closed loops with error-squared PI controllers have better performance when compared with conventional PI controller.As suggestions for future work carry out a study about the error-squared controller applied in processes with time-delay, as well as in the liquid level control in production separators in the oil industry.

Figure 2 .
Figure 2. Evolution of the error.

Figure 3 .
Figure 3. (a) Response for error-squared PI control, (b) Lyapunov functions andits derivatives.he PI error-squared controllers are compared each other and with the PI conventional controller by measuring certain signals of interest, such as, Integral Absolute Error (IAE), Integral Squared Error (ISE), and peak value in time.Table2presents the results for these performance measures, together with the decrease of tracking errors (i.e., improved control action) compared to the PI conventional controller called and respectively to IEA and IEQ.

Figure 4 .
Figure 4. Liquid level system.The flow is laminar, i.e., fluid flow occurs in streamlines with no turbulence.Here is inflow rate.The relationship between outflow rate, and liquid level is the resistance (42)

Figure 5 .
Figure 5. (a) System response for error-squared PI control.(b) Lyapunov functions and its derivatives.

Table 3 .
Tunings of the Process 1.