Documente Academic
Documente Profesional
Documente Cultură
r=0
Ball
Beam
Pivot
Arm
X
Pivot
R0
R1
Ball
D
d
Beam
Page 1
Definitions
Prior to commencing with the derivation of the dynamics we will make a few definitions.
Fixed Parameters
L (m) is the length of the beam,
d (m) is the distance from the pivot to the plane of ball contact on the beam,
D (m) is the distance from the pivot to the centre of mass of the beam,
R0 (m) is the radius of the ball,
R1 (m) is the distance between the axis of rotation of the ball (centre of gravity) and
the point of contact of the ball with the beam,
m (kg ) is the mass of the ball,
M (kg ) is the mass of the beam (located at d (m) from the pivot),
C1 ( N/(m/s)) is the viscous friction coefficient between the ball and the beam (and
accounts for ball rotational viscous losses to since these enter at the same dynamic
order),
J beam (kg.m 2 ) is the moment of inertia of the beam, including all rotational
components such as rotor including beam mass offset (parallel axis theorem),
g = 9.81m/s 2 is the gravitational acceleration.
Independent Variables
r (m) is the displacement of the ball along the beam. Positive r is when the ball is
traveling to the right and r = 0 represents the centre of the beam,
(rad) is the angular rotation of the beam, where a counter-clockwise direction is
positive,
i (A) is the current flowing through the servo-motor,
V (V) is the voltage applied to the servo-motor.
Dependent Variables
(Nm) is the torque the servo-motor applies to the beam, where a counter-clockwise
direction is positive,
Fg ( N) is the force due to gravity acting through the centre of mass of the ball,
Electrical System
Rm () is the electrical resistance of the servo-motor,
Page 2
Assumptions
Before deriving the dynamics of the system a number of assumptions must be made. These
are:
The motor shaft and the beam are assumed to be rigidly coupled and infinitely stiff
There is no skidding between the ball and beam contact
There is no backlash in the motor/gearbox assembly
There is no static friction in either the ball/beam contact or in the motor/gearbox
assembly and damping is limited to viscous losses
Differentiating this with respect to time we get the velocity of the ball
x& c = r& cos( ) r sin( )& (d + R1 )cos( )&
y& = r& sin( ) + r cos( )& (d + R )sin( )&
c
Page 3
Ball
Ball
Beam
Substituting the expressions for the moment of inertia of the ball and the angular velocity of
the ball gives
2
2
1 r& cos( ) r sin( )& (d + R1 ) cos( )& 1
r&
1
2 &
+ mR0 + J beam (&) 2
Ek = m
2
2 + r& sin( ) + r cos( )& (d + R ) sin( )& 5
R1
2 4243
1
1
144444444444424
444444444443
Beam
Ball
We may now define the Lagrangian being the difference in kinetic and potential energies,
L = Ek E p
From this we obtain the Lagrange equation
L
L
+ Ci q& i
= Qi
t q& i
qi
where qi = r, is the generalised coordinate, Ci is a generalised viscous damping coefficient
and Qi = 0, is the generalised force.
0
&& d R 2 R0 r & 2 + g sin( ) + C r& = 0
+
m &r&1 +
(1)
1
1
2
{ 1
424
3 {
5 R1 Centrifuga
5 R1
l
Ball
Gravitational
Damping
()
and
2 R0
2
1
442454R4
14
3
Rotation 1444442444443
Ball
Rotation
Ball Translation
+ 21
mr
r&& gMD sin( ) gm(sin( )( R1 + d ) + r cos( ) ) + C2& =
23
14243 144444244444
3 {
Coriolis
Beam Gravitational
Ball Gravitational
( 2)
Beam
Damping
Page 4
These two equations can be solved in terms of the acceleration of the ball and angular
acceleration of the beam, as given by
2
3
&2
+ 5 R12 MDg sin( ) + 2 R02 MDg sin( ) 5 R1dmgr cos( ) 5 R1mgr 2 sin( )
2
2
+ 5 R1 + 5 R1d + 2 R0
2
2
2
2
&
&
&
&
&
2
2
2
2 & 2
3
&
&
2
+ 5 R1r & J beam 5 R1C2 d& + 10 R1 dmr & 10 R1dmrr&&
&r& = R1
2 R02 md 2 + 2 R02 mr 2 + 5 R12 mr 2 + 5 R12 J beam + 2 R02 J beam
()
()
()
()
()
()
(3)
and
()
1
2
2
2
2
2
2
&
&
&
+ 5 R12 + 2 R02
+ 2 R0 MDg sin( ) 2 R0 C 2 5 R1 C1dr& + 5 R1 dmr 10 R1 mrr&
2 R1 R02 C1r& + 2 R02 R1mr & + 2 R02 mgd sin( ) 2 R02 mgr cos( )
&
&
=
2 R02 md 2 + 2 R02 mr 2 + 5 R12 mr 2 + 5 R12 J beam + 2 R02 J beam
()
()
]
(4)
Page 5
e = 0
&e = 0
(5)
1
A22
0
A23
0
A42
0
A43
0 r 0
A24 r& B21
+
1 0
A44 & B41
( 6)
where
A21 = mgR1 (5R1d + 2 R02 + 5R12 ) /(2 R02 md 2 + 5R12 J beam + 2 R02 J beam )
A22 = R12C1 (2 R02 + 5d 2 + 10 R1d + 5R12 + 5 J beam / m) /(2 R02 md 2 + 5R12 J beam + 2 R02 J beam )
A23 = gR1 ( 2 R02 MD 5 R1 J beam + 2 R02 md + 5 R12 MD + 5 R1dMD ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
A24 = C2 R1 (5 R1d + 5 R12 + 2 R02 ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
A41 = mg (5 R12 + 2 R02 ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
A42 = C1 R1 (5 R1d + 5 R12 + 2 R02 ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
A43 = g ( 2 R02 md + 5 R12 MD + 2 R02 MD ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
A44 = C2 (5 R12 + 2 R02 ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
B21 = R1 (5 R1d + 5 R12 + 2 R02 ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
B41 = (5 R12 + 2 R02 ) /( 2 R02 md 2 + 5 R12 J beam + 2 R02 J beam )
Page 6
(8)
A22
A23
A24
A42
A43
A44
Km
Lm
r 0
B21 K m 0
r&
0 0
V
+
B41 K m & 0
Rm 1
i
Lm Lm
0
(9)
Page 7
Literature review
There are numerous papers addressing the ball and beam system. Some of these are reported
here and are grouped according to simplifications/assumptions. Given the relatively simple
dynamics there is a surprising lack of published works presenting the full dynamics.
Sobhani et al: C1 = C 2 = 0
Sobhani et al1 appear to be the only authors that have attempted to completely describe the
non-linear dynamics of the ball and beam system. Their results do not agree with Equations
(1) and (2) above. The only apparent assumption they make is that the system is lossless, ie
C1 = C 2 = 0 . They only consider the mechanical system and do not calculate the coupled
electro-mechanical system.
They use a slightly different notation where R1 = r * , d = h* , D = s0 , = , r = x .
It should be noted that there are many errors in their paper. There is a small dimensionality
error in their equation for the beam response (Equation 10); the term mgr cos( ) is missing
the r . There also seems to be terms missing g sin( )(mR1 + md ) for the fact that the centre
of mass of the ball does not pass through the pivot point. There is an unusual velocity term
m(d + R1 )(&) 2 which seems to be some sort of Coriolis force? Finally the coefficients of
the && do not match at all.
Sobhani, M., Neisius, B., Jayasuriya, S., Rumler, E. and Rabins, M.J. (1992) Some new insights on the
classical beam and ball balancing experiment, Proceedings of the American Control Conference, 450-454
2
White,W. and Patenaude, J. Ball and beam dynamics, Kansas State University:
http://www.mne.ksu.edu/research/laboratories/non-linear-controls-lab/main-pages/problemtypes/ball-and-beam
3
Hauser, J., Sastry, S., & Kokotovic, P. (1989) Nonlinear control via approximate inputoutput linearization:
The ball and beam example, 28th control and decision conference, Tampa, FL (pp. 19871993).
4
Hauser, J., Sastry, S. and Kokotovic, P. (1992) Nonlinear control via approximate input-output linearization:
The ball and beam example, IEEE Transactions on Automatic Control, 37(3), 392-398.
5
Li, J., Wang, H.O., Niemann, D. and Bushnell, L. (1998) Nonlocal control of the ball and beam system:
Regulation and tracking, IEEE World Congress on Computational Intelligence.
6
Guo, Y., Hill, D. and Jiang Z.-P. (1996) Global nonlinear control of the ball and beam system 1996.,
Proceedings of the 35th IEEE Conference on Decision and Control, 3, 2818-2823.
Page 8
rolls along its radius (not very practical) R1 = R0 and that the centre of mass of the ball passes
through the axis of rotation of the beam d = R1 which drastically simplifies the resulting
equations.
There is a small error in their work: they failed to include the dynamic forces that occur on the
ball due to the rotational acceleration of the beam, namely
r&
r&
1
1
J ball ( ) 2 J ball (& ) 2 .
R1
R1
2
2
14
4244
3 144244
3
Hauser
Correct
In doing so, there are two terms that have been neglected in the nonlinear DE:
2
J
J
&r& m + ball
m&& ball mr & + mg sin( ) = 0
2
R0
R1
1424
3
()
missing term
and
J &r&
ball + &&(J ball + J beam + mr 2 ) + 2mrr&& + mgr cos( ) =
R0
123
missing term
Zhang, F. () Chapter 1 Feedback linearization control of systems with singularities: A ball-beam revisit,
Mathworks.
8
Lai, M.C., Chien, C.C., Cheng, C.Y., Xu, C.Z. and Zhang, Y. (1994) Nonlinear tracking control via
approximate backstepping, Proceedings of the American Control Conference, Baltimore, 1339-1343.
9
Jonsonn, O. (1990) Modelling and control of the ball and beam process.
10
Wellstead, P. (2000) Introduction to physical system modelling, Control Systems Principles,
http://www.control-systems-principles.co.uk/ebooks/Introduction-to-Physical-System-Modelling.pdf
11
Rosales, E.A. (2004) A ball-on-beam project kit, Undergraduate Thesis, Department of Mechanical
Engineering, MIT.
Page 9