Keywords

1 Introduction

The dynamics of a mechanical gyroscope is considered as one of the most interesting problems of mechanics [1]. Gyros find applications in attitude control of satellites [2], scanning and tracking in combat vehicles [3], submarine inertial auto-navigating [1], actuation of dual-arm space robots [4], underwater robots [5], anthropomorphic test device for two-wheeled self-balancing vehicles [6], and several more. The 3-DoF gyroscope considered herein is one of the benchmark nonlinear highly coupled systems to test new control strategies [7]. It has a disc mounted inside a blue gimbal which is in turn inside a red gimbal, these are placed inside a silver frame, four DC motors each to rotate the disc, red and blue gimbal, and silver frame, and four high-resolution optical encoders to measure angular positions (Fig. 1).

Fig. 1
figure 1

Gyroscope

Gyros are used in highly sophisticated systems so, to increase the tolerance for failure of actuators and to deal with space and weight constraints leads to an underactuated system. The underactuated system is a class of mechanical systems in which degrees of freedom available is more than actuators [8]. Quanser gyroscope can be used as an underactuated system by controlling the angular position of the red gimbal using DC motor at blue gimbal. In this paper, 2-DoF is considered by fixing the external silver frame.

Next, works related to the mechanical gyroscope and underactuated systems which has been done in the past decade are mentioned. Feedback linearization and adaptive control schemes have been applied to 2-DoF Quanser gyroscope for trajectory tracking with periodic matched disturbance in [7]; sliding mode and adaptive fuzzy control has been applied on Quanser Gyroscope for set-point tracking without any disturbance consideration in simulation [9]; active matched disturbance rejection for a 3-DoF gyroscope but results of internal dynamics are unavailable in [10]; sliding mode control applied to achieve tracking problem and periodic output disturbance rejection of a control moment gyroscope in [11]; backstepping-based nonlinear control applied for stabilizing pendubot near-equilibrium point [12]; nonlinear state feedback control of underactuated TORA system based on backstepping approach has been used to tackle with stabilization problems [13]; backstepping-based sliding mode control applied to accomplish trajectory tracking application for unmanned aerial vehicle [14]; integral backstepping-based sliding mode control has been used for swing-up and rejection of matched and mismatched uncertainties of cart pendulum system [8]; adaptive backstepping-based sliding mode controller has been proposed for 3D flight trajectory tracking and stabilization of an unmanned aerial vehicle [15]; adaptive backstepping control with finite time current observer has been proposed for output voltage regulation in buck converters [16], and neuro-adaptive backstepping control for tracking of angular velocity in buck converter-fed permanent magnet DC motor [17].

As shown in the literature, recent control problems for 2-DoF underactuated gyroscope have considered periodic uncertainty [7] and [11]. However, control design using a systematic approach like backstepping has not received much attention for 2-DoF underactuated gyroscope. The possibility of unpredictable interaction of unmodeled dynamics of 2-DoF underactuated gyroscope and uncertainty is also not mentioned in any of the recent works. In this document, trajectory tracking of the red gimbal using actuator at blue gimbal with bounded Gaussian-matched disturbance is considered. The system considered is underactuated with actuated shape variables, and Reza Olfati-Saber [18] proposed backstepping-based nonlinear control for underactuated systems with actuated shape variable and normal form in the strict feedback form. The normal form of this system is not in strict feedback form, so system equations are converted into strict feedback form using input–output linearization [19] but poses another challenge of controlling the internal dynamics of the system. Further, global asymptotic stability of the system can be ensured using the Barbashin–Krasvoskii theorem [19]. The internal dynamics of the system are also proved to be bounded for bounded reference tracking in this document. Due to complex dynamics of the gyroscope including nonlinear and coupling effects, the deviation of system variable from steady state at any instant of time the system may collapse because of unpredictable interaction between input uncertainty and unmodeled dynamics. Thus, the Monte Carlo simulation method with random bounded uncertainty is used while testing the robustness of the proposed control law and performance of the closed loop system.

