# Bounded Attitude Control with Active Disturbance Rejection Capabilities for Multirotor UAVs
## 3 System Modeling and Problem Statement  
### Attitude Representation  
Firstly, assume that a multirotor UAV can be modeled as a rigid body. Then, consider two orthogonal right-handed coordinate frames: the body coordinate frame, \(\mathbf{E}^{b}=\left\{\vec{e}_{1}^{f},\vec{e}_{2}^{b},\vec{\bar{e}}_{3}^{b}\right\}\), located at the center of mass of the rigid body and the inertial coordinate frame, \(\mathbf{E}^{f}=\left\{\vec{e}_{1}^{f},\vec{e}_{2}^{f},\vec{\bar{e}}_{3}^{f}\right\}\), located at some point on the Earth's surface, which for the sake of simplicity is assumed to be flat. This frame is typically chosen as the north-east-down (NED) frame with \(\vec{\bar{e}}_{1}^{f}\) pointing to the north, \(\vec{e}_{2}^{f}\) pointing to the east and \(\vec{\bar{e}}_{3}^{f}\) pointing to the center of the Earth. The rotation of the coordinates of a point from frame \(\mathbf{E}^{b}\) with respect to frame \(\mathbf{E}^{f}\) is represented by the attitude matrix \(\mathbf{R}\in SO(3)=\left\{\mathbf{R}\in R^{3\times 3}:\mathbf{R}^{T}\mathbf{R} =l_{3},\det(\mathbf{R})=1\right\}\), where \(l_{3}\) is the \(3\times 3\) identity matrix.  
Remark 1: _In this paper, \(\mathbf{R}=\mathbf{R}_{b}^{f}\) is the matrix that rotates the coordinates of a point from frame \(\mathbf{E}^{b}\) to frame \(\mathbf{E}^{f}\)._  
The motion of the body-fixed reference frame \(\mathbf{E}^{b}\) relative to \(\mathbf{E}^{f}\) can be defined in terms of unit quaternion \(\mathbf{q}\in\mathbb{S}^{3}\), which is defined as:  
\[\mathbf{q}:=\begin{pmatrix}\cos\frac{\bar{\bar{\mathbf{g}}}}{\bar{\mathbf{e} }}\\ \mathbf{e}\sin\frac{\bar{\bar{\mathbf{g}}}}{\bar{\mathbf{g}}}\end{pmatrix}:= \begin{pmatrix}q_{0}\\ \mathbf{q}_{\bar{\mathbf{e}}^{f}}\end{pmatrix}\in\mathbb{S}^{3} \tag{3}\]  
where \(\mathbf{q}_{\bar{\mathbf{g}}}=\begin{pmatrix}q_{1}&q_{2}&q_{3}\end{pmatrix}^{ T}\in\mathbb{R}^{3}\) and \(q_{0}\in\mathbb{R}\) are defined as the vector part and scalar part of the quaternion, respectively. Furthermore, \(\mathbf{q}\) represents an element of \(SO(3)\) through the map \(\mathbf{R}_{b}^{f}:\mathbb{S}^{3}\to SO(3)\) defined as:  
\[\mathbf{R}(\mathbf{q}):=I_{3}+2q_{0}[\mathbf{q}_{\bar{\mathbf{e}} ^{\times}}]+2[\mathbf{q}_{\bar{\mathbf{e}}^{\times}}]^{2} \tag{4}\]  
\([\mathbf{r}^{\times}]\) is the well known skew-symmetric matrix associated to vector \(\mathbf{r}\).  
Let \(\mathbf{\omega}=\begin{pmatrix}\omega_{1}&\omega_{2}&\omega_{3}\end{pmatrix}^{T} \in\mathbb{R}^{3}\) be the angular velocity vector of the body coordinate frame \(\mathbf{E}^{b}\) relative to the inertial coordinate frame \(\mathbf{E}^{f}\) expressed in \(\mathbf{E}^{b}\). Then, the kinematics equation is given by:  
\[\dot{\mathbf{q}}=\frac{1}{2}\begin{pmatrix}-\mathbf{q}_{\bar{\mathbf{e}}^{T}} \\ I_{3}q_{0}+[\mathbf{q}_{\bar{\mathbf{e}}^{\times}}]\end{pmatrix}\mathbf{\omega}:= \frac{1}{2}\Xi(\mathbf{q})\mathbf{\omega} \tag{5}\]  
The attitude error is used to quantify the mismatch between two attitudes. If \(\mathbf{q}\) defines the current attitude quaternion and \(\mathbf{q}_{d}\) the desired quaternion, i.e., the desired orientation, then the quaternion that represents the attitude error between the current orientation and the desired one is given by:  
\[\ddot{\mathbf{q}}=\left(\mathbf{q}^{d}\right)^{-1}\odot\mathbf{q}=\left(\ddot{ q}_{0}&\ddot{\mathbf{q}}_{\bar{\mathbf{e}}^{T}}\right)^{T} \tag{6}\]  
where \(\mathbf{q}^{-1}\) is the complementary rotation of the quaternion \(\mathbf{q}\), which is given by \(\mathbf{q}^{-1}=\begin{pmatrix}q_{0}&-\mathbf{q}_{\bar{\mathbf{e}}^{T}}\end{pmatrix} ^{T}\) and \(\odot\) denotes the quaternion multiplication [55]. When the current quaternion \(\mathbf{q}\) reaches the desired one \(\mathbf{q}^{d}\), the quaternion error becomes \(\ddot{\mathbf{q}}=\left(\pm 1&0^{T}\right)^{T}\), i.e., there exist two equilibria which have to be considered in the stability analysis [56].