How do I calculate the maximum velocity, acceleration, and jerk reached by an object that moves a given distance in the minimum time?

516 Views Asked by At

I am exploring the math of linear motion. Consider an object that starts stationary at the origin, moves to some displacement $d_{max}$ from the origin, and then stops. Constraints on the object's motion are

  • a maximum allowed velocity $v_{max}$ (first derivative of displacement),
  • a maximum allowed acceleration $a_{max}$ (second derivative of displacement),
  • a maximum allowed jerk $j_{max}$ (third derivative of displacement),
  • a maximum allowed snap $s_{max}$ (fourth derivative of displacement),
  • the functions $d(t)$, $v(t)$, $a(t)$, $j(t)$, and $s(t)$ are piecewise polynomials,
  • the functions $d(t)$, $v(t)$, $a(t)$, and $j(t)$ are continuous, and
  • the time taken to reach $d_{max}$ is minimized

giving four degrees of smoothness to the motion (that is, the graphs of displacement-over-time, velocity-over-time, acceleration-over-time, and jerk-over-time are continuous, but the graph of snap-over-time is discontinuous).

Let us define the following variables to make future equations more compact:

  • $A = \frac{j_{max}}{s_{max}}$
  • $B = \frac{a_{max}}{j_{max}}$
  • $C = \frac{a_{max}}{j_{max}} + \frac{j_{max}}{s_{max}}$
  • $D = \frac{v_{max}}{a_{max}}$
  • $E = \frac{v_{max}}{a_{max}} + \frac{j_{max}}{s_{max}}$
  • $F = \frac{v_{max}}{a_{max}} + \frac{a_{max}}{j_{max}}$
  • $G = \frac{v_{max}}{a_{max}} + \frac{a_{max}}{j_{max}} + \frac{j_{max}}{s_{max}}$
  • $H = \frac{d_{max}}{v_{max}}$
  • $I = \frac{d_{max}}{v_{max}} + \frac{j_{max}}{s_{max}}$
  • $J = \frac{d_{max}}{v_{max}} + \frac{a_{max}}{j_{max}}$
  • $K = \frac{d_{max}}{v_{max}} + \frac{a_{max}}{j_{max}} + \frac{j_{max}}{s_{max}}$
  • $L = \frac{d_{max}}{v_{max}} + \frac{v_{max}}{a_{max}}$
  • $M = \frac{d_{max}}{v_{max}} + \frac{v_{max}}{a_{max}} + \frac{j_{max}}{s_{max}}$
  • $N = \frac{d_{max}}{v_{max}} + \frac{v_{max}}{a_{max}} + \frac{a_{max}}{j_{max}}$
  • $O = \frac{d_{max}}{v_{max}} + \frac{v_{max}}{a_{max}} + \frac{a_{max}}{j_{max}} + \frac{j_{max}}{s_{max}}$

