1 Introduction

The control of wheeled inverted pendulum (WIP) has invoked a lot of research interests in recent years [112]. Typical applications of the WIP system include the baggage transportation and navigation [13]. In general, WIP has two torque inputs driving both wheels and three degrees of freedom (DOF), including the forward and rotation of the platform, and the tilt angle of the pendulum, i.e., it follows an underactuated configuration. In addition, its dynamics is also nonlinear such that the WIP becomes an underactuated nonlinear system [1, 2, 5, 1416]. Various control methods have been proposed for the nonholonomic/underactuated systems in past years [8, 1720, 26]. A neural network-based nonlinear control for a nonholonomic mobile robot was proposed in [8]. A passivity-based control using interconnection and damping assignment was proposed for underactuated mechanical systems in [19]. A nonlinear control was designed for the mechanical system with an unactuated cyclic variable in [20]. For the high-order nonholonomic systems which described in the power chained form, a discontinuous feedback-based control was proposed in [21]. A bidirectional approach-based path planning was presented for a class of nonholonomic space robots in [22]. Path planning for space manipulators which contain nonholonomic behavior was presented in [23]. These applications were restricted to certain kinds of field robots such as unmanned aerial vehicles [24], snake-like robots [25], unmanned ground vehicles [8], the human–robot interaction system [27] and crawling robots [28]. One may compare link WIP systems with the cart and pendulum systems [29], which seems quite similar at the first glance. However, there are major distinctions between these two kinds of systems, e.g., WIP system is driven by two wheels and its motion is not only on the horizontal plane but also on the vertical plane. In addition, the motors that drive the wheels are mounted on the pendulum body directly [5], while the actuator does not directly drive the pendulum in the cart.

For the control of WIP system, numerous existing control designs are based on the model linearization. A linear robust controller for the WIP system was presented in [30], where the yaw angle was not considered in the control design. A linear controller based on the planar model was developed in [31]. Furthermore, the feedback linearization method has also been employed in the WIP control in [5], where the position controller is designed based on a two-level velocity control. These linear model-based design may ignore some nonlinearities of the WIP system in the practical applications. In addition, there are always some model parameters of the WIP system with uncertainties, e.g., the rider’s mass is not available for the control design and can be changed from time to time. To overcome these challenges, fuzzy approximation-based control was proposed for the WIP in [11, 15, 16], where the control is designed directly based on the nonlinear model. In fact, fuzzy approximation or the neural network approximation-based nonlinear control have been widely used in the control of system with uncertainties and unknown disturbances [32, 3237]. The representative works on the WIP control are [1, 15, 16, 38, 39]. A novel adaptive robust motion control considering the parametric and functional model uncertainties of WIP was presented in [38], where the output error of the WIP converges to a neighborhood of zero. In [1], a recurrent cerebellar model articulation control was proposed for the WIP, where the output feedback case is considered. Sliding mode-based control for the velocity tracking of the WIP systems was presented in [9]. Other recurrent cerebellar model articulation-based controls for WIP were reported in [40, 41], where the basic idea is the same as the neural network-based intelligent control while the model uncertainties and external disturbances estimated along with the control design [26]. An output feedback adaptive neural network (NN)-based adaptive control was proposed for the WIP system in [7], where a linear dynamic compensator is employed. Both the stable dynamic balance and the trajectory tracking of the WIP system are achieved in [7].

Motivated by [16, 38], we design the controller for the WIP based on the nonlinear model derived by Lagrangian approach in this paper. Through a coordinate transformation, we divide the system into three sub-systems and employ the backstepping method to design the adaptive control for each sub-system individually. The remainder of this work is organized as follows. Some preliminaries and the problem formulation are introduced in Sect. 2. The adaptive backstepping control design is presented in Sect. 3, followed by the simulation studies in Sect. 4. Conclusions and remarks are drawn in Sect. 5.

2 System description

In this work, the dynamics of the WIP model is described as follows [10].

$$\begin{aligned} M(q)\ddot{q} \!+\! V(q,\dot{q})\dot{q} \!+\! F(\dot{q}) \!+\! G(q)\!+\! D \!=\! B(q)\tau +f \nonumber \\ \end{aligned}$$
(1)

where \(q\in \mathbb {R}^4\) is the generalized coordinates vector and \(q_1=x\), \(q_2=y\), \(q_3 = \theta \) and \(q_4=\alpha \). The definitions of the symbols are shown in Table 1.

Table 1 Nomenclature

Define \(q=[q_v^T,\alpha ]^T\), where the new vector \(q_v=[x,y, \theta ]^T\), we have

$$\begin{aligned} M(q)&= \left[ \begin{array}{llll} M_v &{} M_{v\alpha } \\ M_{\alpha v} &{} M_{\alpha } \end{array}\right] , V(q,\dot{q})=\left[ \begin{array}{llll} V_{v} &{} V_{v\alpha } \\ V_{\alpha v} &{} V_{\alpha } \end{array}\right] ,\\ G(q)&= \left[ \begin{array}{llll} G_v \\ G_{\alpha } \end{array}\right] , F(\dot{q})=\left[ \begin{array}{llll} f_v \\ f_{\alpha } \end{array}\right] , D=\left[ \begin{array}{llll} d_v \\ d_{\alpha } \end{array}\right] \\ B(q)&= \left[ \begin{array}{llll} B_v &{} 0 \\ 0 &{} B_{\alpha } \end{array}\right] , \tau =\left[ \begin{array}{llll} \tau _v \\ 0 \end{array}\right] , \end{aligned}$$

In this work, we consider that the WIP system is subjected to the nonholonomic constraints. In practical applications, we can adopt the approach that produce sufficient frictions between the wheels of the platform and the ground. In such case, we can assume that the nonholonomic constraints are available for the control design. In addition, due to the fact that the angular displacements of the wheels can be represented by the position coordinates \(x\) and \(y\), it is reasonable to use \(x\) and \(y\) as the generalized coordinates for the WIP system.

2.1 Reduced dynamics

Define \(J_v\) as the nonholonomic constraints-related kinematic constraint matrix, the nonholonomic constraints on the vehicles can be described as [10]

$$\begin{aligned} J_v\dot{q}_v=0 \end{aligned}$$
(2)

