Sie sind auf Seite 1von 9

Ball and Beam Dynamics

Introduction
This report does not omit any mathematical steps in order to reflect
upon details of the mechanical operation of the process.

1. The Process
The ball and beam model consists of a horizontal beam and a DC
motor mechanically attached at the centre of the beam. The angle of
the beam is controlled by the motor. The angle in turn influences the
position of the ball.

2. Mathematical Model Composition


The process model can be broken down into two separate models
a. Model of the angle process with respect to the motor voltage H
φ(s)
b. Model of the ball position with respect to the beam angle Hx(s)
The total transfer function from the input voltage to the voltage that
indicates the ball position is then
H (s) = H ϕ (s) × H x (s)

3. Mathematical Model Derivation


a. Model of beam angle vs. input voltage
The relationship between the input voltage and the angle of the beam
is defined by the DC motor transfer function. The DC motor, used for
angle control application may be thought of as the ‘dirty integrator’ or
the integrator with a filter action as shown in figure 1 on the next page.
Figure 1: General DC motor block diagram for angle control application
The K is the motor constant and the tau is the motor time constant.
The actual model of the motor used for the project is shown in figure 2.

Figure 2: Actual block diagram of the DC motor used

The measured constants are summarized below:


rad
K m = 229 sec
V
τ = 0.4 sec
K gear = 1
25
K var iable pot = 1.26 rad
V

Therefore the DC motor transfer function becomes


θ( s) 11 .54
=
V (s) s (1 + 0.4 s )
b. Model of ball position vs. beam angle
Consider the following sketch

Figure 3: Rolling ball free-body diagram


The inclination is considered the x-coordinate.

d 2 x ••
Let acceleration of the ball be denoted as =x
dt2
The force due to translational motion is then
••
F tx= m x
The torque developed through ball rotation is determined by the force
at the edge of the ball multiplied by the radius which can be further
expressed as:
dwb d (v b / R ) d 2 ( x / R) J
Tr = Frx R = J =J =J = x' '
dt dt dt 2 R
where
J = moment of inertia (for solid ball defined by J=2/5*mR2)
Wb=angular velocity of the ball
Vb= speed of the ball along x axis

The equation is arranged such that the final result is expressed solely
in terms of position or its derivatives as well as variables associated
with the ball.
We now obtain the rotational force by dividing torque of the ball by its
radius

Frx = Tr =J x' '


R R2
substituting the moment of inertia into the equation we get
2
Frx = 2 / 5m R x' ' = 2 m x' '
R2
5
In order to make the system independent of the mass of the ball we
further express the above equations as
Frx + Ftx = mg sin α
2 mx' '+ mx' ' = mg sin α
5
2 x' '+ x' ' = g sin α
5
rearranging for x’’ gives
5 g sinα = x' '
7
we utilize approximation sin α = α , since the angle of the beam will not
exceed 20-30 degree inclination. This means that in radians, sine of
the angle is approximately the angle itself, so the equation is further
approximated as
5 gα = x' '
7
taking Laplace transform of position with respect to angle (details
omitted) gives
5 g
X (s)
H x ( s) = = 72
θ ( s) s
The constant in the numerator is a theoretical constant that neglects
surface imperfections and friction. The measured constant is
approximately 0.91 therefore
X ( s) 0.91
= 2
θ( s ) s
Now the overall transfer function of the system becomes
θ (s) X ( s) 10 .5
H (s) = × = 3
V (s) θ ( s) s ( 0.4 s + 1)

where, 10.5 is an approximated constant.

The block diagram of the overall system is

Figure 4: Entire system block diagram


The MATLAB provides easy conversion of the system into state space.
>> num=[0 0 0 0 10.5];
>> den=[0.4 1 0 0 0];
>> [A, B, C, D]=tf2ss(num, den)
− 2.5 0 0 0
 1 0 0 0
A = 
 0 1 0 0
 
 0 0 1 0
1
0
B = 
0
 
0
C = [0 0 0 26 .25 ]
D =0

The LQR control can be implemented by choosing Q and R values. The


controllability is verified first as follows:
>> rank(ctrb(A, B))

ans =

4
This indicates that the ball and beam system is completely state
controllable. Next we select Q and R and calculate for controller gains
in MATLAB. We get
>> Q=[10 0 0 0; 0 10 0 0; 0 0 10 0; 0 0 0 10];
>> R=1;
>> [K,S,E]=lqr(A,B,Q,R)

K=

3.6048 10.5091 8.7444 3.1623

S=

3.6048 10.5091 8.7444 3.1623


10.5091 55.4111 50.2205 19.3050
8.7444 50.2205 72.5913 33.2327
3.1623 19.3050 33.2327 27.6524

E=

-3.9559
-0.9059
-0.6215 + 0.7044i
-0.6215 - 0.7044i
We can see that the gain values are reasonable and therefore the
actual system may perform well.
The simulation in simulink is done using the following block diagram:

Figure 5: Simulink state space model

The Scope measures the output while the Scope1 monitors the control
effort. The snapshots are as shown in figures 6 and 7.

Figure 6: Output converging from IC


Figure 7: Control effort
The initial condition was set to 10cm from the centre at an angle of 5.7
degrees. It is can be seen that the system converges very slowly.
The state variables are:

- angular acceleration θ

- angle of the beam θ



- ball acceleration x

- position of the ball x


The position and the angle can be measured directly with sensors
while the angular acceleration and the ball acceleration will have to be
mathematically estimated. The control voltage V is then
• •
V = K 1 θ + K 2θ + K 3 x + K 4 x

Das könnte Ihnen auch gefallen