Gabriele Perozzi
email: gabriele.perozzi@inria.fr

Andrey Polyakov

Félix Miranda-Villatoro

Bernard Brogliato

Upgrading a Linear Controller to a Sliding Mode One: Theory and Experiments

This article proposes a procedure for upgrading a linear proportional controller to a sliding mode one preventing a degradation of a control quality. Two nonlinear algorithms are studied in this context: Unit and Homogeneous Sliding Mode Controllers (SMCs). The parameters of the nonlinear controllers are defined using the gains of the (already well-tuned) linear controller. The main idea of this upgrading procedure is to split the state-space into two regions, the region of the linear control and the region of the nonlinear control. This is done via a suitable design parameter. The theoretical developments are validated experimentally on a rotary inverted pendulum. Comparisons between the already well-tuned linear controller and the proposed upgraded nonlinear controllers are presented. The experiments in a rotary inverted pendulum demonstrate that the upgraded controller significantly improves the control precision without degradation of the control signal.

Introduction

A sliding mode controller (SMC) is a nonlinear set-valued control law, which is, theoretically, insensitive to the so-called matched perturbations and consequently, guarantees better control precision [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF][START_REF] Edwards | Sliding Mode Control: Theory and Applications[END_REF][START_REF] Shtessel | Sliding Mode Control and Observation[END_REF], as well as finite-time convergence [START_REF] Nakamura | Smooth Lyapunov functions for homogeneous differential inclusions[END_REF][START_REF] Andrieu | Homogeneous approximation, recursive observer design, and output feedback[END_REF][START_REF] Levant | Quasi-continuous high-order sliding-mode controllers[END_REF][START_REF] Ning | Practical fixed-time consensus for integrator-type multi-agent systems: A time base generator approach[END_REF]. However, the chattering phenomenon does not allow the ideal sliding mode to be realized in practice. This may imply a degradation of the control precision instead of the promised improvement. Several methods for the chattering analysis and chattering reduction can be found in the literature, depending on its origin (unmodelled dynamics, discretization method) [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF][START_REF] Levant | Sliding order and sliding accuracy in sliding mode control[END_REF][START_REF] Levant | Chattering analysis[END_REF][START_REF] Boiko | Discontinuous Control Systems : Frequency-Domain Analysis and Design[END_REF][START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF][START_REF] Plestan | New methodologies for adaptive sliding mode control[END_REF]. However, the chattering problem is still of interest [START_REF] Utkin | Conventional and high order sliding mode control[END_REF][START_REF] Pérez-Ventura | When is it reasonable to implement the discontinuous sliding-mode controllers instead of the continuous ones? Frequency domain criteria[END_REF], in particular the numerical chattering that is due solely to the discretization method [START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF][START_REF] Acary | Chattering-free digital sliding-mode control with state observer and disturbance rejection[END_REF].

On the other hand, linear controllers are the most popular industrial solution for feedback control. Linear control is supported by many methods of control parameters tuning in both frequency and time domains (see, e.g., [START_REF] Bavafa-Toosi | Introduction to Linear Control Systems[END_REF][START_REF] Boyd | Linear Matrix Inequalities in System and Control Theory[END_REF]). Linear control laws provide a satisfactory performance in many applications. In this article the following question is tackled: Is it possible to upgrade (transform) an already tuned linear controller to a sliding mode controller, with a guaranteed improvement of the control quality? More precisely, we want to design an SMC algorithm, the quality of which could not be worse than the control quality of the linear feedback. There exists methods to design controllers with nonlinear and/or linear dynamics. However to the best of the authors' knowledge it is the first time that a rigorous procedure is proposed to upgrade a linear controller to a nonlinear one preventing a degradation of the performances. The control quality can be estimated through numerical simulations or performing experiments on a setup. It may include various indexes, which correspond to trajectory tracking precision, energetic optimality, chattering effects, input magnitude, etc.

The methods presented in this article assume that a linear stabilizing feedback is already designed for the system. This linear control is modified only in a certain zone of the state space in such a way that an SMC is derived. Two SMCs are considered: the unit SMC [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF] and the generalized homogeneous SMC [START_REF] Polyakov | Generalized Homogeneity in Systems and Control[END_REF]. In both cases, the SMC is obtained from a linear one, and it does not need a design of all SMC parameters.

Most popular methods of SMC design are based on continuous-time models of control systems. However, even in the case of a linear control law, improper implementation of the controller in a digital device may lead to serious degradation of the control quality or even to instability of the closed-loop system (see, e.g., [START_REF] Fiter | A state dependent sampling for linear state feedback[END_REF]). For nonlinear control laws the situation can be even worse. For example, the conventional (the so-called Euler explicit) digital implementation of SMCs leads to the so-called numerical chattering [START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF] or even to a finite-time blow-up of the closed-loop system [START_REF] Levant | On fixed and finite time stability in sliding mode control[END_REF][START_REF] Huber | Lyapunov stability and performance analysis of the implicit discrete sliding mode control[END_REF].

Three discretization methods are proposed and compared in this article, through real experiments on a rotary inverted pendulum. The first one is the explicit (or conventional) scheme. The main issue with the explicit discretization is that it lacks of a selection calculation process for the set-valued input 1 , yielding strong numerical chattering and bang-bang inputs. In order to cope with this issue it is often suggested [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF] to replace the sign function by a linear saturation. The parameter of the saturation function usually is tuned for the concrete application, and tuning may not be an easy task even for simple systems [START_REF] Huber | Recent Trends in Sliding Mode Control, ch. Experimental results on implicit and explicit time-discretization of equivalent control-based sliding mode control[END_REF]. The second scheme is based on the so-called implicit discretization algorithms developed in [START_REF] Huber | Lyapunov stability and performance analysis of the implicit discrete sliding mode control[END_REF][START_REF] Acary | Chattering-free digital sliding-mode control with state observer and disturbance rejection[END_REF][START_REF] Miranda-Villatoro | Set-valued sliding-mode control of uncertain linear systems: Continuous and discretetime analysis[END_REF][START_REF] Kikuuwe | Proxy-based sliding mode control: A safer extension of PID position control[END_REF][START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF] for differential inclusions, see [START_REF] Brogliato | Digital implementation of sliding-mode control via the implicit method: a tutorial[END_REF] for a survey. This scheme automatically computes a selection of the set-valued term.

Consequently, it allows to reject the so-called numerical chattering of set-valued SMC algorithms at both the output and the input (no longer any bang-bang-like input signals), and keeps most of the nice features of the continuous-time SMC (Lyapunov stability, finite-time convergence, insensitivity to control gain during the sliding phase), even for attractive surfaces of co-dimension larger than one. This is obtained at the price, however, of using a specific online solver to compute the input. Experimental validations of these facts can be found in [START_REF] Huber | Lyapunov stability and performance analysis of the implicit discrete sliding mode control[END_REF][START_REF] Wang | Experimental comparisons between implicit and explicit implementations of discretetime sliding mode controllers: toward input and output chattering suppression[END_REF][START_REF] Huber | Recent Trends in Sliding Mode Control, ch. Experimental results on implicit and explicit time-discretization of equivalent control-based sliding mode control[END_REF][START_REF] Huber | Implicit discrete-time twisting controller without numerical chattering: analysis and experimental results[END_REF][START_REF] Kikuuwe | A sliding-mode-like position controller for admittance control with bounded actuator force[END_REF][START_REF] Kikuuwe | Proxy-based sliding mode control: A safer extension of PID position control[END_REF]. The third method is a semi-implicit discretization, somewhat intermediate between the implicit and the explicit ones. The experiments for the rotary inverted pendulum show that all three implementations of the SMC give better control quality than the linear feedback.

The problem to be discussed is formulated in Section 2. An introduction to the homogeneous control systems is given Section 3. The procedures to design SMCs, starting from an existing linear controller, are presented in Section 4. Section 5 is dedicated to the digital implementations procedures and the consequent chattering reduction of SMC. The experiments, with comparison between the already well-tuned linear controller (provided by the manufacturer) and the proposed upgraded nonlinear controllers, are presented in Section 6. Section 7 concludes the article.

Notation. Given a square matrix P , λ max (P ) denotes its maximal eigenvalue. The graph of a set-valued mapping

N : R n ⇒ R m is the set {(x, y) ∈ R n × R m | x ∈ dom(N), y ∈ N(x)}.
It is denoted as Grph(N). In the discrete-time setting, the value of the function f (•) at an instant t k is denoted as

f k ∆ = f (t k ).
The n × n identity matrix is denoted as I n . A function σ : [0, +∞) → [0, +∞) belongs to the class K ∞ if it is continuous, strictly increasing, σ(0) = 0 and σ(s) → +∞ as s → +∞.

Problem Statement

Let us consider the problem of stabilization of the linear plant

