Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 3b: Dealing with Uncertainty (Fuzzy Logic)

Slides:



Advertisements
Similar presentations
 Negnevitsky, Pearson Education, Lecture 5 Fuzzy expert systems: Fuzzy inference n Mamdani fuzzy inference n Sugeno fuzzy inference n Case study.
Advertisements

Fuzzy Expert System  An expert might say, “ Though the power transformer is slightly overloaded, I can keep this load for a while”.  Another expert.
AI – CS364 Fuzzy Logic Fuzzy Logic 3 03 rd October 2006 Dr Bogdan L. Vrusias
Lecture 4 Fuzzy expert systems: Fuzzy logic
Fuzzy Logic and its Application to Web Caching
Fuzzy Inference and Defuzzification
Fuzzy Logic The restriction of classical propositional calculus to a two- valued logic has created many interesting paradoxes over the ages. For example,
CLASSICAL LOGIC and FUZZY LOGIC. CLASSICAL LOGIC In classical logic, a simple proposition P is a linguistic, or declarative, statement contained within.
1 Fuzzy Logic Artificial Intelligence for Games Scott Goodwin School of Computer Science See Buckland, Chapter 10.
Chapter 14.7 Russell & Norvig. Fuzzy Sets  Rules of thumb frequently stated in “fuzzy” linguistic terms. John is tall. If someone is tall and well-built.
AI TECHNIQUES Fuzzy Logic (Fuzzy System). Fuzzy Logic : An Idea.
Fuzzy Expert Systems. Lecture Outline What is fuzzy thinking? What is fuzzy thinking? Fuzzy sets Fuzzy sets Linguistic variables and hedges Linguistic.
Fuzzy Sets and Fuzzy Logic Chapter 12 M. Tim Jones See also
FUZZY Logic for Game Programmers
Fuzzy Sets and Fuzzification Michael J. Watts
Approximate Reasoning 1 Expert Systems Dr. Samy Abu Nasser.
ICT619 Intelligent Systems Topic 3: Fuzzy Systems.
Fuzzy Medical Image Segmentation
1 Chapter 18 Fuzzy Reasoning. 2 Chapter 18 Contents (1) l Bivalent and Multivalent Logics l Linguistic Variables l Fuzzy Sets l Membership Functions l.
WELCOME TO THE WORLD OF FUZZY SYSTEMS. DEFINITION Fuzzy logic is a superset of conventional (Boolean) logic that has been extended to handle the concept.
Ming-Feng Yeh General Fuzzy Systems A fuzzy system is a static nonlinear mapping between its inputs and outputs (i.e., it is not a dynamic system).
1 Seventh Lecture Error Analysis Instrumentation and Product Testing.
Introduction What is Fuzzy Logic? HOW DOES FL WORK? Differences between Classical set (crisps) and Fuzzy set theory Example 1 Example 2 Classifying Houses.
Introduction to Fuzzy Logic Control
The Equivalence between fuzzy logic controllers and PD controllers for single input systems Professor: Chi-Jo Wang Student: Nguyen Thi Hoai Nam Student.
Rule-Based Fuzzy Model. In rule-based fuzzy systems, the relationships between variables are represented by means of fuzzy if–then rules of the following.
FUZZY LOGIC Babu Appat. OVERVIEW What is Fuzzy Logic? Where did it begin? Fuzzy Logic vs. Neural Networks Fuzzy Logic in Control Systems Fuzzy Logic in.
CPSC 386 Artificial Intelligence Ellen Walker Hiram College
Fuzzy Logic. Lecture Outline Fuzzy Systems Fuzzy Sets Membership Functions Fuzzy Operators Fuzzy Set Characteristics Fuzziness and Probability.
Fuzzy Rules 1965 paper: “Fuzzy Sets” (Lotfi Zadeh) Apply natural language terms to a formal system of mathematical logic
Fuzzy Logic. WHAT IS FUZZY LOGIC? Definition of fuzzy Fuzzy – “not clear, distinct, or precise; blurred” Definition of fuzzy logic A form of knowledge.
 Definition Definition  Bit of History Bit of History  Why Fuzzy Logic? Why Fuzzy Logic?  Applications Applications  Fuzzy Logic Operators Fuzzy.
