In short, when I try to estimate the positioning error of a point from initial position estimates and true distances from other points, I get an estimate with a much higher error than the initial error. I find this quite counter-intuitive, therefore I am probably missing something in the reasoning.
Let's consider two points $P$ and $S$, of true coordinates $\boldsymbol{p} = [p_x \ \ p_y \ \ p_z]$ and $\boldsymbol{s} = [s_x \ \ s_y \ \ s_z]$, respectively.
I have:
· An initial knowledge of the coordinates: $\check{\boldsymbol{p}} = [\check{p}_x \ \ \check{p}_y \ \ \check{p}_z] = \boldsymbol{p} + \boldsymbol{\Delta p}$ and $\boldsymbol{s} = [\check{s}_x \ \ \check{s}_y \ \ \check{s}_z] = \boldsymbol{p} + \boldsymbol{\Delta s}$, where $\boldsymbol{\Delta p}$ and $\boldsymbol{\Delta s}$ are the initial position errors on the points $P$ and $S$, respectively.
· The true distance between the points: $d = |\boldsymbol{p} - \boldsymbol{s}| = \sqrt{(p_x - s_x)^2 + (p_y - s_y)^2 + (p_z - s_z)^2}$.
Below is a numerical example to illustrate the issue.
| Point $S$ | Point $P$ | Distance | |
|---|---|---|---|
| Initial assumed value | $\check{\boldsymbol{s}} = [\check{s}_x \ \ \check{s}_y \ \ \check{s}_z]=[100 \ \ 0 \ \ 25]$ | $\check{\boldsymbol{p}} = [\check{p}_x \ \ \check{p}_y \ \ \check{p}_z] = [-121 \ \ 64 \ \ 0]$ | $\check{d} = |\check{\boldsymbol{s}} - \check{\boldsymbol{p}}| \approx 231.435 $ |
| True value | $\boldsymbol{s} = [s_x \ \ s_y \ \ s_z] = [99.506 \ \ -0.067 \ \ 24.850]$ | ${\boldsymbol{p} = [p_x \ \ p_y \ \ p_z] = [-120.535 \ \ 64.509 \ \ -0.499]}$ | $d = |\boldsymbol{s} - \boldsymbol{p}| \approx 230.592 $ |
| Error | $\boldsymbol{\Delta s} = [0.494 \ \ 0.067 \ \ 0.150] \\ |\boldsymbol{\Delta s}| \approx 0.521 $ | $\boldsymbol{\Delta p} = [-0.465 \ \ -0.059 \ \ 0.499] \\ |\boldsymbol{\Delta p}| \approx 0.685$ | $\check{d} - d \approx 0.842 $ |
If I try to estimate $s_z$ assuming that the other initial values are correct, I have:
$d = \sqrt{(\check{p}_x - \check{s}_x)^2 + (\check{p}_y - \check{s}_y)^2 + (\check{p}_z - \hat{s}_z)^2}$
$\hat{s}_z = \check{p}_z + \sqrt{d^2 - (\check{p}_x - \check{s}_x)^2 - (\check{p}_y - \check{s}_y)^2} \approx 15.354,$
which means an error of $\approx -9.496$ from the true value $24.850$. I understand that I use noisy data to do my estimation, but I am still surprised to get an error of $-9.496$ when the actual xyz errors are less than $0.5$, which represents a factor of about 20.
Even If I assume that I know the true value for $s_x$ and $s_y$, I get:
$\hat{s}_z = \check{p}_z + \sqrt{d^2 - (\check{p}_x - s_x)^2 - (\check{p}_y - s_y)^2} \approx 21.404,$
which means an error of $\approx 3.696$, still a factor 7 compared to the actual xyz errors.
My initial idea was to estimate $s_z$ from many measurements $d$ using many different points $P$ and average the results (which corresponds to the linear least squares algorithm, which should minimise the square of the errors). But since I obtain very wrong estimates, it is not working.
On one side I understand where it is coming, because the equations used involve squared distances, and the square root of the difference of squared distances can be much bigger than the difference of distances for large distances, because
$$|\check{\boldsymbol{s}} - \check{\boldsymbol{p}}|^2 - |\boldsymbol{s} - \boldsymbol{p}|^2 = (|\check{\boldsymbol{s}} - \check{\boldsymbol{p}}| + |\boldsymbol{s} - \boldsymbol{p}|) (|\check{\boldsymbol{s}} - \check{\boldsymbol{p}}| - |\boldsymbol{s} - \boldsymbol{p}|),$$
and thus
$$\frac{\sqrt{|\check{\boldsymbol{s}} - \check{\boldsymbol{p}}|^2 - |\boldsymbol{s} - \boldsymbol{p}|^2}}{|\check{\boldsymbol{s}} - \check{\boldsymbol{p}}| - |\boldsymbol{s} - \boldsymbol{p}|} = \sqrt{\frac{|\check{\boldsymbol{s}} - \check{\boldsymbol{p}}| + |\boldsymbol{s} - \boldsymbol{p}|}{|\check{\boldsymbol{s}} - \check{\boldsymbol{p}}| - |\boldsymbol{s} - \boldsymbol{p}|}}.$$
With the numerical values above, we have $\sqrt{\check{d}^2 - d^2} \approx 19.729$, while $\check{d} - d \approx 0.842$.
On the other side, I still find strange and counterintuitive the large amount of error in the estimates. Do you have an intuitive explanation about it?