Professional Documents
Culture Documents
Fuzzy System Modeling by Fuzzy Partition and GA Hybrid Schemes
Fuzzy System Modeling by Fuzzy Partition and GA Hybrid Schemes
ELSEVIER
Fuzzy Sets and Systems 86 (1997) 279 288
F!UZ2Y
Abstract
This paper presents an approach to building multi-input and single-output fuzzy models. Such a model is composed of fuzzy implications, and its output is inferred by simplified reasoning. The implications are automatically generated by the structure and parameter identification. In structure identification, the optimal or near optimal number of fuzzy implications is determined in view of valid partition of data set. The parameters defining the fuzzy implications are identified by a GA (Genetic Algorithm) hybrid scheme to minimize mean square errors globally. Numerical examples are provided to evaluate the feasibility of the proposed approach. Comparison shows that the suggested approach can produce a fuzzy model with higher accuracy and a smaller number of fuzzy implications than the ones achieved previously in other methods. The proposed approach has also been applied to construct a fuzzy model for the navigation control of a mobile robot. The validity of the resultant model is demonstrated by experimentation. 1997 Elsevier Science B.V.
1. Introduction
Fuzzy modeling has been studied to deal with complex, ill-defined and uncertain systems, in which conventional mathematical models may fail to give satisfactory results. The studies on the fuzzy system modeling have largely been devoted to two approaches. One is based on composite fuzzy relational equations [5]. The approach is theoretically clear, but may suffer difficulties since the solution of a fuzzy relational equation is usually not unique,
* Corresponding author. 0165-0114/97/$17.00 1997 Elsevier Science B.V. All rights reserved SSDI 0 1 6 5 - 0 1 1 4 ( 9 5 ) 0 0 4 1 4 - 9
and sometimes it even does not exist at all. F o r this reason, the approach is not practical. The other is termed linguistic model [4, 6, 7, 9], in which a fuzzy model is composed of a set of fuzzy implications, and they are identified by optimization techniques from sample data. The model has been popular in industrial applications. Linguistic fuzzy modeling for control was first dealt with by Tong [4, 9]. He proposed a logical examination method to construct linguistic models. In spite of its satisfactory result, it should be noted that the method is difficult to extend to high-dimensional systems. Pedrycz [10] proposed a new composition rule and identification algorithms of fuzzy systems. His fuzzy
280
model is based on the concept of a referential fuzzy set and Zadeh's conditional possibility distribution. Utilizing the same type of fuzzy model, Xu [6] presented a general fuzzy system identification approach, which includes structure identification, parameter estimation and an associated self-learning algorithm. However, it requires that the number of referential fuzzy sets in each universe (r) be chosen empirically. A larger r will demand more computational efforts in building and using the model. Sugeno [7] presented a qualitative modeling method and a position-gradient type fuzzy model. The latter is used for the case where we cannot build a fuzzy model over the whole input space due to lack of data available. His approach for fuzzy modeling is systematic and general. However, the approach does not consider the identification of the parameters in the consequence of the implications. In general, we cannot consider the parameter identification of the premise and that of the consequence separately, since they are closely related. This paper is aimed at presenting a systematic approach in the identification procedure of a fuzzy system, and its flexible adaptability to complex and high-dimensional systems. The identification procedure consists of structure identification and parameter identification. Structure identification determines the number of fuzzy implications constituting a fuzzy model in view of valid partitions of data set using fuzzy c-means clustering (FCM). The partitioning is based on the minimization of fuzzy Euclidean distance, but it does not minimize the mean square errors of data set. Under the assumption that input variables are mutually independent, the number of fuzzy implications is determined by the multiplication of the partition numbers of each input-output data set, which considers all the combinations of the partitioned input subspaces. The shapes of membership functions in the fuzzy implications are also determined in this process. The parameters are identified by a GA hybrid scheme to minimize the mean square errors of the data set. GA, which is a global optimization technique, proves to be flexible, so it is able to identify simultaneously the parameters in the premise and the consequence of the fuzzy model. However, it does not guarantee convergence to a global optimum. In
order to solve this problem, GA is combined with a conventional complex method [11] which exploits the convergence of problem-specific technique. In this paper, it is termed GA hybrid scheme. It does guarantee global optimization and local convergence. A numerical example is provided to evaluate the feasibility of the proposed approach. Comparison shows that the suggested approach can produce a fuzzy model with higher accuracy and a smaller number of fuzzy implications than in other schemes. The proposed approach has also been applied to construct the fuzzy model for the navigation control of a mobile robot, which models human driver's control actions. The resultant model is validated by experimentation to show that it is suitable enough for industrial applications.
Ri:
where Small and Big are fuzzy labels of xl and x2, respectively, w~ is the degree of fulfillment of the premise, and ai and b~ the consequent parameters. A list of symbols and their definitions are given in the Appendix.
281
Small \
/--
Big
\
Big
x,
/
Yl
MediLtm
A
?
W,y, + V.{y2 W,+%
/-./
x2 x~ Y2 y
xl
Center of gravity
w~ <~
w2
I I Yl Y~
Fig. 1 shows the procedure of reasoning, where Wl and w2 are calculated by (1). Given input data x and x , the output y* inferred from the above two implications is obtained in terms of the average of Yl and Y2 with the weights Wl and w2 as follows:
0 0 W1 = ~Small ( X l ) ' ~ B i g ( X 2 ) , W2 : 0 0 ~Big (X1)" ~/Medium (X2),
needs some criterion not based on output error. The former is not dealt with in this paper under the assumption that the suitable input variables to a system are already known. The latter also includes two processes: first, the determination of the number of fuzzy implications in a fuzzy model, which is a combinatorial problem and needs a heuristic method to find an optimal partition, second, the partition of input spaces and the determination of the shapes of membership functions. In this paper, the second process is accomplished by using F C M (fuzzy c-means) clustering, in which the consequence structure is not considered since the consequence part is composed of the linear equations dependent on the fulfillment of the premise. Parameter identification is just a nonlinear constrained optimization problem with an objective function. In this paper, the parameters in the premise and the consequence of the fuzzy model can be identified simultaneously by the proposed G A hybrid scheme, which guarantees globally optimal solutions.
(1)
y , _ wl 5'1 + w2" Y2
W 1 -]- W 2 Wl "(Wl " a l +
4-
b2)
(2)
282
KH. Joo et al. / Fuzzy Sets" and Systems 86 (1997) 279 288
Step 1: We consider a q-input and one-output system. Reconstruct a sample data set Xj = {Xl,X2 . . . . . Xk . . . . . X, lXk = (X;k, yk)} for fuzzy cpartition of the jth input subspace in the fuzzy model. Here, Xk is composed of the kth data of the jth input variable and output variable, n is the total number of data items, and j is 1, ..., q. Set j = 1. Step 2: Set c = 2 and determine mc, the practically permissible maximum number of fuzzy implications to be identified (2 <<.c <<.mc). Set the iteration number p = 1 and initialize membership value matrix, U (p- 1) for ~ik as 1/c. [lik is the ith row and kth column element of U and represents the membership grade of Xk in the ith fuzzy cluster. Step 3: Calculate the c cluster centers vl p) with U(p 1) and (3) for the ith cluster center. r(P)il =
go to step 3. Ifc > m c , go to step 6. e > 0 is a specified small number. Step 6: For any c (2 <~c <~mc), a validity measure for the valid fuzzy partitioning of input space are calculated by using (5) [2]:
S = J2/(rldmin),
(5)
~,
k=l
(l~ik) 2
Xk// n
/ k=l
~ (/tik)2,
l = 1, 2,
(3)
where l~ik = #ik (Xk) is the membership grade o f x k in the ith fuzzy cluster. Step 4: Update U tp) for k = 1-n. @ Calculate Ik and I~, by using the distance Dik from the kth data Xk to the center of the ith cluster
I)/;
liXk --
Vii I =
0},
where d m i n = mini, k I1vi -- rk 1]2 is the minimum distance between cluster centroids. In (5), minimizing S corresponds to minimizing J2 which is the goal of FCM, and the additional factor dmin m e a n s the separation measure between clusters. The more separate the clusters, the larger dmin and the smaller S. Therefore, the smallest S indeed indicates a valid optimal partition. From Xj, an appropriate partition number of the relation between thejth input variable and the output variable can be determined at lower value of S. When the optimal number of clusters is founded, the prototypes of the membership functions, which are mapped into the partitioned area of input (xk), are determined from the values of l*~k (Xk). Its procedure is as follows: @ Exclude y point in vi of (3) and Xk such that vl and Xk have merely the centroid point of input (Xk) and input data itself, respectively. @ Calculate Ik and I~,:
Ik
=
I~, ~ {1, 2 . . . . ,e} -- Ik, where II'll is the Euclidean norm. (2) For data item k, compute new membership values.
Vii I = 0 } ,
@ For data item k, compute new membership values: (i) If Ik = 0, (ii) If Ik O, for all i6I~,, /~ik = D{k,
t~k = 0 laik = I*~k
i
(i)
(ii)
If
I k = O,
[2ik = 0 2 ,
t~ik =
0
flik = tlik i
Pik
#~k.
If Ik 4= O, for a l l i ~ I k ,
and
~ l~ik = 1.
and
~. #ik = 1.
i ~lk
by (4)
J~P)= ~
k=l
~ (tlik)2"D2k
i=1
(4)
J (P) - j t2p 1)I ~<gandc<.mc, c = c + If r_2 1 and go to step 3, else iflJ~2p ) - J t 2 p 1)I > e , p = p + 1 and
In order to eliminate any ripple that might appear in the membership functions, and make them convex types, we transform them into triangular or trapezoidal membership functions. Increase j by one and go to step 2 until all the q input variables are considered.
283
Step 7: The final number of fuzzy implications in the fuzzy model is the product of the partition numbers selected in step 6 for all input variables.
dom number generation, string copying, and partial string exchanging; yet, despite their simplicity, GA provides robust search in complex space. The fact that GA exploits only the coding and the objective function value to determine plausible trials in the next generation, gives the flexibility for its application to optimization problems. However, GA is a blind search. Hence GA has disadvantages when compared to other methods that do make use of problem-specific information. When problemspecific information exists, it may be advantageous to combine problem-specific information with GAs to improve ultimate genetic search performance and guarantee convergence to a global optimum.
Step 1: Set the maximum generation number (max_gen), and population size. Fix crossover rate and mutation rate. Set the coding length of each parameter to be identified. Step 2: Generate random populations P(0) composed of randomly generated binary-codes. They are decoded into real values which we want to identify. Evaluate the fitness of individuals in P(0) by (7). E = -1 ~ (yO_ y,)2,
Hi= 1
(6)
where n is the total number of data, yO the target output and y* the output inferred from fuzzy implications. Fitness function, f = 1.O/E (7)
284
KH. Joo et al. /Fuzzv Sets and Systems 86 (1997) 279 288
Step 3: Set the generation number (gen) to 1. Generate P(t + 1) from P(t) by selecting the fittest individuals from P(t), and recombining them by crossover and mutation with the crossover and mutation rates, respectively. Evaluate the fitness of individuals in P(t). Step 4: Increase gen by 1 until gen is not greater than max gen. Decode the fittest population into real values, and retain them and its fitness value. Step 5: To guarantee convergence to a global optimum, the conventional complex method to solve constrained minimization problems is as follows: @ An initial feasible solution set {X1,X2 . . . . . Xk} (k>~m+ l,m is the number of parameters to be identified), which satisfies all the constraints imposed by membership functions and shows better fitness, is selected from the retained values in step 4. Here X~ is composed of m parameters to be identified. @ The objective function, E, defined in (6) is evaluated at the k feasible solution sets. If Xh corresponds to the largest function value, the process of reflection is used to find a new solution, X~ as
X~ = (1 + : 0 ' X 0 - ~ ' X h where
1 k
~<6,
(10)
where X ' is the centroid of all the k solution sets of the current complex, E(X') is the mean value of X', and 6 > 0 is a specified small number. Xr which satisfies (10) in step @ is the final optimal feasible solution that we want to get. To get an initial feasible solution set that is closer to the top of the hill, the reduction technique of search areas of the parameters is proposed. In GA, we code binary parameters which we want to identify, and concatenate them. Each coding has its own sub-length L, and minimum and m a x i m u m values, Pmi, and P . . . . and the precision of the decoded value is controlled by (Pmax--Pmi.O/(2 L - 1). Therefore, the adjustment of Pmi,'S and Pmax'S, which define search area for all the parameters, has an effect on the accuracy of solutions found by G A without increasing the coding length of each parameter. For the reduction of the search area of GA, the following step 4' is added to step 4.
(8)
Xo = ( k - l )
" l= 1~ . , h Xt.
If the solution, Xr is feasible (satisfies constraints) and E(X,.) <E(Xh), the solution Xh is replaced by Xr, then go to step (2). If E(Xr) >E(Xh), a new trial solution, Xr is recalculated by (8) with ~: = ~/2. This procedure is repeated until E(Xr) < E(Xh) and :~ becomes smaller than a prescribed small quantity, e. If such an Xr cannot be found; then Xr is discarded and go to step @ with a new Xp that has the second highest function value instead of Xh. @ If X,., found in step @, violates the constraints, a new Xr is then obtained by (9):
Step 4': Set the new generation number (rmgen). When the generation number (gen) becomes the new generation number (re_gen), the reduction is carried out through the increment of Pmin and the decrement of Pmax of each parameter. We select the populations for which fitness values are greater than fl of m a x i m u m fitness value among the generated populations. Here, fl is 80% of the m a x i m u m fitness value. We search for the m a x i m u m and minimum value of each parameter a m o n g the selected populations. New Pmax'S and Pmin'S are obtained from the ranges of the values decoded from the populations for which fitness values are greater than a value ft. Until the generation number becomes the m a x i m u m generation number, GA evolves searching the reduced area.
4. Example
In this section, the feasibility of the proposed approach is illustrated through the identification of a fuzzy model of gas furnace. Our purpose is to
(x~).~w = (Xo + x , ) .
(9)
@ Each time the worst solution Xh of the current complex is replaced by Xr, the convergence of
285
obtain a fuzzy model which describes the relation between a gas flow u ( t ) and the combusted CO2 concentration y (t) of the gas furnace using the 296 pairs of data presented by Box and Jenkins [3]. We consider u ( t - 4) and y ( t - 1) as input variables of fuzzy implications, and y ( t ) as the output variable. A small S in (5) indicates a partition in which all the clusters are overall compact, and separate from each other. Thus, our goal is to find the fuzzy c-partition with smaller S. The c~ for u ( t - 4) and c2 for y ( t - 1) with the smallest S are both 5. Those with the second smallest S are 3 and 2. To reduce the number of fuzzy implications, appropriate numbers of clusters which describe each input-output relation effectively are determined as 3 for Cl and 2 for c2, since the smallest S and the second smallest S for Cl and c2 do not considerably differ in their magnitudes. The membership function values of each input variable calculated in step 4 of Section 3.1 are shown in Figs. 2 and 3, in which the membership functions of the input variables are labeled as Positive, Zero, Negative for u ( t - 4), and Small and Big for y ( t - 1), respectively. In order to eliminate the ripples of the membership functions shown in Figs. 2 and 3, and make them convex types, we transform them into triangular and trapezoidal membership functions. After the structure identification, the fuzzy implications are shown in Fig. 4. In the fuzzy implications, Pl, P2,--. ,Ps, and al, b l , . . . , a 6 , b6 are the parameters to be found by the parameter identification. Initial parameters for running the G A hybrid scheme are as follows: The population size is 50, length of individuals 10, crossover rate 0.6, and mutation rate 0.033. The reduction was carried out by the generation, 101. The reflection coefficient ~ is 1.3, its criterion e, 1 0 - 6 , and the convergence criterion 6, 10 -3 . Fitness values calculated by (7) from the best strings in evolving populations are shown in Fig. 5. This figure showed that the convergence of G A was improved by the reduction of search area, but it was not satisfactory in view of asymptotic convergence to a global optimum, 22 points which result in better off-line performances in G A by the reduction of search area are selected as initial feasible points of the complex method. The parameters identified by the G A hybrid scheme are shown in
.~ 0.8
~' ~,.
"~
0.4
0.2
0 -1
-0.8 -06
Z"-'. -0 4 -02
/.-.\ 02
0.4
0.~
0.8
1 -~ 0.8 _Q E o.6 o
E
"*~ 0 4 0 ~rl 0 2 o)
C'3
\/
09
0.1
0.2
0.3
0.4
05
0.6
0.7
0.8
Negative__~ 4
P, /'T S m a l l s ] P~
Pz Big Ps
P3
) y(t-1) (x 60.5)
Ifu(t-4) is Negative & y(t-1) is Small, then y = a 1.w 1 + b 1 Ifu(t-4) is Negative & y(t-1) is Big, Ifu(t-4) is Zero & y(t-1) is Small, Ifu(t-4) is Zero & y(t-1) is Big. then y = a2-w2 + b 2 then y = a3'w 3 + b3 then y = a4"w4 + b 4
Ifu(t-4) is Positive & y(t-1) is Small, then y = as.w 5 + b 5 Ifu(t-4) is Positive & y(t-1) is Big, then y = a6"w6 + b 6
Fig. 4. F u z z y i m p l i c a t i o n s a f t e r s t r u c t u r e i d e n t i f i c a t i o n .
286
3
KH. Joo et al. / Fuzzy Sets and Systems 86 (1997) 279 288
Table 1 Identified parameters for fuzzy implications Premise Pl P2 P3 P4 P5 - 1.635 0.622 0.94 0.79 0.968 Consequence as a2 a3 a4 a5 a6 8.062 4.848 0.407 9.765 2.056 35.878 bl b2 b3 b4 b5 b6 58.555 53.240 47.192 51.564 44.148 43.912
2.5
1.5
I"
>
without reduction
21 41 61 Number 81 101 121 141 in G A 161 181
-~
0.5
of generation
Table 2 Comparison of identification error with other fuzzy models Literature Mean square error 0.71 0.469 0.776 0.328 0.190 0.166 Rules Note ARMA model Fuzzy model Fuzzy model Fuzzy model Fuzzy model Fuzzy model
Table 1. In Table 2, the mean square errors calculated by (6) are compared with the results achieved previously in other approaches.
19 20 25 6 6
I
orientation)
" '
co;ro,,or
robo,
fuzzy controller inferences a new steering angle from the orientation of the mobile robot and the difference between the distances to the left and the right wall, and the mobile robot is moved with the new steering angle. The experimental mobile robot is equipped with two powered wheels that provide motion and steering, and four free wheels at the four corners of the vehicle. Steering is accomplished by the difference between the velocities of two powered wheels. The main characteristics of the used mobile robot are as
Y.H. Jot et el. / Fuzzy Sets and Systems 86 (1997) 279 288
287
Negativ~Positive__ 4 ~e
-0.45
corridor
-052
-0013
0.013
r 0~ , 45 0.52
Positive
i 16(m)
.
N e g a t i v e ~
-0.37
-019
-0.001
0001
019
037
~ diff distance
(X1600") 2.3(m) -
Srart
i,
s e flSOl~3
ff diff_dist is Negative & orient mobile is Negative, then y = -1.27.w 1 + 52,0 ff diff_dist is Negative & orient_mobile is Zero, then y = -6.05"w2 + 26.4 ~]
o 90"
If diff dist is Negative & orient_mobile is Positive, then y = 9.50'w 3 - 9.07 ff diff_dist is Zero & orientmobile is Negative, ff diff_dist is Zero & orient_mobile is Zero, ff diff_dist is Zero & orientmobile is Positive, theny = 0.11.w4 + 14.8 then y = -0.57.w5 + 0.57 then y = -2.34"w6 - 13.8
If diff_dist is Positive & orient mobile is Negative, theny = -5.99'w 1 + 8.06 If dJff_dist is Positive & orient_mobile is Zero, ff cliff dist is Positive & orient mobile is Positive, then y = 5.45-w2 - 26.0 then y = 3.77.w3 - 53,9 start - 2.3(m)
1.9(m)
Fig. 7. The identified fuzzy model for navigation control. (b)' r" typed corridor
follows: The mobile robot is of 45 cm height, 75 cm length, 70 cm width. The reference point is located in the center of four free wheels. Maximum velocity is 1 m/s with maximum acceleration of 1 m/s 2. The experiment is carried out under the condition that the constant velocity is 0.4 m/s, the turning speed 0.2 m/s, and sampling time 0.12 s. The detection limit of the sonar sensors is 3.0 m, For navigation control, the fuzzy model identified from an expert's control actions is shown in Fig. 7. The navigation trajectory of the mobile robot controlled by the identified fuzzy model is displayed in Fig. 8.
6. Conclusion
The reason why the accuracy of the identified fuzzy model of a gas furnace is superior to that of other fuzzy models is summarized as follows: The proposed GA hybrid scheme makes it possible to
identify the optimal parameters globally in the premise and the consequence of the fuzzy implications at the same time. Besides the accuracy of the identification, another advantage of the proposed approach is that its procedure is comparatively simple and clear, so is easy to program. It can flexibly and robustly be applied to even more complex fuzzy system modeling since it combines effectively the advantages of FCM, GA and the conventional complex method. A high degree of autonomy in the mobile robot behavior to follow the center of the corridor in a confined environment is acquired by a fuzzy model that describes human drivers' control actions. The robot shows flexible and robust behavior in quite different situations, and recovering from unexpected inputs in spite of the scarce information
288
initially available. The resultant model is validated by experimentation, and proven to be suitable enough for industrial application.
Pmax
Xj
Xk
vi Uil Dik
integer: the total number of data items integer: the number of clusters integer: the iteration number jth sample data set in ~q the kth data set of the jth input and output in R" center of the ith cluster in ~c /th component of the ith cluster center distance from the kth data xk to the ith cluster center vl membership value matrix with elements
]~ik
Ik
J2
Xi
E(X')
Xo
Pmin
the membership grade of xk in the ith fuzzy cluster a set of integers optimality criterion parameter vector euclidean norm mean of X' centroid of X minimum value of the searching range of a parameter
[1] J.C. Bezdek, Pattern Recognition with Fuzzy Objective Function Algorithms (Plenum, New York, 1981). [2] L.X. Xuanli and B. Gerardo, A validity measure for fuzzy clustering, IEEE Trans. Pattern Anal. Machine lntel. PAMI-13(8) (1991) 841 847. [3] G.E.P. Box et al., Time Series Analysis, Forecastin9 and Control (Holden Day, San Francisco, 1970). [4] R.M. Tong, The evaluation of fuzzy models derived from experimental data, Fuzzy Sets and Systems 13 (1980) 1-12. [5] W. Pedrycz, An identification algorithm in fuzzy relational systems, Fuzzy Sets and Systems 13 (1984) 153-167. [-6] Chen-Wei Xu, Fuzzy systems identification, lEE Proc. 136(4) (1989) 14~150. [-7] M. Sugeno and T. Yasukawa, A fuzzy-logic-based approach to qualitative modeling, IEEE Trans. Fuzzy Systems 1(1) (1993) 7 31. [8] D.E. Goldberg, Genetic algorithms in search, optimization, and machine learning (Addison Wesley, Reading, MA, 1989). [-9] R.M. Tong, Synthesis of fuzzy models for industrial processes, Int. J. General Systems 4 (1978) 143 162. [-10] W. Pedrycz, Numerical and applicational aspects of fuzzy relational equations, Fuzzy Sets and Systems 11 (1983) 1 18. [-11] S.S. Rao, Optimization Theory and Application (Wiley, New York, 1984). [-12] H.S. Hwang, Y.H. Joo and K.B. Woo, Generalized fuzzy modeling, Fifth IFSA World Congress (1993) 1145-1150.