Acta Polytechnica https://doi.org/10.14311/AP.2021.61.0350 Acta Polytechnica 61(2):350–363, 2021 © 2021 The Author(s). Licensed under a CC-BY 4.0 licence Published by the Czech Technical University in Prague ADAPTIVE WAVELETS SLIDING MODE CONTROL FOR A CLASS OF SECOND ORDER UNDERACTUATED MECHANICAL SYSTEMS Fares Nafaa, ∗, Aimad Boudoudaa, Billel Smaanib a Boumerdes university, Faculté de Technologie, Laboratoire d’Ingénierie des Sytémes et des Telecommunication, Cité FranzFanon, Boumerdes, Algeria b Laboratoire Hyperfréquences et Semiconducteurs Constantine 1 university, B.P. 325 Route Ain El Bey, Constantine, Algeria ∗ corresponding author: f.nafa@univ-boumerdes.dz Abstract. The control of underactuated mechanical systems (UMS) remains an attracting field where researchers can develop their control algorithms. To this date, various linear and nonlinear control techniques using classical and intelligent methods have been published in literature. In this work, an adaptive controller using sliding mode control (SMC) and wavelets network (WN) is proposed for a class of second-order UMS with two degrees of freedom (DOF). This adaptive control strategy takes advantage of both sliding mode control and wavelet properties. In the main result, we consider the case of un-modeled dynamics of the above-mentioned UMS, and we introduce a wavelets network to design an adaptive controller based on the SMC. The update algorithms are directly extracted by using the gradient descent method and conditions are then settled to achieve the required convergence performance. The efficacy of the proposed adaptive approach is demonstrated through an application to the pendubot. Keywords: Adaptive, gradient descent, pendubot, sliding mode control, wavelets. 1. Introduction 1.1. Motivation: A literature review Challenging control strategies for underactuated mechanical systems (UMS) are still relevant for researchers and remain a major open field. Those systems have fewer control inputs than degrees of freedom (DOF) and often arise from nonholonomic systems with non-integrable constraints: first and/or second-order nonholonomic constraints [1]. Since decades, many applications include this class of mechanical systems in different fields, such as robotics [1, 2], aeronautical [3] , spatial systems, marine and underwater systems [4], and flexible and mobile systems [1]. In particular, the set of UMS examples includes inverted pendulum, double inverted pendulum, acrobot, pendubot, beam and ball system, TORA system, underactuated surface vessels, underactuated aerial vehicles,... etc. Having fewer actuators than degrees of freedom gives a lot of advantage for the UMS, namely: reduction of weight, saving cost by reduction of the number of actuators and then the consumed energy. In addition, a fully actuated system can become underactuated in case of a breakdown, and then the control strategies for the UMS can be used as a rescue plan for the control of fully actuated systems. Recently, there have been extensive and remarkable research efforts in the control of the UMS and several classifications and papers have been presented including modelling, stability and controllability issues [5–12]. Indeed, an overview of control strategies shows the use of both linear and nonlinear algorithms. Linear controllers such as in [13] use a robust LQR-based ANFIS (Adaptive neuro fuzzy inference system), and [14] involves the Jacobian linearization method to extract a linear quadratic regulator and hybrid PID with LQR. For nonlinear approaches, a feedback linearization controller has been proposed by [15] to control the inertia wheel pendulum, [16] for TORA system and [17] to control the inverted pendulum. However, the SMC is still the most important nonlinear strategy that many works have used [7, 9, 18, 19]. Indeed, using the SMC for the UMS remains the most important perspective because of its robust performance against disturbances and uncertainties. This appropriate robust approach is designed by using a systematic scheme based on a sliding surface and Lyapunov stability theorem [20]. Also, other variants of the SMC strategy have been introduced such as SMC with an integral sliding function as in [21] for a stabilization of an underactuated unicycle, and second order sliding mode control such as [22] for the control of a class of second-order UMS. The common idea for those works is to build a hierarchy of sliding surfaces and combine them according to some conditions to guarantee the stability and convergence. 350 https://doi.org/10.14311/AP.2021.61.0350 https://creativecommons.org/licenses/by/4.0/ https://www.cvut.cz/en vol. 61 no. 2/2021 Adaptive wavelets sliding mode control. . . Although these control strategies are widely used for nonlinear systems and, in particular, for the UMS, the nonlinearities of the control plants and the difficulties to extract accurate models make the implementation of the model-based control strategies difficult, and therefore adaptive techniques become inevitable [23, 24]. In recent control research works, developers have merged various techniques from the approximation theory with the adaptive nonlinear controllers to enhance the adaptive capability while ensuring the stability and convergence. Particularly, the UMS remains a challenging class of coupled nonlinear systems and the problem of adaptive control of the UMS presents more difficulties because of the coupling that exists between the control input and the outputs. In literature, the main trends of adaptive controllers are Fuzzy logic and neural networks with the combination of a nonlinear control, such as optimal control and SMC [7, 9, 10, 25, 26]. Besides, in these presented works focused on adaptive controllers for the UMS, the adaptation laws are indirectly adjusted by using the Lyapunov approach, i.e., the learning laws are extracted to guarantee the convergence of the Lyapunov function. For an efficient adaptation, it is more judicious to directly extract the parameters adaptation laws from the identification error between the unknown function and its adaptive approximation [26, 27]. In fact, optimization algorithms offer the advantage to find the parameters that directly minimize any truncation error by following some specific update rules. The gradient descent algorithm can be a good alternative to reach this objective. Nowadays, wavelets theory was successfully applied to multi-scale analysis and synthesis, time-frequency signal analysis in signal processing as well as in nonlinear control system design [28]. By definition, a wavelet network is a one-layer network consisting of orthonormal “father wavelets” and “mother wavelets” and widely used as a kind of building blocks for the approximation of unknown functions [28, 29]. It was proven that a wavelet network is a universal approximator that can approximate any function with an arbitrary degree of accuracy by a linear combination of father and mother wavelets [29–31]. Besides, adaptive wavelets networks are especially well suited for such function approximation tasks and the problem of adaptation to an unknown dynamics [29]. Moreover, the WN has been a subject of application for nonlinear systems [32–35]. Nevertheless, in recent works, the WN was rarely applied on the UMS, and this opens an interesting trend of application. 1.2. Contributions From the aforementioned background, the main contributions of this paper are emphasized as follows: (1.) The design of a new sliding mode controller for second-order UMS with two degrees of freedom. Indeed,by exploiting the characteristics of the UMS dynamics, we have adapted the sliding surfaces to make the control law more flexible to eliminate the existing coupling between the input and the output, and to guarantee the performance of the convergence and stability of the closed-loop system. (2.) Based on the wavelets network and SMC approach, an adaptive control scheme is designed to overcome some difficulties related to nonlinearities and model inaccuracy of the UMS. This approach combines the approximation properties of wavelets network and the robustness of the SMC. (3.) The adjustable parameters of the wavelet networks are updated using a gradient descent algorithm by minimizing the truncation error between the existing unknown ideal sliding mode controller and the adaptive one. 1.3. Outlines of the paper The following parts of the paper are organized as follows: preliminaries about UMS and the problem formulation are explained in section 2. Section 3 is devoted to present the proposed SMC strategy with the adequate stability analysis. The adaptive control algorithm, which is developed according to the results of the previous section, is presented in section 4. All through these sections, a stability analysis is analytically proved by using the Lyapunov theory and Barbalat’s lemma. In section 5, the developed control strategies are applied on an illustrative example: the pendubot system. At the end, we wrap up the paper with a conclusion in section 6. 2. Preliminaries and problem formulation The dynamics of an underactuated system with two DOF can be written in a compact form as [36]:[ m11(q) m12(q) m21(q) m22(q) ][ q̈1 q̈2 ] + [ h1(q, q̇) h2(q, q̇) ] = [ 0 u ] (1) with q = [q1,q2] T , q1 and q2, being the generalized coordinates, u the control input, mij the inertia matrix elements and hi contains Coriolis, centrifugal and gravity terms. It has been shown that such systems can be 351 F. Nafa, A. Boudouda, B. Smaani Acta Polytechnica given according to the following dynamics [36]: ẋ1 (t) = x2 (t) ẋ2 (t) = f1 (x) + b1 (x) u (t) (2) ẋ3 (t) = x4 (t) ẋ4 (t) = f2 (x) + b2 (x) u (t) where x = (x1 (t) ,x2 (t) ,x3 (t) ,x4 (t)) is the state variable vector, representing the vector q = [q1, q̇1,q2, q̇2] T , u (t) the control input, f1 (x), f2 (x), b1 (x) and b2 (x) are nonlinear functions. Throughout this work, we will consider the following assumptions: (1.) Assumption 1. The state vector x is measurable. (2.) Assumption 2. The control gains bi (x) (i = 1, 2) are finite, nonzero, and of known sign for all states of x. It is assumed that the sign of bi (x) does not change; and without a loss of generality, this sign can be taken as positive. In addition, those functions are bounded, i.e.: 0 ≤ bmin ≤ bi (x) ≤ bmax. The system (2) can be viewed as two subsystems with a second-order canonical form including the states (x1,x2) and (x3,x4) for which we define the following pair of sliding surfaces: S1 = ẋ1 + λ1x̃1 = x2 + λ1x̃1. S2 = ẋ3 + λ2x̃3 = x4 + λ2x̃3. (3) where x̃1 = x1 −x1d, x̃3 = x3 −x3d (x1d and x3d are constant desired values), λ1 and λ2 are positive constants. The time derivatives of both equations in (3) are given as follows: Ṡ1 = f1 + b1u + λ1x2. Ṡ2 = f2 + b2u + λ2x4. (4) If fi and bi are known, then we can obtain the equivalent control laws of each sub-system such as: ueq1 = b −1 1 (f1 + λ1x2). (5) ueq2 = b −1 2 (f2 + λ2x4). (6) The control objective is to stabilize the whole system and to force the outputs x1 and x3 to follow their desired values x1d and x3d. However, using (5) or (6) ensures only the stabilization of the resultant subsystem. For such challenging systems, we need to design a total control law able to simultaneously attract both subsystems to their desired values and to guarantee the overall stability. This will be the aim of the next section. 3. Sliding mode controller design By using the second equation of (4) and (6) , it is easy to find that: u = 1 b2 Ṡ2 + ueq2. (7) Substituting (7) into the first equation of (4) yields: Ṡ1 = B21Ṡ2 + ∆21. (8) where: B21 = b1 b2 and ∆21 = b1(ueq2 −ueq1 ). (9) Similarly, from (4) and (6)one can have: Ṡ2 = B12Ṡ1 + ∆12. (10) with: B12 = b2 b1 and ∆12 = b2(ueq1 −ueq2 ). (11) If the dynamics (8) of S1 is driven so that: Ṡ1 = −βṠ2 −Ksgn (S2) −QS2 −kssgn(S2 + αsgn (S1)). (12) 352 vol. 61 no. 2/2021 Adaptive wavelets sliding mode control. . . with α, β, K, ks, Q being positive constants and 0 < α < 1; then, by combining (10) and (12) we get: Ṡ2 = − Ksgn (S2) + QS2 + kssgn(S2 + αsgn (S1)) + ∆21 (β + B21) . (13) In order to show that this new resulting dynamics form yields the stability and the convergence of the whole system, we consider the following Lyapunov function: V = 1 2 S22. (14) Then, the time derivative of (14) is obtained as follows: V̇ = S2Ṡ2. (15) By replacing (13) in (15), we get: V̇ = −S2 (Ksgn (S2) + QS2 + kssgn(S2 + αsgn (S1)) + ∆21) (β + B21) . (16) If we choose: β = βm + bmax/bmin, and K = Km + ks + max|∆21|. (17) with βm > 0 and Km > 0 ; then (16) can be rewritten as: V̇ ≤−βm−1Km|S2|−βm−1QS22. (18) According to SMC properties, (18) guarantees that an ideal sliding motion takes place from any initial conditions when the dynamics reach the sliding surface [37]. Clearly, (18) shows that S2 is bounded and goes to zero as t →∞ and its dynamics satisfies Ṡ2 ≈ 0. As a result, (13) gives: Ṡ1 → −kssgn(αsgn(S1)) →−kssgn(S1), and this easily proves the stability and the convergence of S1 to zero as t →∞. Therefore, by recalling the second equation of (4) and (13), the control signal will have the following expression: u = −B−1[[Ksgn (S2) + QS2 + kssgn(S2 + αsgn (S1))] − (b1ueq1 + βb2ueq2 )]. (19) where: B = (b1 + βb2). 3.1. Proposition-1 Consider a class of underactuated mechanical systems with two DOF given by (2), which satisfy assumptions 1 and 2, and design the sliding surfaces (3). The designed control law (19) satisfying the condition (17) ensures all signals in the closed-loop system will be bounded and the sliding surfaces will converge to zero asymptotically. 4. Adaptive wavelets sliding mode controller (AWSMC) 4.1. Wavelets network overview A wavelets network is a type of building blocks for function approximation, developed based on the concept of the multiresolution approximation. The building block is formed by shifting and dilating the basis functions: mother wavelet ψ and father wavelet φ. A multiresolution analysis was proposed in [28], which provides a mathematical tool to describe the “increment in information” from a coarse approximation to a higher resolution approximation. The multiresolution analysis consists of a sequence of successive approximation spaces Vj ∈ L2 (R)which satisfies: ... ⊂ V−2 ⊂ V−1 ⊂ V0 ⊂ V1 ⊂ V2 ⊂ ... , ⋂ m∈Z Vm = {0} and ⋃ m∈Z Vm = L 2 (R), with: g (x) ∈ Vj ⇔ g(2x) ∈ Vj+1 g (x) ∈ Vj ⇒ g(x− 2−jk) ∈ Vj,k ∈ Z; Vj = span{φj,k,k ∈ Z} (20) 353 F. Nafa, A. Boudouda, B. Smaani Acta Polytechnica where Z is the set of all integers, φj,k (x) = 2j/2φ ( 2jx−k ) and φj,k ∈ Vm. φj,k is an orthonormal basis of Vj which is called scaling function (or father wavelet). For every j ∈ Z, Wj is defined to be the orthogonal complement of Vj in Vj+1. At every resolution j: Vj+1 = Vj ⊕Wj Wj⊥Wi, if : i 6= j Wj ⊂ Vi, if : i > j Wj = span{ψj,k,k ∈ Z} (21) where ψj,k (x) = 2j/2ψ ( 2jx−k ) and ψj,k ∈ Wj. ψj,k is an orthonormal basis of Wj and is called mother wavelet [28, 30]. A function g(x), such as : g(x) ∈ L2(R), can be approximated in the space Vj as follows: g (x) = gj (x) + e (j) = Nj∑ k=1 〈 φj,k (x) ,g (x) 〉 φj,k (x) + e (j) . (22) where gj (x) is the projection of g on the space Vj, < .,. > is the inner product in L2, e(j) is the approximation error at the jth resolution, and Nj is the number of the basis functions used at the jth resolution. Note that a larger j means a higher resolution, which contains a lower resolution Vj−1 and the complement space Wj−1. Therefore, as j →∞, Vj−1 tends to be L2 and limj→∞|e(j)| = 0 and from multiresolution property of wavelet, we have |e(j + 1)| < |e(j)|[28]. It is important to note that all wavelets satisfy multiresolution and orthonormal properties, and hence the choice of the wavelets will not affect the approximation results [28]. Next, we will explore the above mentioned approximation’s properties to design an adaptive controller by approximating the unknown ideal controller (19). 4.2. Adaptive controller design For the adaptive control purpose, we assume now that the nonlinear functions f1 (x), f2 (x), b1 (x), and b2 (x) are unknown and only the state vector x is available for measurement. In addition, we keep all terms of the assumption 2 regarding the control gain bi(x). We construct the aforementioned ideal input control (19) by using a wavelet network in the form of (22). Thus, the general form of this ideal controller u∗(x) can be expressed as: u∗ (x) = u∗J (x) + eu(J) = Nj∑ k=1 v∗J,kφJ,k (x) + ∑ j≥J,k∈Z w∗j,kψj,k (x) (23) where J is the coarse resolution. It is worth noticing that using wavelets networks to approximate the ideal controller requires a guarantee of the input vector x in a compact region [38, 39]. In practical applications, it is required to assign a very large compact set to avoid a violation of this requirement. However, a very large wavelet basis is needed in this situation and this may result in a high computational complexity. Fortunately, in many physical systems, such as mechanical and electrical systems, an appropriate selection of the pre-assigned compact set can be obtained via the knowledge of some physical limitations [39]. Accordingly, in order to meet the control requirements, we assume the existence of a finite unknown integer Jc such that the desired approximation performance can be met at this resolution, and hence (23) becomes as follows: u∗(x) = (v∗J) TφJ,k(x) + Jc∑ j=J (w∗j ) Tψj,k (x) . (24) In addition, we will use a weighting vector c such that the wavelets bases become: φJ,k(cTx) and ψj,k(cTx) [36]. Also, we introduce an additional adaptation so that (24) will have the following form: u∗(x) = (v∗J) TφJ,k(c Tx) + Jc∑ j=J ξ(∆e)(w∗j ) Tψj,k(c Tx). (25) where ∆e is the performance evaluation given by ∆e = S21 + S22 , ξ(∆e) = η(1 −e − ∆2e w2 ), [ω η] ∈ R∗2, while v∗J and w ∗ j represent the ideal approximation parameters. 354 vol. 61 no. 2/2021 Adaptive wavelets sliding mode control. . . Therefore, the estimate value of the unknown ideal controller u∗(x) can be given as: u(x) = (vJ)TφJ,k(c Tx) + Jc∑ j=J ξ(∆e)(wj,k)Tψj,k(c Tx). (26) Now, we define the approximation error between both controllers u∗(x) andu(x) such as: eJ = u(x) −u∗(x). (27) Thus, by using (25) and (26), it is easy to find the following expression of eJ: eJ = (ṽJ)TφJ,k(c Tx) + Jc∑ j=J ξ(∆e)(w̃j)Tψj,k ( cTx ) . (28) where ṽJ = vJ − v∗J and w̃j = wj − w ∗ j. Recalling that u = u∗ + (u−u∗), then (4) becomes: Ṡ1 = f1 + b1u∗ + b1eJ + λ1x2. Ṡ2 = f2 + b2u∗ + b2eJ + λ2x4. (29) Thus, we can calculate the following expression: Ṡ1 + βṠ2 =(f1 + λ1x2) + β(f2 + λ2x4) + (b1 + βb2)u∗ + (b1 + βb2)eJ. (30) Plugging the value of u∗ (19) into (30) gives: Ṡ1 + βṠ2 =−Ksgn (S2) −QS2 −kssgn(S2 + αsgn (S1)) + BeJ. (31) In the next step, we define a quadratic cost function that measures the discrepancy between the ideal and the actual wavelet controller. Such a function can be defined as: I = B 2  (vJ)TφJ,k(y) + Jc∑ j=J ξ(∆e)(wj)Tψj,k(y) −u ∗  2 (32) where y = cTx. Then, we use the gradient descent method to minimize the cost function (32) with respect to the adjustable parameters vJ and wj . Then, by applying the gradient method [40], the minimizing trajectories vJ(t) and wj(t) are given by the following equations: v̇J = −Γv5v(I). ẇj = −Γw5w(I). (33) with: 5v(I) = ∂I(v, w) ∂v = φJ,k(y)BeJ. (34) 5w(I) = ∂I ∂w = ψj,k(y)BeJ. (35) Finally, we obtain the following form of the gradient descent algorithm: v̇J = −ΓvφJ,k(y)BeJ. (36) ẇj = −Γwψj,k(y)BeJ. (37) However, the adaptive laws (36) and (37) cannot be calculated because both B and eJ are unavailable. Thus, we will use (31) to overcome this parameter unavailability, that is: BeJ = βṠ2 + Ṡ1+Ksgn (S2) + QS2 + kssgn(S2 + αsgn (S1)). (38) Consequently, (36) and (37) become: v̇J = −ΓvφJ,k(y)[βṠ2 + Ṡ1+Ksgn (S2) + QS2 +kssgn (S2 + αsgn (S1))]. (39) ẇj = −Γwψj,k(y)[βṠ2 + Ṡ1+Ksgn (S2) + QS2 +kssgn (S2 + αsgn (S1))]. (40) The second main result of this paper is resumed in the following proposition. 355 F. Nafa, A. Boudouda, B. Smaani Acta Polytechnica 4.3. Proposition-2 Let assumptions 1 and 2 be satisfied for a class of the UMS (2) driven by the controller (26). If the condition (17) holds with the adaptation parameter laws (39) and (40) where Γv and Γw are positive definite constants, all signals in the closed-loop system will be bounded and the sliding surfaces given by (3) will converge to zero asymptotically. 4.4. Proof In order to study the stability of the whole system, we define the following Lyapunov function V : V = 1 2  βS22 + ṽTJ Γv−1ṽJ + Jc∑ j=J w̃Tj Γw −1w̃j   (41) The time derivative of V along the dynamics (4), (39) and (40) is then given by: V̇ =βS2Ṡ2 + ṽTJ Γv −1v̇J + Jc∑ j=J w̃Tj Γw −1ẇj =βS2(f2 + b2u∗ + b2eJ + λ2x4) − ṽTJ φJ,k(y)BeJ − Jc∑ j=J w̃Tj ξ(∆e)ψj,k(y)BeJ. = −S2(β + B21)−1(Ksgn (S2) + QS2 + kssgn(S2 + αsgn (S1)) + ∆21) + βb2eJS2 −Be2J (42) Invoking the condition (19), the expression in (42) becomes: V̇ ≤−β−1m Km|S2|−β −1 m QS 2 2 + βb2eJS2 −Be 2 J (43) By using the following inequality: βb2eJS2 ≤ 1 2 βb2e 2 J + 1 2 βb2S 2 2. (44) we can rewrite (43) as : V̇ ≤−Km|S2|−β−1m QS 2 2 + 1 2 βb2S 2 2 + 1 2 βb2e 2 J −Be 2 J. (45) In addition, since B = βb2 + b1, a straightforward calculation of (45) gives: V̇ ≤−Km|S2|− ( β−1m Q−β 1 2 b2 ) S22 − ( 1 2 βb2 + b1 ) e2J. (46) Hence, provided that Q ≥ 12bmaxβ 2, the expression in (46) can be upper-bounded as: V̇ ≤−Km|S2|− ( 1 2 βb2 + b1 ) e2J ≤ 0. (47) This guarantees that S2, ṽJ and w̃j are bounded. Furthermore, by using Barbalat’s Lemma, the sliding surface S2 and the error eJ converge to zero as t →∞ and the the dynamics of S2 is given by Ṡ2 ≈ 0. By assuming that the adaptation process converges and eJ is very small, it is obvious that the convergence of S2 to zero as t →∞ gives the following from (31): Ṡ1 = −kssgn(αsgn (S1)) + BeJ. (48) Then, we infer from (48) that for: ks = ke + max(BeJ). (49) where ke > 0, one can obtain: Ṡ1 →−kesgn(αsgn(S1)) →−kesgn(S1) (50) This clearly shows that S1 converges to zero as t →∞. 356 vol. 61 no. 2/2021 Adaptive wavelets sliding mode control. . . Figure 1. Block diagram of the AWSMC algorithm 4.5. Remarks (1.) The derivatives of S1 and S2 are not available, we can predict a discrete implementable version. Indeed, the time derivative of the function vJ can be given as: v̇J = vJ(t) − vJ(t− ∆t) ∆t (51) where ∆t is a small positive constant, which is assumed small enough. Thus, the discrete implementable version of (39) and (40) can be obtained as: vJ(t) =vJ(t− ∆t) − ΓvφJ(y)[(β(S2(t) + S1(t) − 2∑ i=1 Si(t− ∆t)) + ∆t(Ksgn(S2(t)) + QS2(t) + kssgn(S2(t) + αsgn(S1(t)))]. (52) wj(t) =wj(t− ∆t) − Γwψj(y)[(β(S2(t) + S1(t) − 2∑ i=1 Si(t− ∆t)) + ∆t(Ksgn(S2(t)) + QS2(t) + kssgn(S2(t) + αsgn(S1(t)))]. (53) (2.) In order to remedy the control discontinuity in the boundary layer, the sign function throughout this paper is replaced by a saturation function defined for θ > 0 as: sat(x) = { sgn ( x θ ) , if|x| ≥ θ x θ , if|x| < θ (54) 5. Simulation and results In this section, we applied the AWSMC on the Pendubot system depicted in Figure 2. This two-link robot has an actuated joint mounted at the beginning of the first arm (arm 1) to which another arm (arm 2) is connected. Such system presents four equilibrium positions: down-down (−π2 , 0, 0, 0), down-up(−π2 , 0,π, 0), up-down( π 2 , 0,π, 0), and up-up ( π 2 , 0, 0, 0). Both down-up and up-up are unstable positions while down-down and up-down are stable [1, 41]. The control challenge is to maintain and stabilize the pendubot on one of its unstable equilibrium positions. The main mechanical parameters of the pendubot are listed in Table 1. Recalling the Lagrange-Euler principle, the dynamics of this system are given by (55) (see Appendix). By introducing the state vector x = [x1, ẋ1,x2, ẋ2]T such that x = q = [q1, q̇1,q2, q̇2]T , it is easy to conclude that (55) has the form of (2). To synthesize the AWSMC, Daubechies wavelets (db5) with n=2 are chosen to be the basis of the wavelet network and the vector c is taken as: c = 10−3 × [5, 2,−3,−10]T . The appropriate parameters and coefficients of the designed controllers are: α = 0.3, β = 1.5, K = 9, Q = 11, ks = 1, λ1 = 0.1, λ2 = 5, Γv = 0.1, Γw = 5, Jc = 5, J = 7, ω = 1, η = 0.5 and θ = 0.1. In addition, the 357 F. Nafa, A. Boudouda, B. Smaani Acta Polytechnica y g l1 lc1 l2 lc2 m1 l1 m2 l2 Active joint Passive joint τ1 x q2 q1 O Figure 2. Schematic of the Pendubot in a relative coordinate system 0 2 4 6 8 10 -2 -1 0 1 2 3 4 5 (a) 0 2 4 6 8 10 -4 -3 -2 -1 0 1 2 (b) Figure 3. System response for ”down − up” position (− π2 , 0,π, 0); including disturbances during the time interval [6s, 8s]: (a) Angles response, (b) Control input. initial conditions are taken such that: x(0) = [π/2, 0, 0, 0] and x(0) = [−π/2, 0, 0, 0] for down-up and up-up, respectively, and the initial values of the parameter estimates vJ(0) and wj(0) are set equal to zero. In order to show the effectiveness of the proposed control strategies, we have considered two scenarios: with and without noisy measurements. In all the reported simulations, a random disturbance representing 10% of unmodeled dynamics has been added in order to show the robustness of the proposed controllers. For the first scenario, the results of q1 and q2 responses for both positions are shown in Figure 3 and Figure 4, respectively. Referring to the down-up position, it is clear from Figure. 3 that both angles converge asymptotically to their desired values. The adaptive strategy shows a good performance and ensure the asymptotic stability for all the state variables of the system. In addition, from Figure. 3a, the plant response presents an oscillatory form for the AWSMC strategy. Indeed, the adaptation laws led to a control input less smooth than the SMC method (Figure(3b)). Regarding the effect of the disturbance during the time interval [6s, 8s], it is clear that the impact is minimal on the stability and convergence of the angles. This confirms the robustness of the proposed control strategies. In addition, it is important to mention that the adaptive controller has a shorter response time, this represents a 50% reduction as compared to the SMC. Moreover, it is worth noticing that the use of the adaptive controller has considerably reduced the chattering seen in the case of the SMC. 358 vol. 61 no. 2/2021 Adaptive wavelets sliding mode control. . . 0 2 4 6 8 10 -2 -1 0 1 2 3 (a) 0 2 4 6 8 10 -4 -3 -2 -1 0 1 2 (b) Figure 4. System response for ”up − up” position ( π2 , 0, 0, 0); including disturbances during the time interval [6s, 8s] : (a) Angles response, (b) Control input. 0 2 4 6 8 10 -3 -2 -1 0 1 2 3 (a) 6.5 7 7.5 -0.05 0 0.05 0 2 4 6 8 10 -4 -2 0 2 4 6 (b) 6.5 7 7.5 -0.05 0 0.05 Figure 5. Error estimation eJ; including disturbances during the time interval [6s, 8s]: (a)”down − up”position, (b)”up − up” position. Finally, in Figure 5, we can observe that the approximation error tends to zero even during the disturbance effect, and this represents an additional positive point of the proposed adaptation law. The same notes and observations can be reported for the second case related to the up-up position, see Figure 4(a) and Figure 4(b). For the second scenario, we introduced noisy measurements for all the states. The noise is a periodic non-smooth function with a nonzero average representing 10% of the measured signal. The results obtained 359 F. Nafa, A. Boudouda, B. Smaani Acta Polytechnica 0 2 4 6 8 10 -2 -1 0 1 2 3 4 5 (a) 0 2 4 6 8 10 -4 -3 -2 -1 0 1 2 (b) Figure 6. System response for ”down − up” position (− π2 , 0,π, 0); including noisy measurements and disturbances: (a) Angles response, (b) Control input for the "down-up" position using the AWSMC are demonstrated in Figure 6. The performances do not change significantly , even if the frequency of the noise varies from 500s to 100000s. The controller signal shown in Figure 6(b) seems to be less smooth than the first scenario but tends to a steady smooth form. This is due to the variation of the measured signal. For both cases, we can see that the SMC controller presents some low frequency chattering while this effect is reduced in the case of the AWSMC. This proves another advantage of using adaptive combinations between the SMC and intelligent approximation algorithms. 6. Conclusion and outlook In this paper, we have developed an adaptive control strategy for a class of second-order UMS with two degrees of freedom (DOF). The proposed algorithm is based on a wavelets network (WN) and sliding mode control (SMC). In first stage, we have considered that the system dynamics are well modelled and we have presented a new control algorithm based on the SMC. It was shown that the proposed approach ensures the asymptotic stability and the convergence of the closed-loop system. For solving a real case scenario,where the dynamics present uncertainties due to unmodelled parameters, we have designed an adaptive controller that uses wavelets network to approximate an ideal SMC control law. In particular, the adaptation laws have been extracted by using the gradient descent method. Based on the Lyapunov theory, we proved that the proposed control strategy guarantees the stability and the convergence of the whole system to the desired values. For a numerical application, we have taken the pendubot system as an illustrative example. The obtained results revealed satisfactory performances using the SMC or AWSMC strategies despite the lack of information about the system. With respect to the results obtained in this work and to the existing literature, many future improvements can be implemented and will be the scope of potential works: (1.) The generalization of the proposed approach for the UMS with a higher DOF. (2.) To utilize new intelligent approximation technics for the UMS. (3.) The use of adaptive higher-order and fractional sliding mode controllers. References [1] X. Xin, Y. Liu. Control Design and Analysis for Underactuated Robotic Systems. Springer-Verlag, London,UK, 2014. https://doi.org/10.1007/978-1-4471-6251-3. 360 https://doi.org/10.1007/978-1-4471-6251-3 vol. 61 no. 2/2021 Adaptive wavelets sliding mode control. . . [2] L. Birglen, T. Laliberté, C. M. Gosselin. Underactuated Robotic Hands. Springer-Verlag, Berlin, Germany, 2008. https://doi.org/10.1007/978-3-540-77459-4. [3] P. Masarati, M. Morandini, A. Fumagalli. Control constraint of underactuated aerospace systems. Journal of Computational and Nonlinear Dynamics 9(2):395–401, 2014. https://doi.org/10.1115/1.4025629. [4] D. K. Duc, J. Pan. Control of Ships and Underwater Vehicles, Design for Underactuated and Nonlinear Marine Systems,Advances in Industrial Control. first edition. Springer-Verlag, London, 2009. https://doi.org/10.1007/978-1-84882-730-1. [5] S. Krafes, Z. Chalh, A. Saka. Review on the control of second order underactuated mechanical systems. Complexity 2018. https://doi.org/10.1155/2018/9573514. [6] L. Yang, Y. Hongnian. A survey of underactuated mechanical systems. IET Control Theory&Applications 7(7):921–935, 2013. https://doi.org/10.1049/iet-cta.2012.0505. [7] M. Reyhanoglu, A. Schaft, N. Mcclamroch, I. Kolmanovsky. Dynamics and control of a class of underactuated mechanical systems. IEEE Transaction on Automatic Control 44(9):1663–1671, 1999. https://doi.org/0.1109/9.788533. [8] D. Huynh, V. Dat, T. Nguyen. Application of fuzzy algorithm in optimizing hierarchical sliding mode control for pendubot system. Robotica and Management 22(2):2–12, 2017. https://doi.org/10.1109/fuzz.2002.1005070. [9] M. Spong. Lecture notes in control and information sciences. In Control Problems in Robotics and Automation, chap. Underactuated Mechanical Systems. Springer, Berlin, Heidelberg, 1998. https://doi.org/10.1007/BFb0015081. [10] X. Huang, A. Ralescu, H. Gao. A survey on the application of fuzzy systems for underactuated systems. Journal of Systems and Control Engineering 233(3):217–244, 2018. https://doi.org/10.1177/0959651818791027. [11] M. Rehan, M. Reyhanoglu. Control of rolling disk motion on an arbitrary smooth surface. IEEE Control Systems Letters 2(3):357–362, 2018. https://doi.org/10.1109/LCSYS.2018.2838528. [12] A. Choukchou-Braham, B. Cherki, M. Djemai, K. Busawon. Analysis and Control of Underactuated Mechanical Systems. Springer International Publishing, Cham, Switzerland, 2014. https://doi.org/10.1007/978-3-319-02636-7. [13] I. Chawla, A. Singla. Real-time control of a rotary inverted pendulum using robust lqr-based anfis controller. International Journal of Nonlinear Sciences and Numerical Simulation 19(3-4):379–389, 2018. https://doi.org/10.1515/ijnsns-2017-0139. [14] M. Keshmiri, A. Singla. Modeling and control of ball and beam system using model based and non-model based control approaches. International Journal On Smart Sensing and Intelligent Systems 5(1):14–35, 2012. https://doi.org/10.21307/ijssis-2017-468. [15] C.Aguilar-Avelar, J. Moreno-Valenzuela. New feedback linearization-based control for arm trajectory tracking of the furuta pendulum. IEEE/ASME Transactions on Mechatronics 21(2):638 – 648, 2016. https://doi.org/10.1109/TMECH.2015.2485942. [16] T. Taniguchi, M. Sugeno. Piecewisemulti-linear model based control for tora system via feedback linearization. Proceedings of the International MultiConference of Engineers and Computer Scientists 2018. [17] R. Chanchareon, V. Sangveraphunsiri, S. Chantranuwathana. Tracking control of an inverted pendulum using computed feedback linearization technique. IEEE International Conference on Robotics, Automation and Mechatronics 2006. https://doi.org/10.1109/RAMECH.2006.252680. [18] L. Hsu, T. Oliveira, J. Cunha, L. Yan. Adaptive unit vector control of multivariable systems using monitoring functions. International Journal of Robust and Nonlinear Control 29(3):583–600, 2019. https://doi.org/10.1002/rnc.4253. [19] T. Oliveira, J. Cunha, L. Hsu. Li s., yu x., fridman l., man z., wang x. (eds). In Advances in Variable Structure Systems and Sliding Mode Control—Theory and Applications. Studies in Systems, Decision and Control, chap. Adaptive Sliding Mode Control Based on the Extended Equivalent Control Concept for Disturbances with Unknown Bounds. Springer, Cham, 2018. https://doi.org/10.1007/978-3-319-62896-7$\_$6. [20] C. Edwards, S. Spurgeon. Sliding Mode Control: Theory and Applications. Taylor and Francis, London, UK, 1998. [21] J.-X. Xu, Z.-Q. Guo, T. Lee. A synthesized integral sliding mode controller for an underactuated unicycle. 11th International Workshop on Variable Structure Systems (VSS),Mexico City, 2010 pp. 352–357, 2010. https://doi.org/10.1109/VSS.2010.5545132. [22] I. Shah, F. Ur Rehman. Smooth second order sliding mode control of a class of underactuated mechanical system. IEEE Access, 2018 6:7759–7771, 2018. https://doi.org/10.1109/ACCESS.2018.2806568. [23] H. Cho, G. Kerschen, T. Oliveira. Adaptive smooth control for nonlinear uncertain systems. Nonlinear Dyn 99 p. 2819–2833, 2020. https://doi.org/10.1007/s11071-019-05446-z. [24] T. Oliveira, V. Rodrigues, L. Fridman. Generalized model reference adaptive control by means of global hosm differentiators. IEEE Transactions on Automatic Control 5(64):2053–2060, 2020. https://doi.org/10.1109/TAC.2018.2862466. 361 https://doi.org/10.1007/978-3-540-77459-4 https://doi.org/10.1115/1.4025629 https://doi.org/10.1007/978-1-84882-730-1 https://doi.org/10.1155/2018/9573514 https://doi.org/10.1049/iet-cta.2012.0505 https://doi.org/0.1109/9.788533 https://doi.org/10.1109/fuzz.2002.1005070 https://doi.org/10.1007/BFb0015081 https://doi.org/10.1177/0959651818791027 https://doi.org/10.1109/LCSYS.2018.2838528 https://doi.org/10.1007/978-3-319-02636-7 https://doi.org/10.1515/ijnsns-2017-0139 https://doi.org/10.21307/ijssis-2017-468 https://doi.org/10.1109/TMECH.2015.2485942 https://doi.org/10.1109/RAMECH.2006.252680 https://doi.org/10.1002/rnc.4253 https://doi.org/10.1007/978-3-319-62896-7$\_$6 https://doi.org/10.1109/VSS.2010.5545132 https://doi.org/10.1109/ACCESS.2018.2806568 https://doi.org/10.1007/s11071-019-05446-z https://doi.org/10.1109/TAC.2018.2862466 F. Nafa, A. Boudouda, B. Smaani Acta Polytechnica [25] S. Ramos-Paz, F. Ornelas-Tellez, A. G. Loukianov. Nonlinear optimal tracking control in combination with sliding modes: Application to the pendubot. in Proceedings of the 2017 IEEE International Autumn Meeting on Power, Electronics and Computing (ROPEC),Mexico 6:1–6, 2017. https://doi.org/10.1109/ROPEC.2017.8261619. [26] F. Nafa, S. Labiod, H. Chekireb. Direct adaptive fuzzy sliding mode decoupling control for a class of under actuated mechanical systems. Turk J Electr Eng Co 21:1615–1630, 2013. https://doi.org/10.3906/elk-1112-17. [27] S. Labiod, T. Guerra. Direct adaptive fuzzy control for a class of mimo nonlinear system. International Journal of Systems Science 38(8):665–675, 2007. https://doi.org/10.2307/2001373. [28] S. Mallat. Multiresolution approximation and wavelet orthonormal base of L2 ( R). Transactions of the American Mathematical Society 315(1):69–87, 1989. [29] I. Daubechies. Ten lectures on wavelets. SIAM,Philadelphia, Pennsylvania, USA 1992. [30] J. Xu, Y. Tan. Nonlinear adaptive wavelet control using constructive wavelet networks. IEEE Transactions on Neural Networks 18(1):115–127, 2007. https://doi.org/10.1109/TNN.2006.886759. [31] T. Kugarajah, Q. Zhang. Multidimensional wavelet frames. IEEE Transaction on Neural Networks 6(6):1552–1556, 1995. https://doi.org/10.1109/72.471353. [32] A. Stephen, H. Wei. New class of wavelet network for nonlinear system identification. IEEE Transaction on Neural Networks 16(4):862–874, 2005. https://doi.org/10.1109/TNN.2005.849842. [33] H. R. Karimi, B. Lohmann, B. Moshiri, P. Maralani. Wavelet-based identification and control design for a class of nonlinear systems. International Journal of Wavelets,Multiresolution and Information Processing 4(1):213–226, 2006. https://doi.org/10.1142/S0219691306001178. [34] B. Chen, Y. Cheng. Adaptive wavelet network control design for nonlinear systems. Proceedings of 35th IEEE Conference on Decision and Control 3(6):3224–3229, 1997. https://doi.org/10.1109/CDC.1996.573635. [35] M. Zekri, S. Sadri, F. Sheikholeslam. Adaptive fuzzy wavelet network control design for nonlinear systems. Fuzzy Sets and Systems 159(20):2668–2695, 2008. https://doi.org/10.1016/j.fss.2008.02.008. [36] R. Olfati-Saber. Normal forms for underactuated mechanical systems with symmetry. IEEE Transaction on Automatic Control 47(2):305–308, 2002. https://doi.org/10.1109/9.983365. [37] J. Slotine, W. Li. Applied Nonlinear Control. Prentice-Hall, Englewood Cliffs, NJ,USA, 1991. [38] R. Sanner, J. Slotine. Structurally dynamic wavelet networks for adaptive control of robotic systems. International Journal of Control 70(3):405–421, 1998. https://doi.org/10.1080/002071798222307. [39] B.-S. Chen, Y.-M. Cheng. Adaptive wavelet network control design for nonlinear systems. Proceedings of 35th IEEE Conference on Decision and Control, Kobe, Japan 3:3224–3229, 1996. https://doi.org/10.1109/CDC.1996.573635. [40] L.-X. Wang. Adaptive Fuzzy Systems and Control : Design and Stability Analysis. Prentice-Hall, Englewood Cliffs, NJ,USA, 1994. [41] M. Gulan, M. Salaj, B. Rohal’-Ilkiv. Achieving an equilibrium position of pendubot via swing–up and stabilizing model predictive control. Journal of Electrical Engineering 65(6):356–363, 2014. https://doi.org/10.2478/jee-2014-0058. 7. Appendices By considering the friction in both joints, the dynamic behavior of a pendubot can be given as follows [41]: q̈1 = 1 θ1θ2 −θ32 cos2 q2 [θ1θ3(q̇1 + q̇2)2 sin q2 + θ23q̇ 2 1 cos q2 sin q2 −θ2θ4g cos q1 + θ3θ5 cos q2 cos (q1 + q2) −θ2d1q̇1 + (θ2 + θ3cosq2)d2q̇2 + θ2τ1]. q̈2 = 1 θ1θ2 −θ32 cos2 q2 [−θ3(θ2 + θ3 cos q2)(q̇1 + q̇2)2 sin q2 − (θ1 + θ3 cos q2)q̇21θ3 sin q2 − (θ1 + θ3 cos q2)θ5g cos (q1 + q2) + (θ2 + θ3 cos q2)d1q̇1 − (θ1 + θ2 + 2θ3 cos q2)d2q̇2 + (θ2 + θ3 cos q2)(θ4g cos q1 − τ1)]. (55) The pendubot parameters are listed in the below table: 362 https://doi.org/10.1109/ROPEC.2017.8261619 https://doi.org/10.3906/elk-1112-17 https://doi.org/10.2307/2001373 https://doi.org/10.1109/TNN.2006.886759 https://doi.org/10.1109/72.471353 https://doi.org/10.1109/TNN.2005.849842 https://doi.org/10.1142/S0219691306001178 https://doi.org/10.1109/CDC.1996.573635 https://doi.org/10.1016/j.fss.2008.02.008 https://doi.org/10.1109/9.983365 https://doi.org/10.1080/002071798222307 https://doi.org/10.1109/CDC.1996.573635 https://doi.org/10.2478/jee-2014-0058 vol. 61 no. 2/2021 Adaptive wavelets sliding mode control. . . Arm number Parameter and symbol value Arm 1 m1 0.256 [kg] Lenght: l1 0.206 [m] Distance of the center of mas of Link1: lc1 0.107 [m] Moment inertia about the centroid: I1 0.0025 [kgm2] Friction coefficient: d1 0.08 [kgm2 s−1] Arm 2 Mass: m2 0.226[kg] Lenght: l2 0.298[m] Distance of the center of mas of Link2: lc2 0.133 [m] Moment inertia about the centroid: I2 0.0011 [kgm2] Friction coefficient: d2 0.00001[kgm2 s−1] Torque (input control) :τ1 [Nm] Table 1. Mechanical Parameters of pendubot Model [41]. 363 Acta Polytechnica 61(2):350–363, 2021 1 Introduction 1.1 Motivation: A literature review 1.2 Contributions 1.3 Outlines of the paper 2 Preliminaries and problem formulation 3 Sliding mode controller design 3.1 Proposition-1 4 Adaptive wavelets sliding mode controller (AWSMC) 4.1 Wavelets network overview 4.2 Adaptive controller design 4.3 Proposition-2 4.4 Proof 4.5 Remarks 5 Simulation and results 6 Conclusion and outlook References 7 Appendices