Presentation is loading. Please wait.

Presentation is loading. Please wait.

Fuzzy Logic Jan Jantzen 2013 Logic is based on set theory, and when we switch to fuzzy sets it will have an effect on.

Similar presentations


Presentation on theme: "Fuzzy Logic Jan Jantzen 2013 Logic is based on set theory, and when we switch to fuzzy sets it will have an effect on."— Presentation transcript:

1 Fuzzy Logic Jan Jantzen jj@inference.dk www.inference.dk 2013 Logic is based on set theory, and when we switch to fuzzy sets it will have an effect on logic.

2 Summary Fuzzy logic is computing with words (Zadeh) Approximate reasoning Consistency 2 Computers can make decisions even with statements that are true to a degree between 0 and 1 If we build a logic on fuzzy sets, will the usual laws still hold? Intelligent computers

3 3 Inference by Computer If room is warm then set cooling power to 500 watts Temperature is 21 deg C Cooling = 250 watts If T > 21 C then Cooling = on If T ≤ 21 C then Cooling = off Fuzzy controller Classical controller

4 4 Key Concepts And, or, not, nor, xor, etc. implication*, equivalence* rules of inference*, tautologies* *) difficult

5 5 Fuzzy reasoning: True Love Wife: Do you love me? Husband (Boolean logician): Yes. Wife: How much?

6 6 FAQ: Why fuzzy logic? A: It is tolerant Mathematically consistent (almost) Operational (= executable by computers) A way to communicate with computers

7 7 Example: Betting On Baseball If either the Pirates or the Cubs loose and the Giants win, then the Dodgers will be out of first place, and I will loose a bet. ((  p   c)  g)  (  d   b) This expression can be programmed on a computer.

8 8 Exhaustive Search Solution 2 5 = 32 possible combinations 23 legal combinations, 9 illegal 10 possible cases where I will win the bet (b=1) pcgdb 00001 00011 01001 01011 10001 10011 11001 11011 11101 11111 The validity is guaranteed !

9 BOOLEAN LOGIC 9

10 10 Define disjunction (OR) Truth table

11 11 Boolean OR as a Cayley Table It contains the same information, only reorganised into a two-dimensional array.

12 12 Define negation (NOT)  p = 1 - p   p = p The law of involution is valid If p is 0 then 'not p' = 1, and if p is 1 then 'not p' = 0.

13 13 Assume DeMorgan's Laws These two laws provide a connection between AND and OR by means of negation.

14 14 Derive NAND The left hand side is clearly 'not AND', which is NAND. The right hand side contains only OR and NOT, which we have already defined previously. We have thus derived a new operation based on existing definitions.

15 15 NAND table Example. Suppose p = 0 and q = 0, corresponding to the upper left cell. Then NOT p = 1 and NOT q = 1. Use the previously defined OR table to find the result 1, which is the truth value in the upper left cell.

16 16 Derive conjunction (AND) The left hand side is obviously AND. The right hand side is the negation of NAND, which is also AND. It contains only OR and NOT, which we have already defined previously. We have again derived a new operation based on existing definitions.

17 17 AND table We get this from the NAND table by negating the content of all cells.

18 Short recap Starting from OR, NOT, and DeMorgan's laws, we derived NAND and AND (and also NOR, not shown but easy; even XOR could be derived in a similar manner) 18

19 19 Fuzzy OR We work with only three truth values 0, 0.5 and 1 to preserve space. Actually, these three are sufficient representatives of all truth values, as long as we only work with AND, OR, and NOT.

20 20 Fuzzy OR as a Cayley Table It contains the same information, only reorganised into a two-dimensional array.

21 21 Derive fuzzy NAND We do exactly as before in order to find the contents of the cells.

22 22 Derive fuzzy AND Again, we get this from the NAND table by negating the content of each cell.

23 Short recap When fuzzy OR is defined as MAX, then the derived fuzzy AND is consistent with MIN (we could go on and derive fuzzy NOR and fuzzy XOR) 23

24 24 Fuzzy Baseball Example If either the Pirates or the Cubs loose and the Giants win, then the Dodgers will be out of first place, and I will loose a bet. ((  p   c)  g)  (  d   b)

25 25 Exhaustive Search Solution 3 5 = 243 (was 32) possible combinations 33 (was 10) possible cases where I will win the bet (b = 1) pcgdb 0.5 011 One example of a winning outcome: Could be interpreted as 'maybe'

26 Triangular Norms 26 If we define AND as product (×), instead of min, then OR must be 'probabilistic sum' in order to keep the DeMorgan laws satisfied. In that case, we go through the previously developed scheme again in order to derive the remaining operations. Candidates for AND. OR candidates are called triangular conorms.

27 27 Summary Fuzzy and, or, not, nor, etc. can be defined in a consistent manner (DeMorgans laws hold).

28 28 Applications Automatic control, robots Expert systems Medical diagnosis Financial decision support Image processing Intelligent computers


Download ppt "Fuzzy Logic Jan Jantzen 2013 Logic is based on set theory, and when we switch to fuzzy sets it will have an effect on."

Similar presentations


Ads by Google