Smooth second-order sliding mode controller for multivariable mechanical systems

This paper proposes a smooth second-order sliding mode controller for a class of multi-input multi-output mechanical systems with uncertain parameters and external disturbances. Since the control law is smooth, the chattering effect that can occur with non-smooth controllers is reduced. Lyapunov-based theorems are used to prove global and finite-time convergence of the sliding mode controller. Numerical simulations are presented to illustrate the performance of the proposed controller by applying it first to a variable-length pendulum and then to a two-link robotic manipulator. For the robotic manipulator, a detailed comparison is given of the finite-time convergence and chattering properties of the proposed controller, a super-twisting controller and a super-twisting like controller. A new smooth second-order sliding mode controller is proposed for multivariable systems with uncertain parameters and external disturbances. Global finite-time convergence of the controller is proved using Lyapunov theory. Numerical simulations are used to show the performance of the controller on the variable-length pendulum and two-link robotic manipulator. A new smooth second-order sliding mode controller is proposed for multivariable systems with uncertain parameters and external disturbances. Global finite-time convergence of the controller is proved using Lyapunov theory. Numerical simulations are used to show the performance of the controller on the variable-length pendulum and two-link robotic manipulator.

Using the SMC, a suitable sliding surface is first defined and then a controller based on the signum function is designed to drive the system state to the defined sliding surface (see, e.g., [12,13]). However, the SMC can produce high-frequency amplitude oscillations (chattering) due to the discontinuous control signal. For mechanical systems, this chattering can cause vibration-induced fatigue. It also decreases the control performance and may cause instability of the control system. Thus, chattering should be avoided or reduced to a low level.
Higher-order sliding mode control (HOSMC) was introduced in [14,15] in an attempt to reduce the chattering problem while still maintaining the advantages of the conventional SMC. Twisting and super-twisting algorithms are two of the best-known HOSMC methods [16,17]. In HOSMC, the signum function acts on higher-order timederivatives of sliding variables, instead of only on the first time-derivative as in conventional SMC controllers. The HOSMC has also been claimed to provide better accuracy with respect to discrete sampling times. Recent detailed discussions and comparisons of HOSMC and conventional SMC have been given by Shtessel et al. [18] and Utkin and colleagues [19][20][21].
A number of different algorithms based on HOSMC have been developed to achieve finite-time stability in a variety of systems. An HOSMC approach for stabilizing nonholonomic perturbed systems has been presented in [22]. The results showed that the trajectory of the system converged in finite time. In [23], an optimal-control based HOSMC approach with finite-time convergence was proposed, and the approach was successfully applied to control electropneumatic actuators. In [24], a HOSMC scheme for uncertain nonlinear systems was proposed. By utilizing an integral sliding surface, robustness of the control scheme was ensured. However, this method has the main disadvantage that it depends on the initial condition of the system which usually cannot be known precisely. A geometric homogeneity based HOSMC was proposed in [25] for a chain of integrator systems. The controller yielded finite-time stability for the control system. A novel geometric homogeneity-based HOSMC was developed in [26] and successfully applied to a MIMO nonlinear system. A chattering-free terminal sliding mode control of an nthorder system was developed in [27]. This controller drives the system state to zero in finite time.
A smooth modified super twisting (MST) sliding mode scheme has been developed from a smooth second-order sliding mode control [28] by [29] by adding linear correction terms to improve the performance of the closed-loop system. The smooth MST was proved to have finite-time convergence by using strong Lyapunov design.
There have been a number of papers discussing applications of HOSMC to mechanical systems. For example, Chutiphon et al. [30] designed an HOSM controller for attitude tracking control of a spacecraft. Mondal and Mahanta [31] developed an adaptive second-order sliding mode controller for robotic manipulators. Guendouzi et al. [32] applied an HOSMC to a small-size autonomous helicopter. Finite-time controllers that guarantee finite-time convergence of the system states to a desired state have also been discussed recently in [33][34][35][36].
There have also been applications of smooth second-order sliding mode control (SOSMC) to a variety of mechanical systems. For example, Shtessel et al. [28] proposed a smooth SOSMC for a target performing evasive maneuvers to escape an interceptor missile and they proved the finite-time convergence of the method using a homogeneity based technique. Wang [37] proposed an adaptive smooth SOSMC and showed its application to missile guidance. Wang proved finite-time convergence of the adaptive smooth SOSMC by using a quadratic Lyapunov function. Yang et al. [38] proposed a fast smooth SOSMC for a class of stochastic systems with colored noise and proved finite-time convergence of the controller for a second-order nonlinear stochastic system by using stochastic Lyapunov techniques.
In this paper, we propose a new smooth SOSMC controller with the finite-time convergence property for multivariable mechanical systems in the presence of uncertain parameters and external disturbances. The controller is a smooth continuous controller with reduced chattering. The control law generalizes a sliding surface developed in [25], which is based on geometric homogeneity. The novelties of our work are as follows: 1. Standard SOSMC methods can include discontinuous first-order time derivatives of the sliding variables which can induce chattering in the controller. Our proposed smooth SOSMC includes continuous first-order time derivatives of the sliding variables and hence chattering is reduced. 2. The proposed multivariable smooth SOSMC algorithms are analyzed by using the Lyapunov-based ideas from Moreno and Osorio [39]. However, our analysis differs from that of Moreno and Osorio because we use a Lyapunov function containing state variables with an unknown fractional power to prove the finitetime stability of the controller.
of multivariable mechanical systems that we study in this paper are discussed. In Sect. 3, the second-order sliding surface used in this paper is described and the properties of the proposed finite-time smooth SOSMC law are analyzed. A Lypunov-based analysis is given to prove the global stability of the controller and finite-time stability of the system. In Sect. 4, results of numerical simulations are presented showing the finite-time convergence of the proposed controller for a variable-length pendulum [40] and for a two-link robotic manipulator [41]. For the manipulator, a detailed comparison is given of the behavior of the finite-time convergence and chattering properties of the proposed smooth SOSMC and the behavior of a super-twisting (STW) algorithm [16] and a super-twisting like (STL) algorithm [17]. Finally, Sects. 5 and 6 contain discussion and conclusions.

