Peeter Joot's (OLD) Blog.

Math, physics, perl, and programming obscurity.

Hamiltonian treatment of rigid Spherical pendulum.

Posted by peeterjoot on October 11, 2009

[Click here for a PDF incorporating this post with nicer formatting]

For the spherical rigid pendulum of length l, we have for the distance above the lowest point

\begin{aligned}h = l (1 + \cos\theta)\end{aligned} \quad\quad\quad(157)

(measuring \theta down from the North pole as conventional). The Lagrangian is therefore

\begin{aligned}\mathcal{L} = \frac{1}{{2}} m l^2 (\dot{\theta}^2 + \sin^2\theta \dot{\phi}^2) - m g l (1 + \cos\theta)\end{aligned} \quad\quad\quad(158)

We can drop the constant term, using the simpler Lagrangian

\begin{aligned}\mathcal{L} = \frac{1}{{2}} m l^2 (\dot{\theta}^2 + \sin^2\theta \dot{\phi}^2) - m g l \cos\theta\end{aligned} \quad\quad\quad(159)

To express the Hamiltonian we need first the conjugate momenta, which are

\begin{aligned}P_\theta &= \frac{\partial {\mathcal{L}}}{\partial {\dot{\theta}}} = m l^2 \dot{\theta} \\ P_\phi &= \frac{\partial {\mathcal{L}}}{\partial {\dot{\phi}}} = m l^2 \sin^2\theta \dot{\phi}\end{aligned} \quad\quad\quad(160)

We can now write the Hamiltonian

\begin{aligned}H = \frac{1}{{2 m l^2}} \left({P_\theta}^2 + \frac{1}{{\sin^2\theta}} {P_\phi}^2\right) + m g l \cos\theta\end{aligned} \quad\quad\quad(162)

Before going further one sees that there is going to be trouble where \sin\theta = 0. Curiously, this is at the poles, the most dangling position and the upright. The south pole is the usual point where we solve the planar pendulum problem using the harmonic oscillator approximation, so it is somewhat curious that the energy of the system appears to go undefined at this point where the position is becoming more defined. It seems almost like a quantum uncertainty phenomena until one realizes that the momentum conjugate to \phi is itself proportional to \sin^2 \theta. By expressing the energy in terms of this P_\phi momentum we have to avoid looking at the poles for a solution to the equations. If we go back to the Lagrangian and the Euler-Lagrange equations, this point becomes perfectly tractable since we are no longer dividing through by \sin^2\theta.

Examining the polar solutions is something to return to. For now, let’s avoid that region. For regions where \sin\theta is nicely non-zero, we get for the Hamiltonian equations

\begin{aligned}\frac{\partial {H}}{\partial {P_\phi}} &= \dot{\phi} = \frac{1}{{ m l^2 \sin^2 \theta}} P_\phi \\ \frac{\partial {H}}{\partial {P_\theta}} &= \dot{\theta} = \frac{1}{{ m l^2 }} P_\theta \\ \frac{\partial {H}}{\partial {\phi}} &= -\dot{P}_\phi = 0 \\ \frac{\partial {H}}{\partial {\theta}} &= -\dot{P}_\theta = -\frac{\cos\theta}{ m l^2 \sin^3 \theta} {P_\phi}^2 - m g l \sin\theta\end{aligned} \quad\quad\quad(163)

These now expressing the dynamics of the system. The first two equations are just the definitions of the canonical momenta that we started with using the Lagrangian. Not surprisingly, but unfortunate, we have a non-linear system here like the planar rigid pendulum, so despite this being one of the most simple systems it does not look terribly tractable. What would it take to linearize this system of equations?

Lets write the state space vector for the system as

\begin{aligned}\mathbf{x} =\begin{bmatrix}P_\theta \\ \theta \\ P_\phi \\ \phi \\ \end{bmatrix}\end{aligned} \quad\quad\quad(167)

lets also suppose that we are interested in the change to the state vector in the neighborhood of an initial state

\begin{aligned}\mathbf{x} =\begin{bmatrix}P_\theta \\ \theta \\ P_\phi \\ \phi \\ \end{bmatrix}={\begin{bmatrix}P_\theta \\ \theta \\ P_\phi \\ \phi \\ \end{bmatrix}}_0+ \mathbf{z}\end{aligned} \quad\quad\quad(168)

The Hamiltonian equations can then be written

\begin{aligned}\frac{d\mathbf{z}}{dt} &=\begin{bmatrix}\frac{\cos\theta}{ m l^2 \sin^3 \theta} {P_\phi}^2 + m g l \sin\theta \\ \frac{1}{{ m l^2 }} P_\theta \\ 0 \\ \frac{1}{{ m l^2 \sin^2 \theta}} P_\phi \\ \end{bmatrix}\end{aligned} \quad\quad\quad(169)

Getting away from the specifics of this particular system is temporarily helpful. We have a set of equations that we wish to calculate a linear approximation for

\begin{aligned}\frac{dz_\mu}{dt} = A_\mu(x_\nu) \approx A_\mu(\mathbf{x}_0) + \sum_\alpha {\left. \frac{\partial {A_\mu}}{\partial {x_\alpha}} \right\vert}_{\mathbf{x}_0} z_\alpha\end{aligned} \quad\quad\quad(170)

Our linear approximation is thus

