Fuzzy Rules and Fuzzy Reasoning Chapter 3 Fuzzy

  • Slides: 28
Download presentation
Fuzzy Rules and Fuzzy Reasoning Chapter 3: Fuzzy Rules and Fuzzy Reasoning J. -S.

Fuzzy Rules and Fuzzy Reasoning Chapter 3: Fuzzy Rules and Fuzzy Reasoning J. -S. Roger Jang (張智星) CS Dept. , Tsing Hua Univ. , Taiwan Modified by Dan Simon Cleveland State University

Fuzzy Rules and Fuzzy Reasoning Outline • Extension principle • Fuzzy relations • Fuzzy

Fuzzy Rules and Fuzzy Reasoning Outline • Extension principle • Fuzzy relations • Fuzzy if-then rules • Compositional rule of inference • Fuzzy reasoning 2

Fuzzy Rules and Fuzzy Reasoning Extension Principle A is a fuzzy set on X

Fuzzy Rules and Fuzzy Reasoning Extension Principle A is a fuzzy set on X : The image of A under f(. ) is a fuzzy set B: where yi = f(xi), for i = 1 to n. If f(. ) is a many-to-one mapping, then 3

Fuzzy Rules and Fuzzy Reasoning Example: Extension Principle Example 1 y = x 2

Fuzzy Rules and Fuzzy Reasoning Example: Extension Principle Example 1 y = x 2 (x) 0 1 2 3 -1 0 1 2 3 (y) 0 1 4 (x) Example 2 4 9 0 1 4 9

Fuzzy Rules and Fuzzy Reasoning Fuzzy Relations A fuzzy relation R is a 2

Fuzzy Rules and Fuzzy Reasoning Fuzzy Relations A fuzzy relation R is a 2 D MF: Examples: • x is close to y (x and y are numbers) • x depends on y (x and y are events) • x and y look alike (x and y are persons or objects) • If x is large, then y is small (x is an observed instrument reading and y is a corresponding control action) 5

Fuzzy Rules and Fuzzy Reasoning Example: x is close to y 6

Fuzzy Rules and Fuzzy Reasoning Example: x is close to y 6

Fuzzy Rules and Fuzzy Reasoning Example: X is close to Y 7

Fuzzy Rules and Fuzzy Reasoning Example: X is close to Y 7

Fuzzy Rules and Fuzzy Reasoning Max-Min Composition The max-min composition of two fuzzy relations

Fuzzy Rules and Fuzzy Reasoning Max-Min Composition The max-min composition of two fuzzy relations R 1 (defined on X and Y) and R 2 (defined on Y and Z): (max) (min) • Associativity: • Distributivity over union: • Weak distributivity over intersection: • Monotonicity: 8

Fuzzy Rules and Fuzzy Reasoning Max-Star Composition Max-product composition: In general, we have max

Fuzzy Rules and Fuzzy Reasoning Max-Star Composition Max-product composition: In general, we have max * compositions: where * is a T-norm operator. 9

Fuzzy Rules and Fuzzy Reasoning Example 3. 4 – Max * Compositions R 1:

Fuzzy Rules and Fuzzy Reasoning Example 3. 4 – Max * Compositions R 1: x is relevant to y y= x=1 0. 1 x=2 0. 4 x=3 0. 6 y= 0. 3 0. 2 0. 8 R 2: y is relevant to z z=a y= 0. 9 y= 0. 2 y= 0. 5 z=b 0. 1 0. 3 0. 6 y= 0. 2 How relevant is x=2 to z=a? 10 0. 7 y= 0. 5 0. 8 0. 3 y= 0. 7 0. 9 0. 2

Fuzzy Rules and Fuzzy Reasoning Example 3. 4 (cont’d. ) x y z 1

Fuzzy Rules and Fuzzy Reasoning Example 3. 4 (cont’d. ) x y z 1 0. 9 0. 4 0. 2 0. 5 0. 8 0. 9 0. 7 a 2 3 11 b

Fuzzy Rules and Fuzzy Reasoning Linguistic Variables A numerical variable takes numerical values: Age

Fuzzy Rules and Fuzzy Reasoning Linguistic Variables A numerical variable takes numerical values: Age = 65 A linguistic variables takes linguistic values: Age is old A linguistic value is a fuzzy set. All linguistic values form a term set (set of terms): T(age) = {young, not young, very young, . . . middle aged, not middle aged, . . . old, not old, very old, more or less old, . . . not very young and not very old, . . . } 12

