# Distributed Sensor Systems

### Sidebar

theory:background:location_based_on_acceleration

# Calculating an Absolute Location from an Acceleration Signal

Theoretically it is possible to calculate an absolute location by monitoring the acceleration for some time. Because acceleration is the second derivative of place with respect to time, a double integration of the acceleration should yield the location. This page shows that the propagation of errors is a big risk: a systematic measurement error will accumulate to a systematically wrong estimated location.

Acceleration is defined as the change of velocity over time:

$$a=\frac{\mathrm{d}v}{\mathrm{d}t}=\frac{\mathrm{d}^{2}x}{\mathrm{d}t^{2}}. \label{eq:Acceleration}$$

The inverse is:

$$v\left ( t \right )=\int_{0}^{t}a \mathrm{d}t=v_{0}+at \\ x\left ( t \right )=\int_{0}^{t}v\left ( t \right ) \mathrm{d}t=\int_{0}^{t} \left ( v_{0}+at \right ) \mathrm{d}t =x_{0} + v_{0}t +\frac{1}{2} at^{2} . \label{eq:DoubleIntegration}$$

In the situation where we are in control of the movement, we can make $x_{0} = 0$ and $v_{0} = 0$ and so

$$x\left ( t \right ) = \frac{1}{2} at^{2}$$

for a constant acceleration. However, the realistic situation is a case where we have a continuously changing acceleration signal signal $a(t)$ from which we want to determine the position $x(t)$. So we can no longer analytically solve $$v\left ( t \right )=\int_{0}^{t}a \left ( t \right) \mathrm{d}t \\ x\left ( t \right )=\int_{0}^{t} \int_{0}^{t}a \left ( t \right) \mathrm{d}t^{2}. \label{eq:DoubleIntegrationFull}$$

How can we say something about the propagation of errors without the need of solving equation \eqref{eq:DoubleIntegrationFull}? We notice that the evaluation of errors in a system with a time dependent acceleration signal a(t) is equal to a system having a constant acceleration like equation \eqref{eq:DoubleIntegration}.

$$Error_{v} = v_{real}\left ( t \right ) - v_{estimate}\left ( t \right )=\int_{0}^{t}\left ( a_{real} - a_{measured} \right ) \mathrm{d}t=v_{0}+\left ( a_{real} - a_{measured} \right )t \\ Error_{x}\left ( t \right )=x_{0} + v_{0}t +\frac{1}{2} \left ( a_{real} - a_{measured} \right )t^{2}$$

This means that, again with $x_{0} = 0$ and $v_{0} = 0$, we find $$Error_{x}\left ( t \right )=\frac{1}{2} \left ( a_{real} - a_{measured} \right )t^{2} \label{eq:x_error}$$

where $x_{0} = 0$ and $v_{0} = 0$ is used to set $Error_{x}(0)$ to $0$.

Let's take a numerical example. There is a risk in an acceleration that we do not pick up because it is too small. So, we do not measure an acceleration and we miss repositioning of the object. If the resolution due to the least significant bit is $1\%$, this may introduce a deviation in the acceleration of $0.001g$. Here I just guessed a value using a full scale of 1g and a 10 bit AD converter. This 0.001g is the deviation between the real acceleration and the estimated acceleration and so after a minute:

$$Error_{x}\left ( t \right )=\frac{1}{2} \left ( a_{real} - a_{measured} \right )t^{2}=\frac{1}{2} 0.001\text{g} \left ( 60 \text{s} \right )^{2} = 17.6\text{m}$$

which means that double integration may result into an offset of almost 17 m after a minute because we did not detect the i nitiation of the movement. This can also be understood by the following. What if we did not detect an acceleration after $t=0$ (even a small one)? The result is that the object will have a speed we are not aware of. This speed will result into a difference in the expected position $x_{estimated}(t)$ and the real position $x_{real}(t)$ that is increasing with time by

$$Error_{x}\left ( t \right )=v_{undetected}t.$$

The conclusion is that the determination of the absolute position by means of double integration of the measured acceleration signal requires

• a very low systematic error (with equation \eqref{eq:x_error} we can determine how low) to minimize the accumulative error
• defining the absolute position (“zeroing”) at regular moments to reset the accumulation of errors

Remarks:

• The reasoning does not change for the three-dimensional case. Making a curve from motion along the x-axis to the y-axis is an acceleration as well
• The same reasoning is valid for determining absolute orientation from a gyroscope signal. In the “Tips on Physics” by Richard Feynman1), there is a story about how the US army has done a lot of work on improving the accuracy of gyroscopes to determine the the position of submarines
1)
Richard P. Feynman, Michael A. Gottlieb, Ralph Leighton, Feynman's Tips on Physics: Reflections, Advice, Insights, Practice - A Problem-Solving Supplement to the Feynman Lectures on Physics, ISBN-13: 978-0465027972