You are on page 1of 5

Static & Dynamic Sliding Mode Control of Ball and

Beam System

Abdul Manan Khanl, Amir Iqbal Bhatti 2, Sami-ud-Din 3, Qudrat Khan 4


Department of Electronics Engineering, Muhammad Ali Jinnah University, Islamabad, Pakistan
abdul.mannan.617@gmail.coml, sami.ud.din@hotmail.com3
Ahstract-This paper presents an application of static
and dynamic sliding mode control of ball and beam
system. Conventional PID controllers use incomplete
simplified models and are mostly designed for linear
systems. Although, some PID controllers are designed
for nonlinear system but they
incomplete model

which

do

are

not

using simplified

cater

for matched

disturbances. Our proposed control laws using static &


dynamic sliding mode control use complete nonlinear
system without model approximation. Moreover, static
sliding

mode

control

(SSMC)

caters

for

matched

disturbance rejection as well. There is an inherent issue


of chattering with static sliding mode control (SSMC).
However,

dynamics

sliding

mode

control

(DSMC)

counter it well. DSMC is not only equally effective when


it comes to matched disturbance rejection but also
removes

chattering

comparative

analysis

as
is

well.

In

presented

the
and

end

detailed

experimental

results confirm the superiority of DSMC.

Keywords-static sliding mode control(SSMC), dynamic sliding


mode control (DSMC)
1.

simplifies according to the method given in [7]. Using


simplified incomplete model, system can be linearized using
input-output feedback linearization followed by the
controller design [7] but it was noticed that system has
chattering in the output. Therefore complete model for
system is used for controller design [8]. In [8], sliding mode
control techniques are discussed but disturbances effect is
not addressed. Moreover, intelligent control techniques
including genetic, fuzzy and neural network based advanced
adaptive control techniques are also experimented [8]-[11]
but the controllers are very complex for application and
require training input output data for the controller's
development. In this draft, SSMC and DSMC application is
developed based on the complete nonlinear model of ball
and beam system and matched disturbance rejection is
addressed is particularly.

INTRODUCTION

The paper organization is as follows. In Section II system's


mathematical model is presented which includes equilibrium
point and open loop analysis. In Section III, static SMC
design technique is discussed. In Section IV dynamics SMC
technique is presented. All the simulation results are
elaborated in Section V. In Section VI, conclusion of both
the controllers is described.

Ball and beam system is a very interesting system by its


nonlinear dynamics and it's under actuated phenomenon.
These types of systems, have wide range of industrial
applications including passenger's platform balancing for
comfort in luxury cars, control of exothermic chemical
process where addition of heat accelerate the process,
control of rocket and aircraft vertical takeoff and liquid
carrying tankers on the roads where liquid behaves like a
ball on beam. Together with the interesting application, its
dynamics gives a wide range of flexibility to implement
classical, modem and advanced control techniques. It is
ideal laboratory equipment to test classical, modem and
advanced control system theory.

Ball and Beam system is shown in Figure 1. It consists of a


ball on the top of a beam. Ball is free to move on the beam.
Beam is attached to a fixed support from one end while the
other end is mounted on the electric motor shaft. The beam
can be moved up and down, by a control signal to the motor
amplifier. Ball position can be measured using any suitable
position sensor. Open loop system is unstable as the ball
position keeps on increasing once a fixed input to the motor
is applied. Therefore, a controller is required to
automatically regulate the position of the ball by changing
the control signal to the motor.

So far, several techniques have been applied for stabilizing


ball position on the ball on beam including linear and
nonlinear one [1]-[4]. For [1], PID or linear feedback control
can be applied based on linear approximate simplified
model. However, it does not cater for matched disturbances.
In [7] it was concluded that relative degree for the system is
ill defined so input-output linearization is not possible. This
problem is solved via approximating nonlinear model which

System modeling consists of DC servo motor with attached


gear and ball on beam system physics. DC servo motor can
be modeled with simple Kirchoff's current law and
Kirchoff's voltage law while its mechanical part requires
simple statics to balance forces [12]. Ball and Beam can be
modeled by using Lagrangian energy method. In its
modeling, friction between ball and beam is assumed to be
negligible.

II.

MODELING OF THE BALL AND BEAM SYSTEM

978-1-4577-1929-5/12/$26.00 2011 IEEE