For the same reason, let us define the following functions:

  • $f_A(n) = \frac{1}{n!} × (A^n)$
  • $f_B(n) = \frac{1}{n!} × (B^n - (B - A)^n)$
  • $f_C(n) = \frac{1}{n!} × (C^n - (C - A)^n - (C - B)^n)$
  • $f_D(n) = \frac{1}{n!} × (D^n - (D - A)^n - (D - B)^n + (D - C)^n)$
  • $f_E(n) = \frac{1}{n!} × (E^n - (E - A)^n - (E - B)^n + (E - C)^n - (E - D)^n)$
  • $f_F(n) = \frac{1}{n!} × (F^n - (F - A)^n - (F - B)^n + (F - C)^n - (F - D)^n + (F - E)^n)$
  • $f_G(n) = \frac{1}{n!} × (G^n - (G - A)^n - (G - B)^n + (G - C)^n - (G - D)^n + (G - E)^n + (G - F)^n)$
  • $f_H(n) = \frac{1}{n!} × (H^n - (H - A)^n - (H - B)^n + (H - C)^n - (H - D)^n + (H - E)^n + (H - F)^n - (H - G)^n)$
  • $f_I(n) = \frac{1}{n!} × (I^n - (I - A)^n - (I - B)^n + (I - C)^n - (I - D)^n + (I - E)^n + (I - F)^n - (I - G)^n - (I - H)^n)$
  • $f_J(n) = \frac{1}{n!} × (J^n - (J - A)^n - (J - B)^n + (J - C)^n - (J - D)^n + (J - E)^n + (J - F)^n - (J - G)^n - (J - H)^n + (J - I)^n)$
  • $f_K(n) = \frac{1}{n!} × (K^n - (K - A)^n - (K - B)^n + (K - C)^n - (K - D)^n + (K - E)^n + (K - F)^n - (K - G)^n - (K - H)^n + (K - I)^n + (K - J)^n)$
  • $f_L(n) = \frac{1}{n!} × (L^n - (L - A)^n - (L - B)^n + (L - C)^n - (L - D)^n + (L - E)^n + (L - F)^n - (L - G)^n - (L - H)^n + (L - I)^n + (L - J)^n - (L - K)^n)$
  • $f_M(n) = \frac{1}{n!} × (M^n - (M - A)^n - (M - B)^n + (M - C)^n - (M - D)^n + (M - E)^n + (M - F)^n - (M - G)^n - (M - H)^n + (M - I)^n + (M - J)^n - (M - K)^n + (M - L)^n)$
  • $f_N(n) = \frac{1}{n!} × (N^n - (N - A)^n - (N - B)^n + (N - C)^n - (N - D)^n + (N - E)^n + (N - F)^n - (N - G)^n - (N - H)^n + (N - I)^n + (N - J)^n - (N - K)^n + (N - L)^n - (N - M)^n)$
  • $f_O(n) = \frac{1}{n!} × (O^n - (O - A)^n - (O - B)^n + (O - C)^n - (O - D)^n + (O - E)^n + (O - F)^n - (O - G)^n - (O - H)^n + (O - I)^n + (O - J)^n - (O - K)^n + (O - L)^n - (O - M)^n - (O - N)^n)$

With these variables and functions, we can write the piecewise polynomial equations for $s(t)$, $j(t)$, $a(t)$, $v(t)$, and $d(t)$:

$$ s_{4}(t) = s_{max}\,×\,\begin{cases} 0 & : -∞ < t < 0 \\ f_A(0) & : 0 ≤ t < A \\ f_B(0) & : A ≤ t < B \\ f_C(0) & : B ≤ t < C \\ f_D(0) & : C ≤ t < D \\ f_E(0) & : D ≤ t < E \\ f_F(0) & : E ≤ t < F \\ f_G(0) & : F ≤ t < G \\ f_H(0) & : G ≤ t < H \\ f_I(0) & : H ≤ t < I \\ f_J(0) & : I ≤ t < J \\ f_K(0) & : J ≤ t < K \\ f_L(0) & : K ≤ t < L \\ f_M(0) & : L ≤ t < M \\ f_N(0) & : M ≤ t < N \\ f_O(0) & : N ≤ t < O \\ 0 & : O ≤ t < ∞ \\ \end{cases} $$

Graph of snap over time

$$ j_{4}(t) = s_{max}\,×\,\begin{cases} 0 & : -∞ < t < 0 \\ f_A(0) × (t - A) + f_A(1) & : 0 ≤ t < A \\ f_B(0) × (t - B) + f_B(1) & : A ≤ t < B \\ f_C(0) × (t - C) + f_C(1) & : B ≤ t < C \\ f_D(0) × (t - D) + f_D(1) & : C ≤ t < D \\ f_E(0) × (t - E) + f_E(1) & : D ≤ t < E \\ f_F(0) × (t - F) + f_F(1) & : E ≤ t < F \\ f_G(0) × (t - G) + f_G(1) & : F ≤ t < G \\ f_H(0) × (t - H) + f_H(1) & : G ≤ t < H \\ f_I(0) × (t - I) + f_I(1) & : H ≤ t < I \\ f_J(0) × (t - J) + f_J(1) & : I ≤ t < J \\ f_K(0) × (t - K) + f_K(1) & : J ≤ t < K \\ f_L(0) × (t - L) + f_L(1) & : K ≤ t < L \\ f_M(0) × (t - M) + f_M(1) & : L ≤ t < M \\ f_N(0) × (t - N) + f_N(1) & : M ≤ t < N \\ f_O(0) × (t - O) + f_O(1) & : N ≤ t < O \\ 0 & : O ≤ t < ∞ \\ \end{cases} $$

