A homogeneous rod on a cart, stabilised by delayed PD control. Past the critical delay τc the upright position loses stability in a Hopf bifurcation and the cart starts to rock. For larger derivative gain Kd the oscillation then breaks its left–right symmetry before the pendulum falls.
M = 1 kg, m = 0.3 kg, L = 1 m, g = 9.81 m/s². τc is recomputed from the linearisation whenever the gains change.
Rod of length L and mass m (centre of mass at l = L/2, moment of inertia mL²/12 about it), cart of mass M driven by a horizontal force F. x is the tilt from upright, y the cart position.
All four states are measured τ seconds late. The cart gains are much smaller than the angle gains. For an inverted pendulum they carry the same sign as the angle gains: the cart briefly moves away from the origin to lean the rod back towards it.
Linearising about x = y = 0 gives the characteristic equation
with K(λ) = Kp + Kdλ, k(λ) = kp + kdλ, D = l(4M+m)/3, a = (M+m)g/D.
A pair of roots crosses the imaginary axis at λ = ±iωc when τ = τc. With Kd = 7 the bifurcation is supercritical: the amplitude grows like √(τ − τc) until, about 10 % above τc, the pendulum falls.
The equations are invariant under (x, y) ↦ (−x, −y), and the Hopf orbit inherits that symmetry: its mean tilt x̄ is zero. The fall corresponds to a connecting orbit. For larger Kd the orbit first loses its symmetry. In simulations without cart feedback, the pendulum falls from the symmetric orbit for Kd = 4. Symmetry breaking comes first at about 1.18 τc for Kd = 5.5, 1.13 τc for Kd = 7 and 1.03 τc for Kd = 13. In each case the fall follows only at 1.26–1.28 τc. The pendulum then oscillates about a tilted mean x̄ ≠ 0. Averaging the cart equation over one period gives the balance
Without cart feedback (kp = kd = 0) the leaning oscillation is a stable periodic orbit of the angle equation, and the cart accelerates steadily towards the lean. With the small cart gains the balance cannot hold for long. The cart runs off, its own feedback pushes the tilt over to the other side, and the cart runs back. You see a fast oscillation with a slowly flipping mean tilt, and large, slow cart sweeps.