Proceedings of 2012 9th International Bhurban Conference on Applied Sciences & Technology (IBCAST)
Islamabad, Pakistan, 9th - 12th January, 2012

32

A.

Equilibrium point of the system

System's equilibrium points can be described using


equations (1) and (2) by putting rand /3 equal to zero. As, in
equilibrium ball is stationary and beam angular velocity
becomes equal to zero. So, randp becomes zero. Hence;

(mgr+ Mg) cosf3eq =ueq

9 sinf3eq

(3)

=0

(4)

Practically beam angle is limited to- n/2 < f3 < n/2. So,
we can say that beam angle at equilibrium, f3eq is zero.
Hence,
1
LM
eq =e -mg U q Zm

(5)

r:

Figure 1 Ball and Beam System

Dynamic equations of motion for the system can be


considered as [8]

((mrZ+ C1)P+ (2mrr+ CZ)/3 ) = U

(1)

+(mgr+ L/2 Mg) cosf3

So, equilibrium point must satisfy f3eq=O and req =rd, where rd
is our desired ball position.
B.

Open Loop Analysis

From (1) and (2) we can make a simple state space mode by
assuming states of the system as;

(2)
(6)
(7)

Where

f3(t):
ret):
8(t):
g:
m:
M:

Angle of Beam
Position of Ball
Servo gear angle
Acceleration due to gravity
Ball Mass
Beam Mass
Beam Length

L:

(8)
(9)
(10)
y

represents desired output. So, system model can be


represented as; x = {(x)

The parameters of servo motor are;


Rm:
1m:
Cm:
Cg:
d:

Resistance of armature of the motor


Motor's Moment of Inertia
Motor's Torque Constant
Gear Ratio
Radius of lever arm attached to servo motor
Beam's Moment of Inertia
Constant of Back EMF

II:

Cb:

C}, C2, C3 and C4 are constants for the system and their
relations are given below:
RmxfmXL
+ I1
mXCbxd

C1 = C
C =
z

L CmCb

Rm
Cm

C3 = 1+R
C4 = 7/5

+ Cb +

Linearizing the system around equilibrium and calculating


the eigen values, it is found that one root is lying on the right
half plane. So, the open loop system is unstable as expected.
III.

DESIGN OF STATIC SLIDING MODE CONTROLLER

For static SMC, let the regulation error be;


(11)

Where rd is constant and beam angle error is;


ep

Rmfm
CmCg

= Xz -f3e = X3

Whilef3eq is beam angle at equilibrium which is zero.


Choosing the sliding surface as,

(12)

Differentiating Sl with respect to time, we have:

Vinet) = Motor inputvoltage


u(t) = C3Vin(t): Control Input to the Ball and Beam
System

Substituting X4 and xz from (7) and (8) we have,

Proceedings of 2012 9th International Bhurban Conference on Applied Sciences & Technology (IBCAST)
Islamabad, Pakistan, 9th - 12th January, 2012

33

Substituting the following control law,

u = (2mXIXZ +

)
)

CZ)X4 + mgxl + Mg cos X3 +


X X -gSinX3
Z
- blX4 + b3xz + bz 1
(mXl + Cl) +
C4

-(mxf

cl)(Klsl + Kzsign(sl))

(16)

Implies,

This ensures that S 1 5 1 is less than zero which guarantees


switching so that finite time reachability phenomenon for
sliding mode may occur from any starting condition SI (0),
provided that the constants KI & K2 are chosen strictly
positive. b j, b2 and b3 are sliding surface parameters and can
be found using Routh-Hurwitz criterion for stability, which
gives the condition bl > 0, bz < 0, b3 < 0 andb3 > blbz
for convergence, which is verified by the simulations.
Although, the designed control law effectively stabilizes the
system but has a serious issue with the control signal as
shown in Figure 5 which may damage the actuator.
Therefore, it is not practically applicable. It raises the need
of an improvement.
IV.

DEVELOPMENT OF

DYNAMIC SLIDING MODE

CONTROLLER

Dynamic sliding mode control (DSMC) technique is a well


developed for smoothening the chattering caused by SSMC.
Infect, SSMC reduces the system order when system reaches
sliding phase but DSMC does not reduces the system order
on the sliding surface. It uses the full order system on its
sliding surface. The detailed designed process for DSMC is
discussed below.
Defining the error sliding surface as,

We have,

5z = -K3SZ - K4sign(sz)

