# Indoor Localization Using Semi-Supervised Manifold Alignment with Dimension Expansion
## 3 Algorithm Description
### Multiple Measurements  
To be general, we extend the objective function to the scenario with multiple types of measurements used for localization in (30).  
\[\begin{array}{l}\arg\min_{\{\mathbf{X}_{N1},\mathbf{X}_{N2},\mathbf{\sim}, \mathbf{X}_{N3}\}}\{\sum\limits_{\begin{subarray}{c}w\in\{1,2,...l\}\\ q\in\{1,2,...l\}\end{subarray}}\left(||\mathbf{x}_{Nw_{q}}-\mathbf{x}_{Np_{q}}||^ {2}\right)+\sum\limits_{q,q^{\prime}\in\{1,2,...l\}}\left(||\mathbf{x}_{N1_{q}}- \mathbf{x}_{N1_{q^{\prime}}}||^{2}S_{qq^{\prime}}^{\mathrm{NI}}\right)+\\ \sum\limits_{q,q^{\prime}\in\{1,2,...,l\}}\left(||\mathbf{x}_{N2_{q}}-\mathbf{x }_{N2_{q^{\prime}}}||^{2}S_{qq^{\prime}}^{\mathrm{NI}}\right)+...+\sum\limits_ {q,q^{\prime}\in\{1,2,...,l\}}\left(||\mathbf{x}_{Nn_{tq}}-\mathbf{x}_{N1_{q^{ \prime}}}||^{2}S_{qq^{\prime}}^{\mathrm{NI}}\right)\}\end{array} \tag{30}\]  
where \(\mathbf{X}_{Nu}=\left\{\mathbf{x}_{Nu_{q}}\right\}(1\leq q\leq l,1\leq u\leq t)\) is the \(u\)-th manifold corresponding to \(u\)-th type of measurements \(\mathbf{D}_{u}=\left\{\mathbf{d}_{uq}\right\}(1\leq q\leq l)\) and \(S_{qq^{\prime}}^{Nu}=e^{-||\mathbf{d}_{uq}-\mathbf{d}_{uq^{\prime}}||^{2}}\) and \(t\) is the total types of measurements.  
\[\begin{array}{cccc}\text{Let}&\mathbf{P}=\left(\begin{array}{c}\mathbf{P}_{1}\\ \mathbf{P}_{2}\\ \vdots\\ \mathbf{P}_{t}\end{array}\right),\mathbf{Z}=\left(\begin{array}{cccc}\mathbf{ D}_{1}&0&\cdots&0\\ 0&\mathbf{D}_{2}&\cdots&0\\ \cdots&\cdots&\cdots&\cdots\\ 0&0&\cdots&\mathbf{D}_{t}\end{array}\right)\text{, and }\mathbf{\Omega}=\left( \begin{array}{cccc}(t-1)\mathbf{I}+2\mathbf{L}_{1}&-\mathbf{I}\\ -\mathbf{I}&(t-1)\mathbf{I}+2\mathbf{L}_{2}\\ \cdots&\cdots\\ -\mathbf{I}&-\mathbf{I}\end{array}\right)\\ \cdots&(t-1)\mathbf{I}+2\mathbf{L}_{t}\end{array}\right)\text{, where }\mathbf{P}_{u}\text{ is the transformation matrix with respect to }\mathbf{D}_{u}\text{. Similarly, we can convert (30) into (the details of the derivation are shown in the Appendix):  
\[\arg\min_{\mathbf{P}}\{\text{Tr}(\mathbf{P}^{\text{T}}\mathbf{Z}\mathbf{ \Omega}\mathbf{Z}^{\text{T}}\mathbf{P})\}\qquad\qquad\text{s.t.}\mathbf{P}^{ \text{T}}\mathbf{Z}\mathbf{Z}^{\text{T}}\mathbf{P}=\mathbf{I}^{t},\mathbf{P}^ {\text{T}}\mathbf{Z}\mathbf{e}^{t}=\mathbf{0}. \tag{31}\]  
After the solution of \(\mathbf{P}\) in (31) is obtained, we locate the target by:  
\[\arg\min_{\mathbf{I}_{\text{aug}}}\left\{\sum_{p=2}^{t}||\mathbf{P}_{1}^{\text {T}}\mathbf{I}_{\text{aug}}^{\text{T}}-\mathbf{P}_{p}^{\text{T}}\mathbf{new} _{p}^{\text{T}}||^{2}\right\} \tag{32}\]  
where \(\mathbf{P}_{1}\) and \(\mathbf{P}_{p}(2\leq p\leq t)\) stand for the transformation matrices with respect to the augmented physical coordinates \(\mathbf{I}_{\text{aug}}\) and \(p\)-th type of measurement, respectively, and \(\mathbf{new}_{p}\) is the \(p\)-th type of newly-collected measurement in (33).  
\[\mathbf{new}_{p}=(\text{new}_{1}^{p},\text{new}_{2}^{p},...,\text{new}_{m}^{p}) \tag{33}\]  
where \(\text{new}_{k}^{p}\) is the newly-collected value corresponding to \(p\)-th type of measurement from the \(k\)-th AP.