6
$\begingroup$

I need to get position $x$ from integrating velocity $v$. One could use 1st order Euler integration as

$x_{t+1} = x_t + \delta * v_t.$

However, doing so leads to errors proportional to sampling time $\delta$. Do you know any more accurate solution please?

$\endgroup$
1
  • $\begingroup$ If all the knowledge you have is the discrete v samples there's not much you can do. Interpolating (e.g. linearly) the velocity before integrating it could be a little better (it reflects an assumption that v can't change instantaneously). More generally if the velocity signal is bandwidth-limited and you sample it fast enough you should be able to accurately get position x from it. $\endgroup$
    – Guy Sirton
    Jun 24 '14 at 18:27
2
$\begingroup$

One of the most common techniques for integrating ODEs is to using Runge-Kutta methods (of which Euler integration is just a special case). However, these only improve errors due to discretization of time. If you are concerned about errors caused by noise in $\delta$ then I'm not aware of any better methods.

Add Example

For RK4 and using the dynamics $\dot{x}(t) = v(t)$, where the velocity is not dependent on the state, you have $$ \begin{align} k_1 &= v(t) \\ k_2 &= v \left ( t+\frac{\delta}{2} \right ) \\ k_3 &= v \left ( t+\frac{\delta}{2} \right ) \\ k_4 &= v \left ( t+\delta \right ) \\ x(t+\delta) &= x(t) + \frac{h}{6} (k_1 + 2 k_2 + 2 k_3 + k_4) \end{align} $$

If you have access to $v(t+\frac{\delta}{2})$ this will provide an improvement over Euler integration. If not, you can probably still get some improvement by assuming $v(t+\frac{\delta}{2}) = \frac{v(t) + v(t+\delta)}{2}$.

Other Option - Kalman Filter

For such a simple system, another option would be to use a Kalman filter. In the case where you only have access to $v(t)$ and $v(t+\delta)$ (no intermediate information) this might work better.

$\endgroup$
5
  • $\begingroup$ But Runge-Kutta requires an explicit knowledge of the function to intefrate like \dot{x} = f(x), which is it not met in my scenario. We have only measures of velocity: v0, v1... vt, etc $\endgroup$
    – Courier
    Jun 24 '14 at 14:34
  • $\begingroup$ It is the same as with Euler integration. In both cases your function is $\dot{x}(t) = v(t)$ $\endgroup$
    – ryan0270
    Jun 24 '14 at 14:40
  • $\begingroup$ Then, how could you compute $k_2 = f(y_n + \frac{h}{2} k_1)$ for RK? $\endgroup$
    – Courier
    Jun 24 '14 at 15:03
  • $\begingroup$ I edited the answer. Also, I just remember that a Kalman filter might be an option in your case. $\endgroup$
    – ryan0270
    Jun 24 '14 at 15:29
  • $\begingroup$ Thanks ryan0270. So I need to approximate RK since I do not have access to $f(t+ \frac{\delta}{j})$. $\endgroup$
    – Courier
    Jun 24 '14 at 15:36

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .