I am designing a simulation of a robot receiving input from a sensor which has gaussian error. The robot will start from a known position and move at a constant speed; the sensor will continually provide its best guess of the robot's position.

The sensor that I am trying to model has a stated accuracy of 10% of the distance traveled i.e. if the robot has traveled 10 meters, we can expect the standard deviation of the robot's position to be 1 meter from the estimate. The sensor provides readings at a non-constant (but consistent) rate every few hundredths of a second.

My Solution

After traveling distance d, the robot's position should have an error $X \sim {N(0, (0.1*d)^2)}$.

Assume that the readings are given at distances $d_1$, $d_2$, $d_3$, ..., $d_n$ (where $d_n = d$) and the standard deviations of the errors are $\sigma_1$, $\sigma_2$, $\sigma_3$, ... ,$\sigma_n$.

Through the summing of normal distributions, I can conclude that: \begin{align} &\sigma_1^2 &= (0.1*d_1)^2 \\ &\sigma_1^2 + \sigma_2^2 &= (0.1*d_2)^2 \\ &...\\ &\sigma_1^2 + \sigma_2^2 + ... + \sigma_n^2 &= (0.1*d_n)^2 \end{align}

Solving $\sigma_k$ for the error in the $k^\text{th}$ iteration:

\begin{align} \sigma_k^2 = (0.1*d_k)^2 - (0.1*d_{k-1})^2 \end{align}


Using the above solution, $\sigma_k$ increases proportionally with $\sqrt{d}$ i.e. afer some time, the robot will get consecutive estimates that are very far apart. This is not how the sensor works.

Example 1: Assume readings are given at 1 meter intervals. Starting at known location $A$, the robot moves 1 meter and the error is correctly randomized as $X \sim N(0, 0.1^2)$.

Example 2: Starting at known location $A$, the robot tries to travels 10 meters to $B$. After the 10 meters, the sensor estimates the location as $B'$ with an error $X \sim N(0, 1^2)$. The robot then tries to move another 1 meter to $C$. Its estimate $C'$ should be about 1 meter from $B'$, and the error for its movement from $B'$ to $C'$ should be $X\sim N(0, 0.1^2)$. Instead, the algorithm above results in an error s.d. of 0.436m for that 1 meter moved, which I believe models the total error of 11 meters from known location $A$.

So, for my question: on each iteration, how would I best model the error that this sensor generates? If I were to simply model the error on each iteration as $X \sim N(0, (0.1 * \delta d)^2)$, the s.d. of the sum of the errors will be much less the deired $0.1 * d$.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.