Keywords

1 Introduction

Recently, there has been an increasing interest in underactuated systems [19]. These systems have fewer actuators than degree of freedom to be controlled. Examples of this kind of systems can be found in several applications such as free-flying space robots, underwater robots, and manipulators with structural flexibility, overhead crane. It is obvious that underactuated systems have many advantages which include: the decreasing of the actuators number can decrease the volume and the weight of system.

Many control techniques to treat the underactuated systems have been proposed in the literature [111]. In [1], an adaptive control for an underactuated spherical robot based on hierarchical sliding mode approach has been proposed. An optimal control of underactuated nonholonomic mechanical systems was studied by Hussein and Bloch in [2]. Hao et al. have proposed a robust controller using incremental sliding mode control system method for a class of underactuated mechanical systems with mismatched uncertainties [3]. A sliding mode controller of double-pendulum crane systems has been developed in [4]. Authors of [5] have investigated an adaptive multiple-surface sliding controller based on function approximation techniques (FAT) for underactuated mechanical systems with disturbances and mismatched uncertainties. In [6], a motion planning-based adaptive control method of underactuated crane systems has been proposed. An adaptive fuzzy sliding mode control for a class underactuated system has been developed in [7]. Here, the underactuated system is decoupled into two subsystems, and a sliding surface is respectively define for each subsystem. Shine et al. [8] have designed a controller to achieve a globally asymptotical stability for a class of uncertain underactuated mechanical systems. A direct adaptive fuzzy sliding mode decoupling control for a class of underactuated mechanical systems has been developed in [9]. A stable sliding mode controller has been designed in [10] for a class of second-order underactuated systems. In [11], a disturbance adaptive control for an under-actuated spherical robot based on hierarchical sliding-mode technology has been investigated.

In this paper, motivated by works in [111], we will propose a novel adaptive fuzzy sliding mode controller (AFSMC) for a class of underactuated systems. The difficulties met in the control design are how to deal with unknown nonlinear functions, and to establish a control law which ensures the stability of the underactuated systems. These difficulties can be solved by using a fuzzy system approximation, a sliding mode control and a robust dynamic compensation.

Compared to the above works [111], the main contributions of this paper lie in the following:

  1. (1)

    A novel and simple AFSMC for a class of uncertain underactuated systems is proposed.

  2. (2)

    The model of these underactuated systems is assumed to be unknown, except the relative degree.

  3. (3)

    Unlike many previous works (e.g. [1, 7, 10, 11]), the stability analysis of the closed-loop system is rigorously derived with mild assumptions.

2 System Description and Problem Formulation

Consider a class of underactuated nonlinear systems which can be expressed in the following form:

$$ \begin{aligned} \dot{x}_{1} & = x_{2} \\ \dot{x}_{2} & = f_{1} (X) + b_{1} (X)u \\ \dot{x}_{3} & = x_{4} \\ \dot{x}_{4} & = f_{2} (X) + b_{2} (X)u \\ \end{aligned} $$
(1)

where \( X = [x_{1} ,x_{2} ,x_{3} ,x_{4} ]\,{ \in }\,\Re^{4} \) is the state vector, \( u\,{ \in }\,\Re \) is the control input, \( f_{i} (X) \) and \( b_{i} (X),\,i = 1,2 \), are unknown continuous nonlinear functions.

Assumption 1 [12, 13]:

The functions \( b_{1} (X) \) and \( b_{2} (X) \) are non-singular and depend only on the variables \( x_{1} \,{\text{and}}\,x_{3} \).

Assumption 2:

