Trajectory of a 2D constant jerk motion

108 Views Asked by At

This thread is a natural prosecution of this other.

Problem

Let $\xi,\eta$ be the horizontal and vertical coordinates of a plane. Consider the following sequence of point \begin{equation}\begin{aligned} \xi_k &= \xi_0 + kT \dot{\xi}_0 + \frac{(kT)^2}{2}\ddot{\xi}_0 +\frac{(kT)^3}{3!}u_\xi\\ \eta_k &= \eta_0 + kT \dot{\eta}_0 + \frac{(kT)^2}{2}\ddot{\eta}_0+\frac{(kT)^3}{3!} u_\eta\\ \end{aligned} \qquad k=0,1,2\dots,K\tag{1}\end{equation} where:

  • $\xi_0$, $\eta_0$ is a given starting position;
  • $\dot{\xi}_0$, $\dot{\eta}_0$ is a given starting velocity;
  • $\ddot{\xi}_0$, $\ddot{\eta}_0$ is a given starting acceleration;
  • $u_{\xi}$, $u_{\eta}$ is a given jerk, which is constant respect the index $k$;
  • $T>0$ is a given sampling time;
  • $K>0$ is the index of the last point, and is given.

Problem: if it is true, prove that the sequence $(1)$ produces a set of points $(\xi_k,\eta_k)$ that lie on a cubic curve.


Simplified problem

Thanks to the precious suggestions of David K, it is possible to show in a relative simple manner that the sequence \begin{equation}\begin{aligned} \xi_k &= \xi_0 + kT \dot{\xi}_0 + \frac{(kT)^2}{2}u_\xi\\ \eta_k &= \eta_0 + kT \dot{\eta}_0 + \frac{(kT)^2}{2}u_\eta\\ \end{aligned} \qquad k=0,1,2\dots,K\tag{2}\end{equation} produces points on a parabola. Maybe the proof of this fact can be useful to develop the solution of the actual problem associated to the sequence $(1)$.

solution

The ideas are the following: firstly the offsets in $(2)$ are eliminated by introducing the displacements \begin{equation*}\begin{aligned} \Delta \xi_k &\triangleq \xi_k-\xi_0\\ \Delta \eta_k &\triangleq \eta_k-\eta_0\\ \end{aligned}\end{equation*} from which follows \begin{equation}\begin{aligned} \Delta\xi_k &= kT \dot{\xi}_0 + \frac{(kT)^2}{2} u_\xi\\ \Delta \eta_k &= kT \dot{\eta}_0 + \frac{(kT)^2}{2} u_\eta\\ \end{aligned} \qquad k=0,1,2\dots,K\tag{3}\end{equation} then this sequence is written a new system of reference, denoted as $\xi^{\text{r}}, \eta^{\text{r}}$, given by a rotation of a clever angle $\theta$. In the new coordinates, the sequence $(3)$ gets the following form

\begin{equation}\begin{aligned} \Delta\xi_k^{\text{r}} &= kT \dot{\xi}_0^{\text{r}} + \frac{(kT)^2}{2} u_\xi^{\text{r}}\\ \Delta \eta_k^{\text{r}} &= kT \dot{\eta}_0^{\text{r}} + \frac{(kT)^2}{2} u_\eta^{\text{r}}\\ \end{aligned} \qquad k=0,1,2\dots,K\tag{4}\end{equation}

where \begin{equation*}\begin{bmatrix} v_1^{\text{r}}\\ v_2^{\text{r}}\\ \end{bmatrix}\triangleq \begin{bmatrix} \cos\theta & -\sin\theta\\ \sin\theta & \cos\theta \end{bmatrix}\begin{bmatrix} v_1\\ v_2\\ \end{bmatrix} \qquad \text{for }\begin{bmatrix}v_1 \\ v_2\end{bmatrix}= \begin{bmatrix}\Delta \xi_k \\ \Delta \eta_k\end{bmatrix}, \begin{bmatrix}\dot{\xi}_0 \\ \dot{\eta}_0\end{bmatrix}, \begin{bmatrix}u_\xi \\ u_\eta\end{bmatrix}. \end{equation*} Now, if we choose the special angle $\theta$ such that the horizontal axis $\xi^{\text{r}}$ is aligned with the vector $u\triangleq[u_\xi\,\,u_\eta]'$, i.e. \begin{equation*}\theta\triangleq \tan^{-1}\left(\frac{u_{\eta}}{u_\xi}\right)\end{equation*} then follows that the vector $u$ is seen horizontal in the new reference, i.e. \begin{equation*}u_\eta^{\text{r}}=0\end{equation*} Consequently, the sequence $(4)$ simplifies in