ẋ = Ax + Bu + f (t, x), t ≥ 0, (1)
where x(t) ∈ R n is the system's state, u(t) ∈ R m is the control input, A ∈ R n×n and B ∈ R n×m are system matrices assumed to be known, and the function f : R×R n → R n describes the system's uncertainties and disturbances. The pair {A, B} is controllable. The whole state x is assumed to be available (measured or observed) and the system is already controlled by a linear feedback

u lin = K lin x, K lin ∈ R m×n . (2)
Various schemes are developed for tuning the control gain K lin (see, e.g., [START_REF] Bavafa-Toosi | Introduction to Linear Control Systems[END_REF]). We assume that K lin is already well-tuned such that it stabilizes at least the linear (unperturbed) system (1) at zero. On the one hand, it is well-known (see, e.g., [START_REF] Poznyak | Attractive Ellipsoids in Robust Control[END_REF]) that the linear controller is robust with respect to some Lipschitz non-linearities. For example, the system (1) (2) remains globally asymptotically stable provided that f (•, •) satisfies the inequality

f (t, x) ≤ η x , ∀t ∈ R, ∀x ∈ R n ,
and η ≥ 0 is sufficiently small. The latter means that f (t, x) has to vanish at x = 0. On the other hand, a SMC stabilizes the origin of the system (1) and completely rejects the so-called matched perturbations, whenever the mismatched perturbations satisfy suitable assumptions (see, e.g., [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF] and [START_REF] Polyakov | Generalized Homogeneity in Systems and Control[END_REF]). In the case of the classical SMC, the mentioned condition can be formalized as follows:

f (t, x) -BCf (t, x) ≤ η x , ∀t ∈ R, ∀x ∈ R n , (3)
where η ≥ 0 is sufficiently small, and the matrix C ∈ R m×n defines the sliding surface {x ∈ R n | Cx = 0} of a SMC system such that CB = I m .

The inequality (3) means that the function f (•, •) may have non-vanishing components at x = 0, which belong to the range of B (matched perturbations). Therefore, SMCs indeed reject a larger class of perturbations. In practice, the function f (•, •) is unknown. Thus, the quality of controllers can only be validated with real experiments. Moreover, due to the chattering phenomenon, the implementation of a SMC may not guarantee a better quality of regulation than the linear one if the chattering issue is disregarded. The main goal of this work is to develop a method for upgrading a linear controller to a SMC with an improved control quality. If the system has disturbances, which is always the case in experiments, the upgraded SMC should bring also a better robustness with respect to the existing linear controller. For the classical SMC design, starting from an existing linear feedback, the following assumption is needed.

Assumption 1

The matrix of the closed-loop linear system A + BK lin is Hurwitz and there exist Θ ∈ R m×n and Λ ∈ R m×m such that

Θ(A + BK lin ) = ΛΘ, Λ + Λ ≺ 0, (4)
such that det(ΘB) = 0, ΛΘB = ΘBΛ.

In the case of a transformation of the linear controller to a generalized homogeneous SMC (see Section 4.2), the latter assumption can be relaxed as follows :

A + BK lin is Hurwitz. Notice that the conditions (4) and ( 5) are rather restrictive in the general case. However, they need to be fulfilled if the whole control is planned to be upgraded (transformed to a SMC). In fact, a linear feedback ũlin = Klin x, K ∈ R m×n for the system

ẋ = Ãx + B ũ, Ã ∈ R n×n , B ∈ R n× m, ũ ∈ R m (6)
may be just partially upgraded. Indeed, selecting 1 ≤ m < m and splitting the vector ũ and the matrices B, Klin on blocks as follows

ũ = u û , B = B B , Klin = K lin Klin û ∈ R m-m , B ∈ R n×( m-m) , Klin ∈ R ( m-m)×n ,
we derive the system (1) (2) with A = Ã + B Klin and u lin = K lin x which deals with an upgrade of the first m components of the original control ũlin . Assumption 1 is not very restrictive if we consider a partial or componentwise upgrade of the linear controller. Indeed, for m = 1 the conditions ( 4) and ( 5) simply mean that the Hurwitz matrix A + BK lin has at least one real eigenvalue Λ < 0 such that the corresponding left-eigenvector Θ ∈ R 1×n = 0 :

Θ(A + BK lin ) = ΛΘ is not orthogonal to B ∈ R n : ΘB = 0.
This assumption holds in many practical applications.

3 Preliminaries: Generalized Homogeneity

Linear Dilations

By definition, the homogeneity is a dilation symmetry. In this paper we deal only with the so-called linear dilations [START_REF] Polyakov | Generalized Homogeneity in Systems and Control[END_REF]Chapter 6] in R n given by

d(s) = e sG d = ∞ i=0 (sG d ) i i! , s ∈ R, (7)
where G d ∈ R n×n is an anti-Hurwitz matrix (i.e., the matrix -G d ∈ R n×n is Hurwitz), known as the generator of the linear dilation. The latter guarantees that d satisfies the limit property ( d(s)x → 0 as s → -∞ and d(s)x → +∞ as s → +∞) required for a group to be a dilation in R n (see, e.g., [START_REF] Kawski | Families of dilations and asymptotic stability[END_REF]). The dilation introduces an alternative norm topology in R n using the so-called canonical homogeneous norm.

Definition 1 [START_REF] Polyakov | On homogeneous finite-time control for linear evolution equation in Hilbert space[END_REF] The functional • d : R n → R + given by 0 d = 0 and

x d = e sx , where s x ∈ R : d(-s x )x = 1, x = 0 (8)
is called the canonical homogeneous norm in R n , where d is a monotone dilation2 and • is a norm in R n .

Notice that x = 1 (resp. x ≤ 1) is equivalent to

x d = 1 (resp. x d ≤ 1). For the uniform dilation d(s) = e s I n , s ∈ R we have • = • d .
Theorem 1 [START_REF] Polyakov | Sliding mode control design using canonical homogeneous norm[END_REF] If d is a monotone dilation, the canonical homogeneous norm is continuous on R n , locally Lipschitz continuous on R n \{0} and there exist σ, σ ∈ K ∞ such that

σ( x ) ≤ x d ≤ σ( x ), ∀x ∈ R n . Moreover, • d is differentiable on R n \{0} provided that • is differentiable on R n \{0}. For x = √ x P x we have ∂ x d ∂x = x d x d (-ln x d )P d(-ln x d ) x d (-ln x d )P G d d(-ln x d )x , ∀x = 0. (9)
Below the canonical homogeneous norm is used as a Lyapunov function for analysis and design of a homogeneous SMC.

Homogeneous functions and vector fields

Definition 2 [START_REF] Kawski | Families of dilations and asymptotic stability[END_REF] A vector field f :

R n → R n (resp. a function h : R n → R) is said to be d-homogeneous of a degree µ ∈ R, if f (d(s)x) = e µs d(s)f (x) (resp. h(d(s)x) = e µs h(x)), for all x ∈ R n and all s ∈ R.
Homogeneity of a function (operator) is inherited by any other object induced by this function. For example, the Euler homogeneous function theorem implies that the derivative of the homogeneous function is homogeneous as well. If a vector field f (•) is d-homogeneous of degree µ, then solutions of the ordinary differential equation (ODE): ẋ = f (x) [START_REF] Boiko | Discontinuous Control Systems : Frequency-Domain Analysis and Design[END_REF] are symmetric [START_REF] Kawski | Families of dilations and asymptotic stability[END_REF]:

x(t, d(s)x 0 ) = d(s)
x(e µs t, x 0 ), where x(t, z) denotes a solution of [START_REF] Boiko | Discontinuous Control Systems : Frequency-Domain Analysis and Design[END_REF] with the initial condition x(0) = z.

Example 1 [START_REF] Polyakov | Sliding mode control design using canonical homogeneous norm[END_REF] The linear vector field

x → Ax, A ∈ R n×n is d-homogeneous of the degree µ = 0 ⇔ A is nilpotent ⇔ AG d = (µI n + G d )A.
The homogeneity degree specifies the convergence rate of the system. The following theorem can be found in [START_REF] Nakamura | Smooth Lyapunov functions for homogeneous differential inclusions[END_REF] for the case of the so-called weighted dilation.

Theorem 2 Let the vector field f : R n → R n be continuous and d-homogeneous of a degree ν ∈ R. If the system (10) is asymptotically stable then it is globally • finite-time stable for µ < 0:

∀x 0 ∈ R n , ∃T (x 0 ) ≥ 0 :
x(t, x 0 ) = 0, ∀t ≥ T (x 0 );

• exponentially stable for µ = 0:

∃M ≥ 1, ∃α > 0 : x(t, x 0 ) d ≤ M x 0 d e αt , ∀t ≥ 0;
• nearly fixed-time stable for µ > 0:

