be introduced to the topics of:
-fuzzy sets,
-fuzzy operators,
-fuzzy logic
-and come to terms with the technology
learn how to represent concepts using fuzzy logic
understand how fuzzy logic is used to make deductions
familiarise yourself with the `fuzzy' terminology

注脚

展开查看详情

1.Soft Computing Fuzzy logic is part of soft computing

2.Congress of Computational Intelligence Neural Nets Evolutionary Algorithms Computational Intelligence Fuzzy Logic

3.Fuzzy Logic and Functions Constructive Induction Decision Trees and Evolutionary Algorithms Fuzzy logic other Learning Neural Nets

4. The Definition of Fuzzy Logic Membership Function • A person's height membership function graph is shown next with linguistic values of the degree of membership as very tall, tall, average, short and very short being replaced by 0.85, 0.65, 0.50, 0.45 and 0.15.

5.• In traditional logic, statements can be either true or false, and sets can either contain an element or not. • These logic values and set memberships are typically represented with number 1 and 0. • Fuzzy logic generalizes traditional logic by allowing statements to be somewhat true, partially true, etc. • Likewise, sets can have full members, tall partial members, and so on. • For example, a person whose height is 5’ 9” might be assigned a medium membership of 0.6 in the fuzzy set “tall people”. • The statement “Joe is tall” is 60% true of Joe is 5’9”. • Fuzzy logic is a set of “if--then” statements based on combining fuzzy sets. (Beale & Demuth..Fuzzy Systems Toolbox.)

6. Fuzzy Sets, Statements, and Rules • A crisp set is simply a collection of objects taken from the universe of objects. • Fuzzy refers to linguistic uncertainty, like the word “tall”. • Fuzzy sets allow objects to have membership in more than one set: – e.g. 6’ 0” has grade 70% in the set “tall” and grade 40% in the set “medium”. • A fuzzy statement describes the grade of a fuzzy variable with an expression: – e.g. Pick a real number greater than 3 and less than 8.

7. The Definition of Fuzzy Logic Rules • A fuzzy logic system uses fuzzy logic rules, as in an expert system where there are many if-then rules. – A fuzzy logic rule uses membership functions as variables. • A fuzzy logic rule is defined as an if variable(s) and then output fuzzy variable(s). • Fuzzy logic variables are connected together like binary equations with the variables separated with operators of AND, OR, and NOT.

8. Contents • Review of classical logic and reasoning systems • Fuzzy sets • Fuzzy logic • Fuzzy logic systems applications • Fuzzy Logic Minimization and Synthesis • Practical Examples • Approaches to fuzzy logic decomposition • Our approach to decomposition • Combining methods and future research

9. Outline •be introduced to the topics of: – fuzzy sets, – fuzzy operators, – fuzzy logic – and come to terms with the technology •learn how to represent concepts using fuzzy logic •understand how fuzzy logic is used to make deductions •familiarise yourself with the `fuzzy' terminology

10. Review of Traditional Propositional Logic and why it is not

11.Traditional Logic • One of the main aims of logic is to provide rules which can be employed to determine whether a particular argument is correct or not. • The language of logic is based on mathematics and the reasoning process is precise and unambiguous.

12. Logical arguments • Any logical argument consists of statements. • A statement is a sentence which unambiguously either holds true or holds false. – Example:Today Example: is Sunday

