A damped driven pendulum is often used as a basic example of a chaotic system. For a chaotic system the future behavior is highly dependent on the exact value of the initial conditions. A tiny change in initial conditions can cause huge changes after a short period of time.

The pendulum is subject to frictional damping, meaning that it will slow down over time if there is no driving force. To see this try setting the drive amplitude to zero, so the only forces are damping and gravity.

The driving force is shown as a curved arrow in the simulation. The length of the arrow corresponds to the amount of torque (twisting force) at a given moment. The direction of the arrow, clockwise or counter-clockwise, shows the direction of this applied force. You can change the amplitude (strength) of the driving force or its frequency (how often it switches directions).

Not all combinations of the parameters (eg. length, gravity, drive amplitude, drive frequency, damping,...) will lead to chaos. Many combinations result in simpler repeating behavior. Click the "single loop" button above to see this. You'll need to wait about a minute for the simulation to settle into the loop.

There is a phenomenon known as *period doubling* or *bifurcation* where slowly increasing one of the parameters (such as drive amplitude) causes the number of loops in the repeating behavior to double. Some of the buttons (above) change the drive amplitude gradually so that you see this period doubling occur.

After enough period doublings occur, the system becomes chaotic. Click one of the buttons labelled "chaos" to set the parameters and see this. A curious thing about this chaotic behavior is that it is not entirely random. While you can't predict the exact state of the system at a given time in the future, it is possible to show that the system will follow an elaborate pattern, These patterns are *fractals*, which are patterns that repeat themselves when you magnify them.

The pendulum is modeled as a point mass at the end of a massless rod. The damping (friction) is proportional to the angular velocity of the pendulum. There is also an external driving force which provides a periodic torque (twist). We define the following variables:

θ = angle of pendulum (0= vertical)R = length of rodm = mass of pendulumg = gravitational constantb = damping (friction) constantA = amplitude of driving forcek = constant related to frequency of driving forcet = time in seconds

We will derive the equation of motion for the pendulum using the rotational analog of Newton's second law for motion about a fixed axis, which is

∑ τ = sum of applied torquesI = rotational inertiaω = angular velocityα = θ''= angular acceleration

The rotational inertia about the pivot is ^{2}

The torque due to gravity is

The torque due to friction is

The torque due to driving force is

So we have

m R^{2} α = -R m g sin θ - b ω + A cos(k t)

which simplifies to

-g -b θ' + A cos(k t) θ'' = ——— sin θ + ———————————————————— R m R |

This is the equation of motion for the driven damped pendulum.

To solve the equation of motion numerically, so that we can drive the simulation, we use the Runge-Kutta method for solving sets of ordinary differential equations. First we define a variable for the angular velocity

θ' = ω

-g -b ω + A cos(k t) ω' = ——— sin θ + ——————————————————— R m R |

This is the form needed for using the Runge-Kutta method.