Professional Documents
Culture Documents
Josh Altic
x1 x2
O
θ1
L1
x1 = L1 sin(θ1 )
x2 = L1 sin(θ1 ) + L2 sin(θ2 ) y1 m1
L2
y1 = −L1 cos(θ1 ) θ2
m2
y2 = −L1 cos(θ1 ) − L2 cos(θ2 )
y2
P = m1 gy1 + m2 gy2
We know that
K = 1/2mv 2 .
Which brings us to
K = 1/2m(ẋ 2 + ẏ 2 ).
position: differentiating:
K = 1/2m1 θ̇12 L21 + 1/2m2 [θ̇12 L21 + θ̇22 L22 + 2θ̇1 L1 θ̇1 L2 cos(θ1 − θ2 )].
L = K − P.
K = 1/2m1 θ̇12 L21 + 1/2m2 [θ̇12 L21 + θ̇22 L22 + 2θ̇1 L1 θ̇2 L2 cos(θ1 − θ2 )].
Thus:
∂L
= −L1 g (m1 + m2 ) sin(θ1 ) − m2 L1 L2 θ̇1 θ̇2 sin(θ1 − θ2 )
∂θ1
∂L
= (m1 + m2 )L21 θ̇1 + m2 L1 L2 θ̇2 cos(θ1 − θ2 )
∂ θ̇1
d ∂L
= (m1 + m2 )L21 θ̈1 + m2 L1 L2 θ̈2 cos(θ1 − θ2 )
dt ∂ θ̇1
−m2 L1 L2 θ̇2 sin(θ1 − θ2 )(θ̇1 − θ̇2 )
d ∂L ∂L
− =0
dt ∂ θ̇ ∂θ
∂L
= m2 L1 L2 θ̇1 θ̇2 sin(θ1 − θ2 ) − L2 m2 g sin(θ2 )
∂θ2
∂L
= m2 L22 θ̇2 + m2 L1 L2 θ̇1 cos(θ1 − θ2 )
∂ θ̇2
d ∂L
= m2 L22 θ̈2 + m2 L1 L2 θ̈1 cos(θ1 − θ2 )
dt ∂ θ̇2
−m2 L1 L2 θ̇1 sin(θ1 − θ2 )(θ̇1 − θ̇2 )
Josh Altic Double Pendulum
Substituting into the Euler-Lagrange equation for θ2
d ∂L ∂L
− =0
dt ∂ θ̇ ∂θ
We now have two equations that both have θ̈1 and θ¨2 in them.
If I define new variables for θ1 ,θ̇1 ,θ2 and θ̇2 I can construct a
system of four first order differential equations that I can then
solve numerically.
z1 = θ1 z˙1 = θ̇1
z2 = θ2 z˙2 = θ̇2
z3 = θ̇1 z˙3 = θ̈1
z4 = θ̇2 . z˙4 = θ¨2 .
z˙1 = θ̇1
z˙2 = θ̇2
m1
1.5 m2
1
y1 and y2
0.5
−0.5
m1
1.5 m2
1
0.5
y1 and y2
−0.5
−1
−1.5
−2
−2 −1 0 1 2
x1 and x2
0.5
y1 and y2
−0.5
−1
−1.5
−2 −1 0 1 2
x1 and x2
Josh Altic Double Pendulum
example of nearly cyclical behavior of the system
2
m1
1.5 m2
1
0.5
y1 and y2
−0.5
−1
−1.5
−2 −1 0 1 2
x1 and x2
Josh Altic Double Pendulum
Example of Chaotic behavior of the system
m1
1 m2
0.5
y1 and y2
−0.5
−1
−1.5
−2 −1 0 1 2
x1 and x2
Josh Altic Double Pendulum