In the remainder of the paper, the other sections are given as follows. The problem statement is formulated in Sect. 2, whereas the proposed controllers are designed in Sect. 3, and stability analysis is illustrated in Sect. 4. Section 5 presents the simulation studies, and the conclusion is given in Sect. 6 followed by the references.

2 Problem Formulation

2.1 Dynamical Model of 2-DoF Gyroscope

The dynamic model of the underactuated gyroscope can be derived using Euler–Lagrange’s equation [20] given as,

$$\begin{aligned} \frac{\partial L}{\partial \psi }- \frac{\text {d}}{{\text {d}}t}\left( \frac{\partial L}{\partial \dot{\psi }}\right) = \tau \ \end{aligned}$$
(1)

where \(L=T-V\), T is the total kinetic energy and V is the total potential energy of the system, \(\psi \) is the vector of system variables and \(\tau \) is the force.

There is no potential energy in the system and the kinetic energy of the system [1] is given as

$$\begin{aligned} T= \frac{1}{2} \left( J\left( \beta \right) \dot{\alpha }^2+H\dot{\beta }^2+C\left( \dot{\gamma }+\dot{\alpha }\sin {\beta }\right) ^2\right) \end{aligned}$$
(2)

where,

$$\begin{aligned} J\left( \beta \right) =A_{2}+\left( A_{1}+A\right) \cos ^2{\beta }+C_{1} \sin ^2{\beta } \end{aligned}$$
(3)
$$\begin{aligned} H=B_{1}+B \end{aligned}$$
(4)

\(A_{2}\), \(A_{1}\), and A are moment of inertia of red gimbal, blue gimbal, and disc about x-axis, respectively, \(B_{1}\) and B are moment of inertia of blue gimbal and disc about y-axis, respectively, and \(C_{1}\) and C denote moment of inertia of blue gimbal and disc about z-axis, respectively. \(\alpha \), \(\beta \) and \(\gamma \) denote angular position of red gimbal, blue gimbal, and disc about x-axis, y-axis, and z-axis, respectively [1].

Using (1) and taking \(\psi =\left[ \alpha \ \beta \ \gamma \right] ^{T}\), the system dynamics can be written in the following form

