To provide some background information for my N-link pendulum project, I’ve broken the methodology for solving the equations of motion (EOM) for a simple double pendulum into a separate post. I’ll explain to the best of my abilities!
The pendulum that we are solving for is composed of two masses, m1 and m2, suspended from each other by strings of length l1 and l2. Their positions relative to 0 is represented by theta1 and theta2. The entire pendulum is supported by point 0, which is a frictionless, massless point. The whole thing is a pain to create digitally, so I drew the setup below:
This will be a pretty long post, so scroll to the bottom for the cool graphs!
We’ll find the equations of motion in Polar coordinates, since it means that we only need two equations instead of four. (The two being and the four being ax1, ay1, ax2, ay2.)
By doing basic trig, we can find the EOM of the masses using time derivatives of the unit vectors. In this case, and .
Position:
Velocity:
Acceleration:
We know that , so to properly simulate this system we must also account for the tension and gravity forces.
The sum of forces is:
Note at ax1, ay1, etc. are the same as the acceleration equations we previously found.
Because tension is a reactionary force, we’ll solve for T1 and T2 in order to isolate equations for .
Solving for T1:
Setting the two equations equal to each other:
Now for T2:
Setting the two equal:
Now we have two equations and two unknowns! We can solve for in terms of . This was a bit of a behemoth venture and it took me 14 pages….
UNTIL I REALIZED that I had dropped a negative sign. Throw it into Matlab using the syms function and have it spit out the correct equations. Which, if you were curious, look like this:
t1dd = -(L1*M2*sin(2*t1 - 2*t2)*t1d^2 + 2*L2*M2*sin(t1 - t2)*t2d^2 + M2*g*sin(t1 - 2*t2) + 2*M1*g*sin(t1) + M2*g*sin(t1))/(L1*(2*M1 + M2 - M2*cos(2*t1 - 2*t2)));
t2dd = (M1*g*sin(2*t1 - t2) + M2*g*sin(2*t1 - t2) - M1*g*sin(t2) - M2*g*sin(t2) + L2*M2*t2d^2*sin(2*t1 - 2*t2) + 2*L1*M1*t1d^2*sin(t1 - t2) + 2*L1*M2*t1d^2*sin(t1 - t2))/(L2*(2*M1 + M2 - M2*cos(2*t1 - 2*t2)));
(terrifying).
Using all this information, you can put the equations into Matlab’s ODE45 to plot the motion of the simple pendulum!
Whew, that was quite a ride. Cool, innit?
-Sophie
Ome Hoque
Much appreciated!
Sophie
Glad I could help!