The constraints can be written as \(\Omega _{n}=\big \{ (q_v,\dot{q}_v)| J_v\dot{q}_v=0 \big \}\), which means a restriction of the dynamics on the manifold \(\Omega _{n}\) is added.

It is possible to find a full rank matrix \(\Phi =[\Phi _1(q), ~\Phi _{2}(q)]\in R^{3\times 2}\), where \(\Phi _1(q)\) and \(\Phi _{2}(q)\) are linearly independent smooth vector fields satisfying \( \Phi ^TJ_v^T=0 \) [39]. In detail, \(J_v = [0, \sin (\theta ), -\cos (\theta )]\) and \(\Phi \) can be written as

$$\begin{aligned} \Phi =\left[ \begin{array}{ll} 1 &{}\quad 0 \\ 0 &{}\quad \cos (\theta ) \\ 0 &{}\quad \sin (\theta ) \\ \end{array} \right] \end{aligned}$$
(3)

Now we can define a new vector \(\dot{\eta }=[\omega , v]^T\in \mathbb {R}^{2}\), and thus have

$$\begin{aligned} \dot{q}_v=\Phi (q)\dot{\eta }. \end{aligned}$$
(4)

Define \(\zeta =[\eta ^T, \alpha ]^T\), we have \(\dot{\zeta }=[\omega , v, \dot{\alpha }]^T\), i.e., \(\dot{\zeta }_1=\omega \), \(\dot{\zeta }_2=v\), and \(\dot{\zeta }_3=\dot{\alpha }\). Define a new matrix \(\bar{\Phi } = \mathrm{diag}[\Phi ^T,I] = \left[ \begin{array}{llll} 1 &{} 0 &{} 0 &{} 0 \\ 0 &{} \cos \theta &{} \sin \theta &{} 0 \\ 0 &{} 0 &{} 0 &{} 1 \\ \end{array} \right] \), while both sides of (1) multiply by \(\bar{\Phi }\), \(J_v^T\) will be eliminated. Then, we can write the WIP dynamics as

$$\begin{aligned} M_1(\zeta ) \ddot{\zeta }+V_1(\zeta ,\dot{\zeta })\dot{\zeta }+F_1(\dot{\zeta })+G_1(\zeta )+D_1=B_1\tau \nonumber \\ \end{aligned}$$
(5)

where

$$\begin{aligned} M_1(\zeta )&= \left[ \begin{array}{llll} \Phi ^TM_v\Phi &{} \Phi ^TM_{v\alpha } \\ M_{\alpha v}\Phi &{} M_{\alpha } \end{array}\right] ,\\ V_1(\zeta ,\dot{\zeta })&= \left[ \begin{array}{llll} \Phi ^TM_v\dot{\Phi }+\Phi ^TV_v\Phi &{} \Phi ^TV_{v\alpha } \\ M_{\alpha v} \dot{\Phi }+ V_{\alpha v}\Phi &{} V_{\alpha } \end{array}\right] , \\ G_1(\zeta )&= \left[ \begin{array}{llll} \Phi ^TG_v \\ G_{\alpha } \end{array}\right] , F_1(\dot{\zeta })=\left[ \begin{array}{llll} \Phi ^TF_v \\ F_{\alpha } \end{array}\right] ,\\ D_1&= \left[ \begin{array}{llll} \Phi ^Td_v \\ d_{\alpha } \end{array}\right] , B_1\tau = \left[ \begin{array}{llll} \Phi ^TB_v \tau _v \\ 0 \end{array}\right] . \end{aligned}$$

Similar to [16], the control objective of this work can be formulated as follows. Designing a control for the WIP system ensures that \(|\zeta _1(t)-\zeta _{1d}(t)| \le \epsilon _1,~|\zeta _3(t)-\zeta _{3d}(t)| \le \epsilon _3\), \(t\rightarrow \infty \), where \(\zeta _{1d}(t)\) and \(\zeta _{3d}(t)\) are the desired trajectories for \(\zeta _1(t)\) and \(\zeta _3(t)\), respectively, and \(\epsilon _j>0,~j=1,3\) are small constants. In the meantime, all the closed-loop signals of the system must be bounded. Without loss of generality, it is assumed that \(\zeta _{1d}(t)\), \(\zeta _{3d}(t)\) and whose time derivatives up to the third order are bounded and continuously differentiable.

Remark 1

In this paper, it is expected to maintain \(\zeta _{3d}=0\) and \(\dot{\zeta }_{3d}=0\) for the WIP.

Assumption 1

The friction force, \(F_1(\dot{\zeta })= [f_1, f_2, f_3]^T\), acts on each vector independently, and it is a function of the velocity. \(F_1\) can be written as \(F_1(\dot{\zeta })=\mathcal {B}\dot{\zeta }\), where \(\mathcal {B}\) is a positive definite diagonal matrix.

2.2 System transformation

According to the structure of the dynamics of the WIP system, we have

$$\begin{aligned} M_1(\zeta )&= \left[ \begin{array}{lll} m_{11}(\zeta _3) &{} 0 &{} 0 \\ 0 &{} m_{22} &{} m_{23}(\zeta _3) \\ 0 &{} m_{23}(\zeta _3) &{} m_{33} \end{array}\right] , \nonumber \\ V_1(\zeta ,\dot{\zeta })&= \left[ \begin{array}{lll} v_{11} &{} 0 &{} v_{13} \nonumber \\ 0 &{} 0 &{} v_{23}\\ v_{31} &{} 0 &{} 0 \end{array}\right] \nonumber \\ F_1(\dot{\zeta })&= \left[ \begin{array}{l} f_1\\ f_2\\ f_3\end{array}\right] , D_1 = \left[ \begin{array}{l} d_1\\ d_2 \\ 0 \end{array}\right] G_1(\zeta ) = \left[ \begin{array}{l} g_1(\zeta ) \\ g_2(\zeta ) \\ g_3(\zeta ) \end{array}\right] ,\nonumber \\ B_1 \tau&= \left[ \begin{array}{ll} \tau _{1} \\ \tau _{2} \\ 0 \end{array}\right] \end{aligned}$$
(6)

where \(m_{22}\) and \(m_{33}\) are unknown constants, \(m_{11}(\zeta _3), m_{23}(\zeta _3)\)\(v_{11}\),  \(v_{13}\),  \(v_{23}\), \(v_{31}\), \(f_i\), \(g_i(\zeta )\), \(i=1,\ldots ,3\), and \(d_1,d_2\) are unknown continuous functions.