$$\begin{aligned} \ddot{\alpha }&=- \frac{C}{J(\beta )} \left( \dot{\beta } \cos {\beta } \left( \dot{\gamma }+\dot{\alpha } \sin {\beta }\right) \right) - \frac{J'(\beta )}{J(\beta )}\dot{\alpha }\dot{\beta }-\frac{\sin {\beta }}{J(\beta )}\tau \end{aligned}$$
(5)
$$\begin{aligned} \ddot{\beta }&=\frac{C}{H}\left( \dot{\alpha }\dot{\gamma }\cos {\beta }+\dot{\alpha }^2 \sin {\beta } \cos {\beta } \right) +\frac{J'(\beta )}{2H}\dot{\alpha }^2 +\frac{1}{H}\tau _{1} \end{aligned}$$
(6)
$$\begin{aligned} \ddot{\gamma }&=\frac{C}{J(\beta )} \dot{\beta } \sin {\beta } \cos {\beta } \left( \dot{\gamma }+\dot{\alpha } \sin {\beta }\right) + \frac{J'(\beta )}{J(\beta )}\dot{\alpha }\dot{\beta }\sin {\beta }-\dot{\alpha }\dot{\beta }\cos {\beta }+\left( \frac{\sin ^2{\beta }}{J(\beta )}+\frac{1}{C}\right) \tau \end{aligned}$$
(7)

where \(\tau \) and \(\tau _{1}\) are actuating torques at disc and blue gimbal, respectively, to achieve underactuation torque at red gimbal \(\tau _{2}=0\).

2.2 Control Objective

For the underactuated mechanical gyroscope, it is desired to derive a control law \(\tau _{1}\) such that the angular position of red gimbal \(\alpha \) tracks trajectory \(\alpha ^d\), while the angular position of blue gimbal \(\beta \) remains bounded around origin. Also a controller is to be designed, so that the disc rotates at the desired constant angular velocity \(\dot{\gamma ^d}\).

Tracking error is defined as below

$$\begin{aligned} e=\alpha -\alpha ^d \end{aligned}$$
(8)

and a control law is to be derived, so that e(t) as well as \(\dot{e}(t)\) are asymptotically stable which can be written analytically as below

\(e(t) \rightarrow 0\) as well as \(\dot{e}(t) \rightarrow 0\) when \(t \rightarrow \infty \).

It is assumed that \(\alpha ^d\), \(\dot{\alpha }^d\), \(\ddot{\alpha }^d\) and \(\dddot{\alpha }^d\) are available and bounded.

3 Control Law Design

3.1 Proportional Controller

In this section, a proportional control law \(\tau \) is introduced to rotate the disc at the desired constant angular velocity \(\dot{\gamma }^d\).

Linearizing (7) about \(\dot{\gamma }=0\) and keeping \(\beta =0\), \(\dot{\beta }=0\) to obtain differential equation as follows

$$\begin{aligned} \ddot{\gamma }=\frac{1}{C}\tau \end{aligned}$$
(9)

Proportional controller with gain \(K_{p}\) mentioned below will force \(\dot{\gamma }(t) \rightarrow \dot{\gamma ^d}\) as \(t\rightarrow \infty \).

$$\begin{aligned} \ddot{\gamma }=\frac{K_{p}}{C}\left( \dot{\gamma }-\dot{\gamma ^d}\right) \end{aligned}$$
(10)

Solution of above first-order linear differential equation is

$$\begin{aligned} \dot{\gamma }(t)=\dot{\gamma }^d\left( 1-{\text {e}}^{-\frac{K_{p}}{C}t}\right) \end{aligned}$$
(11)

It is evident from the above equation that with \(K_{p}>0\) \(\dot{\gamma }(t) \rightarrow \dot{\gamma ^d}\) as \(t\rightarrow \infty \).

3.2 Backstepping-Based Sliding Mode Controller

Sliding mode control consists of two modes, and they are reaching mode and sliding mode. The sliding surface design should be done cautiously since phase trajectories on hitting the sliding mode region reaches the origin as per the dynamics of sliding surface [21].

Order of sliding surface depends on relative degree of output of the system [9] and from (5) comment on relative degree cannot be made since \(\tau _{1}\) is not appearing explicitly in (5). Hence, taking derivative of (5) w.r.t \('t'\) and considering the proportional controller mentioned in Sect. 3.1, reduced system dynamics are

$$\begin{aligned} \dddot{\alpha }&=f_{1}\left( \psi ,\dot{\psi },\ddot{\psi }\right) +b_{1}\left( \psi ,\dot{\psi }\right) \tau _{1} \end{aligned}$$
(12)
$$\begin{aligned} \ddot{\beta }&=f_{2}\left( \psi ,\dot{\psi }\right) +\frac{1}{H}\tau _{1} \end{aligned}$$
(13)

where

$$\begin{aligned} f_{1}\left( \psi ,\dot{\psi },\ddot{\psi }\right)&=-\frac{C}{J\left( \beta \right) }\left[ f_{2}\cos (\beta )\left( \dot{\gamma }+\dot{\alpha }\sin {\beta }\right) +\dot{\beta }\cos {\beta }\left( \ddot{\gamma }+\ddot{\alpha }\sin {\beta }\right) \right] -\frac{J'(\beta )}{J(\beta )}f_{2}\dot{\alpha }\\&+ \dot{\beta }^2\left( \dot{\alpha }\cos {2\beta }-\dot{\gamma }\sin {\beta }\right) -\frac{J''(\beta )J'(\beta )-J'(\beta )^2}{J(\beta )^2}\dot{\alpha }\dot{\beta }^2-\frac{J'(\beta )}{J(\beta )}\dot{\beta }\ddot{\alpha } \\&-\frac{\left( J(\beta )\dot{\tau }\sin {\beta }+\tau \dot{\beta }\cos {\beta }-\tau \sin {\beta }\dot{\beta }J'(\beta )\right) }{J(\beta )^2}-\frac{f_{1}\dot{\beta }J'(\beta )}{J(\beta )} \\ b_{1}\left( \psi ,\dot{\psi }\right)&=-\frac{C}{J(\beta )H}\left( \cos {\beta }\left( \dot{\gamma }+\dot{\alpha }\sin {\beta }\right) +J'(\beta )\dot{\alpha }\right) \\ f_{2}\left( \psi ,\dot{\psi }\right)&=\frac{C}{H}\left( \dot{\alpha }\dot{\gamma }\cos {\beta }+\dot{\alpha }^2 \sin {\beta } cos{\beta } \right) +\frac{J'(\beta )}{2H}\dot{\alpha }^2 \end{aligned}$$

From (12), it can be concluded that relative degree of the system is three.

The basic requirement to apply a backstepping-based sliding mode controller to any system is that the system should be in strict feedback form [18].

Taking state variables as

$$\begin{aligned} X=\left[ \alpha ,\dot{\alpha },\ddot{\alpha } \right] ^T \end{aligned}$$
(14)

The system dynamics in (12), (13) can be written in strict feedback form as below

$$\begin{aligned} \dot{x_{1}}&=x_{2} \end{aligned}$$
(15)
$$\begin{aligned} \dot{x_{2}}&=x_{3} \end{aligned}$$
(16)
$$\begin{aligned} \dot{x_{3}}&=f_{1}\left( \psi ,\dot{\psi },\ddot{\psi }\right) +b_{1}\left( \psi ,\dot{\psi }\right) \left( \tau _{1}+\tau _{d}\right) \end{aligned}$$
(17)

leaving below internal dynamics of the system to be dealt separately.

$$\begin{aligned} \ddot{\beta }=f_{2}\left( \psi ,\dot{\psi }\right) +\frac{1}{H}\left( \tau _{1}+\tau _{d}\right) \end{aligned}$$

where, \(\tau _{d}\) is matched uncertainty.

Step 1: Control variable and Lyapunov candidate in terms of control variable is chosen as below

$$\begin{aligned} e_{1}=x_{1}-x_{1}^d \end{aligned}$$
(18)
$$\begin{aligned} V_{1}=\frac{1}{2}e_{1}^2 \end{aligned}$$
(19)

Step 2: Time derivative of \(V_{1}\) is \(\dot{V_{1}}=e_{1}\dot{e_{1}}\) and \(\dot{e_{1}}=x_{2}-\dot{x_{1}}^d\), virtual control law \(x_{2}=-k_{1}e_{1}+\dot{x_{1}}^d\) will stabilize the \(e_{1}\) subsystem, so defining stabilizing function as \(\rho _{2}=-k_{1}e_{1}+\dot{x_{1}}^d\) and error between the virtual control law and the stabilizing function is defined as

$$\begin{aligned} e_{2}=x_{2}-\rho _{2} \end{aligned}$$
(20)
$$\begin{aligned} \begin{aligned} \dot{V_{1}}&=e_{1}\left( x_{2}-\dot{x_{1}}^d\right) \\&=e_{1}\left( e_{2}+\rho _{2}-\dot{x_{1}}^d\right) \end{aligned} \end{aligned}$$
$$\begin{aligned} \dot{V_{1}}=-k_{1}e_{1}^2+e_{1}e_{2} \end{aligned}$$
(21)

Now, a new Lyapunov function is chosen for subsystem \(e_{2}\) as follows

$$\begin{aligned} V_{2}=V_{1}+\frac{1}{2}e_{2}^2 \end{aligned}$$
(22)

Step 3: As done in earlier step, choosing stabilizing function \(\rho _{3}=-e_{1}-k_{1}\dot{e_{1}}+\ddot{x{1}}^d-k_{2}e_{2}\) and error \(e_{3}=x_{3}-\rho _{3}\), \(\dot{V_{2}}\) will be as given below

$$\begin{aligned} \dot{V_{2}}=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3} \end{aligned}$$
(23)
$$\begin{aligned} \dot{e_{3}}=f_{1}\left( \psi ,\dot{\psi },\ddot{\psi }\right) +b_{1}\left( \psi ,\dot{\psi }\right) \left( \tau _{1}+\tau _{d}\right) +(1+k_{1}k_{2})\dot{e_{1}}+(k_{1}+k_{2})\ddot{e_{1}}-\dddot{x_{1}}^d \end{aligned}$$
(24)

Derivative of \(e_{3}\) contains input to the system, so now the sliding surface will be chosen as below

$$\begin{aligned} s=e_{3}+c_{1}e_{2}+c_{2}e_{1} \end{aligned}$$
(25)

order of sliding surface is \((n-1)\) where (n) is relative degree, \(c_{1}\) and \(c_{2}\) are positive constants and can be chosen as per the required dynamics of the sliding surface and Lyapunov candidate for final step is as follows

$$\begin{aligned} V_{3}=V_{2}+\frac{1}{2}s^2 \end{aligned}$$
(26)

Step 4: Using (23), (24), (25), and \(\dot{e_{2}}=\ddot{e_{1}}+k_{1}\dot{e_{1}}\) time derivative of \(V_{3}\) is

$$\begin{aligned} \begin{aligned} \dot{V_{3}}=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}+s(f_{1}\left( \psi ,\dot{\psi },\ddot{\psi }\right) +b_{1}\left( \psi ,\dot{\psi }\right) \left( \tau _{1}+\tau _{d}\right) \\ +(k_{1}+k_{2}+c_{1})\ddot{e_{1}}+(1+k_{1}k_{2}+c_{1}k_{1}+c_{2})\dot{e_{1}}-\dddot{x_{1}}^d) \end{aligned} \end{aligned}$$
(27)

The constant plus proportional rate reaching law [21] given below will be used to design control law

$$\begin{aligned} \dot{s}=-Qsgn(s)-Ks \end{aligned}$$
(28)

Using conventional sliding mode design law given in (28), control law is as follows

$$\begin{aligned} v=-\left( -\dddot{x_{1}^d}+(k_{1}+k_{2}+c_{1})\ddot{e_{1}}+(1+k_{1}k_{2}+c_{1}k_{1}+c_{2})\dot{e_{1}}+Qsgn(s)+Ks\right) \end{aligned}$$
(29)

and

$$\begin{aligned} \tau _{1}=\frac{1}{b_{1}\left( \psi ,\dot{\psi }\right) }(v-f_{1}\left( \psi ,\dot{\psi },\ddot{\psi }\right) ) \end{aligned}$$
(30)

control law (30) will achieve our control objective that is \(e_{1}(t),\dot{e_{1}}(t)\rightarrow 0\) as \(t\rightarrow \infty \) and can reject bounded continuous matched disturbances by choosing Q appropriately.

3.3 Adaptive Estimation of Matched Disturbance

For given matched disturbance \(\tau _{d}\), \(\hat{d}\) estimates the disturbance and estimation error \(\tilde{d}\) is defined as below

$$\begin{aligned} \tilde{d}=b_{1}\left( \psi ,\dot{\psi }\right) \tau _{d}-\hat{d} \end{aligned}$$
(31)

A Lyapunov candidate is chosen as below to deduce the adaptive estimation law

$$\begin{aligned} V_{4}=V_{3}+\frac{1}{2 \gamma } \tilde{d}^2 \end{aligned}$$
(32)

where \(\gamma \) is the adaptation gain.

Updating (29) with estimation term gives updated control law as below

$$\begin{aligned} v=-\left( -\dddot{x_{1}^d}+(k_{1}+k_{2}+c_{1})\ddot{e_{1}}+(1+k_{1}k_{2}+c_{1}k_{1}+c_{2})\dot{e_{1}}+\hat{d}+Qsgn(s)+Ks\right) \end{aligned}$$
(33)

Using (27), (30), (33) \(\dot{V_{4}}\) is as follows

$$\begin{aligned} \dot{V_{4}}&=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}+s(b_{1}\left( \psi ,\dot{\psi }\right) \tau _{d}-\hat{d}-Qsgn(s)-Ks)-\frac{1}{\gamma }\tilde{d}\dot{\hat{d}}\ \\&=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}+s(\tilde{d}-Qsgn(s)-Ks)-\frac{1}{\gamma }\tilde{d}\dot{\hat{d}}\ \\&=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}+s(-Qsgn(s)-Ks)-\frac{1}{\gamma }\tilde{d}(\dot{\hat{d}}-\gamma s)\ \end{aligned}$$