Lemmas and theorems
Theorem 1 (Lyapunov Theorem) (see, e.g., [42][43][44]). Consider the autonomous system where f ∶ D ⊂ ℜ n → ℜ n is continuous and f (0) = 0 . The equilibrium point 0 of system (1) is globally stable for all initial points x(0) ∈ D if there exists a continuously differentiable function V ∶ D → ℜ n , called a Lyapunov function, such that If, in addition, V (x) is negative definite in D , then the equilibrium point 0 is globally asymptotically stable for all initial points x(0) ∈ D. Lemma 1 ([45]) Consider a positive-definite function V(t), which satisfies the following differential inequality where and are two positive coefficients, and is a positive number with 0 < < 1 . Then, the function V(t) converges to zero in the finite time Theorem 2 [25] Consider the system where u is the input of the system given by and where sgn (⋅) is the signum function, the polynomial ( ) = n + a n n−1 + … + a 2 + a 1 is Hurwitz, and 1 , … , n Then, for system (4), there exists a value ∈ (0, 1) such that for every i ∈ (1 − , 1) , the origin of system (4) is a globally stable equilibrium in finite time under the input u in (5).

Mechanical system description
We consider a class of multivariable mechanical systems given by ( [47]) where ∈ ℜ n is a generalized coordinates vector, M( ) ∈ ℜ n×n is an inertia matrix, C( ,̇ ) ∈ ℜ n×n is the centrifugal-Coriolis matrix, g( ) ∈ ℜ n is the gravity force, D(t, ,̇ ) ∈ ℜ n is a disturbance, and ∈ ℜ n is a control torque. Here, D(t, ,̇ ) can consist of all kinds of disturbance factors, such as parameter uncertainty, unmodeled dynamics, external disturbance, etc. Denoting =̇ ∈ ℜ n , the system (7) can be written as , ) ∈ ℜ n and f = −M −1 (C( , ) + g( )) ∈ ℜ n can be seen respectively as the control input, the disturbance and the nonlinearity of system (8). Let the desired position d ∈ ℜ n and velocity d ∈ ℜ n satisfy the following system (4) where d ∈ ℜ n is a continuous function. We will define = − d ∈ ℜ n and = − d ∈ ℜ n as tracking errors. From (8) and (9), the error dynamics can be written as is the control and is a disturbance. We introduce the following notation for use in the next section. For a vector = [x 1 x 2 … x n ] T ∈ ℜ n and ∈ ℜ , we define where sgn is the signum function.

