You are on page 1of 12

6/26/2014 Double Pendulum

http://www.math24.net/double-pendulum.html 1/12
Math24.net
Differential Equations
Home
Calculus
Limits and Continuity
Dif f erentiation
Integration
Sequences and Series
Double Integrals
Triple Integrals
Line Integrals
Surf ace Integrals
Fourier Series
Differential Equations
1st Order Equations
2nd Order Equations
Nth Order Equations
Systems of Equations
Formulas and Tables
Double Pendulum
A double pendulum is undoubtedly a true miracle of nature. The jump in complexity, which is observed at the transition from
a simple pendulum to a double pendulum is amazing. The oscillations of a simple pendulum are regular. For small deviations
from equilibrium, these oscillations are harmonic and can be described by sine or cosine function. In the case of nonlinear
oscillations, the period depends on the amplitude, but the regularity of the motion holds. In other words, in the case of
a simple pendulum, the approximation of small oscillations fully reflects the essential properties of the system.
Double pendulum "behaves" quite differently. In the regime of small oscillations, the double pendulum demonstrates
the phenomenon of beats. The character of oscillations of the pendulums changes radically with increasing energy -
the oscillations become chaotic. Despite the fact that the double pendulum can be described by a system of several ordinary
differential equations, i.e. by a completely deterministic model, the appearance of chaos looks very unusual. This situation is
reminiscent of the Lorenz system where a deterministic model of three equations also shows chaotic behavior. Try to
experiment with the application below and watch the movement of the double pendulum at different mass ratios and initial
angles.
Next, we will build a mathematical model of the double pendulum in the form of a system of nonlinear differential equations.
Let's start with the derivation of the Lagrange equations.
Lagrange Equations
In Lagrangian mechanics, evolution of a system is described in terms of the generalized coordinates and generalized
velocities. In our case, the deflection angles of the pendulums
1
,
2
and the angular velocities can be taken as
the generalized variables. Using these variables, we construct the Lagrangian for the double pendulum and write
the Lagrange differential equations.
A simplified model of the double pendulum is shown in Figure 1. We assume that the rods are massless. Their lengths are l
1
and l
2
. The point masses (they are represented by the balls of finite radius) are m
1
and m
2
. All pivots are assumed to be
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 2/12
frictionless.
Fig.1 Fig.2
We introduce the coordinate system Oxy, the origin of which coincides with suspension point of the upper pendulum.
The coordinates of the pendulums are defined by the following relations:
The kinetic and potential energy of the pendulums (respectively, T and V) are expressed by the formulas
Then the Lagrangian can be written as
Take into account that
Hence,
As a result, the Lagrangian of the system takes the following form:
Now we can write the Lagrange equations (sometimes they are called as the Euler-Lagrange equations):
The partial derivatives in these equations are expressed by the following formulas:
Plastic Rods
Suppliers
alibaba.com
Find Quality Products
from Verified
Suppliers. Get a Live
Quote Now!
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 3/12
Hence, the first Lagrange equation can be written as
Cancelling l
1
0, we obtain:
Similarly, we derive the second differential equation:
After canceling m
2
l
1
0, the equation takes the form
Thus, the nonlinear system of two Lagrange differential equations can be written as
Small Oscillations of the Double Pendulum
Assuming that the angles
1
(t),
2
(t) are small, the oscillations of the pendulums near the zero equilibrium point can be
described by a linear system of equations. To get such a system, let's get back to the original Lagrangian of the system:
We write this Lagrangian in a simpler form, expanding it in a Maclaurin series and retaining the linear and quadratic terms.
The trigonometric functions can be replaced by the following approximate expressions:
Here we have taken into account that the term with cos cos(
1

2
) contains the product of small quantities and has
the second order of smallness. Therefore, we can leave only the linear term in the cosine expansion.
Substituting this in the original Lagrangian and considering that the potential energy is defined up to a constant, we obtain
the quadratic Lagrangian for the double pendulum in the form:
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 4/12
We derive the Lagrange differential equations for the given Lagrangian. They are written as
Find the partial derivatives:
We get the system of two differential equations
or
This system of equations can be written in a compact matrix form. We introduce the matrices
Then the system of differential equations can be represented as
Ii the case of one body, this equation describes the free undamped oscillations with a certain frequency. In the case of
the double pendulum, the solution (as you will see below) will contain oscillations with two characteristic frequencies, which
are called normal modes. The normal modes are the real part of the complex-valued vector function
where H
1
, H
2
are the eigenvectors, is the real frequency. The values of the normal frequencies
1, 2
are determined by
solving the characteristic equation
We derive general formulas for the angular frequencies
1, 2
in the case of arbitrary masses m
1
, m
2
and lengths l
1
, l
2
:
We obtain a biquadratic equation for the frequencies . Compute the discriminant:
Thus, the squares of the normal frequencies
1, 2
are given by
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 5/12
or
This expression is somewhat cumbersome. Therefore we consider the case when the lengths of the rods of both pendulums
are equal: l
1
= l
2
= l. Then the normal frequencies will be determined by the more compact formula:
As can be seen, the eigenfrequencies
1, 2
depend only on the mass ratio = m
2
/m
1
. The dependencies of the frequencies

