# Ball and Beam

(Ball and Beam)

Ball and Beam

Abstract

The ball and beam system can usually be found in most university control labs since it is relatively easy to build, model and control theoretically. The system includes a ball, a beam, a motor and several sensors. The basic idea is to use the torque generated from motor to the control the position of the ball on the beam. The ball rolls on the beam freely. By employing linear sensing techniques, the information from the sensor can be taken and compared with desired positions values. The difference can be fed back into the controller, and then into the motor in order to gain the desired position. The mathematical model for this system is inherently nonlinear but may be linear around the horizontal region. This simplified linear model, however, still represents many typical real systems, such as horizontally stabilizing an airplane during landing and in turbulent airflow.

Ball and Beam (Manually)

Mathematical Modeling

Assumptions

Settling time less than 3 seconds

Overshoot less than 5%

Symbols| Description| Values|

M| Mass of The Ball| 0.2 kg|

R| Radius of the Ball| 2cm=0.02 m|

d| Lever Arm Offset| 0.03 m|

G| Gravitational Acceleration| 9.8 m/s2|

L| Length of the Beam| 1.5 m|

J| Ball's Moment of Inertia| (2/5) x M x R2 =9.99e-6 kgm2| r| Ball Position Coordinate| |

Alpha(α)| Beam Angle Coordinate| |

Theta(θ)| Servo Gear Angle| |

Open loop equations

By using the langragian expression we get the equation of rolling ball.

PID

(Proportional–Integral–Derivative Controller)

The PID controller, which consists of proportional, integral and derivative elements, is widely used in feedback control of industrial processes. In applying PID controllers, engineers must design the control system: that is, they must first decide which action mode to choose and then adjust the parameters of the controller so that their control problems are solved appropriately. To that end, they need to know the characteristics of the process. As the basis for the design procedure, they must have certain criteria to evaluate the performance of the control system. Such as for our project point of view the given parameters are which are to be maintained 1. Steady State Error = 0,

2. Peak time = minimum,

3. % age Overshoot = minimum

Close Loop Response| Rise Time| Overshoot| Settling Time| Steady State Error| Kp| Decreases| Increase| Small Change| Decreases|

Kd| Small Change| Decreases| Decreases| Small Change|

Ki| Decreases| Increase| Increase| Eliminate|

General Transfer function of PID

KP + KI + KDs =Krs2 +Kps+ KI

S S

Closed-loop Representation

State-Space Function

The linear system equations can also be represented in state-space form. This can be done by selecting the ball's position (r) and velocity (r dot) as the state variable and the gear angle (theta) as the input. The state-space representation is shown below:

However, for our state-space example we will be using a slightly different model. The same equation for the ball still applies but instead of controlling the position through the gear angle, theta, we will control the torque of the beam. Below is the representation of this system:

Ball and Beam (MATLAB)

Transfer Function

To get Laplace the transfer function of the system in MATLAB we can implement it by inputting the numerator and denominator in vector form. Symbols| Description| Values|

M| Mass of The Ball| 0.2 kg|

R| Radius of the Ball| 2cm=0.02 m|

d| Lever Arm Offset| 0.03 m|

G| Gravitational Acceleration| 9.8 m/s2|

L| Length of the Beam| 1.5 m|

J| Ball's Moment of Inertia| (2/5) x M x R2 =9.99e-6 kgm2|

By solving the system manually we get the transfer function that is K = (m*g*d)/(L*(J/R^2+m))

:...

Please join StudyMode to read the full document