Cart-pole (inverted pendulum) with PID control. Watch the pendulum balance upright on a moving cart, tune the controller, or destabilize it with a kick to see how the controller recovers.
RK4 integrator, substepped at 0.5 ms, runs entirely in the browser.
x
0.000
m
theta
0.0
deg
F
0.00
N
|theta|max
0.0
peak (deg)
The cart-pole has four state variables: cart position x, cart velocity v, pole angle theta (0 = straight up), and pole angular velocity omega. The PID controller drives the cart to a setpoint x_ref = 0.
https://hongbinli.ca/tools/inverted-pendulum-simulator