**2. Mathematical Quadrotor Model**

A quadrotor is an aerial under-actuated mechanical system with four independent variable speed rotors. It has six degrees of freedom which are controlled by four control inputs: a main thrust force (*u*), and three torques (rolling *τφ*, pitching *τθ*, and yawing *τψ*). Lateral, longitudinal, and vertical motion are achieved by a suitable combination of the control inputs. The main force, produced by the total sum of the thrust provided by each individual rotor, allows the quadrotor to take-off and land, as well as hover. Meanwhile, control torques are generated when there exists a difference of the produced forces by two pair of rotors: first pair rotating clockwise is formed by rotors 1 and 3, and the second by 2 and 4 rotors spinning in the opposite direction. Different from conventional helicopters it is not required a mechanical pitch system for the rotor blades.

The Euler–Lagrange and Newton–Euler formalisms are usually used to obtain the quadrotor dynamics described by a set of highly coupled non-linear differential equations. The quadrotor pose is determined by considering a body-fixed frame with *X*- , *Y*- , and *Z* axes coincident with the centre of mass, and a global inertial coordinate system, or earth-fixed frame, with *X*, *Y*, and *Z* axes, as shown in Figure 1. By nature the quadrotor is an unstable system, and during outdoor and indoor flying, quadrotors might be subjected to undesirable vibrating disturbances. Thus, it should be designed efficient force and torque controllers to perform a proper motion tracking in the three-dimensional space.

The control inputs are related with each individual rotor by the following expressions

$$\begin{aligned} \mu &= \sum\_{i=1}^{4} F\_i \\ \tau\_{\psi} &= \sum\_{i=1}^{4} \tau\_{M\_i} \\ \tau\_{\theta} &= (F\_3 - F\_1)I \\ \tau\_{\phi} &= (F\_2 - F\_4)I \end{aligned} \tag{1}$$

here *l* stands for the distance measured from a rotor axis to the quadrotor centre of mass, and *τMi* is the couple developed by motor *Mi*. *Fi* and *τMi* are functions of the rotor angular

velocities. From Equation (1) it is appreciated that the quadrotor motion is possible by suitably combining the control inputs.

**Figure 1.** Schematic of a non-linear quadrotor system [24].

In this work, the non-linear dynamic model of the quadrotor is derived by means of the Euler–Lagrange formalism. In order to describe the system, let us consider the following vector of generalized coordinates

$$\mathbf{q} = \begin{bmatrix} \mathbf{x} \ y \ z \ \boldsymbol{\theta} \ \boldsymbol{\theta} \ \boldsymbol{\Psi} \end{bmatrix}^{\top} \in \mathbb{R}^{6} \tag{2}$$

the centre of mass position is represented by the variables *x*, *y*, and *z*, and the quadrotor attitude is described by the set of Euler roll *φ*, pitch *θ*, and yaw *ψ* angles.

The Lagrangian is defined by the difference of the kinetic and potential energy, so we get

$$L = \frac{1}{2}\lambda\mathbf{M}\lambda^\top + \frac{1}{2}\dot{\eta}^\top\mathbb{J}\dot{\eta} - \lambda\mathbf{M}\mathbf{G} \tag{3}$$

**M** indicates a diagonal mass matrix, **J** is the inertia tensor, and **G** = [0 0 *g*] denotes gravity terms. Henceforth, consider *λ* = [*xyz*] and *η* = [*φθψ*] as the position and attitude vectors, both expressed in the earth-fixed reference frame.

For controller design, the non-linear quadrotor dynamics can be written as

$$\begin{aligned} m\ddot{x} &= -\mu \sin \theta + \mathfrak{J}\_x \\ m\ddot{y} &= \mu \cos \theta \sin \phi + \mathfrak{J}\_y \\ m\ddot{z} &= \mu \cos \theta \cos \phi - m\mathfrak{g} + \mathfrak{J}\_z \end{aligned} \tag{4}$$

unknown time-varying disturbances are represented by *ξx*, *ξy*, and *ξz*. On the other hand, disturbed rotational dynamics are given by

