Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

1 1 Chapter 18 Fuzzy Reasoning

2 2 Chapter 18 Contents (1) l Bivalent and Multivalent Logics l Linguistic Variables l Fuzzy Sets l Membership Functions l Fuzzy Set Operators l Hedges

3 3 Chapter 18 Contents (2) l Fuzzy Logic l Fuzzy Rules l Fuzzy Inference l Fuzzy Expert Systems l Neuro-Fuzzy Systems

4 4 Bivalent and Multivalent Logics l Bivalent (Aristotelian) logic uses two logical values – true and false. l Multivalent logics use many logical values – often in a range of real numbers from 0 to 1. l Important to note the difference between multivalent logic and probability – P(A) = 0.5 means that A may be true or may be false – a logical value of 0.5 means both true and false at the same time.

5 5 Linguistic Variables l Variables used in fuzzy systems to express qualities such as height, which can take values such as “tall”, “short” or “very tall”. l These values define subsets of the universe of discourse.

6 6 Fuzzy Sets l A crisp set is a set for which each value either is or is not contained in the set. l For a fuzzy set, every value has a membership value, and so is a member to some extent. l The membership value defines the extent to which a variable is a member of a fuzzy set. l The membership value is from 0 (not at all a member of the set) to 1.

7 7 Membership function for the Fuzzy Set of Tall People l1l1 8 ft

8 8 Membership Functions l The following function defines the extent to which a value x is a member of fuzzy set B: l This function would be stored in the computer as: B = {(0, 1), (2, 0)} l This function could represent, for example, the extent to which a person can be considered a baby, based on their age.

9 9 Fuzzy Set Membership Functions l If we use M b (x) and M c (x) to represent the membership functions for baby and child respectively, we can write : l 1 – x/2 for x <= 2 l M b (x) = 0 for x >2 l (x-1)/6 for x <= 7 l M c (x) = 1 for x > 7 and x <= 8 l (14 – x)/6 for x >8

