Given the following:

  • $A$ - maximum acceleration.
  • $J$ - constant jerk (the rate of change of acceleration).
  • $v$ - initial velocity.
  • $a$ - initial acceleration (where, in practice, $a ∈ [-A, A]$, however this is not a requirement for a solution).

How might one determine the shortest possible "stopping distance", i.e. the distance traveled at the end of which both velocity and acceleration simultaneously arrive at 0?

Edit: David kindly pointed out that "stopping distance" isn't the correct term here. Perhaps "arrival distance" is better suited? This is because I'm looking for a solution where, not only velocity reaches 0, but both velocity and acceleration reach 0.


So far, I've been using the following equation to solve this within my application:

$d = \frac{v^2}{2A} + \frac{vA}{2J}$

However, I realised that while this accounts for an initial velocity, it does not account for an initial acceleration and instead assumes 0. What I would really like to achieve is to solve distance for both an initial velocity $v$ and an initial acceleration $a$.

I also know that when $a=0$ and $v=0$, $d=0$.

The paper On-Line Planning of Time-Optimal, Jerk-Limited Trajectories by Haschke et al. hints at the complexity of this problem in the introduction:

While Kröger et al. [7] developed an online capable method to compute time- optimal trapezoidal velocity profiles from arbitrary initial conditions, Herrera and Sidobre [6] presented an approach to compute jerk-limited trajectories, but only zero initial acceleration conditions could be handled. To the best of our knowledge, a universal solution to compute time-optimal third-order trajectories with arbitrary initial conditions was not available till now, because the lack of symmetric zero boundary conditions enormously complicates the problem.

I plan to keep reading through this and report back with any useful findings.

I'll continue to update this section with edits showing my work in progress when I resume work tomorrow, if no-one beats me to it in the meantime.


I'm attempting to improve a motion profile for some linear actuators that are present in an art installation that I'm working on in a small team.

Previously, the linear actuator was driven using a constant acceleration selected by us. We could achieve fast movement nicely with high acceleration, and we could achieve slow movement nicely with slow acceleration, however slow movement with a high acceleration resulted in a lot of "chatter" from the motor. The idea is to apply a constant jerk rather than a constant acceleration to achieve smoother behaviour at both low and high speeds.

I think my implementation is nearing completion, however I've just noticed that my current arrival distance function (above) does not account for initial acceleration. As a result, the arrival distance appears accurate at high velocities, however is very inaccurate at low velocities with high acceleration. This error results in late deceleration, which results in overshooting, which in turn results in the motor eternally oscillating around the target position. I believe a proper solution for arrival distance will at least take us a step closer toward the behaviour we wish to achieve.

Any assistance/guidance is greatly appreciated!

  • 2
    $\begingroup$ Stopping distance corresponds to velocity=0. That does not necessarily mean that acceleration is also zero, as can be demonstrated when you throw an object straight up and note that at its highest point, its velocity is zero, but its acceleration is still $g$. Also, do you know integral calculus? $\endgroup$ – David White Feb 2 at 3:36
  • $\begingroup$ Ahh that makes sense. In retrospect, perhaps "arrival distance" might have been a better term for this case? For my particular application, I'm looking for the distance where both acceleration and velocity to reach 0 simultaneously. Re: knowing integral calculus - I wish! I've desired fluency on multiple occasions (implementing BPM curves for a DAW, implementing gradient descent and now for motor behaviour) though unfortunately haven't yet had the chance to sit down and gain a proper intuition for it between my sparse need for it once every couple of years in art installations. $\endgroup$ – mindTree Feb 2 at 13:48
  • 1
    $\begingroup$ Your lack of integral calculus experience is a problem. My tendency would be to integrate jerk 3 times to arrive at displacement, but explaining that solution would be a challenge. $\endgroup$ – David White Feb 2 at 19:58
  • $\begingroup$ You may have a problem that requires some process control. Can you post pictures of displacement vs. time, velocity vs. time, acceleration vs. time, and jerk vs time of your actual response and the response that you want? $\endgroup$ – David White Feb 2 at 20:03

Shall indicate the method to start with.

From Maclaurin Series we have the expansion of displacement in terms of its successive derivatives with initial values:

$$ d = d_i + u \frac{t}{1!} + a \frac{t^2}{2!} + j \frac{t^3}{3!} \; \tag 1 $$

Usual notation ( u,v) initial and final velocities ; (a,j) are acceleration and jerk. Time calculation is based on average assumption of start, end values of velocity as average:

$$\text {Time } t=\frac{v-u}{a}\tag2 $$

Eliminating $t$

$$ d = d_i+u \frac{\left(\frac{v-u}{a}\right)}{1!} + a \frac{\left(\frac{v-u}{a}\right)^2}{2!} + j \frac{\left(\frac{v-u}{a}\right) ^3}{3!} \; $$

which simplifies to

$$ d= di+\dfrac{(v-u)}{2a} [(v+u)+\dfrac{j}{3a^2} (v-u)^2] \tag3 $$

Special case of uniform acceleration $ (d_i=0, j=0)$ reduces to a familiar distance formula

$$ 2 a d = v^2- u^2 $$

enter image description here

In the above numerical example arbitrary stop (jerk, acceleration, velocity, distance) values are assumed and corresponding start values are calculated:

[(0.8,0.8),(-1.5,3.5),(-1,4.4),(-6.43768,3)]. Time T is 6 secs.

Maximum velocity occurs at

$$ t_1 = \dfrac{-a}{j}=\dfrac{1.5}{0.8} = 1.875 \tag 4$$

seconds. Maximum velocity can be evaluated. Net step is to plug it into the expression to cast v_max at start at any other desired instant of time.

Shall complete with the full answer soon.

  • $\begingroup$ How is $d=v_i t$? You don't have uniform motion. Or you just define some d this way? $\endgroup$ – nasu Feb 2 at 14:48
  • $\begingroup$ Thanks for taking the time @Narasimham. In your final solution for $d$, how should one handle the case where the result of $a_i^2 - 2 v_i j_i$ is less than 0, resulting in trying to find the square root of a negative number? Does this imply that the solution can be complex? If so, is it still possible to get the solution $d$ as a real number? $\endgroup$ – mindTree Feb 2 at 15:08
  • $\begingroup$ Please delete comments after update in my answer, for any new comments. Thanks. $\endgroup$ – Narasimham Feb 4 at 0:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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