• No results found

Application of Genetic Algorithm and Recurrent Network to Nonlinear System Identification*

N/A
N/A
Protected

Academic year: 2021

Share "Application of Genetic Algorithm and Recurrent Network to Nonlinear System Identification*"

Copied!
6
0
0

Loading.... (view fulltext now)

Full text

(1)

Application of Genetic Algorithm and Recurrent Network to

Nonlinear System

Identification*

Jih-Gau Juang

Department

of

Guidance and Communications Engineering

National Taiwan Ocean University

Keelung

20224,

Taiwan

Abstract

Nonlinear system identification using recurrent neural network with genetic algorithm is presented. A continuous-time model of Hopfield neural network is used in this study. Its convergence properties are first evaluated. Then the model is implemented to identify nonlinear systems. Recurrent network‘s operational factors of the system identification scheme are obtained by genetic algorithm. Mathematical formulations are introduced throughout the paper. After test, the proposed scheme can successfully identify nonlinear system within acceptable tolerance.

1. Introduction

A neural network is a system of interconnected elements modeled after the human brain. A network of “neuron-like” units operates on data “all at once” rather than “step-by-step” as in a conventional computer. Two classes of neural networks which have received considerable attention in the area of artificial neural networks in recent years are : 1) multilayer neural networks, 2) recurrent neural networks. Multilayer networks have been proven to he extremely successful in pattern recognition problems by many researchers [1-4].

