Suppose we have the following code (Euler Method?) to determine Position versus Velocity, Acceleration and Time:
For Time := 1 to 10
Do begin
Velocity := Velocity + Acceleration;
Position := Position + Velocity;
We end up by overshooting Position.
From what I can see, the following code is the preferred way of determining the exact position in most motion controller:
For Time := 1 to 10
Do Begin
Velocity := Velocity + Acceleration;
Position := Position + Velocity + Acceleration/2;
However, when I run the code, I end up with an even larger overshoot. Have I implemented this incorrectly? Does this method have an official name? Why is it preferred to the Verlet method, which also gives exact position with a constant acceleration?
Any information on this method (VK = VK-1 + A; PK = PK-1 + VK-1 +A/2) would be greatly appreciated. I'm struggling to find anything online.