0% found this document useful (0 votes)
9 views

Modeling and PID Neural Network Research For The Ball and Plate System

Uploaded by

magesh.aero83
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Modeling and PID Neural Network Research For The Ball and Plate System

Uploaded by

magesh.aero83
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Modeling and PID Neural Network Research for the

Ball and Plate System

Zheng Fei Li Xiaoli


School of Automation and Electrical Engineering, USTB School of Automation and Electrical Engineering, USTB
Beijing, China Beijing, China
[email protected] [email protected]

Qian Xiaolong Wang Shangjun


College of Information Science and Engineering, NEU School of Automation and Electrical Engineering, USTB
Shenyang, China Beijing, China
[email protected] [email protected]

Abstract—By using Lagrange equations, the mathematical model learning ability. For this reason, a PID controller based on RBF
and simplified model of the ball and plate system are derived neural network tuning, which combines the advantages of PID
effectively. Base on this simplified model, a PID control strategy controller and neural network controller, is proposed. RBF
based RBF neural network tuning scheme is proposed for network is a three-layers network. Compared to the fuzzy
position control of the ball and plate system, and simulation controller, it can adjust the weights of the controller on line.
study is made. The simulation results show that the control
scheme given in this paper is feasible, the output of the system II. MODELING
can track the set point value approximately.
As shown in Fig. 2, the GPB2001 ball and plate system
Keywords-ball and plate system; RBF neural network; PID made by Googol Technology Limited is used as experimental
platform. The variables of the system are shown as following.
I. INTRODUCTION
TABLE I. THE VARIABLES OF SYSTEM
The ball and plate system is a nonlinear multivariable
system, which is two-dimensional expansion of the ball and Symbol Description Unit
beam system [1]. Because of these characteristics, the ball and m Mass of the ball Kg
plate system is always used to study some typical dynamical
system. The ball and plate system is made of a small ball and a R Radius of the ball m
plate with two mutually perpendicular axis of rotation. The ω Rolling angular velocity of the ball Arc/s
purpose of this system is to control the small ball to a desired r Displacement vector of the ball related to plate m
location on the plate stably. The plate rotates around the x-axis
and y-axis driven by two DC servo motors. Visual sensing rp Displacement vector of the ball related to earth m
devices can transfer the position of the ball on the plate back to
the control system, in which a certain control algorithm is used Jp Mass moment of inertia of the plate Kg * m 2
to control the plate to rotate so that the ball can reach the set
J Mass moment of inertia of the ball Kg * m 2
point. The control chart of the ball and plate system is shown in
Fig. 1. τx Torque applied to the plate in the x-axis Kg * m 2 / s 2

τy Torque applied to the plate in the y-axis Kg * m 2 / s 2

θx Angle of the plate from x-axis Arc

θy Angle of the plate from y-axis Arc

Figure 1. The control chart of the ball and plate system. fx Friction of the ball from x-axis N

Today the most controller of the ball and plate system is set fy Friction of the ball from y-axis N
up by using fuzzy principle [2,3,4], but some limitations of this
x Position of the ball in the x-axis m
kind of controller is always existed: fuzzy rules are difficult to
set up; too many if-then sentences reduce the controller speed y Position of the ball in the y-axis m
in the actual control; fuzzy algorithm does not have the

The National Natural Science Foundation of China under Grant (No.61074055);


Fund of Beijing Excellent Talents Program (No.2009D013001000016);
Key Discipline Project of Beijing Municipal Commission of Education (No.XK100080537).

978-1-4577-0321-8/11/$26.00 ©2011 IEEE