Graph of jerk over time

$$ a_{4}(t) = s_{max}\,×\,\begin{cases} 0 & : -∞ < t < 0 \\ f_A(0) × \frac{(t - A)^2}{2} + f_A(1) × (t - A) + f_A(2) & : 0 ≤ t < A \\ f_B(0) × \frac{(t - B)^2}{2} + f_B(1) × (t - B) + f_B(2) & : A ≤ t < B \\ f_C(0) × \frac{(t - C)^2}{2} + f_C(1) × (t - C) + f_C(2) & : B ≤ t < C \\ f_D(0) × \frac{(t - D)^2}{2} + f_D(1) × (t - D) + f_D(2) & : C ≤ t < D \\ f_E(0) × \frac{(t - E)^2}{2} + f_E(1) × (t - E) + f_E(2) & : D ≤ t < E \\ f_F(0) × \frac{(t - F)^2}{2} + f_F(1) × (t - F) + f_F(2) & : E ≤ t < F \\ f_G(0) × \frac{(t - G)^2}{2} + f_G(1) × (t - G) + f_G(2) & : F ≤ t < G \\ f_H(0) × \frac{(t - H)^2}{2} + f_H(1) × (t - H) + f_H(2) & : G ≤ t < H \\ f_I(0) × \frac{(t - I)^2}{2} + f_I(1) × (t - I) + f_I(2) & : H ≤ t < I \\ f_J(0) × \frac{(t - J)^2}{2} + f_J(1) × (t - J) + f_J(2) & : I ≤ t < J \\ f_K(0) × \frac{(t - K)^2}{2} + f_K(1) × (t - K) + f_K(2) & : J ≤ t < K \\ f_L(0) × \frac{(t - L)^2}{2} + f_L(1) × (t - L) + f_L(2) & : K ≤ t < L \\ f_M(0) × \frac{(t - M)^2}{2} + f_M(1) × (t - M) + f_M(2) & : L ≤ t < M \\ f_N(0) × \frac{(t - N)^2}{2} + f_N(1) × (t - N) + f_N(2) & : M ≤ t < N \\ f_O(0) × \frac{(t - O)^2}{2} + f_O(1) × (t - O) + f_O(2) & : N ≤ t < O \\ 0 & : O ≤ t < ∞ \\ \end{cases} $$

Graph of acceleration over time

