1 / 29

MITM 613 Intelligent System

MITM 613 Intelligent System. Chapter 3b: Dealing with  Uncertainty (Fuzzy Logic). Possibility theory: fuzzy sets and fuzzy logic. Contents. Contents. Note that: Bayesian updating and certainty theory - from statistical variations or randomness.

tameka
Download Presentation

MITM 613 Intelligent System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MITM 613Intelligent System Chapter 3b: Dealing with  Uncertainty(Fuzzy Logic)

  2. Possibility theory: fuzzy sets and fuzzy logic Contents Abdul Rahim Ahmad

  3. Contents Abdul Rahim Ahmad

  4. Note that: Bayesian updating and certainty theory - from statistical variations or randomness. Possibility theory handles vagueness in the use of language. Also called fuzzy logic Developed by Lotfi Zadeh, Iranian American. Builds upon his theory of fuzzy sets. Possibility theory: fuzzy sets and fuzzy logic Abdul Rahim Ahmad

  5. Fuzzy sets might be applied in handling uncertainties caused by the use of vague language. • Examples of vague language phrases: • water level is low. • temperature is high. • pressure is high. Crisp vs Fuzzy Sets Abdul Rahim Ahmad

  6. In Conventional set theory: • The Set Temperature = {high, medium, low} • Elements of the set is mutually exclusive. • If a temperature value (say 300°C) is considered high, it cannot be medium or low. • Values are crisp or non-fuzzy • If the boundary between medium and high is 300°C, then • 301°C is high • 299°C is medium. • This is a rather artificial distinction • A small change of 2°C from 299°C to 301°C completely change the rule-firing • A huge change of 699°C from 301°C to 1000°C has no effect at all. Conventional Set Theory Abdul Rahim Ahmad

  7. Crisp Set for temperature Abdul Rahim Ahmad

  8. Fuzzy sets smooth the boundaries. • Fuzzy set theory expresses imprecision quantitatively • Use characteristic membership functions with degrees of membership from 0 (“not a member”) through to 1 (“a full member”). • For a fuzzy set F, the membership function μF (x) measures the degree to which an absolute value x belongs to F (possibility that x is described by F) • The process of Getting the membership function or deriving these possibility values for a given value of x is called fuzzification. Fuzzy Set Abdul Rahim Ahmad

  9. If we are given an imprecise statement that the temperature is low. If LT is the fuzzy set of low temperatures, then we might define the membership function μLT such that: Membership Function μLT (250°C) = 0.0 μLT (200°C) = 0.0 μLT (150°C) = 0.25 μLT (100°C) = 0.5 μLT (50°C) = 0.75 μLT (0°C) = 1.0 μLT (–50°C) = 1.0 Abdul Rahim Ahmad

  10. The key characteristics of fuzzy sets (that makes it different from crisp sets) are that: • an element has a degree of membership (0–1) of a fuzzy set; • membership of one fuzzy set does not preclude membership of another Crisp Set vs Fuzzy Set Abdul Rahim Ahmad

  11. Temperature 350°C may have some (non-zero) degree of membership to both fuzzy sets high and medium. This is represented by the overlap between the fuzzy sets. Sum of the membership functions for a given value can be arranged to equal 1. Fuzzy Set 350°C is 0.25Medium and 0.75 High Abdul Rahim Ahmad

  12. Terminologies of fuzzy sets: • fuzzy set - low temperature • fuzzy variable - temperature • fuzzy statement - temperature is low Terminologies Abdul Rahim Ahmad

  13. In crisp rules • If a variable is set to a value, the value will change in steps as different rules fire. • To smooth the steps need to have many rules. • Numerical information is explicit e.g., IF temperature > 300°C THEN ... • In Fuzzy Rules • only a small number of fuzzy rules is required to produce smooth changes in the outputs as the input values alter. • The number of fuzzy rules is dependent on the number of variables, the number of fuzzy sets, and the ways in which the variables are combined in the fuzzy rule conditions. • Numerical information is implicit in the chosen shape of the fuzzy membership functions. Crisp Rules vs Fuzzy Rules Abdul Rahim Ahmad

  14. Crisp Rules vs Fuzzy Rules Abdul Rahim Ahmad

  15. Assume a rule base that contains the following fuzzy rules: /* Rule 3.6f */ IF temperature is high THEN pressure is high /* Rule 3.7f */ IF temperature is medium THEN pressure is medium /* Rule 3.8f */ IF temperature is low THEN pressure is low • Suppose temperature is 350°C. • This is a member of both fuzzy sets high and medium • Rules 3.6f and 3.7f will both fire. • The pressure, will be somewhat high and somewhat medium. Example Abdul Rahim Ahmad

  16. Using the membership functions for temperature given; • the possibility that the temperature is high, μHT, is 0.75 • the possibility that the temperature is medium, μMT, is 0.25. • As a result of firing the rules, the possibilities that the pressure is high and medium, μHPand μMP, are set as follows: • μHP= max[μHT, μHP] • μMP = max[μMT, μMP] Abdul Rahim Ahmad

  17. The initial possibility values for pressure are assumed to be zero if these are the first rules to fire, and thus µHP and µMP become 0.75 and 0.25, respectively. These values can be passed on to other rules that might have pressure is high or pressure is medium in their condition clauses. Abdul Rahim Ahmad

  18. Rules 3.6f, 3.7f and 3.8f contain only simple conditions. Fuzzy logic allows for compound conditions similar to those in certainty theory discussed earlier. The formulas for conjunction, disjunction, and negation are: Compound Conditions Abdul Rahim Ahmad

  19. Suppose water level has the fuzzy membership functions shown below • Suppose also that Rule 3.6f is redefined as follows: /* Rule 3.9f */ IF temperature is high AND water level is NOT low THEN pressure is high • For a water level of 1.2m, • the possibility of the water level being low, µLW(1.2m), is 0.6. • The possibility of the water level not being low is therefore 0.4. • As this is less than 0.75, the combined possibility for the temperature being high and the water level not being low is 0.4. • Thus the possibility that the pressure is high, µHP, becomes 0.4 if it has not already been set to a higher value. Example: AND Conjunction Abdul Rahim Ahmad

  20. If several rules affect the same fuzzy set of the same variable, they are equivalent to a single rule whose conditions are joined by the disjunction OR. • For example, these two rules: /* Rule 3.6f */ IF temperature is high THEN pressure is high /* Rule 3.10f */ IF water level is high THEN pressure is high • are equivalent to this single rule: /* Rule 3.11f */ IF temperature is high OR water level is high THEN pressure is high Example: OR Disjunction Abdul Rahim Ahmad

  21. We can treat OR differently when it involves two fuzzy sets of the same fuzzy variable, for example, high and medium temperature. • In such cases, the memberships are clearly dependent on each other. Therefore, we can introduce a new operator DOR for dependent OR. • For example, given the rule: /* Rule 3.12f */ IF temperature is low DOR temperature is medium THEN pressure is lowish • the combined possibility for the condition becomes: Dependent OR Abdul Rahim Ahmad

  22. Given the fuzzy sets for temperature as below left, the combined possibility would be the same for any temperature below 200°C, as shown below right. This is consistent with the intended meaning of fuzzy Rule 3.12f. If the OR operator had been used, the membership would dip between 0°C and 200°C, with a minimum at 100°C, as shown below. Example DOR vs OR Abdul Rahim Ahmad

  23. At 350°C µHP = 0.75, µMP = 0.25, µLP = 0. (by rule below, See slide 15) /* Rule 3.6f */ IF temperature is high THEN pressure is high /* Rule 3.7f */ IF temperature is medium THEN pressure is medium • These values can be passed on to other rules that might have pressure is high or pressure is medium in their condition clauses without any further manipulation. • However, to interpret the membership values in numerical value of pressure, they need to be defuzzified. • Defuzzification is important especially if a control action must be performed like “set current,” where a specific value setting is required. Defuzzification Abdul Rahim Ahmad

  24. Defuzzification takes place in two stages, described below. • Stage 1: scaling the membership functions • adjust the fuzzy sets in accordance with the calculated possibilities • Stage 2: finding the centroid Defuzzification Abdul Rahim Ahmad

  25. Larsen’s product operation rule - the membership functions are multiplied by their respective possibility values. The effect is to compress the fuzzy sets so that the peaks equal the calculated possibility values Alternative approach - truncate the fuzzy sets Defuzzification - Stage 1 Abdul Rahim Ahmad

  26. For most shapes of fuzzy set, the difference between the two approaches is small But Larsen’s product operation rule has the advantages of simplifying the calculations and allowing fuzzification followed by defuzzification to return the initial value (except as described in a defuzzification anomaly) Defuzzification - Stage 1 Abdul Rahim Ahmad

  27. Centroid method • The most commonly used method • sometimes called the center of gravity, center of mass, or center of area method. • Defuzzified value = the point along the fuzzy variable axis that is the centroid, or balance point, of all the scaled membership functions taken together for that variable Defuzzification – Stage 2 • Imagine the cut out from stiff card and pasted together with overlap. • Defuzzified value = the balance point along the fuzzy variable axis of this composite shape. • When two membership functions overlap, both overlapping regions contribute to the mass of the composite shape. Abdul Rahim Ahmad

  28. If there are N membership functions with centroids ci, and areas ai, then the combined centroid C, i.e., the defuzzified value, is: • Using Larsen’s product operation rule: • the values of ci are unchanged from the centroids of the uncompressed shapes • Ci and ai is simply PiAi where Ai is the area of the membership function prior to compression. • Using the truncation method • The centroid of asymmetrical membership functions is shifted along the fuzzy variable axis • The use of triangular membership functions/other simple geometries simplifies the calculations. • For triangular membership functions, Ai is one half of the base length multiplied by the height. • For isosceles triangles Ci is the midpoint along the base, • For rightangle triangles Ci is approx. 29% of the base length from the upright. Defuzzification – Stage 2 Abdul Rahim Ahmad

  29. END Abdul Rahim Ahmad

More Related