## 3 Bias Compensation Estimator for Localization in 3D Space
### Bias Compensation Method in \(Z\)-Axis  
The geometric relationship in 3D space is:  
\[z_{t}\cos\hat{\theta}_{i}=\hat{r}_{i}\sin\hat{\theta}_{i}+z_{i}\cos\hat{\theta }_{i}, \tag{31}\]  
where \(\hat{r}_{i}=\sqrt{\big{(}\mathbf{\hat{t}_{bc}}(1)-x_{s_{i}}\big{)}^{2}+\big{(} \mathbf{\hat{t}_{bc}}(2)-y_{s_{i}}\big{)}^{2}}\). Rewrite (31) into the matrix form  
\[\mathbf{Y}_{n}z_{t}=\mathbf{F}_{n}, \tag{32}\]  
where  
\[\mathbf{Y}_{n}=\begin{bmatrix}\cos\hat{\theta}_{1}\\ \vdots\\ \cos\hat{\theta}_{n}\end{bmatrix},\mathbf{F}_{n}=\begin{bmatrix}z_{s_{1}}\cos \hat{\theta}_{1}+\hat{r}_{1}\sin\hat{\theta}_{1}\\ \vdots\\ z_{s_{n}}\cos\hat{\theta}_{n}+\hat{r}_{n}\sin\hat{\theta}_{n}\end{bmatrix}. \tag{33}\]  
Similarly, we handle the matrix \(\mathbf{Y}_{n}\) and \(\mathbf{F}_{n}\),  
\[\frac{1}{n}\big{[}\mathbf{Y}_{n}\quad\mathbf{F}_{n}\big{]}^{\prime}\big{[} \mathbf{Y}_{n}\quad\mathbf{F}_{n}\big{]}=\frac{1}{n}\sum_{i=1}^{n}\begin{bmatrix} d_{1}^{i}&d_{2}^{i}\\ d_{2}^{i}&d_{3}^{i}\end{bmatrix}, \tag{34}\]  
where  
\[d_{1}^{i} =\cos^{2}\theta_{i}\cos^{2}\delta_{i}-2\cos\theta_{i}\sin\theta _{i}\cos\delta_{i}\sin\delta_{i}+\sin^{2}\theta_{i}\sin^{2}\delta_{i}, \tag{35}\] \[d_{2}^{i} =z_{s}d_{1}^{i}+\hat{r}_{i}(\sin\theta_{i}\cos\theta_{i}\cos^{2} \delta_{i}-\sin^{2}\theta_{i}\cos\delta_{i}\sin\delta_{i}\] \[\quad+\cos^{2}\theta_{i}\cos\delta_{i}\sin\delta_{i}-\sin\theta_{i }\cos\theta_{i}\sin^{2}\delta_{i}),\] (36) \[d_{3}^{i} =z_{s}^{2}d_{1}^{i}+2z_{s_{i}}\hat{r}_{i}(\sin\theta_{i}\cos \theta_{i}\cos^{2}\delta_{i}-\sin^{2}\theta_{i}\cos\delta_{i}\sin\delta_{i}+ \cos^{2}\theta_{i}\cos\delta_{i}\sin\delta_{i}\] \[\quad-\sin\theta_{i}\cos\theta_{i}\sin^{2}\delta_{i})+\hat{r}_{i} ^{2}(\sin^{2}\theta_{i}\cos^{2}\delta_{i}+2\sin\theta_{i}\cos\theta_{i}\sin \delta_{i}\cos\delta_{i}+\cos^{2}\theta_{i}\sin^{2}\delta_{i}). \tag{37}\]  
We also define  
\[Q(\mu)=\frac{1}{n}\big{[}\mathbf{Y}_{n}\quad\mathbf{F}_{n}\big{]}^{\prime} \big{[}\mathbf{Y}_{n}\quad\mathbf{F}_{n}\big{]}-\frac{\mu}{n}\begin{bmatrix} n&\sum_{i=1}^{n}z_{s_{i}}\\ \sum_{i=1}^{n}z_{s_{i}}&\sum_{i=1}^{n}{z_{s_{i}}}^{2}+\sum_{i=1}^{n}\hat{r}_{i}^{2} \end{bmatrix}. \tag{38}\]  
According to Lemma 2, the same reasoning process can be concluded. \(\mu_{\min}=\mathbb{E}(\sin^{2}\delta_{i})\) is the smallest real value \(s.t.\ \det(Q(\mu))=0\) in probability as \(n\to\infty\). The difference is \(\mu_{\min}\) can be found by getting the minimum root of a second-order equation \(\det(Q(\mu))=0\).  
**Theorem 2.**  
\[\hat{z}_{bc}=\bigg{(}\frac{1}{n}\mathbf{Y}_{n}^{{}^{\prime}}\mathbf{Y}_{n}-\mu_ {\min}\bigg{)}^{-1}\bigg{(}\frac{1}{n}\mathbf{Y}_{n}^{{}^{\prime}}\mathbf{F}_{n }-\frac{\mu_{\min}}{n}\sum_{i=1}^{n}z_{s_{i}}\bigg{)} \tag{39}\]  
_converges to \(z_{t}\) in probability as \(n\to\infty\) when \(\mathbb{E}(cos2\delta_{i})\
eq 0\)._  
**Proof of Theorem 2.** As \(n\to\infty\),  
\[\frac{1}{n}\mathbf{Y}_{n}^{{}^{\prime}}\mathbf{Y}_{n}-\mu_{\min}=\frac{\mathbb{E} (\cos(2\delta_{i}))}{n}\sum_{i=1}^{n}\bigg{(}\cos\theta_{i}*\cos\theta_{i} \bigg{)}, \tag{40}\]  
\[\frac{1}{n}\mathbf{Y}_{n}^{{}^{\prime}}\mathbf{F}_{n}-\frac{\mu_{\min}}{n}\sum _{i=1}^{n}z_{s_{i}}=\frac{\mathbb{E}(\cos(2\delta_{i}))}{n}\sum_{i=1}^{n} \bigg{(}\cos\theta_{i}*\cos\theta_{i}*z_{t}\bigg{)}. \tag{41}\]  
From (40) and (41), Theorem 2 stands when \(\mathbb{E}(\cos 2\delta_{i})\
eq 0\).  
From (28) and (39), the 3D bias compensation estimator result is \(\mathbf{\hat{T}_{bc}}=\big{[}\mathbf{\hat{t}_{bc}};\hat{z}_{bc}\big{]}^{\prime}\).