\begin{equation}\begin{aligned} \Delta\xi_k^{\text{r}} &= kT \dot{\xi}_0^{\text{r}} + \frac{(kT)^2}{2} u_\xi^{\text{r}}\\ \Delta \eta_k^{\text{r}} &= kT \dot{\eta}_0^{\text{r}} \end{aligned} \qquad k=0,1,2\dots,K\tag{5}\end{equation}

Now, assuming that $\dot{\eta}_0^{\text{r}}\neq0$ (i.e. the velocity vector is not aligned with the acceleration vector $u$ - in this case, as the intuition suggests, the trajectory is trivially a line), solving the second equation of $(5)$ with respect $T$ \begin{equation*}T=\frac{\Delta \eta_k}{k\dot{\eta}_0} \qquad k=1,2,\dots,K\end{equation*} and plugging this result in the first equation of $(5)$ gives \begin{equation*}\Delta \xi_k^{\text{r}}=\frac{\dot{\xi}_0}{\dot{\eta}_0}\Delta \eta_k+\frac{u_\xi^{\text{r}}}{2\dot{\eta}_0^2}\Delta \eta_k^2 \qquad k=0,1,2,\dots,K\end{equation*} which is a subset of an horizontal parabola in the rotated reference $\xi^{\text{r}},\eta^{\text{r}}$. Counter rotating the previous parabola gives the parabola in the original reference $\xi,\eta$ and proves that the sequence $(2)$ produces points on a parabola.


My attempt to solve the problem

Back to the original problem, we can try to extend the solution found for the sequence $(2)$. It is clear that $(1)$ can be simplified as \begin{equation}\begin{aligned} \Delta \xi_k^{\text{r}} &= kT \dot{\xi}_0^{\text{r}} + \frac{(kT)^2}{2}\ddot{\xi}_0^{\text{r}} +\frac{(kT)^3}{3!}u_\xi^{\text{r}}\\ \Delta \eta_k^{\text{r}} &= kT \dot{\eta}_0^{\text{r}} + \frac{(kT)^2}{2}\ddot{\eta}_0^{\text{r}} \end{aligned} \qquad k=0,1,2\dots,K\tag{6}\end{equation} where the rotation angle is still \begin{equation*}\theta\triangleq \tan^{-1}\left(\frac{u_{\eta}}{u_\xi}\right)\end{equation*} now it will be nice find a way to eliminate $\ddot{\eta}_0$ from the second equation in $(6)$. Indeed, if the quadratic term in the second equation is zero than we can easily solve the second equation with respect $T$ and then plug the result in the first equation and get the analytic expression of the cubic curve expressed in the rotated reference.

But how can we achieve that? Honestly, I don't know and probably what follows does not make sense at all.

My trivial attempt consists into repeat the aforementioned elimination procedure by introducing a third reference system $\xi^{\text{rr}},\eta^{\text{rr}}$ given by a new rotation of the second system $\xi^{\text{r}},\eta^{\text{r}}$. The third system need to eliminate the term $\ddot{\eta}_0^{\text{r}}$, so the axis $\xi^{\text{rr}}$ need to be aligned with the acceleration vector $[\ddot{\xi}_0^{\text{r}}\,\,\ddot{\eta}_0^{\text{r}}]'$. This means that the new rotation angle must be \begin{equation*}\varphi\triangleq \tan^{-1}\left(\frac{\ddot{\eta}_0^{\text{r}}}{\ddot{\xi}_0^{\text{r}}}\right)\end{equation*} with this choice I hope to get in the third reference \begin{equation}\begin{aligned} \Delta \xi_k^{\text{rr}} &= kT \dot{\xi}_0^{\text{rr}} + \frac{(kT)^2}{2}\ddot{\xi}_0^{\text{rr}} +\frac{(kT)^3}{3!}u_\xi^{\text{rr}}\\ \Delta \eta_k^{\text{rr}} &= kT \dot{\eta}_0^{\text{rr}} \end{aligned} \qquad k=0,1,2\dots,K\tag{7}\end{equation} but I have the strong suspicion that this result is wrong. This because my intuition says that by applying a new rotation the vector $u$ loose is horizontal form in the new reference, so probably the correct result is \begin{equation}\begin{aligned} \Delta \xi_k^{\text{rr}} &= kT \dot{\xi}_0^{\text{rr}} + \frac{(kT)^2}{2}\ddot{\xi}_0^{\text{rr}} +\frac{(kT)^3}{3!}u_\xi^{\text{rr}}\\ \Delta \eta_k^{\text{rr}} &= kT \dot{\eta}_0^{\text{rr}}+\frac{(kT)^3}{3!}u_\eta^{\text{rr}}\\ \end{aligned} \qquad k=0,1,2\dots,K\tag{8}\end{equation} which is useless because the second equation is not linear in $T$.