$$ v_{4}(t) = s_{max}\,×\,\begin{cases} 0 & : -∞ < t < 0 \\ f_A(0) × \frac{(t - A)^3}{6} + f_A(1) × \frac{(t - A)^2}{2} + f_A(2) × (t - A) + f_A(3) & : 0 ≤ t < A \\ f_B(0) × \frac{(t - B)^3}{6} + f_B(1) × \frac{(t - B)^2}{2} + f_B(2) × (t - B) + f_B(3) & : A ≤ t < B \\ f_C(0) × \frac{(t - C)^3}{6} + f_C(1) × \frac{(t - C)^2}{2} + f_C(2) × (t - C) + f_C(3) & : B ≤ t < C \\ f_D(0) × \frac{(t - D)^3}{6} + f_D(1) × \frac{(t - D)^2}{2} + f_D(2) × (t - D) + f_D(3) & : C ≤ t < D \\ f_E(0) × \frac{(t - E)^3}{6} + f_E(1) × \frac{(t - E)^2}{2} + f_E(2) × (t - E) + f_E(3) & : D ≤ t < E \\ f_F(0) × \frac{(t - F)^3}{6} + f_F(1) × \frac{(t - F)^2}{2} + f_F(2) × (t - F) + f_F(3) & : E ≤ t < F \\ f_G(0) × \frac{(t - G)^3}{6} + f_G(1) × \frac{(t - G)^2}{2} + f_G(2) × (t - G) + f_G(3) & : F ≤ t < G \\ f_H(0) × \frac{(t - H)^3}{6} + f_H(1) × \frac{(t - H)^2}{2} + f_H(2) × (t - H) + f_H(3) & : G ≤ t < H \\ f_I(0) × \frac{(t - I)^3}{6} + f_I(1) × \frac{(t - I)^2}{2} + f_I(2) × (t - I) + f_I(3) & : H ≤ t < I \\ f_J(0) × \frac{(t - J)^3}{6} + f_J(1) × \frac{(t - J)^2}{2} + f_J(2) × (t - J) + f_J(3) & : I ≤ t < J \\ f_K(0) × \frac{(t - K)^3}{6} + f_K(1) × \frac{(t - K)^2}{2} + f_K(2) × (t - K) + f_K(3) & : J ≤ t < K \\ f_L(0) × \frac{(t - L)^3}{6} + f_L(1) × \frac{(t - L)^2}{2} + f_L(2) × (t - L) + f_L(3) & : K ≤ t < L \\ f_M(0) × \frac{(t - M)^3}{6} + f_M(1) × \frac{(t - M)^2}{2} + f_M(2) × (t - M) + f_M(3) & : L ≤ t < M \\ f_N(0) × \frac{(t - N)^3}{6} + f_N(1) × \frac{(t - N)^2}{2} + f_N(2) × (t - N) + f_N(3) & : M ≤ t < N \\ f_O(0) × \frac{(t - O)^3}{6} + f_O(1) × \frac{(t - O)^2}{2} + f_O(2) × (t - O) + f_O(3) & : N ≤ t < O \\ 0 & : O ≤ t < ∞ \\ \end{cases} $$

Graph of velocity over time