Property 1

From (6), we can find that both \(m_{12}\) and \(m_{13}\) are all zero in the inertia matrix \(M_1(\zeta )\), this is because the vertical inertia and the rotational inertia are decoupled with respected to the vertical axis. In addition, both \(m_{11}(\zeta _3)\) and \(\frac{m_{22}m_{33}-m_{23}^2(\zeta _3)}{m_{33}}\) are positive due to the positive definite of \(M_1(\zeta )\). \(\dot{M}_1-2V_1\) is skew-symmetric, which follows that \(\frac{d}{dt} (m_{11}(\zeta _3))-2v_{11}=0\).

Remark 2

From the Lagrangian formulation, we know that \(v_{23}\) is relevant to \(\sin (\zeta _3)\) and \(\dot{\zeta }_3\), and \(v_{31}\) is relevant to \(\sin (2\zeta _3)\).

It is clear that \(\ddot{\zeta }_2\) and \(\ddot{\zeta }_3\) are coupled from (1) and (6). Thus, it is difficult to design the controller based on (1) directly. By using the physical properties of the WIP model and a simple transformation of (6), three subsystems, namely \(\zeta _1\)-subsystem, \(\zeta _2\)-subsystem, and \(\zeta _3\)-subsystem can be obtained, which can be described as follows [42].

$$\begin{aligned}&m_{11}(\zeta _3)\ddot{\zeta }_1 + v_{11}\dot{\zeta }_1+v_{13}\dot{\zeta }_3+g_{1}+f_1+d_1= \tau _1 \end{aligned}$$
(7)
$$\begin{aligned}&\frac{m_{22}m_{33}\!-\!m_{23}^2(\zeta _3)}{m_{33}}\ddot{\zeta }_2\!+\!v_{23}\dot{\zeta }_3 \nonumber \\&\quad \!+\,\frac{m_{23}(\zeta _3)}{m_{33}}(\!-v_{31}\dot{\zeta }_1\!-\! f_{3}\!-\!g_{3})\!+\!d_2\!+\!f_2\!+\!g_2\!=\!\tau _2 \end{aligned}$$
(8)
$$\begin{aligned}&\frac{m_{22} m_{33}-m_{23}^2(\zeta _3)}{m_{22}}\ddot{\zeta }_3+v_{31}\dot{\zeta }_1 +f_{3} + g_{3} \nonumber \\&\quad +\,\frac{m_{23}(\zeta _3)}{m_{22}}( \tau _2 - v_{23}\dot{\zeta }_3-d_2-f_2-g_2)=0 \end{aligned}$$
(9)

From the above equations, we can further have

$$\begin{aligned}&m_{11}(\zeta _3)\ddot{\zeta }_1\!+\! v_{11}\dot{\zeta }_1\!+\!v_{13}\dot{\zeta }_3\!+\!g_{1}+f_1 +d_1= \tau _1 \end{aligned}$$
(10)
$$\begin{aligned}&\frac{m_{22}m_{33}-m_{23}^2(\zeta _3)}{m_{33}}\ddot{\zeta }_2-\frac{m_{23}(\zeta _3)}{m_{33}}(v_{31}\dot{\zeta }_1+f_{3}+ g_{3})\nonumber \\&\quad -\,(\tau _2- v_{23}\dot{\zeta }_3-d_2-f_2-g_2)= 0 \end{aligned}$$
(11)
$$\begin{aligned}&\frac{m_{22} m_{33}-m_{23}^2(\zeta _3)}{m_{23}(\zeta _3)}\ddot{\zeta }_3-v_{23}\dot{\zeta }_3\nonumber \\&\quad \!+\frac{m_{22}}{m_{23}(\zeta _3)}(v_{31}\dot{\zeta }_1\!+\!f_{3}\!+\!g_{3})\!-\!(f_2\!+\!g_2\!+\!d_2)\!=\!-\tau _2 \end{aligned}$$
(12)

Define \(x_1={\zeta }_1\), \(x_2=\dot{\zeta }_1\), \(x_3={\zeta }_3\), and \(x_4=\dot{\zeta }_3\), then Eqs. (10) and (11) can be transformed into a general form as below:

$$\begin{aligned} \dot{x}_1&= x_2 \end{aligned}$$
(13)
$$\begin{aligned} \dot{x}_2&= -\frac{v_{11}}{m_{11}(x_3)}x_2-\frac{v_{13}}{m_{11}(x_3)}x_4\nonumber \\&\quad -\,\frac{g_{1}}{m_{11}(x_3)} -\frac{f_1}{m_{11}(x_3)}\nonumber \\&\quad -\,\frac{d_1}{m_{11}(x_3)}+\frac{1}{m_{11}(x_3)}\tau _1 \end{aligned}$$
(14)
$$\begin{aligned} \dot{x}_3&= x_4 \end{aligned}$$
(15)
$$\begin{aligned} \dot{x}_4&= \frac{m_{23}(x_3)}{m_{22} m_{33}-m_{23}^2(x_3)}v_{23}x_4\nonumber \\&\quad -\,\frac{m_{22}}{m_{22} m_{33}-m_{23}^2(x_3)}(v_{31}x_2+ f_{3} + g_{3}) \nonumber \\&\quad +\,\frac{m_{23}(x_3)}{m_{22} m_{33}-m_{23}^2(x_3)}(f_2+g_2+d_2)\nonumber \\&\quad -\,\frac{m_{23}(x_3)}{m_{22} m_{33}-m_{23}^2(x_3)}\tau _2 \end{aligned}$$
(16)

We put the nonlinear parts \(h_1(\zeta , \dot{\zeta }, t)= {v_{11}}\dot{\zeta }_1+ {v_{13}} \dot{\zeta }_3 + {g_{1}}+ {f_1} + {d_1}\) in (14) and \(h_2(\zeta , \dot{\zeta }, t)=m_{23}v_{23}\dot{\zeta }_3 -{m_{22}}(v_{31}\dot{\zeta }_1+f_{3} + g_{3}) +{m_{23}}(f_2+g_2+d_2)\) in (16) into a parameterized formulation as follows.

