# Amplitude Modeling of Specular Multipath Components for Robust Indoor Localization
## 5 Exploiting the GPR Model for (Multipath-Assisted) Positioning
The concentrated LLHF is now obtained by maximizing the LLHF for signal model (13) by maximizing for the nuisance parameter vector \(\mathbf{\phi}\) and \(\sigma_{n}^{2}\) (maximizing the AWGN model for \(\mathbf{C}\)), given candidate position \(\mathbf{p}^{*}\),  
\[\mathcal{F}(\mathbf{p}^{*})=\max_{\sigma_{n},\mathbf{\phi}}\mathcal{L}\Big{(}\mathbf{r}| \sigma_{n}^{2},\mathbf{\phi},\mathbf{p}^{*}\Big{)} \tag{14}\]  
with  
\[\mathcal{L}(\mathbf{r}|\sigma_{n},\mathbf{\phi},\mathbf{p}^{*})=-\log\det\big{(}\tilde{ \mathbf{C}}\big{)}-(\mathbf{r}-\mathbf{S}(\mathbf{p})\mathbf{M}(\mathbf{p})\mathbf{\phi})^{H}\tilde{\mathbf{C }  
Let's denote the phase of the \(k\)-th SMC amplitude as \(\zeta_{k}\). To solve for the phase, we have:  
\[\left(\mathbf{r}-\mathbf{S}(\mathbf{p})\mathbf{M}(\mathbf{p})\mathbf{\phi}\right)^{H}\tilde{ \mathbf{C}}^{-1}(\mathbf{r}-\mathbf{S}(\mathbf{p})\mathbf{M}(\mathbf{p})\mathbf{\phi})= \tag{19}\] \[\left(\mathbf{r}-\sum_{k^{\prime}\
eq k}\mathbf{s}(\tau_{k})\Lambda_{k}e^ {i\zeta_{k}}-\mathbf{s}(\tau_{k})\mu_{k}e^{i\zeta_{k}}\right)^{H}\tilde{\mathbf{C}}^{-1 }\Bigg{(}\mathbf{r}-\sum_{k^{\prime}\
eq k}\mathbf{s}(\tau_{k})\mu_{k}e^{i\zeta_{k}}- \mathbf{s}(\tau_{k})\mu_{k}e^{i\zeta_{k}}\Bigg{)}\] \[=\left(\mathbf{r}_{k}-\mathbf{s}(\tau_{k})\mu_{k}e^{i\zeta_{k}}\right)^{H }\tilde{\mathbf{C}}^{-1}\Big{(}\mathbf{r}_{k}-\mathbf{s}(\tau_{k})\mu_{k}e^{i\zeta_{k}} \Big{)}=f(\zeta_{k})\]  
Vector \(\mathbf{r}_{k}\) is the residual of the CIR measurement after subtracting all SMCs except the \(k\)-th. In order to find \(\zeta_{k}\), let's denote \(e^{i\zeta_{k}}=x_{k}+jy_{k}\). Thus:  
\[\hat{x}_{k},\hat{y}_{k}=\arg\min_{x_{k},y_{k}}f(x_{k},y_{k})\quad s.t.\quad g(x _{k},y_{k})=x_{k}^{2}+y_{k}^{2}-1=0 \tag{20}\]  
Using Lagrange multiplier, we have  
\[\hat{x}_{k},\hat{y}_{k},\hat{\lambda}_{k}=\arg\min_{x_{k},y_{k},\lambda_{k}}f( x_{k},y_{k})+\lambda_{k}g(x_{k},y_{k}) \tag{21}\]  
and obtain  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]0  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]1  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]2  
Equating Equations (22)-(24) to 0, we have:  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]3  
and  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]4  
Similarly for \(y_{k}\). Or, in short we have  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]5  
and if the \(k\)-th SMC does not overlap with any other SMC, we have equivalently  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]6  
which is a weighted projection of the measurement on the \(k\)-th SMC template \(\mathbf{s}(\tau_{k})\). The weighting (by \(\tilde{\mathbf{C}}^{-1}\)) takes into account the variance of the SMC from the GPR model, which is essential for reducing secondary maxima in the LHF. Unfortunately, the weighting has a negative influence on the reliability of this phase estimation step. We thus replace for this estimator the covariance by an identity matrix, obtaining the approximate (but more robust) phase estimator  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]7  
From (15), we can write:  
\[\mathcal{L}(\mathbf{r}|\mathbf{p}^{*})=\max_{\mathbf{\alpha}}\mathcal{L}(\mathbf{r}|\mathbf{p}^{*},\mathbf{\alpha}). \tag{11}\]8where \(\hat{\mathbf{\hat{C}}}=(\mathbf{r}-S(\mathbf{p})\mathbf{M}(\mathbf{p})\mathbf{\phi})(\mathbf{r}-S(\mathbf{p})\mathbf{M} (\mathbf{p})\mathbf{\phi})^{H}\) is a realization of \(\hat{\mathbf{C}}\).