Recurrent networks have been used in associative memories as well as for the solution of optimization problems [5-81. From a systems theoretic point of view, multilayer networks represent static nonlinear maps while recurrent networks represent nonlinear dynamic feedback systems.

In this paper, our emphasis is on the identification of nonlinear dynamic plants using recurrent neural networks. Hopfield and Tank [6-7] have introduced a network through which some classes of optimization problems can he programmed and solved. The object of this paper is to show how to implement a Hopfield network to nonlinear system identification. Most researches in this area use discrete-time model to identify unknown systems [9-121 have shown that this model could take an exponential number of steps to reach only a local minimum. In order to speed up the operation of the network, Hopfield [I31 proposed an analog neural network where the constituent neurons had graded responses. Here, we use this continuous-time model to solve the identification problem.

There are some initial settings must he decided before training the proposed recurrent network. Genetic algorithm (GA) is first applied to search optimal values of the recurrent network’s operational factors of the system identification model. GAS are parallel, global search techniques that imitate natural selection and natural genetics. They are often used as parameter search techniques which manipulate coding of the parameter set to find near optimal solutions based on some performance criterion. A more complete discussion of GAS can he found in Goldberg [14]. Due to its high potential for global optimization, GAS have received great attention in many areas of knowledge. In the field of control various successful applications have been reported [15-18]. In this paper, the initial parameters of the recurrent network are determined based on neural network leaming and GA. With appropriate operators, minimum error of the system to be identified can he achieved.

The basic concepts of Hopfield’s continuous model and convergence properties of the network are introduced and evaluated in section 2. The states of the neurons of this network are converged to the values of the system parameters, which are to be identified. GAS are given in section 3 for searching recurrent network’s operational factors of the system identification model. System representation and leaming process are presented in section 4. Example of nonlinear system identification is given in section 5. Finally, the conclusions are discussed in section 6.

2. Network Model and Convergency

Recurrent networks introduced in the works of Hopfield [5-61 consist of a number of interconnected processing units called neurons. Unlike the multilayer neural networks, a recurrent neural network employs extensive feedback between the neurons. The node equations in this networks are described by differential (continuous-time model) or difference (discrete-time model) equations. In this paper, we consider only the continuous model. Neural architectures with feedback are particularly appropriate for system identification, control, and filtering applications. From a computational point of view, a recurrent neural structure which contains a state feedback may provide more computational advantage than that of a purely feedfolward neural structure.

One version of the recurrent neural network suggested by Hopfield consists of a N-neurons single layer network included in a feedback configuration as 0-7803-7729-Xl03/$I7.00 02003 IEEE

(2)

shown in Figure 1. This network represents a continuous- time dynamic system and can be modified by

Yi

=f

( v A (2)

where vi is the state of i-th neuron, yj is the output of i-th neuron, wii is the connected weight from j-th neuron to i-

th neuron, I, is the bias input of i-th neuron,

X.)

is a sigmoid function and N is the number of neurons required. .

The stability of this neural network is studied by considering the simplified energy function from [ 191

1 "

2 j = 1 j = , i=1

E =

--cc

w s y i y j

-5

I i y i (3) Taking derivative on both sides, under the condition

w..=w..

'I

,,

,

eget .

dt i = l dt dt

dyj dvi

d E -

I--.

(4)

Using chain rule - dvi -.dv, dyi

dt dyi dt

'

substituting equation ( 5 ) into equation (4). we obtain

Since yi is a sigmoid function of vj, we know that

d v i / d y , will he always greater than zero. Hence, the

energy gradient is non-positive (negative semi-definite). This implies that the dynamic system always seeks minimum energy surface.

The networks are updated during the learning process by using the following rules

dvi dt Avj = A t - ,

vt?" = Avj

+

v,"" ,

y,"'" = [f(hvt"") - 0 . 5 1 ~ ~ (7) wherefla) is a nonlinear function l/(l+e-'),

h

is learning rate, s is a scaling factor makes

-:<

y

<L,

and AI is the time interval.

2 l - 2

The definition of the error cost function is

where T is the time period and is the error vector between actual system states

&

and estimated values

&.

Our goal is to minimize the cost function in tenns of the parameters of a unknown plant to be identified. Gi&n a nonlinear dynamic plant (to be identified), we can divide it into three parts, linear states, nonlinear states and control signal, as follow

where A , B, and C a r e unknown matrices,

x

is the linear " .

=Ax+B&l+Cg, (9)

of the plant, and g is the control vector. The estimated system is defined as

~ " "

-

i = A x + B x , , + C g . (10)

Now, we need to minimize

Ik-41

,

i.e., minimize

11-

-(A&

+

Bx,,

+

Cg)l/ . So, the error cost function can be formed as

J = ' [ [ . x-(Ax+B.x,, +tg)]f[&-(Ax+B*n, +&)]dt

T

-According to the convergence properties of the Hopfield network, when the partial derivatives

aJ/&,aJ/aB and d J / a C are zero, the equilibrium state can he obtained. Substituting Ax_+Bn,,+Cg for

&

in equation (1 I), and assuming A , B and C are optimum solutions of the estimated parameters, we obtain

(11)

- -

-

-

1 1 + ( C - q T

1

E ' ) = 0

+(Z

-C)(-

1

g;,,

= 0

+

(C

-C)(,

6

E ' ) = 0 aJ

-

I T I T

-

= (A - A)(T

4

&,,)

+ (B - B)(T

d

?,&)

a i

I T T a J - I T

-

I T = (A - A)(T

1

xu')

+

(B - B)(T

1

x,,g')

' (12)

ac

-

I T For valid: fX+'dt*O, f x n i x ' d t t O , I g ' d t t O , [ g b , d t

to,

[x,,x:,dttO, [ g b , d t 20, [ g ' d t t O , k x n ) g ' d t # O , [ K ' d t f O , (13)

since [ G ' d t , fxn,&bidt and [ E ' d t are obviously not equal to zero, g(t) and g(t) are linearly independent in [0, TI,

&,XI)

and g(t) are linearly independent in [0, TI, and &dt) and ~ ( t ) are linearly independent in [0, TI. Based on above conditions, the convergence can he obtained. Thus, this nonlinear system's matrices A , B, and C can be identified.

= A

,

5

= B and = C

,

the following must be

3. Genetic Algorithm for Operational Factors

Since GAS have the potential for global optimization, they are .suitable for determination of the recurrent network's operational factors, A t , s and T, which give accurate desired system performance. GAS are search and optimization algorithms based on the principle of natural evolution and population genetics. The basic principles of GAS were first proposed by Holland [20].

(3)

parameters. These parameters are regarded as the genes of a chromosome and can be structured by

a

string of values in binary form. A positive value, generally,known as a fitness value, is used to reflect the degree of "goodness" of the chromosome for the problem which would be highly related with its objective value [21].

Throughout a genetic evolution, the fitter chromosome has a tendency to yield good quality offspring which means a better solution to any problem. In a practical GA application, a population pool of chromosomes has to be installed and these can be randomly set initially. In each cycle of genetic operation, termed as an evolving process a subsequent generation is created from the chromosomes in the current population. This can only succeed if a group of these chromosomes, generally called "parents" or a collection term "mating pool" is selected via a specific selection routine. The genes of the parents are mixed and recombined for the production of offspring in the next generation. It is expected that from this process of evolution (manipulation of genes), the "better" chromosome will create a larger number of offspring, and thus has a higher chance of surviving in the subsequent generation, emulating the survival-of-the-fittest mechanism in nature. A scheme called Roulette Wheel Selection

[22]

is one of the most common selection techniques and is used in this paper.

The cycle of evolution is repeated until a desired termination criterion is reached. This criterion can also he set by the number of evolution cycles (computational runs), or the amount of variation of individuals between different generations, or a pre-defined value of fitness. In order to facilitate the GA evolution cycle, two fundamental operators: Crossover and Mutation are required, although the selection routine can he termed as the other operator. An one-point Crossover mechanism is used in this paper. A crossover point is randomly set. The portions of the two chromosomes beyond this cut-off point to the right are to be exchanged to form the offspring. An operation rate @J with a typical value between 0.6 and 1.0 is normally used as the probability of crossover. However, for mutation, this applied to each

offspring

individually

after

the crossover exercise. It alters each bit randomly with a small probability (pm) with a typical value of less than 0.1.

The choice of mutation rate p m and crossover rate p c as the control parameters can be a complex nonlinear optimization problem to solve. Furthermore, their settings are critically dependent upon the nature of the objective function. In here, population size is 20, crossover rate is 0.8, mutation rate is 0.01. Each string has 24 bits which consists 8 bits of A t , s, and T. The fitness function is defined as

where

p

is less than 1, n is the number of intervals in one period, x is the desired state value and ? is the estimated value of the unknown system (to be identified). 4. System Representation and Learning Process

Given a simple nonlinear system

where a p bf and c; are the system's parameters (to be identified), x_ is ( x l , x3', xni is xIxz. and U is the control

signal. Equation (14) can be formed in Hopfield network revresentation as

where yi is i-th-neuron output. Equation (16) is called estimated system. Expanding equation (1 1) and implying to Hopfield network representation [19], we obtain

for i=l IO 4,j=5,6, and i=5,6,j=I to 4; ,for i=7,8,j=I to 4, and i=l IO 4,j=7,8; , for i=7,8,j=5,6, and i=5,6, j=7,8;

-

- C c w u y i y j , fori, j = 7 , 8 ; ( 1

3 -Clipi , for i=l to 4;

i

trace

["I;

B

-I

0'-

ux'dt

I]

3 -Cliyi ,for i=5,6;

The weights and bias followings z: XIX* 0 X*XI x; 0 0 0 x: 0 0 LLI, x:., x,x; 0 0 0 inputs can be 131

(4)

Learning scheme of the continuous-time model in these studies consisted of a single layer recurrent neural network with self-feedback. Equation (9) can he identified by using the structure shown in Figure 2. The following describes how the nonlinear system (15) can he identified.

m:

Obtain recurrent network’s operational factors, A t ,

s,

and

T

by GA.

m:

Giving u(f), y,(O), x,(O) and x2(0), let y,“Id= y,(O) and

calculate x l ( k ) and x2(k) for k=l to n, where

xl(k) = [ i , ( k - l)jAf+x,(k

-

I), x,(k) = [ & ( k - I ) ] A t + x , ( k -1).

m:

Calculate [w,] and [I;] from equation(l8). Note that the

elements of

6

[.]

in equation ( 1 8) can he accumulated by using the results of Step 2.

m:

Update neurons outputs by using equation ( I ) and (7).

m:

Check system Convergence, if ly,? - y:“

I

5 E for all i

and &<<1 then go to Step 6; Otherwise, let y;“ = y,?

,

v:“ = vnw and retum to Step 4.

m:

Check fitness value of GA, if convergence occur then stop learning and printout the unknown system’s parameters; otherwise go to Step 1.

5. Example

, Computer simulations as applied to the

identification of nonlinear dynamic systems are discussed in this section. The system to be identified is described by equation (15).

A

simple nonlinear system is used here to test our learning scheme.

-0.5 6.0

A =

[

1::

;:I=[

-

6.0

-

0.51. =

[

c”:

] =[::o’]

.

The estimation results of this nonlinear system identification by trial and error are shown in Figure 3 to Figure 10. Maximum error (difference between real system’s parameter and estimated system’s parameter) occurs at b2.

-0.498 5.997

0.499

Table I shows that using different time period T (in the updating rule) the speeds of convergence are different. With different scaling factor s of sigmoid function, we obtain different errors as shown in Table 11. For different systems, the optimum sets of T, s and At are different. Table I11 shows the results using GA in searching optimal network operational factors. Maximum error reduces to 0.8%, compare to the maximum error from trial and error method, 1.28%. It has improved 40% from the error point of view.

6. Conclusions

A simple nonlinear system is used to test the algorithm. Theoretically, this nonlinear system can be identified. However, in real estimations, the convergence is affected by several t e m , like time period T, learning rate inside the sigmoid function, the scaling factor s for the sigmoid function and At in the updating ride. From simulation results, we know that the error in the nonlinear system identification is large if optimal values of the network operational factors are not used. With GA the combination scheme of the system identification model has shown that the proposed method can identify nonlinear system successfully.

References

B. Widrow, R.G. Winter, and R.A. Baxter, “Layered Neural Nets for Pattem Recognition,” IEEE Trans. Acousi., Speech, Signal Processing, Vol. 36, No. 7,

pp. 1109-1118, 1988.

R.P. Gorman and T.J. Sejnowski, “Learning Classi- fication of Sonar Targets Using a Massively Parallel Network,“ IEEE Trans. Acousi., Speech, Signal Processing, Vol. 36,No. 7,pp. 1135-1140, 1988.

D.J. Burr, “Experiments on Neural Net Recognition of Spoken and Written Text,” IEEE Trans. Acousi., Speech, Signal Processing, Vol. 36, No. 7, pp.

1162-1168, 1988.

T.J.

Sejnowski

and C.R.

Rosenberg, “Parallel Networks That Leam to Pronounce English Text,” ComplexSyst., Vol. 1, pp. 145.168, 1987.

J.J. Hopfield, “Neural Networks and Physical Systems with Emergent Collective Computational Abilities,” Proc. Nai. Acad. Sci., U S . , Vol. 79, pp. 2554-2558, 1982.

J.J. Hopfield and D.W. Tank, “Neural Computation of Decisions in Optimization Problems,” Biolog.

Cybern., Vol. 52, pp. 141-152, 1985.

(5)

Decision Circuit, and a Linear Programming Circuit,” IEEE Trans. Syst., Man, Cybern., Vol. CAS-33, No. 5, pp. 533-541, 1986.

H. Rauch and T. Winarske, “Neural Networks for Routing Communi-cation Traffic,” IEEE Control Systems Magazine, Vol. 8, No. 2, pp. 26-30, 1988. [9] K.S. Narendra and K. Parthasarathy, “Identification

and Control of Dynamical Systems Using Neural Networks,” IEEE Trans. Neural Networks, Vol. 1, No. 1, pp. 4-27, 1990.

[lo] D.H. Rao, D. Bitner, and M.M. Gupta, “Feedback- Error Learning Scheme Using Recurrent Neural Networks for Nonlinear Dynamic Systems,” Proc. IEEE Int. Con$ Neural Networks, Vol. 1, pp. 175-

180, 1994.

[ I l l J.B. Galvan, et al., “Two Neural Networks for Solving The Linear System Identification Problem,” Proc. IEEE Int. ConJ Neural Networks, Vol. 5, pp. 32263231, 1994.

[I21 A.A. Schaffer and Yannakakis, “Simple Local Search Problem That are Hard to Solve,” SIAM

J.

Computing, Vol. 20, pp. 56-87, 1991.

[ 131 J.J. Hopfield, “Neurons with Graded Response Have Collective Computational Properties Like Those of [SI

[IS] K.J. Hunt, “Polynomial LQG and H-infinity controller synthesis - A genetic algorithm solution,” Proc. of the IEEE ConJ on Decision and Control

pp. 3604-3609, 1992.

[ 161 R.A. Krohling, H. Jaschek, and J.P Rey, “Designing PIPID controllers for a motion control system based on genetic algorithms,” Proc. of the IEEE Int. Symp. on Intelligent Control, pp. 125.130, 1997.

[I71 P. Wang and D.P. Kwok, “Optimal design of PID processes controllers based on GA,” Control Engineering Practice, Vol. 2, No. 4, pp. 641-648,

1994.

[IS] Z.J. Yang, T. Hachini, and T. Tsuji, “Model- reduction with time delay combining the least- squares method with the GA,” IEE Proceedings- part D , Vol. 143, No. 3, pp. 247-254, 1996. [I91 S.R. Chu, R. Shoureshi, and M. Tenono, “Neural

Networks for System Identification,” IEEE Control Systems Magazine, pp. 31-34, April 1990.

[20] J.H. Holland,. Adaptation in Natural and Artificial Systems. Ann Arbor, MI: The University of Michigan Press, 1975.

[21] K.F. Man, K.S. Tang, and S. Kwong, Genetic algorithms. London: Springer-Verlag, 1998. Two-State Neurons,” Proc. Nut. Acad. Sci. U S . ,

Vol. 81, pp. 3088-3092, 1984. [22] C.T. Lin and C.S. Lee, Neuralfuzzy systems, Upper Saddle River, NJ: Prentice Hall, 1996.

[14] D.E. Goldherg, Genetic algorithms in search, optimization and machine learning, Reading, MA: Addison-Wesley Publishing Company, 1989.

I

I

Figure 1. Hopfield continuous-time model (with self-feedhack).

x

+

Estimated System

I

X Unknown System I ”

Figure 2. Learning structure

(6)

I

2 .

0 5000 10000 15000 20000

Learning cycles Figure 3 . Nonlinear system, all=-0.5

-1.00 -2.00 -3.00 -4.00 -5.00 -7.00 -6.00 0 5000 10000 15000~20000 Learning cycles n

Figure 5. Nonlinear system, a2,=-6.0

W

p"

0 10000 20000 30000 40000 W

1

I 2.00

P

1.50

b

E

-0.50

2

0.00

p"

0 10000 20000 30000 40000 Learning cycles Figure 7. Nonlinear system, hl=1.5

W

9

0.50

5

0.30 a 0.60 a, 0.20 E 0.10

2

0.00 m

-

c 0 5000 10000 15000 20000 Learning cycles

I

I

Figure 9. Nonlinear system, cl=0.5

W 7.00 m 6.00

2

5.00 w 2.00 0 5000 10000 15000 20000 Learning cycles Figure 4. Nonlinear system, aI2=6.0

Q)

b

-0.30 0 -0.40 E -0.50 E -0.60 c -

h

0 10000 20000 30000 40000 Learning cycles Figure 6. Nonlinear system, a2>=-0.5 W

-

3 2.50

b

1.50

-

1.00

E

0.50

g

2.00

2

0.00 m 0 I0000 20000 30000 40000 Learning cycles Figure 8. Nonlinear system, b2=2.0

Q) m 1.00

k

0.60 0.40

-

a 1.20

'

0.80 E 0.20

2

0.00

2

0 5000 10000 15000 20000

I

Learning cycles

Figure 10. Nonlinear system, c2=1.0 Table I. Maximum error and cycles in convergence with different T.

T

I

0.2

I

1 .0

I

2.0

~ a . e r r o r %

I

56 1.28 3.03

cycles

I

1.0x106

I

4 . 0 ~ 1 0 ~

I

3 . 0 ~ 1 0 ~

Table 11. Maximum error and cycles in convergence with different s.

S

I

50 .

I

IO0

I

200

Max. error%

I

3.04

I

1.28 650

cycles

I

6 . 3 ~ 1 0 '

I

4 . 0 ~ 1 0 ~

I

I .6xIO4 Table 111. Maximum error based on GA.

At

I

T

I

S

I

Max. error%

References

Related documents

The 2013 National Adult Learners Satisfaction-Priorities Report reveals that at four-year colleges and universities, 75 percent of adult learners are satisfi ed or very satisfi ed

A large number of V-slot loaded proximity coupled microstrip antennas with different dimensions were simulated and the best impedance matching and best 3-dB axial ratio bandwidth at

A dispersive Landau-fluid model is used to study the decay and modulational instabilities of circularly- polarized Alfv´en waves in a collisionless plasma, as well as their

The investigations were con- ducted in 2 stages: with installation without packing media (activated sludge only) and packed with zeolite from Chankanaysky field (activated sludge

We welcome Implementation Science 's new policy (Appen- dix) of requiring authors to make, or to have made, avail- able intervention protocols when submitting intervention studies

Four important limitations of studies conducted to date on individual characteristics and research utiliza- tion by nurses are: methodological quality, statistical rigor,

In other words, the second stage outcome is a Cournot equilibrium in output (subject to capacity constraints) which is correctly anticipated by fi rms when choosing debt, equity