This guarantees that Sz5z < O. So, trajectories related to it,


converges to zero in finite time from any given initial
condition Sz (0), if K3 and K4 are strictly positive. Parameters
ai, a], a3 and a4 are chosen using Routh-Hurwitz criterion
for stability; it is found that, choosing al > 0, az > 0,
a3 < 0, a4 < 0, alaZ + J!...
a3 > 0, afa4 > alaZa3 + J!...
a
C4
C4
guarantees convergence of the system.
V.

Where

Table 1 BaII and Bearn SlYS tem Parame ers


O.064K.q

9.81m/s

.q
L

Zmx,X2

(mxi+Cl)

(mxi+Cl)

Where,
zmx1 x2 (h)
f
1
Z
=
2
(mxi+Cl)
(mxi+Cl)
h = (2mXIXZ + CZ)X4 + mgxl
z=<p + -p

.
U

Rm
1m

90.

(21)
+

Mg) cos X3

(22)
(23)
(24)
(25)
(26)

A.

-4 Nm
ra d/S z
Nm

7.35 X 10

0.0075-:::1

Cq
d

(20)

0.43m
0.15K.q

75
0.03m

O.OOlKg mZ
V
0.5625 ----;ij;
ra S

11
Cb

..
x4

RESULTS

The controllers designed in Section III and IV is simulated


using MATLAB & Simulink. Parameters of the system are
taken from the Quanser Ball on Beam apparatus [12].
Following Table 1 shows the used parameters values for
simulation purpose.

Cm

Now, differentiating S2 with respect to time, we have:

(31)

Simulation results for static SMC

The controller parameters are chosen such that roots of the


polynomial on the sliding surface are -2 j2 and-l0 with
the Routh-Hurwitz criterion conditions described previously
in Section II. So, bl = 14, bz = -6.85,b3 = 11.42,
Kl = 30,Kz = 80
Figure 2 shows the simulation results of ball position (XI )
and its velocity (X2) with respect to time using static SMC
with the matched disturbance having unit amplitude and unit
frequency. It is clear that desired output ball position is

Proceedings of 2012 9th International Bhurban Conference on Applied Sciences & Technology (IBCAST)
Islamabad, Pakistan, 9th - 12th January, 2012

34

being achieved within five seconds and system is tracking


well while successfully rejecting the disturbances.
0.4

E
Q)
g

0.2

tJ)

-02

-x2

1\

.l!l
o

-xl

i\

t::

1:....................III-

!fl-IO

J:!

-0

-20

-30

-40
-500

Time(sec)

10

Figure 4: Controller Efforts of Static SMC & Dynamic SMC

]0

15

Time(sec)

20

25

30

Figure 2: ball position (x,) vs. time (I) with Static SMC

B.

t::

!fl

Simulation results for the dynamic SMC

The controller parameters are taken such that the polynomial


P2 roots are [-1 j, -30,-40] with the conditions
described by Routh-Hurwitz criterion as mentioned in
Section IV.
So,a! = 72,az = 1342,a3 = -362.5,a4 = -342.5,
K3 = 80, K4 = 180. Following Figure 3 represents
dynamic SMC simulation results of ball position (Xl) and its
velocity (X2) with the unit amplitude and frequency matched
disturbance. As shown from the Figure 3 that system is
robust for the matched disturbances under the designed
control law and ball position xlis tracking the desired
reference rd.
O.4,----,----r----,----.----.---,------"
--'x l
-x2
.------l - rd
0.2

......
5
'"

