math - runga kutta integration with sensor data -


had question regarding numerical integration runga kutta (rk2). suppose have sensor data provide me x,y position , velocities. based on current vehicle state need find out vehicle @ time.

using simple euler method can this

x(1) = 10; y(1) = 5; xdot = 2; ydot = 1; dt = 0.1  = 1:100    x(i+1) = x(i) + dt*xdot    y(i+1) = y(i) + dt*ydot    t(i+1) = t(i) + dt     if(t(i+1) >= 5)       break end 

however i've read euler numerically unstable , better use rk based methods. taking @ rk4 implementation i'm confused how time interval being split. rk2 method conceptually understand trying this. this

so question this: how implement application? thing can think of is, if have 10hz data run computation @ 1 hz , use 1st, 5th , 10th frame compute rk2 coefficients. going right way?

rk not suitable problem; problem described integrating x'(t) on discrete samples. if timesteps evenly spaced , expect path of vehicle smooth relative sample rate, adams-moulton methods work (this example of multistep methods mentioned @lutzl; see https://en.wikipedia.org/wiki/linear_multistep_method). if wanted predict position of vehicle @ next timestep, want use adams-bashforth multistep method. alternatively, opt trapezoidal or simpson's rule, both of higher-order euler's method.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -