Rolling without slipping: x″ = (5/7)·g·sin θ. The 5/7 is a solid sphere’s rotational inertia sharing the load. Mass cancels out.
Nothing in that equation opposes the ball’s motion. Any damping the closed loop shows has to come entirely from the controller.
The beam angle follows the PID command through a first-order servo, τ ≈ 0.15 s, clamped to ±28°. The lag is what tips P-only into instability.
If it separates or rolls off the end it falls under gravity and quadratic air drag (RK4) and bounces off a floor 0.35 m below the pivot.
Angle drives acceleration, acceleration integrates to velocity, velocity to position: two integrations between the input and what you are controlling, a classic hard case. A Segway, a rocket balancing on its thrust, magnetic levitation and the inverted pendulum are the same family.
Proportional-only feedback on a double integrator is only marginally stable even in the ideal case; real actuator lag, like the simulated servo, tips marginal into unstable. That is what the “P only” preset shows, and the derivative term supplies the damping the physics never had. Raise Kd too far and the ball settles smoothly but slowly (overdamped); too little and it oscillates: the usual second-order trade-off in a physical position. Integral mops up small offsets but too much reintroduces oscillation.
For a ball rolling without slipping, mass drops out of the acceleration equation, the same reason a bowling ball and a marble roll down a ramp together. Once airborne, drag scales with 1/mass: a light ball curves off a clean parabola while a heavy one barely notices the air, which is why the mass slider only matters after the ball leaves the beam.
A fast enough beam movement can accelerate away from the ball faster than gravity pulls it back: the contact force the beam would need goes negative, which is impossible, so the ball separates and becomes a free projectile. It bounces if it lands back on the beam, and keeps falling to the floor if it clears the span. Try “Bounce demo”.
The elasticity slider sets what fraction of speed survives each bounce, so the height kept is that fraction squared (kinetic energy goes with velocity squared). A 0.5 elasticity keeps 50% of speed but only 25% of the previous height, which is why bounces decay so fast at seemingly generous settings.
The plant is a pure double integrator (position needs two integrations from angle, with zero natural damping) — under proportional-only feedback that combination is only marginally stable in the idealised case, and the small extra lag from the simulated servo tips it into genuine instability. It's one of the cleanest classroom demonstrations of why "just add more P" doesn't always work.
Since nothing in the physical system opposes the ball's motion, the controller has to supply that damping itself. The derivative term reacts to how fast the error is changing, which is exactly the missing velocity feedback the system needs to settle instead of overshoot forever.
With a well-tuned P and D, the ball already settles very close to the setpoint — integral action mops up any small remaining steady-state offset, but too much of it (relative to P and D) can reintroduce oscillation, the same trade-off as any PID loop.
Any balancing problem built on a double integrator with no natural damping: a Segway or self-balancing robot, a rocket balancing on its thrust, magnetic levitation, or the classic inverted pendulum. Ball-and-beam rigs are a staple of university control labs precisely because they're a physical, visible version of this family of problems.
Because it genuinely shouldn't — for rolling without slipping, mass cancels out of the acceleration equation, the same reason a bowling ball and a marble roll down a ramp at the same rate. Making mass affect the on-beam physics would mean faking a result real mechanics doesn't produce. It matters once airborne instead, through air drag, which is real and mass-dependent.
It becomes a genuine projectile — real gravity, real air drag, no scripted fallback. If it re-lands within the beam's span it bounces there with the same restitution physics; if it clears the beam entirely or rolls off the end, it keeps falling until it hits the floor below, bouncing and losing energy each time until it settles.
This page has changed in 192 archived releases, but each of those was a site-wide pass, so none is attributable to this tool on its own and none is listed here. That is not a claim that the tool never changed — a release that reworked many pages at once may well have altered this one too. The changelog has them.