Adaption law [22] given below and control law (33) achieves control objective by choosing Q, K and \(\gamma \) appropriately.

$$\begin{aligned} \dot{\hat{d}}=\gamma s \end{aligned}$$
(34)

4 Stability Analysis

Assumption 1: It is assumed that the desired trajectory \(x_{1}^d\), and its first derivative \(\dot{x_{1}}^d\), second derivative \(\ddot{x_{1}}^d\), and third derivative \(\dddot{x_{1}}^d\) are available and bounded.

Assumption 2: \(\bar{\tau _{d}}\) is the known upper bound for \(b_{1}\left( \psi ,\dot{\psi }\right) \tau _{d}\), i.e., \(\bar{\tau _{d}}>b_{1}\left( \psi ,\dot{\psi }\right) \tau _{d}\), where \(\tau _{d}\) is the matched uncertainty.

4.1 Without Disturbance Estimation

$$\begin{aligned} V_{3}(e_{1},e_{2},s)=\frac{1}{2}e_{1}^2+\frac{1}{2}e_{2}^2+\frac{1}{2}s^2 \end{aligned}$$
(35)
$$\begin{aligned} V_{3}(0,0,0)&=0\ {\text {and}}\ V_{3}(e_{1},e_{2},s)>0,\ \forall \ e_{1},e_{2},s \ne 0 \end{aligned}$$
(36)
$$\begin{aligned}&||x|| \rightarrow \infty \Longrightarrow V_{3}(e_{1},e_{2},s) \rightarrow \infty \end{aligned}$$
(37)

