Fuzzy Expert Systems Lecture 6 (Fuzzy Logic ) Unlike Classical Logic, Fuzzy Logic is concerned, in the main, with modes of reasoning which are approximate rather than exact L. A. Zadeh Lecture 6 صفحه
Summary of the previous lecture Fuzzy propositions are the building blocks of the statements in fuzzy logic while atomic fuzzy propositions are the building blocks of the compound fuzzy propositions Connectives are used to build compound fuzzy propositions using the atomic fuzzy propositions. while and is regarded as intersection, or is regarded as union and not is regarded as fuzzy complement. Lecture 6 صفحه 2
Lecture 6 Fuzzy If-Then Rules Human knowledge is represented in terms of fuzzy if-then rules. A fuzzy if then rule is a conditional statement expressed as IF <Fuzzy Proposition> THEN <Fuzzy Proposition> تالی Consequent مقدم Antecedent Lecture 6 صفحه 3
Interpretation of fuzzy if-then rules If-then rules are named implication If p THEN q In classical logic, implications are general in the sense that their truth value for each combination of the truth values of the propositions can be defined as in the following Table P q p T T F F q T F T F p_ q T F T T Lecture 6 صفحه 4
The truth value of the implication p q can be obtained using the following formula in classical logic P q (~p)vq (p q)v(~p) If we also accept that fuzzy implications are also global, we can extend the above formula in fuzzy logic as well. Consequently, we should use any t-norm t instead of the connective and any s-norm s instead of V and any of the fuzzy complements instead of ~ Lecture 6 صفحه 5
Implications can be regarded as relations IF x is A THEN y is B A fuzzy if then rule such as the above rule can be regarded as a fuzzy relation which relates each pairs of (x,y) to each other to some extent. The relation nature of such implication is obvious however, the remaining question is how to define the membership function of the relation : µ Q (x,y) (x,y) UxV Q: UxV [,] µ Q (x,y)=? Lecture 6 صفحه 6
Types of Implications IF <FP > THEN <FP 2 > Dienes-Rescher Implication: using complement: Basic Fuzzy Complement S-norm: maximum µ = µ using (~p)vq ( x, y) max[ ( x), ( y)] FP FP2 Q D µ Lukasiewicz Implication: using (~ complement: Basic Fuzzy Complement S-norm: Yager S-norm (~p)vq µ ( x, y) = min[, µ ( x) + µ ( y)] Q L FP FP2 Lecture 6 صفحه 7
Zadeh Implication: using (p q)v(~p) complement: S-norm: T-norm: Godel Implication: Basic Fuzzy Complement maximum ( Basic Fuzzy Union) min ( Basic Fuzzy Intersection) µ Q D ( x, y) = max[min( µ FP ( x), µ ( y)), ( x)] FP µ 2 FP µ if FP Q G ( x, y) = µ FP ( y) p 2 µ ( x) q ( p q) µ FP 2 ( y) otherwise q Lecture 6 صفحه 8
Mamdani Implication (most widely used in fuzzy systems and control} Some people believe that fuzzy if-then rules (in spite of classical ones which are global ) are local implications In the sense that p q has large truth value when both p and q have large truth values. In other words it is assumed that : IF <FP > then <FP 2 > IF <FP > then <FP 2 > ELSE <nothing> Comparing with classical logic it is written as: P q p q Lecture 6 صفحه 9
Types of Mamdani Implications Mamdani-Min Min Q MM µ Q MM x, y) =< FP > < FP2 >= min[ µ FP ( x), µ FP ( y)] ( 2 Mamdani-Product Q MP µ Q MP x, y) =< FP > < FP2 >= µ FP ( x). µ FP ( y) ( 2 Lecture 6 صفحه
Example: Godel Implication in 3 Valued Logic p.5.5.5 q.5.5.5 P q.5 Lecture 6 صفحه
Fuzzy Logic What is Logic: Study of methods and principles of reasoning where reasoning means obtaining new propositions from existing propositions Generalization of the 2 valued classical logic to a multi valued fuzzy logic allows us to perform approximate reasoning that is deducing imprecise conclusions (fuzzy propositions) from a collection of imprecise premises (fuzzy propositions) Lecture 6 صفحه 2
Existing Propositions Premises Reasoning New Propositions Conclusions Fuzzy Propositions Approximate Reasoning Fuzzy Propositions The ultimate goal of the fuzzy logic is to provide foundations for approximate reasoning with imprecise propositions using fuzzy set theory as the principle tool Lecture 6 صفحه 3
Classical Inference Rules Given two propositions p and p q, the truth of the propositions q should be inferred ( p ( p q) ) ) q Modus Ponens: Given two propositions Premise : x is A Premise 2: IF x is A THEN y is B Non Fuzzy Conclusion: y is B Lecture 6 صفحه 4
Modus Tollens Tollens: Given two propositions ~ ~q and p q, the truth of the propositions ~p should be inferred ( q ( p q)) p Premise : y is not B Premise 2: IF x is A THEN y is B Conclusion: x is not A Lecture 6 صفحه 5
Hypothetical Syllogism: Given two propositions p q and q r the truth of the proposition p r should be inferred. ( ( p q) ( q r) ) ( p p r) Premise : IF x is A THEN y is B Premise 2: IF y is B THEN z is C Conclusion: IF x is A THEN z is C Lecture 6 صفحه 6
Verification of Modus Ponens in 3 valued logic p.5.5.5 q.5.5.5 P q.5 p (p q).5.5.5 [p (p q)] q)] q Lecture 6 صفحه 7
Fundamental Principles in Fuzzy Logic To achieve the ultimate goal of fuzzy logic in providing foundations for approximate reasoning, the generalizations of the above inference rules are proposed and are called, generalized modus ponens, generalized modus tollens and generalized hypothetical syllogism. Lecture 6 صفحه 8
Generalized Modus Ponens Given two fuzzy propositions x x is A A and IF x is A THEN y is B The new fuzzy proposition y y is B B could be inferred. It is obvious that this rule has not any meaning unless we specify the membership function of B. B. It is desired to define B B such that the closer A to A, the closer B to B Premise : x is A A Premise 2: IF x is A THEN y is B Conclusion: y is B B Lecture 6 صفحه 9
Graphical Interpretation of GMP A A B B A B B B A? Lecture 6 صفحه 2
Intuitive criteria relating premises and conclusion in Generalized Modus Ponens P P2 P3 P4 P5 P6 P7 * Premise X is A X is very A X is very A X is morl A X is morl A X is not A X is not A Premise 2 Conclusion y is B y is very B y is B y is morl B y is B Unknown y is not B Note: morl = more or less Lecture 6 صفحه 2
Generalized Modus Tollens Given two fuzzy propositions y y is B B and IF x is A THEN y is B The new fuzzy proposition x x is A A could be inferred. It is obvious that this rule does not have any meaning unless we specify the membership function of A.. It is desired to define A such that the more difference between B and B results more difference between A and A. Premise : y is B B Premise 2: IF x is A THEN y is B Conclusion: x is A A Lecture 6 صفحه 22
Intuitive criteria relating premises and conclusion in Generalized Modus Tollens 2 3 4 5 Premise y is not B y is not very B y is not morl B y is B y is B Premise 2 Conclusion x is not A x is not very A x is not morl A x is Unknown x is A Lecture 6 صفحه 23
Generalized Hypothetical Syllogism Given two fuzzy propositions IF x is A THEN y is B and IF y is B B THEN z is C The following fuzzy proposition could be inferred: IF x is A THEN z is C C such that: the closer B to B B, the closer C C to C Premise : IF x is A THEN y is B Premise 2: IF y is B B THEN z is C Conclusion: IF x is A THEN z is C C Lecture 6 صفحه 24
Graphical Interpretation of GHS A B B C A? C Lecture 6 صفحه 25
Intuitive criteria relating premises and conclusion in Generalized hypothetical syllogism s s2 s3 s4 s5 s6 s7 Premise Premise 2 IF y is B B z is C IF y is B z is C IF y is very B z is C IF y is very B z is C IF y is morl B z is C IF y is morl B z is C IF y is not B z is C IF y is not B z is C Conclusion IF x is A z is C z is morl C z is C z is very C z is C z is Unknow z is not C Lecture 6 صفحه 26
The above intuitive The above intuitive criteria are not necessarily true for a particular choice of fuzzy sets Fuzzy Propositions Inference Rules Fuzzy Propositions MF of the premises? MF of the conclusion Lecture 6 صفحه 27
Finding membership function of the conclusion Compositional Rule of Inference sup-star star composition Assume that A A is a fuzzy set in U having µ A (x) and Q is a fuzzy relation in UxV having µ Q (x,y), µ B (y)= sup xεu { t[ µ A (x), µ Q (x,y) ] } sup µ ( y) = [ µ ( x) * µ B A' x U Q ( x, y)] Lecture 6 صفحه 28
A x U Elements of U are related to elements of V through a relation Q. B y µ Q (x,y) So how this relation relates the fuzzy sets in U to fuzzy sets in V? How much y is B? V How much a desired x is related to this y AND how much that x is A Lecture 6 صفحه 29
How much y is B ( µ B (y)=?? ) (x is A ) and (x is related to y) t [ µ A (x) µ Q (x,y) ] Since different values of x may be related to a particular value of y, it is reasonable to look for the strongest relation when x is changed. µ B (y)= sup xεu {t[ µ A (x), µ Q (x,y) ] } Lecture 6 صفحه 3
Generalized Modus Ponens Premise : x is A A Premise 2: IF x is A THEN y is B Conclusion: y is B B µ B = µ µ ( y) sup t[ ( x), ( x, y)] ' x U A A B Lecture 6 صفحه 3
Generalized Modus Tollens Premise : y is B B Premise 2: IF x is A THEN y is B Conclusion: x is A A µ A = µ µ ( x) supt[ ( x), ( x, y)] ' y V B A B Lecture 6 صفحه 32
Generalized Hypothetical Syllogism Premise : IF x is A THEN y is B Premise 2: IF y is B B THEN z is C µ Conclusion: IF x is A THEN z is C C = µ µ A C A B B C y V ( x, z) supt[ ( x, y), ( y, z)] Lecture 6 صفحه 33
References. A course in fuzzy systems and control, L-X. Wang, 3. Tutorial on Fuzzy Logic,, Jan Jantzen, Technical University of Denmark, Technical report no 98-E E 868, 999 Lecture 6 صفحه 34