Construction of a Smooth Lyapunov Function for the Robust and Exact Second-Order Differentiator

Differentiators play an important role in (continuous) feedback control systems. In particular, the robust and exact second-order differentiator has shown some very interesting properties and it has been used successfully in sliding mode control, in spite of the lack of a Lyapunov based procedure to design its gains. As contribution of this paper, we provide a constructive method to determine a differentiable Lyapunov function for such a differentiator. Moreover, the Lyapunov function is used to provide a procedure to design the differentiator’s parameters. Also, some sets of such parameters are provided. The determination of the positive definiteness of the Lyapunov function and negative definiteness of its derivative is converted to the problem of solving a system of inequalities linear in the parameters of the Lyapunov function candidate and also linear in the gains of the differentiator, but bilinear in both.


Introduction
Differentiators play an important role in (continuous) feedback control systems.For example, it is usually required to differentiate the system's output in order to construct the feedback controller.There are several options to approximate the derivatives of a signal, for instance, the very classical linear filters or Luenberger observers, the digital filters approach [1,2], the high-gain observers [3], and some nonlinear observers [4,5].However, from sliding mode control theory, a class of exact differentiators has emerged.We can mention the firstorder robust and exact differentiator (RED) [6] (also known as Super-Twisting algorithm).Initially, such an algorithm was studied through geometric methods, but later the Lyapunov approach provided several interesting results [7][8][9][10][11].
Theoretically, the Super-Twisting algorithm can provide exactly the first derivative of a signal in finite time, if the second derivative is uniformly bounded.To obtain higher order derivatives, one could use first-order RED in cascade.However, this configuration produces a significant loss of precision [12].Hence, for higher order derivatives, a RED of arbitrary order was proposed in [12], and their properties were analyzed by means of geometric methods and homogeneity properties [13].Unlike those kinds of proofs, a Lyapunov based approach would be very useful to analyze robustness properties, to design the differentiator's parameters, and to estimate the convergence time.
Lyapunov's direct method is one of the most important tools in analysis and design of nonlinear control systems [14][15][16][17].It has been used for analysis and design for a wide class of nonlinear systems as, for example, continuous [15], variable structure [18], or hybrid [19] systems, adaptive fuzzy controllers [20], and fuzzy optimal control for chaotic discrete-time systems [21].
For the case of the second-order RED [12], a continuous but not differentiable Lyapunov function was proposed in [22].Although it can be used to design the parameters of the differentiator, a set of nonlinear inequalities involving the parameters of the function and the gains of the differentiator must be solved.Thus, it is desirable to have a differentiable Lyapunov function and an easier procedure to design the parameters of the differentiator.
The contributions of this paper improve the analysis and design of the second-order RED as stated below: (i) We provide a constructive method to determine a differentiable Lyapunov function for the secondorder RED.This is the first time that a Lyapunov

Lyapunov Analysis and Design for the Second-Order RED
In [12], an arbitrary order RED was proposed, but [12] does not provide a method to determine whether for a certain set of gains the RED will converge or how to design gains to achieve convergence of the RED.
In this section, we will first recall Levant's RED [12] and motivate the necessity of selecting appropriate gains.We then show that it is possible to provide a (smooth) Lyapunov function to prove the convergence of the RED for appropriate gains and how to scale these gains.Although the ideas presented in the paper are valid for an arbitrary order RED, we will restrict ourselves to the second-order differentiator for simplicity and concreteness of the presentation.

The Differentiator.
Consider the class of signals S Δ , containing time functions  : R + → R having continuous first-order  (1) and second-order  (2) derivatives and a thirdorder derivative which exists almost everywhere and is bounded: that is, | (3) ()| ≤ Δ, ∀ ≥ 0, for some nonnegative constant Δ.The second-order RED given by [12] can provide exactly the first-and second-order derivatives of  ∈ S Δ in finite time; that is, after a finite time ,  1 () = (),  2 () =  (1) (), and  3 () =  (2) (), for all  ≥ .In (1), as in the whole paper, the following notation is used: for a real variable  ∈ R and a real number  ∈ R, ⌈⌋  = ||  ⋅ sign().Note that since (1) has a discontinuous right-hand side, we should interpret its solutions in the sense of Filippov [25].
Differentiator (1) will work only if the gains  = [ 1 ,  2 ,  3 ]  are designed properly, as is illustrated in the following example.
Remark 2. A remarkable property of differentiator (1) is that, in the absence of noise, it converges exactly and in finite time to the true values of ,  (1) , and  (2) , and it does it robustly, that is, for any signal in the class  ∈ S Δ .These properties are not achievable by any continuous differentiator, and this is the reason to name it robust and exact differentiator [6,12].
From the last example, the necessity is clear to have a procedure to design the parameters of (1) that guarantee the finite time convergence of  1 ,  2 , and  3 to ,  (1) , and  (2) , respectively.In the next paragraph, we give a procedure, based on a Lyapunov analysis, to design the gains of the differentiator as those used in Example 1.