∀r > 0, ∃T r > 0 : x(t, x 0 ) ≤ r, ∀t ≥ T r , ∀x 0 ∈ R n .
The homogeneous control systems are robust (input-to-state stable) with respect to a rather large class of perturbations [START_REF] Andrieu | Homogeneous approximation, recursive observer design, and output feedback[END_REF][START_REF] Bernuau | Verification of ISS, iISS and IOSS properties applying weighted homogeneity[END_REF]. [START_REF] Nakamura | Smooth Lyapunov functions for homogeneous differential inclusions[END_REF] From Linear Control to SMC

The unit SMC

The classical concept of the SMC design for the linear plant (1) is the two-step procedure [1, 2, 3]: 1) select the sliding surface {x ∈ R n | Cx = 0} such that the motion of the considered system on this surface is stable (all trajectories converge to zero as time goes to infinity);

2) define a control law which steers the state of (1) towards the surface {x ∈ R n | Cx = 0} in finite time and ensures that this surface is a positively invariant set of the system (see, e.g., [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF] for the rigorous definition of the sliding mode).

In this article the so-called unit SMC algorithm [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF] is studied. It is given by

u smc = K nom x + γ(t, x) Cx Cx , (11)
where γ = γ(t, x) : R × R n → R m×m is such that λ max (γ(t, x) + γ (t, x)) < 0,

K nom = -(CB) -1 CA,
and the matrix C ∈ R m×n is selected such that det(CB) = 0 and the differential-

algebraic equation ẋ = (I n -B(CB) -1 C)Ax, Cx = 0, (12)
is globally asymptotically stable. Let us denote

U(σ) = σ σ if σ = 0 B m if σ = 0,
where B m is the unit ball in R m . Such a selection of the control algorithm together with the above assumptions guarantee that the differential inclusion

σ ∈ γ(t, x)U(σ) + Cf (t, x), σ = Cx, (13)
holds, securing that the surface {x ∈ R n | Cx = 0} is a finite-time attractive invariant manifold of the closed-loop system (1) and [START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF], provided that

sup t,x λ max γ(t, x) + γ (t, x) + 2 Cf (t, x) < 0,
see [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF] or the proof of Theorem 3. In the case analysed here, a linear feedback ( 2) is already well-tuned and provides a good performance for the closed-loop system. The objective is to make a minimal modification of the linear feedback in order to transform it to a SMC [START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF], and to improve the control quality.

The main idea of the upgrade can be easily explained for the single input case m = 1. Since, by Assumption 1, in this case the matrix of the closed-loop linear system A + BK lin is Hurwitz and has a real eigenvalue λ < 0, then the corresponding left eigenvector Θ ∈ R 1×n defines an invariant manifold Θx = 0 of the linear closed-loop system. This manifold is a sort of sliding surface of the linear unperturbed system, but without the finite-time attraction property yet. Therefore, for the SMC [START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF], the sliding surface is selected as follows:

Cx = 0, C = (ΘB) -1 Θ. ( 14
)
The sliding mode control ( 11) is defined such that (see Fig. 1)

u smc (x) = K lin x for Cx ≥ β,
and for Cx < β the SMC has the form [START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF], which steers all trajectories of the closed-loop system to the surface Cx = 0 in a finite-time. To avoid discontinuity of ( 11) on Cx = β the function γ is properly selected as described below.

Figure 1: The illustration of the upgrade of linear control to the unit SMC.

Theorem 3 Let the matrix K lin ∈ R m×n be the gain of a linear stabilizing feedback (2) such that Assumption 1 holds. If

• the switching surface is given by ( 14);

• the function f : R × R n → R n satisfies (10) with 0 ≤ η < P -1 , (15)
and

Cf (t, x) ≤ ρ Cx if Cx ≥ β, β if Cx < β, (16)
where ρ ∈ 0, |λmax(Λ+Λ )| 2 is a scalar parameter and P = P ∈ R n×n is a solution of the Lyapunov equation

(A + BK lin ) P + P (A + BK lin ) = -2I n , P 0; ( 17
)
• γ is defined as follows

γ(t, x) := γ( Cx ) = Λ Cx if Cx ≥ β, β if Cx < β, (18)
where β > 0 is a scalar parameter; then 1) u smc = K lin x for Cx > β and Cx = 0 is the only discontinuity surface of u smc ;

2) Cx = 0 is the sliding surface of the closed-loop system (1) ( 11) with the following reaching-time estimate

T (x(0)) ≤ -2    ln( Cx(0) β )+1 λmax(Λ+Λ )+2ρ if Cx(0) > β Cx(0) (λmax(Λ+Λ )+2ρ)β if Cx(0) ≤ β; (19)
3) the closed-loop system (1) ( 11) is globally asymptotically stable.

Proof. 1) Notice that the identities ( 4) and ( 14) imply that C (A + BK lin ) = ΛC, CB = I m and for Cx ≥ β we have

u smc = -CAx + ΛCx = CBK lin x -C(A + BK lin )x + ΛCx = CBK lin x -ΛCx + ΛCx = K lin x. (20)
Hence, for Cx ≥ β, it is inferred that

σ = C(A + BK lin )x + Cf (t, x) = Λσ + Cf (t, x), (21)
where Λ + Λ ≺ 0 by Assumption 1. Moreover, the inequality ( 16) implies that

d σ 2 dt = σ (Λ + Λ )σ + 2σ Cf ≤ σ (Λ + Λ )σ + 2ρ σ 2 = σ (Λ + Λ + 2ρI m )σ ≤ (λ max (Λ + Λ ) + 2ρ) σ 2 < 0 (22) for σ ≥ β. 2) For 0 < Cx < β, we have u sm (x) = -CAx + βΛ Cx Cx and σ = βΛ Cx Cx + Cf (t, x).
Hence, using the inequality ( 16) it is deduced that

d σ 2 dt ≤ βσ (Λ + Λ ) σ σ + 2βρ σ ≤ β(λ max (Λ + Λ ) + 2ρ) σ < 0 (23)
for 0 < σ < β. Combining ( 22) and ( 23) we conclude that the sliding mode in the surface σ = 0 appears in a finite time T (x(0)) estimated by the formula [START_REF] Fiter | A state dependent sampling for linear state feedback[END_REF].

3) Recall that the equivalent control u eq is the solution of the algebraic equation CAx + CBu + Cf (t, x) = 0 with respect to u. This equation corresponds to σ = 0 in the sliding mode. Since CB = I m then

u eq = -CAx -Cf (t, x).
For t ≥ T (x(0)) we have u smc = u eq (see, [START_REF] Utkin | Sliding Mode Control in Electro-Mechanical Systems[END_REF] for more details) and the dynamics of the closed-loop system is described by the differential-algebraic equation:

ẋ = Ax + Bu eq + f (t, x), Cx = 0. Therefore, it follows that ẋ = (A -BCA)x + f (t, x) -BCf (t, x), Cx = 0. Since C (A + BK lin ) = ΛC and CB = I m then A -BCA = A -BC(A + BK lin -BK lin ) = A + BK lin -BΛC
and the dynamics in the sliding mode is given by ẋ = (A + BK lin )x + f (t, x) -BCf (t, x), Cx = 0.

Since A + BK lin is Hurwitz, there exists a positive definite solution P = P ∈ R n×n to the Lyapunov equation [START_REF] Boyd | Linear Matrix Inequalities in System and Control Theory[END_REF]. Considering the Lyapunov function candidate

V = x P x, it follows that V = 2x P (A + BK lin )x + 2x P (f (t, x) -BCf (t, x)) ≤ -2 x 2 + 2 x P (f (t, x) -BCf (t, x)) ≤ -2 x ( x -P • f (t, x) -BCf (t, x) ) < 0, provided that f (t, x) -BCf (t, x) < P -1
x . The proof is complete.

The SMC (11) (18) can be rewritten as a linear feedback with a statedependent gain:

u smc = K smc ( Cx )x for Cx = 0,
where K smc : (0, +∞) → R m×n is defined as follows

K smc (ϕ) = K nom + γ(ϕ) ϕ C, ϕ > 0. ( 24
)
Below this representation of the SMC is used in order to introduce a chattering reduction scheme. Notice that the SMC designed by the latter theorem coincides with the linear feedback for Cx ≥ β. For β tending to zero the original linear feedback is recovered. From a theoretical point of view, the larger β, the larger the magnitude of the matched perturbations to be rejected (see the formula ( 16)). In practice, large β may invoke large chattering magnitude, so tuning the parameter β would allow us to upgrade a linear control to a SMC and prevent a degradation of the control accuracy due to the chattering phenomenon.

Remark 1 Theoretically, for m = 1 any real negative eigenvalue of the matrix A + BK lin satisfying Assumption 1 can be selected for the upgrade. However, in practice this selection may impact the improvement of the control quality of the obtained SMC. The best option in this case is to compare the corresponding SMCs on the experiments and select the best one, based on the desired criteria.