Lyapunov function \(V_{3}\) given in (35) satisfies (36), (37), and if \(\dot{V_{3}}(e_{1},e_{2},s)<0\), \(\forall \ e_{1},e_{2},s \ne 0\), then by invoking Barbashin–Krasovskii theorem, it can be inferred that \(e_{1}(t)\), \(e_{2}(t)\), s(t) are globally asymptotically stable at origin.

Next, conditions will be established such that \(\dot{V_{3}}<0\), from (27), (29), (30) \(\dot{V_{3}}\) can be written as

$$\begin{aligned} \dot{V_{3}}&=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}+s(b_{1}\left( \psi ,\dot{\psi }\right) \tau _{d}-Qsgn(s)-Ks) \\&=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}-Ks^2-s(Qsgn(s)-\bar{\tau _{d}}) \\&=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}-K(e_{3}+c_{1}e_{2}+c_{2}e_{1})^2-(Q||s||_{1}-s\bar{\tau _{d}}) \end{aligned}$$

Let \(E=[e_{1}\ e_{2}\ e_{3}]^T\), putting \(||s||_{1}\bar{\tau _{d}}\) in place of \(s\bar{\tau _{d}}\) and since \(||s||_{1}\ge ||s||_{p}\) for any \(p>1\), \(\dot{V_{3}}\) can be now written as

