Quick Background
We have five independent variables that can each be any real number greater than zero:
- $d_{max}$
- $v_{max}$
- $a_{max}$
- $j_{max}$
- $s_{max}$
These variables are linked to a chain of derivatives, starting with the function $d(t)$ and progressing through $d'(t) = v(t)$, $d''(t) = a(t)$, $d'''(t) = j(t)$, and $d''''(t) = s(t)$. The order is important and shows up later on.
We also have the function $\operatorname{Min}(n_1,\, n_2,\, …,\, n_k)$, which returns the input with the lowest value.
Finally, we have a number of sets of "limit" variables whose values are each based on combinations of the previously-defined variables in their set and on the global "max" variables.
Set 1 (0 elements)
Set 2 (1 element):
$$ v_{2,limit} = \operatorname{Min}\begin{pmatrix} v_{max}, \\ \sqrt{d_{max} × a_{max}} \end{pmatrix} $$
Set 3 (2 elements):
$$ a_{3,limit} = \operatorname{Min}\begin{pmatrix} a_{max}, \\ \sqrt{v_{max} × j_{max}}, \\ \sqrt[3]{d_{max} × \frac{j_{max}^2}{2}} \end{pmatrix} $$
$$ v_{3,limit} = \operatorname{Min}\begin{pmatrix} v_{max}, \\ \sqrt{d_{max} × a_{3,limit} + \frac{a_{3,limit}^4}{4 × j_{max}^2}} - \frac{a_{3,limit}^2}{2 × j_{max}} \end{pmatrix} $$
Set 4 (3 elements):
$$ j_{4,limit}\,=\,{\operatorname{Min}\begin{pmatrix} j_{max},\\ \sqrt{a_{max} × s_{max}},\\ \sqrt[3]{v_{max} × \frac{s_{max}^2}{2}},\\ \sqrt[4]{d_{max} × \frac{s_{max}^3}{6}} \end{pmatrix}} $$
$$ a_{4,limit}\,=\,{\operatorname{Min}\begin{pmatrix} a_{max},\\ \sqrt{v_{max} × j_{4,limit} + \frac{j_{4,limit}^4}{4 × s_{max}^2}} - \frac{j_{4,limit}^2}{2 × s_{max}},\\ \sqrt[3]{\frac{d_{max} × j_{4,limit}^2}{4} + \sqrt{\frac{d_{max}^2 × j_{4,limit}^4}{16} - \frac{j_{4,limit}^{12}}{1728 × s_{max}^6}}} + \\ \sqrt[3]{\frac{d_{max} × j_{4,limit}^2}{4} - \sqrt{\frac{d_{max}^2 × j_{4,limit}^4}{16} - \frac{j_{4,limit}^{12}}{1728 × s_{max}^6}}} - \frac{j_{4,limit}^2}{2 × s_{max}} \end{pmatrix}} $$
$$ v_{4,limit}\,=\,{\operatorname{Min}\begin{pmatrix} v_{max},\\ \sqrt{d_{max} × a_{4,limit} + \frac{a_{4,limit}^4}{4 × j_{4,limit}^2}} - \frac{a_{4,limit}^2}{2 × j_{4,limit}} \end{pmatrix}} $$
Problem
I noticed that the first variable in each set can also be written as follows:
$$ v_{2,limit} = \operatorname{Min}\begin{pmatrix} \left(v_{max} × \frac{a_{max}^0}{0!}\right)^\frac{1}{1}, \\ \left(d_{max} × \frac{a_{max}^1}{1!}\right)^\frac{1}{2} \end{pmatrix} $$
$$ a_{3,limit} = \operatorname{Min}\begin{pmatrix} \left(a_{max} × \frac{j_{max}^0}{0!}\right)^\frac{1}{1}, \\ \left(v_{max} × \frac{j_{max}^1}{1!}\right)^\frac{1}{2}, \\ \left(d_{max} × \frac{j_{max}^2}{2!}\right)^\frac{1}{3} \end{pmatrix} $$
$$ j_{4,limit}\,=\,{\operatorname{Min}\begin{pmatrix} \left(j_{max} × \frac{s_{max}^0}{0!}\right)^\frac{1}{1},\\ \left(a_{max} × \frac{s_{max}^1}{1!}\right)^\frac{1}{2},\\ \left(v_{max} × \frac{s_{max}^2}{2!}\right)^\frac{1}{3},\\ \left(d_{max} × \frac{s_{max}^3}{3!}\right)^\frac{1}{4} \end{pmatrix}} $$
Each of the expressions inside the $\operatorname{Min}(…)$ functions have the same format, with a clear linear progression in the constants and exponents in each expression. This got me wondering:
Can the same type of re-writing be performed on all the other "limit" variables so that each of their expressions are in the same format as the others on their level?
Just based on gut feeling, I think there should be some overarching pattern that fits all levels of all sets shown here, plus all the levels of all the "limit" variables that appear if we add the next derivative in the chain (for which I have yet to find explicit expressions; I'm hoping that identifying a pattern here will help in identifying the expressions in the next level). Does anyone here have any thoughts on how I could approach this?
My Work So Far
If we define the variables
- $A_0 = a_{max} × \left(\frac{j_{4,limit}}{0!}\right)^0$
- $A_1 = v_{max} × \left(\frac{j_{4,limit}}{1!}\right)^1$
- $A_2 = d_{max} × \left(\frac{j_{4,limit}}{2!}\right)^2$
- $B = \frac{j_{4,limit}^2}{2 × s_{max}}$
then $a_{4,limit}$ can be written as
$$ a_{4,limit}\,=\,{\operatorname{Min}\begin{pmatrix} A_0,\\ \sqrt{A_1 + B^2} - B,\\ \sqrt[3]{A_2 + \sqrt{A_2^2 -\left(\frac{B^2}{3}\right)^3\,}} + \sqrt[3]{A_2 - \sqrt{A_2^2 -\left(\frac{B^2}{3}\right)^3\,}} - B \end{pmatrix}} $$
But while this seems to suggest a hint of a pattern, I haven't been able to come up with an intuitive structure that can fit all three levels of $a_{4,limit}$ in the same way as the structure I found for $j_{4,limit}$.
Deeper Background
Consider an object that starts stationary at the origin (displacement $d = 0$) at time zero, moves to some final position $d = d_{max}$ at some final time, and becomes stationary again. The function $d_i(t)$ gives the object's displacement over time. The simplest description of motion in this scenario would be a two-part, discontinuous, piecewise-constant function: $d_0(t) = 0$ for $t < 0$, and $d_0(t) = d_{max}$ for $0 ≤ t$. This has zero degrees of smoothness and is not how real objects move, effectively being teleportation with infinite velocity over zero time.
We can improve the model to get one degree of smoothness by adding a maximum velocity $v_{max}$, creating a new three-part, discontinuous, piecewise-constant function $v_1(t)$, and creating a three-part, continuous, piecewise-linear (more specifically: constant, linear, constant) function $d_1(t)$ as the integral of $v_1(t)$ (with appropriate constants of integration for each segment to ensure continuity). This is more realistic, but still has infinite acceleration over zero time at the two transition points between segments.
We can improve the model again to get two degrees of smoothness by adding a maximum absolute-value of acceleration $a_{max}$ and a five-part, discontinuous, piecewise-constant function $a_2(t)$. The functions $v_2(t)$ and $d_2(t)$ are again found through integration with appropriate constants to ensure continuity. However, we have a new wrinkle: the distance to be covered might not be large enough compared to the maximum allowed acceleration for the velocity to get all the way up to $v_{max}$ before the object must start slowing down to come to a complete stop at $d = d_{max}$. The maximum attainable velocity for a given combination of $d_{max}$ and $a_{max}$ is $\sqrt{d_{max} × a_{max}}$; the effective top speed is thus whichever is smaller, $v_{max}$ or $\sqrt{d_{max} × a_{max}}$, giving us the new variable $v_{2,limit} = \operatorname{Min}\left(v_{max}, \sqrt{d_{max} × a_{max}}\right)$.
The same procedure holds for increasing degrees of smoothness, adding each successive derivative of displacement (jerk, snap, crack, etc.) in turn. The total number of segments in each piecewise equation is 2^[degree of smoothness] + 1, and the total number of "limit" variables for nonzero degrees of smoothness is [degree of smoothness] − 1.
All of the functions are piecewise polynomials that start equal to zero at time less than zero, all but the lowest-level function for each degree of smoothness are continuous, and all but $d(t)$ end with constant values of zero after the final transition time. All piecewise segments of the lowest-level function (for instance, snap $s_4(t)$) are of degree zero with values in a discrete set (for instance, $\{-s_{max}, 0, s_{max}\}$); all segments of the next level up are either degree zero or degree one, with values in a continuous interval (for instance, $[-j_{limit}, j_{limit}]$); all segments of the next level up have degrees of zero through two; and so on up to $d_i(t)$.
With all degrees of smoothness, the transition points between piecewise segments are chosen such that the final time $t$ at which the object reaches $d_{max}$ is minimized.