$$\begin{aligned} h_1(\zeta , \dot{\zeta }, t)&= \theta _1^T \Psi _1 (\zeta , \dot{\zeta }) \end{aligned}$$
(17)
$$\begin{aligned} h_2(\zeta , \dot{\zeta }, t)&= \theta _2^T \Psi _2 (\zeta , \dot{\zeta }) \end{aligned}$$
(18)

where \(\theta _i,~i=1,2\) is the uncertain parameter vector needs to be estimated, and \(\Psi _i (\zeta , \dot{\zeta }),~i=1,2 \) is the regressor matrix depending on \(\zeta =[\zeta _1, \zeta _2, \zeta _3]^T\) and \(\dot{\zeta }=[\dot{\zeta }_1, \dot{\zeta }_2, \dot{\zeta }_3]^T\).

3 Adaptive backstepping control design

We develop a backstepping-based adaptive control for the WIP system with parameter uncertainties in this section. As one of the most popular design methods for the nonlinear system control design, backstepping has been widely used in the robot control, and in the control of manipulators. To facility the control design, we first change the coordinates of the system.

3.1 \(\zeta _1\)-Subsystem

Step 1. Define the error \(z_1(t)=x_1(t)-{\zeta }_{1d}(t)\). Its derivative can be written as

$$\begin{aligned} \begin{array}{l} \dot{z}_1(t) = z_2(t) + \alpha _1(t) \end{array} \end{aligned}$$
(19)

where \(z_2(t) = x_2(t) - \dot{\zeta }_{1d}(t) - \alpha _1(t)\), \(\alpha _1(t)\) is a virtual control to be defined as

$$\begin{aligned} \begin{array}{l} \alpha _1(t) = - c_1 z_1(t) \end{array} \end{aligned}$$
(20)

where \(c_1 \in \mathbb {R}^+\). For concise, we omit the \(t\) for the variables. Substituting (20) into (19), we have

$$\begin{aligned} \begin{array}{l} \dot{z}_1 = z_2 - c_1z_1 \end{array} \end{aligned}$$
(21)

To stabilize the \(z_1\) subsystem (19), following Lyapunov function candidate is chosen.

$$\begin{aligned} \begin{array}{l} V_1 = \frac{1}{2}z_1^2 \end{array} \end{aligned}$$
(22)

The time derivative of \(V_1\) along the solution of (21) can be written as

$$\begin{aligned} \begin{array}{l} \dot{V}_1 = z_1 \dot{z}_1 = z_1 \left( {z_2 + \alpha _1 } \right) = z_1 z_2 + z_1 \alpha _1 \end{array} \end{aligned}$$
(23)

The closed-loop form of (23) with (20) is given by

$$\begin{aligned} \begin{array}{l} z_1 \dot{z}_1 = - c_1 z_1^2 + z_1 z_2 \end{array} \end{aligned}$$
(24)

Step 2. The derivative of \(z_2= x_2 - \dot{\zeta }_{1d} - \alpha _1\) can be described as

$$\begin{aligned} \dot{z}_2&= \frac{1}{m_{11}} \left( \tau _1- h_1\right) - \ddot{\zeta }_{1d} - \dot{\alpha }_1 \end{aligned}$$
(25)

Now we select the control as follows.

$$\begin{aligned} \tau _{1}&= \hat{m}_{11} \bar{\tau }_{1} + \hat{h}_{1} \end{aligned}$$
(26)
$$\begin{aligned} \bar{\tau }_{1}&= - c_{2} z_{2} - z_{1} + \ddot{\zeta }_{1d} + \dot{\alpha }_{1} \end{aligned}$$
(27)

where \(c_2 \in \mathbb {R}^+\), \(\hat{m}_{11} \) and \(\hat{h}_1\) are the estimates of unknown items \(m_{11}\) and \(h_1\), respectively.

Substituting (26) into (25), we have

$$\begin{aligned} \dot{z}_2 \!=\! \frac{1}{m_{11}}\hat{m}_{11} \bar{\tau }_1\!+\! \frac{1}{m_{11}} \left( \hat{h}_1\!-\!h_1\right) \!-\! \ddot{\zeta }_{1d}- \dot{\alpha }_1 \end{aligned}$$
(28)

Theorem 1

For the closed-loop system consisting of system dynamics (1), and the control law (26), we choose the updated law of \(\hat{\theta }_1\) and \(\hat{m}_{11}\) as

$$\begin{aligned} \dot{\hat{\theta }}_{1} = -\Gamma \Psi _1 z_2\end{aligned}$$
(29)
$$\begin{aligned} \dot{\hat{m}}_{11} = - \gamma \bar{\tau }_1 z_2 \end{aligned}$$
(30)

where \(\gamma \in \mathbb {R}^+\) and \(\Gamma =\Gamma ^T>0\) are designed parameters, \(\hat{\theta }_1 \) is the estimation of the unknown parameter \(\theta _1\). Then, \(z_1=0\) will be a globally uniformly stable equilibrium of the closed-loop system. This ensures the global boundedness of the state \(x_1\), the parameter estimation \(\hat{\theta }_1\), \(\hat{m}_{11}\), and the control \(\tau _1\), and \(\lim _{t \rightarrow \infty } z_1(t)=0\), i.e., \( \lim _{t \rightarrow \infty }[\zeta _1(t)-\zeta _{1d}(t)]=0 \)

Proof

Select the following Lyapunov function candidate.

$$\begin{aligned} V_2\!&= \!\frac{1}{2}z_1^2 \!+\! \frac{1}{2}z_2^2 \!+\! \frac{1}{2m_{11}}\tilde{\theta }_1^T \Gamma ^{ - 1} \tilde{\theta }_1 \!+\! \frac{1}{{2\gamma m_{11}}}\tilde{m}_{11}^2 \end{aligned}$$
(31)

where \(\tilde{m}_{11} = m_{11} - \hat{m}_{11}\), \( \tilde{\theta }_1 = \theta _1 - \hat{\theta }_1 \). The time derivative of \(V_1\) along (24) and (28) can be written as

