Chapter 13 Continued Fuzzy Expert Systems 1 Fuzzy

  • Slides: 28
Download presentation
Chapter 13 (Continued) Fuzzy Expert Systems 1

Chapter 13 (Continued) Fuzzy Expert Systems 1

Fuzzy Rule-based Expert System 2

Fuzzy Rule-based Expert System 2

Fuzzy Rule-based Expert System 3

Fuzzy Rule-based Expert System 3

Fuzzy Rules • In 1973, Lotfi Zadeh published his second most influential paper. •

Fuzzy Rules • In 1973, Lotfi Zadeh published his second most influential paper. • He suggested capturing human knowledge in fuzzy rules. • A fuzzy rule can be defined as a conditional statement in the form: IF x is A, THEN y is B • where – x and y are linguistic variables; – A and B are linguistic values determined by fuzzy sets on the universe of discourses X and Y, respectively. – Antecedent (or condition): x is A – Consequent (or conclusion): y is B 4

Classical vs. Fuzzy Rules • Classical rule: Rule 1: IF speed is > 100

Classical vs. Fuzzy Rules • Classical rule: Rule 1: IF speed is > 100 (km/h) THEN stopping_distance is > 100 m • Rule 2: IF speed is < 40 (km/h) THEN stopping_distance is < 40 m Fuzzy rule: Rule 1: IF speed is fast THEN stopping_distance is long • Fuzzy rules relate fuzzy sets. • In a fuzzy system, all rules fire partially. Rule 2: IF speed is slow THEN stopping_distance is short 5

Firing Fuzzy Rules IF height is tall THEN weight is heavy 6

Firing Fuzzy Rules IF height is tall THEN weight is heavy 6

Firing Fuzzy Rules • If the antecedent is true to some degree of membership,

Firing Fuzzy Rules • If the antecedent is true to some degree of membership, then the consequent is also true to that same degree. • This form of fuzzy inference is called monotonic selection. 7

Firing Fuzzy Rules • • A fuzzy rule can have multiple antecedents, for example:

Firing Fuzzy Rules • • A fuzzy rule can have multiple antecedents, for example: IF AND THEN project_duration is long project_staffing is large project_funding is inadequate risk is high IF OR THEN service is excellent food is delicious tip is generous The consequent of a fuzzy rule can also include multiple parts, for instance: IF THEN • temperature is hot_water is reduced; cold_water is increased Solutions: Mamdani or Sugeno approaches 8

Fuzzy Inference Techniques • Mamdani – The most commonly used fuzzy inference technique –

Fuzzy Inference Techniques • Mamdani – The most commonly used fuzzy inference technique – He built one of the first fuzzy systems to control a steam engine – He applied a set of fuzzy rules supplied by experienced human operators. – E. Mamdani, “Application of fuzzy algorithms for control of simple dynamic plant” (Proc. IEE, Vol. 121, No. 12, pp. 1585 -1588, 1974) – E. Mamdani and S. Assilian, “An experiment in linguistic synthesis with a fuzzy logic controller”, (Int. J. of Man-Machine Studies, Vol. 7, No. 1, pp. 113, 1975) • Sugeno – The ‘Zadeh of Japan’ – Sugeno, Michio. ”Industrial applications of fuzzy control, ” Elsevier Science Inc. , 1985. 9

Mamdani Fuzzy Inference • four steps: 1. 2. 3. 4. Fuzzification of the input

Mamdani Fuzzy Inference • four steps: 1. 2. 3. 4. Fuzzification of the input variables Rule evaluation (inference) Aggregation of the rule outputs (composition) Defuzzification. 10

Mamdani Fuzzy Inference We examine a simple two-input one-output problem that includes three rules:

Mamdani Fuzzy Inference We examine a simple two-input one-output problem that includes three rules: Rule: 1 IF x is A 3 OR y is B 1 THEN z is C 1 Rule: 1 IF project_funding is adequate OR project_staffing is small THEN risk is low Rule: 2 IF x is A 2 AND y is B 2 THEN z is C 2 Rule: 2 IF project_funding is marginal AND project_staffing is large THEN risk is normal Rule: 3 IF x is A 1 THEN z is C 3 Rule: 3 IF project_funding is inadequate THEN risk is high 11

