Download presentation
Presentation is loading. Please wait.
Published byErin Horton Modified over 9 years ago
1
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 3b: Dealing with Uncertainty (Fuzzy Logic)
2
Contents Possibility theory: fuzzy sets and fuzzy logic Abdul Rahim Ahmad 2
3
Contents Abdul Rahim Ahmad 3
4
Possibility theory: fuzzy sets and fuzzy logic 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. Abdul Rahim Ahmad 4
5
Crisp vs Fuzzy Sets 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. Abdul Rahim Ahmad 5
6
Conventional Set Theory 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. Abdul Rahim Ahmad 6
7
Crisp Set for temperature Abdul Rahim Ahmad 7
8
Fuzzy Set 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. Abdul Rahim Ahmad 8
9
Membership Function 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: Abdul Rahim Ahmad 9 μ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
10
Crisp Set vs Fuzzy Set 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 Abdul Rahim Ahmad 10
11
Fuzzy Set 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. Abdul Rahim Ahmad 11 350°C is 0.25 Medium and 0.75 High
12
Terminologies Terminologies of fuzzy sets: fuzzy set - low temperature fuzzy variable - temperature fuzzy statement - temperature is low Abdul Rahim Ahmad 12
13
Crisp Rules vs Fuzzy Rules 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. Abdul Rahim Ahmad 13
14
Crisp Rules vs Fuzzy Rules Abdul Rahim Ahmad 14 CRISP RULESFUZZY RULES Variable value change in steps as different rules fire. Input variable values alter, causing smooth changes in the outputs. To smooth the steps require many rules. Require not as many rules. (depends on the no. of variables, the no. of fuzzy sets, and the ways in which the variables are combined in the fuzzy rule conditions). Numerical information is explicit e.g Numerical information is implicit in the chosen shape of the fuzzy membership functions.
15
Example 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. Abdul Rahim Ahmad 15
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, μ HP and μ MP, are set as follows: μ HP = max[μ HT, μ HP ] μ MP = max[μ MT, μ MP ] Abdul Rahim Ahmad 16
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 17
18
Compound Conditions 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: Abdul Rahim Ahmad 18
19
Example: AND Conjunction 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. Abdul Rahim Ahmad 19
20
Example: OR Disjunction 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 Abdul Rahim Ahmad 20
21
Dependent OR 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: Abdul Rahim Ahmad 21
22
Example DOR vs OR 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. Abdul Rahim Ahmad 22
23
Defuzzification 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. Abdul Rahim Ahmad 23
24
Defuzzification 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 Abdul Rahim Ahmad 24
25
Defuzzification - Stage 1 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 Abdul Rahim Ahmad 25
26
Defuzzification - Stage 1 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) Abdul Rahim Ahmad 26
27
Defuzzification – Stage 2 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 Abdul Rahim Ahmad 27 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.
28
Defuzzification – Stage 2 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. Abdul Rahim Ahmad 28
29
END Abdul Rahim Ahmad 29
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.