$$\begin{aligned} \dot{V}_2&= z_1\dot{z}_1+ z_2\dot{z}_2+ \frac{1}{m_{11}}\tilde{\theta }_1^T \Gamma ^{-1} \dot{\tilde{\theta }}_1 + \frac{1}{\gamma m_{11}}\tilde{m}_{11} \dot{\tilde{m}}_{11} \nonumber \\&= -c_1z_1^2+ z_2\left( \frac{1}{m_{11}}(\tau _1-h_1)+z_1-\ddot{\zeta }_{1d}- \dot{\alpha }_1\right) \nonumber \\&\quad + \, \frac{1}{m_{11}}\tilde{\theta }_1^T \Gamma ^{-1}\dot{\tilde{\theta }}_1 + \frac{1}{\gamma m_{11}}\tilde{m}_{11} \dot{\tilde{m}}_{11} \nonumber \\&= -c_1z_1^2+ z_2\left( \frac{1}{m_{11}}(\tau _1-h_1)-c_2z_2-\bar{\tau }_1\right) \nonumber \\&\quad +\,\frac{1}{m_{11}} \tilde{\theta }_1^T \Gamma ^{-1}\dot{\tilde{\theta }}_1 + \frac{1}{\gamma m_{11}}\tilde{m}_{11} \dot{\tilde{m}}_{11} \nonumber \\&= \!-c_1z_1^2\!-\!c_2z_2^2\!+\!z_2\left( \frac{1}{m_{11}}( \hat{m}_{11} \bar{\tau }_1 \!+\! \hat{h}_1-h_1)\!-\!\bar{\tau }_1\right) \nonumber \\&+\, \frac{1}{m_{11}}\tilde{\theta }_1^T \Gamma ^{-1}\dot{\tilde{\theta }}_1 + \frac{1}{\gamma m_{11}}\tilde{m}_{11} \dot{\tilde{m}}_{11} \nonumber \\&= -c_1z_1^2-c_2z_2^2+\frac{1}{m_{11}}z_2\left( - \tilde{m}_{11} \bar{\tau }_1 -\tilde{\theta }_1^T\Psi _1\right) \nonumber \\&\quad + \,\frac{1}{m_{11}}\tilde{\theta }_1^T \Gamma ^{-1}\dot{\tilde{\theta }}_1 + \frac{1}{\gamma m_{11}}\tilde{m}_{11} \dot{\tilde{m}}_{11} \end{aligned}$$
(32)

Due to the fact that \( \dot{\tilde{\theta }}_1= -\dot{\hat{\theta }}_1\), and \(\dot{\tilde{m}}_{11}=-\dot{\hat{m}}_{11}\), we have

$$\begin{aligned} \dot{V}_2&= -c_1z_1^2-c_2z_2^2-\frac{1}{m_{11}}\tilde{m}_{11}(z_2 \bar{\tau }_1+\frac{1}{\gamma }\dot{\hat{m}}_{11})\nonumber \\&\quad - \,\frac{1}{m_{11}}\tilde{\theta }_1^T( \Psi _1z_2+\Gamma ^{-1}\dot{\hat{\theta }}_1)\nonumber \\&= -c_1z_1^2-c_2z_2^2 \end{aligned}$$
(33)

The error Eq. (28) is corresponding to the closed-loop system. It consists of plant dynamics (1), the parameter update laws (29), (30), and the control (26). The time derivation of (31) along the (24) and (28) results in (33), which implies the globally uniformly stable of the equilibrium \(z_1=0\). \(\square \)

From Eqs. (31) and (33), we can conclude that \(\tilde{\theta }_1\) and \(\tilde{m}_{11}\) are bounded. we can find that \(x_1\) is also bound due to the boundedness of \(z_1\) and \(\zeta _{1d}\). The boundedness of \(x_1\) follows from the boundedness of \(\alpha _1\), which is defined in (20) and \(\zeta _{1d}\), i.e., \(x_2= z_2- \dot{\zeta }_{1d}- \alpha _1\). Therefore, \(\tau _1\) is bounded according to (26) because of the boundedness of \(z_1\), \(z_2\), \(\hat{\theta }_1\), and \(\hat{m}_{11}\). Using the LaSalle–Yoshizawa theorem [43], we can obtain \(z_i(t)\rightarrow 0,~i=1, 2,~t \rightarrow \infty \), which implies that \( \mathop {\lim }\limits _{t \rightarrow \infty } \left[ {\zeta _1\left( t \right) - \zeta _{1d}\left( t \right) } \right] = 0\).

According to (33), \(V_2\) is nonincreasing, then we have

$$\begin{aligned} \left\| {z_1 } \right\| _2^2&= \int \limits _0^\infty \left| {z_1 \left( \tau \right) } \right| ^2 d\tau \le \frac{1}{{c_1 }}\left[ {V_2\left( 0 \right) - V_2\left( \infty \right) } \right] \nonumber \\&\quad \!\!\!\!\!\! \le \frac{1}{{c_1 }}V_2\left( 0 \right) \end{aligned}$$
(34)

Therefore,

$$\begin{aligned} V_2(0)&= {\frac{1}{2m_{11}}\tilde{\theta }_1^T \left( 0 \right) \Gamma ^{ - 1} \tilde{\theta }_1 \left( 0 \right) + \frac{1}{{2\gamma m_{11}}}\tilde{m}_{11}\left( 0 \right) ^2}\nonumber \\ \end{aligned}$$
(35)

where \(z_1(0)=z_2(0)=0\), \(\gamma \), and \(\Gamma \) are decreasing functions independent of \(c_1\). Then, we can obtain the bounds from (34) and (35) as

$$\begin{aligned} \left\| {z_1 } \right\| _2 \le \frac{1}{{\sqrt{c_1 } }}\sqrt{V_2(0)} \end{aligned}$$
(36)

It is clear that this bound can be reduced either increasing \(c_1\) or increasing \(\gamma \) and \(\Gamma \) simultaneously. From (20) and (19), we have

$$\begin{aligned} \left\| {\dot{x}_1 \!-\! \dot{\zeta }_{1d} } \right\| _2 \!=\! \left\| {z_2 \!-\! c_1 z_1 } \right\| _2 \le \left\| {z_2 } \right\| _2 \!+\! c_1 \left\| {z_1 } \right\| _2 \end{aligned}$$
(37)

Similarly, \(\left\| {z_2} \right\| _2\le \frac{1}{\sqrt{c_1} \sqrt{V_2(0)}}\) can be obtained. Along with (36), we have