Main results
Our objective is to design a smooth SOSMC featuring finite-time convergence to deal with the class of multivariable mechanical systems given by (8). Specifically, a sliding surface and a control law will first be designed so that if the system is on the sliding surface, then the control law will keep the system on the sliding surface and drive the errors e and in (10) to a neighborhood of zero in finite time. Secondly, a control law is designed to drive the system into a neighborhood of the sliding surface in finite time.
For second-order sliding motion for an n-dimensional multi-input multi-output system, it is necessary to specify an equation for the time derivative of the sliding variable ̇ (t) = n , where n = [0 0 … 0] T ∈ ℜ n (see, e.g., [28]). The equation for the sliding variable is then obtained as the integral of the ̇ (t) = n equation. We propose the following sliding mode equations for a smooth SOSMC that will give finite-time control.
w h e r e sig( ) i s d e f i n e d i n E q . ( 1 1 ) , We now define a control vector 0 that will drive the system along the sliding surface to the zero state in finite time. From Eqs. (10) and (12) and setting the disturbance = , the equations of motion for the mechanical system errors on the sliding surface are given by and the definition of 0 is From Theorem 2, the finite-time convergence of (13) is guaranteed. Thus, if the system is on the sliding surface (disturbance = ), then the errors and in (13) will converge to zero in finite time and the control vector 0 required is given by (14). Next, we define a control vector s so that the combined control = 0 + s is a smooth SOSMC that will drive the mechanical system (10) subject to a disturbance ≠ n onto the sliding surface = n in finite time and then drive the errors on the sliding surface to a neighborhood of n in finite time.
We will prove in Theorem 3 that the following choice for s gives the required finite-time convergence.
where ∈ (0, 1) and Therefore, combining (14) and (15), we obtain the proposed smooth SOSMC control law as Note that the initial conditions (0) and ̇ (0) can be nonzero since we are assuming that the disturbances d and ̇ can initially be non-zero, i.e., the system is not initially on the sliding surface. For the disturbed system (10) and control (17), the time dependence of is given by where We now prove that the control law = 0 + s in (17) will drive the disturbed system (18) into a neigborhood of the sliding surface in finite time.  (17) and the positive gains h i , k i , n i and p i , (i = 1, 2, … , n) in (16) are chosen such that the conditions are satisfied, then the trajectory (t) in (18) converges to the neighborhood of zero in finite time.
Since the matrices H, K, N and P in (17) are assumed to be diagonal, the system of Eq. (20) can be considered independently for each component z i and i . Then, from (20), and using (11) and (16), we have We will first use a Lyapunov function to prove global convergence of the components z i , i to the neighborhood of the origin, and then prove finite-time convergence by proving that the conditions of Lemma 1 are satisfied for the Lyapunov function.
Let a Lyapunov candidate function be defined as where and It is clear that the functions V i are positive definite and have unique minima at (z i , i ) = (0, 0) . However, to prove finite-time convergence using Lemma 1 it is necessary to transform the V i into positive-definite matrix forms. Equations (23) and (24) can be written in the following matrix form as where (19) Further, the matrix i is positive definite since its principal minors are positive as shown below: Thus, the V i can be written in positive-definite matrix forms with unique minima V i (0) = 0 . Also, since i is positive definite, all eigenvalues of i are real and positive.
We now prove that the system (20) is globally asymptotically convergent by proving that the time derivatives of the V i are negative definite.
Taking the derivative of (23), we obtain Then, substituting (20) into (28), we have Therefore, by choosing the parameters h i , k i , n i and p i to satisfy the conditions in (19), the principal minors 13 > 0 and 33 > 0 , and hence R i is also positive definite. From Eq. (26)  The differential inequality in (42) is a special case of the differential inequality (2) in Lemma 1. Hence, if the matrices H, K, N and P are selected satisfying the conditions in (19), each component of the system (20)  Therefore, we have proved that the trajectory s(t) in (12) with the control law (17) will converge to the neighborhood of the sliding surface s in (12) in finite time. ◻ In this section, we have proved that the smooth SOSMC that we have proposed will drive a disturbed system given by Eqs. (9) and (10) into a neigborhood of the sliding surface s in (12) in finite time and then drive the system along the sliding surface to a desired trajectory ( d , d ) in finite time.

