# Leveraging Hybrid RF-VLP for High-Accuracy Indoor Localization with Sparse Anchors
## 2 Hybrid RF-VLP-Enabled Positioning System
### Integrated Localization Algorithm
Next, a local coordinate map containing all receivers can be established via a classical multi-dimensional scaling (MDS) algorithm [28]  
\[P_{br}=\frac{P_{br}G_{t}G_{r}\lambda^{2}}{(4\pi d_{b})^{2}}, \tag{1}\]0  
Note that \(\mathbf{U}_{\text{local}}\) is a \(2\times N\) matrix that contains all receiver coordinates in the local 2D coordinate system. To determine the global coordinates of each receiver, we need to map this local coordinate to the absolute coordinate. To implement this remapping, we first estimate the LED coordinate in this local coordinate system. Assuming that \(\text{Rx}_{i}\) to \(\text{Rx}_{j}\) is within the coverage range of \(\text{LED}_{m}\), then the distance between \(\text{LED}_{m}\) and each receiver can be estimated using the optical RSS. We denote the distance between \(\text{LED}_{m}\) and \(\text{Rx}_{i}\) as \(d_{oim}\). Suppose that the local coordinate of \(\text{Rx}_{i}\) is \(\mathbf{U}_{\text{local}}(:,i)=\left(x_{i},y_{i}\right)^{T}\), then the following equation can be constructed as  
\[P_{br}=\frac{P_{br}G_{t}G_{r}\lambda^{2}}{(4\pi d_{b})^{2}}, \tag{1}\]1  
where \(\mathbf{1}_{m}=(x_{m},y_{m})^{T}\) is the coordinate of \(\text{LED}_{m}\) that needs to be estimated in the local coordinate system. Then, this coordinate can be estimated via least square method  
\[P_{br}=\frac{P_{br}G_{t}G_{r}\lambda^{2}}{(4\pi d_{b})^{2}}, \tag{1}\]2  
\[\text{where }\mathbf{X}= \begin{bmatrix}2(x_{i}-x_{i+1})&2(y_{i}-y_{i+1})\\ 2(x_{i}-x_{i+2})&2(y_{i}-y_{i+2})\\ \vdots&\vdots\\ 2(x_{i}-x_{j})&2(y_{i}-y_{j})\end{bmatrix} ,\mathbf{y}= \begin{bmatrix}d_{a(i+1) m}^{2}-d_{oim}^{2}+(x_{i}^{2}+y_{i}^{2})-(x_{i+1}^{2}-y_{i+1}^{2})\\ d_{o(i+2)m}^{2}-d_{oim}^{2}+(x_{i}^{2}+y_{i}^{2})-(x_{i+2}^{2}-y_{i+2}^{2})\\ \vdots\\ d_{ojm}^{2}-d_{oim}^{2}+(x_{i}^{2}+y_{i}^{2})-(x_{j}^{2}-y_{j}^{2})\end{bmatrix} .\]  
Apply Equation (10) to each LED, so we can establish a matrix of LED local coordinate \(\mathbf{L}_{local}=[\mathbf{1}_{1},\mathbf{1}_{2},\dots,\mathbf{1}_{M}]\). Upon constructing the matrix \(\mathbf{L}_{\text{local}}\), the global coordinates of each receiver can be obtained by transforming the local coordinates into the absolute coordinate system. Assume that the absolute coordinates of each LED anchor is \(\mathbf{L}_{\text{abs}}=[\mathbf{1}_{1\_\text{abs}},\mathbf{1}_{2\_\text{abs} },\dots,\mathbf{1}_{M\_\text{abs}}]\), then the local coordinate can be converted into the absolute coordinate via affine transformation. Let \(\mathbf{L}_{\text{local}}^{\prime}= \begin{bmatrix}\mathbf{L}_{\text{local}}\\ \mathbf{1}_{1\times M}\end{bmatrix} \), and \(\mathbf{L}_{\text{abs}}^{\prime}= \begin{bmatrix}\mathbf{L}_{\text{abs}}\\ \mathbf{1}_{1\times M}\end{bmatrix} \), then the absolute coordinates can be expressed as  
\[\mathbf{L}_{\text{abs}}^{\prime}=\mathbf{A}*\mathbf{L}_{\text{local}}^{\prime}, \tag{11}\]  
where \(\mathbf{A}\) represents the transform matrix. And we can then convert the local receiver coordinates to global coordinates  
\[\mathbf{U}_{\text{abs}}^{\prime}=\mathbf{A}*\mathbf{U}_{\text{local}}^{\prime} \tag{12}\]  
where \(\mathbf{U}_{\text{local}}^{\prime}= \begin{bmatrix}\mathbf{U}_{\text{local}}\\ \mathbf{1}_{1\times M}\end{bmatrix} \), and \(\mathbf{U}_{\text{abs}}=\mathbf{U}_{\text{abs}}^{\prime}(1:2,:)\).