Inverted pendulum (source code)

= Inverted pendulum

An <inverted pendulum> has its <center of mass> above its pivot. For a point <mass> $m$ on a massless rod of length $\ell$, let $\theta$ measure departure from the upward vertical. The <gravitational potential energy> is $mg\ell\cos\theta$, and the <equation of motion> is $\ddot\theta=(g/\ell)\sin\theta$.

For small $\theta$, <linearization> gives exponentially growing and decaying solutions with rate $\sqrt{g/\ell}$: the upright <equilibrium> is unstable. A moving support or an applied <torque> can stabilize it through <feedback control>. Balancing a rod on a hand makes this visible: the hand continually moves the pivot to counter the growing departure.