Prototype Design and Analysis of Controllers For One Dimensional Ball and Beam System
Prototype Design and Analysis of Controllers For One Dimensional Ball and Beam System
1s IEEE International Conference on Power Electronics. Intelligent Control and Energy Systems (ICPEICES-2016)
Abstract-Ball and Beam structure is an under actuated window[3]. This paper presents a comprehensive
nonlinear unstable electro-mechanical system and it is one of modelling of ball and beam system and design of different
the robotic benchmark problem in control engineering. This controllers such as PID, state space, lag-lead, robust LQR
paper addresses the control and real time modelling of ball
and observer based LQG controllers for positioning
and beam system. Different types of controllers are being
control of ball on the beam. A linearized model of ball and
used to balance a ball on a beam at a pre-defined location
with precise amount of force and torque in minimum time
beam system is derived for testing of controllers and
for stable operation of the system. The accurate control of
dynamic performance of ball position is determined
ball position on beam is a challenging task. The performance through simulation study in MATLAB. Stability of open
analysis of ball and beam system is carried out using PID, loop unstable ball beam system is also described using
state space, lag-lead, robust LQR, observer based LQG Lyapunov Direct method.
controllers, and performance characteristics of the system is This research paper is organized in four sections:
presented. Lyapunov direct method is used describe the Section 11 brietly describes the mathematical model for the
unstable behaviour of ball and beam system.
ball beam system and transfer function deduction. Section
Keywords-PID; State Space; Lag-lead; LQR; LQG;
III deals with the design of different controller's viz. PID,
Lyapunov Stability
state space controller, lag-lead compensator, robust LQR
I. INTRODUCTION and observer based LQG controller. Section IV consists of
prototype implementation of ball beam system followed
The study of system dynamics and control is essential by the conclusion in Section V.
for analyzing and design of automatic control systems.
Most of the physical systems display nonlinear dynamics 11. MODELLlNG AND IDENTIFICATION OF BALL ON
and require a complex nonlinear analysis methods to A BEAM SYSTEM
investigate their performance. In recent years many
nonlinear controllers are suggested to improve the
performance of nonlinear system. A ball and beam system
is a nonlinear unstable system, where control problem is to
automatically control the angle of the beam in order to
obtain the required position of the ball on the beam by \
degrees of freedom in this system. One is the ball rolling The Fig. 1 shows the schematic representation of a
up and down the beam, and the other is beam rotating ball and beam system, here the beam is mounted on the
through its central axis. output shaft of a stepper motor that can be tiIted about its
Numerous studies have been conducted on a ball centre axis by applying an electrical actuating signal to the
beam system and various controllers have been proposed motor. The system is open loop unstable in control system
for control of this under actuated mechanism. The ball terminology because the system output (the ball position)
beam system is a bench mark example in control systems increases without limit for a fixed input (motor angle). To
but unlike other models, a stepper motor pivoted at the keep the ball in a desired position on the beam feedback
center of the beam is used here to control the position of controllers are used, so that the ball is positioned
the ball along with an accelerometer sensor which accordingly to desired position[4].
provides information related to the orientation of the
A. Mathematical Modelling
beam. Thus, as the ball moves to an extemal disturbance,
the angle of the beam is changed to counteract this The derivation of the system equations by kinematic
change[2]. The current orientation of the beam and the analysis of the force balance on the ball[5] is represented
position of the ball is displayed serially to a terminal as
978-1-4673-8587-9/16/$31.00 ©2016 IEEE [1]
1st IEEE International Conference on Power Electronics. Intelligent Control and Energy Systems (ICPEICES-2016)
mgsinl/)= Ftran51ational + Frotational = Fg (1) It should be observed the ball beam system is an
The torque developed by ball's rotational motion is unstable system and interesting control problem. The
identical to muItiplication of ball radius(R) and rotational model dynamics and the system behaviour such as open
force. According to Newton's second law the torque is loop time response, root locus, frequency response, Bode
multiplication of ball's moment of inertia and angular plot, Nichols plot and Nyquist plot are shown in Fig.2,
acceleration is expressed in equation (2) which conforms the ball beam system is unstable.
<ii Step Response
Fr = Jball; (2)
2 2
Where Jball is the moment of inertia of the spherical
ball and it is defined in equation (3) 8
1! 3!
(5) -1.5 -0.5 o
By ignoring the higher terms, the dynamical
2
Fig. 2(b): Root Loeus ofBall Beam System
expression can be approximated in the form of equation Bode Diagram
(6)
. B . K ..
mg rA'IJ = '5mx+ ; x+ ; x+mx (6)
By neglecting the spring constant K, the equation (6)
can be rewritten as in equation (7)
mg I/) = �mx+ ; x+mx (7)
The linearized system equations can be expressed in
X2
state space form by choosing ball position x =X1 and ball
velocity
[� ] = [00 2� ] Xl rO
x = as state variables and the beam tilting angle I/)
0] [;�]
1 B (8)
100
y = [1 (9)
50
IJ;-=CC--
However the equation (8) represent dynamics of the �
ball position only, but the controlling position vary
through change of beam tiIting angle by controlling the
torque of stepper motor.
The transferfunction for ball beam system in terms of
-100
the ball position x(s) to the stepper motor angle I/)(s):
(5) =
M(s) = X1/)(5) (�) -180 -150 Open_LoopA"la.... (deg) -120 -90
9
52 +(mR
�+�)5 rad (10)
5
Fig. 2(d): Niehols Plot ofBall Beam System
[2]
t
1s IEEE International Conference on Power Electronics. Intelligent Control and Energy Systems (ICPEICES-2016)
Nyquisl�gram
25
e
15
.�
x
The ball beam system operation is also subjected to a
set of restrictions: -12< V <12 (voIts),-45< <I> <45 I
iii 10
(degrees),-0.5 < x < 0.5 (m).The parameters for ball beam "'
system are given in Table L
5
TABLE I. TABLE I: BALL BEAM PARAMETERS
R Radius of the ball 0.02 m
G Acceleration of gravity 9.8 mJs2 0
0 2 3 4 5
M Mass of ball 0.1 Kg Time (Sec)
L Length of beam I m
Fig. 3(c): Ball Beam System Response with Step Reference
B The friction constant 0.002 kg-m/s
III. DESIGN AND ANALYSIS OF CONTROLLERS
C. Lyapunov Stability Analysis ofBall and Beam System
The controllers such as PID, state space, lead-lag
As per Lyapunov stability analysis[7] the ball beam
compensator, LQR, Observer based LQG controllers are
system asymptotically stable with x=O as an equilibrium
analyzed and studied for ball beam system.
point of x f(x),D 2:: Rn, let V: D 2:: R be a continuously
=
[::J [::2]
=
system and their response is shown in Fig. 4(a) and (b).
V (x) (VVYf(x)=
(12) The PID gains, Rise time, SettIing Time, overshoot are
V (x) =
x 2 x
[!t ( )f ( ) F (13) given in Table IL
system transferfunction is shown in Fig.3 (b) and system BALL AND BEAM MODEL
response without controller is also shown in Fig.3(c)
Fig. 4(a): PlD Tuned Ball Beam System
TABLE 2: PlD PERFORMANCE PARAMETERS
position 1---D
--,----1� Proportional gain(Kp) 0.59447
Integral gain(K;) 0.01316
Scope
Derivative gain(Kd) 0.28732
Rise time(sec) 0.522
BALL AND BEAM MODEL
Senling Time(sec) 1.7
Over shoot(%) 9.07
Fig. 3(a): Ball Beam System
[3]
t
1s IEEE International Conference on Power Electronics. Intelligent Control and Energy Systems (ICPEICES-2016)
2.5 ,.-----�--�--___,
0.5
-0.2 L...--::'
.. �----'-�---,L:-
--'-�-:-'::-
-'- �--'--�-:"-::-�-'--�c'-::-
......--l The settIing time and overshoot are satisfied for ball
o 0.5 1.5 2.5 3.5 4 4.5
Time (Sec) beam system, if the poles are moving to left side of plane
Fig. 4(b): Ball Beam System Response the settIing time is attained quickly. The constant gain is
added to the step reference to eliminate steady state error,
B. Design oJState Space Controller the ball beam system response is shown in Fig. 5( d).
Step Response
The state space controller operates altogether four
2.S ,------�---�--,
states for control of the ball beam system, which controls
f
the position of the ball, velocity of the ball, by changing 2 ·
[ ] []
signal and same used as feedback. For the ball beam � 1
For matrix A eigenvalues of system are to be tested Fig. 5(d): Improved Response ofBall Beam System
1.5 ,------.---,-S'-'-t''''-p''R''spo''-n''s''-r--,---,
- Compensaled
� 0.5
�
and the c10sed loop response is shown in Fig. 5(b) and Fig. 6: Response with Lag-lead Controller
Fig. 5(c).
D. Robust LQR Controller
A feedback control system has robustness against
Step Gainreference BalibeamState-Space Scope
external disturbances and uncertainties inherent in the
[4]
t
1s IEEE International Conference on Power Electronics. Intelligent Control and Energy Systems (ICPEICES-2016)
.
Step Response ..
f 10
.2
.
;1 . ..." �.:;.: : . .�,:. . ,: . ]
. . 10
·'
10
0 Freqooncy (radlsec) 10
'
10
2
10
J
[5]
t
1s IEEE International Conference on Power Electronics. Intelligent Control and Energy Systems (ICPEICES-2016)
stepper motor. The IC is connected to Arduino UNO such as horizontal stabilization of an aircraft during
microcontroller with ATMEGA328 as processor. landing and while experiencing turbulence. The MATLAB
The position of ball is sensed by an ultrasonic sensor simulation results along with the graphs for the controllers
HC-SR04 fixed at one end of beam which works on have been included. From output graphs it can be seen that
SONAR principle. Further the tilt sensor ADXL-335 robust LQR controller approaches the desirable
keeps a track on tilt of beam. By locating the position of performance when compared with other controllers.
ball and tilt of beam, signals could be sent to move the Unlike other systems, here the motor being used is a
beam c10ckwise or anticlockwise accordingly so as to stepper motor instead of a servo makes the system more
keep ball at the center of the beam. The beam tilt angle is economical one.
compared with the definite angle of zero degrees and PID
controller is used to minimize the error. The prototype of REFERENCES
ball beam is shown in Fig. 9. The unique features of our [ I] J. Hauser, S. Sastry, and P. Kokotovi, "Nonlinear Control Via
ball-on-beam system are as folIows: Approximate Input-Output Linearization: The Ball and Beam
Example," IEEE Trans. Automat. Contr., vol. 37, no. 3, pp. 392-
1. First, it is inexpensive compared to those
398,1992.
commercially available. [2] DJ.S. Ruth, K. Dhanalakshmi, and S.S. Nakshatharan,
2. Second, the position of ball is sensed by using "Interrogation of Undersensing for an Underactuated Dynamical
ADXL-335 sensor. There is no tear and wear by System," IEEE Sens. J., vol. 15,no. 4, pp. 2203-22 I1,20 I5.
[3] H. Sira-ramirez, "On the Control of t.he ' Ball and Beam' System:
the ball movement.
A," in 39th IEEE conference on Decision and control, 2000, pp.
3. Third, it uses a microcontroller for the 4042-4047.
implementation of the control algorithm. It [4] M. Amjad, M. I. Kashif, S. S. Abdullah, and Z. Shareef, "Fuzzy
enjoys all the convenience that comes with a logic control of ball and beam system," in 2nd International
Conference on Education Technology and Computer, 2010, vol. 3,
microcontroller.
pp. 489-493.
[5] W. Chen, X. Sui, and Y. Xing, "Modeling and Modulation of
Nonlinear Ball-beam System Controller Based on Matlab," in
Proceedings of 9th international conference on fuzzy systems and
knowledge discovery,20 I2,vol. 5,no. Fskd, pp. 2388-239 I.
[6] B. C. Chang, H. Kwatny, and S.-S. H. S.-S. Hu, "An application of
robust feedback linearization to a ball and beam control problem,"
in Proceedings of the IEEE International Conference on Control
Applications, 1998,vol. I,no. September, pp. 694-698.
C. Aguilar-ibanez and C. Aguilar-iban, "The Lyapunov direct
method for the stabilisation of the ball on the actuated beam," Int. J.
Control I, vol. 7 I79,no. April, pp. 2 I69-2 I78,20 I6.
[7] K.T. Prasad and Y.V. Hote, "Optimal PID controller for Ball and
Beam system," in International Conference on Recent Advances
and Innovations in Engineering, ICRAIE 2014, 2014,
pp. 1-5.
[8] P. Rapp, O. Sawodny, and C. Tar, "An Immersion and Invariance
based Speed and Rotation Angle Observer for the Ball and Beam
System," in proceedings of American control conference, 20 I3, pp.
Fig. 9: Proto Type ofBall Beam System 1069-1075.
[9] N. Hara, M. Takahashi, and K. Konishi, "Experimental Evaluation
V. CONCLUSION of Model Predictive Control of Ball and Beam Systems," in
proceedings of the American Control Conference, 201 I, no. 4, pp.
In this paper, the basic design of a one dimensional I 130-- I132.
ball beam system using different controllers has been
illustrated. This system emulates real control problems
[6]