$$\mathbf{J}\ddot{\boldsymbol{\eta}} = \boldsymbol{\pi}\_{\boldsymbol{\eta}} - \mathbf{C}(\dot{\boldsymbol{\eta}}, \boldsymbol{\eta})\dot{\boldsymbol{\eta}} + \mathbf{\mathcal{J}}\_{\boldsymbol{\eta}} \tag{5}$$

with

$$\mathbf{J} = \begin{bmatrix} -I\_x s\_\theta & 0 & I\_x \\ (I\_y - I\_z) c\_\theta c\_\phi s\_\phi & I\_y c\_\phi^2 + I\_z s\_\phi^2 & 0 \\ I\_z c\_\theta^2 c\_\phi^2 + I\_y c\_\theta^2 s\_\phi^2 + I\_x s\_\theta^2 & (I\_y - I\_z) c\_\theta c\_\phi s\_\phi & -I\_x s\_\theta \end{bmatrix}$$

$$\mathbf{C}(\dot{\eta}, \eta) = \begin{bmatrix} c\_{11} & c\_{12} & c\_{13} \\ c\_{21} & c\_{22} & c\_{23} \\ c\_{31} & c\_{32} & c\_{33} \end{bmatrix} \tag{6}$$

and

*<sup>c</sup>*<sup>11</sup> = (*Iz* <sup>−</sup> *Iy*)*ψ*˙*sφcφc*<sup>2</sup> *θ <sup>c</sup>*<sup>12</sup> <sup>=</sup> <sup>−</sup>*Ixψ*˙ *<sup>c</sup><sup>θ</sup>* <sup>+</sup> *Iy*( ˙ *θsφc<sup>φ</sup>* + *ψ*˙ *c<sup>θ</sup> s* 2 *<sup>φ</sup>* <sup>−</sup> *<sup>ψ</sup>*˙ *<sup>c</sup><sup>θ</sup> <sup>c</sup>*<sup>2</sup> *<sup>φ</sup>*) − *Iz*(*ψ*˙ *<sup>c</sup><sup>θ</sup> <sup>s</sup>* 2 *<sup>φ</sup>* <sup>−</sup> *<sup>ψ</sup>*˙ *<sup>c</sup><sup>θ</sup> <sup>c</sup>*<sup>2</sup> *<sup>φ</sup>* + ˙ *θsφcφ*) *c*<sup>13</sup> = 0 *<sup>c</sup>*<sup>21</sup> = −*Ixψ*˙*s<sup>θ</sup> <sup>c</sup><sup>θ</sup>* + *Iyψ*˙*s<sup>θ</sup> <sup>c</sup><sup>θ</sup> <sup>s</sup>* 2 *<sup>φ</sup>* + *Izψ*˙*s<sup>θ</sup> c<sup>θ</sup> c*<sup>2</sup> *φ <sup>c</sup>*<sup>22</sup> = (*Iz* − *Iy*)*φ*˙*sφc<sup>φ</sup> <sup>c</sup>*<sup>23</sup> <sup>=</sup> *Ixψ*˙ *<sup>c</sup><sup>θ</sup>* <sup>+</sup> *Iy*(<sup>−</sup> ˙ *θsφc<sup>φ</sup>* + *ψ*˙ *c<sup>θ</sup> c*<sup>2</sup> *<sup>φ</sup>* − *<sup>ψ</sup>*˙ *<sup>c</sup><sup>θ</sup> <sup>s</sup>* 2 *<sup>φ</sup>*) + *Iz*(*ψ*˙ *c<sup>θ</sup> s* 2 *<sup>φ</sup>* <sup>−</sup> *<sup>ψ</sup>*˙ *<sup>c</sup><sup>θ</sup> <sup>c</sup>*<sup>2</sup> *<sup>φ</sup>* + ˙ *θsφcφ*) *c*<sup>31</sup> = ˙ *<sup>θ</sup>Ixs<sup>θ</sup> <sup>c</sup><sup>θ</sup>* <sup>+</sup> *Iy*(<sup>−</sup> ˙ *θs<sup>θ</sup> c<sup>θ</sup> s* 2 *<sup>φ</sup>* + *φ*˙*sφcφc*<sup>2</sup> *<sup>θ</sup>* ) <sup>−</sup> *Iz*( ˙ *θs<sup>θ</sup> c<sup>θ</sup> c*<sup>2</sup> *<sup>φ</sup>* + *φ*˙*sφcφc*<sup>2</sup> *θ* ) *<sup>c</sup>*<sup>32</sup> <sup>=</sup> *Ixψ*˙*s<sup>θ</sup> <sup>c</sup><sup>θ</sup>* <sup>−</sup> *Iy*( ˙ *θs<sup>θ</sup> sφc<sup>φ</sup>* + *φ*˙ *c<sup>θ</sup> s* 2 *<sup>φ</sup>* <sup>−</sup> *<sup>φ</sup>*˙ *<sup>c</sup><sup>θ</sup> <sup>c</sup>*<sup>2</sup> *<sup>φ</sup>* + *ψ*˙*s<sup>θ</sup> c<sup>θ</sup> s* 2 *<sup>φ</sup>*) + *Iz*(*φ*˙ *c<sup>θ</sup> s* 2 *<sup>φ</sup>* <sup>−</sup> *<sup>φ</sup>*˙ *<sup>c</sup><sup>θ</sup> <sup>c</sup>*<sup>2</sup> *<sup>φ</sup>* <sup>−</sup> *<sup>ψ</sup>*˙*s<sup>θ</sup> <sup>c</sup><sup>θ</sup> <sup>c</sup>*<sup>2</sup> *<sup>φ</sup>* + ˙ *θs<sup>θ</sup> sφcφ*) *<sup>c</sup>*<sup>33</sup> <sup>=</sup> <sup>−</sup>*Ix* ˙ *<sup>θ</sup>c<sup>θ</sup>* + (*Iy* <sup>−</sup> *Iz*)(*ψ*˙ *<sup>c</sup>*<sup>2</sup> *<sup>θ</sup> sφcφ*)

