Structural Conditions for Chattering Avoidance in Implicitly Discretized Sliding Mode Differentiators

This letter considers the implicit discretization of Levant’s arbitrary order robust exact differentiator. It is shown that an improper implicit discretization may lead to an undesired bias in the differentiation error and, surprisingly, to discretization chattering despite the implicit discretization. Necessary and sufficient structural conditions for avoiding both of these problems are presented, which define a family of chattering-free discrete-time differentiators. A guideline for selecting a representative from this family is given. Numerical simulations illustrate the results.

optimal accuracies of the continuous-time RED. When properly preserved, these accuracies ensure that the estimation error of the i th derivative is proportional to T n+1−i , where T > 0 is the sampling time. In particular, an improperly discretized differentiator of order n > 1 even fails to provide the correct derivatives of a n th order polynomial, and in general exhibits a possibly unbounded bias error in the estimation depending on the signal being differentiated, see [10].
In recent years, much research effort has been spent on the discretization of the arbitrary order RED. In [10], additional higher-order linear terms were introduced in the explicit Euler discretized RED. These terms preserve the asymptotically optimal accuracies and avoid the mentioned estimation bias. In [11] and [12], additional higher-order non-linear terms were introduced which potentially alleviate chattering. Explicit schemes that attenuate or avoid discretization chattering were proposed in [13] and [14], respectively.
More recently, the application of the implicit discretization scheme, originally proposed in [15], [16], has been investigated due to its capability of completely avoiding discretization chattering, see [17], [18], [19]. Indeed, a straightforward application of the implicit Euler discretization to the RED, which is called implicit arbitrary order supertwisting differentiator (I-AO-STD) in [17], does not exhibit chattering, but also destroys the well known standard accuracies and hence in general exhibits a bias error depending on the signal being differentiated. Even the implicit variant of the modification proposed in [10], termed implicit homogeneous discrete-time differentiator (I-HDD) in [17], still suffers from the same problem. In contrast, the implicit discretization of the RED proposed in [18], termed homogeneous implicit discrete-time differentiator (HIDD), preserves the standard accuracies. Surprisingly, as will be shown in the following, this latter implementation suffers from discretization chattering despite the use of the implicit discretization, however.
This letter presents necessary and sufficient structural conditions for avoiding both, discretization chattering and estimation bias, in implicitly discretized robust exact differentiators. Section II motivates the study by showing that state-of-the-art implicitly discretized variants of the RED exhibit either a bias or chattering. Conditions for avoiding these problems are then derived in Section III. Section IV discusses the structure of the resulting differentiators and the choice of structural parameters that remain as degrees of freedom with the proposed conditions. The numerical implementation of the differentiator and simulation examples are shown in Section V, and Section VI draws conclusions.
Notation: Vectors and matrices are written in boldface letters with x ∞ denoting the infinity norm of a vector x ∈ R n , and A ∞ is the induced infinity norm of a matrix A ∈ R m×n . The set-valued sign function is defined as sgn(0) = [ − 1, 1] and sgn(y) = {sign(y)} for y = 0. The sign preserving powers are denoted by y a := |y| a sign(y) for a = 0, and the convention sign(0) = 1 is used.

A. Continuous Time Robust Exact Differentiation
Consider an n-times differentiable signal f (t), t ≥ 0, with Lipschitz continuous highest derivative. The task is to obtain the derivatives f (i) (t), i = 0, . . . n. It is well known that the REDż with properly selected gains k i ∈ R >0 , i = 0, . . . , n and solutions understood in the sense of Filippov, solves this problem if |f (n+1) | ≤ L holds almost everywhere. Thus, in the absence of measurement noise z i (t) = f (i) (t) is achieved after a finite time.
From an observer design perspective, the differentiator design is equivalent to the design of a state observer for a chain of n + 1 integrators with input f (n+1) (t). In state space form this system is written aṡ which is composed of a copy of the known part of (2) and, with σ 0 = z 0 − f , the nonlinear measurement injections

