On linguistic approximation in the frame of fuzzy logic deduction

0 downloads 0 Views 123KB Size Report
for fuzzy logic deduction mechanism implemented in. Linguistic Fuzzy Logic Controller (LFLC). Key words Linguistic approximation, inference mecha-.
Original paper

Soft Computing 3 (1999) 111—115 ( Springer-Verlag 1999

On linguistic approximation in the frame of fuzzy logic deduction A. Dvor\ aH k

111 Abstract This paper presents a new linguistic approximation algorithm and its implementation in the frame of fuzzy logic deduction. The algorithm presented is designed for fuzzy logic deduction mechanism implemented in Linguistic Fuzzy Logic Controller (LFLC).

description of the linguistic approximation procedure, Sect. 4 presents two examples, and Sect. 5 contains some conclusions.

Key words Linguistic approximation, inference mechanism, expert systems.

There are several approaches to fuzzy inference, which is the implementation of the modus ponens inference rule in which the implication and possibly the premise are also given vaguely. They differ mainly in the interpretation of implication. One approach, known as Mamdani—Zadeh inference or fuzzy interpolation or Max-t-norm inference, is essentially an approximation of an unknown function [5]. The second approach, which we call fuzzy logic deduction, uses the 'ukasiewicz implication operator as a basis for the inference mechanism. The basic scheme known as generalized modus ponens is the following:

1 Introduction This article deals with the problem of linguistic approximation. By definition, linguistic approximation is a procedure which assigns linguistic expression to a given fuzzy set. The usual method of obtaining results in fuzzy systems is called defuzzification. It means that as soon as we perform one step of inference mechanism, we defuzzify the obtained fuzzy set and receive one crisp number. However, it is not much in the spirit of fuzzy logic. It is the only possibility in fuzzy control, because we need control action, e.g. electric current or gas flow, as a crisp number in order to perform the next step of the control process. In other kinds of fuzzy systems, e.g. fuzzy expert systems, decision support systems, etc., we need something different. It is desirable to obtain a linguistic expression better than the crisp number. The former have similar form as the linguistic expressions which enter the inference mechanism. We must use the linguistic approximation for this purpose. There are several approaches to this problem, e.g. in [4, 13]. In [7], a good overview of the approaches presented so far is given. In our approach, we will suppose that fuzzy sets which enter the linguistic approximation algorithm are outputs of a fuzzy logic deduction. If it is the case, then we are allowed to construct the linguistic expression which corresponds to these fuzzy sets by using atomic terms and linguistic modifiers used in the fuzzy logic deduction. This paper is organized as follows: In Sect. 2 we present basic theory of fuzzy logic deduction, Sect. 3 contains

A. Dvor\ aH k Institute for Research and Applications of Fuzzy Modeling, University of Ostrava, BraH fova 7, 701 03 Ostrava 1, Czech Republic e-mail: [email protected] This work has been supported by the grant 201/96/0985 of the GA C[ R.

2 Fuzzy logic deduction

Condition: R :\IF X is A AND2 AND X is A THEN Y is B 1 1 11 n n1 1 .................................................................................................... R :\IF X is A AND2 AND X is A THEN Y is B r 1 1r n nr r Observation: X is A@ AND2 AND X is A@ 1 1 n n Conclusion:

Y is B@,

where X ,2 , X are the antecedent variables, Y is the suc1 n cedent variable, and A@ , 2 , A@ are expressions of natural 1 n language, which may be slightly different from A , 2 , A . 1j nj Hence, the conclusion B@ can be slightly different from all B , j\1, 2 , r. j Natural language expressions A , B in the generalized ij j modus ponens scheme are assumed to have the following form [12]: Slinguistic modifierT Satomic termT.

(1)

The atomic terms characterize various properties of objects, and the linguistic modifiers specify various nuances of properties. To describe some qualitative property linguistically we need an ordered linguistic scale with three atomic terms small, medium and big. The linguistic expressions A are generally assigned the fuzzy sets ALU. In [12], it is shown in detail how the \ membership functions for the meanings of the atomic terms can be derived using the concept of the horizon. In Fig. 1, typical membership functions of the atomic terms are depicted.

112

Fig. 1. Membership functions S~, S` and p fuzzy sets. They usually correspond to the meaning of the atomic terms small, big and medium, respectively

In [12], it is also proposed to understand the atomic term medium as a compound term of the form medium\medium1 or medium2, where medium1 is the increasing and medium2 decreasing part of the membership function for medium (cf. Fig. 1). The membership functions of the meanings of atomic terms can have linear, quadratic or exponential form. In our opinion, the quadratic shape of the membership functions (see Fig. 1) best fits the meaning of the atomic terms as used by the people. The linguistic modifiers [12, 11] are derived by means of the concept of the horizon shift. They can be divided into two categories, namely, linguistic modifiers with narrowing effect (very, extremely, etc.) and with widening effect (more or less, roughly). The linguistic modifiers with widening effect only are permitted for use with the atomic term medium. The meanings of the linguistic expressions (1) can be modeled using fuzzy sets with membership functions taken from some class of functions Z(U), [12] Z(U)\MZ, S D Z, S: U][0, 1]N, where members of the class of non-decreasing functions Z model the meanings of linguistic expressions with atomic terms small and medium1, and members of the class of non-increasing functions S model the meanings of linguistic expressions with atomic terms medium2 and big. Let the fuzzy sets A , i\1, 2 , n, j\1, 2 , r and ij B , j\1, 2 , r represent the meanings of all the natural j language expressions A and B , respectively, which occur in ij j the generalized modus ponens scheme above. Then the fuzzy set B@ representing the meaning of the conclusion B@ can be

computed using the formula [3, 8] r ((A@ x '2'A@ x )? R ((A x '2'A x ) B@y\ S 1 1 n n 1j 1 nj n j/1 x1|U1 , 2,xn|Un ]B y)), (2) j where U , 2 , U are universes of discourse of the antecedent 1 n variables, A@ are fuzzy sets which represent the observations, i ? and ] are 'ukasiewicz conjunction and implication, respectively.

3 Linguistic approximation algorithm The linguistic approximation is, in general, a method, which assigns linguistic expression to the given fuzzy set. Formally, we can describe this method as follows [9]: First, we define a similarity relation between fuzzy sets: Definition 1 A fuzzy relation RLF(U)]F(U), \ where F(U)\[0, 1]U is the set of all fuzzy sets on U, is called similarity relation, if for all A, B3F(U) the following conditions hold: 1. RSA, AT\1, 2. RSA, BT\RSB, AT, 3. Supp(A)WSupp(B)\0 implies RSA, BT\0, where Supp(A)\Mx3UDAx[0N is the support of the fuzzy set A.

Definition 2 Let SX, T(X), U, G, MT be a linguistic variable [14], where X is name of the variable, T(X) is the term set, U is the universe, G and M are the syntactic and semantic rules, respectively. Let A LU be a fuzzy set and 0\ RLF(U)]F(U) be a fuzzy relation defined above. Then the \ term A3T(X), for which is RSM(A), A T maximal, is called 0 the linguistic approximation of the fuzzy set A . 0 If there are more terms A with the same value of i RSM(A ), A T, then we should use different similarity i 0 measure (possibly more sensitive in this individual situation). Definition 2 states that we search for the term, whose meaning is most similar to the approximated fuzzy set. There are several problems encountered: f we have to search not only among atomic and modified atomic terms, but also among composed terms, e.g. roughly small or medium, f the fuzzy set which enters linguistic approximation can be subnormal, f the information included in the fuzzy set which enters linguistic approximation can be distorted or noisy. The algorithm which performs linguistic approximation has to take the above-mentioned problems into consideration. The algorithms of the linguistic approximation can be divided into two categories [7]: 1. Algorithm performing the entire check of the term set, 2. Algorithm based on the piecewise decomposition of the fuzzy set. In the first method, we simply compare a given fuzzy set with all the fuzzy sets corresponding to the terms from the term set. Some similarity relation is used for the determination of similarity between these fuzzy sets. The term whose meaning has the smallest distance from the given one is taken as the result. The Piecewise Decomposition method, in general, decomposes the given fuzzy set into several pieces or segments, determines the linguistic term for each of them, and then constructs the result by means of logical connectives [4]. In our approach, we want the resulting expression to have the form Slinguistic modifier T SsmallT or Slinguistic modifier T 1 2 SmediumT or Slinguistic modifier T SbigT, 3 where Slinguistic modifier T, i\1, 2, 3 are linguistic modifiers i described in Sect. 2 including special modifiers empty and ignored. Modifier empty does not change the membership function which models the meaning of the atomic term. Modifier ignored forces the membership function which model the meaning of modified atomic term to be identically equal to zero. Thus we can obtain linguistic expression with one, two or three linguistic expressions (1) connected by the connective or. We divide approximated fuzzy set into several segments and determine the atomic term and the modifier to each of them. Fuzzy sets which enter linguistic approximation are outputs B@ of fuzzy logic deduction described by formula (2), which is in real situations always performed on discretized universes U , U , 2 , U . Thus fuzzy set B@ is also discrete and 1 2 n

we can in the following consider only fuzzy sets defined on the linearly ordered discrete universe U\Mx , x , 2 , x N. 1 2 m The linguistic approximation algorithm can be described in the following steps: 1. Divide the membership function of the given fuzzy set into segments. 2. Discard ‘‘horizontal’’ segments, which bear no information. 3. Decide, for each segment, whether segment is ‘‘peak’’ or ‘‘section’’. 4. For all segments, if the segment is ‘‘peak’’ then normalize it. 5. Compare segments with meanings of terms from the term set and find term with the highest membership degree of similarity relation. 6. Compose resulting linguistic expression by means of connectives. Ad 1: We divide membership function into segments whose boundaries are defined as follows: Definition 3 Let A be a fuzzy set on universe U\Mx , x , 1 2 2 , xmN. The point xi 3U is boundary if xi\x0 or xi\xm or sgn(x [x )Osgn(x [x ), i`1 i i i~1 where

G

[1, 0, sgn(x)\ 1,

x\0, x\0, x[0.

Definition 4 Let A be a fuzzy set from Definition 3 and B\Mb1, b2, 2 , bkN, k\m be a set of all boundary points. Then sets S -U i S \Mx \bi, x , 2 , x \bi`1N, i\1, 2, 2 , k[1 i j j`1 j`l are segments of A. Ad 2: Segment S which satisfies Abi\Abi`1 is called i horizontal. Horizontal segments bear, in our opinion, no information about resulting linguistic expression, and therefore, they are discarded. Ad 3: Other kinds of segments are: sections and peaks. Definition 5 Segment S is a section if its first boundary point i bi satisfies [2Abi]Ax j`1 j~1 [i, (3) x [x j`1 j~1 where x , x are the two closest neighbours of bi in U, or its j~1 j`1 second boundary point bi`1 satisfies

K

Ax

K

[2Abi`1]Ax j`1 j~1 [i, (4) x [x j`1 j~1 where x , x are the two closest neighbour points of bi`1 in j~1 j`1 U. If formulae (3) and (4) are not fulfilled then the segment S is i a peak. The value of the constant i is important for the proper distinguishing between sections and peaks. If i is too big, then

K

Ax

K

113

the segment of type peak can be recognized as section and vice versa. We obtained the best results with i\0.5. Informally, the peak is the segment which corresponds to ‘‘upper’’ part of membership function, i.e. the part in which the global maximum of membership function is included, and the section is the segment which corresponds to that part of the membership function which does not include global maximum.

114

Ad 4: If the segment is of the type ‘‘peak’’ and is subnormal, i.e. the maximal membership degree is smaller than 1, then we have to normalize it. The reason is that the meanings of terms from our term set are all normal fuzzy sets. The simplest way to normalize the ‘‘peak’’ is to find out the maximal membership degree M\S i Ax in the segment S and to i x|S modify all membership degrees using the formula Ax A x\ , .0$ M

Fig. 2. Example 1 fuzzy set

∀x3S . i

Ad 5: The term most appropriate to the given segment can be obtained as follows: we generate fuzzy sets which correspond to all the possible linguistic terms with the same atomic term. As a atomic terms we consider small, big, medium1 and medium2, as described in Sect. 2. The term we determined as the most appropriate is that which has a membership function most similar to the given segment. The following formula can be used for computation of the similarity relation [9]: RSA, BT\ (1/d(SuppAXSuppB)) + f (Ax[Bx) x|S611AXS611B 1[ , (1/dSuppA) + f (Ax)](1/dSuppB) + f (Bx) x|S611A x|S611B

(5) where d(C) denotes the number of elements of the set C, and f : [[1, 1]][0, 1] is an even continuous measurable function increasing on [0, 1]. As the most appropriate term we choose that with the maximal value of R. Functions f (x) are chosen from the family of functions F \MDxD, x2, x4, 2N. We start with f (x)\DxD and if e there are more than one term with the same maximal value of R, we use the subsequent f3F . e Ad 6: In the last step of algorithm we compose segments with assigned atomic terms medium1 and medium2 to one medium term, and then compose all partial terms by means of the connective or.

4 Example In this section, we present our linguistic approximation algorithm working on two fuzzy sets, depicted in Figs. 2 and 3. The shape of the membership function of fuzzy set in Fig. 2 suggests that the corresponding linguistic expression should be composed of two partial expressions with atomic terms medium and big connected by or. Linguistic approximation algorithm indeed gives us the expected result. At first, we perform Step 1 of our algorithm, division to segments. Result is shown in Fig. 2 and labeled as S1, S2, S3, S4.

Fig. 3. Example 2 fuzzy set

Then, horizontal segment S2 is discarded (Step 2). All remaining segments S1, S3 and S4 are of type ‘‘section’’ (Step 3), i.e. they do not include the global maximum of the membership function. Since the normalization (Step 4) is performed only for segments of type ‘‘peak’’, it is not used here. In Step 5, we compare segments S1 and S3, whose membership function is increasing with fuzzy sets which model the meaning of linguistic expressions (1) with atomic terms small and medium1, and segment S4 whose membership function is decreasing with fuzzy sets which model the meaning of linguistic expressions (1) with atomic term medium2 and big. The comparison is performed by means of formula (5). We obtained the following results: S1 corresponds to more or less medium1, S3 to roughly big and S4 to more or less medium2. As the last step, we compose the final linguistic expression: more or less medium or roughly big. Linguistic expression describing fuzzy set depicted in Fig. 3 should also be composed of expressions with atomic terms medium and big, but segments S2, S4 and S6 are of type ‘‘peak’’. As all these segments are normal, no normalization is necessary. Segments S1, S3, S5 and S7 are horizontal. Steps 5 and 6 of linguistic approximation algorithm gives us the final result quite roughly medium or big.

5 Conclusion Applications of linguistic approximation can be found whenever we need linguistic description of results given by fuzzy systems. The easy interpretability of fuzzy systems is one of their crucial features, and linguistic approximation allows to interpret results given by them. The most promising is the field of expert systems and decision support systems, where we do not need crisp (defuzzified) value, but rather linguistic expression which can

be easily understood by humans. Other fields of application can be found in fuzzy data analysis and fuzzy modeling [13], various kinds of medical systems, and even in some types of fuzzy control [2, 1].

References 1. Bauer P, Klement EP, Leikermoser A, Moser B (1994) Modelling of control functions by fuzzy controllers, In Nguyen HT et al. (Eds) Theoretical Aspects of Fuzzy Control, New York: Wiley 2. Buckley JJ (1991) Fuzzy I/O controller, Fuzzy Sets and Systems, 43, 127—137 3. Dvor\ a{ k A (1997) Computational properties of fuzzy logic deduction, In Reusch B (Ed) Computational Intelligence. Theory and Applications, Proc. 5th Fuzzy Days Dortmund, Berlin: Springer, pp. 189—195 4. Esragh F, Mamdani EH (1979) A general approach to linguistic approximation, Int J Man—Mach Stud, 11, 501—519 5. Klawonn F, Nova{ k V (1996) The relation between inference and interpolation in the framework of fuzzy systems, Fuzzy Sets and Systems 81, 331—354 6. Klir GJ, Bo Yuan (1995) Fuzzy sets and fuzzy logic, Theory and Applications, Upper Saddle River: Prentice-Hall

7. Lukas K (1994) Linguistic approximation and fuzzy logic: current methods and a new approach using neural networks, Master Thesis, Johannes Kepler University Linz 8. Nova{ k V (1995) Linguistically oriented fuzzy logic control and its design, Int J Approx Reason, 12, 263—277 9. Nova{ k V (1989) Fuzzy Sets and Their Applications, Bristol: Adam—Hilger 10. Nova{ k V (1996) Paradigm, formal properties and limits of fuzzy logic, Int J General Systems, 24, 377—405 11. Nova{ k V (1996) A horizon shifting model of linguistic hedges for approximate reasoning, Proc. FUZZ/IEEE’96, New Orleans 12. Nova{ k V, Perfilieva I (1999) Evaluating linguistic expressions and functional fuzzy theories in fuzzy logic, In Zadeh LA, Kacprzyk J (Eds) Computing with Words in Systems Analysis, Heidelberg: Springer, to appear 13. Sugeno M, Yakusawa T (1993) A fuzzy-logic based approach to qualitative modelling, IEEE Trans Fuzzy Systems, 1, 7—31 14. Zadeh LA (1975) The concept of a linguistic variable and its application to approximate reasoning I, II, III, Inform Sci, 8, 199—257, 301—357, 9, 43—80 15. Zwick R, Carlstein E, Budescu DV (1987) Measures of similarity among fuzzy concepts: a comparative analysis, Int J Approx Reason, 1, 221—242

115