source code in HTML
source code in PDF

Triple pendulum with damping

Nasser M. Abbasi

September 1, 2011 compiled on — Wednesday July 06, 2016 at 08:24 AM
This Demonstration provides basic motion simulation of free moving damped triple pendulum. It can also be used as a double pendulum or a simple pendulum since the number of bobs is a configurable parameter. Viscous damping is due to the pendulums moving in fluid. Phase portrait diagram is updated during simulation. Energy of the system is displayed as the simulation is running and is seen to be constant as expected when damping is not present. Initial conditions for the positions of the pendulum bobs can be adjusted either using the mouse (by dragging a bob to a new location) or by using the control slides.

For double and triple pendulum, the phase portrait is applied to the inner most bob.

The equations of motion of the pendulum were derived using the Lagrangian energy method. For the n  -bob pendulum, there are n  -second order nonlinear differential equations and n  degrees of freedom. The equations are kept in their non-linear form since NDSolve was used for the solving them.

Mathematica was used to do the analytical derivation due to the high complexity of algebra for the n = 3  case.

Initial position conditions can be changed by dragging the bob using the mouse. When the mouse is clicked on the display, it will pause and then the mouse can be used to drag the bob to a new location. Logic inside the Demonstration will detect which bob to drag based on the proximity of the mouse current location to known bob positions.

Below is description of each control variable shown on the Demonstration: The top buttons Labeled run, pause, step, reset are self explanatory and used to control the simulation. The control labeled duration is used to set the maximum simulation time. When this time is reached, the simulation will restart again from t = 0  automatically.

The control labeled △t  is used to change the time step for the display. The smaller the time step, the more accurate the simulation will be, but it will take longer to complete.

The control labeled number of bobs is used to change the pendulum type to either simple, double or triple. The controls below that are used to adjust the mass of the bobs, units are in kg. All units in this simulation are in SI units. The controls below that are used to change the length of each pendulum bar.

The controls below that are used to set the initial conditions. Units are in radians for the angles and in radians per second for the angular velocities. Initial angle positions can also be set using the mouse as mentioned above, however, using the controls might provide more accurate settings if needed. For convenience, small buttons next to the control variables can be used to quickly set the value to zero.

The g control is used to select the gravitational constant g  . The control labeled show phase is used to turn on and off the phase portrait plot. The red point in the phase portrait plot indicates the initial conditions, and the black point is the position at the end of the duration. The moving blue point is the position in phase space at the current time.

The control labeled c is used to change the damping coefficient. At the bottom is a display of the energy plot, it shows the current kinetic energy (KE), potential energy (PE) and the total energy in Joules.

The angles θ1,θ2,θ3   are all measured from the vertical line. When the pendulum is hanging vertically at rest, then all angles will have zero values at this position.

The angles and velocities are taken to be positive in anticlockwise direction.


Dare A. Wells, Schaum's Lagrangian Dynamics, McGraw-Hill, 1967