# Optimal Configuration and Path Planning for UAV Swarms Using a Novel Localization Approach
## 3 Optimal Configuration Analysis
### Static Emitter Scenario
\begin{array}{ccccc}\hat{z}_{21}&\hat{z}_{31}& \cdots&\hat{z}_{M1}\end{array} \right]^{T}=\mathbf{T}_{1}\Big{[} \begin{array}{ ccc}\hat{z}_{1}&\hat{z}_{2}&\cdots&\hat{z}_{M}\end{array} \Big{]}^{T} \tag{15}\]  
\[\hat{\mathbf{z}}_{r2}=\Big{[} \begin{array}{ccccc}\hat{z}_{12}&\hat{z}_{32}& \cdots&\hat{z}_{M2}\end{array} \Big{]}^{T}=\mathbf{T}_{2}\Big{[} \begin{array}[] {ccccc}\hat{z}_{1}&\hat{z}_{2}&\cdots&\hat{z}_{M}\end{array} \Big{]}^{T}, \tag{16}\]  
where \(\mathbf{T}_{1}\) and \(\mathbf{T}_{2}\) are transformation matrices and are all of dimension \((M-1)\times M\). \(\mathbf{T}_{1}\) and \(\mathbf{T}_{2}\) can be represented by  
\[\mathbf{T}_{1}=\left[ \begin{array}{ccccc}-1&1&0&\cdots&0\\ -1&0&\ddots&\ddots&\vdots\\ \vdots&\vdots&\ddots&\ddots&0\\ -1&0&\cdots&0&1\end{array} \right]\mathbf{T}_{2}=\left[ \begin{array}{ccccc} 1&-1&0&\cdots&0\\ 0&-1&1&0&\vdots\\ \vdots&\vdots&0&\ddots&0\\ 0&-1&0&0&1\end{array} \right].\]  
It can be seen that through an element transformation matrix, \(\mathbf{T}_{2}\) can be transformed to \(\mathbf{T}_{1}\), i.e.,  
\[\mathbf{T}_{2}=\mathbf{U}_{21}\mathbf{T}_{1}, \tag{17}\]  
where \(\mathbf{U}_{21}\) is a \((M-1)\times(M-1)\) elementary transformation matrix. It is easy to obtain  
\[\frac{\partial\mathbf{z}_{r2}(\mathrm{x})}{\partial x_{i}}=\frac{\partial \mathbf{z}_{r1}(\mathrm{x})}{\partial x_{i}}\mathbf{U}_{21}^{T} \tag{18}\]  
\[\mathbf{\Sigma}_{r2}=\mathbf{U}_{21}\mathbf{\Sigma}_{r1}\mathbf{U}_{21}^{T}. \tag{19}\]  
Then \(\mathbf{J}_{1,(i,i)}^{2}\) can be written as  
\[ \begin{array}{ll}\mathbf{J}_{1,(i,i)}^{r2}&=\frac{\partial\mathbf{z}_{r2}( \mathrm{x})}{\partial x_{i}}\mathbf{\Sigma}_{r2}{}^{-1}(\mathrm{x})\Big{(} \frac{\partial\mathbf{z}_{r2}(\mathrm{x})}{\partial x_{j}}\Big{)}^{T}\\ &=\frac{\partial\mathbf{z}_{r1}(\mathrm{x})}{\partial x_{i}}\mathbf{U}_{21}^{T} \Big{(}\mathbf{U}_{21}\mathbf{\Sigma}_{r1}(\mathbf{x})\mathbf{U}_{21}^{T} \Big{)}^{-1}\Big{(}\frac{\partial\mathbf{z}_{r1}(\mathrm{x})}{\partial x_{i}} \mathbf{U}_{21}^{T}\Big{)}^{T}\\ &=\frac{\partial\mathbf{z}_{r1}(\mathrm{x})}{\partial x_{i}}\Big{(}\mathbf{U}_{ 21}^{T}\big{(}\mathbf{U}_{21}^{T}\big{)}^{-1}\Big{)}\mathbf{\Sigma}_{r1}{}^{- 1}(\mathrm{x})\Big{(}\big{(}\mathbf{U}_{21}^{T}\big{)}^{-1}\mathbf{U}_{21}^{T} \Big{)}\frac{\partial\mathbf{z}_{r1}(\mathrm{x})}{\partial x_{i}}\\ &=\frac{\partial\mathbf{z}_{r1}(\mathrm{x})}{\partial x_{i}}\mathbf{\Sigma}_{r1 }{}^{-1}(\mathrm{x})\frac{\partial\mathbf{z}_{r1}(\mathrm{x})}{\partial x_{i}} \\ &=\mathbf{J}_{1,(i,i)}^{r1}\end{array} . \tag{20}\]  
Similarly, we can get \(\mathbf{J}_{2,(i,i)}^{r2}=\mathbf{J}_{2,(i,i)}^{r1}\). This completes the proof. \(\square\)  
Therefore, the selection of a reference receiver does not influence the CRLB with distance-dependent noise. **Theorem 2**. : _Given the angle \(\theta_{i},\ i=1,2,\cdots M\), the smaller the distance between receiver and the source, the less the localization error is._  
**Proof. ** Due to the meaning of \(\mathbf{J}\) and the fact that the receiver measurement noise becomes larger as the range increases, \(\mathbf{J}^{-1}\) increases. A similar proof can be found in [27], but is omitted here. This distance rule can guide UAVs to fly as close to the emitter as possible. \(\square\)  
(2) Angle rule  
Assuming the distance between the emitter and each receiver is identical, i.e., \(r_{1}=r_{2}=\cdots=r\), which means the receivers have equal noise variances, we get [6; 9]  
\[\mathbf{J}_{1}=\mathbf{G}\mathbf{\Sigma}^{-1}(x)\mathbf{G}^{T}, \tag{21}\]  
**Proof. ** Let \(\lambda_{i},i=1,2\) be the eigenvalues of \(\mathbf{J}\), which is a positive definite. Then the eigenvalues of \(\mathbf{J}^{-1}\) are \(1/\lambda_{i}\), It is obvious that  
\[2\leq\sqrt{(1/\lambda_{1}+1/\lambda_{2})(\lambda_{1}+\lambda_{2})}=\left(\mbox {\it Tr}(\mathbf{J})\mbox{\it Tr}(\mathbf{J}^{-1})\right)^{1/2}, \tag{32}\]  
implying that  
\[\mbox{\it Tr}(\mathbf{J}^{-1})\geq 4/\mbox{\it Tr}(\mathbf{J}). \tag{33}\]  
The equality holds if and only if \(\lambda_{1}=\lambda_{2}=\lambda\).