B. Discretization
A naive approach to discretize the RED (3) would be to simply apply the explicit Euler scheme yielding the recursion with k = 1, 2, 3, . . . and f k := f (kT). As emphasized in [10], the differentiator (5) with order n > 1 exhibits a bias error depending on the signal f and is not capable of providing the well-known accuracies. This issue can be resolved by adding higher-order linear terms to the differentiator (5), leading to the so-called homogeneous discrete-time differentiator (HDD), see [10]. To introduce the desired terms, consider a zero-order hold discretization of the system (2) without unknown input f (n+1) with T = e JT denoting the matrix exponential. An observer design for the discretized nominal system (6) yields the HDD Note that the estimation accuracy of this differentiator may be improved by replacing f k−1 by f k in (7), thus using all available information for computing the estimates at t = kT. An alternative approach for discretizing the RED is using an implicit scheme, cf. e.g., [17], [18]. Applying the implicit Euler discretization to (3) yields which also lacks the higher order linear terms. To address this problem, (6) is rewritten in implicit form and the corresponding implicit HDD is obtained as Note that in the explicit HDD (7) the additional linear terms are given by ( T − I)z k−1 whereas in the implicit HDD these terms are given by (10) is different from the I-HDD [17] where the additional terms are chosen as ( T − I)z k .
The implicit HDD (10) may also be written in the form which is obtained by partially solving (10) for z k . It is worth mentioning that although (11) contains explicit and implicit terms, it is different from the semi-implicit discretization (SI-HDD) in [17]. In the following the differentiator (10) is termed bias-free I-HDD, because the additional terms provide for the desired accuracies and hence avoid unbounded bias in the estimation error. However, both, the explicit (7) and the implicit HDD (10) suffer from chattering. This issue is illustrated in the following simulation example. Consider, as an example, the task of differentiating the signal f (t) = 1 2 t 2 − 0.1 using a differentiator of order n = 2 with sampling time T = 0.1. The differentiators are initialized with z 0 = 0 and the parameters are chosen according to [20] as k 0 = 3.1, k 1 = 3.2, k 2 = 1.1. Fig. 1 depicts the resulting differentiation error z i,k − f (kT) of the HDD, I-HDD, bias-free I-HDD, and HIDD. As can be seen, the I-HDD [17] avoids the chattering. However, it is not capable of differentiating polynomials of order n exactly. In the particular simulation example it exhibits a bias in the estimate of the first derivative. In contrast, the bias-free I-HDD (10) surprisingly suffers from chattering despite the implicit discretization. The same is true for the HIDD from [18], which is free from bias but also suffers from chattering.
In this respect, all state-of-the-art methods for implicit discretization of the RED either suffer from chattering or a bias in the estimate. In the following, this issue is addressed by deriving necessary and sufficient conditions for avoiding these problems, i.e., for exact differentiation of polynomial signals of order n in finite time without chattering or bias.  (7), [10], I-HDD [17], bias-free I-HDD (10), and HIDD [18]

III. CONDITIONS
The structural conditions for chattering avoidance are derived based on a general representation of an implicitly discretized n th order RED that includes all existing implicit discretization variants, i.e., I-HDD [17] and HIDD [18], as special cases. It has the form where the matrix D T with sampling time T > 0 is given by and A 1 , A 2 ∈ R (n+1)×(n+1) are constant matrices to be designed. By solving the linear part for z k , this representation may be equivalently rewritten as provided that the matrix ( is non-singular, which will be ensured later on. Note that the implicit HDD from the previous section as well as the differentiators proposed in [17], [18] fit this general form.

A. Sampling-Time Free Form
Introducing the scaled statẽ in (14) yields the representatioñ Note thatz 0,k = z 0,k and that the linear part in (16) is sampling time free. Similarly holds and 1 is sampling time free. It is easy to see and repeatedly used below that j 1 = j holds for all integers j, because T = e JT is a state transition matrix.

B. Condition for Avoiding Unbounded Estimation Bias
The next proposition provides a constraint on A 1 and A 2 such that (12) differentiates polynomial signals without bias.
Proposition 1: Let T > 0, A 1 , A 2 ∈ R (n+1)×(n+1) . Consider system (12) with as in (4) and k 0 , . . . , k n > 0, and suppose that the matrix (I − A 2 ) is invertible. Then, the following statements are equivalent: 1) The matrices A 1 , A 2 satisfy 2) For all c 0 , . . . , c n ∈ R, the sequence z k = h k with and f (t) = c 0 + c 1 t + . . . + c n t n is a solution of (12) with input f k = f (kT). Proof: Using (19) and the transform (15), letz k = D T h k . By definition of T , it may be verified that holds for all k ≥ 1, which shows thatz k satisfies (16), becausez 0,k = z 0,k = f k therein; therefore, z k = h k satisfies (12). To see the converse, assume to the contrary that (I − A 2 ) −1 (I + A 1 ) = M = 1 . Then, since the solution (19) transformed using (15), i.e.,h k = D T h k , satisfies one has in (16) for k = 1 which is impossible because the second term is a compact set for fixed k 0 , . . . , k n , T, and A 2 , whilẽ is unbounded for sufficiently large values of c 0 , . . . , c n .

