Neural Networks For Control - 01
Neural Networks For Control - 01
Neural Networks For Control - 01
(3)
Hopfield [7] has shown that, if the weights Tare symmetric (TG= T,,), then this energy function has a negative time gradient. This means that the evolution of dynamic system (1) in state space always seeks the minima of the energy surface E. Integration of Eqs. (1) and (3) shows that the outputs V, do follow gradient descent paths on the E surface.
Introduction
Artificial neural networks offer the advantage of performance improvement through learning using parallel and distributed processing. These networks are implemented using massive connections among processing units with variable strengths, and they are attractive for applications in system identification and control. Recently, Hopfield and Tank [l], [2] demonstrated that some classes of optimization problems can be programmed and solved on neural networks. They have been able to show the power of neural networks in solving difficult optimization problems. However, a globally optimal solution is not guaranteed because the shape of the optimization surface can have many local optima. The object of this paper is to indicate how to apply a Hopfield network to the problem of linear system identification. By measuring inputs, state variables, and time derivatives of state variables, a procedure is presented for programming a Hopfield network. The states of the neurons of this network will converge to the values of the system parameters, which are to be identified. Results are presented from computer simulations for the identification of time-invariant and timevarying plants. Tank and Hopfield [2] have also shown that the network can solve signal decompoPresented at the 1989 American Control Conference, Pittsburgh, Pennsylvania, June 2 1-23, 1989. Reynold Chu and Rahmat Shoureshi are with the School of Mechanical Engineering and Manoel Tenorio is with the School of Electrical Engineering, Purdue University, West Lafayette, IN
47907.
J=I
C jlq- U, R; + Ii
(1)
The dynamic equation of the adjustable system depends on e, which is the error vector between actual system states x and estimated values y.
y = A,(e, r)x
It is assumed that all neurons have the same capacitances, thus C is not included in Eq. (1). The dynamics are influenced by the learning rate X and the nonlinear function g.
+ &(e, t ) u - Ke + (B, + Ke
(5)
v, = &?(XU;)
U, = (l/X)g-(V;)
0272-170819010400-0031 $01 00
(24 (2b)
= (A,, - A,T)x
- B,Ju
(6)
0 1990 IEEE
31
April 1990
_--______ -_ - -- - 1
Plant to be identified
1
XI
I
der system with two states and a single input is considered in two cases: time invariant and time varying. The following shows the resulting Tj and Z , for Eq. (1).
[T,I
-(W
lo'
[MI dt
I[
Fig. 1. Proposed time-domain system identi3cation scheme.
ux2
0
ux,
0
ux2
u2
0
u2
The goal is to minimize simultaneously square-error rates of all states utilizing a Hopfield network. To ensure global convergence of the parameters, the energy function of the network must be quadratic in terms of the parameter errors, (Ap - A,) and (B, B,). However, the error rates (e) in Eq. ( 6 ) are functions of the parameter errors and the state errors. The state error depends on y, which, in turn, is influenced by A, and B,. Hence, an energy function based on e will have a recurrent relation with A, and B,. To avoid this, we use the following energy function, where tr defines the trace of a matrix, and (.)'is the transpose of a matrix [ 8 ] . E = (1/T)
we can program a Hopfield network that has neurons with their states representing different elements of the A, and B, matrices. From the convergence properties of the Hopfield network, the equilibrium state is achieved when the partial derivatives aE/aA, and aE/ aB, are zero. This results in the following, where A: and BT are optimum solutions of the estimation problem.
ai,,UX2]' dt
In the case of the time-invariant system, the following Ap and B, matrices are to be identified.
A, = [ - 0 . 9 4 2 5
12.56 -0.9425
- 12.56
(AT
n7
(1/2)e,(t)Te,(t) dt
lo'
xu'dt]
(l/T) l T ( 1 / 2 ) ( X- A,x
+ (B:
B,) [(l/T) s o T u u T d t ]= 0
(8b)
. (X
- A,x
B,u) dt Derivation of Eqs. (8) assumes that the neuron input impedance, Ri, is high enough so that the second term in Eq. ( 1 ) can be neglected. Therefore, AT approaches A,, and B, approaches B, if, and only if, the following is true. (UT)
= trA,[(l/T)
~'(1/2)xx'dt]A:
-0.9425
- 12.56
12.56 -0.9425
. (1
tr A , [ ( l / T )
- tr B , [ ( l / T )
+ [(l/T)
soT
io' So'
xx'dt]
j'o [xi u
[X'lU*]
dt # 0
(9)
OSO!
II
u t T dt]
(1/2)XTXdtj
(7)
Equation (7) is quadratic in terms of A, and B,. Substituting A,x B,u for x in Eq. (7) indicates that E is also a quadratic function of the parameter errors. Based on Eq. (7),
It can be shown [ 9 ] that Eq. ( 9 ) is true if, and only if, x ( t ) and u ( t ) are linearly independent in [0, TI. Landau [ l o ] gives a detailed discussion on the condition to ensure linear independence. If state convergence is important, all that is needed is an asymptotically stable K i n Eq. ( 6 ) . As shown by Eq. ( 9 ) , state convergence follows the parameter convergence. To show applications of the preceding network for system identification, a second-or-
-4.01;
I
-5.5
0
4 6 Time, sec
IO
32
Let us define
w,t, .. .
would be as shown in the following, where q l , . . . , qZ,n + I are the gain constants that regulate the speed and stability of the adaptation process. dWldr = { q l e ( t ) ,qze(r)cos w , f , q 3 e ( t )
*
wT= b o ,
-?
al,
b,,
t . .
,a
I!,,
b,"l
-,,
-1.
c
0
4
Then, the error signal E ( ? ) is defined as the difference betweenf(r) and X'W. Expansion of Eq. (10) results in the following quadratic formulation:
8
12
16
~ ~ ~ + sin ~ e w,,,tJ7 ( r )
(14)
20
( l / 2 ) W 7 R W - P'W
Time, sec
rime-varying The function R represents the input correlation matrix and the cross-correlation matrix between the desired response and the input. R = (l/T)
Because Eq. (14) modifies the weights based on instantaneous estimates of the gradient, V , the adaptive process does not follow the ttue line of steepest descent on the meansquare-error surface. Therefore, the following scheme for changing the algorithm is proposed. First, let
'71 = (1/T)
'72 = '73 =
Figure 3 shows the identification results. As shown, very good tracking is achieved. It should be noted that, for the case of the timeinvariant system, a rectangular window with an infinite memory is used; whereas, for the case of the time-varying system, an exponentially decaying window using a first-order filter is utilized to ensure fast convergence in the presence of changing plant parameters. This window has the effect of emphasizing the most current estimates of error, rather than the past memory. Highfrequency fluctuations observed in Fig. 3 may be alleviated by using second- or higherorder filters.
(l/T)
/ S
ro + 7
. . . '72m
= 72m+ I =
2/T
X ( r ) Xr(r) dr
0 111
+T
f ( r ) x ( t ) dr
These results can be used to program Hopfield's network. However, since orthogonality of the basis functions produces a diagonal R matrix, it would be simpler to use Widrow's ALC than a Hopfield network. The gradient of the mean-square-error surface, aE/aW, is RW - P. The optimal W * is obtained by setting this gradient to zero, resulting in W * = R - ' P . The optimal weights we obtained are indeed the Fourier coefficients of the original signal, f ( t ) , which can be rewritten as W * = W - R - ' V , where V is the gradient of the energy surface, aE/aW, and can be represented by
-(UT)
'j
IU
+7
Wlr,
The integrand in Eq. (12) is the instantaneous estimation of the gradient vector in the least-mean-squares (LMS) algorithm used to estimate the unknown parameters. Based on orthogonality of the basis functions and applications of Eq. (12), W * can be represented by w*
=
w + (IiT)
ro
I!
+7
{e(t),
. cos wit, 2 4 4 sin wlr, . . . , 2e(r) . cos w,r, 2e(r) sin ~ , r } ~ d (13) r
Therefore, the famous Widrow-Hoff LMS rule for this problem, in a continuous form,
E = (1/2T)
r,!
I/
+7
[f(r)
x,,?(r)]'dt (10)
Then apply Eq. (14) to accumulate the weight changes while keeping all the weight constant until the end of the T seconds. The weight corrections are then based on the average of gradient estimates over a period T. Because of the diagonal R matrix, our method is equivalent to Newton's method of searching the performance surface. By successive increases of T in each cycle (and, hence, the decrease of learning gain), we are able to eliminate the variations of weights due to low-frequency components inf(t). A suggested sequence of periods for averaging is T, 2T, 3T, . . . . Each time the period is increased, we need to add more weights and neurons. Hence, the frequency resolution is determined by the available resources and is improved as T increases. Moreover, if the initial selection of T happens to be the period off@) or its integer multiples, then we reach the correct weights in a single search period. This can be seen by integrating Eq. (13) over a [to, to + TI time interval with the initial weight being W , then we will get Eq. (13). Figures 4 and 5 show the magnitude and phase results of decomposing a signal having frequency components from direct current to 10 Hz with 0.5-Hz increments. We use a network capable of 1-Hz resolution. The initial guess of T i s 1 sec, which does not provide good results. After extending Tto 2 sec, we can identify quite accurately all the components within our frequency resolution. Figures 6 and 7 are the simulation results of identifying the frequency response of an unknown plant subject to periodic input pulses with a period of 2 sec. The pulse train is formed by a series of cosine waves with frequency components from direct current to 10 Hz with increments of 0.5 Hz and 0.05 magnitude for all components. The output of the plant is analyzed by the Fourier network.
Aprii 7990
33
0.4
1
0 2 4 6 8 1 0
0.20
0.251
:
8
8
I20
1
60
1
ne
-90
.::?afificlcl
0 2 4 6 8 1 0
[31 E. Mishkin, The Analytical Theory of Nonlinear Systems, chap. 8 in Aduptive Control Systems, edited by E. Mishkin and L. Braun, New York: McGraw-Hill, pp. 271-273, 1961. B. Widrow and M. E. Hoff, Jr., Adaptive Switching Circuits, IRE WESCON Conv. Rec., pt. 4, pp. 96-104, 1960. B. Widrow and S. D. Steams, Adaptive Signal Processing, Englewood Cliffs, NJ: Prentice-Hall, 1985. J . J. Hopfield, Neural Networks and Physical Systems with Emergent Collective Computational Abilities, Proc. Nutl. Acud. Sci., vol. 79, pp. 2554-2558, 1982. [71 J . J . Hopfield, Neurons with Graded Response Have Collective Computational Properties Like Those of Two-State Neurons, Proc. Nutl. Acud. Sei., vol. 81, pp. 3088-3092, 1984. R. Shoureshi, R. Chu, and M. Tenorio, Neural Networks for System Identification, Proc. 1989 Amer. Contr. Con$, June 1989, vol. 1, pp. 916-921. R. E. Skelton, Dynamic Systems Control Linear Systems Analysis and Synthesis, New York: Wiley, pp. 25-26, 1988. I. D. Landau, Adaptive Control the Model Reference Approach, New York: Marcel Dekker, 1979.
Frequency. Hz f a signal Fig. 5. Phase decomposition o with discrete frequency contents. The initial trial uses T = 2 sec and 0.5-Hz frequency resolution. Then we use T = 4 sec and 0.25-Hz frequency resolution. Figures 6 and 7 also show the theoretically calculated frequency response. Figure 6 indicates that the network not only correctly identifies all the existing components, it also marks out the nonexistent components by showing an almost zero magnitude. The phase estimation corresponding to the nonexistent components has been deleted from Fig. 7.
Frequency, Hz Fig. 7. Identijcation o f phase frequency response of a mass-spring-damper system. vergence is of concern, stable feedback of state errors can be introduced. Simulation results have shown the feasibility of using this system identification scheme for time-varying and time-invariant plants. It was shown that Widrows adaptive linear combiner is useful in conducting Fourier analysis of an analog signal. Instead of using a string of delayed signals, we use sines and cosines as inputs. By taking advantage of orthogonal input functions, we can perform Newtons searching method in seeking the minimum point of the performance surface. Simulation results show that this technique can be used to identify the frequency transfer functions of dynamic plants.
Conclusion
A technique for programming of the Hopfield network for system identification was developed. Simultaneous energy minimization by the Hopfield network is used to minimize the least mean square of error rates of estimates of state variables. In this procedure, we obtain a quadratic error surface by suppressing feedback of the estimation error of the state variations. This would eliminate formulation of complex error surfaces caused by recursive dependence of state error rates on adjustable variables. If state-variable con-
References
[l] J. J. Hopfield and D. W. Tank, Neural Computation of Decisions in Optimization Problems, Biol. Cybern., vol. 52, pp. 141-152, 1985. [2] D. W. Tank and J. J. Hopfield, Simple Neural Optimization Networks: An A/D Converter, Signal Decision Circuit, and a Linear Programming Circuit, IEEE Trans.
his B.S. degree in mechanical engineering from National Cheng Kung University, Tainan, Taiwan, in 1981; the M3.E degree in mechanical engineering in 1983; and the M.S.E. in computer information and control engineering in 1984, from the University of Michigan, Ann Arbor. From 1985 to 1987, he was an Engineering Analyst in the Technical Center of Navistar International Transportation Corporation, working in the field of vehicle dynamics, vibration, and control system design. Currently, he is working on his Ph.D. degree in the School of Mechanical Engineering at Purdue University. His research interests include applications of neural networks to system identification and control, and control of flexible structures.
34
Kahmat Shoureshi I( an Associate Professor and Chairman o f Manufacturing and Matenuls Processing area in the School of Mcchanical Engineering at Purdue University. He completed his graduate dudieb ut MIT i n 1981. His research interests include. intelligent control and diagnostic systems using analyticalisymbolicprocessors and neural networks; active and semiactive control of distributed parameter systems, including flexible structures and acoustic plants; and manufacturing automation, including autonomous machines and robotic manipulators. He was the recipient of the
American Automatic Control Council Eckman Award in 1987 for his outstanding contributions to the field of automatic control. He is currently involved in several industrial and government research studies. He is a Senior Member of IEEE.
Manoel F. Tenorio received the B.Sc.E.E. degree from the National Institute of Telecommunication, Brazil, in 1979; the M.Sc.E.E. degree from Colorado State University in 1983; and the 'h.D. degree in computer engineeringfrom the University of Southern California in 1987. In 1989,
he led a product design group as the Director of Research and Development at C.S. Components and Electronic Systems in Brazil; from 1982 to 1985, he was a Research Fellow for the National Research Council of Brazil. While completing his doctoral studies, he taught graduate level courses in artificial intelligence at USC, UCLA, and Rockwell Internationalin Los Angeles. Currently, he is an Assistant Professor at the School of Electrical Engineering, Purdue University, where his primary research interests are parallel and distributed systems, artificial intelligence, and neural networks. He is the organizer of the interdisciplinary faculty group at Purdue called the Special Interest Group in Neurocomputing (SIGN) and heads the Parallel Distributed Structures Laboratory (PDSL) in the School of Electrical Engineering.
more volunteers for the Associate Editor positions than there are openings. However, the best opportunities to be creative and proactive on behalf of the Society lie elsewhere. Virtually every one of the other volunteer positions provides many chances to influence the present and future of the Society.
Sign Up Now
Anyone who is interested in being considered for any one of these positions in the Society should send a letter to the PresidentElect at the following address, stating your interests and the type of job open to consideration. Also, please include a resume with a summary of your professional and societal experience, your phone number, and your electronic mail address, if you have one. Please include the network name in your electronic mail address. In addition, if there are people who are already active in the Society who can act as a reference for you, please send their names. Alan J. Laub, President-Elect Department of Electrical and Computer Engineering University of California Santa Barbara, CA 93106 Phone: (805) 961-3616
Needed Volunteers
Positions exist on the Transactions Editorial Board, on the Board of Editors of the IEEE Control Systems Magazine, as Technical Committee Chairmen, as chairmen of the various Working Groups within each of the Technical Committees, as Chairman of the Society Conference Board, as General Chairman or Program Chairman of either the Conference on Decision and Control or the Automatic Control Conference, or as members of the Program Committee or various
35