\begin{aligned}\frac{d\mathbf{z}}{dt} &\approx{\begin{bmatrix}\frac{\cos\theta}{ m l^2 \sin^3 \theta} {P_\phi}^2 + m g l \sin\theta \\ \frac{1}{{ m l^2 }} P_\theta \\ 0 \\ \frac{1}{{ m l^2 \sin^2 \theta}} P_\phi \\ \end{bmatrix}}_0+{\begin{bmatrix}0 & -\frac{{P_\phi}^2 (1 + 2 \cos^2 \theta)}{m l^2 \sin^4 \theta} +m g l \cos\theta & \frac{2 \cos\theta}{ m l^2 \sin^3 \theta} P_\phi & 0 \\ \frac{1}{{m l^2}} & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 \\ 0 & \frac{-2 P_\phi \cos\theta}{m l^2 \sin^3\theta} & \frac{1}{{ m l^2 \sin^2 \theta}} & 0 \\ \end{bmatrix}}_0\mathbf{z}\end{aligned} \quad\quad\quad(171)

Now, this is what we get blindly trying to set up the linear approximation of the state space differential equation. We see that the cyclic coordinate \phi leads to a bit of trouble since no explicit \phi dependence in the Hamiltonian makes the resulting matrix factor non-invertible. It appears that we would be better explicitly utilizing this cyclic coordinate to note that P_\phi = \text{constant}, and to omit this completely from the state vector. Our equations in raw form are now

\begin{aligned}\dot{\theta} &= \frac{1}{{ m l^2 }} P_\theta \\  \dot{P}_\theta &= \frac{\cos\theta}{ m l^2 \sin^3 \theta} {P_\phi}^2 + m g l \sin\theta \\ \dot{\phi} &= \frac{1}{{ m l^2 \sin^2 \theta}} P_\phi \end{aligned} \quad\quad\quad(172)

We can treat the \phi dependence later once we have solved for \theta. That equation to later solve is just this last

\begin{aligned}\dot{\phi} &= \frac{1}{{ m l^2 \sin^2 \theta}} P_\phi \end{aligned} \quad\quad\quad(175)

This integrates directly, presuming \theta = \theta(t) is known, and we have

\begin{aligned}\phi - \phi(0) &= \frac{P_\phi}{ m l^2} \int_0^t \frac{d\tau}{\sin^2 \theta(\tau)} \end{aligned} \quad\quad\quad(176)

Now the state vector and its perturbation can be redefined omitting all but the \theta dependence. Namely

\begin{aligned}\mathbf{x} =\begin{bmatrix}P_\theta \\ \theta \\ \end{bmatrix}\end{aligned} \quad\quad\quad(177)

\begin{aligned}\mathbf{x} =\begin{bmatrix}P_\theta \\ \theta \\ \end{bmatrix}={\begin{bmatrix}P_\theta \\ \theta \\ \end{bmatrix}}_0+ \mathbf{z}\end{aligned} \quad\quad\quad(178)

We can now write the remainder of this non-linear system as

\begin{aligned}\frac{d\mathbf{z}}{dt} &=\begin{bmatrix}\frac{\cos\theta}{ m l^2 \sin^3 \theta} {P_\phi}^2 + m g l \sin\theta \\ \frac{1}{{ m l^2 }} P_\theta \\ \end{bmatrix}\end{aligned} \quad\quad\quad(179)

and make the linear approximation around \mathbf{x}_0 as

\begin{aligned}\frac{d\mathbf{z}}{dt} &\approx{\begin{bmatrix}\frac{\cos\theta}{ m l^2 \sin^3 \theta} {P_\phi}^2 + m g l \sin\theta \\ \frac{1}{{ m l^2 }} P_\theta \\ \end{bmatrix}}_0+{\begin{bmatrix}0 & -\frac{{P_\phi}^2 (1 + 2 \cos^2 \theta)}{m l^2 \sin^4 \theta} +m g l \cos\theta  \\ \frac{1}{{m l^2}} & 0 \\ \end{bmatrix}}_0\mathbf{z}\end{aligned} \quad\quad\quad(180)

This now looks a lot more tractable, and is in fact exactly the same form now as the equation for the linearized planar pendulum. The only difference is the normalization required to switch to less messy dimensionless variables. The main effect of allowing the trajectory to have a non-planar component is a change in the angular frequency in the \theta dependent motion. That frequency will no longer be \sqrt{{\left\lvert{\cos\theta_0}\right\rvert} g/l}, but also has a P_\phi and other more complex trigonometric \theta dependencies. It also appears that we can probably have hyperbolic or trigonometric solutions in the neighborhood of any point, regardless of whether it is a northern hemispherical point or a southern one. In the planar pendulum the unambiguous sign of the matrix terms led to hyperbolic only above the horizon, and trigonometric only below.


8 Responses to “Hamiltonian treatment of rigid Spherical pendulum.”

  1. sam said

    So, why doesn’t dH/dtheta actually equal -P_theta’ ? The same with dH/dphi and -P_phi’. You can tell by inspection they are not equal. Eagerly awaiting your reply.

    • peeterjoot said

      Can you clarify. Picking the simpler of the derivatives you mention above, I see in (162) above no \phi dependence, so \partial H/\partial \phi = 0. That also equals -d P_\phi/dt, which tells us that P_\phi, the azimuthal angular momentum, is a constant of motion for the system. I don’t see anything above that conflicts with this?

  2. Aé Li said

    How about doing the full treatment of this nice little system ? including the monodromy property due to the pole singularities that you noticed
    This would be a nice introduction to deep concepts of integrable hamiltonian systems

  3. Alex Dragt said

    The trouble at theta=0 and theta=pi is an artifact of the coordinate system you have chosen to use. At theta=0 and theta=pi the coordinate phi is ill defined, and this fact is reflected in the equations of motion. Had you used other coordinates that were well defined at the poles, the corresponding equations of motion would be regular there. The same problem arises in rigid body motion, and its solution is to use quaternion parameters which are well defined everywhere. Correspondingly, the equations of motion in quaternion parameters are singularity free.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: