7
$\begingroup$

I've been picking up concepts on mechanics from online posts and Wikipedia pages, so please forgive my limited understanding. I'm currently trying to figure out whether it's okay to choose an arbitrary set of generalized coordinates as long as they are minimum and independent, not necessarily orthogonal.

Taking a double pendulum for example, I can select the two angles as the generalized coordinates, and suppose I have an external torque $\tau_2$ applied at $\theta_2$. Then, the equations of motion can be written as

$$ \frac d{dt}\left(\frac{\partial L}{\partial \dot q}\right) - \frac{\partial L}{\partial q} = Q$$

where $Q=\begin{bmatrix} 0 \\ \tau_2\end{bmatrix}$

However, what if I chose the generalized coordinates to be

$$\vec{q}=\begin{bmatrix} \theta_1 \\ \theta_1+\theta_2\end{bmatrix}$$

Would the generalized external force now be

$$Q=\begin{bmatrix} -\tau_2 \\ \tau_2\end{bmatrix}$$

This seems strange to me because now it says that $-\tau_2$ is being applied to the first coordinate $\theta_1$ even though the external torque is only on $\theta_2$.

I've calculated $Q$ as $\frac{\partial W}{\partial q}$ based on what I read from Modeling external forces in Lagrangian dynamics, but I've also seen $Q_i =\sum _{n=1} ^{3N} \mathbf f ^{(n)} \cdot \frac{\partial \mathbf x ^{(n)}}{\partial q^i}$ from Euler-Lagrange equations with non-conservative force (example). Am I simply seeing a different EoM because of a coordinate transform or have I made a mistake somewhere along the way?

$\endgroup$
2
  • $\begingroup$ Are you saying when you choose the vector $\vec{q}=\begin{bmatrix} \theta_1 \\ \\\theta_2\end{bmatrix}$, it works as expected, but when you choose the vector $\vec{q}=\begin{bmatrix} \theta_1 \\ \theta_1+\theta_2\end{bmatrix}$ it doesn't? $\endgroup$ May 5, 2020 at 3:10
  • $\begingroup$ Yes, and I'm wondering whether there are any formal restrictions on the choice of generalized coordinates, i.e., is my second choice of coordinates also valid? If it's valid, have I computed the generalized external forces $Q$ incorrectly, as $-\tau_2$ appears to affect $\theta_1$? $\endgroup$
    – Skipher
    May 5, 2020 at 15:32

3 Answers 3

6
$\begingroup$

Generalized coordinates have to be related to base coordinates in the following way: the map has to be invertible. Preferably this means a bijection, that is every point in the original coordinate system maps to exactly one point in the new system, and vice-versa, but one-to-one in the relevant subsets of the two is sufficient. The map also has to be differentiable ("smooth"), to some level that depends on the Lagrangian.

That's it. If you satisfy invertibility and smoothness, anything goes.

Handling external forces when you change coordinate systems is a slightly different matter. The problem you're running into is that you have to add the external forcing term to the Lagrangian before you do the change of coordinates. So then your Lagrangian looks like: \begin{align} L &= L_{\mathrm{free}} - \theta_2 \tau_2(t) \end{align} (check the sign of the $\theta_2 \tau_2$ term).

Now, when you change coordinates you get: \begin{align} L &= L_{\mathrm{free}} - (q_2 - q_1) \tau_2(t), \end{align} and everything proceeds as before.

This seems strange to me because now it says that $-\tau_2$ is being applied to the first coordinate $\theta_1$ even though the external torque is only on $\theta_2$.

That's because you're trying to think with a partial reversal of the coordinate system. $q_1$ is not equivalent to $\theta_1$, by itself. You have to keep in mind the context of both: a, the rest of the transformation, and b, the rest of the Lagrangian.

The inverse transformation is: \begin{align} \left[\begin{array}{c} \theta_1 \\ \theta_2\end{array}\right] & = \left[\begin{array}{c} q_1 \\ q_2 - q_1\end{array}\right]. \end{align} Notice that $q_1$ feeds in to both of the thetas.

Next, examine your equations of motion. I'm not going to do the derivation for you, but I'd be surprised to hear you end up with clean separate $\ddot{q}_i = \ldots$.