Step 1: Fuzzification • Take the crisp inputs, x 1 and y 1 (project

Step 1: Fuzzification • Take the crisp inputs, x 1 and y 1 (project funding and project staffing; e. g. x 1=2 million, y 1: 10 persons), and determine the degree to which these inputs belong to each of the appropriate fuzzy sets. A 1: Inadequate, A 2: Marginal, A 3: Adequate B 1: Small, B 2: Large 12

Step 2: Rule Evaluation • Take the fuzzified inputs, (x=A 1) = 0. 5,

Step 2: Rule Evaluation • Take the fuzzified inputs, (x=A 1) = 0. 5, (x=A 2) = 0. 2, (y=B 1) = 0. 1 and (y=B 2) = 0. 7, and apply them to the antecedents of the fuzzy rules. • If a given fuzzy rule has multiple antecedents, the fuzzy operator (AND or OR) is used to obtain a single number that represents the result of the antecedent evaluation. • This number (the truth value) is then applied to the consequent membership function. (monotonic selection) 13

Step 2: Rule Evaluation 14

Step 2: Rule Evaluation 14

Step 2: Rule Evaluation • How the result of the antecedent evaluation can be

Step 2: Rule Evaluation • How the result of the antecedent evaluation can be applied to the membership function of the consequent? – Clipping (alpha-cut) • • • Cut the consequent membership function at the level of the antecedent truth. losing some information. it is often preferred because it involves less complex and faster mathematics – Scaling • • • offers a better approach for preserving the original shape of the fuzzy set. Multiplying all its membership degrees by the truth value of the rule antecedent. It loses less information 15

Step 2: Rule Evaluation clipping scaling 16

Step 2: Rule Evaluation clipping scaling 16

Step 3: Aggregation of the rule outputs • The process of unification of the

Step 3: Aggregation of the rule outputs • The process of unification of the outputs of all rules. • Combining with MAX operator 17

Step 4: Defuzzification • Input: the aggregate output fuzzy set • Output: a single

Step 4: Defuzzification • Input: the aggregate output fuzzy set • Output: a single number • The most popular method: – Centroid technique. – It finds the point where a vertical line would slice the aggregate set into two equal masses. – Mathematically, it’s the center of gravity (COG) 18

Step 4: Defuzzification • A reasonable estimate can be obtained by calculating it over

Step 4: Defuzzification • A reasonable estimate can be obtained by calculating it over a sample of points. 19

Step 4: Defuzzification 20

Step 4: Defuzzification 20

Mamdani Inference Technique 21

Mamdani Inference Technique 21

Sugeno Fuzzy Inference • In Mamdani-style inference, to find the centroid, an integration across

Sugeno Fuzzy Inference • In Mamdani-style inference, to find the centroid, an integration across a continuously varying function is required. no computationally efficient! • Michio Sugeno suggested to use a single spike, a singleton • Fuzzy Rules in zero-order Sugeno fuzzy model: IF AND THEN x is A y is B z is k where k is a constant. 22

Sugeno Rule Evaluation 23

Sugeno Rule Evaluation 23

Sugeno Aggregation of the Rule Outputs Rule 1: IF project_funding is adequate OR project_staffing

Sugeno Aggregation of the Rule Outputs Rule 1: IF project_funding is adequate OR project_staffing is small, THEN risk is k 1 Rule 2: IF project_funding is marginal AND project_staffing is large, THEN risk is k 2 Rule 3: IF project_funding is inadequate, THEN risk is k 3 24

Sugeno Defuzzification Weighted Average (WA) Suppose: k 1=20, k 2=50, k 3=80 25

Sugeno Defuzzification Weighted Average (WA) Suppose: k 1=20, k 2=50, k 3=80 25

Sugeno Inference Technique 26

Sugeno Inference Technique 26

Mamdani or Sugeno? • Mamdani – widely accepted for capturing expert knowledge – more

Mamdani or Sugeno? • Mamdani – widely accepted for capturing expert knowledge – more intuitive, more human-like manner – a substantial computational burden • Sugeno – computationally effective – works well with optimization and adaptive techniques – e. g. control problems, particularly for dynamic nonlinear systems. 27

Advantages and Problems of Fuzzy Logic • advantages – general theory of uncertainty –

Advantages and Problems of Fuzzy Logic • advantages – general theory of uncertainty – wide applicability, many practical applications – natural use of vague and imprecise concepts • helpful for commonsense reasoning, explanation • problems – membership functions can be difficult to find – multiple ways for combining evidence – problems with long inference chains 28