For purposes of simplicity of the model representation, the shorthand notation for trigonometric functions is adopted [25], where *sb* = sin *b* and *ca* = cos *a*. On the other hand, the control and disturbance torque vectors are denoted by *τ<sup>η</sup>* = [*τφ τθ τψ*] *<sup>T</sup>* and *ξ<sup>η</sup>* = [*ξφ ξθ ξψ*] *<sup>T</sup>*, respectively.

Since the quadrotor is an under-actuated non-linear system, two synthetic controllers are designed for tracking tasks of some desired reference position trajectory on the plane. For control design purposes, it is considered the output feedback errors given as follows

$$
\varepsilon\_{\mu} = \mu - \mu^\* \tag{7}
$$

for *μ* = *x*, *y*, *z*, *φ*, *θ*, *ψ*. The superscript stands for the desired reference trajectory. Moreover, in order to perform a proper motion control in *X* and *Y* directions, the desired pitch *θ* and roll *φ*references are computed from Equation (4) as follows

$$\begin{aligned} \theta^\star &= \sin^{-1}\left(-\frac{1}{u}m\upsilon\_x\right) \\ \phi^\star &= \sin^{-1}\left(\frac{1}{u\cos\theta}m\upsilon\_y\right) \end{aligned} \tag{8}$$

To solve adequately the under-actuation problem, the angular dynamics needs to be faster than translational dynamics. In this way, the proposed motion controllers should be capable to lead the quadrotor to stable scenarios while performing a proper tracking of the planned references.

#### **3. Syntheses of an Adaptive Robust Motion Controller**

The syntheses of a novel adaptive robust motion controller is introduced in this section by using the robust control scheme introduced by the authors in [24]. In this proposal, it is improved the performance of the control scheme by reducing the high-gain effects and easing the tuning of the control parameters computed online by using the Bs-ANN.