Edit: after thinking some more, I have an intuitive explanation. $q_1$ and $\theta_1$ are numerically equal, but they mean different things. In the $\theta$ system the angles describe the position of the arms independently with respect to some external standard direction, and so describe the motion of the two bodies independently (specifically, the kinetic energy–their coupling is purely in the potential term). In the $q$ system, $q_1$ describes the position of the double pendulum using the first arm as if the whole double pendulum were rigid, and $q_2$ defines the angle the outer pendulum arm with respect to the inner arm. Since that gives you a moving reference for $q_2$, it couples the kinetic terms (i.e. if your initial kinetic energy was $T=\frac{m_1}{2}\dot{\theta}_1^2 + \frac{m_2}{2}\dot{\theta}_2^2$ your new one is $T=\frac{m_1}{2}\dot{q}_1^2 + \frac{m_2}{2}\left(\dot{q}_2 - \dot{q}_1\right)^2$). Also, since $q_1$ covers the whole pendulum, the external torque acts on it, too.

Why is invertibility important? The map between your coordinates needs to be invertible for two reasons. First, once you've worked out the dynamics in the new coordinate system, you might want to translate that back into the old one.

Second, bad things happen in the math if the system runs across a point where they aren't invertible. Consider the point mass undergoing uniform motion on the $x$-axis. The motion is nice and simple: $x=vt$, and $y=0$. Now, change to polar coordinates. You'll get $r = |vt|$ and $\theta=-\pi\Theta(-vt)$, with $\Theta(a) \equiv 0$ if $a < 0$ and $1$ if $a > 0$. Notice how something violent happens in the coordinates at the origin, precisely where the map from $(r,\theta)$ to $(x,y)$ becomes many to 1 (i.e. at $r=0$ you're at the origin, no matter what $\theta$ is).

Side note: the polar–Euclidean transformation is an example of a coordinate transform that is not a bijection. An infinite number of $\theta$ values map to single $(x,y)$ pairs. This can cause problems with interpretability if the fact is forgotten, but doesn't cause any mathematical problems I can think of at this moment.

Solving the differential equations in the presence of a point-like problem in the coordinates is possible, it just requires more advanced tools. It's better to make sure any point-like problems are irrelevant, if possible. For an example of a real world problem of this type with a mechanical computer, see the phenomenon of gimbal lock.

Why is smoothness important? This one is easier to explain. It all comes down to two words: chain rule. First, your Lagrangian is going to have a kinetic terms expressed in the original coordinate system. To find your new kinetic terms, you need to apply the chain rule to the transformation. That is, if \begin{align} x_i & = f_i (q_1...) \Rightarrow \\ \dot{x}_i & = \sum_{j} \frac{\partial f}{\partial q_j} \dot{q}_j. \end{align}

The second reason to desire differentiability of the transformation is technical: it makes proving the Euler-Lagrange equations are equivalent more straightforward (again, using the chain rule).

When you have both interpretability and smoothness that is sufficient to prove that the Euler-Lagrange equations of motion obtained are equivalent using the chain rule.

$\endgroup$
3
  • $\begingroup$ Yes, my mistake was the "partial reversal" that I was doing in my head without writing out everything. So if I understand the requirements for the generalized coordinates from your answer correctly, my choice of coordinates is valid because the mapping between $\begin{bmatrix} \theta_1 \\ \theta_2 \end{bmatrix}$ and $\begin{bmatrix} \theta_1 \\ \theta_1 + \theta_2 \end{bmatrix}$ is invertible and smooth? $\endgroup$
    – Skipher
    May 5, 2020 at 17:48
  • $\begingroup$ Also, the mapping between the two would not be bijective in this case because $\theta_1$ appears in both $q_1$ and $q_2$? I'm just wondering if having a bijective map only provides simpler derivations or if there's another reason one might want it. $\endgroup$
    – Skipher
    May 5, 2020 at 18:18
  • $\begingroup$ @Skipher It is bijective: every pair of qs maps uniquely to a pair of thetas and vice-versa. $\endgroup$ May 6, 2020 at 2:21
4
$\begingroup$

There is not even a way to define whether such coordinates are orthogonal. There is no natural way to define an inner product on the space of tangent vectors in the coordinate space. Even if we did have such a definition, it would not in general be possible to define the coordinates in such a way that they were orthogonal everywhere. For example, you can't do this for a particle moving on the surface of a sphere.

$\endgroup$
4
  • $\begingroup$ Does this mean there are no restrictions on my choice of generalized coordinates as long as they are minimal and can fully define the system? $\endgroup$
    – Skipher
    May 5, 2020 at 15:22
  • $\begingroup$ You can't define whether the coordinates are orthogonal, but you can define whether the map from one coordinate system to another is orthogonal (i.e. preserves inner products in the tangent spaces), and that's the relevant meaning here, I think. $\endgroup$ May 5, 2020 at 16:25
  • $\begingroup$ @SeanE.Lake Do you have a good reference to recommend for learning more about this idea of preserving inner products in the tangent space? $\endgroup$
    – Skipher
    May 5, 2020 at 18:04
  • $\begingroup$ @Skipher It's not relevant to what you're learning, really, but any good textbook on general relativity should cover it when it covers general coordinate invariance. You should also find the same thing in texts on differential geometry. $\endgroup$ May 6, 2020 at 3:00
-1
$\begingroup$

How you choose new generalized coordinates

From Euler Lagrange equation

$$ \frac d{dt}\left(\frac{\partial L}{\partial \dot q}\right) - \frac{\partial L}{\partial q} = Q$$

you get:

$$M_q(\vec{q})\,\vec{\ddot{q}}=\vec{Q}-\vec{f}(\vec{q},\vec{\dot{q}})\tag 1$$

if you chose new set of generalized coordinate ($\vec{w}$) thus $$\vec{q}=\vec{q}(\vec{w})\tag 2$$ $$\vec{\dot{q}}=\frac{\partial \vec{q}}{\partial \vec{w}}\vec{\dot{w}}\tag 3$$ $$\vec{\ddot{q}}=\frac{\partial \vec{q}}{\partial \vec{w}}\,\vec{\ddot{w}}+ \frac{\partial}{\partial \vec{w}}\left(\frac{\partial \vec{q}}{\partial \vec{w}}\,\vec{\dot{w}}\right)\vec{\dot{w}}\tag 4$$

with equations (2),(3) and (4) in (1) you get:

$$M_w(\vec{w})\underbrace{\left[\frac{\partial \vec{q}}{\partial \vec{w}}\right]}_{J}\,\vec{\ddot{w}}=\vec{Q}-\vec{g}(\vec{w},\vec{\dot{w}})\tag 5$$

multiply equation (5) from left with $J^T$ you get the equations of motion for the coordinates $\vec{w}$ :

$$J^T\,M_w\,J\,\vec{\ddot{w}}=J^T\vec{Q}-J^T\,\vec{g}(\vec{w},\vec{\dot{w}})$$

to get unique solution for $\vec{\ddot{w}}$ , the inverse of the matrix $J^T\,M_w\,J$ must exist, thus $$[J^T\,M_w\,J]^{-1}=[J]^{-1}\,[M_w]^{-1}\,[J^T]^{-1}$$

consequence:

the determinate of the matrix $J$ (Matrix J is quadratic!) must be not equal zero, and the same for the matrix $M_w$

your case:

$$\vec{q}=\left[ \begin {array}{cc} 1&0\\ 1&1\end {array} \right] \vec{w}\quad \Rightarrow\quad J=\frac{\partial \vec{q}}{\partial \vec{w}}=\left[ \begin {array}{cc} 1&0\\ 1&1\end {array} \right]\quad ,J^{-1}=\left[ \begin {array}{cc} 1&0\\ -1&1\end {array} \right] $$

and

$$J^T\,\vec{Q}=\left[ \begin {array}{cc} 1&1\\ 0&1\end {array} \right] \,\begin{bmatrix} 0 \\ \tau_2 \\ \end{bmatrix}=\begin{bmatrix} \tau_2 \\ \tau_2 \\ \end{bmatrix}$$

Remark

To obtain the equations of motion, you transfer your Kinetic and potential energy to the new generalized coordinates and with EL you get your EOM’s

$\endgroup$
5
  • $\begingroup$ Please comment why it is wrong? I think it is correct answer $\endgroup$
    – Eli
    May 8, 2020 at 14:16
  • $\begingroup$ I recognize the $J$ as a similarity transformation into another coordinate frame. May I ask why $J$ is not multiplied on the right side for $Q$ and $-g$? $\endgroup$
    – Skipher
    May 8, 2020 at 18:41
  • $\begingroup$ This is how you get the equations of motion with NEWTON method. You start with $m\ddot R=f+f_c$ where $f_c$ are constraint forces, from hier you go to generalized coordinate, to eliminate the constraint force you multiply the equation with $J^T$ . Thus $J^TmJ \ddot q=J^Tf$ The EOM $\endgroup$
    – Eli
    May 8, 2020 at 20:04
  • $\begingroup$ $J^T Q J$ Don’t work J(n,n) and Q(n,1), similarity transformation work just for matrices not for vectors $\endgroup$
    – Eli
    May 8, 2020 at 20:09
  • $\begingroup$ Ah, you're totally right. Thank you for that. $\endgroup$
    – Skipher
    May 8, 2020 at 21:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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