Fuzzy Rules and Fuzzy Reasoning Operations on Linguistic Values (very) Concentration: Dilation: (more or

Fuzzy Rules and Fuzzy Reasoning Operations on Linguistic Values (very) Concentration: Dilation: (more or less) Contrast intensification: 13 intensif. m

Fuzzy Rules and Fuzzy Reasoning Linguistic Values (Terms) How are these derived from the

Fuzzy Rules and Fuzzy Reasoning Linguistic Values (Terms) How are these derived from the above MFs? 14 complv. m

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules General format: If x is A

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules General format: If x is A then y is B This is interpreted as a fuzzy set Examples: • • 15 If pressure is high, then volume is small. If the road is slippery, then driving is dangerous. If a tomato is red, then it is ripe. If the speed is high, then apply the brake a little.

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Two ways to interpret “If x

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Two ways to interpret “If x is A then y is B” A is coupled with B: (x is A) (y is B) A entails B: (x is not A) (y is B) y y B B x A 16 x A

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Example: if (profession is athlete) then

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Example: if (profession is athlete) then (fitness is high) Coupling: Athletes, and only athletes, have high fitness. The “if” statement (antecedent) is a necessary and sufficient condition. Entailing: Athletes have high fitness, and nonathletes may or may not have high fitness. The “if” statement (antecedent) is a sufficient but not necessary condition. 17

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Two ways to interpret “If x

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Two ways to interpret “If x is A then y is B”: • A coupled with B: (A and B – T-norm) • A entails B: (not A or B) - Material implication - Propositional calculus - Extended propositional calculus - Generalization of modus ponens 18

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Fuzzy implication A coupled with B

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules Fuzzy implication A coupled with B (bell-shaped MFs, T-norm operators) Example: only fit athletes satisfy the rule 19 fuzimp. m

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules A entails B (bell-shaped MFs) Arithmetic

Fuzzy Rules and Fuzzy Reasoning Fuzzy If-Then Rules A entails B (bell-shaped MFs) Arithmetic rule: (x is not A) (y is B) (1 – x) + y Example: everyone except non-fit athletes satisfies the rule 20 fuzimp. m

Fuzzy Rules and Fuzzy Reasoning Compositional Rule of Inference Derivation of y = b

Fuzzy Rules and Fuzzy Reasoning Compositional Rule of Inference Derivation of y = b from x = a and y = f(x): y y b b y = f(x) a 21 x a and b : points a and b : intervals y = f(x) : a curve Crisp : if x = a, then y=b y = f(x) : interval-valued function Fuzzy : if (x is a) then (y is b)

Fuzzy Rules and Fuzzy Reasoning Compositional Rule of Inference A is a fuzzy set

Fuzzy Rules and Fuzzy Reasoning Compositional Rule of Inference A is a fuzzy set of x and y = f(x) is a fuzzy relation: 22 cri. m

Fuzzy Rules and Fuzzy Reasoning Single rule with single antecedent Rule: if x is

Fuzzy Rules and Fuzzy Reasoning Single rule with single antecedent Rule: if x is A then y is B Premise: x is A’, where A’ is close to A Conclusion: y is B’ Use max of intersection between A and A’ to get B’ A’ A B w X A’ x is A’ 23 Y B’ X y is B’ Y

Fuzzy Rules and Fuzzy Reasoning Single rule with multiple antecedents Rule: if x is

Fuzzy Rules and Fuzzy Reasoning Single rule with multiple antecedents Rule: if x is A and y is B then z is C Premise: x is A’ and y is B’ Conclusion: z is C’ Use min of (A A’) and (B B’) to get C’ A’ A B’ B C w X A’ x is A’ 24 Y B’ X Z y is B’ C’ Y z is C’ Z

Fuzzy Rules and Fuzzy Reasoning Multiple rules with multiple antecedents Rule 1: if x

Fuzzy Rules and Fuzzy Reasoning Multiple rules with multiple antecedents Rule 1: if x is A 1 and y is B 1 then z is C 1 Rule 2: if x is A 2 and y is B 2 then z is C 2 Premise: x is A’ and y is B’ Conclusion: z is C’ Use previous slide to get C 1’ and C 2’ Use max of C 1’ and C 2’ to get C’ (next slide) 25

Fuzzy Rules and Fuzzy Reasoning Multiple rules with multiple antecedents A’ A 1 B’

Fuzzy Rules and Fuzzy Reasoning Multiple rules with multiple antecedents A’ A 1 B’ B 1 C 1 w 1 X A’ A 2 Z Y B’ B 2 C 2 w 2 X A’ Z Y B’ C’ x is A’ 26 X y is B’ Y z is C’ Z

Fuzzy Rules and Fuzzy Reasoning: MATLAB Demo >> ruleview mam 21 (Matlab Fuzzy Logic

Fuzzy Rules and Fuzzy Reasoning: MATLAB Demo >> ruleview mam 21 (Matlab Fuzzy Logic Toolbox) 27

Fuzzy Rules and Fuzzy Reasoning Other Variants Some terminology: • Degrees of compatibility (match

Fuzzy Rules and Fuzzy Reasoning Other Variants Some terminology: • Degrees of compatibility (match between input variables and fuzzy input MFs) • Firing strength calculation (we used MIN) • Qualified (induced) MFs (combine firing strength with fuzzy outputs) • Overall output MF (we used MAX) 28