$$\begin{aligned}&\left\| {\dot{x}_1 - \dot{\zeta }_{1d}} \right\| _2 \le \left( {\frac{1}{{\sqrt{c_1 } }} + \sqrt{c_1 } } \right) \nonumber \\&\quad \times \,\sqrt{ {\frac{1}{2m_{11}}\tilde{\theta }_1 ^T \left( 0 \right) \Gamma ^{ - 1} \tilde{\theta }_1 \left( 0 \right) + \frac{1}{{2\gamma m_{11}}}\tilde{m}_{11}\left( 0 \right) ^2}}\nonumber \\ \end{aligned}$$
(38)

Remark 3

The following conclusions can be made based on (1):

  1. (i)

    For any positive design parameters \(c_1\), \(c_2\), \(\gamma \), and \(\Gamma \), the signals are guaranteed to be globally and uniformly bounded. For the control design, the priori information of the parameter uncertainties is not required.

  2. (ii)

    To improve the tracking performance, \(c_1\) maybe increased. However, this may result in large velocity tracking error. The small velocity tracking error can be achieved after fixing \(c_1\) to some acceptable value and increasing \(c_2\), \(\gamma \), or \(\Gamma \) simultaneously.

3.2 \(\zeta _3\)-Subsystem

Step 1. Define an error variable \(z_3=x_3-{\zeta }_{3d}\), whose time derivative can be written as

$$\begin{aligned} \begin{array}{l} \dot{z}_3 = z_4 + \alpha _2 \end{array} \end{aligned}$$
(39)

where \(z_4 = x_4 - \dot{\zeta }_{3d} - \alpha _2\), \(\alpha _2\) is a virtual control defined as

$$\begin{aligned} \begin{array}{l} \alpha _2 = - c_3 z_3 \end{array} \end{aligned}$$
(40)

where \(c_3 \in \mathbb {R}^+\) is a constant. Substituting (40) into (39), we have

$$\begin{aligned} \begin{array}{l} \dot{z}_3 = z_4 - c_3z_3 \end{array} \end{aligned}$$
(41)

To stabilize \(z_3\), we select the following Lyapunov function candidate.

$$\begin{aligned} \begin{array}{l} V_3 = \frac{1}{2}z_3^2 \end{array} \end{aligned}$$
(42)

The derivative of \(V_3\) along the solution of (41) can be described as

$$\begin{aligned} \begin{array}{l} \dot{V}_3 = z_3 \dot{z}_3 = z_3 \left( {z_4 + \alpha _2 } \right) = z_3 z_4 + z_3 \alpha _2 \end{array} \end{aligned}$$
(43)

The closed-loop form of (43) with (40) is given by

$$\begin{aligned} z_3 \dot{z}_3 = - c_3 z_3^2 + z_3 z_4 \end{aligned}$$
(44)

Step 2. The time derivative of \(z_4= x_4 - \dot{\zeta }_{3d} - \alpha _2\) can be written as

$$\begin{aligned} \dot{z}_4&= \frac{1}{\varpi } (h_2-\tau _2) - \ddot{\zeta }_{3d} - \dot{\alpha }_2 \end{aligned}$$
(45)

where \(\varpi = \frac{m_{22} m_{33}-m_{23}^2(\zeta _3)}{m_{23}(\zeta _3)}\).

We design the following controller.

$$\begin{aligned} \tau _2&= \hat{\varpi }\bar{\tau }_2 + \hat{h}_2 \end{aligned}$$
(46)
$$\begin{aligned} \bar{\tau }_2&= c_4 z_4 + z_3 - \ddot{\zeta }_{3d} - \dot{\alpha }_2 \end{aligned}$$
(47)

where \(c_4 \in \mathbb {R}^+\) is a designed constant, \(\hat{\varpi }\) and \(\hat{h}_2\) are the estimates of the unknown parameters \(\varpi \) and \(h_2\), respectively. Substituting (46) into (45), we have

$$\begin{aligned} \dot{z}_4 = -\frac{1}{\varpi }\hat{\varpi }\bar{\tau }_2+ \frac{1}{\varpi } (h_2-\hat{h}_2) - \ddot{\zeta }_{3d}- \dot{\alpha }_2 \end{aligned}$$
(48)

Theorem 2

For the closed-loop system consisting of system dynamics (1), and the control law (46), we choose the parameter update law as

$$\begin{aligned} \dot{\hat{\theta }}_{2}&= \Lambda \Psi _2 z_4\end{aligned}$$
(49)
$$\begin{aligned} \dot{\hat{\varpi }}&= \lambda \bar{\tau }_2 z_4 \end{aligned}$$
(50)

where \(\lambda \in \mathbb {R}^+\) is a designed constant, and \(\hat{\theta }_2 \) is the estimates of unknown paramater \(\theta _2\). \(\Lambda =\Lambda ^T>0\) is a dimensionally compatible constant matrix. Then \(z_3=0\) will be a globally uniformly stable equilibrium of the closed-loop system. It follows that \(x_3\), \(\tau _2\), \(\hat{\theta }_2\), and \(\hat{\varpi }\) are bounded, and \(\lim _{t \rightarrow \infty } z_3(t)=0\), i.e., \( \lim _{t \rightarrow \infty }[\zeta _3(t)-\zeta _{3d}(t)]=0.\)

Proof

Select the following Lyapunov function candidate.

$$\begin{aligned} V_4&= \frac{1}{2}z_3^2 + \frac{1}{2}z_4^2 + \frac{1}{2\varpi }\tilde{\theta }_2^T \Lambda ^{ - 1} \tilde{\theta }_2 + \frac{1}{{2\lambda \varpi }}\tilde{\varpi }^2 \end{aligned}$$
(51)

where \(\tilde{\varpi }= \varpi - \hat{\varpi }\), \( \tilde{\theta }_2 = \theta _2 - \hat{\theta }_2 \). The time derivative of \(V_3\) along (44) and (48) can be written as

