Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

MAY|2023

Applications of Hamiltonian Dynamics


Assignment
19MAT111 Multivariable Calculus
Submitted by

BL.EN.U4ECE22022 EMANI SANDEEP REDDY

in partial fulfillment for the award of the degree


of
BACHELOR OF TECHNOLOGY
IN

“ELETRONICS AND COMMUNICATION” ENGINEERING

AMRITA SCHOOL OF ENGINEERING, BANGALORE

AMRITA VISHWA VIDYAPEETHAM


BENGALURU-560035

MAY-2023

AMRITA VISHWA VIDYAPEETHAM


AMRITA SCHOOL OF ENGINEERING, BENGALURU, 560035

Department of ECE, ASE, Bengaluru


Applications of Hamiltonian Dynamics
The equations of motion of a system can be derived using the
Hamiltonian coupled with Hamilton’s equations of motion, that is,
equations below.

Formally the Hamiltonian is constructed from the Lagrangian. That is

1. Select a set of independent generalized coordinates qi


2. Partition the active forces.
3. Construct the Lagrangian L(qi,q˙I,t)
4. Derive the conjugate generalized momenta via pi=∂L/∂q˙i
5. Knowing L,q˙i,pi,derive H=∑ipiq˙i−L
6. Derive q˙k=∂H/∂pk
and p˙j=−∂H(q,p,t)/∂qj+∑m(k=1)λk(∂g/∂qj)+QEXCj.

This procedure appears to be unnecessarily complicated compared to


just using the Lagrangian plus Lagrangian mechanics to derive the
equations of motion. Fortunately the above lengthy procedure often
can be bypassed for conservative systems. That is, if the following
conditions are satisfied;

i. L=T(q.)−U(q) that is, U(q) is independent of the velocity q˙.


ii. the generalized coordinates are time independent.

then it is possible to use the fact that

H=T+U=E

The following examples illustrate the use of Hamiltonian mechanics


to derive the equations of motion.
Plane Pendulum:
The plane pendulum, in a uniform gravitational field g, is an
interesting system to consider. There is only one generalized
coordinate, θ and the Lagrangian for this system is

L=(1/2)ml2θ˙2+mglcosθ

The momentum conjugate to θ is

pθ=∂L/∂θ˙=ml2θ˙
which is the angular momentum about the pivot point.

The Hamiltonian is

H=∑piq˙i−L=pθθ˙−L=1/2m(lθ˙)2-mglcosθ= P2 θ/2ml2−mglcosθ
i

Hamilton’s equations of motion give


θ˙=∂H/∂pθ= pθ /ml2
p˙θ= −∂H/∂θ = −mglsinθ

Note that the Lagrangian and Hamiltonian are not explicit functions of
time, therefore they are conserved. Also the potential is velocity
independent and there is no coordinate transformation, thus the
Hamiltonian equals the total energy, that is

H=p2θ/2ml2−mglcosθ=E ⁡

where E is a constant of motion. Note that the angular momentum pθ is


not a constant of motion since p˙θ explicitly depends on θ
Figure : Phase-space diagrams for the plane pendulum. The separatrix
(bold line) separates the oscillatory solutions from the rolling
solutions. The upper (a) shows one complete cycle while the lower (b)
shows two complete cycles.

The solutions for the plane pendulum on a (θ,pθ) phase diagram,


shown in the adjacent figure, illustrate the motion. The upper phase-
space plot shows the range (θ=±π,pθ). Note that
the θ=+π and −π correspond to the same physical point, that is the
phase diagram should be rolled into a cylinder connected along the
dashed lines. The lower phase space plot shows two cycles for θ to
better illustrate the cyclic nature of the phase diagram.
The corresponding state-space diagram is shown in Figure . The
trajectories are ellipses for low energy −mgl<E <mgl corresponding
to oscillations of the pendulum about θ=0. The center of the
ellipse (0,0) is a stable equilibrium point for the oscillation. However,
there is a phase change to rotational motion about the horizontal axis
when |E| > mgl, that is, the pendulum swings around a circle
continuously, i.e. it rotates continuously in one direction about the
horizontal axis. The phase change occurs at E=mgl. and is designated
by the separatrix trajectory.

The plot of pθ versus for the plane pendulum is better presented on a


cylindrical phase space representation since θ is a cyclic variable that
cycles around the cylinder, whereas pθ oscillates equally about zero
having both positive and negative values. When wrapped around a
cylinder then the unstable and stable equilibrium points will be at
diametrically opposite locations on the surface of the cylinder at pθ=0.
For smalml oscillations about equilibrium, also called librations, the
correlation between pθ and θ is given by the clockwise closed ellipses
wrapped on the cylindrical surface, whereas for energies |E|>mgl the
positive pθ corresponds to counter clockwise rotations while the
negative pθ corresponds to clockwise rotations.