$$ d_{4}(t) = s_{max}\,×\,\begin{cases} 0 & : -∞ < t < 0 \\ f_A(0) × \frac{(t - A)^4}{24} + f_A(1) × \frac{(t - A)^3}{6} + f_A(2) × \frac{(t - A)^2}{2} + f_A(3) × (t - A) + f_A(4) & : 0 ≤ t < A \\ f_B(0) × \frac{(t - B)^4}{24} + f_B(1) × \frac{(t - B)^3}{6} + f_B(2) × \frac{(t - B)^2}{2} + f_B(3) × (t - B) + f_B(4) & : A ≤ t < B \\ f_C(0) × \frac{(t - C)^4}{24} + f_C(1) × \frac{(t - C)^3}{6} + f_C(2) × \frac{(t - C)^2}{2} + f_C(3) × (t - C) + f_C(4) & : B ≤ t < C \\ f_D(0) × \frac{(t - D)^4}{24} + f_D(1) × \frac{(t - D)^3}{6} + f_D(2) × \frac{(t - D)^2}{2} + f_D(3) × (t - D) + f_D(4) & : C ≤ t < D \\ f_E(0) × \frac{(t - E)^4}{24} + f_E(1) × \frac{(t - E)^3}{6} + f_E(2) × \frac{(t - E)^2}{2} + f_E(3) × (t - E) + f_E(4) & : D ≤ t < E \\ f_F(0) × \frac{(t - F)^4}{24} + f_F(1) × \frac{(t - F)^3}{6} + f_F(2) × \frac{(t - F)^2}{2} + f_F(3) × (t - F) + f_F(4) & : E ≤ t < F \\ f_G(0) × \frac{(t - G)^4}{24} + f_G(1) × \frac{(t - G)^3}{6} + f_G(2) × \frac{(t - G)^2}{2} + f_G(3) × (t - G) + f_G(4) & : F ≤ t < G \\ f_H(0) × \frac{(t - H)^4}{24} + f_H(1) × \frac{(t - H)^3}{6} + f_H(2) × \frac{(t - H)^2}{2} + f_H(3) × (t - H) + f_H(4) & : G ≤ t < H \\ f_I(0) × \frac{(t - I)^4}{24} + f_I(1) × \frac{(t - I)^3}{6} + f_I(2) × \frac{(t - I)^2}{2} + f_I(3) × (t - I) + f_I(4) & : H ≤ t < I \\ f_J(0) × \frac{(t - J)^4}{24} + f_J(1) × \frac{(t - J)^3}{6} + f_J(2) × \frac{(t - J)^2}{2} + f_J(3) × (t - J) + f_J(4) & : I ≤ t < J \\ f_K(0) × \frac{(t - K)^4}{24} + f_K(1) × \frac{(t - K)^3}{6} + f_K(2) × \frac{(t - K)^2}{2} + f_K(3) × (t - K) + f_K(4) & : J ≤ t < K \\ f_L(0) × \frac{(t - L)^4}{24} + f_L(1) × \frac{(t - L)^3}{6} + f_L(2) × \frac{(t - L)^2}{2} + f_L(3) × (t - L) + f_L(4) & : K ≤ t < L \\ f_M(0) × \frac{(t - M)^4}{24} + f_M(1) × \frac{(t - M)^3}{6} + f_M(2) × \frac{(t - M)^2}{2} + f_M(3) × (t - M) + f_M(4) & : L ≤ t < M \\ f_N(0) × \frac{(t - N)^4}{24} + f_N(1) × \frac{(t - N)^3}{6} + f_N(2) × \frac{(t - N)^2}{2} + f_N(3) × (t - N) + f_N(4) & : M ≤ t < N \\ f_O(0) × \frac{(t - O)^4}{24} + f_O(1) × \frac{(t - O)^3}{6} + f_O(2) × \frac{(t - O)^2}{2} + f_O(3) × (t - O) + f_O(4) & : N ≤ t < O \\ \frac{d_{max}}{s_{max}} & : O ≤ t < ∞ \end{cases} $$

Graph of displacement over time

But there's a problem: there are combinations of the variables $d_{max}$, $v_{max}$, $a_{max}$, $j_{max}$, and $s_{max}$ where, for example, the distance to be covered does not provide enough space to reach the maximum allowed velocity before acceleration must reverse in order to come to a smooth stop at the target displacement, or the maximum allowed velocity does not provide enough room for the maximum allowed acceleration to be reached before jerk must reverse in order to have a smooth transition into the coasting (or deceleration) phase of the object's motion. In these cases, applying the equations given above results in jump discontinuities in the graphs.

Therefore, I want to replace the variables $v_{max}$, $a_{max}$, and $j_{max}$ in the capital-letter-variables with new variables $v_{limit}$ as a practical limit on velocity, $a_{limit}$ as a practical limit on acceleration, and $j_{limit}$ as a practical limit on jerk, respectively.

The problem I have is deriving values for these new variables. Playing around with the values of $d_{max}$, $v_{max}$, $a_{max}$, $j_{max}$, and $s_{max}$, it seems as though the practical-limit values are all interdependent, such that attempting to define them requires circular logic — the definition of $a_{limit}$ depends on the definition of $j_{limit}$ which itself depends on $a_{limit}$, so I ultimately get nowhere. I feel like I'm missing something that will make it all fall into place, but I can't figure it out.

Online GeoGebra File To Play Around In

https://www.geogebra.org/m/c9mkpmk4

More Context, And Some Animated Graphs

If we have an idealized object that starts stationary at the origin, moves to some displacement $d_{max}$ from the origin, and then becomes stationary again, the simplest description of the displacement over time would be a two-part piecewise equation:

