Mathematical Models

Hardware Model
The mathematical model for the Ball-and-Beam is investigated to determine the appropriate rules, which govern the assembly. The first task was to verify the ball dynamics. This was done by recognizing the basic ball and beam geometry.

When applying Newtonian mechanics and the linear property of small angles, the following equation was verified.

Thus, the desired transform was verified in being the following.

The system dynamics was found by simple geometry of the beam and motor.

Applying the liner property of small angles the following equation was determined and verified.

Finally, the motor dynamics of the system were verified referencing control system textbooks to lookup the electrical characteristics of the motor and the torque equations.

Motor Dynamics

 
The output is the angle q measured at the large gear. It is measured using a 10k Ohm mechanically continous turn potentiometer. The electrical rotation however is 352 degrees.
 
The total track length is 16 inches (40.5 cm). The total track resistance is approximately 300 Ohms. The two bias resistors are 210 Ohms each.
 
Control Model
With the ball and motor dynamics determined, the block diagram below can be implemented to control the Ball and Beam. One closed loop controls the ball position through the beam angle a, while the other controls a by controlling the motor angle output q as a function of the input voltage Vin.
 
 
The subscripted signals represent the desired positions while the others represent the measured positions. The control laws to be implemented are shown in Equations 1 and 2.

a = Px (xd – x) + Dxx¢ (1)

Vin = Kp (qd - q) +Kd (2)