Double Pendulum
Double Pendulum
2 Code
2.1 Initializing values and arrays
1 % Define
2
Parameters
g = 9.81;
3 L1 = 1;
4 L2 = 1;
5 m1 = 0.5;
6 m2 = 0.25;
7
8
% Array of time elements
dt = 0 .001 ;
9
t = 0: dt :25;
10
15
% Updating initial values of the
16 arrays theta 1 (1) = 1;
17
theta 2 (1) = 0;
omega 1 (1) = 0;
18
omega 2 (1) = 0;
19
20
21
22
19
% Displaying output of the
20 array disp ( theta 1 )
21 disp ( omega
1 ) disp (
22 theta 2 ) disp
23
( omega 2 )
13
14
15
3
CH2061 Computational Techniques
3 Graphs
As values of theta change, the motion of the double pendulum also varies greatly. I have
plotted different graphs of different initial theta values.
4
CH2061 Computational Techniques
5
CH2061 Computational Techniques
4 Conclusion
I have observed that the double pendulum showcases a range of motion, with the in
phase, out of phase and chaotic motion being the extremes. These different motions
can be viewed by modifying the angle or the angular velocity or both.