$$\begin{aligned} \dot{V_{3}}<-E^TPE-||s||_{1}(Q-\bar{\tau _{d}}) \end{aligned}$$
(38)

where, \(P=\begin{bmatrix}k_{1}+Kc_{2}^2 &{} Kc_{1}c_{2} &{} Kc_{2} \\ Kc_{1}c_{2} &{} k_{2}+Kc_{1}^2 &{} Kc_{1}-\frac{1}{2} \\ Kc_{2} &{} Kc_{1}-\frac{1}{2} &{} K \end{bmatrix}\)

Matrix P will be positive definite if its principal minors are positive definite and choosing Q such that \(Q>\bar{\tau _{d}}\) will satisfy the following condition

$$\begin{aligned} \dot{V_{3}}<0 \end{aligned}$$
(39)

Hence, it can be concluded that with appropriate values of \(c_{1},\ c_{2},\ k_{1},\ k_{2},\ K\) and Q control problem of tracking for the red gimbal subsystem can be stabilized globally asymptotically.

4.2 With Disturbance Estimation

$$\begin{aligned} V_{4}(e_{1},e_{2},s,\tilde{d})=\frac{1}{2}e_{1}^2+\frac{1}{2}e_{2}^2+\frac{1}{2}s^2+\frac{1}{2\gamma }\tilde{d}^2 \end{aligned}$$
(40)

