Le pendule double
En physique et en mathématiques, dans le domaine des systèmes dynamiques, le pendule double est un pendule avec un autre pendule fixé son extrémité ; C’est un simple système physique qui expose une riche attitude dynamique avec une forte sensibilité aux conditions initiales. Le mouvement d’un pendule double est gouverné par un jeu d’équations différentielles ordinaires. Pour certaines énergies ses mouvements sont chaotiques.
Analyse et interprétation
Plusieurs variantes du pendule double peuvent être considérées. Les deux bras peuvent être d’égales ou d’inégales longueurs et de même pour les masses, ils peuvent être de simples pendules ou des pendules composés (appelés aussi pendules complexes) et le mouvement peut être en trois dimensions ou restreint à un plan vertical. Dans l’analyse suivante, les pendules ont à leurs extrémités des masses différentes et les bras ont eux aussi des masses et des longueurs différentes et le mouvement a lieu sur deux dimensions.
Pendule double composé (bras) plus masses aux extrémités
Dans un pendule composé, la masse est distribuée sur sa longueur. Si la masse est régulièrement distribuée, alors le centre de masse de chaque bras se situe à son milieu, et le moment d’inertie du bras par rapport à ce point est
1
2I = 12 ml
.Il est pratique d’utiliser les angles entre chaque bras et la verticale comme coordonnées généralisées définissant la configuration du système. Ces angles sont notés θ1 et θ2. La position du centre de masse de chaque bras peut être écrite en termes de ces deux coordonnées. Si l’origine de ce système de coordonnées cartésiennes est pris pour être le point de suspension du premier pendule, alors le centre de masse de la première barre de ce pendule est à :
x
y M3
θ2 M4
L1 , M1
L2 , M2
θ1
1
1 1
1
1 1
2 sin 2 cos x l
y l
θ θ
=
= −
On a pour sa vitesse :
2
2 2 2
1 1
1 1 1 1 1 1
2
2 2 2
1 1
1 1 1 1 1 1
cos et cos
2 4
sin et sin
2 4
l l
x x
l l
y y
θ θ θ θ
θ θ θ θ
= =
=
=
& &
& &
& &
& &
Pour la masse à l’extrémité de cette barre on a :
3 1 1
3 1 1
sin cos x l
y l
θ θ
=
= −
Pour sa vitesse :
2 2 2 2
3 1 1 1 3 1 1 1
2 2 2 2
3 1 1 1 3 1 1 1
cos et cos
sin et sin
x l x l
y l y l
θ θ θ θ
θ θ θ θ
= =
=
=
& &
& &
& &
& &
Et le centre de masse du bras du deuxième pendule est à :
2 1 1 2 2
2 1 1 2 2
sin 1 sin 2
cos 1 cos
2
x l l
y l l
θ θ
θ θ
= +
= − −
Pour sa vitesse :
2
2 1 1 1 2 2
2
2 2 2 2 2 2 2
2 1 1 1 2 2 1 2 1 2 1 2
2
2 1 1 1 2 2
2
2 2 2 2 2 2
2 1 1 1 2 2 1 2 1 2 1 2
cos + cos
2
et cos + cos cos cos
4 sin + sin
2
et sin + sin sin sin
4 x l l
x l l l l
y l l
y l l l l
θ θ θ θ
θ θ θ θ θ θ θ θ
θ θ θ θ
θ θ θ θ θ θ θ θ
=
= +
= +
=
& &
&
& & & &
&
& &
&
& & & &
&
Pour la masse à l’extrémité de cette deuxième barre on a :
4 1 1 2 2
4 1 1 2 2
sin sin
cos cos
x l l
y l l
θ θ
θ θ
= +
= − −
Et de même sa vitesse :
4 1 1 1 2 2 2
2 2 2 2 2 2 2
4 1 1 1 2 2 2 1 2 1 2 1 2
4 1 1 1 2 2 2
2 2 2 2 2 2
4 1 1 1 2 2 2 1 2 1 2 1 2
cos + cos
et cos + cos 2 cos cos
sin + sin
et sin + sin 2 sin sin
x l l
x l l l l
y l l
y l l l l
θ θ θ θ
θ θ θ θ θ θ θ θ
θ θ θ θ
θ θ θ θ θ θ θ θ
=
= +
= +
=
& &
&
& & & &
&
& &
&
& & & &
&
Ce qui donne assez d’informations pour écrire le Lagrangien Le Lagrangien
( ) ( ) ( ) ( )
2 2 2 2 2 2
1 1 2 2 3 3 4 4 1 1 2 2
1 1 2 2 3 3 4 4
2 2 2 2 2 2 2 2
1 1 1 2 2 2 3 3 3 4 4 4
1 1
1 1 1 1 1 1
2 2 2 2 2 2
1 1 1 1
2 2 2 2
1 2
L Energie cinétique Energie potentielle
m v m v m v m v I I
m gy m gy m gy m gy
m x y m x y m x y m x y
I
θ θ
θ
= −
= + + + + +
− − − −
+ + + + + + +
+
=
& &
& & & & & & & &
&
2 22 2 1 1 2 2 3 3 4 4
1
2 I θ m gy m gy m gy m gy
+ & − − − −
Les deux premiers termes sont les énergies cinétiques des centres de masse des tiges, les deux suivants sont les énergies cinétiques des masses qui sont à leurs extrémités et les deux avec I1
et I2, les énergies cinétiques de rotation de ces tiges autour de leurs centres de masse. Les derniers termes sont les énergies potentielles de ces corps dans un champ de gravitation uniforme.
Par substitution des coordonnées ci-dessus et réarrangement :
( ) ( )
2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 2 1 1 2 2 2 3 1 1 4 1 1 4 2 1
2 1 2 1 2 1 2 1 2 4 1 2 1 2 1 2 1 2
2 2
2 2
1 1 2 2
1 2 1 1 1 2 1
1 1 1 1 1 1
L 8 2 8 2 2 2
1 cos cos sin sin cos cos sin sin
2
1 1 1
cos co
2 12 2 12 2
m l m l m l m l m l m l
m l l m l l
m l m l
m l g m g l
θ θ θ θ θ θ
θ θ θ θ θ θ θ θ θ θ θ θ
θ θ θ
= + + + + +
+ + + +
+ + + +
& & & & & &
& & & &
& &
( )
1 2 2
3 1 1 4 1 1 2 2
s 1 cos
2
cos cos cos
l
m l g m g l l
θ θ
θ θ θ
+ +
+ + +
( ) ( )
( )
2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 2 1 1 3 1 1 4 1 1 2 2 2 4 2 2
2 1 2 1 2 1 2 4 1 2 1 2 1 2 1 1 1
2 1 1 2 2 3 1 1 4 1 1 2 2
1 1 1 1 1 1
6 2 2 2 6 2
1 1
cos cos cos
2 2
cos 1 cos cos cos cos
2
L m l m l m l m l m l m l
m l l m l l m l g
m g l l m l g m g l l
θ θ θ θ θ θ
θ θ θ θ θ θ θ θ θ
θ θ θ θ θ
+ + + + +
+ − + − +
+ + + + +
= & & & & & &
& & & &
On a pour
1 1
L L
t
δ δ δ
δ δθ δθ
−
&
( )
2 2 2 2
1 1 2 1 3 1 4 1 1 2 1 2 4 1 2 2 1 2
1
1 1
3 2 cos
L m l m l m l m l m l l m l l
δ θ θ θ θ
δθ
= + + + + + −
& &
&
( )
( ) ( )
2 2 2 2
1 1 2 1 3 1 4 1 1 2 1 2 4 1 2 2 1 2
1
2
2 1 2 4 1 2 2 1 2 2 1 2 4 1 2 1 2 1 2
1 1
3 2 cos
1 1
sin sin
2 2
L ml m l m l m l m l l m l l t
m l l m l l m l l m l l
δ δ θ θ θ θ
δ δθ
θ θ θ θθ θ θ
= + + + + + −
+ + − − + −
&& &&
&
& & &
( )
2 1 2 4 1 2 1 2 1 2 1 2 3 4 1 1
1
1 1
sin sin
2 2
L m l l m l l m m m m l g
δ θ θ θ θ θ
δθ
= − + − − + + +
& &
( )
( )
1 2 3 4 1 1 2 4 2 2 1 2
1 1
2
2 4 2 2 1 2 1 2 3 4 1
1 1
3 2 cos
1 1
sin sin 0 ( 1 )
2 2
L L
m m m m l m m l
t
m m l m m m m g
δ δ δ
θ θ θ θ
δ δθ δθ
θ θ θ θ
− = + + + + + −
+ + − + + + + =
&& &&
&
&
Pour
2 2
L L
t
δ δ δ δ δθ δθ
−
&
( )
( )
2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 2 1 1 3 1 1 4 1 1 2 2 2 4 2 2
2 1 2 4 1 2 1 2 1 2 1 1 1
2 1 1 2 2 3 1 1 4 1 1 2 2
1 1 1 1 1 1
6 2 2 2 6 2
1 1
cos cos
2 2
cos 1 cos cos cos cos
2
L m l m l m l m l m l m l
m l l m l l m l g
m g l l m l g m g l l
θ θ θ θ θ θ
θ θ θ θ θ
θ θ θ θ θ
+ + + + +
+ + − +
+ + + + +
= & & & & & &
& &
( )
2 2
2 2 4 2 2 2 1 2 4 1 2 1 1 2
2
1 1
3 2 cos
L m l m l m l l m l l
δ θ θ θ θ
δθ
= + + + −
& &
&
( ) ( )
( )
2 2 2
2 2 4 2 2 2 1 2 4 1 2 1 1 2 2 1 2 4 1 2 1 1 2
2
2 1 2 4 1 2 1 2 1 2
1 1 1
cos sin
3 2 2
1 sin
2
L m l m l m l l m l l m l l m l l
t
m l l m l l
δ δ θ θ θ θ θ θ θ
δ δθ
θθ θ θ
= + + + − − + −
+ + −
&& && &
&
& &
( )
2 1 2 4 1 2 1 2 1 2 2 4 2 2
2
1 1
sin sin
2 2
L m l l m l l m m l g
δ θ θ θ θ θ
δθ
= + + − − +
& &
( ) ( )
( )
2 2 2
2 2 4 2 2 2 1 2 4 1 2 1 1 2 2 1 2 4 1 2 1 1 2
2 2
2 1 2 4 1 2 1 2 1 2 2 1 2 4 1 2 1 2 1
1 1 1
cos sin
3 2 2
1 1
sin sin
2 2
L L
m l m l m l l m l l m l l m l l t
m l l m l l m l l m l l δ δ δ
θ θ θ θ θ θ θ
δ δθ δθ
θθ θ θ θθ θ
− = + + + − − + −
+ + − − +
&& && &
&
& & & & (
2)
2 4 2 2
1 sin 0 ( 2 ) 2 m m l g
θ θ
−
+ + =
( )
( )
2 2
2 2 4 2 2 2 1 2 4 1 2 1 1 2
2 2
2
2 1 2 4 1 2 1 1 2 2 4 2 2
1 1
3 2 cos
1 1
sin sin
2 2
L L
m l m l m l l m l l t
m l l m l l m m l g
δ δ δ
θ θ θ θ
δ δθ δθ
θ θ θ θ
− = + + + −
− + − + +
&& &&
&
&
( )
( )
2 2 4 2 2 2 1 4 1 1 1 2
2
2 1 4 1 1 1 2 2 4 2
1 1
3 2 cos
1 1
sin sin 0 ( 2 )
2 2
m l m l m l m l
m l m l m m g
θ θ θ θ
θ θ θ θ
⇒ + + + −
− + − + + =
&& &&
&
( )
( )
2 4 2 2 2 4 1 1 1 2
2
2 4 1 1 1 2 2 4 2
1 1
3 2 cos
1 1
sin sin
2 2
m m l m m l
m m l m m g
θ θ θ θ
θ θ θ θ
+ = − + −
+ + − − +
&& &&
&
( )
( )
2 4
2 2 1 1 1 2
2 4
2 4 2 2 4
1 1 1 2 2
2 4 2 4
3 2
2 3 cos
3 2 3 2
sin sin
2 3 2 3
m m
l l
m m
m m m m
l g
m m m m
θ θ θ θ
θ θ θ θ
+
⇒ = − −
+
+ +
+ − −
+ +
&& &&
&
( )
( )
1 2 3 4 1 1 2 4 2 2 1 2
2
2 4 2 2 1 2 1 2 3 4 1
1 1
3 2 cos
1 1
sin sin 0 ( 1 )
2 2
m m m m l m m l
m m l m m m m g
θ θ θ θ
θ θ θ θ
+ + + + + −
+ + − + + + + =
&& &&
&
( )
( ) ( ) ( )
( )
( ) ( )
2 2
2 4 2 2 4
1 1 1 1 2 1 2 1 2 2
2 4 2 4
2
2 4
2
2 4 2 2 1 2 1 2 3 4 1 1 2 3 4 1
2 4
2 2
3 3
cos sin cos sin
4 3 4 3
1 1 1 3 2
sin sin /
2 2 3 4 3
m m m m
l g
m m m m
m m
m m l m m m m g m m m m l l
m m
θ θ θ θ θ θ θ θ θ
θ θ θ θ
+ +
⇒ = − − − + −
+ +
+
− + − − + + + + + + − +
&& &
&
1cos
2( θ θ
1−
2)
( )
( )
2 4 2 2 2 4 1 1 1 2
2
2 4 1 1 1 2 2 4 2
1 1
3 2 cos
1 1
sin sin 0 ( 2 )
2 2
m m l m m l
m m l m m g
θ θ θ θ
θ θ θ θ
+ + + −
− + − + + =
&& &&
&
( )
2 4 2( )
1 1 1 2 2 2 1 1 1 2 2
2 4
2 3
cos sin sin
3 2
m m
l l l g
m m
θ θ θ + θ θ θ θ θ
⇒ − = − + − −
+
&& && &
( )
( )
1 2 3 4 1 1 2 4 2 2 1 2
2
2 4 2 2 1 2 1 2 3 4 1
1 1
3 2 cos
1 1
sin sin 0 ( 1 )
2 2
m m m m l m m l
m m l m m m m g
θ θ θ θ
θ θ θ θ
+ + + + + −
+ + − + + + + =
&& &&
&
( ) ( ) ( )
( ) ( )
2 2
2 1 1 1 2 2 2 4 2 2 1 2 1 2
2 4 2
1 2 3 4 1 2 1 1 2 3 4 2 2 4 2 1 2
2 4
sin sin 1 cos sin
2
1 2 1 3 1
cos sin / cos
2 3 3 2 2
l g m m l
m m
m m m m g m m m m l m m l
m m
θ θ θ θ θ θ θ θ θ θ
θ θ θ θ θ
⇒ = − − + + − −
+
+ + + + − + + + − + −
+
&& & &
Avec ces accélérations on peut réaliser une intégration en se servant de scipy.integrate de python.
Fichier python
# -*- coding: cp1252 -*-
# Fichier modifié du Pendule double adapté du code C à
# http://www.physics.usyd.edu.au/~wheat/dpend_html/solve_dpend.c
# Ici on a une masse à l'extrémité de chaque bras (barre) des pendules
# et la masse de ces bras distribuée sur leur longueur from numpy import sin, cos, pi, array
import numpy as np
import matplotlib.pyplot as plt import scipy.integrate as integrate
import matplotlib.animation as animation from matplotlib.lines import Line2D
base_name = 'PNG/Pendule_double/1_penduledouble_'
G = 9.80 # accélération de la pesanteur, en m/s^2 L1 = 1.0 # longueur du pendule 1 en m
L2 = 0.9 # longueur du pendule 2 en m M1 = 0.5 # masse de la barre 1 en kg M2 = 0.5 # masse de la barre 2 en kg
M3 = 0.4 # masse à l'extrémité du pendule 1 en kg M4 = 0.35 # masse à l'extrémité du pendule 2 en kg x3 = []
y3 = []
x4 = []
y4 = []
def derivs(state, t):
dydx = np.zeros_like(state) dydx[0] = state[1]
del_ = state[0]-state[2]
den1 = (((1/3.0*M1+M2+M3+M4)*L1)
- 3/4.0*((M2+2*M4)**2/(M2+3*M4)*L1*cos(del_)*cos(del_)))
dydx[1] = (-3/4.0*((M2+2*M4)**2)/(M2+3*M4)*L1*state[1]*state[1]*sin(del_)*cos(del_) + 3/4.0*((M2+2*M4)**2)/(M2+3*M4)*G*sin(state[2])*cos(del_)
- (1/2.0*M2+M1)*L2*state[3]*state[3]*sin(del_) - (1/2.0*M1+M2+M3+M4)*G*sin(state[0]))/den1
dydx[2] = state[3]
den2 = ((2/3.0*(1/3.0*M1+M2+M3+M4)*(M2+3*M4)/(M2+2*M4)*L2) - ((1/2.0*M2+M4)*L2*cos(del_)*cos(del_)))
dydx[3] = (L1*state[1]*state[1]*sin(del_)-G*sin(state[2]) + (1/2.0*M1+M2+M3+M4)*G*sin(state[0])*cos(del_)
+ (1/2.0*M2+M4)*L2*state[3]*state[3]*cos(del_)*sin(del_))/den2 return dydx
# création d'un tableau du temps de 0..100 échantillonné à un pas de 0.05 seconde dt = 0.05
t = np.arange(0.0, 20, dt)
# th1 et th2 sont les angles initiaux (degrés)
# w10 et w20 son les vitesses angulaires initiales (degrés par seconde) th1 = 100.0
w1 = 0.0 th2 = 150.0
w2 = 0.0 rad = pi/180
# état initial
state = np.array([th1, w1, th2, w2])*pi/180.
# intégration de ODE en utilisant scipy.integrate.
# (x1, x2, x3, x4, y1, y2, y3, et y4 étant dans ce fichier
# les coordonnées des extrémités des pendules) y = integrate.odeint(derivs, state, t)
x1 = L1*sin(y[:,0]) y1 = -L1*cos(y[:,0])
x2 = L2*sin(y[:,2]) + x1 y2 = -L2*cos(y[:,2]) + y1
fig = plt.figure(figsize=(4.5,5.0), facecolor='white')
ax = fig.add_subplot(111, autoscale_on=False, xlim=(-2, 2), ylim=(-3, 1.5)) ax.grid()
line3, = ax.plot([], [], '-', color='r',lw=1) line4, = ax.plot([], [], '--', color='y', lw=1) line, = ax.plot([], [], 'o-', lw=3)
line2, = ax.plot([], [], 'bo',markeredgecolor='r',markerfacecolor= 'y',markersize=10.0) time_template = 'time = %.1fs'
time_text = ax.text(0.05, 0.9, '', transform=ax.transAxes)
def init():
line.set_data([], []) line2.set_data([], []) line3.set_data([], []) line4.set_data([], []) time_text.set_text('')
return line, line2, line3, line4, time_text
def animate(i):
thisx = [0, x1[i], x2[i]]
thisy = [0, y1[i], y2[i]]
thisx2 = [x1[i], x2[i]]
thisy2 = [y1[i], y2[i]]
x3.append(x1[i]) y3.append(y1[i]) line3.set_data(x3, y3) x4.append(x2[i]) y4.append(y2[i]) line4.set_data(x4, y4) line.set_data(thisx, thisy) line2.set_data(thisx2, thisy2)
time_text.set_text(time_template%(i*dt)) #plt.savefig(base_name + '{:04d}.png'.format(i)) return line, line2, line3, line4, time_text
ani = animation.FuncAnimation(fig, animate, np.arange(1, len(y)), repeat = False, interval=47, blit=True, init_func=init)
plt.show()