Simulation study
In this section, we illustrate the effectiveness of the proposed smooth SOSMC for finite-time control of mechanical systems. As a first simple example, we illusrate the effectiveness of the smooth SOSMC on the one-dimensional system of the variable-length pendulum [40] and compare its effectiveness with a super-twisting (STW) algorithm [16]. We then test the finite-time convergence and chattering properties of the smooth SOSMC on a multivariable system, namely the two-link robot manipulator [41], and compare its behavior with an STW algorithm [16] and a super-twisting like (STL) algorithm [17]. Since both the STW and STL controls are discontinuous, we have used Euler's method with step size 0.0001 to integrate the equations of motion for the smooth SOSMC, STW and STL methods. The step size of 0.0001 was selected to obtain reasonable accuracy in the numerical studies.

Numerical results for variable-length pendulum
We have carried out simulations on the variable-length pendulum shown in Fig. 1.
The equation of motion for the variable-length pendulum with disturbance R can be written as [40,48] where x is the oscillation angle (rad), g = 9.81m ⋅ s −2 is the acceleration due to gravity, m is the mass of the pendulum (kg), R is the distance (m) from the axis of rotation of the pendulum to the mass, and u is the control input ( N ⋅ m).
We then define the smooth second-order sliding surface as and then the control u in Eq. (46) is given by The equivalent control for the smooth SOSMC is then and the equivalent control for the supertwisting control STW is s = + ∫ (a|e| 1 sgn(e) + b| | 2 sgn( ))dt = 0, s =̇+ a|e| 1 sgn(e) + b| | 2 sgn( )) = 0,  It can be seen that the main differences between the two controllers are that the STW has a fixed fractional power of 1/2, whereas the SOSMC has a variable fractional power and it also includes linear terms ks and ps, i.e., the STW is a special case of the SOSMC and corresponds to a choice of = 0 , k = 0 , p = 0 in the SOSMC.
For both the SOSMC and STW control, the parameter values assumed for the control u in Eq.    Table 1 for the SOSMC and STW. The values for a, b, 1 and 2 were chosen to satisfy the conditions in Theorem 2 and the values for h, k, and ∈ (0, 1) were selected to have reasonable values. Finally, the values for n and p in Eq. (50) were defined as to satisfy the conditions (19) in Theorem 3.
Comparisons of the results from the smooth SOSMC for the values of = 0.3, 0.8 and for the STW are shown in Figs. 2 and 3. As noted above, the STW corresponds to a choice of = 0 , k = 0 , p = 0 in the SOSMC. It can be seen that both the smooth SOSMC and the STW give fast finitetime convergence to the desired states with the order of convergence being SOSMC with = 0.8 , SOSMC with = 0.3 and STW. In addition, the STW has a larger overshoot in oscillation angle than the SOSMC.

