Maths Index  
The Simulation 
The pendulum may seem to be a very simple dynamic system, but it can exhibit a wide variety of behaviours.
If there were no friction or air resistance, once set in motion, the pendulum would swing forever in regular periodic motion. To see this in the simulation, the damping force can be set to zero.
In the real world, the pendulum will gradually slow down until it comes to rest. This can be modelled by adding a damping force.
Much more complicated behaviour can be observed if the pendulum is subjected to an external driving force. In this simulation, the driving force is always periodic. It is the conflict between the period of the driving force and the natural period of the pendulum that can produce complicated patterns of motion.
See below for examples of different patterns that are produced using the default settings in the simulation, but changing the value for the driving force. For some values of the driving force the system settles down into the same steady state regardless of the initial conditions. For other values there may be several different possible steadystate motions. And at yet other values of the driving force the motion becomes chaotic  it never settles down into a steady state, and any slight change in the initial conditions leads to a very different future.
Back to Top...The start button will start the simulation using the values from the table of settings.
The stop button will stop the simulation prematurely.
When the simulation is running, the current time and the number of steps are shown.
The plot is updated after each step, and the step size is adjusted as described in the
Mathematics section.
The simulation shows two plots.
The first is just a snapshot of the pendulum at the current time in the simulation. 

The second plot is called the phase diagram. It is a plot of the angle of the pendulum against its
speed (angular velocity). In this diagram the system is in a steady state. The pendulum traces out the same track on the phase diagram over and over again. The picture was obtained using a value of 0.9 for the driving force and all other inputs at their default values. 

The pale grey lines mark the position where the pendulum is vertically above its pivot point. If the pendulum swings right over the top, the line on the phase diagram will go off the graph at one side and reappear at the other side, as illustrated here. For this picture the driving force was 1.35. Again, this is a steady state situation. 

With a driving force of 1.15 the system exhibits chaos. 
The second plot can also show the Poincaré section. This is shown as red dots which mark a fixed point in the drive cycle. The plot of the Poincaré section can be turned on using the advanced settings.
With a driving force of 1.35 there is just one red dot on the Poincaré section. This means that the pendulum is swinging in time with the driving force.  
With a driving force of 1.45 there are two red dots. After two drive cycles the pendulum is back where it started on the phase diagram. This period doubling happens again, so that with a drive force of 1.47 there are four red dots.  
With a driving force of 1.15, the system is chaotic and the Poincaré section has many red dots. This plot was obtained by setting the plot time to 10000. 
Drive frequency  the frequency of the driving force as a proportion of the natural frequency of the pendulum. 
Drive force  the amplitude of the driving force. Set this to zero to see the motion of an undriven (free) pendulum. 
Damping  this models the effect of resistance and friction. Set it to zero for an undamped (ideal) pendulum which would swing forever without any external force being applied. If you are reading Baker and Gullub, note that damping in this model is 1/q, so my terminology is not quite the same as theirs. 
Ignore Time Intervals  the time to be ignored before plotting starts. This is to allow the system to settle down into a steady state before plotting the phase diagram. The ignored time intervals are calculated as fast as possible. Although each time interval represents half a second, the actual elapsed time for the ignored time intervals will be considerably shorter than this  unless you have a very slow computer. 
Plot Time Intervals  the number of time intervals to be plotted after the ignored time has elapsed. So the total time that the simulation runs is ignore time plus plot time. Each time interval is half a second. 
Start angle  the angle at which the pendulum is released at the start of the simulation. The angle is measured in radians in an anticlockwise direction starting from the bottom or rest position. 
Start Velocity  the speed of the pendulum at the start of the simulation. A positive speed represents anticlockwise motion. By default this is set to zero. 
Show pendulum  you may wish to suppress the plot of the pendulum, particularly if you are running the simulation as fast as possible. 
Show phase diagram Show Poincare 
the second plot can show the phase diagram or the Poincaré section, or both. 
Drive phase  the fixed point in the drive cycle (given in radians) at which the Poincaré section is drawn. 
Animation speed  the speed of the animation can be changed, so that one time interval is something other than half a second. 
Fast as possible  run the simulation as fast as possible. 
This cannot be solved analytically, so a numerical method must be used.
This simulation uses the fourth order RungeKutta (RK4) method of numerical integration. The accuracy depends on the step size, so the step size is adjusted during the simulation, as described in Baker and Gollub page 149. Each step is calculated both as a single step and as two half steps. The step size increased or decreased depending on how well the two results agree.
Back to Top...