10 10 How to represent a fuzzy set in computers? l We use a list of pairs and each pair represent a value and the fuzzy membership value for that value. l For example: l A = { (x 1, M A (x 1 ),…, (x n, M A (x n )} l The fuzzy set of babies then can be: l B = {(0,1), (2, 0)}

11 11 Crisp Set Operators l Not A – the complement of A, which contains the elements which are not contained in A. l A  B – the intersection of A and B, which contains those elements which are contained in both A and B. l A  B – the union of A and B which contains all the elements of A and all the elements of B. l Fuzzy sets use the same operators, but the operators have different meanings.

12 12 Fuzzy Set Operators l Fuzzy set operators can be defined by their membership functions n M ¬A (x) = 1 - M A (x) nM A  B (x) = MIN (M A (x), M B (x)) nM A  B (x) = MAX (M A (x), M B (x)) l We can also define containment (subset operator): n B  A iff  x (M B (x)  M A (x))

13 13 Hedges l A hedge is a qualifier such as “very”, “quite”, “somewhat” or “extremely”. l When a hedge is applied to a fuzzy set it creates a new fuzzy set. l Mathematic functions are usually used to define the effect of a hedge. l For example, “Very” might be defined as: nM VA (x) = (M A (x)) 2

14 14 Fuzzy Logic l It is a form of logic that applies to fuzzy variables. l It is non-monotonic, meaning: l If a new fuzzy fact is added to a database, this fact may contradict conclusions that previously derived from the database.

15 15 Fuzzy Logic l Each fuzzy variable can take a value from 0 (not at all true) to 1 (entirely true) l The values can be any real value between 0 and 1.

16 16 Fuzzy Logic l A non-monotonic logical system that applies to fuzzy variables. l We use connectives defined as: n A V B  MAX (A, B) n A Λ B  MIN (A, B) n¬A  1 – A l We can also define truth tables:

17 17 Fuzzy Inference l Inference is harder to manage. l Since: A  B  ¬A V B l Hence, we might define fuzzy inference as: A  B  MAX ((1 – A), B) l This gives the unintuitive truth table shown on the right. l This gives us 0.5  0 = 0.5, where we would expect 0.5  0 = 0

18 18 Fuzzy Inference l An alternative is Gödel implication, which is defined as: A  B  (A ≤ B) V B l This gives a more intuitive truth table.

19 19 l i.e. for some d ∈ M, R(a, d) → l A(d) = 0. It follows R(a, d) > 0 and A(d) = 0 (Godel implication!). Then l R(a, d) ∧ ¬A(d) = R(a, d) ∧ 1 = R(a, d) > 0, thus (R(a, d) ∧ ¬A(d) = 0 l and (¬ ∃ R.¬C)(a) = 0, thus our concept has value 0, a contradiction.

20 20 Fuzzy Rules l Fuzzy rule has the form of: l If A = x then B =y or more general, l If A op x then B = y l Here, op is some mathematical operator, such as =, >, <, …,

21 21

22 22 Fuzzy Inference (3) l Mamdani inference derives a single crisp value by applying fuzzy rules to a set of crisp input values. Step 1: Fuzzify the inputs. Step 2: Apply the inputs to the antecedents of the fuzzy rules to obtain a set of fuzzy outputs. Step 3: Convert the fuzzy outputs to a single crisp value using defuzzification.

23 23 Fuzzy Rules l A fuzzy rule takes the following form: IF A op x then B = y l op is an operator such as >, < or =. l For example: IF temperature > 50 then fan speed = fast IF height = tall then trouser length = long IF study time = short then grades = poor

24 24 Fuzzy Expert Systems l A fuzzy expert system is built by creating a set of fuzzy rules, and applying fuzzy inference. l In many ways this is more appropriate than standard expert systems since expert knowledge is not usually black and white but has elements of grey. l The first stage in building a fuzzy expert system is choosing suitable linguistic variables. l Rules are then generated based on the expert’s knowledge, using the linguistic variables.

25 25 Neuro-Fuzzy Systems l A fuzzy neural network is usually a feed- forward network with five layers: 1. Input layer – receives crisp inputs 2. Fuzzy input membership functions 3. Fuzzy rules 4. Fuzzy output membership functions 5. Output layer – outputs crisp values

26 26 Applications of Fuzzy Logic l Examples where fuzzy logic is used l Automobile subsystems, such as ABS and cruise control l Air conditioners l The MASSIVE engine used in the Lord of the Rings films, which helped show huge scale armies create random, yet orderly movements l Cameras l Digital image processing l Dishwashers l Elevators l Washing machines and other home appliances. l Video game artificial intelligence

27 27 Some Misconceptions on Fuzzy Logic l Fuzzy logic has suffered many misconceptions, partly due to its name. "Fuzzy" often has negative connotations, either suggesting something cute or something imprecise; the latter sometimes causes people to equate "fuzzy logic" with "imprecise logic".

28 28 l However, fuzzy logic is not any less precise than any other form of logic: it is an organized and mathematical method of handling inherently imprecise concepts. l The concept of "coldness" cannot be expressed in an equation, because although temperature is a quantity, "coldness" is not. l However, people have an idea of what "cold" is, and agree that something cannot be "cold" at N degrees but "not cold" at N+1 degrees — a concept classical logic cannot easily handle due to the principle of bivalence.

29 29 l Another common misconception is that fuzzy logic is a new way of expressing probability. l However, Bart Kosko has shown that probability is a subtheory of fuzzy logic, as probability only handles one kind of uncertainty. l He also proved a theorem demonstrating that Bayes' theorem can be derived from the concept of fuzzy subsethood.Bayes' theorem l This should not by any means suggest that all those who study probability accept or even understand fuzzy logic, however: to many, fuzzy logic is still a curiosity.

30 30 l Fuzzy logic is also sometimes said to be used only in AI, control systems, and/or expert systems (note that these fields can have significant overlap). l These are by far the most common applications, but by no means the only possible: fuzzy logic can be applied in any situation requiring the handling of uncertainty.


Download ppt "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."

Similar presentations


Ads by Google