Ball and Beam1
Ball and Beam1
Ball and Beam1
2
1
2
1
2
1
0 1
0
0 0
1 0
x
x
y
u
b x
x
x
x
&
&
(4)
The linear models given above are the basis of the controller design for ball and beam systems. A real
ball and beam however has additional dynamic components due to the motor, plus non-linear and noise
components that influence its control behaviour. The main non-linearities are Coulomb friction in the
moving parts and the dead zone and saturation in the motor input amplifier these should be solved by a
3
control-systems-principles.co.uk. Ball and Beam 1: Basics
position control loop on the beam motor. The feedback will have a linearising effect and the feedback
will reduce the impact of the motor dynamics on the overall model. Noise can be a bigger problem the
measurement of the ball position is difficult and all ball position sensing methods have sensor noise. The
ball and beam model is a very simple one. We only require one parameter the gain parameter b . This
can be obtained by measuring the time taken for the ball to accelerate from one end of the beam to the
other for a fixed angle of the beam. The laws of motion can then be used to integrate up equation (1) and
calculate b. For the CE106 Ball and Beam System (see below) the approximate value of b is 0.8.
4. Example of a Ball and Beam System
The CE106 Ball and Beam (figure 3) is a well tested version of the ball and beam problem and is used in
many universities and colleges across the world. It contains all the features that are needed to demonstrate
and teach the control of unstable systems, but is intrinsically safe. The main hardware elements are:
1. The centre-pivoted beam - this carries two parallel wires, which the ball rolls on.
2. The servomotor, M that controls the beam angle.
3. A beam angle sensor
4. A position sensor for the ball on the beam.
Figure 3. The CE106 Ball and Beam System
The CE106 Ball and Beam System from TQ Education and Training Ltd has two parts to the control
system. The first is the control of the beam angle the control voltage to the motor M changes the motor
speed, so it is necessary to make a beam angle position control loop first. The system is designed to make
this easy with a proportional control loop. The real control job is then to use the reference beam angle
input to control the ball position on the beam.
5. Ball and Beam System Controllers
The special feature of the ball and beam is the unstable open loop response this means that there must
be phase advance in the control system in order to stabilise the system. There are a number of alternative
controller design theories that allow this and can be used to stabilise the ball and beam system. Here is a
list of some techniques:
4
control-systems-principles.co.uk. Ball and Beam 1: Basics
1. Proportional plus derivative (PD) control
2. Phase Lead Compensation
3. State Observer with State Feedback Control
4. Linear Quadratic Regulator (LQR)
5. Linear Quadratic Gaussian (LQG)
6. Robust Control
7. Sliding Mode and Variable Structure Control
8. Fuzzy Control
Each of the above can be implemented as a continuous time method or a digital method based on Z
transforms. All of these methods give an acceptable performance if designed with care by an expert. The
ball position sensor noise is a special factor. The control system must have phase advance to stabilise the
ball position, but phase advance can amplify noise at high frequencies, so a compromise is needed. The
ball and beam system is a good example on which to investigate this kind of design/performance
compromise. Variable structure control is impressive on the ball and beam because it is possible to see
the system output (the ball position) moving along the beam as if it were moving down a controller
switching line. The list of controllers includes Elkes pet hate PD control this is because derivative
action is essential to stabilise the ball behaviour. The action of the derivative washout filter in this case is
also essential in order to suppress problems with sensor noise, (see Elkes white paper on Three Term
Control). No integral action is needed as the system is a double integrator Sorry Elke!
5. Example of a Ball and Beam Controller Design
Because it is open loop unstable, it necessary to have some kind of measurement of the ball velocity. The
classical proportional plus derivative controller gets a velocity measure by differentiating the ball
position. The classical phase lead compensator does something very similar. A better way of doing this is
to use an observer based upon a model of the ball and beam to estimate the systems states, and use the
state estimates (of ball position and velocity) in a state feedback controller. The state feedback will
stabilise the ball position, and by choice of the observer dynamics it is possible to trade off the sensor
noise influence against observer bandwidth. Also the state feedback gains can be selected to give a
desired closed loop dynamic response. For example, figure 4 shows the observer response for the Ball
and Beam System where the observer bandwidth is 0.1Hz. The observers estimated ball position (plot
blue) takes 7 seconds to be able to track the measured ball position (plot red), but with the advantage
that the estimated ball position and velocity are relatively free of the sensor noise. (To get these plots I
used the data logging features of the CE2000 Control Software, and exported the data to a MAT file for
use in MatLab). The figure 5 shows the reference and output signals for observer based control of the
Ball and Beam System the poor tracking at the beginning is due to the observer error. I picked state
gains that gave reasonably slow response to the reference signal, so that the ball did not bounce off the
beam and to reduce the impact of sensor noise.
6. Relevance of Ball and Beam Controller Design
The ball and beam is an excellent tool for demonstrating modern control ideas since its dynamics are
simple but at the same time close to the real dynamics found in aerospace systems. The whole area of
robust control with its builtin decisions on sensitivity and loop shaping is ideal for the ball and beam.
The trade off between loop sensitivity to sensor noise and the bandwidth and phase requirements for
stability and performance can be set up in an intuitive and relevant manner with the Ball and Beam. In the
end, relevance is the key word here. The ball and beam is not a model of a real system in the way that the
rest of my laboratory demonstration and teaching models are but it is typical of the dynamics that are
found in many of the most challenging areas of modern control. As such it is a vitally important learning
tool for students and professionals alike.
5
control-systems-principles.co.uk. Ball and Beam 1: Basics
0 5 10 15 20 25 30 35 40
-1.5
-1
-0.5
0
0.5
1
1.5
CE106 Ball and Beam Observer plus State Feedback
time - seconds
Figure 4. Observer Responses for the Ball and Beam System (red measured ball position,
blue observer estimate of ball position, green-observer estimate of ball velocity).
0 5 10 15 20 25 30 35 40
-1.5
-1
-0.5
0
0.5
1
1.5
CE106 Ball and Beam - Observer with State Feedback
time - seconds
r
e
f
e
r
e
n
c
e
a
n
d
b
a
l
l
p
o
s
i
t
i
o
n
Figure 5. Reference and Ball Position Response under State Feedback Control
6. A Final Word
Elke and colleagues (but especially Elke) put a final word at the end of the white papers so I will do the
same. I hope that you have got some ideas about ball and beam systems and how to control them from
this white paper. I am sorry to say that it is not possible to answer general questions from students and
engineers about the contents of our white papers, unless we have an arrangement with your organisation.
For more information about the ball and beam go to the TQ Education and Training Ltd web site using
the links on our web site www.control-systems-principles.co.uk or use the email info@tq.com. The
control techniques that I have mentioned are covered in one of the many excellent text books that exist. A
book that we use is: Modern Control Systems, R.C. Dorf and R.H. Bishop, Addison Wesley. This book is
regularly revised and is a reliable and current text. My book Introduction to Physical System Modelling
was published by Academic Press.
6