Question

Any idea on how solve my problems?

1

There are 1 best solutions below

0
On

Your second rotation won't work. There is a sense in which a rotation can work, but that rotation does not take place in the $\Delta\xi$-$\Delta\eta$ plane. There is a "higher dimensional" (generic, projective) version of your problem which simplifies the way you want by means of a rotation in the higher dimensional space. Honestly, though, this is not the most productive way for you to proceed.

A better way (than solving for $T$, or solving for the combination $kT$, in which $T$ always appears) is to recognize that you can go directly from (5) to its solution. In $$ \Delta \xi_k^r = k T \dot{\xi_0^r} + \frac{(kT)^2}{2}u_{\xi}^r \text{,} $$ the terms on the right-hand side are \begin{align*} k T \dot{\xi_0^r} &= \left( \frac{\dot{\xi_0^r}}{\dot{\eta_0^r}} \right) k T \dot{\eta_0^r} = \left( \frac{\dot{\xi_0^r}}{\dot{\eta_0^r}} \right) \Delta \eta_k^r \\ \frac{(kT)^2}{2}u_{\xi}^r &= \left( \frac{u_{\xi}^r}{2 \left(\dot{\eta_0^r} \right)^2}\right) \left( k T \dot{\eta_0^r} \right)^2 = \left( \frac{u_{\xi}^r}{2 \left(\dot{\eta_0^r} \right)^2}\right) \left( \Delta \eta_k^r \right)^2 \end{align*} and we obtain $$ \Delta \xi_k^r = \left( \frac{\dot{\xi_0^r}}{\dot{\eta_0^r}} \right) \Delta \eta_k^r + \left( \frac{u_{\xi}^r}{2 \left(\dot{\eta_0^r} \right)^2}\right) \left( \Delta \eta_k^r \right)^2 \text{.} $$ A very mechanical way to obtain this is through repeated polynomial division (with remainder) with respect to the variable $kT$ (to eliminate all "$kT$"s). \begin{align*} \Delta \xi_k^r &= \frac{k T \dot{\xi_0^r} + \frac{(kT)^2}{2}u_{\xi}^r}{\Delta \eta_k^r} \Delta \eta_k^r \\ &= \frac{k T \dot{\xi_0^r} + \frac{(kT)^2}{2}u_{\xi}^r}{k T \dot{\eta_0^r}} \Delta \eta_k^r \\ &= \left(\frac{\dot{\xi_0^r}}{\dot{\eta_0^r}} + \frac{kTu_{\xi}^r}{2\dot{\eta_0^r}} \right)\Delta \eta_k^r \\ &= \left(\frac{\dot{\xi_0^r}}{\dot{\eta_0^r}} + \frac{\frac{kTu_{\xi}^r}{2\dot{\eta_0^r}}}{\Delta \eta_k^r} \Delta \eta_k^r \right)\Delta \eta_k^r \\ &= \left(\frac{\dot{\xi_0^r}}{\dot{\eta_0^r}} + \frac{\frac{kTu_{\xi}^r}{2\dot{\eta_0^r}}}{k T \dot{\eta_0^r}} \Delta \eta_k^r \right)\Delta \eta_k^r \\ &= \left(\frac{\dot{\xi_0^r}}{\dot{\eta_0^r}} + \frac{u_{\xi}^r}{2\left(\dot{\eta_0^r}\right)^2} \Delta \eta_k^r \right)\Delta \eta_k^r \text{,} \end{align*} then distribute the $\Delta \eta_k^r$ to finish.

If we directly apply this method to your (6), there is an immediate problem -- the remainder on the first division contains $kT$ to the first power. To avoid this, we start with $\left(\Delta \xi_k^r\right)^2$ and perform the repeated division. Much algebra later, we obtain $$0 = -9 \left(\ddot{\eta_0^r}\right)^3 \left(\Delta\xi_k^r\right)^2 \\ {}+ \left( -6 \dot{\eta_0^r} \left(2u_\xi^r \left(\dot{\eta_0^r}\right)^2 + 3 \dot{\xi_0^r} \left( \ddot{\eta_0^r} \right)^2 -3 \dot{\eta_0^r} \ddot{\eta_0^r} \ddot{\xi_0^r}\right) -18 \ddot{\eta_0^r} \left( u_\xi^r \dot{\eta_0^r}-\ddot{\eta_0^r}\ddot{\xi_0^r} \right) \Delta\eta_k^r \right) \Delta\xi_k^r \\ {}+ \left( \left( 6 \dot{\xi_0^r}\left( 2 u_\xi^r \left( \dot{\eta_0^r}\right)^2 + 3 \dot{\xi_0^r} \left( \ddot{\eta_0^r}\right)^2 - 3 \dot{\eta_0^r} \ddot{\eta_0^r} \ddot{\xi_0^r} \right) \right) + \left( 3 \left( 4 u_\xi^r \dot{\xi_0^r} \ddot{\eta_0^r} + 2 u_\xi^r \dot{\eta_0^r} \ddot{\xi_0^r} - 3 \ddot{\eta_0^r} \left( \ddot{\xi_0^r} \right)^2 \right) \right) \Delta\eta_k^r + \left( 2 \left(u_\xi^r\right)^2 \right) \left( \Delta\eta_k^r \right)^2 \right) \Delta\eta_k^r \text{.} $$ This result is cubic in $\Delta\eta_k^r$ and quadratic in $\Delta\xi_k^r$, about the best that can be expected from eliminating between a cubic and quadratic, so this is a cubic curve.


