You are on page 1of 4

Modeling and Control design for the ball and plate system

Andrej Knuplei, Amor Chowdhury, Rajko SveEko


University of Maribor
Faculty of Electrical Engineering and Computer Science
Smetanova 17, SI-2000 Maribor, Slovenia
andrej.Imuplez@uni-mb.si

Article is describing a controller synthesis for two- program package. Since the characteristics of actuators
dimensional electromechanical system of the ball and and sensors demand work in the real-time, the program
plate intended for a study of the system dynamic and Real-Time Toolbox that allocate, with help of additional
laboratory experiments with different proceeding of sorter, the processor time to the operating system and to
the control based on the classical and modern control the program performing in the real time, have been added.
theory. The system includes the quadratic metal plate, The picture-framing interface receives the analogous video
which is movably fixed in the center. Its inclination can signal, which digitizes with A D converter and saves as
be changeable in two rectangular directions. For the data-sheet into storage. A computer determines, from the
inclination of the plate a servo-drive with a controller received data, the position of the ball and calculates the,
and two stepping motors are used 151. difference between reference and real value on which basis
The control problem of the described system is to hold the controller generates a signal that is needed for the
the freely rolling ball in the specific position on the driving-gear of the stepping motors. According to the
plate. For measuring the ball position, the intelligent characteristics of the system dynamic a discrete phase-lead
video system composed from CCD camera, picture- controller has been chosen [2].
framing interface and program equipment for real- Performing experiments up to the sample of a ball on the
time picture processing are used. According to the plate, the modern method of experimenting, called ))Rapid
characteristics of the object dynamic a discrete lead Prototypinga, has been chosen. The main aim was to pass
compensator was chosen as a controller 12). over the phase of simulation up to the real object
Performing experiments up to the sample of a ball on experiments with the least changes possible.
the plate, the modern method of experimenting, called
))Rapid Prototypingu 161, has been chosen. The main 2 Modeling and linearization of the object
aim was to pass over the phase of simulation up to the
real object experiments with the least changes possible. The starting point of modeling is the Lagrange’s equation

1 Introduction daw,
dt aii
aw,+aw,=<
aqi aqj (1)

The model has four degrees of freedom, two at ball


The system of the ball and plate is a two-dimensional
moving and two at plate inclination. The two coordinates
electromechanical system intended for a study of the
regarding the plate are marked as x and y and the plate
dynamic systems and laboratory experiments with
different proceeding of the control based on the classical inclination is marked as a and p. The plate inclination is
and modem control theory. The system includes the caused by two rotational torque’s M, and M , having an
quadratic metal plate, which is movably fixed in the effect on the plate (Figure 1).
center. Its inclination can be changeable in two rectangular With derivation of the Euler-Lagrange’s equation we get
directions. For the inclination of the plate a servo-drive the system of nonlinear differential equations who are
with a controller and stepping motor is used [SI. mathematically describing system dynamic:
The control problem of the described system is to hold the
freely rolling ball in the specific position or in the
movement on specific trajectoy on the plate. For
measuring the ball position, the intelligent video system
composed from CCD camera, picture-framing interface
and program equipment for processing of the picture in
real time is being used. By the simplificationit has been considered that:
The interface to control the stepping motors and the The ball never loses contact with the plate.
picture-framing interface are being made as standard ISA There’s no slithering between the ball and the
cards which enable the system control with the personal plate.
computer (PC). The connection between the PC and the All friction forces and rotational moments are
ball and plate system is enabled through the MATLAB being neglected.

0-7803-7852-01031517.0002003 IEEE 1064 .


IClT 2003 Maribor. Slovenia
* The plate angle and the surface limitations are not
taken into consideration. 3 Controller design
Beside above mentioned it has been also considered the A starting point is the linear object model,
fact that none step could be lost using the stepping motor
which means that skipping between steps doesn’t occur (4)
and that an amplitude of plate moment doesn’t affect the
position of the rotor. for which we wish to establish the controller with lead
compensator structure

The transfer function of the closed-loop system with the


lead compensator structure is

When choosing or defming controller parameters, the first


condition is stability and that’s why the analysis of
stability T(s) with Routh’s criterion has been done [I].
On the basis of stability criterion it is possible to specify
the areas in which controller parameters could be situated;
gain KR,controller zero Sand parameter a that defmes the
controller pole’s position.
Figure 1: The scheme of the ball on the plate system Controller gain Knis bounded with the eauation:

The proportion between nonlinear term for centrifugal


force and the activity of the gravity force in the specific
direction depends on maximum angular velocity of the Considering the expression (10) and conditions
inclined plate. In our case we can obtain the constant y,K,,G~iw* and a ~ ( 0 , l )then a next expression have
angular velocity with the amplitude which depends on to hold
driving frequency of the stepping motor. Since the ( y - a y - 6)> 0 (8)
proportion is about 1:25 using the 400 Hz stepping motor
frequency, the centrifugal force could be neglected. From the expression (8) it follows that the minimum time
The position of the plate in the stable position is horizontal constant of controller zero is:
which means that both angles of inclination are equal to
0’. If angles of inclination deviate up to fY,we can . .
approximate the sinuous function with sinx I x and for The zero of the controller can so be set on the closed
further analysis we can use the simplified model of the interval ( 0 , ~ ) .
mechanical part of the system.
To specify the controllers pole position, an interval in
5 5 . which is situated, should be found. According to
P = - g s m a = K,a in j = - g s m p I K J
7 7 Shannon’s theorem the sampling frequency should be at
least twice higher than the highest frequency of the
sampled signal.
When time of sampling is 40 ms, we obtain:
1
r,i,=0,04.2=0,08~~,,<- (10)
5,.
From the expression (10) we calculate the value a,”

Figure 2: The block scheme of the linear object model To fulfill the condition (7) a next expression must be true:
y-ay-6 >0 (12)
Associating the linear models of electrical and mechanical Since parameters6 and y are positive from where it
subsystems we obtain the transfer function describing the
linear object model (Figure 2): follows that a can assume the highest value:

a,, =I-- 7 (13)


s

1065
We obtain an interval in which we search the value fof When searching the controller that would be optimal in the
parameter a : ISE sense, its calculation needed to be done in the most
6 Y points possible inside spaceF(K, (S),a(S),S) .
a,,<a<a,, 3 -<a<!-- (14)
0- 6 The ))Brute Forcea method, performed with Matlab
The area of changing parameter a and consequently program, has been used for searching the criterion index
positioning controller’s pole depends on chosen controller minimum. Figure 5 represents a chart of the criterion index
zero 6 . in dependence on KRand parameter a.
We obtain two straight lines (Figure 3), the valid area is on
the interval where the straight line a,, lies above the
straight line G,,, The
. next step is to calculate the
controller gain KRmo= f ( a , S ) , where the system is still
stable over the area a ~ ( a ~ , ~ ( ~ ) , a - ( ~ ) ) ~ ~ € ( ~ ~ , ~ , ~ ~ ) .
We obtain a plane defining the maximum controller gain at
chosen values a and 6 (Figure 4).