$$ d_0(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ d_{max} & : 0 ≤ t < ∞ \\ \end{cases} $$

Animated GIF showing the function of displacement over time as the maximum-displacement value varies from one to five.

This is a discontinuous function with zero degrees of smoothness, where the object we are tracking has infinite velocity over zero time (as velocity is the derivative of displacement).

That isn't how real objects move, effectively being teleportation, so we could add a constraint that the object starts and ends its motion with zero velocity and in between has some finite maximum velocity $v_{max}$. Then the velocity and displacement over time can be represented as:

$$v_1(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ v_{max} & : 0 ≤ t < \frac{d_{max}}{v_{max}} \\ 0 & : \frac{d_{max}}{v_{max}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of velocity over time as the maximum-velocity value varies from one to five, with a maximum-displacement value of four.

$$d_1(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ v_{max} × t & : 0 ≤ t < \frac{d_{max}}{v_{max}} \\ d_{max} & : \frac{d_{max}}{v_{max}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of displacement over time as the maximum-velocity value varies from one to five, with a maximum-displacement value of four.

Now the displacement function is continuous, while the velocity function is not. The object's motion has one degree of smoothness.

Of course, in real life things don't get up to full speed or come to a stop instantly, either of which would mean infinite acceleration over zero time (as acceleration is the derivative of velocity and the second derivative of displacement). We can give our object a finite maximum acceleration $a_{max}$ and describe its motion with three piecewise equations:

$$a_2(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ a_{max} & : 0 ≤ t < \frac{v_{max}}{a_{max}} \\ 0 & : \frac{v_{max}}{a_{max}} ≤ t < \frac{v_{max}}{a_{max}} \\ −a_{max} & : \frac{d_{max}}{v_{max}} ≤ t < \frac{v_{max}}{a_{max}} + \frac{d_{max}}{v_{max}} \\ 0 & : \frac{v_{max}}{a_{max}} + \frac{d_{max}}{v_{max}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of acceleration over time as the maximum-acceleration value varies from one to five, with a maximum-displacement value of four and a maximum-velocity value of two.

$$v_2(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ a_{max} × t & : 0 ≤ t < \frac{v_{max}}{a_{max}} \\ v_{max} & : \frac{v_{max}}{a_{max}} ≤ t < \frac{v_{max}}{a_{max}} \\ −a_{max} × t + v_{max} + \frac{a_{max} × d_{max}}{v_{max}} & : \frac{d_{max}}{v_{max}} ≤ t < \frac{v_{max}}{a_{max}} + \frac{d_{max}}{v_{max}} \\ 0 & : \frac{v_{max}}{a_{max}} + \frac{d_{max}}{v_{max}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of velocity over time as the maximum-acceleration value varies from one to five, with a maximum-displacement value of four and a maximum-velocity value of two.

$$d_2(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ \frac{a_{max}}{2} × t^2 & : 0 ≤ t < \frac{v_{max}}{a_{max}} \\ v_{max} × t & : \frac{v_{max}}{a_{max}} ≤ t < \frac{v_{max}}{a_{max}} \\ −\frac{a_{max}}{2} × \left(t − \frac{v_{max}}{a_{max}} − \frac{d_{max}}{v_{max}}\right)^2 + d_{max} & : \frac{d_{max}}{v_{max}} ≤ t < \frac{v_{max}}{a_{max}} + \frac{d_{max}}{v_{max}} \\ d_{max} & : \frac{v_{max}}{a_{max}} + \frac{d_{max}}{v_{max}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of displacement over time as the maximum-acceleration value varies from one to five, with a maximum-displacement value of four and a maximum-velocity value of two.

Now the displacement and velocity functions are continuous, while the acceleration function is not. The object's motion has two degrees of smoothness.

But there's a catch: for certain ranges of values for maximum displacement and acceleration, there isn't enough time for the object to reach the full speed allowed by the maximum velocity value. Applying the equations above under those conditions results in jump discontinuities in the velocity and displacement functions:

Still image showing a jump discontinuity in the displacement-over-time function with maximum-acceleration value of one, maximum-velocity value of two, and maximum-displacement value of three.

To solve this problem, we need to replace all instances of $v_{max}$ in the equations with a new variable $v_{limit,2} = \operatorname{Min}(v_{max}, \sqrt{d_{max} × a_{max}})$, where the function $\operatorname{Min}(n_1, n_2, ... n_k)$ returns the input with the lowest value.

With this replacement made, the displacement and velocity functions remain continuous even when there isn't sufficient time or distance to get up to the full allowed velocity.

Still image showing the same displacement-over-time function with maximum-acceleration value of one, maximum-velocity value of two, and maximum-displacement value of three, but this time with the jump discontinuity removed by placing a limit on the velocity.

We can get the next degree of smoothness by adding a maximum value for jerk (the derivative of acceleration and the third derivative of displacement), $j_{max}$. This time we also need two new variables, $a_{limit,3}$ (which I think is the same as $v_{limit,2}$ only with all parts shifted down one level in the order of derivatives) and $v_{limit,3}$ (which I haven't been able to figure out).

The object's motion can be described with four piecewise equations:

$$j_3(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ j_{max} & : 0 ≤ t < \frac{a_{limit,3}}{j_{max}} \\ 0 & : \frac{a_{limit,3}}{j_{max}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} \\ −j_{max} & : \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} \\ 0 & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{d_{max}}{v_{limit,3}} \\ −j_{max} & : \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} \\ 0 & : \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ j_{max} & : \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ 0 & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of jerk over time as the maximum-jerk value varies from one to five.

$$a_3(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ j_{max} × t & : 0 ≤ t < \frac{a_{limit,3}}{j_{max}} \\ a_{limit,3} & : \frac{a_{limit,3}}{j_{max}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} \\ −j_{max} × t + a_{limit,3} + \frac{j_{max} × v_{limit,3}}{a_{limit,3}} & : \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} \\ 0 & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{d_{max}}{v_{limit,3}} \\ −j_{max} × t + \frac{j_{max} × d_{max}}{v_{limit,3}} & : \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} \\ −a_{limit,3} & : \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ j_{max} × t − a_{limit,3} − \frac{j_{max} × v_{limit,3}}{a_{limit,3}} − \frac{j_{max} × d_{max}}{v_{limit,3}} & : \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ 0 & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of acceleration over time as the maximum-jerk value varies from one to five.

$$v_3(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ \frac{j_{max}}{2} × t^2 & : 0 ≤ t < \frac{a_{limit,3}}{j_{max}} \\ a_{limit,3} × t − \frac{j_{max}}{2} × \left(\frac{a_{limit,3}}{j_{max}}\right)^2 & : \frac{a_{limit,3}}{j_{max}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} \\ \frac{−j_{max}}{2} × \left(t − \frac{a_{limit,3}}{j_{max}} − \frac{v_{limit,3}}{a_{limit,3}}\right)^2 + v_{limit,3} & : \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} \\ v_{limit,3} & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{d_{max}}{v_{limit,3}} \\ \frac{−j_{max}}{2} × \left(t − \frac{d_{max}}{v_{limit,3}}\right)^2 + v_{limit,3} & : \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} \\ −a_{limit,3} × \left(t − \frac{v_{limit,3}}{a_{limit,3}} − \frac{d_{max}}{v_{limit,3}}\right) + \frac{j_{max}}{2} × \left(\frac{a_{limit,3}}{j_{max}}\right)^2 & : \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ \frac{j_{max}}{2} × \left(t − \frac{a_{limit,3}}{j_{max}} − \frac{v_{limit,3}}{a_{limit,3}} − \frac{d_{max}}{v_{limit,3}}\right)^2 & : \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ 0 & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of velocity over time as the maximum-jerk value varies from one to five.

$$d_3(t)\,=\,\begin{cases} 0 & : −∞ ≤ t < 0 \\ \frac{j_{max}}{6} × t^3 & : 0 ≤ t < \frac{a_{limit,3}}{j_{max}} \\ \frac{a_{limit,3}}{2} × \left(t − \frac{a_{limit,3}}{j_{max}}\right)^2 + \left(\frac{2 a_{limit,3}}{j_{max}}\right)^2 × \left(t − \frac{2}{3} \frac{a_{limit,3}}{j_{max}}\right) & : \frac{a_{limit,3}}{j_{max}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} \\ \frac{−j_{max}}{6} × \left(t − \frac{a_{limit,3}}{j_{max}} − \frac{v_{limit,3}}{a_{limit,3}}\right)^3 + v_{limit,3} \left(t - \frac{1}{2} × \left(\frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}}\right)\right) & : \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} \\ v_{limit,3} × \left(t − \frac{1}{2} × \left(\frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}}\right)\right) & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} ≤ t < \frac{d_{max}}{v_{limit,3}} \\ \frac{−j_{max}}{6} × \left(t − \frac{d_{max}}{v_{limit,3}}\right)^3 + v_{limit,3} × \left(t − \frac{1}{2} × \left(\frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}}\right)\right) & : \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} \\ \frac{−a_{limit,3}}{2} × \left(t − \frac{v_{limit,3}}{a_{limit,3}} − \frac{d_{max}}{v_{limit,3}}\right)^2 + \frac{j_{max}}{2} × \left(\frac{a_{limit,3}}{j_{max}}\right)^2 × \left(t − \frac{1}{3} × \frac{a_{limit,3}}{j_{max}} + 2 × \frac{d_{max}}{a_{limit,3}} × \frac{j_{max}}{a_{limit,3}} − \frac{v_{limit,3}}{a_{limit,3}} − \frac{d_{max}}{v_{limit,3}}\right) & : \frac{a_{limit,3}}{j_{max}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ \frac{j_{max}}{6} × \left(t − \frac{a_{limit,3}}{j_{max}} − \frac{v_{limit,3}}{a_{limit,3}} − \frac{d_{max}}{v_{limit,3}}\right)^3 + d_{max} & : \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} \\ d_{max} & : \frac{a_{limit,3}}{j_{max}} + \frac{v_{limit,3}}{a_{limit,3}} + \frac{d_{max}}{v_{limit,3}} ≤ t < ∞ \\ \end{cases}$$