Two-link robotic manipulator
We have carried out numerical simulations for the multivariable system of the two-link robotic manipulator shown in Fig. 4.
From [41], the Lagrangian equations of motion for the manipulator can be written in the form of (7) as where q = [q 1 q 2 ] T denotes the vector of joint positions (rad), q = [q 1q2 ] T is the vector of joint velocities ( rad ⋅ s −1 ), is the gravitational force vector ( N ⋅ m ) and D(t, q,q) is the disturbance vector ( N ⋅ m).
The meanings of the physical parameters of the manipulator and the values used in the simulations are summarized in Table 2.
The inertia matrix for the manipulator in (54) is where The centrifugal-Coriolis matrix is where (54) M(q)q + C(q,q)q + g(q) + D(t, q,q) = ,   where D 1 and D 2 are assumed to satisfy Assumption 1.

Numerical results for the two-link robot manipulator
We assumed that the desired trajectories q d1 (t) , q d2 (t) and the disturbances D 1 , D 2 were given by The initial conditions of the manipulator were set as q 1 (0) = q 2 (0) = 0 rad and v 1 (0) = v 2 (0) = 0 rad ⋅ s −1 . The initial conditions for the sliding vector components were assumed to be s 1 (0) = 10 and s 2 (0) = −10 . It was also assumed that the initial conditions for 1 (t) and 2 (t) were The values assumed for the parameters in the control law (61) are summarized in Table 3. The values for a 1 = a 2 , b 1 = b 2 and 1 were chosen to satisfy the conditions in Theorem 2 and the values for h 1 = h 2 , k 1 = k 2 , and ∈ (0, 1) were selected to have reasonable values. Finally, the values for n 1 = n 2 and p 1 = p 2 were defined as to satisfy the conditions (19) in Theorem 3.
Plots of the results obtained from the numerical simulations are shown in Figs. 5, 6 and 7. Figure 5a and b show the trajectories of q 1 and q 2 and the desired trajectories q d1 and q d2 and Fig. 6a and b show the velocities and the desired velocities of the two joints. It can be seen that the controller forces the trajectories into a neighborhood of the desired trajectories in less than 2 s. The time histories of the control torques are shown in Fig. 7a. It can be seen that the controls rapidly converge to an oscillatory behavior which keeps the actual trajectories of q 1 and q 2 close to the desired trajectories q d1 and q d2 . The convergence of the sliding surface variables s 1 and s 2 are shown in Fig. 7b. It can be seen that the variables initially oscillate and then converge to a neighborhood of zero, i.e., to a neighborhood of the sliding surface, in approximately 4 s.

Comparison of SOSMC with super-twisting (STW) and super-twisting like (STL) algorithms for two-link robot manipulator
In this section, we compare the performance of our smooth SOSMC algorithm with the performance of the STW algorithm of [16] and the STL algorithm of [17]. In the comparisons, we will assume that the sliding mode Eq. (12) and the sliding mode controller u 0 in (14) are the same in the SOSMC, STW and STL comparisons and compare the effects of changing the smooth SOSMC controller u s in (15) to the equivalent STW and STL controllers. In the STW of [16], the equivalent control vector components (u s1 , u s2 ) are and in the STL of [17], the corresponding control vector components (u s1 , u s2 ) are The values of the parameters that we have used for the STW and STL controls are shown in Table 5.
We have found that the numerical simulations for STW and STL also show rapid finite-time convergence to neighborhoods of the desired trajectories within approximately three seconds with the main differences between the three methods occurring in the initial period of 3 s. Comparisons of the SOSMC results with the STW and STL results are shown for the first 3 s in Figs. 8, 9, 10 and 11. It can be seen that the trajectories for the three algorithms all converge to the desired trajectories in less than 2 s. Although not shown in this paper, the graphs for the period from 3 to 20 s for the STW and STL algorithms are the same as the graphs for SOSMC in Figs. 5, 6 and 7. A more detailed picture of the behavior of the torques in the convergence region are shown for the three algorithms in Fig. 12. It can be seen that the torque for STL algorithm shows a much higher level of chattering than the torque for the STW algorithm and that the torque for the SOSMC algorithm shows virtually no chattering.