3. Rough set extensions  In the rough set literature, several extensions have been developed that attempt to handle better the uncertainty present in.
Fuzzy Inference (Expert) System
Logical Systems and Knowledge Representation Fuzzy Logical Systems 1.
Lógica difusa  Bayesian updating and certainty theory are techniques for handling the uncertainty that arises, or is assumed to arise, from statistical.
Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 3: Dealing with Uncertainty.
Fuzzy Sets and Control. Fuzzy Logic The definition of Fuzzy logic is a form of multi-valued logic derived frommulti-valued logic fuzzy setfuzzy set theory.
Chapter 12 For Explaining Psychological Statistics, 4th ed. by B. Cohen 1 Chapter 12: One-Way Independent ANOVA What type of therapy is best for alleviating.
“Principles of Soft Computing, 2 nd Edition” by S.N. Sivanandam & SN Deepa Copyright  2011 Wiley India Pvt. Ltd. All rights reserved. CHAPTER 12 FUZZY.
Fuzzy systems. Calculate the degree of matching Fuzzy inference engine Defuzzification module Fuzzy rule base General scheme of a fuzzy system.
Fuzzy Inference and Reasoning
Could Be Significant.
INTEGRALS We saw in Section 5.1 that a limit of the form arises when we compute an area. We also saw that it arises when we try to find the distance traveled.
DEALING WITH UNCERTAINTY (2) WEEK 6 CHAPTER 3 1. Bayesian Approaches  Bayesian probability is one of the different interpretations of the concept of.
1 Lecture 4 The Fuzzy Controller design. 2 By a fuzzy logic controller (FLC) we mean a control law that is described by a knowledge-based system consisting.
Lecture 8: Measurement Errors 1. Objectives List some sources of measurement errors. Classify measurement errors into systematic and random errors. Study.
CHAPTER- 3.2 ERROR ANALYSIS. 3.3 SPECIFIC ERROR FORMULAS  The expressions of Equations (3.13) and (3.14) were derived for the general relationship of.
Fuzzy Logic Artificial Intelligence Chapter 9. Outline Crisp Logic Fuzzy Logic Fuzzy Logic Applications Conclusion “traditional logic”: {true,false}
Introduction We learned from last chapter that histogram can be used to summarize large amounts of data. We learned from last chapter that histogram can.
Fuzzy Logic 1. Introduction Form of multivalued logic Deals reasoning that is approximate rather than precise The fuzzy logic variables may have a membership.
Chapter 13 (Continued) Fuzzy Expert Systems 1. Fuzzy Rule-based Expert System 2.
Course : T0423-Current Popular IT III
Introduction to Fuzzy Logic and Fuzzy Systems
Fuzzy Inference System
Artificial Intelligence CIS 342
Artificial Intelligence
Stanisław H. Żak School of Electrical and Computer Engineering
Fuzzy Logic and Fuzzy Sets
Homework 8 Min Max “Temperature is low” AND “Temperature is middle”
Introduction to Fuzzy Logic
Fuzzy logic Introduction 3 Fuzzy Inference Aleksandar Rakić
CLASSICAL LOGIC and FUZZY LOGIC
Dr. Unnikrishnan P.C. Professor, EEE
FUZZIFICATION AND DEFUZZIFICATION
Homework 9 Min Max “Temperature is low” AND “Temperature is middle”
Fuzzy Logic Colter McClure.
Dr. Unnikrishnan P.C. Professor, EEE
Hybrid intelligent systems:
Fuzzy Logic KH Wong Fuzzy Logic v.9a.
Presentation transcript:

Abdul Rahim Ahmad MITM 613 Intelligent System Chapter 3b: Dealing with Uncertainty (Fuzzy Logic)

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

Contents Abdul Rahim Ahmad 3

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

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

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

Crisp Set for temperature Abdul Rahim Ahmad 7

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

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

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

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 °C is 0.25 Medium and 0.75 High

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

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

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.

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

 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  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

 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

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

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

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

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

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

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

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

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

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

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.

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

END Abdul Rahim Ahmad 29