13. Predicates • Example: Seven is an even number – This example can be written in a mathematical form as follows: • 7  {x| x is an even number}x| x is an even number} – or in a more concise way: • 7  {x| x is an even number}x|P(x)} } – where | is read as such that and P(x)} stands for `x has property P' and it is known as the predicate. – Note that a predicate is not a statement until some particular x-value is specified. – Once a x value is specified then the predicate becomes a statement whose truth or falsity can be worked out.

14. For All Quantifier • For all x and y, x2-y2 is the same as (x+y)} *(x-y)} – This example can be written in a mathematical form as well:   x,y ((x,yR)}  (x2-y2)} =(x+y)} *(x-y)} )} • where the is interpreted as 'for all',  is the logical operator AND, and R represents what is termed as the universe of discourse.

15. Universe of Discourse • Using the universe of discourse one assures that a statement is evaluated for relevant values. – The above predicate is then true only for real numbers. • Similarly for the first example the universe of discourse is most likely to be the set of natural numbers rather than buildings, rivers, or anything else. – Hence, using the concept of the universe of discourse any logical paradoxes can not arise.

16.Existential Quantifier • Another type of quantifier is the existential quantifier ()} . • The existential quantifier is interpreted as 'there exists' or 'for some' and describes a statement as being true for at least one element of the set. • For example, (x)} ( river(x)}  name(x)} =Amazon )}

17.Connectives and their truth tables • A number of connectives exist. – Their sole purpose is to allow us to join together predicates or statements in order to form more complicated ones. • Such connectives are NOT (~)} , AND ()} , OR ()} . – Strictly speaking NOT is not a connective since it only applies to a single predicate or statement. • In traditional logic the main tools of reasoning are tautologies, such as the modus ponens (A(AB)))} )} B)) ( means implies)} .

18. Truth Tables A B And AÙB |AÚB Or | ~ A Not True True True True False True False False True False False True False True True False False False False True This everything will hold true, we will just do a small modification to the material on logic from the last quarter

19. Identities of Fuzzy Logic or how fuzzy logic differs from classical

20. Identities of Fuzzy Logic • The form of identities used in fuzzy variables are the same as elements in fuzzy sets. • The definition of an element in a fuzzy set, {(x,u a(x))}, is the same as a fuzzy variable x and this form will be used in the remainder of the paper. • Fuzzy functions are made up of fuzzy variables. The identities for fuzzy algebra are: Idempotency: X + X = X, X * X = X Commutativity: X + Y = Y + X, X * Y = Y * X Associativity: (X + Y) + Z = X + (Y + Z), (X * Y) * Z = X * (Y* Z) Absorption: X + (X * Y) = X, X * (X + Y) = X Distributivity: X + (Y * Z) = (X + Y) * (X + Z), X * (Y + Z) = (X * Y) + (X * Z) Complement: X’’ = X DeMorgan's Laws: (X + Y)’ = X’ * Y’, (X * Y)’ = X’ + Y’

21.Transformations of Fuzzy Logic Formulas Some transformations of fuzzy sets with examples follow: x’b + xb = (x + x’)b  b xb + xx’b = xb(1 + x’) = xb x’b + xx’b = x’b(1 + x) = x’b a + xa = a(1 + x) = a a + x’a = a(1 + x’) = a a + xx’a = a a+0=a x+0=x x*0=0 x+1=1 x*1=x Examples: a + xa + x’b + xx’b = a(1 + x) + x’b(1 + x) = a + x’b a + xa + x’a + xx’a = a(1 + x + x’ + xx’) = a

22. Differences Between Boolean Logic and Fuzzy Logic • In Boolean logic the value of a variable and its inverse are always disjoint (X * X’ = 0) and (X + X’ = 1) because the values are either zero or one. • Fuzzy logic membership functions can be either disjoint or non-disjoint. • Example of a fuzzy non- linear and linear membership function X is shown (a) with its inverse membership function shown in (b).

23. Fuzzy Intersection and Union • From the membership functions shown in the top in (a), and complement X’ (b) the intersection of fuzzy variable X and its complement X’ is shown bottom in (a). • From the membership functions shown in the top in (a), and complement X’ (b) the union of fuzzy variable X and its complement X’ is shown bottom in (b). Fuzzy Fuzzy union intersection

24.Validation of Fuzzy Functions valid inconsistent • Two fuzzy functions are valid iff the function outputs are  0.5 under all possible assignments. • This is like doing EXOR of two binary functions shown in (b) which is the same as union. • Two fuzzy functions are inconsistent iff the function output is  0.5 under all possible assignments. Thus, if the output of the two fuzzy functions is < 0.5 then the two fuzzy functions are inconsistent. • This is like exnor of two binary functions of shown in (a) which is the same as intersection.

25. Fuzzy Logic as an answer to problems with traditional logic

26. Fuzzy Logic • The concept of fuzzy logic was introduced by L.A Zadeh in a 1965 paper. • Aristotelian concepts have been useful and applicable for many years. • B))ut these traditional approaches present us with certain problems: – Cannot express ambiguity – Lack of quantifiers – Cannot handle exceptions

27.Traditional Logic Problems – Cannot express ambiguity: • Consider the predicate `X is tall'. • Providing a specific person we can turn the predicate into a statement. • But what is the exact meaning of the word `tall'? • What is `tall' to some people is not tall to others. – Lack of quantifiers: • Another problem is the lack of being able to express statements such as `Most of the goals came in the first half '. • The `most' quantifier cannot be expressed in terms of the universal and/or existential quantifiers.

28.Traditional Logic Problems – Cannot handle exceptions: • Another limitation of traditional predicate logic is expressing things that are sometimes, but not always true.

29.Traditional sets

30. Traditional sets • In order to represent a set we use curly brackets {x| x is an even number}}. • Within the curly brackets we enclose the names of the items, separating them from each other by commas. • The items within the curly brackets are referred to as the elements of the set. – Example: Set of vowels in the English alphabet = {x| x is an even number}a,e,i,o,u} • When dealing with numerical elements we may replace any number of elements using 3 dots. – Example: Set of numbers from 1 to 100 = {x| x is an even number}1,2,3,...,100} – Set of numbers from 23 to infinity = {x| x is an even number}23,24,25,...}