If such a comparison is not possible, the largest negative eigenvalue (i.e., closest to zero) should be selected among others.

The generalized homogeneous SMC

The homogeneous controllers [START_REF] Coron | Adding an integrator for the stabilization problem[END_REF][START_REF] Bhat | Geometric homogeneity with applications to finite-time stability[END_REF][START_REF] Andrieu | Homogeneous approximation, recursive observer design, and output feedback[END_REF][START_REF] Polyakov | Robust stabilization of MIMO systems in finite/fixed time[END_REF][START_REF] Zimenko | Robust feedback stabilization of linear MIMO systems using generalized homogenization[END_REF] are possible solutions to the considered problem. As shown in [18, Section 1.3], they may provide faster convergence, better robustness and less overshoot than linear control laws. In this paper, we consider the generalized homogeneous SMC of the form [START_REF] Polyakov | Generalized Homogeneity in Systems and Control[END_REF]:

u hom (x) = K 0 x + Kd(-ln x d )x, (25)
where the parameters K 0 , K ∈ R m×n , d(s) = e sG d , s ∈ R, G d ∈ R n×n are defined using the following procedure:

1. Find a solution (G 0 , Y 0 ) ∈ R n×n × R m×n of the linear equation

AG 0 + BY 0 = A + G 0 A, G 0 B = 0, (26)
and define

G d = I n -G 0 , K 0 = Y 0 (I n -G 0 ) -1 ; (27) 2. Find a solution (X, Y ) ∈ R n×n × R m×n of the LMI (A + BK 0 )X + X(A + BK 0 ) + BY + Y B ≺ 0, G d X + XG d 0, X 0 (28)
and define

K = Y X -1 . ( 29
)
The canonical homogeneous norm • d in ( 25) is induced by the weighted Euclidean norm

x P = √ x P x, P ∆ = X -1 .
In [START_REF] Zimenko | Robust feedback stabilization of linear MIMO systems using generalized homogenization[END_REF] it is shown that the equation ( 26) is always feasible provided that the pair (A, B) is controllable. The feasibility of ( 28) is proven in [START_REF] Polyakov | Robust stabilization of MIMO systems in finite/fixed time[END_REF]. Notice that the term d(ln x d )x is globally bounded on R n , continuously differentiable on R n \{0} and discontinuous at zero, since d(ln x d )x = 1 by the definition of the canonical homogeneous norm. The unperturbed closed-loop system (1), [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF] ẋ = g(x)

∆ = Ax + Bu hom (x)
is d-homogeneous of the degree µ = -1 with the dilation d(s) = e sG d , s ∈ R:

g(d(s)x) = e -s d(s)g(x), ∀x = 0, ∀s ∈ R
and it is globally finite-time stable with the Lyapunov function V (x) = x d as shown below.

Proposition 1 [START_REF] Polyakov | Generalized Homogeneity in Systems and Control[END_REF] Let the pair (A, B) be controllable, G d ∈ R n×n , K 0 , K ∈ R m×n be defined by the formulas (26), ( 27), ( 28), [START_REF] Kikuuwe | A sliding-mode-like position controller for admittance control with bounded actuator force[END_REF].

If f : R × R n × R n satisfies the inequality x d x d(-ln x d )P d(-ln x d )f (t, x) ≤ κ, (30)
for all x = 0 and all t > 0, where P = X -1 , κ ∈ (0, ρ) and

ρ = -λ max P 1/2 (A + B(K 0 + K))P -1/2 +P -1/2 (A + B(K 0 + K)) P 1/2 > 0,
then the origin of the closed-loop system (1) with the homogeneous feedback law u(t) = u hom (x(t)) given by [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF], is globally uniformly finite-time stable and the settling time admits the estimate

T (x 0 ) ≤ λ max (P 1/2 G d P -1/2 + P -1/2 G d P 1/2 ) x 0 d 2(ρ -κ) . (31)
The proof follows from the formula (9) that gives

d x d dt = x d x d (-ln x d )P d(-ln x d )(Ax+Bu hom (x)+f (t,x)) x d (-ln x d )P G d d(-ln x d )x
.

Using the d-homogeneity of the vector field x → Ax + Bu hom (x) and the estimate (30) yields

d x d dt = x d (-ln x d )P (A+BK0+BK)d(-ln x d )x+ x d x d(-ln x d )P d(-ln x d )f x d (-ln x d )P G d d(-ln x d )x ≤ -ρ+κ x d (-ln x d )P G d d(-ln x d )x ≤ -2(ρ-κ) λmax(P 1/2 G d P -1/2 +P -1/2 G d P 1/2 ) .
Due to [START_REF] Huber | Implicit discrete-time twisting controller without numerical chattering: analysis and experimental results[END_REF], [START_REF] Kikuuwe | A sliding-mode-like position controller for admittance control with bounded actuator force[END_REF] it follows that ρ > 0 and by construction ρ -κ > 0. Therefore, the canonical homogeneous norm is the Lyapunov function of the finitetime stable system (1), [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF] with the settling time estimate [START_REF] Kawski | Families of dilations and asymptotic stability[END_REF]. The settling time estimate [START_REF] Kawski | Families of dilations and asymptotic stability[END_REF] has minor conservatism due to system uncertainties. In the disturbance-free case, this estimate (inequality) may be exact (identity), see [18, page 302]. The considered homogeneous controller is a SMC algorithm with the sliding surface x = 0 and it has properties similar to the so-called quasicontinuous high order sliding mode controller [START_REF] Levant | Quasi-continuous high-order sliding-mode controllers[END_REF]. Indeed, it is discontinuous only the sliding set x = 0, it steers all trajectories of the system to the sliding manifold x = 0 in a finite time and it rejects non-vanishing matched bounded perturbations.

Remark 2 For f (t, x) = Bq(t, x) the inequality

P 1/2 Bq(t, x) ≤ 0.5κλ min (P 1/2 G d P -1/2 + P -1/2 G d P 1/2 )
implies [START_REF] Poznyak | Attractive Ellipsoids in Robust Control[END_REF]. Indeed, from the identities (26) [START_REF] Wang | Experimental comparisons between implicit and explicit implementations of discretetime sliding mode controllers: toward input and output chattering suppression[END_REF], we conclude d(ln x d )B = x -1 d B, but the definition of the canonical homogeneous norm gives

P 1/2 d(-ln x d )x = 1.
Hence, using the Schwarz inequality it is derived that

x d x d(-ln x d )P d(-ln x d )f (t, x) ≤ P 1/2 Bq(t, x) ≤ κ.
This means that the controller (25), indeed, rejects some non-vanishing bounded matched perturbations.

Notice that, similarly to the unit SMC, the term

K hom (ρ) := K 0 + ρ 1+µ Ke -G d ln ρ , ρ > 0 ( 32
)
in [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF] can be treated as a state-dependent feedback gain of a linear controller, i.e.,

u hom = K hom ( x d )x, K hom : (0, +∞) → R m×n .
The choice K = K lin -K 0 leads to K hom (1) = K lin , i.e., the homogeneous controller coincides with the linear one on the unit sphere x P x = 1. Notice that x P = 1 ⇔ x d = 1. This feature is used for upgrading a linear feedback to a locally homogeneous SMC following the methodology introduced in [START_REF] Wang | On generalized homogenization of linear quadrotor controller[END_REF].

Let us introduce the following saturation function:

sat δ,β (ϕ) =    δ if ϕ < δ, ϕ if δ ≤ ϕ ≤ β, β if ϕ > β. ( 33
)
Theorem 4 Let the matrix K lin ∈ R m×n be the gain of a linear stabilizing feedback (2), the pair {A, B} be controllable, the matrices G d , K 0 be defined by the formulas (27) [START_REF] Brogliato | Digital implementation of sliding-mode control via the implicit method: a tutorial[END_REF] and

K ∆ = K lin -K 0 .
If P ∈ R n×n is a solution of the following LMI

(A + BK lin )P + P (A + BK lin ) ≺ 0, P G d + G d P 0, P 0, ( 34
)
and the function f : R × R n → R n satisfies (30) for all x such that x P ≤ 1 and 2x P f (t, x) ≤ κx P x, ∀t > 0, ∀x :

x P > 1, ( 35
)
where κ ∈ [0, ρ) and ρ > 0 is defined in Proposition 1, then

• the control law ũ(x) = K hom (sat 0,1 ( x d ))x ( 36
)
is continuous on R n and it coincides with the linear feedback u lin (x) for x P ≥ 1 and with the homogeneous feedback u hom (x) for x P < 1;

• the origin of the closed-loop system (1) ( 36) is globally uniformly finitetime stable with the settling time estimate

