FS VI: Fuzzy reasoning schemes 1: if x is A1 and y is B1 then z is C1 2: if x is A2 and y is B2 then z is C2 ............ n: if x is An and y is Bn then z is Cn x is x̄0 and y is ȳ0 z is C The i-th fuzzy rule from this rule-base i : if x is Ai and y is Bi then z is Ci is implemented by a fuzzy relation Ri and is defined as Ri(u, v, w) = (Ai × Bi → Ci)(u, w) = [Ai(u) ∧ Bi(v)] → Ci(w) for i = 1, . . . , n. 1 Find C from the input x0 and from the rule base = {1, . . . , n}. Interpretation of • logical connective ”and” • sentence connective ”also” • implication operator ”then” • compositional operator ”◦” We first compose x̄0 × ȳ0 with each Ri producing intermediate result Ci = x̄0 × ȳ0 ◦ Ri for i = 1, . . . , n. Here Ci is called the output of the i-th rule Ci(w) = [Ai(x0) ∧ Bi(y0)] → Ci(w), for each w. 2 Then combine the Ci component wise into C by some aggregation operator: C= n Ci = x̄0 × ȳ0 ◦ R1 ∪ · · · ∪ x̄0 × ȳ0 ◦ Rn i=1 C(w) = A1(x0) × B1(y0) → C1(w) ∨ · · · ∨ An(x0) × Bn(y0) → Cn(w). • input to the system is (x0, y0) • fuzzified input is (x̄0, ȳ0) • firing strength of the i-th rule is Ai(x0) ∧ Bi(y0) • the i-th individual rule output is Ci(w) := [Ai(x0) ∧ Bi(y0)] → Ci(w) • overall system output is C = C1 ∪ · · · ∪ Cn . overall system output = union of the individual rule outputs 3 We present five well-known inference mechanisms in fuzzy rule-based systems. For simplicity we assume that we have two fuzzy IF-THEN rules of the form 1 : also 2 : if x is A1 and y is B1 then z is C1 fact : x is x̄0 and y is ȳ0 if x is A2 and y is B2 then z is C2 consequence : z is C Mamdani. The fuzzy implication is modelled by Mamdani’s minimum operator and the sentence connective also is interpreted as oring the propositions and defined by max operator. The firing levels of the rules, denoted by αi, i = 1, 2, are computed by α1 = A1(x0) ∧ B1(y0), α2 = A2(x0) ∧ B2(y0) The individual rule outputs are obtained by 4 C1 (w) = (α1 ∧ C1(w)), C2 (w) = (α2 ∧ C2(w)) Then the overall system output is computed by oring the individual rule outputs C(w) = C1 (w) ∨ C2 (w) = (α1 ∧ C1(w)) ∨ (α2 ∧ C2(w)) Finally, to obtain a deterministic control action, we employ any defuzzification strategy. 5 A1 v u w B2 A2 xo C1 B1 u C2 v yo w min Inference with Mamdani’s implication operator. Tsukamoto. All linguistic terms are supposed to have monotonic membership functions. The firing levels of the rules, denoted by αi, i = 1, 2, are computed by α1 = A1(x0)∧B1(y0), α2 = A2(x0)∧B2(y0) In this mode of reasoning the individual crisp control actions z1 and z2 are computed from 6 the equations α1 = C1(z1), α2 = C2(z2) and the overall crisp control action is expressed as α1z1 + α2z2 z0 = α1 + α2 i.e. z0 is computed by the discrete Centerof-Gravity method. If we have n rules in our rule-base then the crisp control action is computed as n i=1 αi zi , z0 = n i=1 αi where αi is the firing level and zi is the (crisp) output of the i-th rule, i = 1, . . . , n Example 1. We illustrate Tsukamoto’s reasoning method by the following simple example 7 1 : also 2 : if x is A1 and y is B1 then z is C1 fact : x is x̄0 and y is ȳ0 if x is A2 and y is B2 then z is C2 consequence : z is C Then according to the figure we see that A1(x0) = 0.7, B1(y0) = 0.3 therefore, the firing level of the first rule is α1 = min{A1(x0), B1(y0)} = min{0.7, 0.3} = 0.3 and from A2(x0) = 0.6, B2(y0) = 0.8 it follows that the firing level of the second rule is α2 = min{A2(x0), B2(y0)} = min{0.6, 0.8} = 0.6, 8 the individual rule outputs z1 = 8 and z2 = 4 are derived from the equations C1(z1) = 0.3, C2(z2) = 0.6 and the crisp control action is z0 = (8 × 0.3 + 4 × 0.6)/(0.3 + 0.6) = 6. C1 B1 A1 0.7 0.3 0.3 u v B2 A2 u w C2 0.6 0.8 0.6 xo z1 = 8 yo v min z2 = 4 Tsukamoto’s inference mechanism. Sugeno. Sugeno and Takagi use the follow9 w ing architecture 1 : if x is A1 and y is B1 then z1 = a1x + b1y also 2 : if x is A2 and y is B2 then z2 = a2x + b2y fact : x is x̄0 and y is ȳ0 cons. : z0 The firing levels of the rules are computed by α1 = A1(x0)∧B1(y0), α2 = A2(x0)∧B2(y0) then the individual rule outputs are derived from the relationships z1∗ = a1x0 + b1y0, z2∗ = a2x0 + b2y0 and the crisp control action is expressed as α1z1∗ + α2z2∗ z0 = α1 + α2 10 A2 A1 α1 u v a1 x + b 1 y B2 B1 α2 x y u v min a2 x + b 2 y Sugeno’s inference mechanism. If we have n rules in our rule-base then the crisp control action is computed as n ∗ α z i i , z0 = i=1 n α i=1 i where αi denotes the firing level of the i-th rule, i = 1, . . . , n Example 2. We illustrate Sugeno’s reasoning method by the following simple example 11 1 : if x is BIG and y is SMALL then z1 = x + y also 2 : if x is MEDIUM and y is BIG then z2 = 2x − y fact : x0 is 3 and y0 is 2 conseq : z0 Then according to the figure we see that µBIG(x0) = µBIG(3) = 0.8, µSM ALL(y0) = µSM ALL(2) = 0.2 therefore, the firing level of the first rule is α1 = min{µBIG(x0), µSM ALL(y0)} = min{0.8, 0.2} = 0.2 and from µM EDIU M (x0) = µM EDIU M (3) = 0.6, µBIG(y0) = µBIG(2) = 0.9 it follows that the firing level of the second rule is α2 = min{µM EDIU M (x0), µBIG(y0)} 12 = min{0.6, 0.9} = 0.6. the individual rule outputs are computed as z1∗ = x0 + y0 = 3 + 2 = 5, z2∗ = 2x0 − y0 = 2 × 3 − 2 = 4 so the crisp control action is z0 = (5 × 0.2 + 4 × 0.6)/(0.2 + 0.6) = 4.25. 1 0.8 0.2 α1= 0.2 u 1 v x+y=5 0.9 0.6 3 α2=0.6 u 2 v min 2x-y=4 Example of Sugeno’s inference mechanism. Larsen. The fuzzy implication is modelled 13 by Larsen’s prduct operator and the sentence connective also is interpreted as oring the propositions and defined by max operator. Let us denote αi the firing level of the i-th rule, i = 1, 2 α1 = A1(x0) ∧ B1(y0), α2 = A2(x0) ∧ B2(y0). Then membership function of the inferred consequence C is pointwise given by C(w) = (α1C1(w)) ∨ (α2C2(w)). To obtain a deterministic control action, we employ any defuzzification strategy. If we have n rules in our rule-base then the consequence C is computed as n C(w) = (αiC1(w)) i=1 where αi denotes the firing level of the i-th rule, i = 1, . . . , n 14 A1 u v w B2 A2 xo C1 B1 u C2 yo v w min Inference with Larsen’s product operation rule. Simplified fuzzy reasoning 1 : if x is A1 and y is B1 then z1 = c1 also if x is A2 and y is B2 then z2 = c2 2 : fact : x is x̄0 and y is ȳ0 consequence : z0 The firing levels of the rules are computed by 15 α1 = A1(x0) ∧ B1(y0), α2 = A2(x0) ∧ B2(y0) then the individual rule outputs are c1 and c2, and the crisp control action is expressed as α1c1 + α2c2 α1 + α2 If we have n rules in our rule-base then the crisp control action is computed as n αici , z0 = i=1 n i=1 αi where αi denotes the firing level of the i-th rule, i = 1, . . . , n z0 = 16 L1 H2 L3 α1 c1 M1 M2 M3 α2 c2 H1 H3 H2 α3 min 17 z3