(5

9.6

9.5

9.7
!

9.8

9.9

Time(sec)

10

Figure 5: Zoom Version of Both Controller Efforts

D. Comparison with Practical PD controller [12]

The designed controllers (SSMC & DSMC) were compared


with practical PD controller [12] which was developed using
simplified system dynamics. Practical PD controller
designed by [12] was put under matched disturbances of
having unit magnitude and frequency as used for earlier
controllers. Simulated result for the output is shown in
Figure 6 .
I r-------

:;; 0
03 . 5
,-E___
-

:' \

O . 2 P'--"-:=-----J./

-0.40

10

"
/\

:
.f

'"

15

Time(sec)

20

25

30

Figure 3: Ball position (x,) vs. time (I) with Dynamic SMC

c::

......

iii

...
g -I

Comparison of Static SMC & Dynamic SMC

Above simulation shows that both the controller work well


but the main advantage and superiority of dynamic SMC is
its greatly reduced chattering. Following Figure 4 shows the
controller efforts of both schemes which clearly indicates
that static SMC (SSMC) scheme controller effor ujis having
lots of chattering as compared to dynamic SMC (DSMC)
scheme controller effoer U2. Also, it can be seen that control
signal is ocillating and it is only due to matched disturbance
oscillations. To counter the sinousisal disturbance, controller
is responding accordingly.Figure 5 is just a zoom version of
Figure 4to elaborate the chattering more clearly.

-0

0,

.._

... ..

,\

\"
5

,.,'

,.

. . . . ..''1

.."....

10

! \

\,-,:

\
\
'\.
,:
,II
.
.:

---"----l
-

..

"/-\"

\
\.

:.'!

\" 1

\/

-..

15

Time(seconds)

20

25

30

Figure 6: Ball Position with Practical PD controller

As, clearly depicted from the Figure 6, that the designed


controller is unable to cater the disturbances but the SSMC
and DSMC counters it well. This is a big drawback of PD
controller which raised the need of an improvement.
VI.

CONCLUSION

In this paper, SSMC and DSMC techniques are discussed


for the controller development of the ball and beam system
and compared with practical PD controller under matched
disturbances. From the simulation it can be concluded that
practical PD controller is unable to reject the disturbances
while SSMC and DSMS effectively counter them.

Proceedings of 2012 9th International Bhurban Conference on Applied Sciences & Technology (IBCAST)
Islamabad. Pakistan, 9th - 12th January, 2012

35

Moreover, static SMC leaves the system with lots of


unacceptable chattering. These unavoidable chattering can
damage the actuator eventually. Although SSMC stabilizes
the system well but its chattering phenomenon makes it
impractical for implementation. The solution to this problem
was provided by dynamic sliding SMC which removes
chattering effectively while rejecting the disturbances.
VII.
[1]
[2]
[3]

[4]
[5]
[6]

[7]
[8]
[9]

REFERENCES

Ball and Beam Experiment and Solution, Quanser Consulting.

1991.

S. Boyd, L. Ghaoui, E. Feron, and V. Balakrishna, " Linear


Matrix Inequalities in Systems and Control Theory.
Philadelphia, PA: SIAM, 1994.
T. Hu, Z. Lin, W. Jiang, and P. E. Allaire, "Constrained control
design for magnetic bearing systems," ASME Journal of
Dynamic Systems, Measurement, and Control, vol. 127, pp.

601--{)16,2005.)

T. Hu and Z. Lin, "On enlarging the basin of attraction for linear


systems under saturated linear feedback," Systems and Control
Letters, vol. 40,pp. 59-69,2000.
F. Bianchini, "Set invariance in control - a survey," Automatica,
vol. 35,pp. 1747-1767,1999.
A. D. Mahindrakar and V. Sankaranarayanan, " State
constrained
stabilization
of
beam-balance
systems,"
International Journal of Robust and Nonlinear Control, vol. 18,
pp. 333-350,February 2008.
Hauser, J. Sastry, S., Kokotovic, P.,"Nonlinear Control via
Approximate input -output linearization: the Ball and beam
example," IEEE Trans/Autom. Control. Pentice 398(1992)
Naif B. Almutairi
Mohamed Zribi,"On the sliding mode
control of a Ball on a Beam system,"Nonlinear Dyn (2010) 59:

222-239

J. Yang, Zhong-hua Wang ," Adaptive Robust Dissipative


Design on Stability Control for Ball and Beam System," IEEE
2nd International Conference on Computer and Automation
Engineering (ICCAE), 2010,Singapore , pp. 68-71 (2006)

[10] M.F. Rahmat, H. Wahid, N. Abdul Wahab, "Application


Intelligent Control in a ball and beam control system,"

of

International
Journal on smart sensing and intelligent systems vol. 3, no. I,
march 2010
[II] Yuhong Jiang C. Mc Corkell and R. B. Zmood, "Application of
Neural Networks for Real Time Control of a Ball-Beam
System", Proceedings of. IEEE International Conference on
Neural Networks, 1995)
[12] Quanser. SRV02 User Manual.

Proceedings of 2012 9th International Bhurban Conference on Applied Sciences & Technology (IBCAST)
Islamabad, Pakistan, 9th - 12th January, 2012

36

You might also like