Conditions (36) and (37) are also satisfied by \(V_{4}\), next conditions will be deduced, so that \(\dot{V_{4}}<0\), from (30), (32), (33) and (34)

$$\begin{aligned} \dot{V_{4}}=-k_{1}e_{1}^2-k_{2}e_{2}^2+e_{2}e_{3}-K(e_{3}+c_{1}e_{2}+c_{2}e_{1})^2-Q||s||_{1} \end{aligned}$$
(41)
$$\begin{aligned} \dot{V_{4}}=-E^TPE-Q||s||_{1} \end{aligned}$$
(42)

Matrix E and P are same as that in the previous subsection and choosing \(c_{1}\), \(c_{2}\), \(k_{1}\), \(k_{2}\) and K such that P is a positive definite matrix will stabilize the error dynamics globally asymptotically. It can be observed that \(Q>0\) is a very mild condition to be followed unlike in earlier subsection which required exact knowledge of upper bound of matched disturbance. Here, knowledge of upper bound of disturbance is not required to decide control parameters.

4.3 Blue Gimbal Subsystem

Next stability analysis of the blue gimbal subsystem will be studied with the consideration that angular position of the red gimbal is tracking the desired trajectory \(\alpha ^d\) and the disc is rotating at the required angular velocity \(\dot{\gamma }^d\).

From (5) \(\dot{\beta }\) can be written as

