0
votes

I want to find out, what is the maximum speed that I can be walking and be able to brake by reaching displacement 0 with speed 0.
I need an equation that works with discrete time.

How am I updating and moving the body?
First, the speed is updated
Second, the position is updated: NewPosition = LastPosition + Velocity

Thus, for example, a table of expected results follows:

MaxStoppableVelocity ( Displacement = 0m, Deceleration = -2m/s² ) should be 2m/s  
MaxStoppableVelocity ( Displacement = 1m, Deceleration = -2m/s² ) should be 3m/s  
MaxStoppableVelocity ( Displacement = 2m, Deceleration = -2m/s² ) should be 4m/s  
MaxStoppableVelocity ( Displacement = 3m, Deceleration = -2m/s² ) should be 4.5m/s  
MaxStoppableVelocity ( Displacement = 4m, Deceleration = -2m/s² ) should be 5m/s  
MaxStoppableVelocity ( Displacement = 5m, Deceleration = -2m/s² ) should be 5.5m/s  
MaxStoppableVelocity ( Displacement = 6m, Deceleration = -2m/s² ) should be 6m/s  
MaxStoppableVelocity ( Displacement = 7m, Deceleration = -2m/s² ) should be 6.33m/s  
MaxStoppableVelocity ( Displacement = 8m, Deceleration = -2m/s² ) should be 6.66m/s  
MaxStoppableVelocity ( Displacement = 9m, Deceleration = -2m/s² ) should be 7m/s  
MaxStoppableVelocity ( Displacement = 10m, Deceleration = -2m/s² ) should be 7.33m/s  
MaxStoppableVelocity ( Displacement = 11m, Deceleration = -2m/s² ) should be 7.66m/s  
MaxStoppableVelocity ( Displacement = 12m, Deceleration = -2m/s² ) should be 8m/s  
MaxStoppableVelocity ( Displacement = 13m, Deceleration = -2m/s² ) should be 8.25m/s  
MaxStoppableVelocity ( Displacement = 14m, Deceleration = -2m/s² ) should be 8.5m/s  
MaxStoppableVelocity ( Displacement = 15m, Deceleration = -2m/s² ) should be 8.75m/s  
MaxStoppableVelocity ( Displacement = 16m, Deceleration = -2m/s² ) should be 9m/s  
MaxStoppableVelocity ( Displacement = 17m, Deceleration = -2m/s² ) should be 9.25m/s  
MaxStoppableVelocity ( Displacement = 18m, Deceleration = -2m/s² ) should be 9.5m/s  
MaxStoppableVelocity ( Displacement = 19m, Deceleration = -2m/s² ) should be 9.75m/s  
MaxStoppableVelocity ( Displacement = 20m, Deceleration = -2m/s² ) should be 10m/s

All of this data in the table was tested using a simulation I did, but I want to find an equation that gives me these values.

Remembering that the time of my simulation is discrete, so equations of continuous time will not work.

Let me know if you have any questions, thanks in advance

1

1 Answers

0
votes

Let's consider the problem reversed in time.

Assume you have dt - time step of your simulation and it is constant. Assume the total number of iterations is N. Assume the current iteration is i. A - acceleration, D - displacement, V - speed

Thus

V[i] = (i+1) * A * dt
D[N] = D = SUM (V[i] * dt) From i = 0 To N-1
D = (N-1)^2 / 2 * dt^2 * A
N = sqrt(2* D / A) / dt + 1

But N - 1 is an integer number, thus rounding

N = floor(sqrt(2D/A)/dt + 1)

So

V = floor(sqrt(2D/A)/dt + 1) * A * dt 

If you don't know the value of dt, you can find it from your example