## 4 Formation Controller Design
### Available Guidance Vector  
The formation controller of each quadrotor uses the relative states (positions, velocities, and the high-order derivatives with respect to its neighbors). If the quadrotor is a leader, besides the foregoing measurements, its formation controller also uses the relative states with respect to the RFT \(r(t)=[r_{X}(t),r_{Y}(t),r_{Z}(t),r_{\bar{\psi}}(t)]^{T}\), where \(r_{Z}\) and \(r_{\bar{\psi}}\) are assumed to be constant. Then, for the sake of simplicity, the formation control in \((X,Y)\) space is considered. The objective of the formation tracking control is to guarantee that all the quadrotors track the RFT with some constant biases \(d_{i0}=[d_{i0}^{X},d_{i0}^{Y}]\in\mathbb{R}^{2}\), such that the quadrotors keep a formation pattern. In detail, the formation objective is to achieve the following equations. \[\lim_{t\to\infty}\left\| \begin{pmatrix}X_{i}-r_{X}-d_{i0}^{X}\\ Y_{i}-r_{Y}-d_{i0}^{Y}\end{pmatrix} \right\|=0\quad\text{ where }i=1,\ldots,n \tag{28}\]  
for some initial condition \(x_{i}(0)\), \(i=1,\ldots,n\). An example of the formation tracking task of four quadrotors is shown in Figure 1 (left), where the solid red circle represents the RFT at time \(t_{a}\). The dashed red circles represent the desired positions \((\widehat{X}_{i}^{d}(t_{a}),\widehat{Y}_{i}^{d}(t_{a}))\) for the quadrotors \(i\in\mathcal{V}\) at \(t_{a}\), where we denote by \(\bar{X}_{i}^{d}=r_{X}+d_{i0}^{X}\) and \(\bar{Y}_{i}^{d}=r_{Y}+d_{i0}^{Y}\). The solid black circles represent the quadrotors' real positions at \(t_{a}\), i.e., \((X_{i}(t_{a}),Y_{i}(t_{a}))\), \(i\in\mathcal{V}\). Figure 1: Left: Intuitive desired motion trajectories for quadrotors. Right: Available desired motion trajectories using neighbor-based states. However, in decentralized formation control, the RFT \(r(t)\) is not available for the followers, therefore, it is not possible to design the formation tracking controller using the errors \(\bar{X}_{i}^{d}-X_{i}\) and \(\bar{Y}_{i}^{d}-Y_{i}\) for quadrotor \(i\). For the followers, only the neighbors states are available for the formation controller design, as shown in Figure 1 (right). Now, the formation problem becomes: how to find the available guidance vector for quadrotors \(i\in\mathcal{V}\) in order to attain the formation task. Let us make a sum of the relative position state vectors. Note that we drop the explicit expression of time in the expressions for the sake of simplicity. Similar to the foregoing analysis, we still take \(X\) for example. \[ \begin{array}{ll}\sum\limits_{j\in\mathcal{N}_{i}}\left(X_{i}-X_{j}-d_{i0}^ {X}\right)&\text{if }i\in\mathcal{V}-\mathcal{V}_{L}\\ \sum\limits_{j\in\mathcal{N}_{i}}\left(X_{i}-X_{j}-d_{ij}^{X}\right)+X_{i}-r_ {X}-d_{i0}^{X}&\text{if }i\in\mathcal{V}_{L}\end{array}  \tag{29}\]  
The inter-distance satisfies \(d_{ij}^{X}=d_{i0}^{X}-d_{j0}^{X}\). Then, Equation (29) can be rewritten as follows  
\[ \begin{array}{ll}\sum\limits_{j\in\mathcal{N}_{i}}\left(X_{i}-r_{X}-d_{i0}^ {X}-\left(X_{j}-r_{X}-d_{j0}^{X}\right)\right)\text{, if }i\in\mathcal{V}- \mathcal{V}_{L}\\ \sum\limits_{j\in\mathcal{N}_{i}}\left(X_{i}-r_{X}-d_{i0}^{X}-\left(X_{j}-r_ {X}-d_{j0}^{X}\right)\right)+X_{i}-r_{X}-d_{i0}^{X}\text{ if }i\in\mathcal{V}_{L} \end{array} \]  
Then, the guidance vector for each quadrotor is given as follows  
\[X_{i}^{d}= \begin{cases}\frac{1}{|\mathcal{N}_{i}|}\sum\limits_{j\in\mathcal{N} _{i}}\left(X_{j}+d_{ij}^{X}\right)\text{, if }i\in\mathcal{V}-\mathcal{V}_{L}\\ \frac{1}{|\mathcal{N}_{i}|+1}\left(\sum\limits_{j\in\mathcal{N}_{i}}\left(X_{ j}+d_{ij}^{X}\right)+r_{X}+d_{i0}^{X}\right)\text{, if }i\in\mathcal{V}_{L}\end{cases}  \tag{30}\]  
We then observe that \(X_{i}^{d}\) is available for quadrotor \(i\), since \(X_{i}^{d}\) is composed only by neighbors states. \[X_{i}-X_{i}^{d}=