Fuzzy Logic Dave Saad CS498. Origin Proposed as a mathematical model similar to traditional set...

Preview:

Citation preview

Fuzzy Logic

Dave SaadCS498

OriginProposed as a mathematical model similar to traditional set theory but with the possibility of partial set membership by Lotfi A. Zadeh in 1965.Allows for ambiguity or “fuzzy” boundaries of set membership as opposed to “crisp” membership of “in” or “out” of a set

Useful when given inputs are subjective.

Initially Rejected by Math and Science CommunitiesWhile initially rejected in the western world, the idea of embracing ambiguity in a control system was quickly adopted by Japanese Industry and successfully turned into many varied products from rice cookers to subway train controllers.

American Industry followed slowly.

Fuzzy Logic▸ Based on Linguistic Rules of Inference

Modus PonensModus Tollens

▸ Rules of logic developed by ancient Greeks that became the basis of (Aristotelean) western philosophy.

▸ Eastern philosophical thought is more amenable to ambiguity which may explain the early adoption of Fuzzy Logic

Modus Ponens

A conditional Statement and its antecedent:

If P then Q

P is TRUE

Therefore Q is also TRUE

The consequent (Q) is inferred to be TRUE from the truth value of the antecedent (P)

Modus Tollens

A conditional Statement and its antecedent:

If P then QNOT P (or P is FALSE)Therefore Q is also FALSE

The consequent (Q) is inferred to be FALSE from the truth value of the antecedent (P)

Logical Operators▸ NOT (negation

Defined as 1-A

▸ AND (intersection)

Defined as MIN(A,B)

▸ OR (union)

Defined as MAX(A,B)

Other operators are possible but rarely used

Partial Membership

V

ZNS

Rules of Inference

These rules are often based on human instinct and experience.

•If Temperature is COLD then fan speed is STOP

•If Temperature is COOL then fan speed is SLOW

•If Temperature is JUST RIGHT then fan speed is MEDIUM

•If Temperature is WARM then fan speed is FAST

•If Temperature is HOT then fan speed is TORNADO

Execute the Rules

•Rules all fire all the time

•Rules all fire in parallel

•All rules fire to some degree

•Most rules fire to zero degree

•The result is a union of fuzzy results from each rule

Defuzzify The Result Set•Centroid or area under the output set curve

•Computationally intensive

•Mean of Maximum

•Max-membership (height method)

•Weighted Average

•This produces results very close to the COA method and is less computationally intensive

DefuzzificationThe best method is problem dependent..

Four criteria against which to measure the methods:

1. Continuity. A small change in input should produce a small change in the output

2. Disambiguity. Output should resolve to a unique value.

3. Plausibility. Crisp output value should have a high degree of membership.

4. Computational Simplicity. Integrals are hard to do on a 8-bit microcontroller.

Summary

1. Fuzzification of inputs

2. Choose linguistic variables and terms and associated fuzzy sets

3. Build rules of inference

4. Defuzzification