Problem:
Consider a simple plane pendulum consisting of a mass m attached to
a string of length l. After the pendulum is set into motion, the length
of the string is shortened at a constant rate

dl/dt = -Θ = constant.

The suspension point remains fixed. Consider only times for which
l0 - Θt > 0, i.e. for which the mass has not yet contacted the suspension
point.
(a) Compute the Lagrangian and write down Lagrange's equation of
motion for small displacements from equilibrium.
(b) Compute the Hamiltonian function.
(c) Compare the Hamiltonian and the total energy and discuss the
conservation of energy for this system.

Solution:
 Concepts:
Lagrangian Mechanics
 Reasoning:
We are asked to compute the Lagrangian and the Hamiltonian
and find and solve Lagrange's equations.
 Details of the calculation:
(a) L = T - U.
As long as (l0 - Θt) > 1 we have
T = ½m(l0 - Θt)2(dθ/dt)2 + ½mΘ2, U = - mg(l0 - Θt) cosθ.
L = ½m(l0 - Θt)2(dθ/dt)2 + ½mΘ2 + mg(l0 - Θt)cosθ is the
Lagrangian of the system.
∂L/∂(dθ/dt) = m(l0 - Θt)2dθ/dt, d/dt(∂L/∂(dθ/dt)) = m(l0 -
Θt)2d2θ/dt2 - 2mΘ(l0 - Θt)dθ/dt.
∂L/∂θ = -mg(l0 - Θt)sinθ.
(l0 - Θt)d2θ/dt2 - 2Θdθ/dt = -gsinθ is the equation of motion.
For small angular displacement θ: (l0 - Θt)d2θ/dt2 - 2Θdθ/dt = -
gθ.

(b) H(pθ, θ) = pθ (dθ/dt) - L, pθ = ∂L/∂(dθ/dt) = m(l0 -


Θt)2dθ/dt, H = pθ2/(m(l0 - Θt)2) - L
H(pθ, θ) = pθ2/(2m(l0 - Θt)2) - mg(l0 - Θt)cosθ - ½mΘ2 ≠ T + U.

(c) The constraints do explicitly depend on time, so H ≠ T + U,


the total energy of the system.
H = H(t), H is not a constant of motion.
The energy is not conserved.
dE/dt = pθ2Θ/(m(l0 - Θt)3) + mgΘcosθ = m(l0 - Θt)(dθ/dt)2Θ +
mgΘcosθ is the rate that work is done on the system.
dE/dt = FΘ = where F is the tension in the string. F = m(l0 -
Θt)(dθ/dt)2 + mgcosθ.

One-dimensional harmonic oscillator:


Consider a mass m subject to a linear restoring force with spring
constant k. The Lagrangian L=T−U equals

L=(1/2)mx˙2−(1/2)kx2

Therefore the generalized momentum is

px=∂L/∂x˙=mx˙

The Hamiltonian H is
H=∑ pi q˙i−L=pxx˙−L
i

=pxpx/m−(1/2)( p2 x /m)+1/2(kx2 )
= (1/2)( p2 x /m)+1/2 (kx2 )
Note that the Lagrangian is not explicitly time dependent, thus the
Hamiltonian will be a constant of motion. Hamilton’s equations give
that
x˙=∂H/∂px=px/m

or

px=mx˙

In addition

−p˙x=∂H/∂x=∂U/∂x=kx
Combining these gives that

x¨+kmx=0

which is the equation of motion for the harmonic oscillator.

Problem:
A point particle of mass m is constrained to move in one dimension on
the x-axis.
The force acting on the particle can be derived from the velocity-
dependent potential
U = F(dx/dt)t.
Write down
(a) the Lagrangian,
(b) the Hamiltonian,
(c) Hamilton's equations.

Solution:
 Concepts:
The Lagrangian and the Hamiltonian, Hamilton's equations of
motion
 Reasoning:
We are asked to find the Lagrangian and the Hamiltonian and
Hamilton's equations of motion for a particle, given that force
acting on the particle it can be derived from a generalized
potential U = F(dx/dt)t.
 Details of the calculation:
(a) T = ½m(dx/dt)2 , U = F(dx/dt)t, we have a velocity-
dependent potential.
L = ½m(dx/dt)2 - F(dx/dt)t.
(b) px = ∂L/∂(dx/dt) = m(dx/dt) - Ft.
dx/dt = (px + Ft)/m.
H = (dx/dt)px - L
= px(px + Ft)/m - (px + Ft)2/(2m) + Ft(px + Ft)/m
= (px + Ft)2/(2m).
The Hamiltonian is a function of the coordinates and the
canonical momenta.
(c) Hamilton's equations:
dx/dt = ∂H/∂px = (px + Ft)/m, dpx/dt = -∂H/∂x = 0.
This yields the second order differential equation for the
coordinate x,
d2x/dt2 = F/m.

You might also like