T (x 0 ) ≤ 1+2 ln( x0 ) ρ-κ + if x 0 P > 1, x0 d ρ-κ if x 0 P ≤ 1. (37)
Proof. For x 0 P ≤ 1, the local finite-time stability of the closed-loop system follows from Proposition 1. For x P > 1 we have ũ(x) = K hom (1)x = K lin x and

d x P dt = x ((A+BKlin)P +P (A+BK lin ) )x+2x P f (t,x) 2 x P ≤ -ρ+κ 2 x P ,
where the definition of the parameter ρ (see Proposition 1). This means that the function V : R n → R given by

V (x) = x P if x P x ≥ 1 x d if x P x < 1,
is a Lyapunov function, and the closed-loop system is globally uniformly finitetime stable with the settling-time estimate [START_REF] Bhat | Geometric homogeneity with applications to finite-time stability[END_REF].

According to the latter theorem, the existing linear controller can be transformed to a locally homogeneous SMC by means of a modification of the homogeneous scaling of the linear feedback gain close to the origin (see Fig. 2).

Digital Implementation of the Controllers

The control algorithms considered above deal with a continuous-time model of the system. In the case of a digital control device, the control input changes its value only at certain discrete instances of time: The sampling period h ∆ = t k+1 -t k > 0 can be constant (synchronous sampling) or time-varying (asynchronous sampling). Therefore, a more realistic model of the control system (1) with a digital controller is ẋ(t) = Ax(t) + Bu(t k ), for t ∈ [t k , t k+1 ). [START_REF] Polyakov | Robust stabilization of MIMO systems in finite/fixed time[END_REF] In this case, the digital implementation of a continuous-time feedback control u(•) needs to be discretized somehow. Some classical schemes for discrete-time approximations of continuous-time systems can be used for this purpose. Let us recall that the explicit and implicit Euler methods are standard schemes for the discrete-time approximation of a nonlinear ODE:

0 = t 0 < t 1 < ... < t k < . . . .
ẋ = F (x), F : R n → R n .
Since for small h > 0 the approximation ẋ(t) ≈ x(t+h)-x(t) h holds, then the approximate discrete-time models can be written as:

xk+1 = x k + hF (x k ),
(explicit Euler method) and xk+1 = x k + hF (x k+1 ), (implicit Euler method), where x k = x(t k ) and xk+1 ≈ x(t k+1 ). If F (•) is a set-valued mapping, this defines a differential inclusion, and the analogous approximation of the time derivative leads to a discrete-time inclusion (see Section 5.2). For the linear plant (38) the following exact discrete-time approximation can be derived:

x k+1 = A h x k + B h u(t k ) (39)
where x k = x(t k ) and:

A h = e hA and B h = h 0 e Aτ dτ B. (40)
The explicit Euler method presented above yields

A h = I n + hA and B h = hB. (41)
For a small h > 0 the approximations e Ah ≈ I n + hA and h 0 e Aτ dτ B ≈ hB hold true. Following Euler's methods, the digital implementation of a feedback controller u(x) for [START_REF] Polyakov | Robust stabilization of MIMO systems in finite/fixed time[END_REF] given by

u(t k ) = u(x k ), (42)
which is called an explicit discretization, and the scheme

u(t k ) = u(x k+1 ) (43)
is called an implicit discretization. In the latter case, in order to implement the controller in a digital device, the system of equations ( 39) and (43) has to be solved with respect to xk+1 , numerically and on-line. For feedback controllers allowing the representation

u(x) = ũ(x, x) (44)
where the function ũ : R n × R n → R m is linear in the second argument, the following semi-implicit discretization scheme given by

u(t k ) = ũ(x k , x k+1 ).
is also considered below. In [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF] it is shown that the conventional explicit and implicit Euler schemes may produce in some cases a discrete-time model inconsistent with the original continuous-time system with respect to the stability properties (such as the convergence rate). For example, the finite-time stability of the homogeneous system with negative degree is always broken by Euler discretization. The so-called consistent discretization of the homogeneous systems is introduced in [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF]. The proposed methodology is shown to be efficient for numerical simulation of closed-loop systems. In this paper, we compare the explicit, semi-implicit and implicit discretization of the controllers (2), ( 11) and ( 25) in the sense explained above.

Remark 3 It is clear that the explicit and the implicit schemes yield controllers with different structures. This is a quite classical consequence of different discretization methods [START_REF] Franklin | Digital Control of Dynamic Systems[END_REF]. For instance, the explicit Euler discretization of the linear dynamics ẋ(t) = Ax(t) yields x k+1 = (I n + hA)x k , while its implicit discretization yields x k+1 = (I n -hA) -1 x k . Such differences also appear in the context of feedback control as is visible in the next sections (in particular for the SMC).

Discretizations of the Linear Controller

Explicit Scheme

The explicit discretization of the linear feedback leads to

u k = K lin x k , (45)
and the closed-loop discrete-time model has the form

x k+1 = (A h + B h K lin )x k .
Therefore, A h + B h K lin has to be a Schur matrix 3 to guarantee the exponential stability of the closed-loop system.

Semi-Implicit Scheme

Selecting

ũ(y, z) = 1 2 K lin y + 1 2 K lin z, y, z, ∈ R n ,
it follows that the linear feedback (2) possesses the form (43) and the semiimplicit discretization of the linear controller has the form

u k = 1 2 K lin x k + 1 2 K lin x k+1 .
Substituting u(t k ) to (39) yields

(I n - 1 2 B h K lin )x k+1 = (A h + 1 2 B h K lin )x k . (46)
The matrix in the left-hand side of ( 46) is invertible for a sufficiently small h > 0, so

x k+1 = I n - 1 2 B h K lin -1 A h + 1 2 B h K lin x k
and the semi-implicit discretization of the linear controller has the form

u k = 1 2 K lin I n + I n - 1 2 B h K lin -1 A h + 1 2 B h K lin x k . ( 47
)
Notice that

I n -1 2 B h K lin -1 A h + 1 2 B
h K lin has to be a Schur matrix to guarantee the exponential stability of the closed-loop system (39) (47).

Implicit Scheme

The implicit discretization of the linear feedback is

u k = K lin x k+1 .
In this case, it follows from (39) that

x k+1 = (I n -B h K lin ) -1 A h x k .
Therefore, at each sampling instant the control input is defined as follows

u k = K lin (I n -B h K lin ) -1 A h x k . ( 48
)
The exponential stability of the closed-loop system (39) (48) is guaranteed if

(I n -B h K lin ) -1 A h is a Schur matrix.

Discretization of the Unit SMC

Explicit Scheme

The classical idea for chattering reduction of SMC is to replace the sign multifunction by a piecewise-linear saturation function, and, next, to tune its width parameter [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF]. This widely used engineering trick is known, however, to decrease the closed-loop accuracy since it destroys the sliding-mode phase. Moreover the tuning of the parameters (saturation width vs. sampling time) is not straightforward in general [START_REF] Huber | Recent Trends in Sliding Mode Control, ch. Experimental results on implicit and explicit time-discretization of equivalent control-based sliding mode control[END_REF]. This is what is done below, taking into account the structure of the proposed SMC. As shown above the SMC (11) (18) can be interpreted as a linear feedback

u SM = K SM ( Cx )x,
with the state-dependent gain K SM ( Cx ) given by [START_REF] Kikuuwe | Proxy-based sliding mode control: A safer extension of PID position control[END_REF], which tends to infinity as Cx → 0. The infinite gain in the linear controller contributes to the socalled chattering phenomenon [START_REF] Utkin | Sliding Modes in Control Optimization[END_REF][START_REF] Acary | Implicit Euler numerical scheme and chattering-free implementation of sliding mode systems[END_REF]. The simplest approach to reduce the chattering is to bound the gain K SM ( Cx ) close to singularity points. To avoid the infinite gain in the explicit discretization of the SMC, we re-define it as follows ũ

(x) = K SM (sat δ,β ( Cx ))x, ( 49
)
where β > 0 is defined in the formula [START_REF] Polyakov | Generalized Homogeneity in Systems and Control[END_REF] and δ ∈ (0, β) is a tuning parameter.

Obviously, δ = 0 corresponds to the original SMC, but for δ = β it follows that

K SM (sat β,β ( Cx k )) = K lin ,
i.e., the proposed controller becomes the linear feedback in the limit case. Therefore, a linear controller can be upgraded to a SMC. To avoid the degradation of the control quality, the following procedure can be used:

1) design the parameters of the SMC using Theorem 3 for some β > 0;

2) implement the control law (49) in a digital device with δ = β (linear feedback);

3) decrease the parameter δ while the control quality is improving.

The control quality in the latter scheme can be estimated through numerical simulations or performing experiments on a setup. It may include various indexes, which correspond to control precision, energetic optimality, chattering effects, etc.

Semi-Implicit Scheme

Following the scheme suggested above, the semi-implicit discretization of the SMC is defined as follows:

