Strange case in finding acceleration

  • Context: Undergrad 
  • Thread starter Thread starter tungle
  • Start date Start date
  • Tags Tags
    Acceleration Strange
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 2K views
tungle
Messages
2
Reaction score
0
"Strange" case in finding acceleration

Hello there, looks like a fantastic forum here. I got a problem popped up during my work, hope you can help me out.

I have a car:
- at a distance D away from destination
- current velocity V0
- time to go t : the time period I want the car to spend until reaching destination
I discretize time into seconds. At every every second, I want to find suitable acceleration (or deceleration) so that it can arrive at destination at t.

I apply this equation
D = V0 t + (1/2)at^2

(Given the equation is applied for constant-change in velocity, reapplying it every second yields some error, but it's minor thing)

I came up with something strange:
If t is sufficiently small, then the car arrives exactly at t once. (case 1)

If I set t too high, the car arrives at the destination early (much less than t), go past destination for some time, then go backwards
to reach destination at given t. (case 2)


My question: is there any constraint for t to always yield case 1, preventing case 2 happening.

To be specific, I put an example in the spreadsheet here:
https://spreadsheets.google.com/spr...TGYzRHB1V1RWVjc3ZEE&hl=en_US&authkey=CIyymf8E

Table 2 is where the case 2 happened. Round-up error is ignored.

Thanks much
 
Physics news on Phys.org


D = V0 t + (1/2)at^2

You can solve this equation for a

The final velocity is

Vf = V0 + at

You want Vf >= 0, otherwise the car will pass the end point and then reverse back to it.

Eliminate a and you get an inequality connecting V0, D and t.

You should be able to see what the inequality means physically, in terms of the average speed of the car during the trip.

(Or if you don't like doing math, just think about what the average speed must be to make the final speed >= 0, and check your conclusion with your spreadsheet).
 


Hi,
tks for reply AlephZero.
I know Vf >=0 to make the car stop once. But solving equation
D = V0 t + (1/2)at^2
for a always yields one value, how can you set constraint on a, say if a got a value that violating the constraint, then what else value should it be?
 


You are dealing with numerical error. You can reduce the error by reducing the time step, or by using a different numerical integration method. It looks like you are using Euler Integration, http://en.wikipedia.org/wiki/Euler_method, which is simple but gives bad results. There are more advanced iteration schemes which give more accurate results and are more stable. You might want to try http://en.wikipedia.org/wiki/Leapfrog_integration which is almost as simple as Euler, but much better.
 
Last edited by a moderator: