Copyright © IFAC Low Cost Automation, Shenyang, P.R. China, 1998
A NOVEL RECURRENT NEURAL NETWORK AND ITS ALGORITHM Wang Jianhui Jin Qibing Gu Shusheng
Department of automatic control,School ofInformation & Science Engineering, Northeasttern univercity(ll 0006), FR.China
Abstract--This paper presents a PlO-like controller based on gradient descent learning algorithm. The controller's structure and the learning algorithm are very simple and easy to be realized. A modified neural network (MNN) is presented to learn the characteristics of the dynamic system for the on-line solution of the so-called sensitivity. The simulation study indicates the superiority of the novel controller over the conventional PI controller, and showes that Neural Network control technique seems to have a lot of promise in the applications of power electronics. Copyright © 1998 [FAC
Keywords--Neural nets, PlO control,Learning algorithms,Dynimac systems, Sensitivity
i .INTRODUCTION
learned by the recursive least squares (RLS) method; and one diagonal recurrent neural network (DRNN) (chao-Chee and Kwang,1994;1in,et al. ,1994) whose weights are learned by BP (Back Propagation) algorithm. The MNN can learn the dynamics of the controlled plant on-line. The objective is to explore the control robustness in the presence of parameter variation and load disturbance effect.
It is well known that PlO control algorithm is widely used in many industrial control systems. It has the
merits of simplicity and effectiveness and so on, but the tuning of the PID parameters is sometimes difficult especially when the controlled plant is nonlinear and/or when the system dynamics have parameter uncertainties, which makes the control effects worse.
The paper starts with the derivation of the PlO-like controller, then presents the calculation methodology of sensitiveness using MNN. The overall control problem is separated into two subproblems, namely, control of speed and control of current. Simulation results are used to demonstrate the performance of the speed controlled DC machine system and a comparison is made with a conventional PI control scheme.
A novel PlO-like controller is proposed in this paper, which is based on gradient descent learning algorithm with a modified neural network to mirror the dynamics of a phase-controlled converter DC machine system and compensate for the controller parameters. It can be proved that this kind of controller has the same structure as PID controller provided that the selection of the cost function is suitable. The most important thing is that our PID-like controller can adaptively control the plant due to the introduction of plant's sensitiveness in the control law.
2. THE STRUCTURE OF THE PlO-LIKE CONTROLLER Gradient descent method is widely used. Here, this method is applied to train the controller to minimize some performance, that is :
The MNN used here is composed of two subnets: one linear neural network(LNN) whose weights are
249
u(k + 1)
= u(k) -
TJ· aI/ OUIU=U(k)
( 1)
i
V
,~--..,
r(k) (k)
e
where u( k) is the output of the controller at the kth step, TJ is a positive constant called learning rate, and J is a cost function. In this paper, the following perfonnance is used :
1
J = -e 2
2 (hI)
A ,2 T ,,2 +-e (k+I)+-e (hI)
2
2
PlO·like Controller
/\ knsitiVeness~ MNN
- F'l·
:~ <
(2)
:
~--
Fig.I . Adaptive control strategy scheme. A Y(k+] )
where,e(k+l)=r(k+l)-y(k+l) , r(k+I) is the setpoint, y(k+ 1) is the actual output of the system.
e'(k + 1) = e(k + 1) - e(k) , e"(k + 1) = e'(k + 1) - e'(k) and A, '! are weighting factors .
y
P = TJA~,I
dui
u(k.] )
¥
y(k)
y«.I)
Fig. 2 Modified recurrent neural network
u(k + 1) = u(k) + rye~+ TJk' ~+ TJU" ~ =u(k)+Pe'+Ie+De" (3)
where,~ = iY(k + 1) /
~
u(k)
From (1) and (2), the PID-like adaptive control algorithm can be obtained as follows :
3. THE CALCULATION OF SENSITIVENESS USING A MODIFIED NEURAL NETWORK
u=u( k)
= TJe;, D = TJT~
The sensitiveness of a dynamic system is a main characteristic parameter. Here, the MNN is emploied to estimate the sensitiveness. The structure of the MNN shown in Fig.2 has three advantages: first, the LNN part can be trained at a high convergent speed; secondly, the system order needs not be known prior; thirdly, the MNN becomes relatively simple and its learning will cost less time than that of the feedforward neural networks and DRNN (chao-Chee and Kwang, 1994).
(4)
of0-'(k + 1)/ iU is used in the equ.(3) instead of 0-'( k + 1)/ iU itself , the well known If the sign
incremental fonn of PID algorithm is obtained. That is to say, the essence of PID control algorithm is the gradient descent method (1) as lorig as the cost function is selected as (2) and the sensitiveness 0-'( k + 1)/ iU is replaced by its sign. The controller is of positive action when the sign is positive; and it is of negative action when the sign is negative. Although the sensitiveness 0-'(k + 1)/ iU in (3) is not easily acquired, the accurate value of Icry (k + I) / 8u I
Consider the following nonlinear controlled plant: y(k + I)
is
not so important sometimes, because the step size can be adjusted by setting TJ. Certainly, this requires
= J(y(k),y(k -
I), ... y(k -n + 1), u(k),u(k -1), .. . u(k - m + 1)
(5)
note that, n and m are not system order here, but selective by experience for the use of identifying the linear part model; usually with n,m increase, the LNN mode ling gets more accurate, but the calculation burden will be increased accordingly. However, the inaccuracy of LNN due to the selection of m, n and other factors will be compensated by DRNN. MNN is described by the following network model:
Icry(k + I) / bUl < OCJ, '\It . Therefore, if the sign of 0-'( k + 1)/ iU at each instant is known, then a simple algorithm can be got to control a plant. Obviously, the sign of 0-'(k + 1)/ iU is easily to be detennined for most fixed control problems, but this method is coarse and can not mirror the dynamic characteristic of a system, so a MNN is built to estimate the system's sensitiveness. Fig.I shows the strategy. In this archite-cture , P,I,D parameters(4) are on-line changed accor-ding to the system dynamic characteristics, so, the adaptive control is realized.
y(k + 1) = YL (k + 1) + YN (k + 1) + &(k + 1) =
T x(k) + N(u(k),y(k)) + &(k + 1) where,
250
(6)
x(k) = [y(k), y(k - 1), .. . y(k - n + 1);
YN(k + 1) = LW? H j (k) ; H j (k) = pes j (k»
u(k), u(k -1), ... u(k - m + 1)]T
D S(k)=W H(k-l)+ "WII(k)+B (11) J J J ~ J,II J
= [ao,a l , ••• an_l'bO,bl , ••• bm_If , which is the parameter vector of LNN; N(u(k),y(k» is a DRNN with (u(k),y(k» as the input layer, one hidden layer here and one single
where,
the sum of inputs to the jth recurrent neuron; H j (k)
1\
YN(k+l) is the output of theDRNN, s(k+l) is
L'
is the output of the jth recurrent neuron; and W
of the
neurons at the hidden layers is p( x) = 1/ 1 + e -x
,
is threshold of the jth recurrent neuron.
DRNN, the inputs consist of u(k) and y(k); S jCk) is
y L (k + 1) is the output of the LNN,
the modeling error. The activation function
BJ.
For each discrete time k, 1i (k) is the ith input to the
1\
output;
(10)
WF ' and Wp
the
represent input, output and diagonal
neurons at the input and output layers are linear. The parameter vector of the LNN is identified by the RLS algorithm, while the weights and thresholds of the DRNN are learned by the BP algorithm.
weights respectively.
This network model is very suitable for the nonlinear systems that includes linear parts; for the pure nonlinear systems that includes no linear parts, this model also has its adaptability especially to the case that the pure nonlinear systems are working in nearly linear operating points, nevertheless, the LNN will then play a relatively smaller role in MNN. The detailed procedure is perfonned as follows:
First, let us define:
The learning algorithm of the DRNN is described as follows (chao-Chee and K wang, 1994):
1\
1\
eN (k + 1) = (y(k + 1) - h (k + 1) - YN(k + 1»
E = e~ (k + 1) / 2 ,
.wF (k + 1) = wF (k) - TfwiE / bWP = WF (k) + TfweN (k + l)H (k)
(12)
j
D .Wj (k + 1)
I. Initialize the weights and thresholds of the DRNN randomly and the parameter vector properly.
= WjD (k) -
D TfwiE / imj
Wp (k) + TfweN (k + I)G /k)W
=
2. Use the RLS algorithm to identify the parameter
G /k) = CH /k) /
vector
imp
=p'(S j (k»(H j (k -
1) +
Wp (k)G jCk -1)) (14)
Gj(O)=O I I .WJ,I (K+l)=WJ,I (K)-n'Iw
aEjaw I
=WIJ,I. +n'Iw e N (k+l)Q J..,I (k)Wo J (k) + K(k + 1) x X T (k)(k)]
K(k + 1) = P(k)x(k)[x T (k)P(k)x(k) +
yr
l
J,I
(15)
i Qj,1.. (k) = CH j (k)/ OW j ,1
(7) [y(k + 1) -
(13)
jO
=
p'(S j (k»(I i (k) +
(8) Qj,i
(0)
wp (k)Q j,i (k -1» ,
( 1 6 )
=0
P(k + 1) = [I - K(k + l)x T (k)]P(k)/r '
P(O) = 81 (5) 0)
(9)
where, l'\w is learning rate ofDRNN;
where y(k + 1) is the latest process output value.
p' (• ) = dp( • ) / d • .
8 is a larger constant(e.g., lO,OOO). I is a unit matrix. Such, the sensitiveness is calculated according to the dynamic equation as follows:
3. Then fix the parameter vector and use the BP algorithm to learn the weights and thresholds of the DRNN. The mathematical model for the DRNN shown in Fig.2 is given by the following equations (Chao-chee and Kwang, 1994):
0'(k + 1)/ &
Iu=u(k) :=::
o~(k + 1)/ &(k) (17)
=b o + LWFp'(Sj(k»W]u
251
where, b 0 is the sensitiveness part corresponding to the LNN part. W I is the weight from input u(k) to the
angle for the firing unit. The two-dimensional relation of ~a can be pre-computed for each XIR (X is the armature reactance, R is the armature resistance) parameter and stored in the form of a look-up table for microcomputer implementation. If the parameter XIR variation is considered, and the compensating angle is needed with good accuracy, then the look-up table's memory tends to be very large and very timeconsuming. Sousa (1994) proposed a fuzzy method of ~a angle compensation, expressing the ~a angle as a fuzzy relation of the variables la and a angle. But this method could only achieve off-line firing angle compensation and has some difficulty in tuning the fuzzy rule base. However, if a MNN is used to learn the dynamics of motor plus converter, the adaptive control for the current loop in discontinuous conduction mode could be achieved.
JU
jth neuron at hidden layer. Notice that, starting with the off-line training period using the algorithm as described above, eqn.(7-9) are run through all the training data, thus obtaining the estimation of the parameter vector et> . Then go to Step 3 using eqn.( 12-16) to learn the weights until modeling error E(k) is less than the given small positive value. While during the on-line learning period, first run Step 2 several iterations at each sampling instant, and then run Step 3 for fixed numbers of iteration. A number of simulation results show that the learning speed of the learning algorithm using the MNN model structure as described above is much faster than that of multilayered feed-forward networks and the pure DRNN.
A second-order model of the motor is considered in this study. The test system consists of a shunt connected DC motor with the following ratings (CHEN,1991):armature voltage Ve =220V, armature
4.SIMULA TION
current le =136 A, armature speed ne = 1460r/min, R=0.5Q, back EMF constant Kv =0. 132V/r/min,
The power circuit in the speed control system under consideration consists of a phase-controlled bridge converter that drives a separately excited DC motor. For simplicity, the converter is used in motoring mode only with fixed field excitation. The speed control loop has inner current control loop to provide fast transient response as well as to limit the armature current. The current controller output u generates the firing angle a, by cosine wave crossing method. Considering the nonlinearity and parameter variation problem exits mainly in the current loop, for simplicity and not lose control adaptability, in the PID-like speed controller, the sensitiveness OCV r (k + 1) / 81; ( k) is replaced by its sign, thus making the PID-like speed controller act as the conventional PID speed controller.
T, =LIR=0.03s, Tm =0.18s(the motor drive system's Its mechanical and electrical time constant). dynamics can be approximately represented by a transfer function as follows:
The transfer function of the converter:
where Ks is the gain of the power converter, Vs is the control input to the power converter.
The nonlinear Vd -- la (Vd is the output voltage of the converter, I a is the armature current) relation adversely affects the gain characteristics of the current control loop. If, for example, the loop gain is made optimum at continuous conduction mode, the lower gain at discontinuous conduction will make the loop response sluggish. On the other hand, if the gain is optimized for discontinuous mode at a certain operating point, the loop will tend to be unstable at continuous conduction. Among the number of methods suggested to linearize the converter transfer characteristics at discontinuous conduction mode, the look-up table method suggested by Ohrnae (1980) appears to be very attractive. In this method, an auxiliary compensating ~ a angle is generated as a function of main a angle and armature current I a , and then added with the
a
angle to generate the
A series of random input is superimposed on the system as u(k), i.e. the control input from the Current Controller. At every sampling step, the (u(k),!a(k) ) parameter pairs were got; 100 pairs of data are enough for training the MNN and are stored. A MNN is designed to learn the dynamics of the converter plus DC motor. The MNN is trained off-line first, using the (u(k),!a(k) ) data of the controlled plant. While for on-line control, the DRNN is trained five iterations per sampling step, the LNN part is trained two iterations per sampling step. It is necessary to add a fIlter into the system in case of a tremendous change of (k +
lala
ao
252
l)/aul.
shows the corresponding system response under PI control (the PI controllers' parameters are well-tuned) in both the loops.
15..---cr-T'"""""---.---,------.----,
10
5
o
~ I~
_target
'IN\I ~\ .............. outputofMNN
rH '/ IvMVI !
fv" id
CONCLUSION
~ vVv\NVVVW
·5
l
·10
An adaptive controller using MNN based on gradient descent learning algorithm is presented in this paper. The proposed adaptive control algorithm and structure are very simple and easy to be realized. Thesimulation shows that it has stronger load disturbance rejection ability than conventional PI controller, and if applied to real-time control for nonlinear power systems such as DC Drive, the PID-like controller will surely overcome the practical system noniinearity and achieve high control performance.
~i
·15L---'---'-----'---'-----.J 60 40 50 11 10
Fig. 3 The identification of the u(k)- la (k) dynamics of motor plus converter
too
,
r----i
lID i
REFERENCES
Speed
I
400
Chao-Chee,K. and Y.L.Kwang (1994). Diagonal recurrent neural networks for dynamic systems control. IEEE trans. on Neural Networks,6, No.I,144-156. Jin,L.,P.N.Nikiforuk and M.M.Gupa (1994). Adaptive control of discrete-time non linear systems using recurrent neural networks.IEE Proc-Ctrol theory, 141, No.3, 169-176. Ohmae,T.,et.al (May/June 1980). A microprocessor controlled fast response speed regulator with dual mode current loop for DCM drives. IEEE TrI ans. Ind. Appl., 1A-16,388-394. Sous a, Gilberto C. D. , et al (JanJFeb 1994).A Fuzzy Set Theory Based Control of a Phase-controlled Converter DC Machine Drive. EEE Trans. Ind Appl. , 30,No.I,34-44. CHEN Boshi (1991),Examples ofDesign.In:Automatic Control system Mechanical Industrial Publishing House in P.R.China,203.
1 /
7t 0
115
Current
1.5
r ,
2.5
3.5
J
Fig. 4 PID-like control system response to a
Cl) r
step
and TJ step.
Speed
Current ",-------4
0.5
1.5
3.5
25
Fig. 5 PI control system response to a
Cl) r
step
and T J step. (for comparison) In the controller design, Tl y
= 0.08, A = 0.25, 't = 0 ,
= 0.99, m = n = 2 ; the DRNN is a
N
2,30,1
network;
and DRNN learning rate ( Tl w ) is 0.00 I . Fig.3-5 show the simulation results. FigA shows the speed and current response under PID-like current control with the reference speed of 714 rpm and an initial 40% rated load, and demonstrates the effect of a step load change from 40% rated load to 100% rated load. Fig.5
253