C. Conditions for Avoiding Discretization Chattering
To formally define when a discretization of the RED is considered to be free from discretization chattering, the following notion of a proper implicit discretization of the RED is introduced.
Definition 1: System (12) is called a proper implicit discretization of the RED, if there exist constants μ 1 , . . . , μ n with the property that for every integer K there exists an inte-gerK > K such that for all signals f satisfying the inequality |f (n+1) (t)| ≤ L < k n almost everwhere, the sliding condition z 0,k = f k = f (kT) for all k ≥ K implies that holds for all k ≥K. Remark 1: Note that the definition implies, in particular, that polynomials of degree up to n are differentiated exactly, i.e., that item 2) of Proposition 1 holds after a finite-time transient without chattering.
In the next step, conditions are derived such that the differentiator (12) is a proper implicit discretization of the RED. To that end, the matrix A 2 is restricted to a strict upper triangular matrix, i.e., an upper triangular matrix with zeros on the main diagonal. This restriction is imposed because, in order to obtain a numerically well-conditioned implementation also as T tends to zero, the elements of D −1 T A 2 D T must not scale with powers of T −1 .

Proof:
It is first shown that the two conditions are sufficient for (12) to be a proper implicit discretization. It is well-known, cf. e.g., [18], that |f (n+1) (t)| ≤ L implies that h k defined in (19) satisfies with the components of the vector δ k satisfying the inequalities Consider the error σ k = z k − h k , which after applying the transformatioñ σ k = D T σ k satisfies from (16) withṽ k = k n T n+1 ξ k due to (0) = k n e n+1 and It has to be shown that σ k ∞ ≤ dLT n+1 for some constant d and all k ≥K.
Since z 0,k = f k , the relation holds for all k ≥ K. This yields and consequently also for all i = 0, . . . , n. Since the vectors e T 1 −i , i = 0, . . . , n are linearly independent, the matrix P is nilpotent. Hence, for k ≥ K + n + 1 =K, with d = n−1 j=0 P j+1 −1 1 ∞ , proving the claim. It is now shown that the two conditions are also necessary. To that end, use Definition 1 with L = 0 to obtain that the relation z i,k = f (i) (kT) and hence alsoσ k = 0 holds for k ≥K for every polynomial f whose degree is less than or equal to n. Necessity of condition 1) then follows from Proposition 1. Moreover, following the derivation of the dynamics ofσ k above, one can see that it is governed by the autonomous linear systemσ k = Pσ k−1 with in this case, becauseδ k = 0 for L = 0. Then,σ k = 0 for k ≥K with finiteK and arbitrary initial condition σ K implies that P is nilpotent. Since the pair (e T 1 1 , 1 ) is observable, the unique vector (I − A 2 ) −1 e n+1 which renders P nilpotent is the vector Q −1 e 1 shown above, proving necessity of condition 2).

