# Factorial Design Analysis for Localization Algorithms
## 2 Related Work
### Localization Techniques Analyzed
* **WLS Multilateration Algorithm**  
In the presence of unwanted noise, the distance between the RN \(i\) and the NOI can be calculated by \(r_{i}=f_{i}(x,y)+n_{i}\), where \(f_{i}(x,y)\) is the real distance between RN \(i\) and the NOI and \(n_{i}\) is a Gaussian random variable, i.e., \(n_{i}\sim\mathcal{N}\big{(}0,\sigma^{2}\big{)}\)[22]. The distance \(f_{i}(x,y)\) is calculated by the following expression:  
\[f_{i}(x,y)=\sqrt{\left(x-{x_{i}}\right)^{2}+\left(y-{y_{i}}\right)^{2}}. \tag{10}\]  
Defining \(\mathbf{q}=\left[x,y\right]^{H}\) as a vector of the position of the NOI, then for a set \(N\) observations, the expression \(r_{i}=f_{i}(x,y)+n_{i}\), can be expressed in vector form, i.e., \(\mathbf{r}=\mathbf{f}(\mathbf{q})+\mathbf{n}\). Therefore, the localization problem can be solved by a WLS optimization algorithm as shown in the equation given by  
\[\mathbf{q}=\underset{\mathbf{q}}{\text{argmin}}[\mathbf{r}-\mathbf{f}(\mathbf{ q})]^{H}\mathbf{K}^{-1}[\mathbf{r}-\mathbf{f}(\mathbf{q})] \tag{11}\]  
where Equation (11) represents a non-linear optimization problem. The solution of this kind of problem can present certain inconveniences, such as computational cost, or convergence caused by points with a local minimum. To avoid these problems, a linearization process emerges based on the expansion of the first-order Taylor series of the vector function \(\mathbf{f}(\mathbf{q})\) considering a known point \(\mathbf{q}_{0}=[x_{0}\,y_{0}]^{H}\). Considering \(\mathbf{q}_{0}\) close enough to the real position of the NOI, i.e., \(\mathbf{q}\), the Taylor series are given by \(\mathbf{f}_{\mathbf{f}}(\mathbf{q})=\mathbf{f}(\mathbf{q}_{0})+\mathbf{D}( \mathbf{q}-\mathbf{q}_{0})\), where \(\mathbf{f}_{\mathbf{f}}(\mathbf{q})\) is the linearized function and \(\mathbf{D}\) is a matrix measuring \(Nx2\), given by  
\[\mathbf{D}=\left[ \begin{array}{cc}\frac{\partial\mathbf{f}_{ \mathbf{f}}(\mathbf{q})}{\partial x}\Big{|}_{\mathbf{q}=\mathbf{q}_{0}}&\frac{ \partial\mathbf{f}_{\mathbf{f}}(\mathbf{q})}{\partial y}\Big{|}_{\mathbf{q}= \mathbf{q}_{0}}\\ \vdots&\vdots\\ \frac{\partial\mathbf{f}_{\mathbf{f}}(\mathbf{q})}{\partial x}\Big{|}_{ \mathbf{q}=\mathbf{q}_{0}}&\frac{\partial\mathbf{f}_{\mathbf{f}}(\mathbf{q} )}{\partial y}\Big{|}_{\mathbf{q}=\mathbf{q}_{0}}\end{array} \right]\] (12) \[\left.\frac{\partial\mathbf{f}_{\mathbf{f}}(\mathbf{q})}{\partial x} \right|_{\mathbf{q}=\mathbf{q}_{0}}=\frac{x_{0}-x_{i}}{\sqrt{\left(x_{i}-x_{0} \right)^{2}+\left(y_{i}-y_{0}\right)^{2}}},\;i=1,2,\ldots N\] (13) \[\left.\frac{\partial\mathbf{f}_{\mathbf{f}}(\mathbf{q})}{\partial y} \right|_{\mathbf{q}=\mathbf{q}_{0}}=\frac{y_{0}-y_{i}}{\sqrt{\left(x_{i}-x_{0 }\right)^{2}+\left(y_{i}-y_{0}\right)^{2}}},\;i=1,2,\ldots N\] (14) Redefining the observation vector \(\mathbf{r}\) as \(\mathbf{r}^{{}^{\prime}}=\mathbf{r}-\mathbf{f}(\mathbf{q}_{0})+\mathbf{D} \mathbf{q}_{0}\), then the WLS estimator is expressed as  
\[\overset{\wedge}{\mathbf{q}}=\left(\mathbf{D}^{H}\mathbf{K}^{-1}\mathbf{D} \right)^{-1}\mathbf{D}^{H}\mathbf{K}^{-1}\mathbf{r}^{{}^{\prime}}. \tag{15}\]  
Substituting the vector \(\mathbf{r}^{{}^{\prime}}\), then Equation (15) is redefined by  
\[\overset{\wedge}{\mathbf{q}}=\mathbf{q}_{0}+\left(\mathbf{D}^{H}\mathbf{K}^{ -1}\mathbf{D}\right)^{-1}\mathbf{D}^{H}\mathbf{K}^{-1}[\mathbf{r}-\mathbf{f}( \mathbf{q}_{0})]. \tag{16}\]  
Observing Equation (16), the WLS estimator can be found with a recursion, where in each iteration the current position \(\overset{\wedge}{\mathbf{q}}\) is used as \(\mathbf{q}_{0}\) for the following iteration.