Figure 5: Chart of the criterion index in dependence on Kn


and parameter a.
I \I
The final result of an algorithm is a controller transfer
I
Figure 3: Representation of an area in which a can be in function at the minimum ISE index value:
motion according to the controller zero position 14,7935( 2-0,9967)
K, = (15)
(z -0,6095)
The system is stable for all values a, d and KR,situated in
the space O < f ( a , S ) < K , , For optimization of
4 Experiment
parameters the criterion index of ISE Integral of Square
~

Error has been used [41. In the experimental phase the so called ))Rapid
The characteristic of ISE is, because of squaring, to Prototyping(( method [6] has been used. Rapid Prototyping
increase an effect of bigger signals and to reduce an effect of control systems is generally referred to as methods and
of smaller error signals. That’s why the controlled systems, tools to solve control problems fast and efficiently. This
for which we optimize the controller according to this includes
criterion, are quick and have pretty large gradient at the theoretical methods of control engineering from
stepping change of reference, which is the consequence of designing a system model and system analysis to
high square error value in the beginning of transient. the design of a control strategy,
test and optimization of the control strategy in a
simulation environment
automatic code generation for a real-time system
operating a test stand and
verification and optimization of the controller
with the target object on the test stand.
The experiment-simulations part has been performed with
Matlab-Sirnulink program package and for the real object
experimentation’s the additional Real-time Toolbox has
been used. The Real-time Toolbox is a tool package
associating the Matlah and the Simulink with the outside
world to attain the data from environment in real time,
Figure 4 Maximum allowed controller gain according to their immediate treatment with the Matlab and the
the chosen controller zero and pole position Simulink orders and models and then sending them back to
the outside world. The setting of performing concept: a
driver is simply called by input/output device orders
without knowing its details.

1066
The Real-time Toolbox translates the Simulink diagram The simulation and actual controlled system results
(Figure 6) into a program code and then by using a obtained are in accordance with appointed demands and
specific object translator into an executive cod [6,7]. expectations (Figure 7 and 8). The stationary error is a
consequence of an object non-linearity (irregular ball

e
h .w
..
geometry) and of a sensor resolution limitation.

5 Conclusion
0I-

Choosing the controller structure is an important question


broached already in the first beginning of the control
design. Since an object already has a double pole in the
coordinate starting point, an additional pole would only
make the stability circumstances worst, the usage of PID
regulator is not recommendable. When choosing between
the compensating controllers, a lead controller is relevant
while a lag controller does not stabilize the system. The
usage of the lead controller has been established to be the
best solution.
Figure 6: Controlled system scheme with MATLAB- The next question is: How to specify or calculate the
SIMULINK program package for one coefficients of the chosen controller? On the basis of the
coordinate controlled system stability analysis with Routh's criterion
and in combination with ISE criterion index a method of
the compensation controller coefficient optimization has
been derived and it has been confirmed as a successful tool
to resolve a problem described.

References
D. DonlagiC, T. ZoriE, R. SveEko, Diskrefni
regulacijski sistemi, Univerza v Mariboru, TehniSka
fakulteta, Elektrotehnika, raEunalniStvo in
infonnatika, Maribor, 1992.
B. ZupanEiE, Zvezni regulacijski sistemi 1. del,
Univerza v Ljubljani, Fakulteta za elektrotehniko,
1996.
D. Matko, Diskretni regulacijski sisfemi, Univerza
1:
I
; A & ;o ;5 3s
' ;
I i Edvarda Kardelja v Ljubljani, Fakulteta za
elektrotehniko, 1986.
A. Chowdbury, Robustna sinteza regulacijskih
Figure 7 Response on a step reference signal sistemov z upoitevanjem performaninih kriterijev :
doktorska disertacija, Univerza v Mariboru,
-8Ww
Fakulteta za elektrotehniko, raEunalniStvo in
informatiko, 2001.
HUMUSOFT CE151 Ball&Plate Apparatus Users
Manual.
HUMUSOFT Real Time Toolbox for use with
MATLAB Users Manual.
Matlab-Simulink User Guide

Figure 8: Response on a sinus reference signal

1067

You might also like