1 Introduction

As a special micro helicopter, the quadrotor unmanned aerial vehicle (UAV) has attracted great attention from military and civil applications in recent years. Due to its advantages such as vertical taking off and landing (VTOL), rapid maneuvering, and precise hovering, the potential for the quadrotor in applications as diverse as fire fighting and environmental monitoring has been well established [1]. Compared with the traditional helicopter, the quadrotor is simpler, safer, and more efficient. However, the quadrotor UAV suffers from various control complexities such as open-loop instability and inherent nonlinearity within the dynamic model of the system [2]. The design of high-performance nonlinear control mechanisms for quadrotors in the presence of structural uncertainties and unknown external disturbances is still a challenging task.

Various control methods had been developed for the quadrotors in recent years. These control strategies could be divided into two main groups: linear control design and nonlinear control design. For example, linear control techniques, such as proportional integral derivative (PID) and linear quadratic (LQ), were proposed in [3]. In [4], the authors presented an inner- and outer-loop PD controller for the outdoor flight control of quadrotors. Experiments were performed, and the flight test results showed that the proposed controller was capable of achieving various missions, including taking off, hovering, and landing. On-board vision sensor and optical flow approach were utilized to get the feedback of the quadrotor’s velocities. Similarly, a PID control law was introduced in [5] for position stabilization, and indoor flight experiment results were presented to validate the performance of the proposed controller with the help of the VICON motion capture system to obtain measurement of the quadrotor’s velocities.

When a large operation range is required, the linear controller’s performance may be degraded due to the nonlinearities of the quadrotor. In [6], a hybrid backstepping control method was employed for the attitude control of a quadrotor. In order to address the blade flapping problem, a function was introduced that could quickly respond to abrupt angular velocity changes. Flight experiments were performed to validate the performance of the proposed controller based on a DragonFlyer quadrotor helicopter. Nonlinear control techniques, such as dynamic inversion, feedback linearization, and sliding mode control, were proposed in [7]. Except nonlinearities, structural/unstructural uncertainties and external disturbances also bring quite a lot challenges to the flight control development for quadrotors. Adaptive nonlinear control design would be a suitable choice in the case of structural uncertainties. An adaptive attitude controller was designed for a quadrotor with unknown inertia matrix in [8], and it could achieve asymptotic tracking of an attitude command when there was no disturbance in the attitude dynamics. A nonlinear adaptive regulation controller was proposed in [9] for a quadrotor with parametric uncertainties, and an asymptotic regulation of position and yaw commands was achieved. Dierks et al. [10] proposed a model reference controller which combined direct and indirect adaption approaches, and it has shown good robustness for uncertainties that result from the actuator’s failure. The sliding mode control design approach has been widely utilized for the control of quadrotors under parametric uncertainties and external disturbances [1114]. For example, in [11], a general sliding mode control was developed for a class of uncertain underactuated system which was featured as in the cascaded from, and then, the proposed method was utilized to stabilize a quadrotor helicopter with parametric uncertainties associated with its dynamic model. In [12], a modified sliding mode quaternion feedback controller was proposed for the tracking control of a quadrotor, and an observer was introduced to estimate the time-varying disturbance which was treated as an unknown state. It was proved that an uniform ultimate bounded (UUB) tracking result was achieved. An robust altitude control based on sliding mode approach was designed for a quadrotor UAV with uncertainties in the measurement of the pressure sensor in [14], and the control performance was validated via real-time experimental results. Other nonlinear robust controllers have also been developed. In [15], a robust integral of the sign of the error (RISE)-based attitude controller was presented for quadrotors with uncertain dynamics, and an semiglobally asymptotic trajectory tracking was achieved. Liu et al. [16] combined a PD controller with a robust compensator to formulate a robust attitude control of uncertain quadrotors, and ultimately bounded tracking result was proven. Bialy et al. [17] developed a nonlinear robust adaptive for a quadrotor with linear parameterized (LP) uncertainties and bounded disturbances, semiglobally asymptotic tracking of a time-varying position trajectory and yaw angle trajectory was proved via a Lyapunov-based stability analysis. A nested saturation approach was utilized to develop a quaternion-based feedback control for a class of rigid bodies in [18], and the input bound constraints were considered in the control development. A mini-quadrotor helicopter real-time testbed was employed as the benchmark system to validate the proposed design which had shown good robustness to external disturbances in roll, pitch, and yaw motion.

One drawback of the above controllers is the need of full-state measurements for the quadrotor. In the case of velocity sensor failures, full access to system states is impossible. Additionally, internal and external noise often deteriorate the accuracy of on-board velocity sensors. This brings the problem of output feedback (OFB) control for quadrotors. From a theoretical point of view, the most difficulty for this problem lies in the fact that, generally speaking, the separation principle does not hold for nonlinear systems. Velocity observers or filters are often employed to provide estimations for the unmeasurable velocity signals. Sun et al. [19] proposed energy coupling output feedback controller for a 4 degree of freedom (DOF) underactuated crane system, and kinematic energy shaping and potential energy shaping approaches were combined with a filter design to formulate the OFB design with only position and swing angle feedback. Only a few works have investigated the problem of OFB control design for quadrotors. Sliding mode observers were designed in [20] to provide estimation for the quadrotor’s unmeasurable velocity signals and unknown disturbances, and backstepping methods were employed to formulate the OFB controller. Direks and Jagannathan [21] utilized two neural networks (NNs) as the main part in the OFB control design for the quadrotor. One NN was used as the observer to estimate the linear and angular velocities of the UAV, and the other NN was used to learn the uncertain dynamics of the quadrotor. The proposed design in [21] yielded semiglobally uniformly ultimately bounded (SGUUB) tracking of the desired position and attitude trajectories, but it required knowledge of the mass and moments of inertia. In [22], a model-based velocity observer was designed to provide estimations for the unknown translational and angular velocities of the quadrotor, and a SGUUB tracking result was obtained which was proved by a Lyapunov-based stability analysis. The adaptive observation method was employed in [23] to design a translational velocity observer of a quadrotor by assuming that the translational accelerations, attitude angles, and angular velocities were available from the on-board inertial measurement unit (IMU). In [24], a nonlinear velocity observer was proposed to estimate the unavailable translation velocities of a quadrotor UAV with the requirement of persistence of excitation (PE). Accelerations, attitude angles, and angular velocity signals from the IMU were used as the inputs for the observer. Model reference control and dynamic inversion method were combined to formulate the OFB controller.

Based on the above literature review, it can be seen that few works have investigated the output feedback control problem for a quadrotor UAV with modeling uncertainties and being subject to external disturbances. Thus, there is great need to design the output feedback control methodology which does not require measurement of the quadrotor’s velocity. Meanwhile, the output feedback control law should able to achieve good robustness with respect to modeling uncertainties and external disturbances. To improve the performance of the quadrotor UAV control system, this paper proposes a NN-based robust OFB control design with the attitude angles and altitude of the UAV being selected as the output states based on our previous work in [25]. Since the three-parameter representations (e.g., Euler angles and Rodrigues parameters) exhibit singular orientations (i.e., the orientation Jacobian matrix in the kinematic equation is singular for some orientations), the attitude error system of the quadrotor is constructed in terms of the unit quaternion. Non-model-based velocity filters are designed to eliminate the need for angular and altitudinal velocity measurements. To increase the robustness of the proposed control design, NN-based approximation terms are proposed to learn the unknown dynamics of the quadrotor UAV, such as parametric uncertainties, unknown aerodynamic damping, and other unmodeled dynamics. The NNs are updated online to provide adaptations for the time-varying dynamics of the quadrotor. Then, nonlinear robust components based on variable structure approach are designed to compensate time-varying external disturbances and NN reconstruction errors. Semiglobally asymptotic tracking of time-varying attitude and altitude trajectories is proved through a composite Lyapunov-based stability analysis. To the best of our knowledge, the proposed method yields the first asymptotic tracking OFB control design with quaternion representation for the quadrotor UAV.

This paper is organized as follows. The dynamic model of a quadrotor is presented in Sect. 2. In Sect. 3, the attitude controller is designed and the stability analysis is provided. The altitude controller is developed and the corresponding stability analysis is proposed in Sect. 4. A detailed numerical simulation result is presented in Sect. 5. Finally, conclusions are included in Sect. 6.

2 Dynamics of a quadrotor