31. Traditional sets • Rather than writing the description of a set all the time we can give names to the set. • The general convention is to give sets names in capital letters. – Example: • V = set of vowels in the English alphabet. • Hence any time we encounter V implies the set {x| x is an even number}a, e, i, o, u}. – For finite size sets a diagrammatic representation can be employed which can be used to assist in their understanding. • These are called the cloud diagrams

32.Cloud Diagrams

33. Set order • The order in which the elements are written down is not important. – Example: V = {x| x is an even number}a,e,i,o,u} = {x| x is an even number}u,o,i,e,a} = {x| x is an even number}a,o,e,u,i} • The names of the elements in a set must be unique. – Example: • V = {x| x is an even number}a,a,e,i,o,u} • If two elements are the same then there is no point writing them down twice (waste of effort)} • but if different then we must introduce a way to tell them apart.

34. Set membership • Given any set, we can test if a certain thing is an element of the set or not. • The Greek symbol, , indicates an element is a member of a set. • For example, xA means that x is an element of the set A. • If an element is not a member of a set, the symbol  is used, as in A.

35. Set equality & subsets • Two sets A and B)) are equal, (A= B)))} if every element of A is an element of B)) and every element of B)) is an element of A. • A set A is a subset of set B)), (A  B)))} if every element of A is an element of B)). • A set A is a proper subset of set B)), (A  B)))} if A is a subset of B)) and the two sets are not equal.

36. Set equality & subsets • Two sets A and B)) are disjoint, (A  b)} if and only if their intersection is the empty set. • There are a number of special sets. For instance: – B))oolean B))={x| x is an even number}True, False} – Natural numbers N={x| x is an even number}0,1,2,3,...} – Integer numbers Z={x| x is an even number}...,-3,-2,-1,0,1,2,3,...} – Real numbers R – Characters Char – Empty set  or {x| x is an even number}} – The empty set is not to be confused with {x| x is an even number}0} which is a set which contains the number zero as its only element.

37. Set operations • We have a number of possible operators acting on sets. • The intersection ( )} , the union ( )} , the difference (/)} , the complement (')} . – Intersection results in a set with the common elements of two sets. – Union results in a set which contains the elements of both sets. – The difference results in a set which contains all the elements of the first set which do not appear in the second set. – The complement of a set is the set of all element not in that set.

38. Set operations example • Using as an example the two following sets A and B)) the mathematical representation of the operations will be given. – A = {x| x is an even number}cat, dog, ferret, monkey, stoat} – B)) = {x| x is an even number}dog, elephant, weasel, monkey} • C = A  B)) = {x| x is an even number}x  u | (x  A)}  (x  B)))} }={x| x is an even number}dog, monkey} • C = A  B)) = {x| x is an even number}x  u | (x  A)}  (x  B)))} }={x| x is an even number}cat, ferret, stoat, dog, elephant, weasel, monkey} • C = A / B)) = {x| x is an even number}x  u | (x  A)}  ~(x  B)))} }={x| x is an even number}cat, ferret, stoat} • C = A‘ = {x| x is an even number}x  u | ~(x  A)} } – U is a Universe

39.Set operations example using Venn diagrams Intersection Union A B A B Difference Complement A B A A'

40. Soft Computing and Fuzzy Theory

41.What is fuzziness • The concept of fuzzy logic was introduced in a 1965 paper by Lotfi Zadeh. • Professor Zadeh was motivated by his realization of the fact that people base their decisions on imprecise, non-numerical information. • Fuzzification should not be regarded as a single theory but as a methodology – It generalizes any specific theory from a discrete to a continuous form. • For instance: – from B))oolean logic to fuzzy logic, – from calculus to fuzzy calculus, – from differential equations to fuzzy differential equations, – and so on.

42.What is fuzziness • Fuzzy logic is then a superset of conventional B))oolean logic. • In Boolean logic propositions take a value of either completely true or completely false • Fuzzy logic handles the concept of partial truth, i.e., values between the two extremes.

43. What is fuzziness: linguistic variables or fuzzy literals • For example, if pressure takes values between 0 and 50 (the universe of discourse) discourse one might label the range 20 to 30 as medium pressure (the subset). • Medium is known as a linguistic variable.

44. Boolean Literal “Medium Pressure” With B))oolean logic 15.0 (or even 19.99)} is not a e following Figure shows the membership function member of the medium ng B))oolean logic. pressure range. As soon as the pressure equals 20, then it becomes a member.

45.Example: contrast boolean and fuzzy literals • Contrast with the Figure of the next page which shows the membership function using fuzzy logic. • Here, a value of 15 is a member of the medium pressure range with a membership grade of about 0.3. • Measurements of 20, 25, 30, 40 have grade of memberships of 0.5, 1.0, 0.8, and 0.0 respectively. • Therefore, a membership grade progresses from non-membership to full membership and again to non-membership.

46.Fuzzy Literal “Medium Pressure”