Animated GIF showing the function of displacement over time as the maximum-jerk value varies from one to five.

Going for one more degree of smoothness by adding a maximum value for snap (the derivative of jerk and the fourth derivative of displacement), $s_{max}$, brings us to the main focus of this question.

I want to know how to derive the limiting values for velocity in the three-smooth case and for velocity, acceleration, and jerk in the four-smooth case.

1

There are 1 best solutions below

5
On

If you assume that your trajectory can be periodic, then you can use Fourier series to look at the question. More specifically, let's say that $x(t)$ is your position, with the following constraints: $|x|\le a_0$, $|x'|\le a_1$, $|x''|\le a_2$, and $|x'''|\le a_3$, where the $a_i$ are constants. In this situation, you could start at rest at $x(0)=a_0$ and stop at $x(\frac12T)=-a_0$ and then do the same path backward, etc. The period of your path is $T$.

Then you have $x(t)=\sum_{n=0}^\infty A_n\cos(n\omega t)$, where $\omega$ is a constant that depends on $T$ and the $A_n$ need to be determined according to your constraints. You can then prove that: \begin{align} a_0&=\sum_nA_n\\ a_2&=\sum_nn^2\omega^2A_n \end{align}

For $a_1$ and $a_3$, you need to work with sinus sums so it's a bit more difficult to get a closed form. However, by symmetry arguments, we can notice that the full path will happen for $t=\frac{2\pi}\omega$, which means that the maximum of speed and jerk must happen at one quarter of this, so at $t=\frac\pi{2\omega}$. That gives us: \begin{align} a_1=&\sum_{n\;\mathrm{odd}}(-1)^\frac{n+1}2n\omega A_n\\ a_3=&\sum_{n\;\mathrm{odd}}(-1)^\frac{n+1}2n^3\omega^3 A_n\\ \end{align}