# Hybrid TOA/RSS Range-Based Localization with Self-Calibration in Asynchronous Wireless Networks
## 3 Proposed Localization Algorithm with Self-Calibration
### TOA/RSS Parameters Estimation Using Self-Calibration
As to \(P_{0}\) and \(\alpha\), their final estimates (after some algebraic manipulations) are given by [14]:  
\[\hat{P}_{0}=\tilde{r}_{a}+\hat{\pi}\tilde{v} \tag{21}\] \[\hat{\alpha}=-\frac{\operatorname{cov}(\mathbf{r}_{a},\mathbf{v})}{s_{0}^ {2}}, \tag{22}\]  
where \(\tilde{\pi}\) represents the sample mean of \(\mathbf{x}\) (i.e., \(\tilde{v}=\frac{1}{N(N-1)}\sum_{i=1}^{N(N-1)}v_{i}\)), \(s_{0}^{2}=\frac{1}{N(N-1)}\sum_{i=1}^{N(N-1)}(v_{i}-\tilde{v})^{2}\) denotes the sample variance of \(\mathbf{v}\), and \(\operatorname{cov}(\mathbf{r}_{a},\mathbf{v})\) is the sample covariance between \(\mathbf{r}_{a}\) and \(\mathbf{v}\). From these compact expressions, it follows that the ML estimate of \(\sigma_{r}^{2}\) can be obtained as:  
\[\hat{\sigma}_{r}^{2}=\frac{1}{N(N-1)}\|\mathbf{r}_{a}-\hat{P}_{0}\mathbf{1}_{N(N-1)}+ \hat{\pi}\mathbf{v}\|^{2}. \tag{23}\]  
The last step of the calibration phase involves the estimation of the blind node synchronization offset \(t_{b}\). To this aim, we start by considering the set of \(N\) anchor-to-blind TOA measurements, which we recall are given by:  
\[t_{i,b}=\frac{\|\mathbf{x}_{i}-\mathbf{x}_{b}\|}{c}+t_{b}-t_{i}+w_{i,b}\qquad i=1, \dots,N. \tag{24}\]  
At this point, it should be noticed that part of the synchronization errors in the above observations can be corrected by exploiting the estimates of the anchors offsets obtained through Equation (16). More precisely, we can define a new set of measurements:  
\[\tilde{t}_{i,b}=t_{i,b}+\hat{t}_{i}\approx\frac{\|\mathbf{x}_{i}-\mathbf{x}_{b}\|}{c} +t_{b}+w_{i,b}\qquad i=1,\dots,N, \tag{25}\]  
where the synchronization errors due to the anchors clock offsets are assumed to be substantially compensated. In this respect, we remark that this approximation is only introduced at the design stage for the sake of mathematical tractability, while the actual algorithm performance will be evaluated in a realistic scenario which accounts for the residual effects of non-ideal calibrations. By multiplying both sides of Equation (25) by \(c\), the following system of non-linear equations is obtained:  
\[ \begin{cases}\hat{\rho}_{1,b}=\|\mathbf{x}_{1}-\mathbf{x}_{b}\|+d_{b}+cw_{1,b}\\ \hat{\rho}_{2,b}=\|\mathbf{x}_{2}-\mathbf{x}_{b}\|+d_{b}+cw_{2,b}\\ \vdots\\ \hat{\rho}_{N,b}=\|\mathbf{x}_{N}-\mathbf{x}_{b}\|+d_{b}+cw_{N,b}\end{cases} , \tag{26}\]  
where \(\hat{\rho}_{i,b}\) denotes the pseudorange between the blind node and the \(i\)-th anchor estimated based on the TOA measurement \(\tilde{t}_{i,b}\), while \(d_{b}\) represents the blind clock offset expressed in distance. In Equation (26), three equations are indeed sufficient to solve (in the least-squares sense) for the three unknowns \(\mathbf{x}_{b}=[x_{b}\,y_{b}]^{T}\) and \(d_{b}\), but using more anchors (\(N>3\)) provides additional information that can lead in turn to better accuracy. To efficiently solve this (over-determined) non-linear system, an ILS procedure can be employed. The basic idea behind this approach consists in iteratively updating the estimates of the unknowns parameters \(\mathbf{x}_{b}\) and \(d_{b}\); more precisely, we first differentiate the (noise-free versions of the) pseudorange. The term pseudorange is usually adopted in the range-based localization literature by analogy with the global positioning system (GPS) system, where range estimates can be obtained up to the synchronization offset between the (synchronous) satellite constellation and the user receiver, which in fact leads to the same problem as in Equation (26). Calculations in Equation (26) obtain the system:  
\[\delta p_{i,b}=\frac{(x_{i}-x_{b})\delta x_{b}+(y_{i}-y_{b})\delta y_{b}}{\rho_{i,b }-d_{b}}+\delta d_{b}\qquad i=1,\ldots,N, \tag{27}\]  
where \(x_{b}\), \(y_{b}\), and \(d_{b}\) are treated as known and set equal to the current guess, and \(\rho_{i,b}\) denotes the pseudorange resulting from the current guess of the unknown parameters, while the increments \(\delta x_{b}\), \(\delta y_{b}\) and \(\delta d_{b}\) are considered as the sole unknowns.