47. Evaluation of fuzzy functions is similar to evaluation of binary Boolean Functions A 1 1 1 C 1 0 BOOLEAN 1 B 0 A 0.9 0.7 0.7 C 0.7 0.6 FUZZY 0.4 MAX B 0.6 MIN 1-X

48. Structure of this type of the system: Two Levels, various membership functions in each, shared Fuzzy constants MIN MIN Defuzzifier of the “sum” Fuzzified MIN MIN inputs Fuzzy constants MIN Fuzzy values of combined first MIN MAX One input Defuzzifier level groups Level of input MIN membership functions Level of output membership functions

49. Fuzzy IF part Fuzzy THEN part Fuzzy constants MIN MIN Defuzzifier of the “sum” Fuzzified MIN MIN inputs Fuzzy constants MIN One input Fuzzy values of MIN MAX Defuzzifier combined first level groups Level of input MIN membership functions Level of output membership functions

50.Fuzzy Sets

51. Fuzzy Sets • Fuzzy logic is based upon the notion of fuzzy sets. – Recall from the previous section that an item is an element of a set or not. – With traditional sets the boundaries are clear cut. – With fuzzy sets partial membership is allowed. – Fuzzy logic involves 3 primary processes : • Fuzzification • Rule evaluation • Defuzzification – With fuzzy logic the generalised modus ponens is employed which allows A and B)) to be characterised by fuzzy sets.

52.Fuzzy Set Theory

53. Fuzzy Sets • Definition • Operations • Identities • Transformations

54.TRADITIONAL vs. FUZZY SETS • Traditional sets, influenced from the Aristotelian view of two-valued logic, have only two possible truth values, namely TRUE or FALSE, 1 or 0, yes or no etc. • Something either belongs to a particular set or does not. • The characteristic function or alternatively referred to as the discrimination function is defined below in terms of a functional mapping.

55.TRADITIONAL vs. FUZZY SETS • In fuzzy sets, something may belong partially to a set. • Therefore it might be very true or somewhat true, 0.2 or 0.9 in numerical terms. • The membership function using fuzzy sets defined in terms of a functional mapping is as shown below.

56.TRADITIONAL vs. FUZZY SETS • Fuzzy logic allows you to violate the laws of noncontradiction since an element can be a member of more than one set, like children and adults • More set operations are available • The excluded middle is not applicable, i.e., the intersection of a set with its complement does not necessarily result to an empty set. • Rule based systems using fuzzy logic in some cases might increase the amount of computation required in comparison with systems using classical binary logic.

57.TRADITIONAL vs. FUZZY SETS • If fuzzy membership grades are restricted to {x| x is an even number}0,1} then B))oolean sets are recovered. • For instance, consider the Set Union operator which states that the truth value of two arguments x and y is their maximum: – truth(x or y)} = max(truth(x)} , truth(y)} )} .

58. Every Crisp set is Fuzzy, but not conversely • If truth grades are either 0 or 1 then following table is found: – x y truth – 000 – 011 – 101 – 111 • which is the same truth table as in the B))oolean logic. • So, every crisp set is fuzzy, but not conversely.

59. Example of Fuzzy set • As an example consider: – the universe of discourse U = {x| x is an even number}0,1,2,...,9} – and a fuzzy set X1, `young generation decade'. • A possible presentation now follows: – X1={x| x is an even number}1.0/0+1.0/1+0.85/2+0.7/3+0.5/4+0.3/5+0. 15/6+0.0/7+0.0/8+0.0/9. – The set is also shown in a graphical form below. We use notation {(A(x), x )} 1.5 Grade 1 newborn 0.5 1 year old 0 0 3 6 9 Decade

60. Fuzzy set example The ordered pairs form the set {(x, A(x) )} to represent the fuzzy set member and the grade 1.5 of membership. Grade 1 We use also notation {(A(x), x )} 0.5 0 Decade This is subjective, language related. What does it mean “young boy” when you live in a retirement facility?

61.Definition of Fuzzy Set • A fuzzy set, defined as A, is a subset of a universe of discourse U, where A is characterized by a membership function A(x). • The membership function A(x) is associated with each point in U and is the “grade of membership” in A. • The membership function A(x) is assumed to range in the interval [0,1], with value of 0 corresponding to the non- membership, and 1 corresponding to the full membership. • The ordered pairs form the set {(x, A(x) )} to represent the fuzzy set member and the grade of membership. • We use also notation {(A(x), x )}

62.Fuzzy operators • What follows is a summary of some fuzzy set operators in a domain X. • For illustration purposes we shall use the following membership sets: – A= 0.8/2 + 0.6/3 + 0.2/4, and B)) = 0.8/3 + 0.2/5 – as well as X1 and X2 from above. • Set equality: – A=B)) if A(x)} =B))(x)} for all xX • Set complement: – A' A' (x)} =1-A (x)} for all xX. – This corresponds to the logic `NOT' function.  A' (x)} = 0.2/2 + 0.4/3 + 0.8/4