$$\begin{aligned} \dot{V}_2&= z_3\dot{z}_3+ z_4\dot{z}_4+ \frac{1}{\varpi }\tilde{\theta }_2^T \Lambda ^{-1} \dot{\tilde{\theta }}_2 + \frac{1}{\lambda \varpi }\tilde{\varpi }\dot{\tilde{\varpi }} \nonumber \\&= -c_3z_3^2+ z_4( \frac{1}{\varpi }(h_2-\tau _2)+z_3-\ddot{\zeta }_{3d}- \dot{\alpha }_2) \nonumber \\&\quad +\, \frac{1}{\varpi }\tilde{\theta }_2^T \Lambda ^{-1}\dot{\tilde{\theta }}_2 + \frac{1}{\lambda \varpi }\tilde{\varpi }\dot{\tilde{\varpi }} \nonumber \\&= -c_3z_3^2+ z_4( \frac{1}{\varpi }(h_2-\tau _2)-c_4z_4+\bar{\tau }_2)\nonumber \\&\quad +\,\frac{1}{\varpi } \tilde{\theta }_2^T \Lambda ^{-1}\dot{\tilde{\theta }}_2 + \frac{1}{\lambda \varpi }\tilde{\varpi }\dot{\tilde{\varpi }} \nonumber \\&= \!-c_3z_3^2\!-\!c_4z_4^2\!+\!z_4( \frac{1}{\varpi }( -\hat{\varpi }\bar{\tau }_2+ h_2 - \hat{h}_2)+\bar{\tau }_2)\nonumber \\&\quad + \,\frac{1}{\varpi }\tilde{\theta }_2^T \Lambda ^{-1}\dot{\tilde{\theta }}_2 + \frac{1}{\lambda \varpi }\tilde{\varpi }\dot{\tilde{\varpi }} \nonumber \\&= -c_3z_3^2-c_4z_4^2+\frac{1}{\varpi }z_4( \tilde{\varpi }\bar{\tau }_2 +\tilde{\theta }_2^T\Psi _2) \nonumber \\&\quad + \,\frac{1}{\varpi }\tilde{\theta }_2^T \Lambda ^{-1}\dot{\tilde{\theta }}_2 + \frac{1}{\lambda \varpi }\tilde{\varpi }\dot{\tilde{\varpi }} \end{aligned}$$
(52)

Since \( \dot{\tilde{\theta }}_2= -\dot{\hat{\theta }}_2\), and \(\dot{\tilde{\varpi }}=-\dot{\hat{\varpi }}\), we have

$$\begin{aligned} \dot{V}_4&= -c_3z_3^2-c_4z_4^2+\frac{1}{\varpi }\tilde{\varpi }(z_4 \bar{\tau }_2-\frac{1}{\lambda }\dot{\hat{\varpi }}) \nonumber \\&\quad +\,\frac{1}{\varpi }\tilde{\theta }_2^T( \Psi _2z_4-\Lambda ^{-1}\dot{\hat{\theta }}_2)\nonumber \\&= -c_3z_3^2-c_4z_4^2 \end{aligned}$$
(53)

The error Eq. (48) corresponds to the closed-loop system, which consists of plant dynamics (1), the parameter update laws (49), (50), and the controller (46). The time derivative of Lyapunov function (51) along (44) and (48) results in (53), which implies the globally uniformly stable of the equilibrium \(z_3=0\). \(\square \)

From Eqs. (51) and (53), we can conclude that \(\tilde{\theta }_2\) and \(\tilde{\varpi }\) are bounded. \(x_3\) is also bounded due to the boundedness of \(z_3=x_3 - \zeta _{3d}\) and \(\zeta _{3d}\). It follows that \(\alpha _2\) is bounded, which is defined in (40) and \(\zeta _{3d}\), i.e., \(x_4= z_4- \dot{\zeta }_{3d}- \alpha _2\). Therefore, \(\tau _2\) is bounded because of the boundedness of \(z_3\), \(z_4\), \(\hat{\theta }_2\),and \(\hat{\varpi }\). By applying the LaSalle-Yoshizawa theorem [43], we have \(z_i(t)\rightarrow 0,~i=3, 4,~t \rightarrow \infty \), which implies that \( \mathop {\lim }\limits _{t \rightarrow \infty } \left[ {\zeta _3\left( t \right) - \zeta _{3d}\left( t \right) } \right] = 0\).

From (53), we can find that \(V_4\) is nonincreasing, then

$$\begin{aligned} \left\| {z_3 } \right\| _2^2&= \int \limits _0^\infty \left| {z_3 \left( \tau \right) } \right| ^2 d\tau \le \frac{1}{{c_3 }}\left[ {V_4\left( 0 \right) - V_4\left( \infty \right) } \right] \nonumber \\&\quad \le \frac{1}{{c_3 }}V_4\left( 0 \right) \end{aligned}$$
(54)

Therefore, we have

$$\begin{aligned} V_4(0)&= {\frac{1}{2\varpi }\tilde{\theta }_2^T \left( 0 \right) \Lambda ^{ - 1} \tilde{\theta }_2 \left( 0 \right) + \frac{1}{{2\lambda \varpi }}\tilde{\varpi }\left( 0 \right) ^2} \end{aligned}$$
(55)

where \(z_3(0)=z_4(0)=0\), \(\lambda \), and \(\Lambda \) are decreasing functions independent of \(c_3\). This implies that the bounds

$$\begin{aligned} \left\| {z_3 } \right\| _2 \le \frac{1}{{\sqrt{c_3 } }}\sqrt{V_4(0)} \end{aligned}$$
(56)

can be asymptotically reduced either increasing \(c_3\) or increasing \(\lambda \) and \(\Lambda \) simultaneously. From (39) and (40), we have

$$\begin{aligned} \left\| {\dot{x}_3 - \dot{\zeta }_{3d} } \right\| _2 = \left\| {z_4 - c_3 z_3 } \right\| _2 \le \left\| {z_4 } \right\| _2 + c_3 \left\| {z_3 } \right\| _2 \end{aligned}$$
(57)

Similarly, \(\left\| {z_4} \right\| _2\le \frac{1}{\sqrt{c_3} \sqrt{V_4(0)}}\) can be obtained. Along with (56), we have

$$\begin{aligned}&\left\| {\dot{x}_3 - \dot{\zeta }_{3d}} \right\| _2 \le \left( {\frac{1}{{\sqrt{c_3 } }} + \sqrt{c_3 } } \right) \nonumber \\&\quad \times \,\sqrt{ {\frac{1}{2\varpi }\tilde{\theta }_2 ^T \left( 0 \right) \Lambda ^{ - 1} \tilde{\theta }_2 \left( 0 \right) + \frac{1}{{2\lambda \varpi }}\tilde{\varpi }\left( 0 \right) ^2}} \end{aligned}$$
(58)