IV. STRUCTURE AND TUNING
The structure of the differentiator resulting from the conditions in the previous section is summarized in the following corollary to Theorem 1.
Corollary 1: Let T > 0 and suppose that A 2 is an upper triangular matrix with zeros on the main diagonal satisfying (27). Define as in (4) with k 0 , . . . , k n > 0. Then, the differentiator is a proper implicit discretization of (3). Proof: Define A 1 using (18). Rewrite (38) as (14) using The claim then follows from Theorem 1. Obviously, matrix A 2 is not uniquely determined from (27). Specifically, for given differentiation order n there are n(n−1) degrees of freedom. The following proposition provides a suggestion for choosing those degrees of freedom in the matrix A 2 in order to obtain a proper implicit discretization of the RED in practice.
Proposition 2: Let m 0 , . . . , m n−1 satisfy the identity for all ξ ∈ R, with the polynomial Then, the matrix fulfills condition (27) of Theorem 1 and Corollary 1.
Proof: It is easy to verify that The matrix Q takes the form Hence, i.e., (27) is fulfilled. From these results, it is clear that the I-HDD, the biasfree I-HDD, and the HIDD do not constitute proper implicit discretizations of the RED in the sense of Definition 1. Indeed, the I-HDD does not fulfill condition 1) of Theorem 1, which is reflected in the bias that can be seen in the simulation example in Fig. 1 in the previous section. The bias-free I-HDD and the HIDD, on the other hand, fulfill only condition 1) but not condition 2) of Theorem 1, which is reflected in the nonvanishing differentiation error that is present in the form of chattering in Fig. 1.

V. IMPLEMENTATION AND SIMULATION EXAMPLES A. Implementation
To implement the proposed differentiator (38), the implicit relation sgn(σ 0,k ) (46) needs to be solved for the error variable σ 0,k = z 0,k − f k at every time step. Defining b k := f k − e T 1 T z k−1 , which at time step k is a known quantity, and denoting which can be solved as described in [17], [18].

B. Simulation Examples
Consider the scenario from the simulation example in Section II and define A 2 by means of with parameters q, m 0 , m 1 ∈ R. From (27), the constraints m 0 = 1, m 1 = 3 2 are obtained. In the following, three different variants of the proposed differentiator (38) for differentiation order n = 2 with are compared. Note that Case I corresponds to the matrix A 2 obtained through Proposition 2. The simulation result is depicted in Fig. 2. It demonstrates that in all three cases the estimates are bias-free and do not chatter, i.e., the estimation error converges to zero in finite time. In the transient response, increasing q increases the duration and amplitude of oscillations, which eventually slow down convergence of the differentiator. Hence, the tuning q = 0, which corresponds to the tuning obtained from Proposition 2, is a reasonable choice in practice where few oscillations and fast convergence speed are desirable. For the next simulation, the signal is now changed to the function f (t) = 0.6 cos(t) − 0.9 sin(0.7t) − 0.1 while other parameters are kept the same. The differentiator (38) of order n = 2 with A 2 as in Case I is compared to the HIDD. Fig. 3 depicts the simulation result. Again, in contrast to the HIDD, the proper implicit discretization does not suffer from chattering. The chattering results in worse accuracy compared to the proposed approach. Since f has a non-vanishing third derivative, the estimation error of the latter approach does not converge to zero, but remains bounded according to Theorem 1. Fig. 4, finally, compares the steady-state estimation accuracies of the two differentiators from the previous simulation  as a function of the sampling time T. It can be observed that both differentiators provide for an estimation error that is proportional to T forf and to T 2 forḟ , with the proposed scheme exhibiting a better estimation accuracy overall.

VI. CONCLUSION
Necessary and sufficient structural conditions have been presented for avoiding discretization chattering and estimation bias in the implicit discretization of the arbitrary order robust exact differentiator. It was shown that the state-of-theart implicit discretizations do not fulfill these conditions and, indeed, they were shown to exhibit either bias or chattering of the differentiation error when differentiating a polynomial signal. The proposed differentiators do not suffer from discretization chattering and feature the well-known standard accuracies similar to the continuous-time robust exact differentiator. For a given differentiation order n > 1, the conditions define an entire family of discrete-time differentiators with n(n−1) 2 free structural parameters in addition to the n + 1 gain parameters; a tuning guideline to select a representative from this family was given. Future works may study the impact of the free structural parameters on stability and performance of the proposed differentiators. Furthermore, possible extensions of the approach to the design of implicitly discretized sliding mode controllers may be investigated.