63. Fuzzy operators • Subset: AB)) if and only if A(x)} B))(x)} for all xX • Proper Subset: – AB)) if A(x)} B))(x)} and A(x)} B))(x)} for at least one xX • Set Union: – AB)) AB))(x)} =(A(x)} ,B))(x)} )} for all xX where  is the join operator and means the maximum of the arguments. • This corresponds to the logic `OR' function. – AB))(x)} = 0.8/2 + 0.8/3 + 0.2/4 + 0.2/5

64. Operations on Fuzzy Sets • The fuzzy set operations are defined as follows. – Intersection operation of two fuzzy sets uses the symbols: , *, , AND, or min. – Union operation of two fuzzy sets uses the symbols: , , +, OR, or max. • Equality of two sets is defined as A = B  a(x) = b(x) for all x  X. • Containment of two sets is defined as A subset B, A  B  a(x)  b(x) for all x  X. • Complement of a set A is defined as A’, where a’(x) = 1 – a(x) for all x  X. • Intersection of two sets is defined as A  B where  {a  b (x) } = min{(a(x), b(x))} for all x  X. Where C  A, C  B then C  A  B. • Union of two sets is defined as A  B where u a  b(x) = max{( a(x),  b (x))} for all x  X where D  A, D  B then D  A  B.

65.Fuzzy sets, logic, inference, control – This is the appropriate place to clarify not what the terms mean but their relationship. – This is necessary because different authors and researchers use the same term either for the same thing or for different things. – The following have become widely accepted: • Fuzzy logic system – anything that uses fuzzy set theory • Fuzzy control – any control system that employs fuzzy logic • Fuzzy associative memory – any system that evaluates a set of fuzzy if-then rules uses fuzzy inference. Also known as fuzzy rule base or fuzzy expert system • Fuzzy inference control – a system that uses fuzzy control and fuzzy inference

66. Fuzzy sets • A traditional set can be considered as a special case of fuzzy sets. • A fuzzy set has 3 principal properties: – the range of values over which the set is mapped – the degree of membership axis that measures a domain value's membership in the set – the surface of the fuzzy set - the points that connect the degree of membership with the underlying domain

67. Fuzzy set and its membership function µx • Therefore, a fuzzy set in a universe of discourse U is characterised by the membership function µx, which takes values in the interval [0,1] namely µx:U[0,1]. – A fuzzy set X in U may be represented as a set of ordered pairs of a generic element u and its grade of membership µx as X = {u,µX(u)/u  U}, • i.e., the fuzzy variables u take on fuzzy values µx(u)} . – When a fuzzy set, say X, is discrete and finite it may expressed as X=µx(u1)/u1+...+µx(un)/un • where `+' is not the summation symbol but the union operator, the `/’ does not denote division but a particular membership function to a value on the universe of discourse.

68.Another example of a Fuzzy set • Another set, X2 might be `mid-age generation decade. In discrete form this can be depicted as X2={x| x is an even number}0.0/0+0.0/1+0.5/2+0.8/3+1.0/4+ 0.7/5+0.3/6+0.0/ 0.9 7+0.0/8+0.0/9. 1 0.8 0.7 0.6 Grade 0.5 0.4 0.3 0.2 0.1 0 0 1 2 3 4 5 6 7 8 9 Decade

69.– Support of a fuzzy set: • The support of a fuzzy set We introduce is the set of all elements concepts: Support, of the universe of discourse that their grade Crossover, Singleton of membership is greater than zero. • For X2 the support is {x| x is an even number}2,3,4,5,6}. crossover point • Additionally, a fuzzy set has compact support if its support is finite. 1 – Crossover point: 0.9 0.8 • The element of a fuzzy set 0.7 0.6 that has a grade of Grade 0.5 membership equal to 0.5 0.4 0.3 is known as the crossover 0.2 point. 0.1 0 • For X2 the crossover 0 1 2 3 4 5 6 7 8 9 point is 2. Decade

70.– Fuzzy singleton: Support, Crossover, • The fuzzy set whose support is a single point in the Singleton universe of discourse with grade of membership equal to one is known as the fuzzy singleton. – k-Level sets: • The fuzzy set that contains 1 0.9 the elements which have a 0.8 0.7 grade of membership 0.6 Grade 0.5 greater than the k-level set 0.4 0.3 is known as the -Level set. 0.2 0.1 • For X2 the k-Level set when 0 0 1 2 3 4 5 6 7 8 9 k=0.6 is {x| x is an even number}3,4,5}. Decade • Whereas for X2 the k-Level set when k=0.4 is {x| x is an even number}2,3,4,5}.

71. Popular Membership Functions

72. How to create or select Membership Functions • Membership Functions are used in order to return the degree of membership of a numerical value for a particular set. – Fuzzy membership functions can have different shapes, depending on someone's experience or even preference. – Here we review some of the membership functions used in order to capture the modeler's sense of fuzzy numbers. – Membership functions can be drawn using: • Subjective evaluation and elicitation – (Experts specify at the end of an elicitation phase the appropriate membership functions)} or • Ad-hoc forms – One can draw from a set of given different curves.

73.Popular Membership Functions • Using library of curves simplifies the problem, for example to – 1. choosing just the central value and the slope on either side)} – 2. Converted frequencies (Information from a frequency histogram can be used as the basis to construct a membership function – 3. Learning and adaptation. • For example, let us consider the fuzzy membership function of the linguistic variable Tall.

74. Membership Function for Tall 0 if height(x) < 5 feet height(x) - 5 Tall(x) = if 5 feet height(x) 7 feet 2 1 if height(x) > 7 feet • Given the above definition the membership grade for an expression like `John is Tall' can be evaluated. Assuming a height of 6' 11'' the membership grade is 0.54 • Other popular shapes used are triangles and trapezoidals.

