Membership Functions The membership function μ A (x) describes the membership of the elements x of the base set X in the fuzzy set A, whereby for μ A (x) a large class of functions can be taken. Reasonable functions are often piecewise linear functions, such as triangular or trapezoidal functions. The grade of membership μ A (x o ) of a membership function μ A (x) describes for the special element x=x o, to which grade it belongs to the fuzzy set A. This value is in the unit interval [0,1]. Of course, x o can simultaneously belong to another fuzzy set B, such that μ B (x o ) characterizes the grade of membership of x o to B. This case is shown in figure-12 Figure-12 Membership Grades of x o in the Sets A and B: μ A (x o ) =0.75 and μb(xo) =0.25 Fuzzy subset can also be discrete, the next example illustrates the fuzzy operations on discrete (sub)set. Example 12: Let A and B be discrete fuzzy subset of X = {-3,-2,- 1,0,1,2,3}. If A={(-3, 0.0), (-2, 0.3), (-1, 0.6), (0, 1.0), (1, 0.6), (2, 0.3), (3, 0.0)}, and B={(-3, 1.0), (-2, 0.5), (-1, 0.2), (0, 0.0), (1, 0.2), (2, 0.5), (3, 1.0)}, then A B (x) = max{ A (x), B (x)} A B (x) ={(-3, 1.0), (-2, 0.5), (-1, 0.6), (0, 1.0), (1, 0.6), (2, 0.5), (3,1.0)} and 19
A B (x) = min{ A (x), B (x)} A B (x) ={(-3, 0.0), (-2, 0.3), (-1, 0.2), (0, 0.0), (1, 0.2), (2, 0.3), (3,0.0)} And the negations of A and B are A={(-3, 1.0), (-2, 0.7), (-1, 0.4), (0, 0.0), (1, 0.4), (2, 0.7), (3, 1.0)}, and B={(-3, 0.0), (-2, 0.5), (-1, 0.8), (0, 1.0), (1, 0.8), (2, 0.5), (3, 0.0)} A graphical representation is shown in figure-13 Figure-13 A graphical representation of example 12 Example 13: Let us assume that A = "x considerable larger than 10", B = "x approximately 11," characterized by A = {(x, A (x)) x X} where 0 x) (1 ( x 10) A ( 2 1 ) x 10 x 10 B = {(x, B (x)) x X} where 20
B ( x) (1 ( x 11) 4 ) 1 Then A B min[(1 ( x 10) ( x) 0 2 ) 1,(1 ( x 11) 4 ) 1 x 10 x 10 (x considerably larger than 10 and approximately 11) A 2 1 4 1 B ( x) max[(1 ( x 10) ),(1 ( x 11) ), x X Figure-14 depicts the above. Figure-14 Union and intersection of fuzzy sets Types of Membership Functions In principle any function of the form A:X [0,1] describes a membership function associated with a fuzzy set A that depends not only on the concept to be represented, but also on the context in which it is used. The graphs of the functions may have different shapes and may have specific properties. Whether a particular shape is suitable can be determined only in the application context. In certain cases, however, the meaning semantics captured by fuzzy sets is not too sensitive to variations in the shape, and simple functions are convenient. 21
In many practical instances fuzzy sets can be represented explicitly by families of parameterized functions, the most common being the following: 1. and L open shoulder functions 2. Triangular function 3. Trapezoidal Function 4. Gaussian Function 5. S-Function The membership function definitions for the above mentioned common membership functions are given in the following sections: 1- and L open shoulder functions Initially we will define two so called open membership functions. These are characterized as being non-decreasing and having values inside 0 and 1 only within a bounded interval. Firstly, we have functions with open right shoulders, : X [0, 1], and defined by two parameters according to the following: Correspondingly, we have functions with open left shoulders, L: X [0, 1], defined by: These two functions are shown in figure-15 and figure-16 22
Figure-15 -membership function Figure-16 L -membership function 2- Triangular function The triangular membership function ʌ: X [0, 1], is given by three parameters according to: Figure-17 ʌ- membership function Example 14: In control applications, it is common to use linguistic variables like negative big (NB), negative small (NS), zero (ZO), positive small (PS) and positive big (PB) to express measurement values in a fuzzy way. The arrangement with the membership functions to cover the 23
entire measurement space is then obtained using shoulders on respectively leftmost and rightmost functions and triangle function for the rest as shown in figure-18. Figure-18 the arrangement of membership functions for example 14 3- Trapezoidal function The trapezoidal membership function, Π: X [0, 1], (shown in figure- 19), is given by four parameters according to Figure-19 Π - membership function 4- Gaussian function The membership definition for a Gaussian function G: [0, 1] is given by two parameters as : G( x :, ) e ( x ) 2 Where is the midpoint and reflects the slop value. Note that must be positive and that the function never reaches zero. The Gaussian 24
function can also be extended to have different left and right slops. We then have three parameters in 2 l ( x ) e, G( x :, l, r ) 2 r ( x ) e, x x Where l and r are, respectively, left and right slopes. Figure-20 G-membership function 5- Sigmoidal membership function (S-function) The typical sigmoidal membership function or S-function (shown in figure-21), : X [0, 1], needs two parameters, and can be expressed as Where is the midpoint and is the slop value at the inflexion point. Similarly, as in Gaussian, must be positive. This S-function never reaches neither 0 nor 1. Figure-21 - function Figure-22 S-function 25
Zadeh defined an S-function (shown in figure -22), using polynomials rather than exponential according to: Where = ( + γ)/2. This function again is more efficient when considering implementation. Singletons Strictly speaking, a fuzzy set A is a collection of ordered pairs A = {(x, μ(x))} Item x belongs to the universe and μ (x) is its grade of membership in A. A single pair (x,μ (x)) is called a fuzzy singleton; therefore the entire set can be considered as the union of its constituent singletons. It is often convenient to think of a set A just as a vector a = (μ(x1), μ(x2), μ(x3),., μ(xn)) It is understood then, that each position i (1,2,3,..,n) corresponds to a point in the universe of n points Linguistic Variables linguistic variables, are variables whose values are not numbers but words or sentences in a natural or artificial language. Just like an algebraic variable takes numbers as values, a linguistic variable takes words or sentences as values. - The set of values that it can take is called its term set. - Each value in the term set is a fuzzy variable defined over a base variable. - The base variable defines the universe of discourse for all the fuzzy variables in the term set. In short, the hierarchy is as follows: 26
linguistic variable fuzzy variable base variable. Linguistic variable definition: A linguistic variable can be defined by the following quintuple: Linguistic variable = (x, T(x), U, G, M) in which x: is the name of the variable T(x) (or simply T): denotes the term set of x, that is, the set of names of linguistic values of x. U: is the set of the universe of discourse, which defines the characteristics of the variables. G: is a syntactic rule (which usually has the form of a grammar) for generating the name (terms) in T(x). M: is a semantic rules which map terms in T(x) to fuzzy set in U. In order to facilitate the symbolism in what follows, some symbols will have two meanings wherever clarity allows this: x will denote the name of the variable ("the label") and the generic name of its values. Example 15: Let X be a linguistic variable with the label "Age" (i.e., the label of this variable is "Age" and the values of it will also be called "Age") with U= [0, 100]. Terms of this linguistic variable, which are again fuzzy sets, could be called "old," "young," "very old," and so on. The base-variable u is the age in years of life. M(X) is the rule that assigns a meaning, that is, a fuzzy set, to the terms. M (old) = {(u, old (u)) u [0, 100]} where T(x) will define the term set of the variable x, for instance, in this case, 27
T(Age) = (old, very old, not so old, more or less young, quite young, very young) Where G(x) is a rule which generates the (labels of terms) in the term set. Sketches of the above mentioned is show in the figure-23 Figure-23 Fuzzy logic and approximate reasoning The fuzzy linguistic terms often consist of two parts: 1- Fuzzy predicate (primary term), such as: expensive, old, rare, good, etc 2- Fuzzy modifier, such as: very, likely, almost impossible, etc. 1- Fuzzy predicate A predicate preposition in the classical logic has the following form: x is a man y is p x and y are variables, and man and p are crisp sets. The sets of individuals satisfying the predicates are written by man(x) and p(y). Definition (Fuzzy predicate): If the set defining the predicate of individual is a fuzzy set, the predicate is called a fuzzy predicate. For example: 28
z is expensive w is young The terms expensive and young are fuzzy terms. therefore, the sets expensive(z) and young(w) are fuzzy sets. When a fuzzy predicate x is P is given, we can interpret it in two ways: i) P(x) is a fuzzy set. The membership degree of x in the set P is ii) defined by the membership function P(x). P (x) is the satisfactory degree of x for the property P. therefore the truth value of the fuzzy predicate is defined by the membership function Modifiers or Hedges Truth value = P(x) The term set of the linguistic variable "Truth" has been defined differently by different authors. Baldwin, defines some of the terms shown in figure-24. Here for v [0,1] true (v) = v very true (v) =( true (v)) 2 fairly true (v) = ( true (v)) 1/2 false (v) = 1 - true (v) very false (v) = ( false (v)) 2 fairly false (v) = ( false (v)) 1/2 absolutely true( v) absolutely false( v) 1 0 1 0 for v 1 otherwise for v 0 otherwise 29
Figure-24 Linguistic variable "Truth" (Baldwin s truth graph) Zadeh [1973] suggests for the term true the membership function where v=(l + a)/2 is called the crossover point, and a [0, 1] is a parameter that indicates the subjective judgment about the minimum value of v in order to consider a statement as "true" at all. The membership function of "false" is considered as the mirror image of "true," that is, 30
Figure-25 shows the terms true and false. Of course the membership functions of true and false, respectively, can also be chosen from the finite universe of truth values. Figure-25 The terms "Truth" and False The term set of the linguistic variable "Truth" is then defined as: T(Truth) = {true, not true, very true, not very true false, not false, very false,, not very true and not very false,...} The fuzzy sets (possibility distribution) of those terms can essentially be determined from the term true or the term false by applying appropriately the above-mentioned modifiers (hedges). Example 16: Let us consider the terms true and false, respectively, defined as the following possibility distributions: v(true) = {(.5,.6), (.6,.7), (.7,.8), (.8,.9), (.9, 1), (1, 1)} v(false) = v(not true) = {(.5,.6), (.4,.7), (.3,.8), (.2,.9), (.1, 1), (0, 1)} then v(very true) = {(.5,.36), (.6,.49), (.7,.64), (.8,.81), (.9, 1), (1, 1)} v(very false)={(.5,.36), (.4,.49), (.3,.64), (.2,.81), (.1, 1), (0, 1)} Definition (linguistic hedge or a modifier ): 31
A linguistic hedge or a modifier can be defined as an operation that modifies the meaning of a term or, more generally, of a fuzzy set. If A is a fuzzy set then the modifier m generates the (composite) term B = m(a). Mathematical models frequently used for modifiers are: concentration: con(a) (u) = ( A (u)) 2 dilation: dil(a) (u) = ( A (u)) 1/2 Generally the following linguistic hedges (modifiers) are associated with above-mentioned mathematical operators. If A is a term (a fuzzy set) then: very A = con(a) more or less A = dil(a) In figure-26 the term young is represented by membership function young (u), when we represent the term very young, we can use the square of young (u) as follows: very young (u) = ( young (u)) 2 The graph of membership function of very young is given in figure 26. Figure-26 Linguistic variable Age Example 17: Let us reconsider from example 15 the linguistic variable "Age". The term set shall be assumed to be T(Age) = {old, very old, very very old,...} The term set can now be generated recursively by using the following rule (algorithm): 32
G(Age): T i+1 = {old} {very T i } that is, T 0 = Ø T 1 = {old} T 2 = {old, very old} T 3 = {old, very old, very very old} For the semantic rule we only need to know the meaning of "old" and the meaning of the modifier "very" in order to determine the meaning of an arbitrary term of the term set. If one defines "very" as the concentration, then the terms of the term set of the structured linguistic variable "Age" can be determined, given that the membership function of the term "old" is known. Example 18: Let "Age" be a Boolean linguistic variable with the term set T(Age) = {young, not young, old, not old, very young, not young and not old, young or old,...} Identifying "and" with the intersection, "or" with the union, "not" with the complementation, and "very" with the concentration we can derive the meaning of different terms of the term set as follows: M(not young) = young M (not very young) = (young)2 M (young or old) = young old, etc. Given the two fuzzy sets (primary terms) M(young) = {(u, young (u)) u [0,100]} Where and M(old) = {(u, old (u)) u [0,100]} 33
where Then the membership function of the term young or old would, for instance, be 34