# Target Localization via Integrated and Segregated Ranging Based on RSS and TOA Measurements
## 2 Problem Formulation
### SR-WLS Algorithm  
The authors in [21] tried to mitigate the influence of the NLOS bias in the mean sense, by approximating the \(N\) NLOS biases by a single (mean) one, which transforms the originally under-determined problem into a determined one (for \(2N\geq p+2\)). By using this approximation, from (1a) and (1b) one gets  
\[P_{i}=P_{0}-b-10\gamma\log_{10}\frac{\|\mathbf{x}-\mathbf{a}_{i}\|}{d_{0 }}+n_{i}, \tag{13a}\] \[d_{i}=\|\mathbf{x}-\mathbf{a}_{i}\|+\beta+m_{i}, \tag{13b}\]  
where \(b\) and \(\beta\) represent the mean NLOS bias for RSS and TOA measurements, respectively, also called the balancing parameters. Obviously, the price one pays for such an approximation is only partial mitigation of the NLOS bias. However, on the other hand, it allows to keep the balancing parameters as optimization variables to be estimated together with the target location, which leaves somewhat _control_ over the problem at hand (e.g., in the two extreme cases: all LOS/NLOS links). In [21], the authors then rearrange (13a) and apply the first order Taylor series approximation to it. This is followed by squaring the derived equation, together with squaring (13b) and some simple algebraic manipulations to, by introducing weights, finally derive the following WLS problem:  
\[\underset{\mathbf{x},b,\beta}{\text{minimize}}\sum_{i=1}^{N}w_{Ri}\left(\frac{ \xi_{i}^{2}\|\mathbf{x}-\mathbf{a}_{i}\|^{2}-\rho^{2}}{2\xi_{i}\|\mathbf{x}-\mathbf{a}_{i}\|} \right)^{2}+\sum_{i=1}^{N}w_{Ti}\left(\frac{\|\mathbf{x}-\mathbf{a}_{i}\|^{2}-\hat{d} _{i}^{2}}{2\|\mathbf{x}-\mathbf{a}_{i}\|}\right)^{2}, \tag{14}\]  
where \(\rho=d_{0}10^{\frac{\beta_{0}-\beta}{10\gamma}}\), \(\xi_{i}=10^{\frac{p_{i}}{10\gamma}}\), \(w_{Ri}=1-\hat{d}_{i}/\sum_{i=1}^{N}\hat{d}_{i}\) and \(w_{Ti}=1-\hat{d}_{i}/\sum_{i=1}^{N}\hat{d}_{i}\), where \(\hat{d}_{i}=d_{0}10^{\frac{p_{i}-p_{i}-p_{i}}{10\gamma}}\) represents the ML estimate of the distance from (1a) and \(\hat{d}_{i}=d_{i}-\beta\), so that more relevance is given to _nearby_ links. However, since the problem in (14) is non-convex, instead of tackling (14) directly, the authors in [21] substituted it by  
\[\underset{\mathbf{x},b,\beta}{\text{minimize}}\sum_{i=1}^{N}w_{Ri}\left(\frac{ \xi_{i}^{2}\|\mathbf{x}-\mathbf{a}_{i}\|^{2}-\rho^{2}}{2\xi_{i}\hat{d}_{i}}\right)^{2} +\sum_{i=1}^{N}w_{Ti}\left(\frac{\|\mathbf{x}-\mathbf{a}_{i}\|^{2}-\hat{d}_{i}^{2}}{2 \hat{d}_{i}}\right)^{2}. \tag{15}\]Observe that if \(b\) and \(\beta\) were known, (15) could be solved _exactly_ by a bisection procedure. This motivated the authors in [21] to apply an alternating procedure [6] to estimate \(\mathbf{x}\), and \(b\) and \(\beta\). The final framework of the problem written as a generalized trust region sub-problem is given below. \[\underset{\mathbf{\theta}=[\mathbf{x}^{T},\|\mathbf{x}\|^{2}]^{T}}{\text{minimize}}\left\{ \|\mathbf{W}\left(\mathbf{A}\mathbf{\theta}-\mathbf{q}\right)\|^{2}:\theta^{T}\mathbf{D}\mathbf{ \theta}+2\mathbf{F}^{T}\mathbf{\theta}=0\right\}, \tag{16}\]  
where \(\mathbf{W}=\text{diag}([\widetilde{\mathbf{w}}_{1}^{T},\widetilde{\mathbf{w}}_{2}^{T}]), \widetilde{\mathbf{w}}_{1}=[\widetilde{w}_{1i}]^{T}\), \(\widetilde{w}_{1i}=\frac{\sqrt{\widetilde{w}_{i}}}{2\delta_{i}^{T}d_{i}}\), \(\widetilde{\mathbf{w}}_{2i}=[\widetilde{w}_{2i}]^{T}\), \(\widetilde{w}_{2i}=\frac{\sqrt{\widetilde{w}_{i}}}{2d_{i}}\),  
\[\mathbf{A}= \begin{bmatrix}\vdots&\vdots\\ 2\delta_{i}^{2}\mathbf{a}_{i}^{T}&-\delta_{i}^{2}\\ \vdots&\vdots\\ 2\mathbf{a}_{i}^{T}&-1\\ \vdots&\vdots\end{bmatrix} ,\ \mathbf{q}= \begin{bmatrix}\vdots\\ \vdots\\ \delta_{i}^{2}\|\mathbf{a}_{i}\|^{2}-\widehat{\rho}^{2}\\ \vdots\\ \|\mathbf{a}_{i}\|^{2}-\widehat{d}_{i}^{2}\\ \vdots\end{bmatrix} ,\]  
After solving the problem in (16) for a fixed \(b\) and \(\beta\) and obtaining an estimate of the target's location, \(\hat{\mathbf{x}}\), the authors in [21] updated their estimates as follows.