75.Another example of popular function: The S-Function  0 for x   2   x    2  for  x      S ( x ; ,  ,  )      2   1  2 x      for   x        1 for x

76. S- The S-Function function 1 0 .9 0 .8 0 .7 0 .6  0 for x   2 0 .5   x    2  for  x   S ( x ; ,  ,  )         0 .4  2 0 .3   1  2 x          for   x    0 .2  1 for x 0 .1 0 x a b g

77. The S-Function for “John is Tall” • As one can see the S-function is flat at a value of 0 for xa and at 1 for xg. • In between a and g the S-function is a quadratic function of x. – To illustrate the S-function we shall use the fuzzy proposition John is tall. – We assume that: • John is an adult • The universe of discource are normal people (i.e., excluding the extremes of basketball players etc.)} – then we may assume that anyone less than 5 feet is not tall (i.e., a=5)} and anyone more than 7 feet is tall (i.e., g=7)} . • Hence, b=6. • Anyone between 5 and 7 feet has a membership function which increases monotonically with his height.

78.S-Function for “Tall”  0 for x 5  2   x 5     for5 x 6 S ( x;5,6,7)   2    x  7 2 1   2  for6 x 7     1 for x 7

79. Hence the membership of 6 feet tall people is 0.5, whereas for 6.5 feet tall people increases to 0.9. S- function 1 0 .9 0 .8 0 .7  0 for x 5 0 .6  2   x 5  0 .5   for5 x 6 S ( x;5,6,7)   2  0 .4   x  7 2 1   2  for6 x 7 0 .3     1 for x7 0 .2 0 .1 0 5 6 7 Heigh t

80. Another example of useful function: P-Function    S ( x ;    ,   ,  ) for x  ( x;  ,  )   2   1  S ( x ;  ,   ,    ) for x   2

81. P-Function P-function 1 0.9 0.8 0.7 0.6 0.5 b 0.4 0.3 0.2 0.1 0 x g-b g-(b/2) g g+(b/2) g+b

82. P-Function • The P-function goes to zero at  < , and the 0.5 point is at  = (/2)} . • Notice that the  parameter represents the bandwidth of the 0.5 points.

83. P-Function P-function 1 0.9 0.8 0.7 0.6 0.5 6 0.4 0.3 0.2 0.1 0 x 1 4 7 10 13  S ( x ;1, 4 , 7 ) for x  7  ( x ;6 ,7 )    1  S ( x ; 7 ,1 0 ,1 3 ) fo r x  7

84.Fuzzy Operations for Many arguments

85. Operations • An example of fuzzy operations: X = { 1, 2, 3, 4, 5} and fuzzy sets A and B. • A = {(3,0.8), (5,1), (2,0.6)} and B = {(3,0.7), (4,1), (2,0.5)} then • A  B = {(3, 0.7), (2, 0.5)} • A  B = {(3, 0.8), (4, 1), (5, 1), (2, 0.6)} • A’ = {(1, 1), (2, 0.4), (3, 0.2), (4, 1), (5,0)}

86.Fuzzy Union Diagram X1 1.2 1 X2 0.8 Union Grade 0.6 0.4 We use operator MAXIMUM 0.2 0 0 1 2 3 4 5 6 7 8 9 Decade – AB(x) = 0.8/2 + 0.8/3 + 0.2/4 + 0.2/5

