## 3 Bias Compensation Estimator for Localization in 3D Space
### Bias Compensation Localization in 2D Space
: \(\mathbb{E}(\cos e_{i}\sin e_{i})=0\)_, \(\mathbb{E}(\sin^{2}e_{i})=(1-e^{-2\sigma^{2}})/2\), \(\mathbb{E}(\cos^{2}e_{i})=(1+e^{-2\sigma^{2}})/2\) where \(\mathbb{E}(\cdot)\) represents the mathematical expectation._  
Proof of Lemma 1.: Since \(\cos e_{i}\sin e_{i}=\sin 2e_{i}/2\) is an odd function, we have:  
\[\frac{1}{2\sqrt{2\pi}\sigma}\int_{-\infty}^{\infty}\sin 2e_{i}\cdot e^{- \frac{\sigma^{2}}{2\sigma^{2}}}de_{i}=0. \tag{22}\]  
From  
\[\mathbb{E}(\cos^{2}e_{i}-\sin^{2}e_{i}) = \mathbb{E}(\cos 2e_{i}) \tag{23}\] \[= \sum_{i=0}^{\infty}\frac{(-1)^{i}2^{2i}}{(2i)!}\cdot\frac{1}{ \sqrt{2\pi}\sigma}\int_{-\infty}^{\infty}e_{i}^{2i}e^{-\frac{\sigma^{2}}{2 \sigma^{2}}}de_{i}\] \[a_{12}^{i} =-\sin\phi_{i}\cos\phi_{i}\cos^{2}e_{i}-\cos^{2}\phi_{i}\cos e_{i} \sin e_{i}\]0 \[a_{12}^{i} =-\sin\phi_{i}\cos\phi_{i}\cos^{2}e_{i}-\cos^{2}\phi_{i}\cos e_{i} \sin e_{i}\]1 \[a_{12}^{i} =-\sin\phi_{i}\cos\phi_{i}\cos^{2}e_{i}-\cos^{2}\phi_{i}\cos e_{i} \sin e_{i}\]2  
and \(\mathbb{E}(\cos^{2}e_{i}+\sin^{2}e_{i})=1\), \(\mathbb{E}(\sin^{2}e_{i})=(1-e^{-2\sigma^{2}})/2\), \(\mathbb{E}(\cos^{2}e_{i})=(1+e^{-2\sigma^{2}})/2\). Define  
\[P(\gamma)=\frac{1}{n}\left[\mathbf{A}_{n}\quad\mathbf{B}_{n}\right]^{\prime} \left[\mathbf{A}_{n}\quad\mathbf{B}_{n}\right]-\frac{\gamma}{n}\left[ \begin{array} []{ccc}n&0&\sum_{i=1}^{n}x_{s_{i}}\\ 0&n&\sum_{i=1}^{n}y_{s_{i}}\\ \sum_{i=1}^{n}x_{s_{i}}&\sum_{i=1}^{n}y_{s_{i}}&\sum_{i=1}^{n}x_{s_{i}}^{2}+ \sum_{i=1}^{n}y_{s_{i}}^{2}\end{array} \right] \tag{24}\]  
as the extended coefficient matrix. **Lemma 2**. : \(\gamma_{\min}=\mathbb{E}(\sin^{2}e_{i})\) _is the smallest real value \(s.t\). \(\det(P(\gamma))=0\) in probability as \(n\to\infty\)._  
Proof of Lemma 2.: With Lemma 1, we have:\[\frac{1}{n}\big{[}\mathbf{A}_{n}\quad\mathbf{B}_{n}\big{]}^{\prime}\big{[}\mathbf{A} _{n}\quad\mathbf{B}_{n}\big{]}-P(\gamma_{\min})=\frac{\gamma_{\min}}{n}\left[ \begin{array}{ccc}n&0&\sum\limits_{i=1}^{n}x_{s_{i}}\\ 0&n&\sum\limits_{i=1}^{n}y_{s_{i}}\\ \sum\limits_{i=1}^{n}x_{s_{i}}&\sum\limits_{i=1}^{n}y_{s_{i}}&\sum\limits_{i= 1}^{n}x_{s_{i}}^{2}+\sum\limits_{i=1}^{n}y_{s_{i}}^{2}\end{array} \right]\]  
in probability where:  
\[P(\gamma_{\min})=\frac{\mathbb{E}(\cos(2e_{i}))}{n}*\sum\limits_{i=1}^{n}\bigg{(} \begin{bmatrix}\sin\phi_{i}\\ -\cos\phi_{i}\\ \sin\phi_{i}x_{s_{i}}-\cos\phi_{i}y_{s_{i}}\end{bmatrix}\begin{bmatrix}\sin \phi_{i}\\ -\cos\phi_{i}\\ \sin\phi_{i}x_{s_{i}}-\cos\phi_{i}y_{s_{i}}\end{bmatrix} ^{\prime}\bigg{)}. \tag{25}\]  
Through observation, \(P(\gamma_{\min})\) is positive semi-definite. Its null space is one dimensional in the form of: \(\beta\big{[}x_{t}\quad y_{t}\quad-1\big{]}^{\prime}\), where \(\beta\in\mathbb{R}\). Let vector \(\mathbf{v}=\big{[}v_{1}\quad v_{2}\quad v_{3}\big{]}\) be arbitrary in \(\mathbb{R}^{3\times 1}\). So we have  
\[\mathbf{v}^{{}^{\prime}}P(\gamma)\mathbf{v}=\mathbf{v}^{{}^{\prime}}P(\gamma_ {\min})\mathbf{v}-\frac{\gamma-\gamma_{\min}}{n}*\mathbf{v}^{{}^{\prime}} \left[ \begin{array}{ccc}n&0&\sum\limits_{i=1}^{n}x_{s_{i}}\\ 0&n&\sum\limits_{i=1}^{n}y_{s_{i}}\\ \sum\limits_{i=1}^{n}x_{s_{i}}&\sum\limits_{i=1}^{n}y_{s_{i}}&\sum\limits_{i= 1}^{n}x_{s_{i}}^{2}+\sum\limits_{i=1}^{n}y_{s_{i}}^{2}\end{array} \right] \mathbf{v}. \tag{26}\]  
The second term  
\[\frac{\gamma-\gamma_{\min}}{n}\mathbf{v}^{{}^{\prime}}\left[ \begin{array}{ccc}n&0&\sum\limits_{i=1}^{n}x_{s_{i}}\\ 0&n&\sum\limits_{i=1}^{n}y_{s_{i}}\\ \sum\limits_{i=1}^{n}x_{s_{i}}&\sum\limits_{i=1}^{n}y_{s_{i}}&\cdot\sum \limits_{i=1}^{n}x_{s_{i}}^{2}+\sum\limits_{i=1}^{n}y_{s_{i}}^{2}\end{array}