1
,
2
on the parameter (provided g/l = 1) are shown in Figure 2 above. In particular, at equal masses m
1
= m
2
= m, i.e.
when = 1, the frequencies are equal to:
Now, after the eigenfrequencies
1, 2
are known, we still have to determine the eigenvectors H
1, 2
to describe the normal
modes. They can be found by solving the vector-matrix equation
Let the eigenvector H
1
= (H
11
, H
21
)
T
(the superscript
T
denotes transposition) be corresponded to the normal frequency
1
.
Then we have the following equation for H
1
:
The coordinates of the eigenvector H
1
satisfy the equation
Thus, the eigenvector H
1
is given by
Similarly, we find the coordinates of the second eigenvector H
2
= (H
12
, H
22
)
T
:
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 6/12
Hence, the eigenvector H
2
has the coordinates:
The general solution of the matrix equation can be written as
where the constants C
1
, C
2
,
1
,
2
depend on the initial positions and velocities of the pendulums.
Consider the character of small oscillations for a specific set of initial data. Suppose, for example, that the initial positions and
velocities of the pendulums have the following values:
In this case, the initial phases are zero:
1
=
2
= 0. Determine the constants C
1
and C
2
:
Then the law of oscillations of the pendulums is expressed by the formulas
where the angular frequencies
1, 2
are given by
Here the angles
1
(t),
2
(t) are expressed in radians, and the time t in seconds. Figures 3-5 show plots of small oscillations
for three values of :
1
= 0.2,
2
= 1,
3
= 5, provided l = l
1
= l
2
= 0.25 , g = 9.8 /c
2
. For convenience, the deflection
angles of the pendulums are given in degrees. As can be seen from the graphs, the oscillations in the system occur in the form
of beats, in which energy is cyclically transferred from one pendulum to the other. When one of the pendulums almost stops,
the other swings with maximum amplitude. After some time, the pendulums "switch roles" and so on. Oscillations with higher
frequency
1
are modulated by low-frequency oscillations with the frequency
2
. This is particularly apparent in Figure 5 for
the large value of (
3
= 5) when the difference between the frequencies
1
and
2
is great.
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 7/12
Fig.3 Fig.4
Fig.5 Fig.6
So, the small oscillations of the double pendulum are periodic and described by the sum of two harmonics with frequencies