u k = K SM (sat δ,β ( Cx k ))x k+1 .
Substituting it into (39) yields

(I n -B h K SM (sat δ,β ( Cx k ))x k+1 = A h x k .
To guarantee the invertibility of (I n -B h K SM (sat δ,β ( Cx k )), the parameter h > 0 must be sufficiently small. The sufficient condition is

B h K SM (sat δ,β (ρ) < 1 for all ρ ∈ [α, β]
. This leads to:

u k = K SM (sat δ,β ( Cx k ))(I n -B h K SM (sat δ,β ( Cx k )) -1 A h x k . (50)

Implicit Scheme

For the implicit discretization of the SMC, the discrete-time model ( 39) is used together with the sliding surface [START_REF] Pérez-Ventura | When is it reasonable to implement the discontinuous sliding-mode controllers instead of the continuous ones? Frequency domain criteria[END_REF]

u nom k = (CB h ) -1 C(I -A h )x nom k .
Thus, it follows that

K nom = (CB h ) -1 C(I -A h ). ( 51
)
As before, the discrete-time controller takes the form

u k = K nom x k -u sv k . ( 52
)
We now proceed with the design of the term u sv k . Following [START_REF] Huber | Lyapunov stability and performance analysis of the implicit discrete sliding mode control[END_REF] and [START_REF] Miranda-Villatoro | Set-valued sliding-mode control of uncertain linear systems: Continuous and discretetime analysis[END_REF], the implicit discretization of the sliding dynamics ( 13) is considered, that is: The maximal monotonicity of M(•) guarantees that the generalized equation (GE) (53b)-(53c) has a unique solution. Indeed, the substitution of (53b) into (53c) yields the GE

         σ k+1 = σ k -CB h u sv k + C h 0 e Aτ dτ f k , (53a)
M(σ k+1 ) ∆ = u sv k ∈ -γ(σ k+1 )Sgn(σ k+1 ), ( 53b
) σk+1 = σ k -αCB h u sv k , (53c)
σk+1 ∈ σ k + ρ h γ(σ k+1 )Sgn(σ k+1 ) = σ k -ρ h M(σ k+1 ),
where ρ h = αCB h > 0, which in view of (55) has the solution

σk+1 = R ρ h M (σ k ). ( 58
)
The substitution of (58) back into (53c) yields:

u sv k = 1 ρ h (σ k -R ρ h M (σ k )) = Y ρ h M (σ k ). (59)
It is possible to provide an explicit expression for both, the resolvent and the Yosida approximation. Indeed, setting δ h = -ρ h λβ, a case by case analysis of (57) yields

R ρ h M (σ k ) =      1 1-ρ h λ σ k , if β + δ h ≤ |σ k | σ k + ρ h λβsgn(σ k ), if δ h < |σ k | < β + δ h 0, if |σ k | ≤ δ h , (60)
Y ρ h M (σ k ) =      -λ 1-ρ h λ σ k , if β + δ h ≤ |σ k | -λβsgn(σ k ), if δ h < |σ k | < β + δ h 1 ρ h σ k , if |σ k | ≤ δ h . (61)
Note that both ρ h = o(h) and δ h = o(h), where o(h) denotes the classical "little o" notation, that is lim h→0 o(h) h = 0. Thus, a study similar to the one done in [START_REF] Miranda-Villatoro | Set-valued sliding-mode control of uncertain linear systems: Continuous and discretetime analysis[END_REF]Section 4.5] shows that the trajectories of the discrete-time closed-loop system converge to trajectories of the continuous-time closed-loop as h ↓ 0. It is inferred that the generalized equation in (53b) (53c) has a solution which can be easily computed online at each timestep.

Discretization of the Homogeneous SMC

Explicit Scheme

Since the gain (32) of the homogeneous control tends to infinity as x → 0, the saturation function sat α,β is used to regularize this singularity similarly to the unit SMC considered above:

u(t k ) = K hom (sat δ,1 x k d )x k , (62)
where 0 < δ ≤ 1 are tuning parameters. For δ = 1, we have K hom (sat 1,1 x k d ) = K lin , the proposed controller coincides with the linear controller. Therefore, a linear controller can be upgraded to homogeneous SMC while avoiding any degradation of the control precision using the following procedure [START_REF] Wang | On generalized homogenization of linear quadrotor controller[END_REF]:

1) design the parameters of the homogeneous controller using Theorem 4;

2) implement the control law (62) in a digital device with δ = 1 (linear feedback);

3) decrease the parameter δ ∈ (0, 1) while the control quality is improving.

Notice that K hom (sat δ,1 x d ) = K lin for x ≥ 1, i.e., in this case, the homogeneous controller modifies the linear feedback only locally (close to 0). In the latter case, the exponential stability of the system (39) (45) implies at least the practical asymptotic stability (convergence to a bounded zone) for the closed-loop system (39) (62). An additional difficulty for the application of the homogeneous controller is the computation of the canonical homogeneous norm defined implicitly (see the formula (8)). Fortunately, a rather simple procedure can be used for the on-line computation of the canonical homogeneous norm (see, e.g., [START_REF] Wang | On generalized homogenization of linear quadrotor controller[END_REF]).

Semi-Implicit Scheme

The semi-implicit discretization of the homogeneous control gives

u(t k ) = K hom (sat δ,1 x k d )x k+1 .
Using (39) yields

(I n -B h K hom (sat δ,1 x k d ))x k+1 = A h x k .
The matrix I n -B h K hom (1) is invertible for a sufficiently small h > 0. Then the matrix

I n -B h K hom (sat δ,1 x k d ) is invertible for some 0 < δ < 1, so it is inferred that u(t k ) = K hom (sat δ,1 x k d )(I n -B h K hom (sat δ,1 x k d )) -1 A h x k . (63)
Similarly to the case of the explicit discretization, the exponential stability of the system (39) (47) implies at least the practical asymptotic stability (convergence of solutions to a bounded zone) for the closed-loop system (39) (63).

Implicit Scheme

The so-called consistent discretization of the closed-loop system (1) ( 25) is studied in [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF], where it was assumed that P = P 0 is selected such that

(A + BK 0 + BK) P + P (A + BK 0 + BK) + ρ(P G d + G d P ) = 0, P G d + G d P 0, (64)
where ρ > 0 is a tuning parameter. In this case, it follows that (see the proof of Proposition 1)

d dt x d = -ρ.
Hence, for any trajectory of the closed-loop system (1) [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF], it follows that

x(t k+1 ) d = x(t k ) d -ρ(t k+1 -t k ).
Taking into account this theoretically exact estimate of x(t k+1 ) d for the closed-loop continuous-time system, an implicit discretization of the controller (36) can be defined as

