Kapitza pendulum

step 0
Loading the engineShared by all simulations, so the next one opens instantly.
The physics

A rigid pendulum has one stable resting position, hanging straight down. Shake its pivot up and down quickly enough and a second one appears: the pendulum stands upright, and when nudged it rocks back toward the vertical instead of falling. Andrew Stephenson described the effect in 1908. Pyotr Kapitza explained it in 1951 by averaging over the fast motion of the pivot, and the setup now carries his name.

What you see

The rod swings about a pivot that slides up and down along a dashed vertical guide, and the bob leaves a fading trail. A line at the bottom of the canvas gives the angle θ and the angular velocity θ̇ in radians, with θ = 0 hanging down and θ = π upright.

Stable inverted position: g/l = 9.81, a/l = 0.5, ω = 10 rad/s, started at rest exactly upright. The upright position is an equilibrium, and with this drive it is also stable, so the pendulum stays there.

Small perturbation from inverted: the same drive, started 0.05 rad from upright. The pendulum does not fall. It rocks slowly about the vertical, with a small jitter at the drive frequency on top.

Normal hanging pendulum: the drive is off (a/l = 0) and the pendulum starts at 0.5 rad. It swings like an ordinary pendulum with a period of about 2 s.

Chaotic swinging: a/l = 0.3 and ω = 5 rad/s, starting at 0.5 rad. Here (a/l)2ω2=2.25, far below 2g/l≈19.6, so the upright position is not stabilized. The drive frequency is close to twice the natural frequency g/l≈3.1 rad/s, the condition for parametric resonance: the swing grows until the pendulum goes over the top, and it then tumbles in an irregular sequence of turns.

Governing equation

With θ measured from the downward vertical and the pivot at height z(t)=−acos⁡ωt, the pivot’s acceleration adds to gravity:

θ¨=−(gl+alω2cos⁡ωt)sin⁡θ.

There is no damping. When the drive is fast (ω≫g/l) and small (a≪l), averaging over one drive period gives an effective potential with an extra term a2ω24l2sin2⁡θ per unit ml2. The upright position becomes a minimum when

a2ω2>2gl,

and small oscillations about it have the angular frequency

Ω=a2ω22l2−gl.

The simulation integrates the equation with fourth-order Runge-Kutta by default, in eight substeps per step.

Parameters

g/l (gravity ratio): 0.1 to 20 s⁻², default 9.81 (a 1 m pendulum on Earth). It sets the natural frequency g/l and how strongly gravity pulls the upright pendulum over.

a/l (drive amplitude): the pivot’s amplitude in units of the rod length, 0 to 2, default 0.5. Zero turns the drive off.

ω (drive frequency): angular frequency of the pivot, 1 to 50 rad/s, default 10. At the defaults (a/l)2ω2=25 against 2g/l=19.6, so the upright position is stable.

timestep dt: 0.001 to 0.02 s, default 0.005.