Motivated by the need to obtain the dynamic and kinematic models of the quadrotor UAV, two right-hand frames denoted by \({\mathcal {I}}\) and \({\mathcal {B}}\) are utilized. As illustrated in Fig. 1, the origin of the orthogonal right-hand coordinate system \({\mathcal {I}}\) is attached on the ground to represent the inertial reference frame, which can be denoted by \({\mathcal {I}}=\left\{ \begin{array}{ccc} x_{I}&y_{I}&z_{I} \end{array} \right\} \) with \(z_{I}\) being the vertical direction upward into the sky, \(y_{I}\) being the west direction, and \(x_{I}\) being determined by the right-hand rule. The frame \({\mathcal {B}}=\left\{ \begin{array}{ccc} x_{{\mathcal {B}}}&y_{{\mathcal {B}}}&z_{{\mathcal {B}}} \end{array} \right\} \) represents a orthogonal right-hand body-fixed coordinate system which is centered at the center of the mass of the quadrotor. The body axis \(z_{{\mathcal {B}}}\) is the normal axis of the principal plane of the quadrotor directed from bottom to top, the body axis \(x_{{\mathcal {B}}}\) is along with the forward flying direction of the quadrotor, and the direction of the body axis \(y_{{\mathcal {B}}}\) is determined by the right-hand rule. The quadrotor considered in the paper can be modeled via following differential equations [22]

$$\begin{aligned} J\dot{\omega }&= S(J\omega )\omega +N(\omega )+\tau +\tau _{d}\nonumber \\ m\ddot{z}&= -k_{z}\dot{z}-mg+\cos \theta \cos \phi u+d_{z} \end{aligned}$$
(1)

where \(\omega (t)\in {\mathbb {R}}^{3}\) denotes the angular velocity of the UAV with respect to the frame \({\mathcal {I}}\) defined in the \({\mathcal {B}}\), \(z(t)\) \(\in {\mathbb {R}}\) represents the altitude of the UAV, the matrix \(J\in {\mathbb {R}}^{3\times 3}\) represents the positive definite inertia matrix, \(m\) is a positive constant that denotes the mass of the vehicle, the matrix \(S(\cdot )\) represents a skew-symmetric matrix, \(N(\omega )\in {\mathbb {R}}^{3}\) represents the continuous aerodynamic damping moment vector, \(k_{z}\) is a positive constant that denotes the aerodynamic damping coefficient in the altitude direction, \(g=9.81\,\hbox {m/s}^{2}\) is the acceleration of gravity, \(\tau (t)\in {\mathbb {R}}^{3}\) is the control torque input, \(u\left( t\right) \in {\mathbb {R}}\) denotes the thrust along the \(z_{{\mathcal {B}}}\)-direction, \(\tau _{d}(t)\in {\mathbb {R}}^{3}\) represents the external disturbance moment vector, and \(d_{z}(t)\in {\mathbb {R}}\) denotes the external disturbance force in the \(z_{I}\)-direction, \(\phi (t)\) and \(\theta (t)\in {\mathbb {R}}\) represent the roll and pitch angles, respectively. The vectors and matrices in (1) are explicitly defined as