$$\begin{aligned} \dot{\beta }=-\frac{J(\beta )\ddot{\alpha }^d}{C\dot{\gamma }^d\cos {\beta }+C\dot{\alpha }^d\sin {\beta }\cos {\beta }+J'(\beta )\dot{\alpha }^d} \end{aligned}$$
(43)

Linearizing about \(\beta =0\), \(\dot{\beta }=0\)

$$\begin{aligned} \dot{\beta }-p_{1}\ddot{\alpha }^d\dot{\alpha }^d\beta =p_{2}\ddot{\alpha }^d \end{aligned}$$
(44)

where

$$\begin{aligned} p_{1}&=\frac{(A_{2}+A_{1}+A)(C+2(C_{1}-A_{1}-A))}{(C\dot{\gamma }^d)^2} \\ p_{2}&=-\frac{A_{2}+A_{1}+A}{C\dot{\gamma }^d} \end{aligned}$$

Linearized dynamics of the angular position of blue gimbal is first-order linear differential equation and can be solved using the integrating factor method.

Integrating factor = \({\text {e}}^{-\phi (t)}\), where \(\phi (t)=\int p_{1}\ddot{\alpha }^d \dot{\alpha }^{\text {d}} \ {\text {d}}t\)

$$\begin{aligned} \beta (t)={\text {e}}^{\phi (t)}\int \limits _{0}^{t}{\text {e}}^{-\phi (t)}p_{2}\ddot{\alpha }^{\text {d}} \ {\text {d}}t \end{aligned}$$
(45)

\(\phi (t)=\frac{p_{1}}{2}((\dot{\alpha }^d)^2(t)-(\dot{\alpha }^d)^2(0))\) and approximating \({\text {e}}^{-\phi (t)}\approx 1-\phi (t)\)

$$\begin{aligned} \begin{aligned} \beta (t)={\text {e}}^{\phi (t)}\left[ p_{2}((\dot{\alpha }^d)(t)-(\dot{\alpha }^d)(0))-\frac{p_{1}p_{2}}{6}((\dot{\alpha }^d)^3(t)-(\dot{\alpha }^d)^3(0))\right] \\ +{\text {e}}^{\phi (t)}\left[ \frac{p_{1}p_{2}}{2}(\dot{\alpha }^d)^2(0)((\dot{\alpha }^d)^2(t)-(\dot{\alpha }^d)^2(0))\right] \end{aligned} \end{aligned}$$
(46)

It can be deduced from (46) that \(\beta (t)\) will be bounded for bounded \(\dot{\alpha }^d(t)\).

5 Simulation Results

In this section of the document, the simulation results of the backstepping-based sliding mode controller with disturbance estimation (DEBSMC) are compared with conventional backstepping-based sliding mode controller (CBSMC) with matched uncertainty using plant parameters (Table 1), and controller parameters (Table 2).

Profile of uncertainty is given in Fig. 3b which takes into account coulomb, static, viscous, and stribeck friction. Matched uncertainty is taken as below

$$\begin{aligned} \tau _{d}=-\frac{1}{\sigma \sqrt{2 \pi }} {\text {e}}^{-\frac{1}{2}\left( \frac{x-\mu }{\sigma }\right) ^2} \end{aligned}$$
(47)

where \(\mu =0\), \(\sigma =2\) and \(x=[-2.5,2.5]\) is random gaussian variable.

Reference trajectory to be tracked is taken as:

\(\alpha ^{d}=(2+25\sin (2\pi f_{1}t)+3\cos (2\pi f_{2}t))\)(in deg.), where \(f_{1}=0.05Hz\) and \(f_{2}=0.025Hz\). \(\dot{\gamma }^d\)=34 rad/s.

Table 1 Moment of inertia of Quanser gyroscope
Table 2 Controller parameters
Fig. 2
figure 2

Angular position with matched uncertainty of the a red gimbal, b blue gimbal

To reduce chattering effect, \(\tan h\) has been used instead of sgn [9].

From Fig. 2a, it can be said that the proposed controller has been able to reject the input uncertainty and able to track the desired trajectory, Fig. 2b shows that the angle \(\beta \) is bounded and the proportional controller is able to keep the disc rotating at the desired angular velocity which can be seen in Fig. 3a. Figure 4 shows that the control input is almost same in steady state for both the controllers but chattering in the proposed control law is less and can be observed in Fig. 5.

Graphically, it can be observed that both the controllers can stabilize the system asymptotically but information regarding the range of the tracking error and where the error is concentrated most of the time in steady state is absent, so to test and compare among the controllers, Monte Carlo simulation method is used, the system is simulated for 40,000 instants of time, and histogram of the tracking error is plotted. The control input RMS is also computed to get the exact value in steady state considering all 40,000 instants of time.

Fig. 3
figure 3

a Angular velocity of the disc, b matched uncertainty profile

Fig. 4
figure 4

Control input with matched uncertainty for a conventional BSMC, b BSMC with disturbance estimation

Fig. 5
figure 5

Sliding surfaces with matched uncertainty for a conventional BSMC, b BSMC with disturbance estimation

Fig. 6
figure 6

Histogram of tracking error for a conventional BSMC, b BSMC with disturbance estimation

It can be observed from Fig. 6 that the tracking error is near zero at most of the instants of time for the proposed controller while it is shifted from zero for conventional BSMC. Also from Table 3, control input is marginally lesser for the proposed controller.

Table 3 Monte Carlo simulation results

6 Conclusion

A backstepping-based nonlinear robust controller for underactuated 2-DoF gyroscope system has been designed and validated in the simulation environment in this paper. Proposed control law with disturbance estimation does not require knowledge of the upper bound of matched disturbance and can stabilize the system globally asymptotically while upper bound should be known to stabilize the system for conventional law. Possibility of singularity problem in control input because of internal dynamics, i.e., the angular position of blue gimbal, has been removed by keeping it bounded, and it is well documented in the stability section of this paper. Monte Carlo simulation method is used to compare the proposed control law with conventional law, which shows tracking error is closer to zero at most instants of time for the proposed controller than for conventional one with lesser control effort.