1
,
2
depending on the system parameters. The characteristic property of small oscillations of the double pendulum is
the phenomenon of beats.
Legendre Transformation and Hamilton Equations
We now turn back to the original nonlinear system of equations and examine the character of oscillations of arbitrary
amplitude. This system of equations can not be solved analytically. Therefore, we consider a numerical model of the double
pendulum.
The Lagrange equations given above are second order differential equations. It is more conveniently to convert them into
the form of Hamilton's canonical equations. As a result, instead of the two second-order equations, we obtain a system of
four differential equations of the first order.
In Hamiltonian mechanics, the state of a system is determined by the generalized coordinates and generalized momenta. In
our case, we can use again as in the Lagrange equations the angles
1
,
2
as the generalized coordinates. Instead of
the generalized velocities (in the Lagrangian), we now introduce the generalized momenta p
1
, p
2
related to
the velocities by the formulas
or in the brief description:
The transition from the Lagrangian to the Hamiltonian form of the equations is performed using the Legendre transformation,
which is defined as follows.
Suppose that f(x) is a smooth convex downward function (Figure 6). Consider the line y = px passing through the origin.
The distance between the line y = px and the function y = f(x) along the y-axis depends on the coordinate x. This distance
will be maximal at a certain value of x. Clearly, it depends on the slope of the line, i.e., on the parameter p. Thus, we
introduce a new function g(p):
Such transformation of the function f(x) into the conjugate function g(p) is called the Legendre transformation. Note that
the function g(p) reaches a maximum value with respect to the variable x when p = df/dx. Indeed,
Knowing the dependence p(x), one can find the inverse function x(p). Then the Legendre transform is expressed by
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 8/12
the relation
The Legendre transformation is easily generalized to the case of functions of several variables. In the model of the double
pendulum, the transition from the Lagrangian to the Hamiltonian is described by the Legendre transformation of the form:
In this expression, L is the Lagrangian, and the function H is the Hamiltonian of the system, which depends on
the generalized coordinates
1
,
2
and the generalized momenta p
1
, p
2
.
As a result of this transformation, each Lagrange equation becomes a system of two Hamilton's canonical equations of
the form:
We now define the specific form of the Hamilton's equations for the double pendulum. Thre generalized momenta p
1
, p
2
are
expressed in terms of the partial derivatives of the Lagrangian in the form
We solve this system of equations using Cramer's rule and express the angular velocity in terms of the generalized
coordinates and momenta. Compute the corresponding determinants:
Hence, we obtain the following expression for the velocities:
These formulas are the first two (of four) Hamilton's differential equations. Given these expressions, the Hamiltonian can be
written as follows:
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 9/12
The last formula can be written as
The numerator N in this expression is very cumbersome. We simplify it:
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 10/12
Hence, the Hamiltonian takes the form:
Here, the first term is the generalized kinetic energy T, and the other two terms represent the potential energy V,
i.e. the Hamiltonian H is defined as
where
Now we can write two more Hamilton's differential equations for the generalized momenta:
Compute separately the partial derivatives of the generalized kinetic energy:
where the symbols A
1
and A
2
denote the expressions
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 11/12
The derivative of the kinetic energy T with respect to
2
will have the same form, but with the opposite sign:
From this we obtain the Hamilton equations in the form:
So, as a result of the cumbersome transformations we finally obtain the system of four Hamilton's canonical equations
describing the motion of the double pendulum. We write them together in the final form:
where
We can now proceed to the numerical analysis of the equations.
Numerical Simulation of Chaotic Oscillations
The most common method of numerical solution of differential equations is the 4th or 5th order Runge-Kutta method
Different variations of this method are used in most mathematical packages (MATLAB, Maple, Mathematica, MathCAD),
usually with an automatic error control and adaptive time-stepping.
To model the motion of the double pendulum, we also use the classical 4th order Runge-Kutta method (RK4). We somewhat
simplify the differential equations assuming that the lengths of the pendulums are the same: l
1
= l
2
= l. By introducing
the parameter equal to the mass ratio: = m
2
/m
1
, we can write the system in the following form:
where
This system can be rewritten in vector form:
The vector Z is composed of 4 canonical variables of the system, and components of the vector f correspond to the right
hand sides of the differential equations.
The Runge-Kutta (RK4) method requires at each step sequential evaluation of the four intermediate vectors:
6/26/2014 Double Pendulum
http://www.math24.net/double-pendulum.html 12/12
The value of the vector Z
n+1
in the next node is given by
The total error of the algorithm on a finite interval has the order O(
4
), i.e. the computational accuracy increases by 16 times
while reducing the time step twice.
The described model is implemented in the animation shown at the beginning of the web page. For simplicity, we assume that
the initial deflection angles of the pendulums are equal:
1
=
2
= . This application demonstrates the chaotic dynamics of
the double pendulum for different values of and . Interestingly, in some regimes, stable trajectories such as in Figure 7 or
compact regions of attraction as in Figure 8 appear in the system. It seems that the double pendulum is not yet fully studied by
physicists and mathematicians and carries a lot of surprises.
Fig.7 ( = 2.75, = 171) Fig.8 ( = 1.21, = 154)
1

58 Like
All Rights Reserved www.math24.net, 2010-2014 i nfo@math24.net

You might also like