If we go back to system (1) and raise $\xi_k$ and $\eta_k$ to the powers $1$, $2$, and $3$, then eliminate as much as we can between the cubes, then eliminate as much as we can by including the squares, then eliminate as much as we can by including the linear powers, we obtain the equation, where we have used the centered $\xi_k^c = \xi_k - \xi_0$ and $\eta_k^c = \eta_k - \eta_0$, $$ \left( 1, \eta_k^c, \left( \eta_k^c \right)^2, \left( \eta_k^c \right)^3 \right) \cdot \begin{pmatrix} 0 & 6 \dot{\eta_0}\left( 3 \ddot{\xi_0}^2 \dot{\eta_0} u_\eta -3 \ddot{\eta_0} \ddot{\xi_0} \dot{\xi_0} u_\eta +2 \dot{\xi_0}^2 u_\eta^2 -3 \ddot{\eta_0}\ddot{\xi_0}\dot{\eta_0}u_\xi +3 \ddot{\eta_0}^2 \dot{\xi_0} u_\xi -4 \dot{\eta_0}\dot{\xi_0}u_\eta u_\xi +2 \dot{\eta_0}^2 u_\xi^2 \right) & 3 \left( -3 \ddot{\eta_0}^2 \ddot{\xi_0} u_\eta +4 \ddot{\xi_0} \dot{\eta_0} u_\eta^2 +2 \ddot{\eta_0} \dot{\xi_0} u_\eta^2 +3 \ddot{\eta_0}^3 u_\xi -6 \ddot{\eta_0}\dot{\eta_0}u_\eta u_\xi \right) & 2 u_\eta^3 \\ -6 \dot{\xi_0} \left( 3 \ddot{\xi_0}^2 \dot{\eta_0} u_\eta -3 \ddot{\eta_0} \ddot{\xi_0} \dot{\xi_0} u_\eta +2 \dot{\xi_0}^2u_{\eta}^2 -3 \ddot{\eta_0} \ddot{\xi_0}\dot{\eta_0}u_\xi +3 \ddot{\eta_0}^2 \dot{\xi_0} u_\xi -4 \dot{\eta_0}\dot{\xi_0}u_\eta u_\xi +2 \dot{\eta_0}^2 u_\xi^2 \right) & -6 \left( -3 \ddot{\eta_0}\ddot{\xi_0}^2 u_\eta +3 \ddot{\xi_0} \dot{\xi_0}u_\eta^2 +3 \ddot{\eta_0}^2 \ddot{\xi_0} u_\xi + \ddot{\xi_0}\dot{\eta_0}u_\eta u_\xi - \ddot{\eta_0}\dot{\xi_0}u_\eta u_\xi -3 \ddot{\eta_0} \dot{\eta_0} u_\xi^2 \right) & -6 u_\eta^2 u_\xi & 0 \\ - 3 \left( 3 \ddot{\xi_0}^3u_\eta - 3 \ddot{\eta_0}\ddot{\xi_0}^2 u_\xi - 6 \ddot{\xi_0} \dot{\xi_0} u_\eta u_\xi + 2 \ddot{\xi_0} \dot{\eta_0} u_\xi^2 + 4\ddot{\eta_0} \dot{\xi_0} u_\xi^2 \right) & 6 u_\eta u_\xi^2 & 0 & 0 \\ -2 u_\xi^3 & 0 & 0 & 0 \end{pmatrix} \cdot \begin{pmatrix} 1 \\ \xi_k^c \\ \left( \xi_k^c \right)^2 \\ \left( \xi_k^c \right)^3 \end{pmatrix} = 0 $$ The "$0$"s in the lower-right triangle are evidence that we had successful cancellation of terms with total degree exceeding $3$. The $0$ in the upper-left entry shows that there is no constant term (which is what we expect from the centered variables, providing weak evidence that any errors in the above are transcriptional, not arithmetical).