The Double Pendulum Problem: Franziska Von Herrath & Scott Mandell May 19, 2000
The Double Pendulum Problem: Franziska Von Herrath & Scott Mandell May 19, 2000
Title Page
Contents
Abstract The double pendulum will be analyzed using Lagrangian and Hamiltonian methods. The systems behavior is then visualized using Matlabs ODE45 routine. Finally, the dierent behaviors are categorized.
Page 1 of 20
Go Back
Full Screen
Close
Quit
Contents
1 Introduction
Home Page
3 4 4 4 6 7 9 9 10 12 12 13 14 14 16 16
Title Page
Contents
2 Derivation 2.1 Position Equations . . . . . . . . 2.2 Energy Equations . . . . . . . . . 2.3 Lagrangian Function . . . . . . . 2.4 Lagranges Dierential Equations 2.5 Generalized Momenta . . . . . . 2.6 Hamiltonian Function . . . . . . 2.7 Hamiltons Equations of Motion .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
. . . . . . .
3 Finding a Numerical Solution 3.1 Creating a Function M-File . . . . . . . . . . . . . . . . . . . . . 3.2 Using ODE45 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Behaviors of the System 4.1 Periodic Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Quasiperiodic Motion . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Chaotic Motion . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Page 2 of 20
Go Back
Full Screen
Close
Quit
1. Introduction
In order to analyze the system by using Newtons second law, all the forces acting on the system have to be known and be able to be expressed. Because the double pendulum problem is quite complex, Lagrangian and Hamiltonian equations are used to simplify the analysis. This approach is more suitable because it uses energy, a scalar quantity, as a basis for analysis rather than force, a vector quantity, and generalized coordinates of any suitable quantity, rather than the limiting rectangular, polar, or spherical coordinates. The Lagrangian formalism will render two second-order dierential equations that are functions of the generalized coordinates. These equations will be rewritten in Hamiltonian formalism which generates four rst-order dierential equations that are functions of the generalized coordinates and momenta. Furthermore, the use of Lagrangian and Hamiltonian formalism to analyze the system is justied as two important conditions are met:
Page 3 of 20
Home Page
Title Page
Contents
Go Back
1. The energy of the system is conserved, as the double pendulum rotates in the conservative force eld of the earth 2. Angular momentum is conserved as dissipative friction and air resistance forces are ignored
Full Screen
Close
Quit
2. Derivation
A double pendulum consists of two pendulums with the rst suspended from a point in space and the second suspended from the end of the rst. Consider the double pendulum shown in Figure 1 with masses m1 and m2 attached by rigid massless rods of lengths l1 and l2 . To simplify the analysis of the system, the systems motion will be constricted to a plane. Let the angles the two rods make with the vertical be denoted as 1 and 2 , and let gravity be given by g.
Home Page
Title Page
Contents
x1 = l1 sin 1 y1 = l1 cos 1
Page 4 of 20
Go Back
Full Screen
Close
Quit
Home Page
y x1 1 l1 m1 y 1 2 y 2 l2 m2 x2 x
Title Page
Contents
Page 5 of 20
Go Back
Full Screen
Close
Quit
V = m1 gy1 + m2 gy2
Home Page
(5)
= m1 g(l1 cos 1 ) + m2 g(l1 cos 1 l2 cos 2 ) = (m1 + m2 )gl1 cos 1 m2 gl2 cos 2 . (6)
Title Page
Contents
The kinetic energy of the system is given by 1 1 2 2 T = m1 v1 + m2 v2 2 2 1 1 = m1 (x2 + y1 ) + m2 (x2 + y2 ) 1 2 2 2 2 2 1 1 2 2 2 2 2 2 = m1 l1 1 + m2 [l1 1 + l2 2 + 2l1 l2 1 2 cos(1 2 )]. 2 2 (8)
(7)
Page 6 of 20
Go Back
Since the motion of the system takes place in a conservative force eld, V is a function of the generalized coordinates and not the generalized velocities V =
Close
Quit
(9)
Thus the Lagrangian function of the generalized coordinates (1 , 2 ) is 1 1 2 2 2 2 L = (m1 + m2 )l1 1 + m2 l2 2 + m2 l1 l2 1 2 cos(1 2 ) 2 2
Title Page
Page 7 of 20
(12)
Go Back
m2 l1 l2 2 sin(1 2 )(1 2 )
Full Screen
(13)
Close
(14)
Quit
Home Page
L 2
L = 0. 2
(16)
Contents
L 2 = m2 l2 2 + m2 l1 l2 1 cos(1 2 ) 2 d dt
Page 8 of 20
(17)
L 2
Go Back
(19)
Full Screen
Close
Equation 15 and Equation 20 are coupled second-order ordinary dierential equations that describe the motion of the system. Note that these two equations
Quit
depend on four unknowns. In order to solve the system numerically using Matlabs ODE45 routine, a system of four rst-order ordinary dierential equations is needed.
Home Page
Title Page
Contents
p2 =
(22) eq22
The Hamiltonian function of the generalized coordinates(1 , 2 ) and generalized momenta (p1 , p2 )is dened as H T +V The Hamiltonian can also be written in terms of the Lagrangian (23)
Go Back
Full Screen
Close
1 1 2 2 2 2 H = i pi L = (m1 + m2 )l1 1 + m2 l2 2 + m2 l1 l2 1 2 cos(1 2 ) 2 2 (m1 + m2 )gl1 cos 1 m2 gl2 cos 2 (24) eq24
Quit
Solving the generalized momenta, Equation 21 and Equation 22, for 1 and 2 and substituting back into equation Equation 24 gives H=
2 2 l2 m2 p2 + l1 (m1 + m2 )p2 2m2 l1 l2 p1 p2 cos(1 2 ) 2 2 2 2 2l1 l2 m2 [m1 + m2 sin2 (1 2 )]
Home Page
Title Page
Contents
Page 10 of 20
H l1 (m1 + m2 )p2 l2 m2 p1 cos(1 2 ) 2 = = 2 p2 l1 l2 m2 [m1 + m2 sin2 (1 2 )] p1 = H = (m1 + m2 )gl1 sin 1 C1 + C2 1 H = m2 gl2 sin 2 + C1 C2 2
(27)
Go Back
(28)
Full Screen
p2 =
Close
(29)
Quit
C1
Home Page
(30)
C2
Title Page
(31)
Contents
Page 11 of 20
Go Back
Full Screen
Close
Quit
Solutions for 1 and 2 can be found by solving the system of rst-order dierential equations numerically using Matlabs ODE45 routine. The rst step is to create a function m-le in the Matlab editor. function xprime=doublependulum(t,x,flag,g,l1,l2,m1,m2)
Title Page
Contents
C1=(x(3).*x(4).*sin(x(1)-x(2)))./... l1*l2*(m1+m2*(sin(x(1)-x(2))).^2); C2=((l2^2*m2*(x(3)).^2+l1^2*(m1+m2)*... (x(4)).^2-l1*l2*m2*x(3).*x(4).*cos(x(1)-x(2)))... ./2*l1^2*l2^2*(m1+m2*(sin(x(1)-x(2))).^2).^2)... .*sin(2*(x(1)-x(2))); xprime=zeros(4,1); xprime(1)=(l2*x(3)-l1*x(4).*cos(x(1)-x(2)))... ./l1^2*l2*(m1+m2*(sin(x(1)-x(2))).^2); xprime(2)=(l1*(m1+m2)*x(4)-l2*m2*x(3).*cos(x(1)-x(2)))... ./l1*l2^2*m2*(m1+m2*(sin(x(1)-x(2))).^2); xprime(3)=-(m1+m2)*g*l1*sin(x(1))-C1+C2; xprime(4)=-m2*g*l2*sin(x(2))+C1-C2; This m-le denes the system of four rst-order dierential equations, where flag sets the parameters of the system.
Page 12 of 20
Go Back
Full Screen
Close
Quit
Home Page
Title Page
To call up the numerical equation 1 , the rst column of the vector x is initiated x(:,1). Solutions for 2 , p1 , and p2 are produced by calling the appropriate column of the vector x. These solutions can then be plugged into the position Equation 1, Equation 2, Equation 3, and Equation 4 to model the behavior of the masses in the system. x1=sin(x(:,1)); y1=-cos(x(:,1)); x2=sin(x(:,1))+sin(x(:,2)); y2=-cos(x(:,1))-cos(x(:,2));
Page 13 of 20
Go Back
Full Screen
Close
Quit
Periodic motion
Title Page
Contents
Go Back
Full Screen
[t,x]=ode45(doublep,[0,0.7],[pi;pi;10;-8.898788999]); x1=sin(x(:,1)); y1=-cos(x(:,1)); x2=sin(x(:,1))+sin(x(:,2)); y2=-cos(x(:,1))-cos(x(:,2)); plot(x2,y2) axis([min(-2) max(2)... min(-2) max(2)])
Close
Quit
2
Home Page
1.5
Title Page
Contents
Page 15 of 20
1.5 2 2
Go Back
0 xaxis
Full Screen
Close
Quit
Home Page
Title Page
Contents
Page 16 of 20
Go Back
Full Screen
Close
Quit
Home Page
Title Page
Contents
Page 17 of 20
Go Back
Full Screen
Close
Quit
2
Home Page
1.5
Title Page
Contents
Page 18 of 20
1.5 2 2
Go Back
0 xaxis
Full Screen
Close
Quit
2
Home Page
1.5
Title Page
Contents
Page 19 of 20
1.5 2 2
Go Back
0 xaxis
Full Screen
Close
Quit
References
[1] Arya, Atam P. (1998). Introduction to Classical Mechanics (2nd ed.). Upper Saddle River, NJ: Prentice Hall.
Home Page
Title Page
[2] Marion, Jerry B., & Thornton, Stephen T. (1988). Classical Dynamics of Particles & Systems(3rd ed.). San Diego, CA: Harcourt Brace Jovanovich. [3] Instsitute fur den Wissenschaftlichen (Producer). (1985). Planar Double Pendulum [Videotape]. Chicago, IL: International Film Bureau.
Contents
Page 20 of 20
Go Back
Full Screen
Close
Quit