Ball and beam, or balancing ball, is a very popular example used for teaching control theory. The ball and beam control problem has been added as a new example model at the SystemModeler industry example page, here.

Inside the downloadable model, you can try out different parameter settings. Two different control schemes have been provided together with the model, a PID controller and a LQ regulator. The model also comes with CAD models of the ball and beam that are used to animate the simulation results:

Additionally the download comes with a Mathematica notebook that provides instructions on how to automatically tune PID parameters and calculate linear quadratic gains from the Modelica model. From the notebook, Modelica components are created that are used to control the ball and beam.

Even more control theory related models are available at the SystemModeler industry example page, such as LEGO Segway, PI-controlled Tank System, Arduino Robot Arm, and Model Inversion Control of a Hoist Crab.