87.More of Fuzzy operators • Set Intersection: – AB))  AB))(x)} =( A(x)} ,  B))(x)} )} for all xX where  is the meet operator and means the minimum of the arguments. • This corresponds to the logic `AND' function.   AB))(x)} = 0.6/3 • Set product: – AB)) AB))(x)} =A(x)} B))(x)} • Power of a set: – AN AN (x)} =(A(x)} )} N

88.Fuzzy Intersection diagram X1 1.2 1 X2 0.8 Inter. Grade 0.6 We use operator 0.4 MINIMUM 0.2 0 0 1 2 3 4 5 6 7 8 9 Decade

89. Even More of Fuzzy operators • Bounded sum or bold union: AB))  AB))(x)} =(1,(A(x)} +B))(x)} )} )} where is minimum and + is the arithmetic add operator. • Bounded product or bold intersection: AB))  AB))(x)} =(0,(A(x)} +B))(x)} -1)} )} where  is maximum and + is the arithmetic add operator. • Bounded difference: A - B)) – A- B))(x)} =(0,(A(x)} -B))(x)} )} )} • where  is maximum and - is the arithmetic minus operator. – This operation represents those elements that are more in A than B)).

90.Single argument Fuzzy Operations Operations on operators

91. Concentration set operator • CON(A) CON(A)} =(A(x)} )} 2 – This operation reduces the membership grade of elements that have small membership grades. • If TALL=-.125/5+0.5/6+0.875/6.5+1/7+1/7.5+ 1/8 then • VERY TALL = 0.0165/5+0.25/6+0.76/6.5+1/7+1/7.5 +1/8 since VERY TALL=TALL2.

92.Concentration set operator 1 0.9 0.8 Original 0.7 0.6 0.5 0.4 0.3 Concentration 0.2 0.1 0 0 2 4 6 8 10 12 14

93.Dilation set operator • DIL(A) DIL(A)} =(A(x)} )} 0.5 – This operation increases the membership grade of elements that have small membership grades. – It is the inverse of the concentration operation. • If TALL=-.125/5+0.5/6+0.875/6.5+1/7+1/ 7.5+1/8 then • MORE or LESS TALL = 0.354/5+0.707/6+0.935/6.5+1/7+1/7.5 +1/8 since MORE or LESS TALL=TALL0.5.

94.Dilation set operator 1 0.9 0.8 Dilation 0.7 0.6 0.5 0.4 Original 0.3 0.2 0.1 0 0 2 4 6 8 10 12 14

95. Intensification set operator • This operation raises the membership grade of those elements within the 0.5 points and • This operation reduces the membership grade of those elements outside the crossover (0.5)} point. • Hence, intensification amplifies the signal within the bandwidth while reducing the `noise'. – If TALL = -.125/5+0.5/6+0.875/6.5+1/7+1/7.5+1/8 then – INT(TALL)} = 0.031/5+0.5/6+0.969/6.5+1/7+1/7.5+1/8.  2 (  A ( x )) 2 for 0   A ( x )  0 . 5  IN T ( A ) ( x )   2  1  2 (1   A ( x )) for 0.5   A ( x ) 1

96.Intensification set operator 1 0.9 intensification Intensificatio n 0.8 0.7 0.6 0.5 Original 0.4 0.3 0.2 0.1 0 0 2 4 6 8 10 12 14

97. Normalization set operator  NORM(A)} (x)} =A(x)} /max{x| x is an even number}A(x)} } where the max function returns the maximum membership grade for all elements of x. – If the maximum grade is <1, then all membership grades will be increased. – If the maximum is 1, then the membership grades remain unchanged. • NORM(TALL)} = TALL because the maximum is 1

98. Hedges – language related operators

99.• The above diagram shows the relationship between linguistic variables, term sets and fuzzy representations. – Cold, cool, warm and hot are the linguistic values of the linguistic variable temperature. – In general a value of a linguistic variable is a composite term u = u1, u2,...,un where each un is an atomic term. linguistic Temperature Hedges variable Cold Cool Warm Hot term set fuzzy set representation

100. Hedges • From one atomic term by employing hedges we can create more terms. • Hedges such as very, most, rather, slightly, more or less etc. • Therefore, the purpose of the hedge is to create a larger set of values for a linguistic variable from a small collection of primary atomic terms.

101. Using Hedges – This is achieved using the processes of: • normalisation, • intensifier, • concentration, and • dilation. – For example, using concentration very u is defined by : very u = u2 and very very u = u4.

102. Example of Hedges – Let us assume the following definition for linguistic variable slow (first is membership function, second speed)} : )} – U = 1.0/0 + 0.7/20 + 0.3/40 + 0.0/60 + 0.0/80 + 0.0/100. – Then, • Very slow = u2 = 1.0/0 + 0.49/20 + 0.09/40 + 0.0/60 + 0.0/80 + 0.0/100 • Very Very slow = u4 = 1.0/0 + 0.24/0 + 0.008/40 + 0.0/60 + 0.0/80 + 0.0/100 • More or less slow = u0.5 = 1.0/0 + 0.837/20 + 0.548/40 + 0.0/60 + 0.0/80 + 0.0/100

103. Visual representation of Hedges membership 1 0.9 0.8 more or less 0.7 0.6 slow 0.5 0.4 0.3 very slow 0.2 Speed 0.1 0 very very 0 slow20 40 60 80 100

