A pole is pinned to a cart that can slide left and right along a rail. Left alone, gravity topples the pole in a fraction of a second — it is an unstable equilibrium, the textbook example used to teach feedback control. A controller measures the pole's tilt and the cart's position and pushes the cart back and forth, fast enough and in the right direction, to keep the pole balanced upright.
The cart-pole problem is a standard benchmark in both classical control theory (PID and state-space/LQR design) and reinforcement learning — OpenAI Gym's "CartPole-v1" environment uses this exact same physics to teach RL agents to balance a pole from scratch.
A pole balanced on top of a sliding cart is stabilized live by a tunable feedback controller — nudge the gains, push the pole, and watch the cart race back and forth to keep it upright.
The full nonlinear cart-pole equations of motion drive the pole's tilt and the cart's slide, while a proportional-derivative controller reads angle and angular velocity to compute the corrective force applied to the cart.
Adjust the angle gain, damping and centering sliders, toggle the controller off to watch gravity win, and use the push buttons to disturb the pole and see how quickly — or unstably — it recovers.
The cart-pole system is the standard benchmark for both classical control theory and reinforcement learning, including OpenAI Gym's widely used "CartPole" training environment.