# 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  
To formalize the calibration problem, we start by considering an abstract representation of the scenario at hand, as depicted in Figure 2.  
Figure 1: Block diagram of the proposed hybrid time of arrival (TOA)/received signal strength (RSS) range-based localization with self-calibration. Figure 2: A typical wireless sensor network (WSN) localization problem, with anchors and blind nodes not synchronized to the same clock. Dashed and solid arrows indicate anchor-to-anchor and anchor-to-blind measurements, respectively. As it can be seen, there are different point-to-point communication links--either anchor-to-anchor or anchor-to-blind--from which both RSS and TOA measurements can be obtained. This general scenario can be representative of different operational environments (indoor or outdoor) as well as of different types of WSN applications (e.g., monitoring, rescue, etc.). As we have seen in Section 2, in practical WSN deployments not only the RSS and TOA model parameters are typically unknown, but they can also change over time owing to some macro-variation in the considered environment; therefore, an automatic procedure to estimate such parameters at run-time must be devised. To this aim, in the following we consider a self-calibration procedure that requires the sole knowledge of anchors' positions, thus fulfilling the low-complexity requirements of conventional sensor networks [14; 47; 58]. In the first step of the calibration phase, we resort to the sole TOA anchor-to-anchor measurements in order to estimate the synchronization offsets \(t_{i}\), \(i=1,\ldots,N\). According to the TOA model in Equation (3), we observe that the vector \(\mathbf{t}_{a}\in\mathbb{R}^{N(N-1)\times 1}\) of measurements among the anchors can be written as:  
\[\mathbf{t}_{a}=\mathbf{Q}\mathbf{\theta}_{a}+\mathbf{q}+\mathbf{w}_{a}, \tag{10}\]  
with \(\mathbf{\theta}_{a}=[t_{1}\;t_{2}\cdots t_{N}]^{T}\) denoting the vector of the unknown clock offsets, and:  
\[\mathbf{q}= \begin{bmatrix}\|\mathbf{x}_{1}-\mathbf{x}_{2}\|/c\\ \vdots\\ \|\mathbf{x}_{1}-\mathbf{x}_{N}\|/c\\ \vdots\\ \|\mathbf{x}_{N}-\mathbf{x}_{1}\|/c\\ \vdots\\ \|\mathbf{x}_{N}-\mathbf{x}_{N-1}\|/c\end{bmatrix} \in\mathbb{R}^{N(N-1)\times 1}, \tag{11}\]  
is a known vector. As to \(\mathbf{w}_{a}\), it represents the \(N\times(N-1)\) vector of measurements errors defined as:  
\[\mathbf{w}_{a}=[w_{1,2}\;\cdots\;w_{1,N}\;\cdots\;w_{N,1}\;\cdots\;w_{N,N-1}]^{T}\,. \tag{12}\]  
In the following, we assume that \(\mathbf{w}_{a}\sim\mathcal{N}(\mathbf{0}_{N(N-1),1},\sigma_{t}^{2}\mathbf{I}_{N(N-1)})\) is a Gaussian random vector with \(\mathbf{0}_{n,m}\) and \(\mathbf{I}_{K}\) denoting the \(n\times m\) matrix of zeros and the \(K\)-dimensional identity matrix, respectively. Clearly, the set of measurements between anchors is independent from those received by the blind node, that is, \(\mathbf{w}_{a}\) is independent of the \(w_{i,b}\)s. Moreover, the known matrix \(\mathbf{Q}\in\mathbb{R}^{N(N-1)\times N}\) is given by:  
\[\mathbf{Q}= \begin{bmatrix}-1&1&0&\cdots&\cdots&0\\ \vdots&&&&&&\vdots\\ -1&0&\cdots&\cdots&0&1\\ 1&-1&0&\cdots&\cdots&0\\ \vdots&&&&&&\vdots\\ 0&-1&0&\cdots&0&1\\ \vdots&&&&&&\vdots\\ 1&0&\cdots&\cdots&0&-1\\ \vdots&&&&&&\vdots\\ 0&\cdots&\cdots&0&1&-1,\end{bmatrix}  \tag{13}\]and, as intuition might suggest, its role is practically to perform the time difference between the offsets of all anchor pairs.