104. Hedge rather – The hedge rather is a linguistic modifier that moves each membership by an appropriate amount C. • Setting C to unity we get. • Rather slow = 0.7/0 + 0.3/20 + 0.0/40 + 0.0/60 + 0.0/80 slow U = 1.0/0 + 0.7/20 + 0.3/40 + 0.0/60 + 0.0/80 + 0.0/100.

105. Hedge examples related to slow – The slow but not very slow is a modification which is using the connective but, which in turn is an intersection operator. – The membership function in its discrete form was found as follows: • slow = 1.0/0 + 0.7/20 + 0.3/40 + 0.0/60 + 0.0/80 + 0.0/100 • very slow = 1.0/0 + 0.49/20 + 0.09/40 + 0.0/60 + 0.0/80 + 0.0/100 • not very slow = 0.0/0 + 0.51/20 + 0.91/40 + 1.0/60 + 1.0/80 + 1.0/100 • slow but not very slow = min(slow, not very slow)} slow = 0.0/0 + 0.51/20 + 0.3/40 + 0.0/60 + 0.0/80 + 0.0/100

106.Hedges slow but not very slow and rather slow 1 0.9 0.8 0.7 slow 0.6 slow but not very slow 0.5 0.4 0.3 0.2 0.1 rather slow 0 0 20 40 60 80 100

107. Hedge slightly – The slightly hedge is the fuzzy set operator for intersection acting on the fuzzy sets Plus slow and Not (Very slow)} . – Slightly slow = INT(NORM(PLUS slow and NOT VERY slow)} where Plus slow is slow to the power of 1.25, 1.25 and is the intersection operator. • slow = 1.0/0 + 0.7/20 + 0.3/40 + 0.0/60 + 0.0/80 + 0.0/100 • plus slow = 1.0/0 + 0.64/20 + 0.222/40 + 0.0/60 + 0.0/80 + 0.0/100 • not very slow = 0.0/0 + 0.51/20 + 0.91/40 + 1.0/60 + 1.0/80 + 1.0/100 • plus slow and not very slow = min(plus slow, not very slow)} = 0.0/0 + 0.51/20 + 0.222/40 + 0.0/60 + 0.0/80 + 0.0/100

108. Hedges • norm (plus slow and not very slow)} = (plus slow and not very slow/max)} = 0.0/0 + 1.0/20 + 0.435/40 + 0.0/60 + 0.0/80 + 0.0/100 – slightly slow = int (norm)} = 0.0/0 + 1.0/20 + 0.87/40 + 0.0/60 + 0.0/80 +0.0/100.

109. Hedges 1 0.9 0.8 not very slow 0.7 0.6 0.5 0.4 slightly slow 0.3 0.2 plus slow 0.1 0 0 20 40 60 80 100

110. Hedges • Now we are in a better position to understand the meaning of the syntactic and semantic rule. – A syntactic rule defines, in a recursive fashion, more term sets by using a hedge. – For instance T(slow)} ={x| x is an even number}slow, very slow, very very slow,...}. – The semantic rule defines the meaning of terms such as very slow which can be defined as very slow = (slow)2. – One is obviously allowed either to generate new hedges or to modify the meaning of existing ones

111. Questions and Problems(1) 1. what is soft computing? What are relations of Fuzzy Logic to other areas of Soft Computing. Give example of a robot that uses combined Fuzzy Logic and other method. 2. Give example of fuzzy membership function based on IQ of a person in kindergarten and for a person in US Academy of Science. 3. What is membership function? Why is it important? 4. What are two main differences of traditional propositional logic and fuzzy logic? 5. What are main differences of fuzzy sets and traditional sets in math? 6. Use Venn diagrams to explain basic operations on sets in traditional set theory. 7. Use any method to explain basic operations on fuzzy sets.

112. Questions and Problems(2) 1. Compare Boolean literal, Multi-valued (Post) literal and fuzzy literal. Give two examples of fuzzy literal “medium age person”. 2. Explain and give examples of these concepts: 1. the range of values of fuzzy set 2. the degree of membership, 3. the surface of the fuzzy set 3. Draw a general network of a fuzzy controller or classifier 4. Draw an example of fuzzy network for some kind of robot. 5. Give examples of S-functions and P-functions. Give applications of these functions in any type of robot of your choice. 6. Illustrate how to calculate Minimum, Maximum, truncated sum and Complement on fuzzy membership functions given graphically.

113.Questions and Problems(3) 1. What are Intensification, Dilation and Concentration operators on fuzzy functions. Give an example of a robot in which we learn the best realizations of these functions based on some measurements of robot behaviors. 2. Give examples of hedges for some practical robot. How would you program them? 3. What are general Expert Systems. 4. Give example of an Expert System in any area of technology or common life 5. Give example of an Expert System for a humanoid theatrical robot