Modeling and PID Neural Network Research For The Ball and Plate System
Modeling and PID Neural Network Research For The Ball and Plate System
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
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
Qx = f x − mg sin θ x (2) l
axis
ua l
Q y = mg sin θ y − f y (3) O Virt
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
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
kp
20
∂y
13.71
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)
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.