# Optimal Configuration and Path Planning for UAV Swarms Using a Novel Localization Approach
## 3 Optimal Configuration Analysis
### Movable Emitter Scenario  
Semidefinite programming methods [6] are applied in this paper to estimate the emitter location. Then the estimator value, calculated by SDP methods each time, can further improve the result estimated by the EKF estimator [28]. In actual applications, the SDP methods can provide initialization information for EKF. The process of the EKF filter is given by:  
(1) Predict:  
\[\hat{\mathbf{x}}_{k+1|k}=f_{k}(\hat{\mathbf{x}}_{k|k}) \tag{38}\] \[\mathbf{P}_{k+1|k}=f_{k}^{x}\mathbf{P}_{k|k}(f_{k}^{x})^{T}+f_{k}^{ x}\mathbf{Q}_{k|k}(f_{k}^{w})^{T}. \tag{39}\]  
(2) Update:  
\[\mathbf{K}_{k+1|k}=\mathbf{P}_{k+1|k}[\mathbf{P}_{k+1|k}+\mathbf{ J}_{k+1}^{-1}]^{-1} \tag{40}\] \[\mathbf{P}_{k+1|k+1}=(\mathbf{I}-\mathbf{K}_{k+1|k})\mathbf{P}_{k+1 |k}\] (41) \[\hat{\mathbf{x}}_{k+1|k+1}=\hat{\mathbf{x}}_{k+1|k}+\mathbf{K}_{k+1 |k}\Big{[}\mathbf{z}_{k+1}-h_{k+1}(\hat{\mathbf{x}}_{k+1|k})\Big{]}, \tag{42}\]  
Figure 2: Optimal receiver geometries for (**a**) \(M=3\), (**b**) \(M=3\), (**c**) \(M=5\).  
where the Jacobian matrix of the emitter movement model and the measurement model is:  
\[\begin{array}{l}f_{k}^{x}=\frac{\partial f_{k}(x_{k},w_{k})}{\partial x_{k}} \bigg{|}\begin{array}{l}x_{k}=\delta_{k|k}\\ w_{k}=0\end{array},\begin{array}{l}f_{k}^{w}=\frac{\partial f_{k}(x_{k},w_{k })}{\partial w_{k}}\bigg{|}\begin{array}{l}x_{k}=\delta_{k|k}\\ w_{k}=0\end{array}.\\ \end{array}\\ \end{array}\]  
Here, we mainly focus on analyzing the optimal receiver-emitter geometry, which will enable optimal localization in terms of the posterior error covariance matrix \(\mathbf{p}_{k+1|k}\). In order to establish a relationship between \(\mathbf{J}^{-1}\) and the predicted value, Equation (43) can be expressed as follows [29]:  
\[\mathbf{p}_{k+1|k+1}=\Big{(}(\mathbf{p}_{k+1|k})^{-1}+\mathbf{J}_{k+1}\Big{)}^ {-1}. \tag{43}\]  
Define \(\mathbf{p}_{k+1|k}=\left[\begin{array}{ll}p_{11}&p_{12}\\ p_{12}&p_{22}\end{array}\right]\), \(\mathbf{S}=(\mathbf{p}_{k+1|k})^{-1}+\mathbf{J}_{k+1}\) which is positive definite. Then \(\mathbf{S}\) is given by  
\[\mathbf{S}=\left[\begin{array}{ll}\mathbf{J}_{(1,1)}+\frac{p_{22}}{p_{11}p_{ 22}-p_{12}^{2}}&\mathbf{J}_{(1,2)}-\frac{p_{12}}{p_{11}p_{22}-p_{12}^{2}}\\ \mathbf{J}_{(1,2)}-\frac{p_{12}}{p_{11}p_{22}-p_{12}^{2}}&\mathbf{J}_{(2,2)}+ \frac{p_{11}}{p_{11}p_{22}-p_{12}^{2}}\end{array}\right]. \tag{44}\]  
For the moveable emitter scenario, the objective is to minimize the mean square error (MSE), i.e., \(Tr(\mathbf{p}_{k+1|k+1})\), then the following results can be obtained.  
**Theorem 4**.: _For \(M\geq 3\), we have_  
\[Tr(\mathbf{p}_{k+1|k+1})\geq\frac{4}{\mathbf{J}_{(1,1)}+\mathbf{J}_{(2,2)}+ \frac{p_{11}+p_{22}}{p_{11}p_{22}-p_{12}^{2}}}. \tag{45}\]  
The equality holds if and only if  
\[\left\{\begin{array}{l}\mathbf{J}_{(1,1)}-\mathbf{J}_{(2,2)}=\frac{(p_{11} -p_{22})}{p_{11}p_{22}-p_{12}^{2}}\\ \mathbf{J}_{(1,1)}=\frac{2p_{12}}{p_{11}p_{22}-p_{12}^{2}}.\end{array}\right. \tag{46}\]  
**Proof.** The proof is similar to that of Corollary 3 and is omitted here. \(\square\)  
The explicit solutions of the optimal configuration can be acquired when the ranges are identical. Given \(r_{i}=r_{j},\ \forall i,\ j\in\{1,\cdots,M\}\), \(\mathbf{S}\) can be written as follows [10,11]:  
\[\mathbf{s}=\left[\begin{array}{cc}\eta_{1}\sum\limits_{i=1}^{M}\cos(\theta_ {i})-\eta_{2}\left(\sum\limits_{i=1}^{M}\cos(\theta_{i})\right)^{2}+\frac{p_{ 2i}}{p_{11}p_