Main Results: Lyapunov Function and Gain Design.
Introducing the differentiation errors   =   −  (−1) ,  = 1, 2, 3, as in [22], the dynamics of (1) can be rewritten as follows: where () = − (3) ().Note that () can be considered as a disturbance for the error dynamics.Thus, the robust and exact convergence of RED ( 1) is equivalent to the finite time stability of the origin  = 0 of (2), robustly with respect to arbitrary but bounded perturbations |()| ≤ Δ.Thus, the meaning of the robustness of the differentiator is in the class of functions it can differentiate.A sufficient condition for establishing this property is the existence of a robust Lyapunov function for (2), that is, a continuously differentiable and positive definite function (), having a negative definite derivative V along the trajectories of (  gains  = [ 1 ,  2 ,  3 ], such that the trajectories of (2) converge to zero in finite time.
(G2) We give a systematic procedure to determine whether there exists a LF () in the family F for a given set of gains  and a given size of perturbations Δ ≥ 0. This problem is reduced to find a solution of a finite system of linear inequalities (LI) or a linear matrix inequality (LMI) in the parameters of the family of LFs.
(G3) The system of inequalities to determine whether () is a LF is linear in the parameters of the family F and also linear in the gains  and perturbation's size Δ.However, it is bilinear in both sets of parameters.We provide a procedure to determine a set of gains , Δ and a LF in the family F that render (1) a RED.
Since the differential equation ( 2) with () ≡ 0 (or the associated differential inclusion for |()| ≤ Δ) is homogeneous, we will use a family of homogeneous LFs.We therefore recall some definitions on weighted homogeneity for continuous functions and vector fields [16].

Definition 3. Let Λ 𝑟
be the square diagonal matrix given by Λ   = diag(  1 , . . .,    ), where  = [ 1 , . . .,   ]  , 0 <   ∈ R, and 0 <  ∈ R. The components of the vector  are called the weights of the coordinates.Then, one has the following: The extensions of these definitions to discontinuous systems and differential inclusions are very similar and can be found, for example, in [11,13].Note that homogeneity is a scaling property that can be very useful.For example, if some characteristic of a function is determined locally, homogeneity allows us to extend it to the whole domain.Thus, if the origin of a homogeneous system is locally asymptotically stable, then homogeneity allows us to ensure global asymptotic stability.Note that (in the nominal case, () = 0), (2) is homogeneous of degree  = −1 with the weights  = [3, 2, 1].Therefore, if the origin of ( 2) is an asymptotically stable equilibrium point, then there exists a homogeneous Lyapunov function for (2) [11,26].Moreover, the negative homogeneous degree and the asymptotic stability imply finite time stability of the origin of (2) [13].Thus, if we are able to find a differentiable homogeneous Lyapunov function for (2), we can ensure global finite time convergence of (1).Now, we present the main theorem of this paper.
Lemma 5 guarantees the existence of parameters  and  such that the trajectories of (2) converge in finite time to the origin  = 0 for () ≡ 0 and such that () in ( 3) is a Lyapunov function.In Section 3, we give the proof of Lemma 5 by providing a procedure to compute coefficients  and parameters  such that () is a LF, which consist in finding a solution of a system of inequalities (Pólya's procedure) or matrix inequalities (SOS procedure), which are linear in  and in , but bilinear in both.In Tables 1 and 2, some values of  and  satisfying Lemma 5 are given, which we found solving those inequalities.It is possible to find many   From Lemma 5, we can obtain RED only for a very narrow class of signals, that is, S 0 , which basically consists of polynomials of degree 3. The following lemma shows that in fact it is a RED for S Δ 0 for some (possible small) value of Δ 0 > 0. Lemma 6. Suppose that  and  satisfy Lemma 5.Then, there exists a real constant Δ 0 such that the derivative of (3) along the trajectories of ( 2) is still negative definite for all () such that |()| ≤ Δ 0 .
The proof of this lemma and a procedure to find a value of Δ 0 are given in Section 3.2.3.In Tables 1 and 2, values of Δ 0 satisfying Lemma 6 for each set of parameters  and  are given.
With the results of Lemmas 5 and 6, we can prove Theorem 4 showing that if for some gains  we have a RED for the class of signals S Δ 0 , then it is possible to scale the gains  to obtain a RED for the class of signals S Δ for every positive value of Δ.This idea of scaling the gains, which has been previously used in [6,12], is the content of the next lemma.
Lemma 7. Let  = [ 1 ,  2 ,  3 ]  and Δ 0 be such that the origin of ( 2) is finite time stable for any (), |()| ≤ Δ 0 .Then, the origin of ( 2) is finite time stable for any (), |()| ≤ Δ, if their gains are chosen as Proof.Consider the diffeomorphism   =   , 0 <  ∈ R,  = 1, 2, 3. Thus, from (2), we obtain the system: Since by assumption the trajectories of (2) converge to zero in finite time for all the disturbances () bounded by Δ 0 , it follows that the trajectories of (4) converge to zero in finite time for all disturbances bounded by Δ 0 .By defining Δ = Δ 0 , we obtain the result.Now, we give an example about the use of Lemma 7.
Example 8. Consider |()| ≤ Δ = 1 and the values for  given in Tables 1 and 2. Thus, with  = Δ −1 0 in each case, we obtain the scaled values shown in Table 3.
Remark 9. Note that Table 3 can be taken as the starting point for the scaling process given in Lemma 7. Since Δ 0 = 1 in Table 3, we have that  = Δ.For example, by taking the last row of Table 3 and considering Δ = 4, we obtain the values for  (up to round-off error) used in the first part of Example 1.
We have given a procedure to scale the gains of the differentiator, but it is also possible to scale the coefficients of (3) in order to obtain a Lyapunov function for the scaled system.
In the next section, we describe the procedure to construct the Lyapunov function for (2).The designing process is the proof of Lemma 5.Such process can be used to design additional values for  and  different from those shown in Tables 1 and 2.

Lyapunov Function Designing Process
In the literature, there are several methods to design Lyapunov functions.Classical results are Krasovskii's method [27], the Variable Gradient method [28], and Zubov's method [29].However, they are very analytic or even useless for systems like (2).Unfortunately, more recently, techniques, like barrier Lyapunov functions [30,31], cannot be applied to design a Lyapunov function for (2).There are also numerical approaches to construct Lyapunov functions (see [32] and the references therein) but the aim of this paper is to obtain an explicit Lyapunov function that allows us to design the gains of (1).For high order sliding mode algorithms, there are very few approaches.For example, in [33,34], an extension of Zubov's method is given, and it is required to solve a partial differential equation.In [35], the proposed method requires calculating explicitly the trajectories of the system.So it is not easy to apply the mentioned methods to design a Lyapunov function for (2).
In this section, we show the designing process for the Lyapunov function given in the last section.The methodology used here is that provided in [23].Generally speaking, it consists of the following steps: (1) Proposing a suitable set of candidate Lyapunov functions (, ) parametrized in the coefficients , namely, (9) (see below): such functions and the vector field of (2) belong to a class of functions called generalized forms [23].
(3) Finding a polynomial representation of  and  by performing an adequate change of coordinates in each octant of R 3 .
(4) Designing  and  guaranteeing the positive definiteness of the polynomial representation of  and .
For the last step, we will provide two alternatives.One of them requires solving a system of linear inequalities and the other requires solving a system of linear matrix inequalities.
3.1.Generalized Forms.First, we define a class of functions used in the proposed design method.
Definition 11.A function  : R  → R is a generalized form (GF) of degree  if (a) it is homogeneous (of degree  for some vector of weights ), (b) it consists of sums, products, and sums of products of terms like GFs as defined are a generalization of (and contain) the (classical) forms, which are homogeneous polynomials consisting of monomials, which are products of terms    , with integer powers .
Note that the vector field of (2) (in its nominal form) consists of GFs.According to [23], it is suitable to propose a GF as Lyapunov function candidate for a system described by GFs.Recall that (2) is homogeneous of degree  = −1 with the weights  = [ 1 ,  2 ,  3 ] = [3,2,1].So, we start with the following Lyapunov function candidate: Note that ( 9) can be homogeneous of degree  with the weights  if   are selected appropriately.The conditions for differentiability and homogeneity of (9) required in [23] are fulfilled by choosing, for example,  = 5,  0 =  1 =  2 =  5 = 1,  3 = 3, and  4 = 4/3.With these considerations, we obtain By taking the derivative of (10) along the trajectories of (2), we have that (/) ẋ = −  () with To be able to obtain positive definite terms for each variable in   , it is convenient to set − 12 =  12 > 0,  13 =  13 > 0, − 23 =  23 > 0; thus, (10) becomes (3) and   becomes Considering (2) in the nominal case, that is, () = 0, we obtain from ( 12) The proof of Lemma 5 requires showing that the GFs () and () are positive definite for some values of  and .However, for the class of GFs, there are no standard procedures to verify positive definiteness.Nonetheless, for (classical) homogeneous polynomials (forms), there are some very useful and easy-to-compute methods to decide the positive definiteness.One of the most important features of a GF is that it can be described as a set of (classical) forms restricted to a certain domain, by using a suitable change of coordinates in each orthant.Thus, we are able to use the procedures established for (classical) forms to determine positive definiteness of a GF.
We show how to obtain a representation of the GFs () and () as a set of classical forms.Consider the eight octants of R 3 defined as We also define S = { ∈ R 3 | 1 ≥ 0,  2 ≥ 0,  3 ≥ 0}.Now, consider the function  : S → O 1 given by [ 1 ,  2 ,  3 ]  = [ 3  1 ,  2 2 ,  3 ]  .Note that this is a change of coordinates diffeomorphic in the interior of S. By applying such a change of coordinates to (3), we obtain Mathematical Problems in Engineering 9 Note that the values of the function () restricted to the set  ∈ O 1 are in a one-to-one correspondence to the values of the function  1 () defined in  ∈ S. Thus, the positive definiteness of (3) restricted to O 1 can be determined by verifying the positive definiteness of  1 restricted to S. An analogous procedure can be done for the remaining octants with the following change of coordinates: defined on S. Observe that the purpose of the change of coordinates was twofold.Firstly, the functions in the new variables  contain only terms with integer exponents.Secondly, the domain of all the resultant functions is the positive octant S.So the functions  1 ,  2 ,  3 , and  4 are forms restricted to S.
With the same change of coordinates, we can analyze (13) through the set of restricted forms { 1 ,  2 ,  3 ,  4 } given by where the coefficients are linear functions of  and affine functions of .Note that to determine the positive definiteness of (3) and ( 13) it is necessary and sufficient to verify the positive definiteness of the forms { 1 ,  2 ,  3 ,  4 } and { 1 ,  2 ,  3 ,  4 } restricted to S. In the next section, we provide two different procedures to design the coefficients of such restricted forms in order to make them positive definite.

Positive Forms
3.2.1.Pólya's Theorem.One result that allows us to check the positive definiteness of classical forms restricted to S is Pólya's theorem [36,37].We recall a strong version of it.
forms { 1 , . . .,  4 } or { 1 , . . .,  4 } are continuous and homogeneous, a small variation of their coefficients does not affect their positive definiteness.Note also that the bounded disturbance () only affects linearly some coefficients of (12).Therefore, it is sufficient to consider the extreme values of () to analyze (12) for positive definiteness.This can be done by considering Δ 0 as a new parameter and including it in the coefficients of the forms { 1 , . . .,  4 } or { 1 , . . .,  4 } in two different cases: the first one is with and the second one is with It is important to mention that the two cases have to be analyzed simultaneously by using any of the two procedures described above, with Pólya or with SOS.In Tables 1 and 2, we show the values for Δ 0 that we have found.

Conclusions
We have provided a differentiable Lyapunov function and some different sets of gains for Levant's second-order differentiator.We have confirmed the usefulness of the method to design Lyapunov functions provided in [23].In principle, such a method can be used to design Lyapunov functions for the RED of any order as we have done in this paper for the second-order RED and as it has been done in [41] for the first-order RED.One of the main characteristics of the method is that it allows us to reduce the problem of finding a Lyapunov function to the algebraic problem of solving systems of linear inequalities or systems of linear matrix inequalities.We have noted that the designing through SOS is computationally more efficient.However, for the designing through Pólya, there exist techniques to obtain the complete set of solutions for a linear system of inequalities.Finally, the Lyapunov function presented in this work could be used to perform some further analysis of the second-order RED.

Table 1 :
Parameters  and  obtained by Pólya's procedure.

Table 2 :
Parameters  and  obtained by SOS's procedure.
such values for  and  by exploring the solution set of the inequalities.The nature of the parameters  V and   will be explained in Section 3.
Octant O 1 is symmetric to O 5 .For the last one, with the change of coordinates  = [−31 , − 2 2 , − 3 ]  , we obtain again  1 , which is due to the symmetry of (3) with respect to the origin.Therefore, it is sufficient to study  1 in order to determine positive definiteness of (3) restricted to O 1 ∪ O 5 .The same occurs for the sets O 2 ∪ O 6 , O 3 ∪ O 7 , and O 4 ∪ O 8 .Thus, to verify positive definiteness of (3), we have to establish positive definiteness of  1 () and