Platform Balance — PID Ball-on-Plate Controller (2D)
Interactive 2D companion to the 3D platform-balance training lab: a steel ball rolls on a tiltable plate under gravity while a live PID loop reads its position error and commands the plate's tilt to roll it back to centre, fighting random disturbances that keep knocking it off course.
The 3D version renders "Balance on a Platform" as an abstract reinforcement-learning training scene — agents, rewards and a policy loss curve, with the actual control problem happening off-screen. This 2D companion pulls that problem into the open: a ball rolls under real gravity on a circular plate, and a classic PID controller — not a black-box policy — reads the ball's position error and commands the plate to tilt, roll the ball back toward the centre, and hold it there. Kp sets how aggressively the plate reacts to being off-centre, Kd damps the response so it settles instead of oscillating past the target, the actuator has a limited slewing speed so the tilt can't snap instantly, and the disturbance slider fires random pushes at the ball to see how well the tuned loop rejects them. Push Kp too high with no damping and the ball overshoots and oscillates; push disturbance too high and even a well-tuned loop eventually loses the ball off the edge.
A 2D PID ball-on-plate balancer: a ball rolls on a tiltable circular platform under gravity while a proportional-derivative controller with a slew-rate-limited actuator steers it back to centre, tested against tunable random disturbance pushes.
2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install