Physics Stack Exchange is a question and answer site for active researchers, academics and students of physics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What I'm essentially doing is Kalman Filter. If anyone is familiar with (but it doesn't really matter in this case). Consider the following formulas:




where $p$ is position, $v$ is velocity and $a$ is acceleration. The above model represents the movement of a vehicle... Why is acceleration taken into account, both in position and velocity? And why is it in position $\frac{dt^2}{2}$?

share|cite|improve this question
This looks like a velocity verlet. Not for the position but velocity. – huseyin tugrul buyukisik Sep 3 '12 at 6:59
Are you making a simulator? – huseyin tugrul buyukisik Sep 3 '12 at 7:00
Hm, so this is purely mathemathic/physic - no intuitive explanation what that does? No, I'm just learning Kalman Filter and need to know the model. – Primož Kralj Sep 3 '12 at 7:04
Lubos gives a physical answer below, but the second order correction $a_k\,dt^2/2$ may also help the Kalman filter - I'm guessing $a$ is a parameter being estimated by the filter? – WetSavannaAnimal aka Rod Vance Sep 24 '13 at 14:01
up vote 2 down vote accepted

As written down, your code describes a motion with constant acceleration (see $a_k=a_{k-1}$), so the trajectory will simply be a quadratic function (parabola).

Every moment $dt$, the velocity changes by the obvious amount, $dt\cdot a$. The same is true for position which changes by $dt\cdot v$ but there is an extra piece $a/2\cdot dt^2$ in the change of the position. This term is infinitely smaller than the main term, $dt\cdot v$, and if $dt$ is short enough, you may neglect it.

However, if you include it, you get a higher accuracy of the simulation even if $dt$ isn't too small. Why? Because the change of the position $p$ during the time $dt$ is calculated as $dt$ times the average velocity in this short time interval. And because the velocity is changing approximately linearly, the average velocity is $$ \overline v = \frac{v(t)+v(t+dt)}{2} = \frac{v(t)+v(t)+a(t)dt}{2} = v(t)+\frac{a(t)dt}{2} $$ If you multiply this $\overline v$ by $dt$, you get the change of the position $p$ as incorporated to your first equation.

share|cite|improve this answer
So with that part you basically compensate for the error that is produced by averaged velocity? – Primož Kralj Sep 3 '12 at 7:23
With that part, we change the position by $dt\cdot \overline v$ where $\overline v$ is the average velocity over the following interval $dt$, while if we had omitted the extra term, we would be using the initial velocity of the interval, one which will be somewhat inaccurate at the end of the interval. – Luboš Motl Sep 3 '12 at 7:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.