u(t k ) = K hom (sat δ,1 ( x k d -ρh)x k+1 or, equivalently, u(t k ) = K hom (sat δ,1 ( x k d -ρh))(I n -B h K hom (sat δ,1 ( x k d -ρh)))A h x k , (65)
where 0 < δ < 1 is, as above, a tuning parameter, and the canonical homogeneous norm is induced by the norm x P = √

x P x with P 0 being a solution of the following semi-definite programming problem:

η → min (66) subject to -ηI n (A + BK lin ) P + P (A + BK lin ) + ρ(P G d + G d P ) 0, P G d + G d P 0, P 0, 0 ≤ η ∈ R. (67)
Obviously, if the optimal η is zero, then (64) is fulfilled. Notice that the control (65) is just a possible implicit discretization of the continuous-time homogeneous feedback law inspired by [START_REF] Polyakov | Consistent discretization of finite-time and fixed-time stable systems[END_REF].

Experimental Validation

The platform QUBE-Servo 2 of Quanser is used for the experiment. It is depicted in Fig. 4.

Rotary pendulum model

The parameters of the experimental platform are given by the manufacturer and they are listed in the Table 1. The rotary pendulum model is shown in Fig. 5. The rotary arm pivot is attached to the QUBE-Servo 2 system and is actuated. The arm has a length r, a moment of inertia J r , and its angle θ increases positively when it rotates counter-clockwise (CCW). The servo (and thus the arm) should turn in the CCW direction when the control voltage is positive, v m > 0. The pendulum link is connected to the end of the rotary arm. It has a total length of L p and its center of mass is at l = L p /2. The moment of inertia about its center of mass is J p . The rotary pendulum angle α is zero when it is hanging downward and increases positively when rotated CCW. The equations of motion for the pendulum system are developed using the Euler-Lagrange method, from the total kinetic and potential energies of the system. The nonlinear Lagrange dynamics is given as:

J r + J p sin α 2 θ + m p lr cos α α + 2J p sin α cos α θ α -m p lr sin α α2 = τ -b r θ J p α + m p lr cos α θ -J p sin α cos α θ2 + m p gl sin α = -b p α, (68) where J r = m r r 2 /3 is the moment of inertia of the rotary arm with respect to the pivot (i.e., rotary arm axis of rotation) and J p = m p L 2 p /3 is the moment of inertia of the pendulum link relative to the pendulum pivot (i.e., axis of rotation of pendulum). The viscous damping torques acting on the rotary arm and the pendulum link are b r and b p , respectively. The applied torque at the base of the rotary arm generated by the servo motor is

τ = k m R m v m -k m θ .

Linear State-Space Model

When the nonlinear Lagrange dynamics is linearized around the operating point, the resulting linear dynamics for the rotary pendulum is given by

J r θ + m p lr α = τ -b r θ, J p α + m p lr θ + m p glα = -b p α.
Solving for the acceleration terms yields:

θ = 1 J t m 2 p l 2 rgα -J p b r θ + m p lrb p α + J p τ , α = 1 J t -m p glJ r α + m p lrb r θ -J p b p α -m p rlτ ,
where J t = J p J r -m 2 p l 2 r 2 . The linear model of the pendulum system can be expressed in state-space form as ẋ(t) = Ax(t) + Bv m (t),

where x(t) = θ(t), α(t), θ(t), α(t) (70) Since rank(A) < 4, the matrix A is not invertible. In order to find A h , B h of the discrete-time model [START_REF] Zimenko | Robust feedback stabilization of linear MIMO systems using generalized homogenization[END_REF], the Jordan decomposition A = S -1 JS is adopted, where J, S ∈ R 4×4 . Let J be the Jordan block diagonal J = diag(0, J 1 ), where J 1 is a diagonal invertible matrix. Then e Jτ = diag(e 0τ , e J1τ ) and h 0 e Jτ dτ = h 0 diag(e 0τ , e J1τ )dτ = diag(h, J -1

∈ R 4 is the state vector, v m (t) ∈ R is the control signal, y(t) = [θ(t) α(t)] is the output that is measured directly, A ∈ R 4×4 , B ∈ R 4×1
1 (e J1h -I)). Then the implementation is given by

A h = S -1 diag 1, e J1h S, (71)
B h = S -1 diag h, J -1 1 e J1h -I 3 SB, (72)
where I 3 ∈ R 3×3 is the identity matrix.

Comparisons between the Controllers

The platform is supported with both a swing-up controller and a linear stabilizing controller realized in matlab. In this work only the linear stabilizing controller is modified. The conceptual scheme of the whole controller's architecture is depicted in Fig. 6. The switching from the energy swing-up to the stabilizing controllers occurs when the pendulum arm is in the upper position and remains in the bound |α| < 20 deg, which takes approximately 3 sec. The experiments are carried out with a fixed sampling time h > 0, which is given by the encoder of the device for a total experimental time of 20 sec. The derivatives are not available directly from the output y = [θ α] , so the linear differentiator F (s) = 50s/(s + 50) is used for getting the corresponding angular velocities. The gains of the linear proportional controllers are given by the manufacturer:

K lin = 2 -35 1.5 -3 . (73)
Thus, the matrix A + BK lin has the following eigenvalues Two eigenvalues are real negative and can be used for the upgrade since Assumption 1 is fulfilled for both. The experiments showed that the choice of Λ = λ 4 produces a better precision in θ trajectory tracking with less control effort. For The parameters of the homogeneous controller are obtained using the optimization procedure (66) with ρ = 0.3 and the formulas (26) [START_REF] Wang | Experimental comparisons between implicit and explicit implementations of discretetime sliding mode controllers: toward input and output chattering suppression[END_REF]: shoots nor undershoots, the variation of the control signal is a reasonable quantifier of the chattering in the controller. The control parameters remain as before, that is δ = 0.65, β = 1 for the explicit and semi-implicit SMC; ρ h = 50, β = 1 for implicit SMC; and δ = 0.75, β = 1 for the homogeneous controller.

G d =     4 -2.0235 0 0 0 2 0 0 0 0 3 -2.0235 0 0 0 1     P =   0.
During the parameter-tuning process made in the tracking sinusoidal case, experiments (not explained in detail here) showed that the smaller δ, the smaller the tracking error in θ, but with more accentuated control effort, and vice-versa. Therefore, the additional parameter δ must be carefully tuned, depending on the constraints of the application. Figures 8 and9 depict the transients of the trajectory tracking and control signal in sinusoidal and step cases. To explain the tables we can proceed in vertical or horizontal reading. In the first vertical reading case we compare the explicit, implicit and semi-implicit discretizations for the three controllers. As the reference point for the comparison we take the means that the chattering is effectively reduced. This is probably caused by the nature of the homogeneous feedback which scales "dynamically" (depending on the homogeneous norm of the tracking error) all eigenvalues of the closed-loop error system, while the unit SMC deals only with one (closest to zero) eigenvalue.

• It is clear that the implicit discretization of the unit SMC can allow the best trajectory tracking and robustness with respect to the sampling time variation, while keeping an acceptable control effort.

• The semi-implicitly discretized unit SMC improves the tracking precision (up to 40% in some scenarios) without degradation of the input signal quality.

A detailed analysis of the results: The implicit discretization in the sinu- soidal case does not allow the linear controller to stabilize the tracking error in less than 3 sec. In the sinusoidal reference trajectory case and explicit discretization, the homogeneous controller (which has the best precision) has an accuracy improvement of 46% with respect to the linear one, but with an increase of 69% in control energy. The implicit SMC has an improvement of 45% with respect to the explicit SMC, but with an increase of 30% in control energy. In the step reference case and explicit discretization, the SMC (which has the best performance) has an improvement of 6% with respect to the linear one but with an increase of 9.5% in control energy, the implicit SMC (which has the best precision) has an improvement of 6% with respect to the explicit SMC, but with an increase of 19% in the control energy.

The robustness of the controllers with respect to the sampling time variation (h = 0.008) is also checked. This can happen in some control systems in case of data-loss, or of a modification of the characteristics of internal electronics components (caused by heating, cooling down, or wear). Past experimental works on SMC [START_REF] Huber | Recent Trends in Sliding Mode Control, ch. Experimental results on implicit and explicit time-discretization of equivalent control-based sliding mode control[END_REF][START_REF] Huber | Implicit discrete-time twisting controller without numerical chattering: analysis and experimental results[END_REF][START_REF] Wang | Experimental comparisons between implicit and explicit implementations of discretetime sliding mode controllers: toward input and output chattering suppression[END_REF] have proved that the implicit method bears for large sampling times without deteriorating too much the closed-loop performance. It is clear that in both step and sinusoidal scenarios, the trajectory tracking and the control effort in linear and SMCs are comparable to the nominal sampling time (h = 0.002), meaning that they are robust. But, the implicit homogeneous controller presents a degradation in the sinusoidal (resp. step) scenario of 276% (resp. 7%) in trajectory tracking, and of 141% (resp. 105%) in control quality. This means that the sampling parameter h influences a lot the performance of the homogeneous controller in the case of the implicit discretization. A development of a more robust implicit discretization scheme for homogeneous controllers is an interesting problem for the future research.

Finally it is noticeable in both Tables 2 and3, that the implicit discretisation of the unit SM controller, does not decreases its total variation (which measures the chattering) compared with the explicit and the semi-implicit methods. This seems to be in contradiction with previous conclusions [START_REF] Huber | Recent Trends in Sliding Mode Control, ch. Experimental results on implicit and explicit time-discretization of equivalent control-based sliding mode control[END_REF][START_REF] Wang | Experimental comparisons between implicit and explicit implementations of discretetime sliding mode controllers: toward input and output chattering suppression[END_REF][START_REF] Huber | Implicit discrete-time twisting controller without numerical chattering: analysis and experimental results[END_REF]. It seems, this is due to the fact that the transient period before the sliding surface is reached, is approximately equal to 12s, see the implicit scheme in Fig. 7. This is too long in case of the step reference (whose values switch from a constant value to another constant value after 5s). Hence the problem encountered in this case is that the SMC in this paper is designed for regulation, not for tracking. If the trajectory to be tracked is too fast, then the control design has to be changed in order to recover the chattering drastic reduction that is observed in the above stabilization experiments and and in the above cited articles with the implicit discretization. It is also noteworthy that the advantages that are brought by the implicit discretization, are visible only during the sliding phase. Indeed, during the reaching phase both the explicit and the implicit are known to behave equivalently, a fact confirmed by the data in Fig. 7.

Conclusion

In this article, a procedure to upgrade the linear controller to the unit slidingmode controller (SMC) and to a homogeneous SMC is introduced. It modifies the linear feedback in a certain zone of the state space and transforms it to a SMC. Based on the structure of the obtained improved controllers, two special schemes of their practical implementation in semi-implicit and implicit discretizations are proposed. To make the mentioned upgrade, just two additional parameters needs to be tuned in practice. The tuning rules for these parameters prevent any degradation of the control quality. The theoretical results are supported by experiments performed on an inverted rotary pendulum, which is a nonlinear system. In practice the system performance is usually sacrificed due to the trade-off between the minimization of the chattering and the convergence performance. But this is not the case in this study, because a linear controller is transformed to a SMC. The proposed method incorporates tuning rules to deal with this problem for the passage from the linear controller to the SMC. The obtained experimental results show that the upgrading strategies improve the tracking performance of the linear controller provided by the manufacturer, while keeping similar control signal in the sense of magnitude, energy and chattering index. The simplicity of the suggested scheme should allow many operating control systems to be upgraded easily.

Figure 2 :

 2 Figure 2: The illustration of the upgrade from linear to homogeneous controller.

1 Figure 3 :

 13 Figure 3: Graph of the set-valued map M(•) defined in (53b) showing the local scope of the SMC and confirming the global maximal monotonicity of the map.

Figure 4 :

 4 Figure 4: Rotary inverted pendulum.

Figure 5 :

 5 Figure 5: Rotary pendulum model.

.

  Simplifying the dynamics by choosing b p = b r = 0, the matrices of the linear systems are

λ 1 =

 1 -48.2522; λ 2 = -11.4050 + 0.4427i; λ 3 = -11.4050 -0.4427i; λ 4 = -1.8048.

Figure 6 :

 6 Figure 6: Conceptual scheme of the controller for the rotary inverted pendulum.

K 0 2 )Figure 7 :

 027 Figure 7: Comparison of the controllers in explicit, semi-implicit, and implicit for h = 0.002 in the case of stabilization at θ ref = 0.

Figure 8 :

 8 Figure 8: Comparison of the controllers in explicit, semi-implicit, and implicit for h = 0.002 in the case of sinusoidal reference.

Figure 9 :

 9 Figure 9: Comparison of the controllers in explicit, semi-implicit, and implicit for h = 0.002 in the case of step reference.

Table 1 :

 1 Parameters of the pendulum QUBE-Servo 2

	Parameter	Value
	mp	0.024 Kg
	Lp	0.129 m
	Jp	3.3 × 10 -5 Kg.m 2
	bp	0.0015 N.m.s/rad
	r	0.085 m
	Jr	5.7 × 10 -5 Kg.m 2
	br	0.0005 N.m.s/rad
	g	9.81 m/s 2

Here the word selection refers to the selection of the set-valued, or multivalued, right-hand side of a differential inclusion.

A dilation in R n is monotone if and only if for any x ∈ R n the function s → d(s)x is monotone increasing.

A matrix Q ∈ R n×n is said to be a Schur matrix if its spectral radius is less than 1.

Conflict of interest -none declared. This work was funded by the Agence Nationale de la Recherche, project DigitSlid ANR-18-CE40-0008-01.

where γ is as given in [START_REF] Polyakov | Generalized Homogeneity in Systems and Control[END_REF] above, σk is a virtual variable which allows us to make an approximate selection of the set-valued map M, and α > 0 is a constant gain to be tuned. The expression of the implicit discretization in (53a)-(53c) has been already developed and validated in [START_REF] Miranda-Villatoro | Set-valued sliding-mode control of uncertain linear systems: Continuous and discretetime analysis[END_REF]. The set of equations in (53b) (53c) is a generalized equation with unknown σk+1 , to be solved at each time-step. Let us show how its solution can be calculated explicitly.

In addition, N(•) is maximal monotone if its graph is not strictly contained in the graph of any other monotone map.

Two single-valued and Lipschitz continuous maps are associated with a maximal monotone mapping N(•), namely the resolvent and the Yosida approximation of N(•) of degree ρ > 0, which are defined respectively as

Roughly speaking, the Yosida approximation associated with N(•) is an approximate minimal-norm selection of N(•), in the sense that

with the particular property that Y ρ N (ϕ) → arg min θ∈N(ϕ) |θ| as ρ ↓ 0, whereas the resolvent satisfies R ρ N (ϕ) → ϕ as ρ ↓ 0, see, e.g., [START_REF] Aubin | Differential Inclusions. Set-Valued Maps and Viability Theory[END_REF]. For the scalar case, regarding the set-valued map M(•) in (53b), it is indeed maximal monotone as proved now.

Proposition 2

The set-valued map M : R ⇒ R in (53b) is maximal monotone.

Proof. It is clear that:

where sgn : R \ {0} → {-1, 1} is the classical signum map so that ϕ → -1 if ϕ < 0, and ϕ → 1 if ϕ > 0. Notice that sgn is undefined at ϕ = 0. A simple, although lengthy, case by case analysis shows that (54) holds everywhere, whereas maximality follows from the outer semicontinuity of M. Fig. 3 shows the graph of M, confirming the maximal monotonicity of the operator.

3)

Step reference:

. In all the experiments, the swing-up controller is active during approximately 3 s. Thus, a comparison of the algorithms' performances is made using the L 2 and L ∞ norms of both the input u and the tracking error e θ = θ -θ ref on the time interval [START_REF] Shtessel | Sliding Mode Control and Observation[END_REF][START_REF] Levant | On fixed and finite time stability in sliding mode control[END_REF] s. The average of three tests is considered for each result given below, to take into account the uncertainty of θ ± 0.02 rad.

Regulation

Figure 7 shows the time-trajectories for the explicit, the semi-implicit, and the implicit discretization of the three control strategies of Section 5. In each experiment, the nominal sampling time h = 0.002 sec. was used, together with the control parameters δ = 0.65, β = 1 for the explicit and semi-implicit SMC; ρ h = 50, β = 1 for implicit SMC; and δ = 0.75, β = 1 for the homogeneous controller. It can be appreciated that the regulated variable θ reaches a neighborhood of the reference θ ref = 0 in approximately 4 sec. In the implicit case, it is notable that the SMC is the only strategy presenting a very smooth stabilization after approximately 12 sec with a constant error in θ of approximately 0.02 rad. Additionally, chattering is successfully counteracted. This confirms once again previous results [START_REF] Huber | Recent Trends in Sliding Mode Control, ch. Experimental results on implicit and explicit time-discretization of equivalent control-based sliding mode control[END_REF][START_REF] Wang | Experimental comparisons between implicit and explicit implementations of discretetime sliding mode controllers: toward input and output chattering suppression[END_REF][START_REF] Huber | Implicit discrete-time twisting controller without numerical chattering: analysis and experimental results[END_REF] obtained on different systems (an electropneumatic system and an inverted pendulum on a cart).

Tracking

Although the original design was made for regulation, in this section the performance and robustness (against uncertainty in the exact sampling time) of the controllers was put into test in the more general setting of signal tracking. Tables 2 and3 show the performance of the three controllers for two different reference signals. For each case, the nominal sampling time h = 0.002 sec is set first. Afterwards, the experiment is repeated without changing the controller parameters but with a sampling time h = 0.008 sec. In all cases, the performance is evaluated using the L 2 and the L ∞ norms of the tracking error for the angle θ and the control input u during the stabilization stage, i.e., the norms are taken on the time interval [START_REF] Shtessel | Sliding Mode Control and Observation[END_REF][START_REF] Levant | On fixed and finite time stability in sliding mode control[END_REF]. In addition, following [START_REF] Huber | Recent Trends in Sliding Mode Control, ch. Experimental results on implicit and explicit time-discretization of equivalent control-based sliding mode control[END_REF][START_REF] Wang | Experimental comparisons between implicit and explicit implementations of discretetime sliding mode controllers: toward input and output chattering suppression[END_REF][START_REF] Huber | Implicit discrete-time twisting controller without numerical chattering: analysis and experimental results[END_REF], the nearest integer approximation of the total variation of the control input (denoted as Var(u) ), is computed as an estimate of the quality of the input signal. For a discrete-time signal u, the total variation during the interval [t k , t N ] is given by Var(u)

Thereby, control inputs with high variation undergo either chattering, or large overshoots/undershoots, or both. For the cases where there are neither over- explicitly discretized linear controller (provided by the manufacturer). Fig. 7 shows a comparison between the three controllers in the nominal condition and in the stabilization case. The given linear controller is already well tuned by the manufacturer specifically for the stabilization of the rotary inverted pendulum, so the improvement cannot be high in this case. Figure 7 is mainly aimed to confirm that there is no degradation of control quality after the upgrade. However, there is a minor improvement even in this case provided that nonlinear algorithms are properly discretized. Figures 8 and9 show a more evident performance's improvement.

Some general conclusions about the experiments:

• The linear controller has always the worst trajectory tracking performance.

In some scenarios an improvement of the tracking precision by nonlinear controllers is larger than 40%.

• The unit and homogeneous SMCs achieve comparable results in term of trajectory tracking, but the unit SMC presents less control effort. This