The desired trajectory vector \( x_{d} (t) = \left[ {\begin{array}{*{20}c} {x_{d1} } & {x_{d2} } & {x_{d3} } & {x_{d4} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {x_{d1} } & {\dot{x}_{d1} } & {x_{d3} } & {\dot{x}_{d3} } \\ \end{array} } \right] \in \Re^{4} \) is supposed to be continuous, bounded and available for measurement.

Assumption 3:

The sign of the functions \( b_{1} (X)\,{\text{and}}\,b_{2} (X) \) is assumed to be known. Without loss of generality, we assume that the functions \( b_{1} (X)\,{\text{and}}\,b_{2} (X) \) are strictly positive.

The objective of this paper is to design an AFSMC for a class of underactuated systems described by (1) that guarantees the stability of the closed-loop system and the tracking error convergence to zero.

3 Control System Design and Stability Analysis

To quantify this control objective, we define the tracking error vector as follows:

$$ e = \left[ {\begin{array}{*{20}c} {e_{1} } \\ {e_{2} } \\ {e_{3} } \\ {e_{4} } \\ \end{array} } \right] = \left[ {\begin{array}{*{20}c} {x_{d1} - x_{1} } \\ {x_{d2} - x_{2} } \\ {x_{d3} - x_{3} } \\ {x_{d4} - x_{4} } \\ \end{array} } \right] $$
(2)

The sliding surfaces are selected as follows:

$$ \left\{ \begin{aligned} s_{1} = \dot{e}_{1} + c_{1} e_{1} \hfill \\ s_{2} = \dot{e}_{2} + c_{2} e_{2} \hfill \\ \end{aligned} \right. $$
(3)

where c 1 and c 2 are positive design constants.

Differentiating (3) with respect to time yields:

$$ \left\{ \begin{aligned} \dot{s}_{1} = c_{1} \dot{e}_{1} + \dot{x}_{2d} - f_{1} (X) - b_{1} (X)u \hfill \\ \dot{s}_{2} = c_{2} \dot{e}_{2} + \dot{x}_{4d} - f_{2} (X) - b_{2} (X)u \hfill \\ \end{aligned} \right. $$
(4)

To facilitate the control system design, we rewrite the dynamics (4) as follows:

$$ \left\{ {\begin{array}{*{20}l} {\frac{1}{2}\frac{{db_{1}^{ - 1} (X)}}{dt}s_{1} + \frac{{\dot{s}_{1} }}{{b_{1} (X)}} = \frac{1}{2}\frac{{db_{1}^{ - 1} (X)}}{dt}s_{1} + \frac{{c_{1} \dot{e}_{1} + \dot{x}_{2d} - f_{1} (X)}}{{b_{1} (X)}} - u} \hfill \\ {\frac{1}{2}\frac{{db_{2}^{ - 1} (X)}}{dt}s_{2} + \frac{{\dot{s}_{2} }}{{b_{2} (X)}} = \frac{1}{2}\frac{{db_{1}^{ - 1} (X)}}{dt}s_{2} + \frac{{c_{2} \dot{e}_{2} + \dot{x}_{4d} - f_{2} (X)}}{{b_{2} (X)}} - u} \hfill \\ \end{array} } \right. $$
(5)

Now, let’s denote

$$ \begin{aligned} \alpha_{1} (X) & = \frac{1}{2}\frac{{db_{1}^{ - 1} (X)}}{dt}s_{1} + \frac{{c_{1} \dot{e}_{1} + \dot{x}_{2d} - f_{1} (X)}}{{b_{1} (X)}}, \\ \alpha_{2} (X) & = \frac{1}{2}\frac{{db_{2}^{ - 1} (X)}}{dt}s_{2} + \frac{{c_{2} \dot{e}_{2} + \dot{x}_{4d} - f_{2} (X)}}{{b_{2} (X)}}. \\ \end{aligned} $$

Multiplying by s 1 and s 2, the expression (5) becomes

$$ \left\{ {\begin{array}{*{20}l} {\frac{1}{2}\frac{{db_{1}^{ - 1} (X)}}{dt}s_{1}^{2} + \frac{{s_{1} \dot{s}_{1} }}{{b_{1} (X)}} = (\alpha_{1} (X) - u)s_{1} } \hfill \\ {\frac{1}{2}\frac{{db_{2}^{ - 1} (X)}}{dt}s_{2}^{2} + \frac{{s_{2} \dot{s}_{2} }}{{b_{2} (X)}} = (\alpha_{2} (X) - u)s_{2} } \hfill \\ \end{array} } \right. $$
(6)

Since the nonlinear functions \( \alpha_{1} (X) \) and \( \alpha_{2} (X) \) are unknown, the design of a stable controller for dynamics (1) is very difficult. To solve this problem, we will use an adaptive fuzzy system to approximate these unknown nonlinear functions.

  1. A.

    Description of fuzzy logic system

The basic configuration of a fuzzy logic system consists of following collection fuzzy IF-THEN rules:

$$ R^{(l)} :{\text{IF}}\,x_{1} \,{\text{is}}\,F_{1}^{l} \,{\text{and}} \ldots \,x_{4} \,{\text{is}}\,F_{4}^{l} \,{\text{THEN}}\,y\,{\text{is}}\,G^{l} $$
(7)

where \( X = [x_{1} ,x_{2} ,x_{3} ,x_{4} ]\,{ \in }\,\Re^{4} \) and \( y \in \Re \) are the input and output of the fuzzy systems respectively, F l i and G l are fuzzy sets, and \( l = 1,2, \ldots ,N,\,N \) is the total numbers of fuzzy rules for each the fuzzy model. By using the singleton fuzzifier, product inference, and center-average defuzzifier, the output of the fuzzy system can be expressed as follows:

$$ y = \theta^{T} \psi (X) $$
(8)

where \( \theta^{T} = \left[ {\begin{array}{*{20}c} {\theta^{1} } & {\theta^{2} } & \ldots & {\theta^{N} } \\ \end{array} } \right] \in \Re^{N} \) with each variable \( \theta^{l} \) as the point at which the fuzzy membership function of G l achieves the maximum value, and the fuzzy basis function \( \psi^{T} = \left[ {\begin{array}{*{20}c} {\psi^{1} (X)} & {\psi^{2} (X)} & \ldots & {\psi^{N} (X)} \\ \end{array} } \right] \in \Re^{N} \), with \( \psi^{l} (X) \) expressed as follows:

$$ \begin{aligned} \psi^{l} (X) = {{\prod\limits_{i = 1}^{4} {\mu_{{F_{i}^{l} }} } (x_{i} )} \mathord{\left/ {\vphantom {{\prod\limits_{i = 1}^{4} {\mu_{{F_{i}^{l} }} } (x_{i} )} {\sum\limits_{l = 1}^{N} {\left( {\prod\limits_{i = 1}^{4} {\mu_{{_{{F_{i}^{l} }} }} } (x_{i} )} \right)} }}} \right. \kern-0pt} {\sum\limits_{l = 1}^{N} {\left( {\prod\limits_{i = 1}^{4} {\mu_{{_{{F_{i}^{l} }} }} } (x_{i} )} \right)} }} \hfill \\ \hfill \\ \end{aligned} $$
(9)

where \( \mu_{{F_{i}^{l} }} (x_{i} ) \) is the membership function of fuzzy set.

It is worth nothing that the fuzzy system (8) is commonly used in control applications. Following the universal approximation theorem, the fuzzy system (8) is able to approximate any nonlinear smooth function y on compact operating space to an arbitrary degree of accuracy. Of particular importance, it is assumed that the structure of the fuzzy system, namely the pertinent inputs, the number of membership functions for each input and the number of rules, and the membership function parameters are properly specified beforehand. The consequent parameters are then determined by appropriate parameter adaptation algorithms [1417].

  1. B.

    Design of adaptive fuzzy sliding-mode controller

To facilitate the control system design, the following assumption is presented and will used the subsequent developments.

Assumption 4:

There exists an unknown continuous positive function \( \bar{\alpha }_{2} (X) \), such as that:

$$ \left| {\alpha_{2} (X) - \alpha_{1} (X)} \right| \le \bar{\alpha }_{2} (X),\quad \forall X\,{ \in }\,\Omega _{X} \,{ \subset }\,\Re^{4} . $$
(10)

The unknown nonlinear function \( \alpha_{1} (X) \) and \( \bar{\alpha }_{2} (X) \) can be approximated by the linearly parameterized fuzzy systems (8), as follows:

$$ \hat{\alpha }_{1} (X) = \theta_{1}^{T} \psi_{1} (X) $$
(11a)
$$ \hat{\bar{\alpha }}_{2} (X) = \theta_{2}^{T} \psi_{2} (X) $$
(11b)

where \( \psi_{1} (X) \) and \( \psi_{2} (X) \) are fuzzy basis functions, and \( \theta_{1} \) and \( \theta_{2} \) are the adjustable parameters vector of the fuzzy systems.

Let’s define the following optimal parameter vectors:

$$ \begin{aligned} \theta_{1}^{*} & = \arg_{{\theta_{1} }} \hbox{min} \left[ {\mathop {\sup }\limits_{{X \in\Omega _{X} }} \left| {\alpha_{1} (X) - \hat{\alpha }_{1} (X,\theta_{1} )} \right|} \right] \\ \theta_{2}^{*} & = \arg_{{\theta_{2} }} \hbox{min} \left[ {\mathop {\sup }\limits_{{X \in\Omega _{X} }} \left| {\bar{\alpha }_{2} (X) - \hat{\bar{\alpha }}_{2} (X,\theta_{2} )} \right|} \right] \\ \end{aligned} $$
(12)

Note that the optimal values of \( \theta_{1} \) and \( \theta_{2} \) are artificial constant quantities introduced only for analysis purposes, and their values are not needed when implementing the controller. Define \( \tilde{\theta }_{1} = \theta_{1} - \theta_{1}^{*} \) and \( \tilde{\theta }_{2} = \theta_{2} - \theta_{2}^{*} \) as the parameter estimation error, and

\( \varepsilon_{1} (X) = \alpha_{1} (X) - \hat{\alpha }_{1} (X,\theta_{1}^{*} ) \) and \( \varepsilon_{2} (X) = \bar{\alpha }_{2} (X) - \hat{\bar{\alpha }}_{2} (X,\theta_{2}^{*} ) \)

are the fuzzy approximation errors, where

$$ \hat{\alpha }_{1} (X,\theta_{1}^{*} ) = \theta_{1}^{{*^{T} }} \psi_{1} (X) $$
(13a)
$$ \hat{\bar{\alpha }}_{2} (X,\theta_{2}^{*} ) = \theta_{2}^{{*^{T} }} \psi_{2} (X) $$
(13b)

As in the literature [1217], we assume that the used fuzzy systems do not violate the universal approximator property on the compact set \( \Omega _{X} \), which is assumed large enough so that the input vector of the fuzzy system remains in \( \Omega _{X} \) under closed-loop control system. So it is logical that the fuzzy approximation error is bounded for all \( x \in\Omega _{X} \), i.e. \( \left| {\varepsilon_{i} (X)} \right| \le \bar{\varepsilon }_{i} \) \( \forall X \in\Omega _{X} \), where \( \bar{\varepsilon }_{i} \) is an unknown constant.

From the above analysis, one has

$$ \begin{aligned} \hat{\alpha }_{1} (X,\theta_{1} ) - \alpha_{1} (X) & = \hat{\alpha }_{1} (X,\theta_{1} ) - \hat{\alpha }_{1} (X,\theta_{1}^{*} ) + \hat{\alpha }_{1} (X,\theta_{1}^{*} ) - \alpha_{1} (X) \\ & = \hat{\alpha }_{1} (X,\theta_{1} ) - \hat{\alpha }_{1} (X,\theta_{1}^{*} ) - \varepsilon_{1} (X) \\ & = \tilde{\theta }_{1}^{T} \psi_{1} (X) - \varepsilon_{1} (X) \\ \end{aligned} $$
(14a)
$$ \begin{aligned} \hat{\bar{\alpha }}_{2} (X,\theta_{2} ) - \bar{\alpha }_{2} (X) & = \hat{\bar{\alpha }}_{2} (X,\theta_{2} ) - \hat{\bar{\alpha }}_{2} (X,\theta_{2}^{*} ) + \hat{\bar{\alpha }}_{2} (X,\theta_{2}^{*} ) - \bar{\alpha }_{2} (X) \\ & = \hat{\bar{\alpha }}_{2} (X,\theta_{2} ) - \hat{\bar{\alpha }}_{2} (X,\theta_{2}^{*} ) - \varepsilon_{2} (X) \\ & = \tilde{\theta }_{2}^{T} \psi_{2} (X) - \varepsilon_{2} (X) \\ \end{aligned} $$
(14b)

To meet the control objective, a suitable adaptive fuzzy sliding mode controller is proposed as follows:

$$ u = k_{1} (s_{1} + s_{2} ) + k_{2} sign(s_{1} + s_{2} ) + \theta_{1}^{T} \psi_{1} (X) + v_{r} $$
(15)

The associated adaptive laws are given by

$$ \dot{v}_{r} = - \gamma_{v} v_{r} + \gamma_{v} \left[ {(s_{1} + s_{2} ) - v_{r} \left( {\frac{{\theta_{2}^{T} \psi_{2} (X)\left| {s_{2} } \right| + k_{3} \left| {s_{2} } \right| + k_{4} s_{2}^{2} }}{{v_{r}^{2} + \delta^{2} }}} \right)} \right] $$
(16)
$$ \dot{\delta } = - \gamma_{\delta } \delta \left( {\frac{{\theta_{2}^{T} \psi_{2} \left| {s_{2} } \right| + k_{3} \left| {s_{2} } \right| + k_{4} s_{2}^{2} }}{{v_{r}^{2} + \delta^{2} }}} \right) $$
(17)
$$ \dot{\theta }_{1} = \gamma_{{\theta_{1} }} (s_{1} + s_{2} )\psi_{1} (X) $$
(18)
$$ \dot{\theta }_{2} = \gamma_{{\theta_{2} }} \left| {s_{2} } \right|\psi_{2} (X) $$
(19)

where \( k_{1} ,k_{2} ,k_{3} ,k_{4} ,\gamma_{v} ,\gamma_{\delta } ,\gamma_{{\theta_{1} }} \) and \( \gamma_{{\theta_{2} }} \) are positive design constants.

Theorem 1:

Consider the system (1) and suppose that Assumptions 14 are satisfied. Then, the proposed control law (15)–(19) ensures that:

  • all signals in the closed-loop system are bounded, and

  • the tracking errors asymptotically converge to zero.

Proof of Theorem 1:

Let us consider the following Lyapunov function candidate:

$$ V = \frac{1}{{2b_{1} (X)}}s_{1}^{2} + \frac{1}{{2b_{2} (X)}}s_{2}^{2} + \frac{1}{{2\gamma_{{v_{{}} }} }}v_{r}^{2} + \frac{1}{{2\gamma_{\delta } }}\delta^{2} + \frac{1}{{2\gamma_{{\theta_{1} }} }}\tilde{\theta }_{1}^{T} \tilde{\theta }_{1} + \frac{1}{{2\gamma_{{\theta_{2} }} }}\tilde{\theta }_{2}^{T} \tilde{\theta }_{2} $$
(20)

Differentiating (20) with respect to time yields

$$ \begin{aligned} \dot{V} & = \frac{d}{dt}\left( {b_{1}^{ - 1} (X)} \right)\frac{{s_{1}^{2} }}{2} + \frac{1}{{b_{1} (X)}}s_{1} \dot{s}_{1} + \frac{d}{dt}\left( {b_{2}^{ - 1} (X)} \right)\frac{{s_{2}^{2} }}{2} + \frac{1}{{b_{2} (X)}}s_{2} \dot{s}_{2} + \frac{1}{{\gamma_{v} }}v_{r} \dot{v}_{r} + \frac{1}{{\gamma_{\delta } }}\delta \dot{\delta } \\ & \quad + \frac{1}{{\gamma_{{\theta_{1} }} }}\tilde{\theta }_{1}^{T} \dot{\theta }_{1} + \frac{1}{{\gamma_{{\theta_{2} }} }}\tilde{\theta }_{2}^{T} \dot{\theta }_{2} \\ \end{aligned} $$
(21)

Using (6), (21) becomes

$$ \begin{aligned} \dot{V} & = \left( {\alpha_{1} (X) - u} \right)s_{1} + \left( {\alpha_{2} (X) - u} \right)s_{2} + \frac{1}{{\gamma_{v} }}v_{r} \dot{v}_{r} + \frac{1}{{\gamma_{\delta } }}\delta \dot{\delta } + \frac{1}{{\gamma_{{\theta_{1} }} }}\tilde{\theta }_{1}^{T} \dot{\theta }_{1} + \frac{1}{{\gamma_{{\theta_{2} }} }}\tilde{\theta }_{2}^{T} \dot{\theta }_{2} \\ & = \left( {s_{1} + s_{2} } \right)\alpha_{1} \left( X \right) + \left( {\alpha_{2} - \alpha_{1} } \right)s_{2} - \left( {s_{1} + s_{2} } \right)u + \frac{1}{{\gamma_{{v_{{}} }} }}v_{r} \dot{v}_{r} \\ & + \frac{1}{{\gamma_{\delta } }}\delta \dot{\delta } + \frac{1}{{\gamma_{{\theta_{1} }} }}\tilde{\theta }_{1}^{T} \dot{\theta }_{1} + \frac{1}{{\gamma_{{\theta_{2} }} }}\tilde{\theta }_{2}^{T} \dot{\theta }_{2} \\ \end{aligned} $$
(22)

Substituting (14a) and (15) into (22), we get

$$ \begin{aligned} & \dot{V} \le - \left( {s_{1} + s_{2} } \right)\tilde{\theta }_{1}^{T} \psi_{1} \left( X \right) + \left( {s_{1} + s_{2} } \right)\varepsilon_{1} (X) + \bar{\alpha }_{2} \left| {s_{2} } \right| - k_{1} \left( {s_{1} + s_{2} } \right)^{2} \\ & \quad - k_{2} \left| {s_{1} + s_{2} } \right| - \left( {s_{1} + s_{2} } \right)v_{r} + \frac{1}{{\gamma_{{v_{{}} }} }}v_{r} \dot{v}_{r} + \frac{1}{{\gamma_{\delta } }}\delta \dot{\delta } + \frac{1}{{\gamma_{{\theta_{1} }} }}\tilde{\theta }_{1}^{T} \dot{\theta }_{1} + \frac{1}{{\gamma_{{\theta_{2} }} }}\tilde{\theta }_{2}^{T} \dot{\theta }_{2} \\ \end{aligned} $$
(23)

The design constants k 2 and k 3 should be selected such as \( k_{2} \ge \bar{\varepsilon }_{1} \) and \( k_{3} \ge \bar{\varepsilon }_{2} \), respectively.

Using the adaptive laws (16)–(19) and the expression (14b), (23) can be simplified as:

$$ \dot{V} \le - k_{1} (s_{1} + s_{2} )^{2} - v_{r}^{2} - k_{4} s_{2}^{2} $$
(24)

Therefore all signals \( s_{1} ,\,s_{2} ,\,s_{1} + s_{2} ,\,v_{r} ,\,\delta ,\,\theta_{1} ,\,\theta_{2} ,\,X\,{\text{and}}\,u \) are bounded. Then, from (4), we can conclude about the boundedness of \( \dot{s}_{1} ,\,\dot{s}_{2} \,{\text{and}}\,\dot{s}_{1} + \dot{s}_{2} \). Also, we can demonstrate from (24) that \( s_{2} \,{\text{and}}\,s_{1} + s_{2} \in L_{2} \). By using the Barbalat’s lemma, we can obtain the asymptotic convergence to zero of the signals \( s_{2} \,{\text{and}}\,s_{1} + s_{2} \). Hence, the signal s 1 can converge asymptotically to zero. The tracking error convergence of \( e_{1} \,{\text{and}}\,e_{2} \) follow that of the surfaces \( s_{1} \,{\text{and}}\,s_{2} \).

4 Simulation Study

In this section, the spherical robot in Fig. 1 is used to verify the performance of the proposed controller.

Fig. 1.
figure 1

The spherical robot system.

From Fig. 1, we can note that \( \tau \) is the driving torque, \( \varphi \) is the angle that shell rolls away from the start point and \( \phi \) is the inner suspension swing angle with respect to its equilibrium position in vertical direction [11].

The equation of dynamic behavior of this spherical robot can be governed by:

$$ M(q){\ddot q} + C(q,\dot{q})\dot{q} + G(q) = \tau $$
(25)

where \( q = \left[ {\begin{array}{*{20}c} {q_{1} } & {q_{2} } \\ \end{array} } \right]^{T} = \left[ {\begin{array}{*{20}c} \varphi & \phi \\ \end{array} } \right]^{T} \) represent the output vector and \( \tau \) is input vector of robot system. \( M\left( q \right) \) is a symmetric positive definite inertia matrix, \( C\left( {q,\dot{q}} \right) \) is damping matrix and \( G\left( q \right) \) is gravity matrix. These system matrices can be given as follows:

$$ M(q) = \left[ {\begin{array}{*{20}c} a & {b\,\cos q_{2} } \\ {b\,\cos q_{2} } & c \\ \end{array} } \right],\,C(q) = \left[ {\begin{array}{*{20}c} 0 & {b\dot{q}_{2} \,\cos q_{2} } \\ 0 & 0 \\ \end{array} } \right],\,M(q) = \left[ {\begin{array}{*{20}c} 0 \\ {d\,\sin q_{2} } \\ \end{array} } \right]. $$

where \( a = \frac{1}{3}\left( {5m_{1} + 3m_{2} } \right)r^{2} ,\,b = m_{2} rl^{2} ,\,c = m_{2} l^{2} d = m_{2} gl \).

Because the inertia matrix M is invertible., then the system (25) can be rewritten as

$$ {\ddot q} = M^{ - 1} (\tau - C\dot{q} - G) = F(q) + B(q)\tau $$
(26)

with

$$ F(q) = \left[ {\begin{array}{*{20}c} {f_{1} (q)} & {f_{2} (q)} \\ \end{array} } \right]^{T} ,\,B(q) = \left[ {\begin{array}{*{20}c} {b_{1} (q)} & {b_{2} (q)} \\ \end{array} } \right]^{T} . $$

Let us denote \( X = \left[ {\begin{array}{*{20}c} {x_{1} } & {x_{2} } & {x_{3} } & {x_{4} } \\ \end{array} } \right]^{T} = \left[ {\begin{array}{*{20}c} {q_{1} } & {\dot{q}_{1} } & {q_{2} } & {\dot{q}_{2} } \\ \end{array} } \right]^{T} . \)

So

$$ \left\{ {\begin{array}{*{20}l} {\dot{x}_{1} = x_{2} } \hfill \\ {\dot{x}_{2} = f_{1} (X) + b_{1} (X)u} \hfill \\ {\dot{x}_{3} = x_{4} } \hfill \\ {\dot{x}_{4} = f_{2} (X) + b_{2} (X)u} \hfill \\ \end{array} } \right. $$
(27)

where \( f_{1} (X) = \frac{{bd\,\sin x_{3} \cos x_{3} + bcx_{4}^{2} \sin x_{3} }}{{ac - b^{2} \cos^{2} x_{3} }} \), \( f_{2} (X) = \frac{{ - ad\,\sin x_{3} - b^{2} x_{4}^{2} \sin x_{3} \cos x_{3} }}{{ac - b^{2} \cos^{2} x_{3} }} \)

$$ b_{1} (X) = \frac{{c - b\,\cos x_{3} }}{{ac - b^{2} \cos^{2} x_{3} }},b_{2} (X) = \frac{{a - b\,\cos x_{3} }}{{ac - b^{2} \cos^{2} x_{3} }}. $$

In which \( m_{1} = 3,\,m_{2} = 5,\,r = 0.175,\,l = 0.094,\,g = 9.81 \). The desired output vector \( x_{d} = \left[ {\begin{array}{*{20}c} {20} & 0 & 0 & 0 \\ \end{array} } \right]^{T} \), the initial conditions \( X(0) = \left[ {\begin{array}{*{20}c} {0.5} & 0 & 0 & 0 \\ \end{array} } \right]^{T} \).

The fuzzy systems \( \theta_{1}^{T} \psi_{1} (X) \) and \( \theta_{2}^{T} \psi_{2} (X) \) have the state vector X as input. For each input variable of these fuzzy systems, we defined three (triangular and trapezoidal) membership functions uniformly distributed on the interval [−10, 10]. Therefore, the number of fuzzy rules used in each fuzzy system is 81.

The design parameters are chosen as follows: \( \gamma_{{\theta_{1} }} = 600,\gamma_{{\theta_{2} }} = 600,\gamma_{v} = 0.5, \) \( \gamma_{\delta } = 0.005,\,k_{1} = k_{2} = 1,k_{3} = 2 \). The initial conditions of the adaptive parameters are chosen as \( \delta (0) = 1,\theta_{1} (0) = \theta_{2} (0) = 0,\,v_{r} (0) = 0.1 \).

Figure 2 shows the simulation results obtained with the proposed adaptive fuzzy sliding mode control law. It demonstrates that AFSMC can control all states of spherical robot to their desired states.

Fig. 2.
figure 2

Output states of spherical robot.

Figure 3 illustrates the convergence towards zero of the sliding mode surfaces and the tracking errors as well as the boundedness of the control signals.

Fig. 3.
figure 3

Curves of all sliding surfaces and trajectories errors and curves of control input.

Figure 4 illustrates the boundedness of the norm of fuzzy parameters.

Fig. 4.
figure 4

Norm of fuzzy parameters.

5 Conclusion

In this paper, an adaptive fuzzy sliding mode controller is developed for a class of underactuated systems. The adaptive fuzzy systems are used to approximate the unknown non-linear functions. The adaptive learning algorithms are constructed based on Lyapunov stability analysis. The numerical simulations have been carried out to evaluate the performance of the proposed controller.