Adaptive Nonlinear Control Using TSK-Type Recurrent Fuzzy Neural Network System* Ching-Hung Lee and Ming-Hui Chiu Department of Electrical Engineering, Yuan Ze University Chung-li, Taoyuan 320, Taiwan
[email protected]
Abstract. This paper presents a TSK-type recurrent fuzzy neural network (TRFNN) system and hybrid algorithm to control nonlinear uncertain systems. The TRFNN is modified from the RFNN to obtain generalization and fast convergence rate. The consequent part is replaced by linear combination of input variables and the internal variable- fire strength is feedforward to output to increase the network ability. Besides, a hybrid learning algorithm (GA_BPPSO) is proposed to increase the convergence, which combines the genetic algorithm (GA), back-propagation (BP), and particle swarm optimization (PSO). Several simulation results are proposed to show the effectiveness of TRFNN system and GA_BPPSO algorithm.
1 Introduction In recent years, fuzzy systems and neural networks are being used successfully in an increasing number of application areas [1-6]. In [4], a recurrent fuzzy neural network (RFNN) is proposed to identify and control nonlinear systems. For TSK-type fuzzy model, the consequent part of each rule is a function input linguistic variable. The general used function is a linear combination of input variable [2, 4]. In this paper, a modified RFNN based on TSK-type fuzzy model (called TRFNN) is presented to generalize and increase the ability of RFNN systems. Recently, several algorithms are proposed by the observation of real-world, such as, genetic algorithm (GA), DNA computation, particle swarm optimization (PSO) [3, 7-13], etc. GAs are stochastic search procedures based on the mechanics of natural selection, genetics, and evolution [3, 9, 12]. It presumes that the potential solution of a problem is an individual and can be represented by a set of parameters. Particle swarm optimization (PSO): a new evolutionary computation technique is proposed by Kennedy and Eberhart [11]. PSO, similar to GA, a population of random solution is initialized. It was developed by the research of the social behavior of animals, e.g., bird flocking. Compared with GA, PSO has no evolution operators such as crossover and mutation, and moreover, PSO has lesser parameters. It has been applied on optimization problems, neural network learning, fuzzy control, and evolution algorithm [3, 8, 13]. *
This work was support partially by National Science Council, Taiwan, R.O.C. under NSC-942213-E-155- 039.
D. Liu et al. (Eds.): ISNN 2007, Part I, LNCS 4491, pp. 38–44, 2007. © Springer-Verlag Berlin Heidelberg 2007
Adaptive Nonlinear Control Using TRFNN System
39
In this paper, we present the TSK-type recurrent fuzzy neural network (TRFNN) system and hybrid learning algorithm (GA-BPPSO) to control nonlinear uncertain systems. The TRFNN is modified from the previous result RFNN: the consequent part is replaced by linear combination of input variables to obtain generalization and fast convergence rate; the internal variable- fire strength is feedforward to output to increase the network ability. y1
W11
G
……
G
x1
∏
G
G
∏ X r −1
…
∏
Wro W r1
X2
∏
Feedback Layer
…
∏ X1
u
Layer4
W( r −1) o
W21
∏
G
θj
∑
W1o W( r −1)1
O (2) Z −1
yo
…
∑
∏
G
…
Layer3
Xr
∏
G
……
G
G
Layer2
Layer1
xn
Fig. 1. The TSK-type recurrent fuzzy neural network (TRFNN) system
2 TSK-Type Recurrent Fuzzy Neural Network (TRFNN) System The structure of the TRFNN system is shown in Fig. 1. Two major modifications from the RFNN are: the consequent part is replaced by linear combination of input variables; the internal variable- fire strength is feedforward to output to obtain generalization and fast convergence rate. Herein, we indicate the signal propagation and the basic function of every node in each layer, neti( l ) denotes the net output, the superscript (l) indicates the lth layer and the subscript i indicates the ith input variable. Layer 1- input layer: For the ith node of layer 1, the net input and the net output are: (1) Oi(1) = xi(1) (t ) . Layer 2- membership layer: Each node performs a membership function, the representation of each node is ⎧⎪ (u ( 2) − mij )2 ⎫⎪ Oij( 2) (k ) = exp⎨− ij ⎬ (σ ij )2 ⎪⎭ ⎪⎩
(2)
where mij and σij denote center and width of the Gaussian membership function, respectively. Note that u( 2) = (O( 2) (k − 1) ⋅ θ + O(1) (k ) , where θij is the self-feedback ij
ij
ij
i
weight. That is, the TRFNN is a dynamic system. Layer 3- rule layer: The links in this layer are used to implement the antecedent matching which is determined by fuzzy AND operation.
{[
][
O (j 3) (k ) = ∏ exp − Di (ui( 2 ) − mi ) Di (ui( 2 ) − mi ) i
T
]}
(3)
40
C.-H. Lee and M.-H. Chiu
where
⎡ ⎤, Di = diag⎢ 1 , 1 ,..., 1 ⎥ σ nj ⎦ ⎣ σ1 j σ 2 j
[
mi = m1 j , m2 j , " , mnj
]
T
, and ui( 2 ) = [u1 j , u2 j , ", unj ]T .
Layer 4- output layer: The output of TRFNN system is, y q = O q( 4 ) = ∑ [W jq × X j ]⋅ O (j 3) r
(4)
j =1
where W j = [ w0 jq , w1 jq " , wn +1, jq ] and X = [1, x , x , , x , O ( 3 ) ] T . 1 2 n j Therefore, the fuzzy inference of TRFNN can be introduced as IF-THEN rules [4] Rule j : IF u1 j (k ) is A1 j and u2 j ( k ) is A2 j … and unj is Anj THEN y q (k + 1) is w0 jq + x1 ⋅ w1 jq + x 2 ⋅ w2 jq + " + x n ⋅ wnjq + O (j 3) ⋅ wn +1, jq
(5)
Note that the network is not fully connected for each node to avoid the exponential growth of fuzzy rules number and parameters [6].
3 Hybrid Learning Algorithms 3.1 Learning Algorithm- BP, GA, and PSO Herein, a hybrid learning algorithm (GA_BPPSO) combines the GA, BP, and PSO to have a fast convergent rate. Firstly, the BP algorithm is introduced [4, 6], ⎛ ∂E(k) ⎞ W(k + 1 ) = W(k) + ΔW(k) = W(k) + η ⎜ − ⎟ ⎝ ∂W ⎠
(6)
where W = [m, σ , θ , w] , and the cost function is defined as T
E (k ) =
(7)
1 1 ( y (k ) − yˆ (k )) 2 = ∑ ( y ( k ) − O ( 4) ( k )) 2 2 2 j
y(k) and yˆ ( k ) are the desired output and TRFNN output, respectively.
Secondly, the GA is briefly introduced. The GA uses three basic operators to manipulate the genetic composition of a population: reproduct, crossover, and mutation [12, 15]. The chromosomes consist of a set of genes. Herein, the real-coded GA is used to tune the parameters. It is more natural to represent the genes directly as real numbers since the representations of the solutions are very close to the natural formulation. Therefore, a chromosome here is a vector of floating point numbers. The chromosome is chosen by TRFNN’s adjustable parameters as below. m
…
σ
…
θ
…
w
…
In operation process, an initial population P(0) is given, and then the GA generates a new generation P(t) based on the previous generation P(t-1) as follows [9, 12]:
Adaptive Nonlinear Control Using TRFNN System
Initialize P(t) P(0) Evaluate P(0)
41
: P(t) Population at time t
While (not terminate-condition) do Begin T t+1 : Increment generation Select P(t) from P(t-1) Recombine P(t) : apply genetic operators (crossover, mutation) evaluate P(t)
Particle swarm optimization (PSO): a new evolutionary computation technique is proposed by Kennedy and Eberhart [3, 11]. It was developed by the research of the social behavior of animals, e.g., bird flocking. Compared with GA, PSO has no evolution operators such as crossover and mutation, and moreover, PSO has lesser parameters. It has been applied on optimization problems, neural network learning, fuzzy control, and evolution algorithm [3, 8, 13]. The optimization process of PSO is nonlinear and complicated. The system G initially has a population of random solutions. Each particle has a position xi which represents a potential solution, and it is given a random velocity and is flown through G the problem space. Each particle has memory and keeps tracking its best position pi G and its corresponding fitness. There exist a number of pi for the respective particles G in the swarm and the particle with greatest fitness is the best of the swarm p g . Thus, we have G G G G G G vi (t + 1) = χ ( vi (t ) + c1φ1 ( pi (t ) − xi (t )) + c2φ2 ( p g (t ) − xi (t )))
(8)
G
where χ is control parameter of v , c1, c2>0, and φ1 , φ2 are uniformly distributed random numbers in [0,1]. In addition, each particle changes its position by G G G xi (t + 1) = xi (t ) + vi (t + 1) .
(9)
3.2 The Hybrid Algorithm GA_BPPSO
In [5], we combined the advantages of BP and GA to obtain faster convergence of network parameters. As above, the HGAPSO with the concept of elites has the effective performance for recurrent neural network [3]. The GA_BPPSO learning algorithm for TRFNN combines the concept of literature [3, 5]. An initialized population (Ps individuals) is selected randomly. Then all the fitness values of individuals are calculated and ranked to find the “elites”. The optimal individual p* with the highest fitness value is chosen. Subsequently, new population is created by BP and GA [5]. m individuals ( p1* , p2* ," , pm* ) are obtained through the BP with different learning rates η1 ( k ),η2 ( k ),",η m (k ) , respectively, where the proper learning rates are determined by PSO. Besides, the others (Ps-m) are generated by GA operations- reproduct, crossover, and mutation. The description can be summarized as bellows and Fig. 2.
42
C.-H. Lee and M.-H. Chiu initialize P(t) P(0) : P(t) population at time t Evaluate P(0) While (NOT terminate-condition) do Begin Tt+1 Select elites p* Select η1, …, ηm by PSO Create p1* , p2* ," , pm* by BP Create pm* +1 , pm* +2 ," , p s* by GA (apply GA operators) Evaluate P(t) Ranking by P(t) End O LD P o p u la tio n
1 in d. ?
….
…
Ps D iscard
E lites p * rankin g by fitness
GA
reprod uct
BPPSO
E lites p *
η 1 ( k + 1) " η m ( k + 1)
S elect η by P S O
crosso ver BP1
B P2
B Pm
.…
η1 (k )" η m (k )
m utatio n p 1*
ind. 1
……
p 2*
….
p m*
ind. m
in d. m + 1
… ..
……
ind . P s
N E W P o p ula tio n
Fig. 2. The flow description of GA_BPPSO algorithm
4 Simulation Result-Adaptive Control for MIMO Nonlinear System Consider the tracking control of system [4] ⎤ ⎡ Y (k ) Y p1 ( k + 1) = 0.5 ⋅ ⎢ p1 2 + u1 ( k − 1) ⎥ ⎥⎦ ⎢⎣ 1 + Y p 2 ( k )
(10)
⎡ Y (k ) ⋅ Y p 2 (k ) ⎤ Y p 2 (k + 1) = 0.5 ⋅ ⎢ p1 + u2 (k − 1)⎥ . 2 Y k 1 + ( ) p2 ⎣⎢ ⎦⎥
(11)
The tracking trajectories are Yr1 ( k ) = sin(kπ / 45) and Yr 2 (k ) = cos(kπ / 45) . The control scheme is shown in Fig. 3. ∑
G A_BPPSO Yr 1 Yr 2
− Y p1
u1 ( k )
TRFNN
∑
Plant
Yp2
u2 (k ) Z
−1
Z
−1
Fig. 3. Adaptive Control Scheme using TRFNN
+
−
+
Adaptive Nonlinear Control Using TRFNN System
43
The learning parameters of the GA_BPPSO algorithm is selected as- input #: 4; output #:2, rule #: 5, population size PS: 50, # of BP m: 10, crossover probability: 0.8; G reproduction probability: 0.03; c1 = c2 = 1 ; χ =0.8, max. vi : 1; # of generation: 20. Simulation results are shown in Tables 1, 2, and Fig. 4. Figure 4(a) shows the testing results- solid: desired output; dotted: TRFNN output. Figure 4(b) shows the comparison results of RMSE- solid: TRFNN (RMSE after 20 generations: 0.0254); dotted: RFNN (RMSE after 20 generations: 0.0264). Figure 4(c) shows the RMSE comparison of algorithms for TRFNN. Obviously, we can conclude that the TRFNN has the ability of high speed convergence and small network structure, i.e., increase the ability of network. Table 1. RMSE comparison results of different algorithms after 20 generations RMSE Algorithm
TRFNN
RFNN
BP GA PSO HGAPSO GA_BPPSO
0.0694 0.4723 0.3729 0.3714 0.0254
0.0859 0.7447 0.6550 0.6304 0.0264
Table 2. Comparison of network structure for TRFNN and RFNN
Rule number Node number Parameters number
TRFNN 5 31 80
RFNN 10 56 140
Fig. 4. Simulation results of nonlinear MIMO system tracking control using TRFNN and RFNN
5 Conclusion In this paper, we have presented a new TSK-type recurrent fuzzy neural network (TRFNN) system to control nonlinear uncertain systems. The TRFNN is modified from the previous result RFNN to increase the network ability. The hybrid learning
44
C.-H. Lee and M.-H. Chiu
algorithm GA_BPPSO was proposed to have a fast convergence. Simulation results are proposed to show the effectiveness of TRFNN system and GA-BPPSO algorithm, e.g., the TRFNN has the ability of high speed convergence and small network structure and the GA_BPPSO increases the approximation accuracy.
References 1. Chen, Y.C., Teng, C.C.: A Model Reference Control Structure Using A Fuzzy Neural Network. Fuzzy Sets and Systems 73 (1995) 291–312 2. Juang, C.F.: A TSK-type Recurrent Fuzzy Network for Dynamic Systems Processing by Neural Network and Genetic Algorithms. IEEE Trans. Fuzzy Systems 10 (2002) 155-170 3. Juang, C.F.: A Hybrid of Genetic Algorithm and Particle Swarm Optimization for Recurrent Network Design. IEEE Trans. Systems, Man and Cybernetics Part: B 34(2) (2004) 997-1006 4. Lee, C.H., Teng, C.C.: Identification and Control of Dynamic Systems Using Recurrent Fuzzy Neural Networks. IEEE Trans. Fuzzy Systems 8(4) (2000) 349-366 5. Lee, C.H., Lin, Y.C.: Hybrid Learning Algorithm for Fuzzy Neuro Systems Fuzz-IEEE 2004 (2004) 691-696 6. Lin, C.T., Lee, C.S.G.: Neural Fuzzy Systems. Prentice Hall: Englewood Cliff (1996) 7. Adleman, L.M.: Molecular Computation of Solutioins to Combinatorial Problems Science 266 (1994) 1021-1023 8. Clerc, M., Kenney, J.: The Particle Swarm-explosion, Stability, and Convergence in Multidimensional Complex Space. IEEE Trans. Evol. Comput. 6 (2002) 58-73 9. Goldberg, D.E.: Genetic Algorithms in Search, Optimization and Machine Learning. Addison-Wesley, Reading (1989) 10. Gudise, V.G., Venayagamoorthy, G.K.: Comparison of Particle Swarm Optimization and Backpropagation as Training Algorithm for Neural Networks. IEEE Swarm Intelligence Symp. USA, April 24 -26 (2003) 110 – 117 11. Kennedy, J., Eberhart, R.: Particle Swarn Optimization. Proc. IEEE Int. Conf. Neural Networks, Perth, Australia (1995) 1942-1948 12. Michalewicz, Z.: Genetic Algorithms+Data Structure=Evolutionary Programs. SpringerVerlag, Berlin, 3rd edition (1997) 13. Zhang, C., Shao, H., Li, Y.: Particle Swarm Optimization for Evolving Artificial Network IEEE Int. Conf. Syst. Man, Cyber. 4 (2000) 2487-2490