White Blue and Lightnings by sdfwerte

VIEWS: 5 PAGES: 36

									Intelligent Sensor Fusion -
         ENG4083M

        Fuzzy Logic 1
                 Overview
•   Background
•   An introductory example
•   Fuzzy vs. non-fuzzy
•   Foundations of fuzzy logic
              Background
•   What is fuzzy logic?
•   Why use fuzzy logic?
•   When not to use fuzzy logic
         What is fuzzy logic?
“As complexity rises, precise statements lose
  meaning and meaningful statements lose
  precision.”
                                  Lotfi Zadeh
Precision v significance
Input – output map
         Why use fuzzy logic?
•   Conceptually easy to understand
•   Flexible
•   Tolerant of imprecise data
•   Can model non-linear functions
•   Can be based on the experience of experts
•   Can be blended with conventional techniques
•   Is based on natural language
    When not to use fuzzy logic
•   Fuzzy logic is not a cure-all
•   If you find it's not convenient, try
    something else
•   If a simpler solution already exists, use it
         An introductory example
•   The basic tipping problem:
     –    Given a number between 0 and 10 that
          represents the quality of service at a
          restaurant (where 10 is excellent), what
          should the tip be?
•   Extension:
     –    Additionally given a number between 0
          and 10 that represents the quality of food
          at a restaurant (where 10 is excellent),
          what should the tip be?
    The non-fuzzy approach - 1
•   Derive a simple linear formula based on
    typical percentage tip for good food and
    service
•   See Toolbox documentation for details
The non-fuzzy approach - 2
       The fuzzy approach - 1
•   Choose a set of natural language rules
    that describe your basic approach to
    tipping e.g.

     IF service is poor OR food is
        rancid
     THEN tip is cheap
  The fuzzy approach - 2
IF service is poor OR food is rancid
THEN tip is cheap


IF service is good
THEN tip is average


IF service is excellent OR food is
   delicious
THEN tip is generous
The fuzzy approach - 3
    Foundations of fuzzy logic
•   Fuzzy sets
•   Membership functions
•   Logical operations
•   If-then rules
Example of a normal set
Example of a fuzzy set
Two valued logic   Multi-valued logic
      Membership functions
•   A membership function (MF) is a curve
    that defines how each point in the
    input space is mapped to a
    membership value (or degree of
    membership) between 0 and 1
•   The input space is sometimes referred
    to as the universe of discourse, a
    fancy name for a simple concept
Membership functions
height – crisp membership
Membership functions
 height – crisp membership
Membership functions
 height – fuzzy membership
Example membership functions




        Triangle MF (trimf)
Example membership functions




      Trapizoidal MF (trapmf)
Example membership functions




        Sigmoid MF (sigmf)
Example membership functions




     Double Sigmoid MF (dsigmf)
              Summary so far
•   Fuzzy sets describe vague concepts (hot weather,
    weekend days)
•   A fuzzy set admits the possibility of partial
    membership in it (Friday is sort of a weekend day)
•   The degree an object belongs to a fuzzy set is
    denoted by a membership value between 0 and 1.
    (Friday is a weekend day to the degree 0.8)
•   A membership function associated with a given
    fuzzy set maps an input value to its appropriate
    membership value
          Logical operations
Fuzzy logic operations are a superset of
 normal Boolean logic shown below:
           Logical operations
There are a number of possible implementations
  but a simple one that is very commonly used is
  as shown below:
Logical operations
                  If-then rules
      IF service is good
      THEN tip is average


Note that “is” used in two ways this rule means:
      IF service == good
      THEN tip = average


The rules can be extended by using logical operations in
  the IF part
If-then rules
If-then rules
               Implication
•   In the previous example the output
    membership function is truncated to the
    result of the antecedent this is called
    minimum implications
•   An alternative method product implication
    simply multiplies the output membership
    is simply multiplied by the result of the
    antecedent
•   The difference is shown in the following
    diagram:
Implication
                Conclusions
•   This lecture has:
     –   Introduced the basic idea of fuzzy logic
         and fuzzy control
     –   Given some guidelines on when to use
         fuzzy control
     –   Introduced fuzzy membership
     –   Introduced fuzzy rules

								
To top