331 Downloaded on November 07,2024 at 17:08:11 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: J.R.D. Tata Memorial Library Indian Institute of Science Bengaluru.
The kinetic energy of the ball moved relatively inertial
system:
1
T4 = ( J + mrp2 )(θx2 + θy2 ) (9)
2
Equation (9) is deduced by the parallel axis theorem, the
moment of inertia related to the inertial system of the ball
is J b = J + mrp2 .
When the plate rotate along the x-axis and y-axis direction
Figure 2. The device of the ball and plate system.
with angular velocity θx and θy , the ball on the plate is
The Lagrange equations are used to solve the model equivalent to rotate around a virtual axis l with the angular
problem of the ball and plate system.
velocity θx2 + θy2 , shown in Fig. 3. According to the
A mechanical system can be described by generalized
synthesis principle, the angle between the normal vector m of
coordinates: q T = [ q1 , q2 , " , q s ] . The kinetic energy of the
θ
whole system is denotes as T. The motion characteristics of the the virtual axis and x-axis is α = arctan y , the angle
system can be described by following [5]: θx
between the plate displacement vector of the ball and the x-axis
d ∂T ∂T
( )− = Qα (α = 1," S ) (1) y
dt ∂qα ∂qα is β = arctan . So the distance form the ball to the virtual
x
Select x , y , θ x and θ y as the generalized coordinates axis l (the displacement vector of the ball related to earth) is:

of the system[6] (ie. q T = [ x, y , θ x , θ y ] ). y θ
rp = r cos(arctan − arctan y ) (10)
Based on the mechanics analysis of the system, the
x θx
generalized forces in the four general directions can be m
received: y

Qx = f x − mg sin θ x (2) l
axis
ua l
Q y = mg sin θ y − f y (3) O Virt

Qθ x = τ x − mgx cos θ x (4) r α Plate


rp β

Qθ y = τ y − mgy cos θ y (5)


Ball
x
The kinetic energy of the system of different parts will be
deduced as following. Figure 3. The analysis chart of the movement of the ball.

The kinetic energy of the rotational plate: Using (6-10), the kinetic energy of the whole system can be
1 shown that˗
T1 = J p (θx2 + θy2 ) (6)
2 1 1 J
T= ( J p + J )(θx2 + θy2 ) + (m + 2 )( x 2 + y 2 )
The kinetic energy of the ball moved along the 2 2 R (11)
displacement vector: 1 
+ m( xθ x + yθ y )  2

1 2 1 2
T2 = mr = m( x 2 + y 2 ) (7)
2 2 Then the nonlinear dynamics equations of the system are
obtained in the following form:
The kinetic energy of the ball rotated around its center of
mass: J
(m + 2
) x − mxθx2 − myθxθy = f x − mg sin θ x (12)
1 1 r 1 J 2 R
T3 = J ω 2 = J ( )2 = ( x + y 2 ) (8)
2 2 R 2 R2 J
(m + 2 ) y − myθy2 − mxθxθy = mg sin θ y − f y (13)
R

332 Downloaded on November 07,2024 at 17:08:11 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: J.R.D. Tata Memorial Library Indian Institute of Science Bengaluru.
( J p + J + mx 2 )θx + 2mxxθx + (mxy + mxy )θy yout (k ) and the output of the system at the previous
(14) time yout ( k − 1) .
+ mxyθy = τ x − mgx cos θ x
B. Network Algorithms
( J p + J + my 2 )θy + 2myyθy + (mxy + mxy )θx T
(15) The input of the network is denoted as X = [ x1 , x2 , x3 ] .
+ mxyθx = τ y − mgy cosθ y The input of the hidden layer is equal to the output of the first
For the real system shown in Figure 2, the inputs of the layer, so the output of the jth node in the hidden layer is:
system are the angle θ x and θ y , so the simplified model of 2
X − Cj
the system can only be (14-15), then it makes the following h j = exp(− ) ( j = 1,2, ",6) (18)
assumptions [7]: First, the angular velocity of the plate is small, 2b 2j

the centrifugal force of the ball m(θxθy y + θx2 x) and
Where C j is the data center of the jth node; b j is basis
m(θxθy x + θy2 y) is smaller than the gravity mg sin θ x and width parameter of the jth node.
mg sin θ y , so these can be ignored. Second, the angle of the The weight from the hidden layer to the output layer is
plate is small, so sin θ x ≈ θ x , sin θ y ≈ θ y . Last, the friction W = [ w1 , w2 ,", w6 ] , so the output of the network is:
of the ball is small, it can ignore f x and f y . y m (k ) = w1h1 + w2 h2 + " + w6 h6 (19)
For the reason above, the simplified model of the system In this identification network, the index function is:
can be shown that:
1
5 J= ( yout ( k ) − y m (k )) 2 (20)
 x = − gθ x (16) 2
7
According to gradient descent algorithm, the iterative
5
y = gθ y (17) algorithms of w j , b j and C j are shown that:
7  
III. CONTROLLER DESIGN
w j ( k ) = w j ( k − 1) + η ( yout (k ) − ym (k )) h j
(21)
Through the linear equations (16) and (17), it’s evident that + α ( w j ( k − 1) − w j (k − 2)) 
x is function of θ x only, similarly, y is a function of θ y only, 2
X −Cj
so that the ball and plate system can be regarded as two Δb j = ( yout (k ) − y m (k ))w j h j (22)
different SISO systems and two directions can be controlled b 3j
respectively [6]. Considering the symmetry between the x
direction and the y direction [8], it only discuss the design of b j (k ) = α (b j ( k − 1) − b j ( k − 2))
the controller in y-axis following. (23)
+ b j (k − 1) + ηΔb j
A PID controller based RBF neural network tuning scheme
can adjust the weights so that the controller has better effect [9]. xi − c ji
The control chart of it is shown as following. Δc ji = ( yout (k ) − y m (k )) w j hj (24)
b 2j

c ji ( k ) = α (c ji (k − 1) − c ji (k − 2))
⊗ (25)
+ c ji ( k − 1) + ηΔc ji

And the algorithm of Jacobian is:
ym
∂yout (k ) ∂ym 6 c − Δu (k )
≈ = ¦ w j h j j1 2 (26)
Figure 4. The control chart of neural network PID. ∂Δu (k ) ∂Δu (k ) j =1 bj

A. Network Structure C. PID Turning Principle


RBF network is a three-layers feed-forward network, and Incremental PID controller is selected, the inputs of
3 which are shown that:
the structure of the network is selected N 3, 6,1 in this paper.
The inputs of the network are: the increment of the control xc(1) = error ( k ) − error (k − 1)  (27)
input Δu (k ) ǃthe output of the system at the current time xc ( 2) = error ( k ) (28)

333 Downloaded on November 07,2024 at 17:08:11 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: J.R.D. Tata Memorial Library Indian Institute of Science Bengaluru.
xc (3) = error ( k ) − 2error ( k − 1) + error ( k − 2) (29) Considering the direction of the ball moved is the forward
direction of y-axis, the desired position of the ball in y direction
The control algorithm is: is 1. The simulation result is shown as following.
Δu ( k ) = k p ⋅ xc(1) + k i ⋅ xc( 2) + k p ⋅ xc(3) (30) It can be seen from the simulation results that the system
achieves stability quickly (ie: the value of y reach the target
Tuning index of the PID parameter is: value 1). And Fig. 6 show the curves of the three parameters. it
shows that three parameters are convergent and the learning
1 speed of the neural network is fast.
E (k ) = error ( k ) 2 (31)
2 20.005

The adjusted algorithms of three parameters by gradient

kp
20

descent algorithm are shown that: 19.995


0 2 4 6 8 10 12
time(s)

∂y
13.71

k p ( k ) = k p (k − 1) + ηerror ( k ) xc (1) (32) 13.705

ki
∂Δu 13.7
0 2 4 6 8 10 12
time(s)

∂y 9.25

k i ( k ) = k i ( k − 1) + ηerror ( k ) xc ( 2) (33)

kd
9.2

∂Δ u 9.15
0 2 4 6 8 10 12

∂y
time(s)

k d ( k ) = k d ( k − 1) + ηerror ( k ) xc(3) (34)


∂Δu  Figure 6. The graph of the parameters.

D. Simulation Results IV. CONCLUSIONS


The position control simulation of the ball in y-axis is The ball and plate system is a multivariable nonlinear
studied. It can get transfer function using (17). system. According to the physics mechanism, the model and
the corresponding simplified model of the system are derived.
7
G(s) = (35) Based on these a PID controller based RBF neural network
s 2  turning is designed. Compared to the conventional PID
controller and the fuzzy controller, the PID controller based
Sampling time is taken for the 0.01s, so discrete RBF neural network turning has the merit of easy realization
controlled object is shown as follows with discrete Z transform: and learning ability. Therefore, the PID controller based RBF
yout ( k ) = 2 yout ( k − 1) − yout ( k − 2) neural network tuning will be an effective solution for the
(36) control of the ball and plate system.
+ 0.00035u ( k − 1) + 0.00035u (k − 2)
REFERENCES
According to the paper [10], in order to ensure the initial [1] J. Peng, “Fuzzy control of the beam and ball system,” Industry Control
stability of the controller, the initial value of the parameters of and Applications, 2008, 27(3), pp. 48-50.
the neural network PID controller can be taken k p = 20 , [2] D. LI, S. Zhao, and Z. Sun, “Fuzzy neural network control of the ball
and plate system,” Science Technology Engineering, 2006, 6(5), pp.
k i = 13.7 , k d = 9.2 . These can also be used in the 540-543.
conventional PID controller. [3] X. Su, Z. Sun, and S. Zhao, “Fuzzy control method for ball and plate
system,” Computer Simulation, 2006, 23(9). pp. 165-167.
1.2
[4] J. Li and Z. Sun, “The study of simulation of fuzzy control in the ball
and plate control system,” Electric Machines and Control, 2001, 5(4), pp.
1 270-273.
[5] Y. Zhou, “Course of theoretical mechanics,” Beijing: Higher Education
0.8
Press, 2009. pp. 210-223.
0.6
[6] M. Moarref, M. Saadat, and G. Vossoughi, “Mechatronic design and
position control of a novel ball and plate system,” 16th Mediterranean
rin,yout

0.4 Conference on Control and Automation Congress Centre, Ajaccio,


FranceJune 25-27, 2008.
0.2
[7] M. Bai, “On the decoupling and control algorithm for nonlilnear ball and
plate system,” Doctor thesis, Jilin University, 2008.
0
[8] S. Teng, N. Zhang, and X. Fan, “TS model based fuzzy multivariable
-0.2 control scheme for ball and plate system,” Information and Control,
0 2 4 6
time(s)
8 10 12
2002, 31(3), pp. 268-271.
[9] J. Liu, “MATLAB simulation of advanced PID control,” Beijing:
Figure 5. The simulated curve of the system. Electronic Industry Press, 2004.9. pp. 170-172.
[10] L. Huai. “PID neural network and control system,” Beijing: National
Defence Industry Press, 2006, pp. 21-72.

334 Downloaded on November 07,2024 at 17:08:11 UTC from IEEE Xplore. Restrictions apply.
Authorized licensed use limited to: J.R.D. Tata Memorial Library Indian Institute of Science Bengaluru.

You might also like