$$\begin{aligned} \omega (t)&= [\begin{array}{ccc} \omega _{1}(t)&\quad \omega _{2}(t)&\quad \omega _{3}(t) \end{array}]^{T}\nonumber \\ \tau (t)&= [\begin{array}{ccc} \tau _{1}(t)&\quad \tau _{2}(t)&\quad \tau _{3}(t) \end{array}]^{T}\nonumber \\ \tau _{d}(t)&= [\begin{array}{ccc} \tau _{d1}(t)&\quad \tau _{d2}(t)&\quad \tau _{d3}(t) \end{array}]^{T}\nonumber \\ J&= \hbox {diag}([\begin{array}{ccc} J_{11}(t)&\quad J_{22}(t)&\quad J_{33}(t) \end{array}]^{T}\nonumber \\ S(\xi )&= \left[ \begin{array}{ccc} 0 &{}\quad -\xi _{3} &{}\quad \xi _{2}\\ \xi _{3} &{}\quad 0 &{}\quad -\xi _{1}\\ -\xi _{2} &{}\quad \xi _{1} &{}\quad 0 \end{array}\right] \forall \xi =\left[ \begin{array}{ccc} \xi _{1}&\quad \xi _{2}&\quad \xi _{3} \end{array}\right] ^{T}. \nonumber \\ \end{aligned}$$
(2)
Fig. 1
figure 1

Quadrotor UAV coordiante systems

Assumption 1

The exogenous disturbances \(\tau _{d}{}_{i}(t)\) for \(i=1\ldots 3\) and \(d_{z}(t)\) in (1) are continuous differentiable and bounded up to its second-order time derivative \(\tau _{d}{}_{i}(t)\), \(d_{z}(t)\in \mathcal {C} ^{2},\) i.e., \(\tau _{d}{}_{i}(t)\), \(d_{z}(t)\), \(\dot{\tau }_{d}{}_{i}(t)\), \(\dot{d}_{z}(t)\), \(\ddot{\tau }_{d}{}_{i}(t)\), \(\ddot{d}_{z}(t)\in \mathcal {L}_{\infty }\).

Remark 1

The mass \(m\), the inertial matrix \(J\), the aerodynamic damping torque vector \(N(\omega )\), the damping coefficient \(k_{z}\), the disturbance moment vector \(\tau _{d}(t)\), and the disturbance force \(d_{z}(t)\) are unknown for the following control development.

3 Attitude tracking control design

3.1 Attitude representation via quaternion

According to the Euler’s theorem [26], any rotation matrix can be uniquely represented by a rotation angle \(\varphi (t)\in {\mathbb {R}}\) about a suitable unit vector \(k(t)\in {\mathbb {R}}^{3}\) [27] and [28]. Thus, utilizing the algorithm provided in [27], the angle \(\varphi (t)\) and an unit vector \(k(t)\) can be calculated for any given rotation matrix. Given \((\varphi ,k)\in {\mathbb {R}}^{4},\) an alternative parametrization of the attitude is provided by a unit quaternion vector \(q(t)=\left[ \begin{array}{cc} q_{o}(t)&q_{v}^{T}(t) \end{array} \right] ^{T}\) \(\in {\mathbb {R}}^{4}\) [26] and [28], which can be utilized to describe the orientation of the body-fixed frame \({\mathcal {B}}\) with respect to the inertial frame \({\mathcal {I}}\). Specifically, the unit quaternion provides a method to describe the rigid body’s attitude without singularity and is defined via the angle-axis parameters as \(q(t)=\left[ \begin{array}{cc} \cos (\frac{1}{2}\varphi (t))&k^{T}(t)\sin (\frac{1}{2}\varphi (t)) \end{array} \right] ^{T}\). Note that the unit quaternion is subject to the constraint \(q^{T}q=1\). It is important to mention that the rotation matrix from the body-fixed frame \({\mathcal {B}}\) to the inertial frame \({\mathcal {I}}\), which is denoted by \(R(t)\) \(\in SO(3),\) can be calculated by using the unit quaternion \(q(t)=\left[ \begin{array}{cc} q_{o}(t)&q_{v}^{T}(t) \end{array} \right] ^{T}\) \(\in {\mathbb {R}}^{4}\) as [26, 29]

$$\begin{aligned} R(q)=(q_{o}^{2}-q_{v}^{T}q_{v})I_{3}+2q_{v}q_{v}^{T}-2q_{o}S(q_{v} ). \end{aligned}$$
(3)

The unit quaternion \(q(t)\) can be related to angular velocity \(\omega (t)\) via the following differential equations [29] as

$$\begin{aligned} \dot{q}_{o}=-\frac{1}{2}q_{v}^{T}\omega \quad \dot{q}_{v}=\frac{1}{2} (q_{o}I_{3}+S(q_{v}))\omega \end{aligned}$$
(4)

where \(I_{3}\) denotes a \(3\times 3\) identity matrix. The expression in (4) can be modified as

$$\begin{aligned} \dot{q}=\frac{1}{2}B(q)\omega \end{aligned}$$
(5)

where the matrix \(B(q)=\left[ \begin{array}{cc} B_{o}^{T}&B_{v}^{T} \end{array} \right] ^{T}\in {\mathbb {R}}^{4\times 3}\) with \(B_{o}\in {\mathbb {R}}^{1\times 3} \) and \(B_{v}\in {\mathbb {R}}^{3\times 3}\) being defined as \(B_{0}=-q_{v}^{T}\) and \(B_{v}=q_{o}I_{3}+S(q_{v})\), respectively.

3.2 Attitude control objective

The object of this part is to design the control torque input \(\tau (t)\) to ensure the attitude tracking of the quadrotor without the measurement of the angular velocity vector \(\omega (t)\). For this purpose, the desired attitude of the quadrotor UAV is represented by a desired body-fixed, orthogonal coordinate frame which is denoted as \({\mathcal {B}}_{d}=\left\{ \begin{array}{ccc} x_{Bd}&y_{Bd}&z_{Bd} \end{array} \right\} \). The corresponding rotation matrix of the frame \({\mathcal {B}}_{d}\) with respect to the inertial frame \({\mathcal {I}}\) is denoted by \(R_{d}\) \(\in SO(3)\). The desired unit quaternion, which is defined as \(q_{d}(t)=\left[ \begin{array}{cc} q_{od}(t)&q_{vd}^{T}(t) \end{array} \right] ^{T}\) \(\in {\mathbb {R}}^{4}\), is utilized to described the orientation of \({\mathcal {B}}_{d}\) with respect to the inertial frame \({\mathcal {I}}\). The coordinate frame relationships are shown by Fig. 1. The desired angular velocity, denoted by \(\omega _{d}(t)\), is the angular velocity of the desired body frame \({\mathcal {B}}_{d}\) with respect to the inertial frame \({\mathcal {I}}\) expressed in \({\mathcal {B}}_{d}\). The desired rotation matrix \(R_{d}(t)\) can be calculated by using the desired quaternion unit \(q_{d}(t)\) as follows

$$\begin{aligned} R_{d}(q_{d})\!=\!\left( q_{od}^{2}\!-\!q_{vd}^{T}q_{vd}\right) I_{3}\!+\!2q_{vd}q_{vd}^{T} -2q_{od}S(q_{vd}).\nonumber \\ \end{aligned}$$
(6)

The time derivative of \(q_{d}(t)\) is related to the desired angular velocity \(\omega _{d}(t)\) through the following kinematic equation

$$\begin{aligned} \dot{q}_{d}=\frac{1}{2}B_{d}(q_{d})\omega _{d} \end{aligned}$$
(7)

where the matrix \(B_{d}(q_{d})=\left[ \begin{array}{cc} B_{od}^{T}&B_{vd}^{T} \end{array} \right] ^{T}\in {\mathbb {R}}^{4\times 3}\) with \(B_{od}\in {\mathbb {R}}^{1\times 3}\) and \(B_{vd}\in {\mathbb {R}}^{3\times 3}\) being defined as \(B_{od}=-q_{vd}^{T}\) and \(B_{vd}=q_{od}I_{3}+S(q_{vd})\), respectively. To quantify the mismatch between the current and desired orientation of the quadrotor, the quaternion tracking error, denoted by \(e_{q}(t)=\left[ \begin{array}{cc} e_{o}(t)&e_{v}^{T}(t) \end{array} \right] ^{T}\) \(\in {\mathbb {R}}^{4}\), is defined as follows

$$\begin{aligned}&e_{o}=q_{o}q_{od}+q_{v}^{T}q_{vd} \nonumber \\&\quad e_{v}=q_{od}q_{v}-q_{o}q_{vd}+S(q_{v})q_{vd} \end{aligned}$$
(8)

which also satisfies the constraint

$$\begin{aligned} e_{q}^{T}e_{q}=1. \end{aligned}$$
(9)

The mismatch between the rotation matrix \(R(t)\) and \(R_{d}(t)\) is defined as follows

$$\begin{aligned} \tilde{R}&=RR_{d}^{T}\nonumber \\&=\left( e_{o}^{2}-e_{v}^{T}e_{v}\right) I_{3}+2e_{v}e_{v}^{T}-2e_{o}S(e_{v}). \end{aligned}$$
(10)

By utilizing the rotation matrix \(\tilde{R}\), the desired unit quaternion \(q_{d}(t)\) which describes the orientation of the desired body-fixed frame \({\mathcal {B}}_{d}\) can be expressed in frame \({\mathcal {B}}\), and it can be computed via the following differential equations

$$\begin{aligned}&\dot{q}_{od}=-\frac{1}{2}q_{vd}^{T}\tilde{R}\omega _{d}\nonumber \\&\quad \dot{q}_{vd}=\frac{1}{2}(q_{od}I_{3}+S(q_{vd}))\tilde{R}\omega _{d}. \end{aligned}$$
(11)

The angular velocity of \({\mathcal {B}}\) with respect to \({\mathcal {B}}_{d}\) expressed in \({\mathcal {B}}\), denoted by \(\tilde{\omega }\in {\mathbb {R}}^{3}\), can be calculated from the definition of \(\tilde{R}(t)\) as [27]

$$\begin{aligned} \tilde{\omega }=\omega -\tilde{R}\omega _{d}\text {.} \end{aligned}$$
(12)

Based on the previous definitions, the quadrotor attitude tracking objective can be stated as

$$\begin{aligned} \lim \limits _{t\rightarrow \infty }e_{v}(t)=0\text {.} \end{aligned}$$
(13)

From (8) and (10), it can be obtained that if \(\lim \limits _{t\rightarrow \infty }e_{v}(t)=0\) then \(\lim \limits _{t\rightarrow \infty }\tilde{R}(t)=I_{3\times 3}\).

Remark 2

According to (7) and (11), the desired unit quaternion \(q_{d}(t)\) is bounded such that \(q_{d}^{(i)}\in \mathcal {L}_{\infty },\) for \(i=0,\,1,\,2,\,3\). This ensures that \(\omega _{d}^{(i)}\in \mathcal {L} _{\infty },\) for \(i=0,\) \(1,\, 2\).

3.3 Quaternion error dynamics

To design the attitude tracking control input \(\tau (t)\), we will take the time derivative of \(e_{q}(t)\). Refer to [31], the time derivative of \(e_{o}(t)\) and \(e_{v}(t)\) can be expressed as follows

$$\begin{aligned} \dot{e}_{o}=-\frac{1}{2}e_{v}^{T}\tilde{\omega } \quad \quad \dot{e}_{v}=\frac{1}{2}(S(e_{v})+e_{o}I_{3\times 3})\tilde{\omega } \end{aligned}$$
(14)

where the angular velocity \(\tilde{\omega }(t)\) has been introduced in (12). The relation between angular velocity \(\tilde{\omega }(t)\) and quaternion error \(e_{q}(t)\) can be rewritten via the following kinematic equation

$$\begin{aligned} \dot{e}_{q}=\frac{1}{2}B_{e}(e_{q})\tilde{\omega } \end{aligned}$$
(15)

where \(B_{e}(e_{q})=\left[ \begin{array}{cc} B_{eo}^{T}&B_{ev}^{T} \end{array} \right] ^{T}\in {\mathbb {R}}^{4\times 3}\) with \(B_{eo}\in {\mathbb {R}}^{1\times 3}\) and \(B_{ev}\in {\mathbb {R}}^{3\times 3}\) being defined as \(B_{eo}=-e_{v}^{T}\) and \(B_{ev}=e_{o}I_{3}+S(e_{v})\), respectively. After taking the time derivative of (12) and multiplying the resulting equation with \(J\), it can be obtained

$$\begin{aligned} J\tilde{\omega }&=N(\omega )+\tau +\tau _{d}+J\left[ S(\tilde{\omega } )\tilde{R}\omega _{d}-\tilde{R}\dot{\omega }_{d}\right] \nonumber \\&\quad -\,S(\tilde{\omega }+\tilde{R}\omega _{d})J(\tilde{\omega }+\tilde{R}\omega _{d}) \end{aligned}$$
(16)

where (1), (12), and Remark 3 have been utilized. Based on (15), it can be obtained that

$$\begin{aligned} \dot{e}_{v}=\frac{1}{2}B_{ev}\tilde{\omega }\text {.} \end{aligned}$$
(17)

To facilitate the development of the control input \(\tau (t)\), an auxiliary matrix, denoted by \(J_{ev}(t)\in {\mathbb {R}}^{3\times 3}\), is defined as

$$\begin{aligned} J_{ev}=B_{ev}^{-T}JB_{ev}^{-1}\text {.} \end{aligned}$$
(18)

By taking the time derivative of (17), and multiplying the resulting equation by \(J_{ev}\), the following equation can be obtained

$$\begin{aligned} J_{ev}\ddot{e}_{v}=\frac{1}{2}J_{ev}\dot{B}_{ev}\tilde{\omega }+\frac{1}{2}B_{ev}^{-T}J\overset{.}{\tilde{\omega }}\text {.} \end{aligned}$$
(19)

After substituting (16) into (19), the following equation can be obtained

$$\begin{aligned} J_{ev}\ddot{e}_{v}\!+\!C^{*}\dot{e}_{v}\!+\!N^{*}\!=\!\frac{1}{2}B_{vd}^{-T}\tau _{d}\!+\!\frac{1}{2}B_{vd}^{-T}N(\omega _{d})\!+\!\tau _{eq}\nonumber \\ \end{aligned}$$
(20)

where the terms \(C^{*}(t)\in {\mathbb {R}}^{3\times 3}\), \(N^{*} (t)\in {\mathbb {R}}^{3}\) and \(\tau _{eq}(t)\in {\mathbb {R}}^{3}\) are defined as

$$\begin{aligned} C^{*}&= -J_{ev}\left( \frac{\hbox {d}}{\hbox {d}t}(B_{ev}^{-1})\right) ^{-1}B_{ev}^{-1}-2\left( B_{ev}^{-1}\right) ^{T}\nonumber \\&S\left( JB_{ev}^{-1}\dot{e}_{v}\right) B_{ev}^{-1}\end{aligned}$$
(21)
$$\begin{aligned} N^{*}&= -\frac{1}{2}B_{ev}^{-T}J\left[ S(2B_{ev}^{-1}\dot{e}_{v} )\tilde{R}\omega _{d}-\tilde{R}\dot{\omega }_{d}\right] \nonumber \\&\quad +\,\frac{1}{2}B_{vd} ^{-T}N(\omega _{d})+\frac{1}{2}B_{ev}^{-T}S(\tilde{R}\omega _{d})J\tilde{R}\omega _{d}\nonumber \\&\quad +\,B_{ev}^{-T}S(\tilde{R}\omega _{d})JB_{ev}^{-1}\dot{e}_{v}\!-\!\frac{1}{2}B_{ev}^{-T}\tau _{d}+\frac{1}{2}B_{vd}^{-T}\tau _{d}\nonumber \\&\quad -\,\frac{1}{2}B_{ev}^{-T}N(\omega )+(B_{ev}^{-1})^{T}S(B_{ev}^{-1}\dot{e}_{v})J\tilde{R}\omega _{d} \end{aligned}$$
(22)
$$\begin{aligned} \tau _{eq}&= \frac{1}{2}B_{ev}^{-T}\tau . \end{aligned}$$
(23)

Remark 3

Based on the definition of \(B_{ev}\), the determinant of the Jacobian matrix \(B_{ev}\) can be calculated as follows

$$\begin{aligned}&\det (B_{ev}) =\det (e_{o}I_{3}+S(e_{v}))\nonumber \\&\quad =\det \left( \left[ \begin{array}{ccc} e_{0} &{}0 &{}0\\ 0 &{}e_{0} &{}0\\ 0 &{}0 &{}0 \end{array} \right] +\left[ \begin{array}{ccc} 0 &{}-e_{v3} &{}e_{v2}\\ e_{v3} &{}0 &{}-e_{v1}\\ -e_{v2} &{}e_{v1} &{}0 \end{array} \right] \right) \nonumber \\&\quad =e_{0}(e_{0}^{2}+e_{v1}^{2}+e_{v2}^{2}+e_{v3}^{2})\nonumber \\&\quad =e_{0} \end{aligned}$$
(24)

where (9) has been utilized. Based on the constraint in (9), it can be obtained that

$$\begin{aligned} \left| e_{0}\right| \le 1 \quad \left\| e_{v}\right\| \le 1 \end{aligned}$$
(25)

where \(\left\| \cdot \right\| \) represents the standard Euclidean norm. It can also easy to be obtained from (9) that

$$\begin{aligned} \text {if }\quad \lim _{t\rightarrow \infty }e_{v}=0\quad \text { then }\quad \lim _{t\rightarrow \infty }\left| e_{0}\right| =1\text {.} \end{aligned}$$
(26)

To guarantee that the inversion of the Jacobian matrix \(B_{ev}\) in (15) exists, we need to ensure that \(\det (B_{ev})\ne 0\) \(\forall t\in [0,+\infty )\). To make this constraint valid, we will require that the initial condition for \(e_{0}(t)\) be restricted that \(e_{0}(0)\ne 0\), and the following control laws should be designed to ensure that \(e_{0}(0)\ne 0\). From (8) and (26), it is not difficult to see that the desired trajectory can be initialized to ensure that \(e_{0}(0)\ne 0\).

The subsequent properties of the dynamics in (20), which can be approved by following the similar steps in [30] and [31], will be employed in the subsequent controller design and stability analysis.

Property 1

The matrices \(J_{ev}(t)\) and \(C^{*}(t)\) satisfy the following skew-symmetric property

$$\begin{aligned} \xi ^{T}\left( \frac{1}{2}\dot{J}_{ev}-C^{*}\right) \xi =0\text { }\forall \xi \in {\mathbb {R}}^{3}\text {.} \end{aligned}$$
(27)

Property 2

The matrix \(J_{ev}(t)\) is symmetric and positive definite, and satisfies the following inequality

$$\begin{aligned} \delta _{1}\left\| \xi \right\| ^{2}\le \xi ^{T}J_{ev}\xi \le \delta _{2}\left\| \xi \right\| ^{2}\text { }\forall \xi \in {\mathbb {R}} ^{3} \end{aligned}$$
(28)

where \(\delta _{1}\) and \(\delta _{2}\) are some positive constants.

3.4 OFB control development

In this part, the control torque input \(\tau (t)\) is designed under the restriction that the quadrotor’s angular velocity, \(\omega (t)\) is not measurable, and the dynamic model of (1) are uncertain as stated in Remark 1. The following non-model-based filters are employed to provide estimation for the unmeasurable angular velocity signals [32]

$$\begin{aligned} \dot{e}_{f}&= -e_{f}+r_{f} \quad r_{f}=p-(k_{2}+1)e_{v}\nonumber \\ \dot{p}&= -r_{f} -(k_{2}+1)(e_{v}+e_{f})-e_{f}+\frac{e_{v}}{(1-e_{v}^{T}e_{v})^{2}} \nonumber \\ \end{aligned}$$
(29)

where \(e_{f}(t)\), \(r_{f}(t)\in {\mathbb {R}}^{3}\) are the outputs of the filters, \(p(t)\in {\mathbb {R}}^{3}\) is an auxiliary variable used in the filter implementation, \(k_{2}\in {\mathbb {R}}\) is a positive filter gain, and \(e_{v}(t)\) is the measurable input of the filter and has been defined in (8). The initial value of \(p(t)\) and \(e_{f}(t)\) are set to be \(p(0)=0\) and \(e_{f}(0)=0\), respectively. The initial value of \(r_{f}\) is calculated via \(r_{f}(0)=p(0)-(k_{2}+1)e_{v}(0)\), where \(e_{v}(0)\) can be determined from (8).

To develop the error system for OFB controller, the following auxiliary signal, denoted by \(\eta (t)\in {\mathbb {R}}^{3}\), is defined as

$$\begin{aligned} \eta =e_{v}+\dot{e}_{v}+e_{f}. \end{aligned}$$
(30)

By taking the time derivative of (29), the following dynamics for \(r_{f}(t)\) can be obtained

$$\begin{aligned} \dot{r}_{f}=-r_{f}-(k_{2}+1)\eta -e_{f}+\frac{e_{v}}{(1-e_{v}^{T}e_{v})^{2} }\text {.} \end{aligned}$$
(31)

After taking the time derivative of (30), multiplying the result equation by \(J_{ev}\), and substituting from (31) and (30), the open-loop dynamics of \(\eta (t)\) can be obtained as

$$\begin{aligned} J_{ev}\dot{\eta }\!=\!-C^{*}\eta -k_{2}J_{ev}\eta \!+\!\frac{1}{2}B_{vd}^{-T}\tau _{d}\!+\!N_{ev}\!+\!n_{d}\!+\!\tau _{eq}\nonumber \\ \end{aligned}$$
(32)

where the auxiliary function vector \(N_{ev}(t)\) \(\in {\mathbb {R}}^{3}\) is defined as

$$\begin{aligned} N_{ev}&= C^{*}(e_{f}+e_{v})+J_{ev}(\eta -e_{v}+\frac{e_{v}}{(1-e_{v}^{T} e_{v})^{2}})\nonumber \\&\quad -\,2J_{ev}e_{f}-N^{*}\text {.} \end{aligned}$$
(33)

The bounded uncertain function vector \(n_{d}(t)\in {\mathbb {R}}^{3}\) in (32) is defined as

$$\begin{aligned} n_{d}=\frac{1}{2}B_{vd}^{-T}N(\omega _{d})+J\dot{\omega }_{d}+\frac{1}{2}S(\omega _{d})J\omega _{d}\text {.} \end{aligned}$$
(34)

It is not difficult to see that \(n_{d}(t)\in \mathcal {L}_{\infty }\) from (34). By taking the time derivative of (34), it can be obtained that

$$\begin{aligned} \dot{n}_{d}&= \frac{1}{2}\left( \frac{\partial B_{vd}^{-T}(q_{d})}{\partial q_{vd1}}\dot{q}_{vd1}+\frac{\partial B_{vd}^{-T}(q_{d})}{\partial q_{vd2}} \dot{q}_{vd2}\right. \nonumber \\&\left. \quad +\,\frac{\partial B_{vd}^{-T}(q_{d})}{\partial q_{vd3}}\dot{q}_{vd3}+\frac{\partial B_{d}^{-T}(q_{vd})}{\partial q_{od}}\dot{q} _{od}\right) N\left( \omega _{d}\right) \nonumber \\&\quad +\,\frac{1}{2}B_{vd}^{-T}(q_{vd})\left( \frac{\partial N(\omega _{d} )}{\partial \omega _{d1}}\dot{\omega }_{d1}+\frac{\partial N(\omega _{d} )}{\partial \omega _{d2}}\dot{\omega }_{d2}\right. \nonumber \\&\left. \quad +\,\frac{\partial N(\omega _{d} )}{\partial \omega _{d3}}\dot{\omega }_{d3}\right) +J\dot{\omega }_{d}+\frac{1}{2}\left( \frac{\partial S(\omega _{d})}{\partial \omega _{d1}} \dot{\omega }_{d1}\right. \nonumber \\&\quad \left. +\,\frac{\partial S(\omega _{d})}{\partial \omega _{d2}} \dot{\omega }_{d2}+\frac{\partial S(\omega _{d})}{\partial \omega _{d3}} \dot{\omega }_{d3}\right) J\omega _{d}\nonumber \\&\quad +\,\frac{1}{2}S(\omega _{d})J\dot{\omega }_{d}, \end{aligned}$$
(35)

and thus, it is easy to see that \(\dot{n}_{d}(t)\in \mathcal {L}_{\infty }\) according to Remark 2.

Here, we consider compensating for the uncertain term \(n_{d}(t)\) via NN-based approximation methods. According to the universal approximation property of NN, \(n_{d}(t)\) can be approximated by a three-layer NN such as

$$\begin{aligned} n_{d}=W^{T}\sigma (V^{T}\chi )+\varepsilon (\chi ) \end{aligned}$$
(36)

where \(\chi \) represents the input of the NN which is defined as \(\chi =\left[ \begin{array}{cccc} 1&q_{d}^{T}&\omega _{d}^{T}&\dot{\omega }_{d}^{T} \end{array} \right] ^{T}\in {\mathbb {R}}^{10}\), \(W\) and \(V\) represent the ideal weight matrices of the NN, \(\sigma (\cdot )\) represents the activation function, and \(\varepsilon (\cdot )\) denotes the approximation error. Since \(W\) and \(V\) can not be obtained, we proposed the following dynamic NN design

$$\begin{aligned} \hat{n}=\hat{W}^{T}\sigma (\bar{V}^{T}\chi ) \end{aligned}$$
(37)

where \(\hat{n}\) represents the output of the NN which is employed to provide an approximation of the unknown part \(n_{d}(t)\) in (32), \(\hat{W}(t)\in {\mathbb {R}}^{10\times 3}\) represents the estimation of the ideal weight matrix \(W,\) and \(\bar{V}\in {\mathbb {R}}^{11\times 10}\) is set to be a constant matrix to simplify the implementation of the NN. The activation function \(\sigma (\cdot )\) in (39) is chosen as \(\sigma (\alpha )=\frac{1}{1+\exp (\alpha )}\). The update law of \(\hat{W}(t)\) is designed as

$$\begin{aligned}&\dot{\hat{W}}=-\varepsilon _{1}\hat{W}+T\sigma \big (\bar{V}^{T}\chi \big )\hbox {sat}\big (e_{v} ^{T}+\xi _{1}^{T}\big ) \nonumber \\&\quad \xi _{1}=\frac{1}{\varepsilon _{2}}(-\xi _{2}+e_{v}) \quad \quad \dot{\xi }_{2}=\frac{1}{\varepsilon _{2}}(-\xi _{2}+e_{v}) \end{aligned}$$
(38)

where \(\xi _{1}(t)\), \(\xi _{2}(t)\in {\mathbb {R}}^{3}\) are auxiliary signals, \(\varepsilon _{1}\), \(\varepsilon _{2}\in {\mathbb {R}}\) are some positive gains, \(T\in {\mathbb {R}}^{10\times 10}\) is a diagonal positive definite update gain matrix, and \(sat(\cdot )\in {\mathbb {R}}^{1\times 3}\) represents a saturation function vector. From (38), it is not difficult to show that \(W(t)\), \(\overset{.}{\hat{W}}(t)\in \mathcal {L}_{\infty }\), thus \(\hat{n}(t)\), \(\dot{\hat{n}}(t)\in \mathcal {L}_{\infty }\).

Based on the velocity filters proposed in (29) and the open-loop error system in (32), the OFB controller \(\tau _{eq}(t)\) can be designed as

$$\begin{aligned} \tau _{eq}&= -K_{1}\hbox {sgn}(e_{v}+e_{f})+(k_{2}+1)r_{f}\nonumber \\&-\,\hat{n}-\frac{e_{v}}{(1-e_{v}^{T}e_{v})^{2}} \end{aligned}$$
(39)

where \(K_{1}=\hbox {diag}(K_{11},K_{12},K_{13})\in {\mathbb {R}}^{3\times 3}\) is a constant, diagonal, positive definite gain matrix, and the function \(\hbox {sgn}(\bullet )\) vector is defined as

$$\begin{aligned} \hbox {sgn}(\xi )=\left[ \begin{array}{ccc} \hbox {sgn}(\xi _{1})&\hbox {sgn}(\xi _{2})&\hbox {sgn}(\xi _{3}) \end{array} \right] ^{T} \end{aligned}$$
(40)

\(\forall \xi =\left[ \begin{array}{ccc} \xi _{1}&\xi _{2}&\xi _{3} \end{array} \right] ^{T}\). The actual control torque input \(\tau (t)\) can be calculated via (23). After substitution (39) into (32), the following closed-loop system can be obtained

$$\begin{aligned} J_{ev}\dot{\eta }&= -C^{*}\eta -k_{2}J_{ev}\eta +\bar{\tau }_{d}+N_{ev} +(k_{2}+1)r_{f}\nonumber \\&\quad -\,K_{1}\hbox {sgn}(e_{v}+e_{f})-\frac{e_{v}}{(1-e_{v}^{T}e_{v})^{2} } \end{aligned}$$
(41)

where the auxiliary function vector \(\bar{\tau }_{d}(t)\in {\mathbb {R}}^{3}\) is defined as

$$\begin{aligned} \bar{\tau }_{d}=\tilde{n}+\frac{1}{2}B_{d}^{-T}\tau _{d} \end{aligned}$$
(42)

with \(\tilde{n}=n_{d}-\hat{n}\) representing the reconstruction error of the NN. Based on the fact that \(n_{d}(t)\), \(\dot{n}_{d}(t)\), \(\hat{n}(t)\), \(\dot{\hat{n}}(t)\) \(\in \mathcal {L}_{\infty }\), the definition of \(B_{d}\), Remark 1, and Remark 2, it is not difficult to prove that \(\bar{\tau }_{d}(t)\), \(\frac{d}{dt}(\bar{\tau }_{d}(t))\in \mathcal {L}_{\infty }\).

Remark 4

Based on Remark 1, the fact that the rotation matrixes \(R(t)\), \(R_{d}(t)\), and \(\tilde{R}(t)\) are bounded, and the structure of (29) and (33), it can be shown that [31]

$$\begin{aligned} \left\| N_{ev}\right\| \le \rho \left( \left\| z_{q}\right\| \right) \left\| z_{q}\right\| \end{aligned}$$
(43)

where \(z_{q}(t)\) \(\in {\mathbb {R}}^{9}\) is defined as

$$\begin{aligned} z_{q}=\left[ \begin{array}{ccc} e_{f}^{T}&\eta ^{T}&\frac{e_{v}^{T}}{\sqrt{1-e_{v}^{T}e_{v}}} \end{array} \right] ^{T} \end{aligned}$$
(44)

with the positive function \(\rho (\left\| z_{q}\!\right\| )\) being non-decreasing in \(\left\| z_{q}\right\| \).

Comparing with our previous work in [25], the major improvements in this paper are listed as follows:

(1) A neural network (NN)-based feedforward component is introduced in the control design to compensate for the system’s uncertainties which do not satisfied the linear-in-parameters (LP) property. In addition, this NN-based feedforward component can help to reduce the chattering issue caused by the \(\hbox {sgn}(\cdot )\) function in the control input in (39). The stability with the NN-based control input is also proved in the subsequent section.

(2) A detailed numerical simulation is performed to validate the effectiveness and the robustness of the proposed control methodology.

3.5 Stability analysis of attitude dynamics

Before presenting the main result of this part, a lemma that will be invoked later is stated firstly.

Lemma 1

Let the auxiliary function \(L_{1}(t)\in {\mathbb {R}}\) be defined as

$$\begin{aligned} L_{1}=\eta ^{T}(\bar{\tau }_{d}-K_{1}\hbox {sgn}(e_{v}+e_{f}))\text {.} \end{aligned}$$
(45)

If the control gain matrix \(K_{1}\) introduced in (39) is selected to satisfy the following sufficient condition

$$\begin{aligned} K_{1i}>\left\| \bar{\tau }_{d}(t)\right\| _{\infty }+\left\| \frac{d}{d(t)}(\bar{\tau }_{d}(t))\right\| _{\infty }\text { for}\quad i=1,2,3\nonumber \\ \end{aligned}$$
(46)

where \(\left\| \bullet \right\| _{\infty }\) denotes the infinity norm, then

$$\begin{aligned} \int _{0}^{t}L_{1}(\tau )d\tau \le \zeta _{b} \end{aligned}$$
(47)

with the positive constant \(\zeta _{b}\) being defined as

$$\begin{aligned} \zeta _{b}= {\sum \limits _{i=1}^{3}} K_{1i}\left| e_{vi}(0)\right| -e_{v}^{T}(0)\bar{\tau }_{d} (0). \end{aligned}$$
(48)

Proof

Please see the “Appendix”.

Now, the main stability result of the OFB tracking controller proposed in (39) is stated by the following theorem.

Theorem 1

The control law proposed in (39) ensures that all the closed-loop signals under the closed-loop attitude operation are bounded, and the attitude tracking error is regulated in the sense that

$$\begin{aligned} e_{v}(t)\rightarrow 0\text { as }t\rightarrow \infty \text { } \end{aligned}$$
(49)

provided that \(K_{1}\) is selected to satisfy (46), and \(k_{2}\) is selected sufficient large relative to the system initial conditions.

Proof

Let the auxiliary function \(Q(t)\in {\mathbb {R}}\) be defined as

$$\begin{aligned} Q=\zeta _{b}-\int _{0}^{t}L(s)\hbox {d}s \end{aligned}$$
(50)

where the \(\zeta _{b}\) and \(L(t)\) have been introduced in Lemma 1. It is not difficult to show that \(Q\ge 0\) based on Lemma 1. To prove the above theorem, an nonnegative function \(V_{1}(t)\in {\mathbb {R}}\) is defined as

$$\begin{aligned} V_{1}=\frac{1}{2}\eta ^{T}J_{ev}\eta +\frac{1}{2}e_{f}^{T}e_{f}+\frac{1}{2} \frac{e_{v}^{T}e_{v}}{(1-e_{v}^{T}e_{v})^{2}}+Q\text {.} \end{aligned}$$
(51)

Note that the function \(V_{1}(t)\) can be bounded as

$$\begin{aligned} \lambda _{1}\left\| y\right\| ^{2}\le V_{1}\le \lambda _{2}\left\| y\right\| ^{2} \end{aligned}$$
(52)

where \(y=\left[ \begin{array}{cc} z_{q}^{T}&\sqrt{Q} \end{array} \right] ^{T}\in {\mathbb {R}}^{10}\) with \(z_{q}\) being defined in (44). After taking the time derivative of (51), and substituting (29), (41) together with (50) into the resulting equation, the following expression can be obtained

$$\begin{aligned} \dot{V}_{1}&= -e_{f}^{T}e_{f}-\frac{e_{v}^{T}e_{v}}{(1-e_{v}^{T}e_{v})^{2} }-k_{2}\eta ^{T}J_{ev}\eta +\eta ^{T}N_{ev}\nonumber \\&= -\left\| z_{q}\right\| ^{2}+\eta ^{T}\eta -k_{2}\eta ^{T}J_{ev}\eta +\eta ^{T}N_{ev} \end{aligned}$$
(53)

upon the use of the definition of \(z_{q}(t)\). After applying (28) and (43) to (53), it can be obtained that

$$\begin{aligned} \dot{V}_{1}&\le -\left\| z_{q}\right\| ^{2}+\left[ \left\| \eta \right\| \left\| z_{q}\right\| \left\| \rho (\left\| z_{q}\right\| )\right\| -k_{n}\left\| \eta \right\| ^{2}\right] \nonumber \\&\le -\left( 1-\frac{\rho ^{2}(\left\| z_{q}\right\| )}{4k_{n}}\right) \left\| z_{q}\right\| ^{2} \end{aligned}$$
(54)

where the constant \(k_{n}\) satisfies the following inequality

$$\begin{aligned} k_{n}<k_{2}\delta _{1}-1. \end{aligned}$$
(55)

Based on (55), we can obtain that

$$\begin{aligned} k_{2}>\frac{1}{\delta _{1}}(k_{n}+1). \end{aligned}$$
(56)

From (54), it can be stated that

$$\begin{aligned} \dot{V}_{1}\le -\gamma \left\| z_{q}\right\| ^{2}\quad \text { for }\;k_{n} >\frac{1}{4}\rho ^{2}\left( \left\| z_{q}\right\| \right) \end{aligned}$$
(57)

where \(\gamma \) is some positive constant. For the consideration of subsequent stability analysis, let the auxiliary functions \(W_{1}(y)\), \(W_{2}(y)\), \(W_{3}(y)\in {\mathbb {R}}\) be defined as

$$\begin{aligned} W_{1}(y)=\lambda _{1}\left\| y\right\| ^{2} \quad W_{2}(y)=\lambda _{2}\left\| y\right\| ^{2} \quad W_{3}(y)=\gamma \left\| z_{q}\right\| ^{2} \nonumber \\ \end{aligned}$$
(58)

where \(\lambda _{1}\) and \(\lambda _{2}\) are defined as

$$\begin{aligned} \lambda _{1}=\frac{1}{2}\min (1,\delta _{1}) \quad \lambda _{2}=\max \left( \frac{1}{2} \delta _{2},1\right) \end{aligned}$$
(59)

with the positive constants \(\delta _{1}\) and \(\delta _{2}\) being defined in (28). From (52) and (57), it can be concluded that

$$\begin{aligned} W_{1}(y)\le V_{1}\le W_{2}(y) \quad \quad \dot{V}_{1}\le -W_{3}(y). \end{aligned}$$
(60)

The inequality in (57) can be utilized to define the region \(\mathcal {D}\) as

$$\begin{aligned} {\mathcal {D}}=\left\{ y\in {\mathbb {R}}^{10}\text {, }\left\| y\right\| \le \rho ^{-1}(2\sqrt{k_{n}})\right\} . \end{aligned}$$
(61)

From (51) (57), we know that \(V_{1}(t)\in \mathcal {L}_{\infty } \); hence \(\eta (t),\) \(e_{f}(t),\) \(e_{v}(t),\) \(r_{f}(t)\in \mathcal {L}_{\infty }\). From (41) and (30), it can be proved that \(\dot{e}_{v} (t)\), \(\dot{\eta }(t)\in \mathcal {L}_{\infty }\). Now, (29) can be utilized to prove that \(\dot{e}_{f}(t)\in \mathcal {L}_{\infty }\). Based on the previous boundedness analysis, it can be concluded that \(\dot{W}_{3} (y)\in \mathcal {L}_{\infty }\) which is a sufficient condition for \(W_{3}(y)\) to be uniformly continuous. Let the region \({\mathcal {F}}\) being defined as

$$\begin{aligned} {\mathcal {F}}=\left\{ y\in \mathcal {D}\text {, }W_{2}(y)<\lambda _{1}(\rho ^{-1} (2\sqrt{k_{n}}))^{2}\right\} \text {.} \end{aligned}$$
(62)

By invoking Theorem 8.4 in [33], it can be proved that \(\gamma \left\| z_{q}\right\| ^{2}\rightarrow 0\), as \(t\rightarrow \infty \) \(\forall y(0)\in {\mathcal {F}}\). The region in (62) can be made large enough by increasing the constant \(k_{n}\), i.e., a semiglobal result [34]. Utilizing (58) and (62), the region of attraction can be calculated as

$$\begin{aligned} W_{2}(y(0))<\lambda _{1}\left( \rho ^{-1}(2\sqrt{k_{n}})\right) ^{2} \end{aligned}$$
(63)

The inequality in (63) can be rewritten as

$$\begin{aligned} k_{n}>\frac{1}{4}\rho ^{2}\left( \sqrt{\frac{\lambda _{2}}{\lambda _{1}}}\left\| y(0)\right\| \right) . \end{aligned}$$
(64)

Finally, by utilizing (43), (48), definition of \(y(t)\) and \(Q(t)\), and the initial values of \(p(t)\) and \(e_{f}(t)\), an explicit expression for \(\left\| y(0)\right\| \) can be calculated as

$$\begin{aligned} \left\| y(0)\right\| =\sqrt{\left\| \frac{e_{v}(0)}{(1-e_{v} ^{T}(0)e_{v}(0))^{2}}\right\| +\left\| \eta (0)\right\| + {\sum _{i=1}^{3}} K_{1i}\left| e_{vi}(0)\right| -\frac{1}{2}e_{v}^{T}(0)B_{d}^{-T} \bar{\tau }_{d}(0)}. \end{aligned}$$
(65)

4 Altitude tracking control design

4.1 Altitude error system

To facilitate the OFB control development of the thrust input \(u(t)\), the dynamics of altitude motion in (1) can be reorganized as

$$\begin{aligned} m\ddot{z}=-k_{z}\dot{z}-mg+u_{eq}+d_{z} \end{aligned}$$
(66)

where the auxiliary function \(u_{eq}(t)\in {\mathbb {R}}\) is defined as

$$\begin{aligned} u_{eq}=(\cos \theta \cos \phi )u. \end{aligned}$$
(67)

The Euler angles can be computed from the quaternion unit \(q(t)\) via

$$\begin{aligned}&\theta =\arcsin (2(q_{0}q_{2}-q_{1}q_{3})) \nonumber \\&\quad \phi =\left( \arctan \frac{2(q_{0} q_{1}+q_{2}q_{3})}{1-2(q_{1}^{2}+q_{2}^{2})}\right) . \end{aligned}$$
(68)

The altitude tracking error, denoted by \(e_{z}(t)\in {\mathbb {R}}\), is defined as

$$\begin{aligned} e_{z}=z_{d}-z \end{aligned}$$
(69)

where \(z_{d}(t)\in {\mathbb {R}}\) represents the reference trajectory for the quadrotor in \(z\)-direction. The control objective in this part is to design thrust input \(u(t)\) such that \(e_{z}(t)\rightarrow 0\) as \(t\rightarrow \infty \), under the restriction that the velocity signal \(\dot{z}(t)\) is not measurable. Inspired by [32], we propose the following non-model-based filters to provide the unmeasurable translational velocity in \(z\)-direction

$$\begin{aligned} \dot{e}_{fz}&= -e_{fz}+r_{fz} \quad r_{fz}=p_{z}-(k_{2z}+1)e_{z} \nonumber \\ \dot{p}_{z}&= -r_{fz}-(k_{2z}+1)(e_{z}+r_{fz})+e_{z}-e_{fz} \end{aligned}$$
(70)

where \(e_{fz}(t)\), \(r_{fz}(t)\in {\mathbb {R}}\) are the outputs of the filters, \(p_{z}(t)\in {\mathbb {R}}\) is an auxiliary variable used in the filter implementation, and \(k_{2z}\in {\mathbb {R}}\) is a positive constant. The initial value for \(e_{fz}(t)\) and \(p_{z}(t)\) are set as \(e_{fz}(0)=0\) and \(p_{z}(0)=(k_{2z}+1)e_{z}(0)\), respectively. The only input signal for the velocity filter in (70) is the measurable signal \(e_{z}(t)\). An auxiliary term, denoted by \(\eta _{z}(t)\in {\mathbb {R}}\), is defined as follows

$$\begin{aligned} \eta _{z}=\dot{e}_{z}+e_{z}+r_{fz}. \end{aligned}$$
(71)

After taking the time derivative of the second equation in (70), it can be obtained that

$$\begin{aligned} \dot{r}_{fz}=-r_{fz}-(k_{2z}+1)\eta _{z}+e_{z}-e_{fz}\, \text {.} \end{aligned}$$
(72)

After taking the time derivative of (71), and substituting the first equation in (70) together with (72) into the resulting equation, the following expression can be obtained

$$\begin{aligned} \dot{\eta }_{z}=\ddot{z}_{d}-\ddot{z}-2r_{fz}-e_{fz}-k_{2z}\eta _{z} \text {.} \end{aligned}$$
(73)

After multiplying (73) by \(m\) and substituting (66) into the resulting equation, we have

$$\begin{aligned} m\dot{\eta }_{z}=-k_{2z}m\eta _{z}+N_{z}-m(2r_{fz}+e_{fz})-u_{eq} \end{aligned}$$
(74)

where \(N_{z}(t)\in {\mathbb {R}}\) is an auxiliary term defined as

$$\begin{aligned} N_{z}=k_{z}\dot{z}+mg+m\ddot{z}_{d}-d_{z}\text {.} \end{aligned}$$
(75)

Let the auxiliary function \(N_{zd}(t)\in {\mathbb {R}}\) be defined as \(N_{zd}(t)=N_{z}(z_{d}(t)\), \(\dot{z}_{d}(t))\). It can be shown that \(N_{zd}(t) \) and \(\dot{N}_{zd}(t)\in \mathcal {L}_{\infty }\) by using the fact that \(z_{d}(t)\) and \(\dot{z}_{d}(t)\in \mathcal {L}_{\infty }\). The expression in (74) can be rewritten as

$$\begin{aligned} m\dot{\eta }_{z}=-k_{2z}m\eta _{z}+N_{zd}+\tilde{N}_{z}-u_{eq} \end{aligned}$$
(76)

where the auxiliary function \(\tilde{N}_{z}(t)\in {\mathbb {R}}\) is defined as

$$\begin{aligned} \tilde{N}_{z}=N_{z}-N_{zd}-m(2r_{fz}+e_{fz}). \end{aligned}$$
(77)

Remark 5

Based on the definitions of \(N_{z}(t)\) and \(N_{zd}(t)\), we can show that \(\tilde{N}_{z}(t)\) can be upper bounded by the following inequality [31]

$$\begin{aligned} \left\| \tilde{N}_{z}\right\| \le \rho _{z}(\left\| z_{h}\right\| )\left\| z_{h}\right\| \end{aligned}$$
(78)

where \(z_{h}=\left[ \begin{array}{cccc} e_{z}&e_{fz}&r_{fz}&\eta _{z} \end{array} \right] ^{T}\in {\mathbb {R}}^{4}\), and the positive function \(\rho _{z}(\left\| z_{h}\right\| )\) is non-decreasing in \(\left\| z_{h}\right\| \).

4.2 OFB control development

To achieve the control objective for the altitude direction, the following OFB control \(u_{eq}(t)\in {\mathbb {R}}\) is proposed

$$\begin{aligned} u_{eq}=k_{1z}\hbox {sgn}(e_{z}+e_{fz})-(k_{2z}+1)r_{fz}+e_{z} \end{aligned}$$
(79)

where \(k_{1z}\) and \(k_{2z}\) are some positive control gains, and \(\hbox {sgn}(\bullet )\) is a standard sign function. The actual thrust input \(u(t)\) can be computed via (67). After substituting (79) into (76), the following closed-loop dynamic error system can be obtained

$$\begin{aligned} m\dot{\eta }_{z}&= -k_{2z}m\eta _{z}-k_{1z}\hbox {sgn}(e_{z}+e_{fz})\nonumber \\&\quad +\,\tilde{N}_{z}+N_{zd}+(k_{2z}+1)r_{fz}-e_{z}\text {.} \end{aligned}$$
(80)

4.3 Stability analysis of altitude dynamics

Before presenting the main result of this part, the following lemma which will be invoked later is stated firstly.

Lemma 2

Let the auxiliary function \(L_{2}(t)\in {\mathbb {R}}\) be defined as

$$\begin{aligned} L_{2}=\eta _{z}(N_{zd}-k_{1z}\hbox {sgn}(e_{z}+e_{fz}))\text {.} \end{aligned}$$
(81)

If the control gain \(k_{1z}\in {\mathbb {R}}\) is selected to satisfy the following sufficient condition

$$\begin{aligned} k_{1z}>\left\| N_{dz}(t)\right\| _{\infty }+\left\| \dot{N} _{dz}(t)\right\| _{\infty } \end{aligned}$$
(82)

where \(\left\| \bullet \right\| _{\infty }\) denotes the infinity norm, then

$$\begin{aligned} \int _{\infty }^{t}L_{2}(s)\hbox {d}s\le \zeta _{bz} \end{aligned}$$
(83)

where the positive constants \(\zeta _{bz}\in {\mathbb {R}}\) is defined as

$$\begin{aligned} \zeta _{bz}=k_{1z}\left| e_{z}(0)\right| -e_{z}(0)N_{zd}(0)\text {.} \end{aligned}$$
(84)

Proof

The proof can be accomplished by following the similar steps in [32].

Theorem 2

The control law in (79) ensures that all closed-loop signals under closed-loop altitude operation are bounded, and the altitude tracking error is regulated in the sense that

$$\begin{aligned} e_{z}(t)\rightarrow 0\text { as }t\rightarrow \infty \text { } \end{aligned}$$
(85)

provided that the control gain \(k_{1z}\) satisfies (82), and \(k_{2z}\) is selected sufficient large relative to the system initial conditions.

Proof

Please see the Appendix.

5 Simulation results

In this section, a numerical simulation is presented to validate the performance of the proposed OFB control design. The inertial matrix of the quadrotor UAV is with the following value

$$\begin{aligned} J=\hbox {diag}(1.25,1.25,2.5)\hbox {kg\,m}^{2}, \end{aligned}$$
(86)

the mass of the quadrotor UAV is with the value of \(m=2\,\hbox {kg}\), and the aerodynamic damping coefficient is with the value of \(k_{z}=0.01\,\hbox {Ns/m}\). The nonlinear aerodynamic damping moment \(N(\omega )\) in (1) is

$$\begin{aligned} N(\omega )\!=\!\left[ \! \begin{array}{ccc} g_{1}+g_{2}\left| \omega _{1}\right| &{} 0 &{} 0\\ 0 &{} g_{3}+g_{4}\left| \omega _{1}\right| &{} 0\\ 0 &{} 0 &{} g_{5}+g_{6}\left| \omega _{1}\right| \end{array} \right] \omega \nonumber \\ \end{aligned}$$
(87)

where the coefficient is with the value of \(g_{i}=0.065\,\hbox {Nms/rad}\) for \(i=1\ldots 6\). The initial value of quadrotor’s attitude states are set to be

$$\begin{aligned} \begin{array}{cc} q_{0}(0)=0.9486&q_{v}(0)=\left[ \begin{array}{ccc} 0.1826&0.1826&0.1826 \end{array} \right] ^{T} \end{array}.\nonumber \\ \end{aligned}$$
(88)

To test the robustness of the proposed control design, the initial value of the quadrotor’s altitude is set to be \(z(0)=0.6\,\hbox {m}\). The desired attitude trajectory is selected to be a smooth rotation with the corresponding desired angular velocity denoted as follows

$$\begin{aligned} \omega _{d}=\left[ \begin{array}{ccc} 0.3\cos (t)&0.3\cos (t)&0.3\cos (t) \end{array} \right] ^{T}\,\hbox {rad/s}. \end{aligned}$$
(89)

The desired altitude trajectory \(z_{d}(t)\) is set as follows

$$\begin{aligned} z_{d}\left( t\right) =\left\{ \begin{array}{lcc} -\frac{A_{1}}{2}\left( \cos \frac{\pi t}{T_{r}}+1\right) &{} &{} t<T_{r}\\ \frac{A_{2}}{2}\left( \cos \left( \frac{2\pi }{\omega _{r}}\left( t-T_{r}\right) \right) -1\right) +A_{1} &{} &{} t\ge T_{r} \end{array} \right. \end{aligned}$$
(90)

where \(A_{1}=2,\) \(A_{2}=0.5,\) \(T_{r}=8\,\hbox {s}\), and \(\omega _{r}=3\pi \) rad/s. The desired quaternion is related to the desired angular velocity of (89) through the kinematic equation (11) with the following initial values

$$\begin{aligned} \begin{array}{cc} q_{od}(0)=1&\quad q_{vd}(0)=\left[ \begin{array}{ccc} 0&\quad 0&\quad 0 \end{array} \right] ^{T} \end{array} \,\text {.} \end{aligned}$$
(91)

The external disturbance are selected as

$$\begin{aligned} \begin{array}{c} \tau _{d1}=\tau _{d2}=\tau _{d3}=0.2\sin (t)\,\hbox {Nm}\\ d_{z}=4\sin (t)\,\hbox {N} \end{array} \text {.} \end{aligned}$$
(92)

The gains for the filter, NN, and controller are tuned by a trial-and-error methodology until a good tracking performance is achieved. This leads to the following values for the gains

$$\begin{aligned} \begin{array}{c} \begin{array}{cccc} K_{1}=\hbox {diag}( \begin{array}{ccc} 5 &{}\quad 5 &{}\quad 5 \end{array} ) &{} k_{2}=20 &{} k_{1z}=3 &{} k_{2z}=15 \end{array}\\ T=\hbox {diag}\left\{ \begin{array}{cccccccccc} 100 &{} 100 &{} 100 &{} 50 &{} 50 &{} 50 &{} 50 &{} 50 &{} 20 &{} 50 \end{array} \right\} \\ \begin{array}{cc} \varepsilon _{1}=10 &{} \varepsilon _{2}=10 \end{array}. \end{array} \end{aligned}$$
(93)

The thrust force of the four rotors \(f_{i}(t)\) for \(i=1,\ldots ,\) \(\not 4\) can be calculated via

$$\begin{aligned} u&= f_{1}\!+\!f_{2}\!+\!f_{3}\!+\!f_{4} \quad \tau _{1}=l(-f_{1}-f_{2}+f_{3}+f_{4})\nonumber \\ \tau _{2}&= l(\!-\!f_{1}\!+\!f_{2}\!+\!f_{3}\!-\!f_{4}) \quad \tau _{3}\!=\!c(\!-\!f_{1}\!+\!f_{2}\!+\!f_{3}\!-\!f_{4})\nonumber \\ \end{aligned}$$
(94)

where \(l=0.2\,\hbox {m}\) denotes the distance between the epicenter of the quadrotor and the rotor axes, and \(c=0.25\in {\mathbb {R}}\) denotes a constant force-to-moment coefficient.

The numerical simulation results are presented in Figs. 2, 3, 4, 5, 6, 7, and 8. Figure 2 displays the quaternion tracking error vector \(e_{q}(t)=[ \begin{array}{cc} e_{0}(t)&e_{v}(t) \end{array}]^{T}\). The error signal \(e_{0}(t)\) is observed to converge to 0 in \(<\)1 s, and the error signal vector \(e_{v}(t)=\left[ \begin{array}{ccc} e_{v1}&e_{v2}&e_{v3} \end{array} \right] ^{T}\) is observed to converge to \(\left[ \begin{array} [c]{ccc} 0&0&0 \end{array} \right] ^{T}\) in \(<\)10 s. As the result of Theorem 1 suggested, this means that the attitude tracking objective has been achieved. From Fig. 3, it can be seen that the altitude tracking error \(e_{z}(t)\) converges to 0 in \(<\)1 s. This means that the altitude tracking objective has been achieved. Figure 4 displays the quaternion vector \(q(t)=\left[ \begin{array}{cc} q_{0}(t)&q_{v}(t) \end{array} \right] ^{T}\) which represents the attitude variation of the quadrotor during the simulation. It can be seen that \(q_{0}(t)\) and \(q_{v}(t)\) go to stable in \(<\)5 s. Figure 5 displays the variation of the angular velocity vector \(\omega (t)=\) \(\left[ \begin{array}{ccc} \omega _{1}(t)&\omega _{2}(t)&\omega _{3}(t) \end{array} \right] ^{T}\) of the quadrotor. It is observed that the maximum angular velocity is about 18\(^{\circ }\)/s, and this means the quadrotor has a reasonable angular velocity during the simulation. The control inputs \(\tau (t)\) and \(u(t)\) are illustrated in Fig. 6. It is observed that \(\tau _{1}(t)\), \(\tau _{2}(t)\), and \(\tau _{3}(t)\) have a stable value \(<\)1 Nm, and \(u(t)\) has a stable value \(<\)26 N; thus, the control inputs stay with some reasonable values. The thrust force \(f_{i}(t)\) for \(i=1,\ldots , 4\) is illustrated in Fig. 7, and it can be seen that the maximum value for these thrust force is \(<\)11 N, which is reasonable for a quadrotor UAV. The outputs of the NN are shown in Fig. 8, and they are always stable during the simulation.

Fig. 2
figure 2

Attitude tracking error \(e_{q}(t)\)

Fig. 3
figure 3

Desired altitude trajectory \(z_{d}(t)\), actual altitude trajectory \(z(t)\), and altitude tracking error \(e_{z}(t)\)

Fig. 4
figure 4

Attitude of the quadrotor UAV

Fig. 5
figure 5

Angular velocity \(\omega (t)\)

Fig. 6
figure 6

Control inputs \(\tau (t)\) and \(u(t)\)

Fig. 7
figure 7

Thrusts \(f_{i}(t),\) \(i=1,2,3,4\)

Fig. 8
figure 8

Outputs of the neural network \(\hat{n}(t)\)

6 Conclusions

In this paper, a nonlinear robust OFB tracking controller is developed for the flight control of a quadrotor UAV under structural uncertainties and unknown external disturbances. By using non-model-based velocity filter design methods, the controller does not require measurements of the angular velocities and translational velocity in the altitude direction. A quaternion representation is used to design a globally non-singular attitude tracking controller. The NN-based approximation approach is combined with robust compensator to formulate the nonlinear OFB tracking controller. Through a Lyapunov-based stability analysis, we have demonstrated that a semiglobal asymptotic attitude and altitude tracking is achieved, and all closed-loop signals remain bounded. Numerical simulation has been performed to confirm the effectiveness of the proposed algorithm. Therefore, the contribution of this paper lies in the following: (1) Velocity filters which require less knowledge of the quadrotor’s dynamic model are designed to provide estimations for the unmeasurable angular and altitudinal velocities; (2) A unit quaternion formulation is used to represent the attitude tracking error of the quadrotor which allows the design of a nonsingular robust attitude controller; (3) NN-based approximation terms are developed to learn the unknown dynamics on line which can release the linearized parametric (LP) assumption of the parametric uncertainties in the existing adaptive and robust control design methods; and (4) A nonlinear robust OFB control is developed which can achieve semiglobally asymptotic tracking under uncertainties and disturbances. In the future, we will validate the OFB control design on a real-time quadrotor flight testbed.