Remark 4

The following conclusions can be made based on (1):

  1. (i)

    For any \(c_3>0\), \(c_4>0\), \(\lambda >0\), and \(\Lambda >0\), the boundedness of signals is guaranteed to be global and uniform. For the control design, the priori information of the parameter uncertainty is not required.

  2. (ii)

    To improve the displacement tracking performance, we may increase \(c_3\). However, this will increase the velocity tracking error. The small velocity tracking error can be achieved after fixing \(c_3\) to some acceptable value and increasing \(c_4\) or \(\lambda \), and \(\Lambda \) simultaneously.

3.3 \(\zeta _2\)-Subsystem

Under the control laws (26) and (46), the \(\zeta _2\)-subsystem (11) can be described as

$$\begin{aligned} \dot{\varphi }= f(\gamma , \varphi , u) \end{aligned}$$
(59)

where \(\varphi = [\zeta _2, \dot{\zeta }_2]^T\), \(\gamma = [\zeta _1, \zeta _3, \dot{\zeta }_1, \dot{\zeta }_3]^T\), and \(u = [\tau _1, \tau _2]^T\).

Assumption 2

[38, 42] The following function is Lipschitz in \(\gamma \), i.e., there are some Lipschitz positive constants \(L_\gamma \) and \(L_f\) satisfying

$$\begin{aligned} \Vert C_{31}\dot{\zeta _1} +g_3+f_3(\dot{\zeta }_3)+d_3\Vert \le L_\gamma \Vert \gamma \Vert + L_f . \end{aligned}$$
(60)

In addition, \(\gamma \) converges to a small neighborhood of \(\gamma _d=[\zeta _{1d}, \zeta _{3d}, \dot{\zeta }_{1d}, \dot{\zeta }_{3d}]^T\) in accordance with the stability analysis of \(\zeta _1\) and \(\zeta _3\) subsystems,

Lemma 1

[38, 42] If \(\zeta _1\)-subsystem and \(\zeta _3\)-subsystem are stable, then the \(\zeta _2\)-subsystem (11) is globally asymptotically stable as well.

Now, it is straightforward to conclude the following theorem.

Theorem 3

Considering the system (1012) with the control laws (26) and (46), for \((\zeta _1(0), \dot{\zeta }_1(0)) \in \Omega _{10}\) and \((\zeta _3(0),\dot{\zeta }_3(0))\in \Omega _{30}\), where \(\Omega _{10}\) and \(\Omega _{30}\) are two compact sets, the tracking errors converge to a set which contains the origin with a rate at least \(e^{-\nu t}\), and all the closed-loop signals are kept to be bounded.

4 Simulation results

In the simulation, we consider a WIP system as shown in Fig. 1. The definitions of the parameters are as follows. \(R\) is the wheels radius, \(L\) is half length of the pendulum, \(D\) is the distance between two wheels, \(M\) is the pendulum and mobile platform mass, \(m\) is the each wheel mass, \(B\) is the ground friction coefficient, \(J_a\) and \(J\) are the inertia moment of the mobile platform and pendulum, and each wheel, respectively, \(g\) is gravity acceleration, \(\theta \) is the angle of the mobile platform, \(\alpha \) is the tilt angle of the pendulum, \(\tau _l\) and \(\tau _r\) are the torques on the left and right wheels, respectively.

The constraints on the WIP system are as follows. \(\dot{x} \sin \theta -\dot{y} \cos \theta =0\). We can obtain the reduced dynamics of \(\alpha \), \(q_v=[\theta , x, y]^T\), \(J_v=[0, \sin \theta , -\cos \theta ]\), and \(\dot{\zeta }=[\omega , \upsilon , \dot{\alpha }]^T\) through the Lagrangian approach. The corresponding matrices are \(D_{1}= \left[ \begin{array}{llll} d_{11}(\zeta _3) &{} 0 &{} 0 \\ 0 &{} d_{22} &{} ML\cos \alpha \\ 0 &{} ML \cos \alpha &{} ML^2+J_a \end{array}\right] \), \(C_{1} = \left[ \begin{array}{llll} ML^2\sin ^2 2\alpha \,\dot{\alpha }/2 &{} 0 &{} \omega ML^2\sin 2\alpha /2 \\ 0 &{} 0 &{} -ML\sin \alpha \,\dot{\alpha }\\ -\omega ML^2\sin 2\alpha /2 &{} 0 &{} 0 \end{array} \right] \), \(G_{1} = [0, 0, -MgL\sin \alpha ]^T\), \(F_1=\rho [\omega , \upsilon , 0 ]^T\), where \(d_{11}(\zeta _3)=D^2m/2+JD^2/2R^2+J_w+M^2L^2\sin ^2 \alpha \), \(d_{22}= 2m+2J/R^2+M\). In the simulation, the parameters are chosen as shown in Table 2. The initial states of the WIP are chosen as \(\zeta (0)=[-0.1,0, 10^\circ ]^T\), and \(\dot{\zeta }(0)=[0.0,0.05, 0.0]^T\). The initial velocity of the WIP is \(0.08m/s\), and the desired trajectories are defined as \(\theta _d=0.4t\) rad and \(\alpha _d=0\) rad.

Fig. 1
figure 1

WIP model [10]

Table 2 Parameters in the simulation

Simulation results are shown in Figs. 2 and 3. From the figures, we can find that the WIP can follow the desired trajectory under the proposed control law. The estimated parameter is convergence as time goes infinity. In addition, all the closed-loop signals are bounded.

Fig. 2
figure 2

State response of the WIP. a Tilt angle of the WIP. b Tilt angle velocity of the WIP. c Forward velocity of the WIP. d Motion displacement of the WIP

Fig. 3
figure 3

Control inputs and the parameter estimation. a Control inputs of the WIP. b Parameter estimation of the WIP

5 Conclusion

We have presented adaptive backstepping control of the WIP system, while considering the model parameter uncertainties and the underactuated properties. The coordinates transformation has been employed to divide the system into three sub-systems. The backstepping control has been designed for each sub-system while the Lyapunov analysis has been involved in the control design and the stability proof. It has been proved that under the designed control law, the output trajectory is able to track as close as to the reference trajectory. All the signals have been ensured to be semi-globally uniformly ultimately bounded. Simulation results have shown the performance of the WIP control system as well.