Discussion
Because of their practical importance, many methods have been developed to control electrical and mechanical systems with uncertain parameters and external disturbances. These methods include nonlinear adaptive control [49], model predictive control [50], adaptive backstepping control [51] and, of course, sliding mode control. In general, as explained by Boutalbi et al. [52], the control methods can be divided into two main classes, namely, adaptive control and robust control. In adaptive control, one of the main aims is to design the controller to estimate the uncertain system parameters of the dynamical system and then to follow some specified desired dynamics. In robust control, which includes sliding mode control, the aim is to develop a simple fixed controller that yields acceptable performance for bounded disturbances.
Because of the importance of robotic manipulators, many papers have been published in recent years giving the application of various control methods to the control of these systems. These methods include proportional-derivative control [53], adaptive control [52], and integral-type saturated sliding mode control [54]. The main features of these papers are as follows.
The controller of Cruz-Zavala et al. [53] is a finite-time nonlinear scheme that includes a proportional-derivative nonlinear feedback and a feed-forward compensation term. The stability of the robot manipulators was proved for three cases (i) Finite-time trajectory-tracking without model uncertainties and perturbations, (ii) finite-time trajectory-tracking with uncertainties and without perturbations, and (iii) finite-time trajectory-tracking with model uncertainty and perturbations. In each case, the controller was proved to be globally finite-time stable by using Lyapunov theory.
In the adaptive controller of Boutalbi et al. [52], the values of the parameters of the manipulator were estimated for both bounded and unbounded parameters. The finitetime stability of the controller was proved using Lyapunov theory and the weighted homogeneity principle for unknown model parameters and external disturbances.
In the integral-type saturated sliding mode controller of Guo et al. [54], the sliding surface and sliding mode controller was defined in terms of saturating functions rather than the signum functions used in our controller. They proved the reachability of the sliding surface, the finitetime convergence of the state system and the boundedness of the controller using Lyapunov-based methods.
In the present paper, we have proposed a smooth second-order sliding mode control scheme with the aim of finite-time convergence and reduced chattering for a system with bounds on the values of uncertain parameters and external disturbances and we have shown the application of the controller to the variable-length pendulum and a twolink robotic manipulator. The main differences between our paper and the papers mentioned above are that, as with sliding mode controllers, the disturbances are assumed to be bounded and no attempt is made to estimate values of uncertain parameters of the dynamical system.

Conclusions
In this paper, we have developed a smooth second-order sliding mode controller (SOSMC) for finite-time control of a class of multi-input multi-output mechanical systems with uncertain parameters and external disturbances. Our proposed sliding surface is based on an integral form and chosen such that the error states converge to the origin in finite time. Since our smooth SOSMC includes continuous first-order time derivatives of the sliding variables, the chattering that can occur with standard sliding mode controllers is reduced. By utilizing a Lyapunov-based method, we have proved that the controller drives a disturbed state of a representative mechanical system to the sliding surface in finite time and then drives the system along the sliding surface to a desired state in finite time.
Numerical simulations have been carried out for a variable-length pendulum and a two-link robotic manipulator to illustrate the effectiveness of the proposed controller. We have compared the effectiveness of the smooth SOSMC for the manipulator with the effectiveness of a super-twisting (STW) controller [16] and a super-twisting like (STL) controller [17] by setting the parameter values of our controller with the same structure as the STW and the STL controllers. The numerical results show that all three controllers give fast finite-time convergence to a neighborhood of a desired trajectory and that the SOSMC has the lowest level of chattering. As noted in subsection 4.1, the main differences between the SOSMC and STW controllers are that the STW controller has a fixed fractional power of 1/2, whereas the SOSMC has a variable fractional power and it also includes linear terms ks and ps. Also, the STW and STL both include a term in Eqs. (51), (71) and (72) for ̇= −ksgn(s) which gives a discontinuity in the first derivative of the control. The equivalent SOSMC formula in Eqs. (50) and (61) is ̇= −n|s| sgn(s) − ps which gives a continuous first derivative in the control. First component of control torque Data availability Data sharing is not applicable to this article as no datasets were generated or analyzed during the current study.
Code availability All computer code used is available from the corresponding author.

Conflict of interest
The authors declare that they have no conflict of interest.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.