Your Federal Quarterly Tax Payments are due April 15th Get Help Now >>

kuliah 12 - Fuzzy Logic by qingyunliuliu

VIEWS: 19 PAGES: 57

									Fuzzy Logic


   Yeni Herdiyeni
   http://www.cs.ipb.ac.id/~yeni
   Departemen Ilmu Komputer IPB




                                   1
Introduction

    “Mathematics that refers to reality is not certain and mathematics
     that is certain does not refer to reality”
                                                          Albert Einstein

    “While the mathematician constructs a theory in terms of
     ´perfect´objects, the experimental observes objects of which the
     properties demanded by theory are and can, in the very nature of
     measurement, be only approximately true”
                                                            Max Black

    “What makes society turn is science, and the language of science
     is math, and the structure of math is logic, and the bedrock of logic
     is Aristotle, and that is what goes out with fuzzy logic”
                                                               Bart Kosko


                                                                             2
Introduction (cont.)
   Uncertainty is produced when a lack of information exists.
   The complexity also involves the degree of uncertainty.
   It is possible to have a great deal of data (facts collected from
    observations or measurements) and at the same time lack of
    information (meaningful interpretation and correlation of data
    that allows one to make decisions.)

    Data                                 Information
               Knowledge & Intelligence



    Database                             Intelligent information systems
               Knowledge base & AI


                                                                        3
Introduction (cont.)
Knowledge is information at a higher level of abstraction.
          Ex: Ali is 10 years old   (fact)
             Ali is not old         (knowledge)
   Our problems are:
        Decision
        Management
        Prediction
   Solutions are:
        Faster access to more information and of increased aid in analysis
        Understanding – utilizing information available
        Managing with information not avaliable
   Large amount of information with large amount of uncertainty lead to
    complexity.
   Avareness of knowledge (what we know and what we do not know) and
    complexity goes together.
Ex: Driving a car is complex, driving in an iced road is more compex, since more knowledge is
    needed for driving in an iced road.

                                                                                            4
    Introduction (cont.)
   Fuzzy logic provides a systematic basis for representation of uncertainty,
    imprecision, vagueness, and/or incompletenes.
   Uncertain information: Information for which it is not possible to
    determine whether it is true or false. Ex: a person is “possibly 30 years old”
   Imprecise information: Information which is not available as precise as it
    should be. Ex: A person is “around 30 years old.”
   Vague information: Information which is inherently vague.
    Ex: A person is “young.”
   Inconsistent information: Information which contains two or more
    assertions that cannot be true at the same time. Ex: Two assertions are given:
    “Ali is 16” and “Ali is older than 20”
   Incomplete information: information for which data is missing or data is
    partially available. Ex: A person’s age is “not known” or a person is
    “between 25 and 32 years old”
   Combination of the various types of such information may also exist. Ex:
    “possibly young”, “possibly around 30”, etc.


                                                                                     5
Introduction (cont.)

                            UNCERTAINTY
                        (Uncertainty-based information)




        COMPLEXITY                                CREDIBILITY
       (Description-algorithmic infor.)                   (relevance)




                            USEFULNESS
                                                                        6
    Introduction (cont.)
Example: When uncertainties like heavy traffic,
    unfamiliar roads, unstable wheather conditions, etc.
    increase, the complexity of driving a car increases.
How do we go with the complexity?
   We try to simplify the complexity by making a
    satisfactory trade-off between information available
    to us and the amount of uncertainty we allow.
   We increase the amount of uncertainty by replacing
    some of the precise information with vague but more
    useful information.


                                                     7
    Introduction (cont.)

Examples:
   Travel directions: try to do it in mm terms (or turn the wheel % 23 left,
    etc.), which is very precise and complex but not very useful. So replace
    mm information with city blocks, which is not as precise but more
    meaningful (and/or useful) information.
   Parking a car: doing it in mm terms, which is very precise and complex
    but difficult and very costly and not very useful. So replace mm
    information with approximate terms (between two lines), which is not as
    precise but more meaningful (or useful) information and can be done in
    less cost.
    Describing wheather of a day: try to do it in % cloud cover, which is very
    precise and complex but not very useful. So replace % cloud information
    with vague terms (very cloudy, sunny etc.), which is not as precise but
    more meaningful (or useful) information.



                                                                            8
Introduction (cont.)

   Fuzzy logic has been used for two different senses:
   In a narrow sense: refers to logical system generalizing crisp
    logic for reasoning uncertainty.
   In a broad sense: refers to all of the theories and technologies
    that employ fuzzy sets, which are classes with imprecise
    boundaries.
   The broad sense of fuzzy logic includes the narrow sense of
    fuzzy logic as a branch.
   Other areas include fuzzy control, fuzzy pattern recongnition,
    fuzzy arithmetic, fuzzy probability theory, fuzzy decision
    analysis, fuzzy databases, fuzzy expert systems, fuzzy
    computer SW and HW, etc.




                                                                   9
Introduction (cont.)

 With Fuzzy Logic, one can accomplish two things:

    Ease of describing human knowledge involving vague concepts

    Enhanced ability to develop a cost-effective solution to real-
     world

    In another word, fuzzy logic not only provides a cost effective
     way to model complex systems involving numeric variables but
     also offers a quantitative description of the system that is easy
     to comprehend.




                                                                    10
Introduction (cont.)

 Fuzzy Logic was motivated by two objectives:

    First, it aims to minimize difficulties in developing and analyzing
     complex systems encountered by conventional mathematical
     tools. This motivation requires fuzzy logic to work in quantitative
     and numeric domains.

    Second, it is motivated by observing that human reasoning can
     utilize concepts and knowledge that do not have well defined,
     sharp boundaries (i.e., vague concepts). This motivation
     enables fuzzy logic to have a descriptive and qualitative form.
     This is related to AI.



                                                                      11
  Introduction (cont.)
Components of Fuzzy Logic

 Fuzzy Predicates: tall, small, kind, expensive,...

 Predicates modifiers (hedges): very, quite, more or less,
  extremely,..

 Fuzzy truth values: true, very true, fairly false,...

 Fuzzy quantifiers: most, few, almost, usually, ..

 Fuzzy probabilities: likely, very likely, highly likely,...


                                                                12
  Introduction (cont.)
Applications

 Control: “If the temperature is very high and the presure is
  decreasing rapidly, then reduce the heat significantly.”

 Database: “Retrieve the names of all candidates that are fairly
  young, have a strong background in algorithms, and a modest
  administrative experience.”

 Medicine: Hepatitis is characterized by the statement, „Total
  proteins are usually normal, albumin is decreased, -globulins
  are slightly decreased, -globulins are slightly decreased, -
  globulins are increased‟


                                                               13
Introduction (cont.)

   Probability theory vs fuzzy set theory:
   Probability measures the likelihood of a future event,
    based on something known now. Probability is the
    theory of random events and is not capable of
    capturing uncertainty resulting from vagueness of
    linguistic terms.
   Fuzziness is not the uncertainty of expectation. It is
    the uncertainty resulting from imprecision of
    meaning of a concept expressed by a linguistic term
    in NL, such as “tall” or “warm” etc.


                                                        14
Introduction (cont.)

   Probability theory vs fuzzy set theory (cont):
   Fuzzy set theory makes statements about one concrete object;
    therefore, modeling local vagueness, whereas probability theory
    makes statements about a collection of objects from which one is
    selected; therefore, modeling global uncertainty.
   Fuzzy logic and probability complement each other.
    Example: “highly probable” is a concept that involves both
    randomness and fuziness.
   The behaviour of a fuzzy system is completely deterministic.
   Fuzzy logic differs from multivalued logic by introducing concepts
    such as linguistic variables and hedges to capture human
    linguistic reasoning.



                                                                    15
Introduction (cont.)
   Even though the broad sense of fuzzy logic covers a wide range
    of theories and techniques, its core technique is based on four
    basic concepts:
   Fuzzy sets: sets with smooth boundaries;
   Linguistic variables: variables whose values are both qualitatively
    and quantitatively described by a fuzzy set;
   Possibility distribution: constraints on the value of a linguistic
    variable imposed by assigning it a fuzzy set; and
   Fuzzy if-then rules: a knowledge representation scheme for
    describing a functional mapping (fuzzy mapping rules) or a
    logical formula that generalizes an implication in two-valued logic
    (fuzzy implication rules).
   The first three concepts are fundamental for all subareas in fuzzy
    logic, but the fourth one is also important.



                                                                    16
Introduction

   Most of the phenomena we encounter everyday are imprecise -
    the imprecision may be associated with their shapes, position,
    color, texture, semantics that describe what they are
   Fuzziness primarily describes uncertainty (partial truth) and
    imprecision
   The key idea of fuzziness comes from the multivalued logic:
    Everything is a matter of degree
   Imprecision raises in several faces, e.g. as a semantic ambiguity




                                                                     17
Introduction
   By fuzzifying crisp data obtained from
    measurements, FL enhances the robustness of a
    system
   Imprecision raises in several faces - for example, as
    a semantic ambiguity
       the statement “the soup is HOT” is ambiguous, but not fuzzy
                                                    Definition of
                The temperature of the soup         the domain
    Hot                                                  of
                The amount of spices used            discourse


       e.g. [20º,80º]              Transaction to Fuzziness



                                                                    18
   The word “fuzzy” can be defined as “imprecisely
    defined, confused, vague”
   Humans represent and manage natural language terms
    (data) which are vague. Almost all answers to questions
    raised in everyday life are within some proximity of the
    absolute truth




                                                               19
Probability vs uncertainty vs Fuzziness
   Probability theory is one of the most traditional
    theories for representing uncertainty in mathematical
    models
   Nature of uncertainty in a problem is a point which
    should be clearly recognized by engineer - there is
    uncertainty that arises from chance, from
    imprecision, from a lack of knowledge, from
    vagueness, from randomness…
   probability theory deals with the expectation of an
    event (future event, its outcome is not known yet),
    i.e. it is a theory of random events


                                                          20
   Fuzziness deals with the impression of
    meaning of concepts expressed in natural
    language - it is not concerned with events at all
   Fuzzy theory handles nonrandom uncertainty


                  Random



              Uncertain                      Certain




                   Fuzzy, imprecise, vague




                                                        21
   a Fuzzy System (FS) is defined as a system with operating
    principles based on fuzzy information processing and
    decision making
   There are several ways to represent knowledge, but the
    most commonly used has a form of rules:
       IF (premise)A THEN (conclusion)B




                                                           22
   From a knowledge representation viewpoint, a fuzzy IF-
    THEN rule is a scheme for capturing knowledge that
    involves imprecision - if we know a premise (fact), then we
    can infer another fact (conclusion)
   A fuzzy system (FS) is constructed from a collection of
    fuzzy IF-THEN rules
   Acquisition of knowledge captured in IF-THEN rules is
    NOT a trivial task (expert knowledge, systems
    measurements, etc.)
   The building blocks for fuzzy IF-THEN rules are FUZZY
    SETS



                                                             23
   The rule
      “IF the air is cool THEN set the motor speed to slow”
has a form:
                    IF x is A THEN y is B,
    where fuzzy sets “cool” and “slow” are labeled by A and B,
    correspondingly
   A and B characterize fuzzy propositions about variables x
    and y
   Most of the information involved in human communication uses
    natural language terms that are often vague, imprecise,
    ambiguous by their nature, and fuzzy sets can serve as the
    mathematical foundation of natural language


                                                               24
   A Fuzzy Set is a set with a smooth boundaries
    Fuzzy Set Theory generalizes classical set theory to allow
    partial membership
   Fuzzy Set A is a universal set U is determined by a
    membership function A(x) that assigns to each element
    xU a number A(x) in the unit interval [0,1]
   Universal set U (Universe of Discourse) contains all
    possible elements of concern for a particular application
   Fuzzy set has a one-to-one correspondence           with its
    membership function




                                                             25
   Fuzzy set A is defined as
                      A = { (x, A(x)) }, xU, A(x)[0,1]
   A(x) = Degree(xA) is a grade of membership of element
    xU in set A


                 X1
            X2
                       X3
                 .                  0        1/2         1
                  .
                  .
                                                    unit interval
                 xN

                 .
                 .
                            U (universe of discourse)



                                                                    26
   The membership functions themselves are NOT fuzzy - they are
    precise mathematical functions; once a fuzzy property is
    represented by a membership function, nothing is fuzzy
    anymore
   Suppose U is the interval [0,85] representing the age of ordinary
    human beings, and the linguistic term “young” as a function of
    age (value of the variable age) can be defined as
                           25       85                       -1
                                       x - 25        2
        A  " young"
                           
                           0
                                1  1 
                                 x    5  
                                   25
                                                 
                                                  
                                                                  x


[see the graphical representation on the next slide]
[ !! pay attention to the usage of the symbol “ / “ ]


                                                                        27
    1                           (x)            Universe of
                                 A
                                               discourse U is
          0.41                                   continuos
                          31


                 25

    0        U (universe of discourse)    85
   If U is a set of integers from 1 to 10 ( U={1,2,…,10} ), then
    “small” is a fuzzy subset of U, and it can be defined using
    enumeration (summation notation):
A = “small” = 1/1+1/2+0.85/3+0.75/4+0.5/5+0.3/6+0.1/7




                                                                    28
   In the previous example elements of U (universal set) with
    zero membership degrees are not included into
    enumeration
   A notion of a fuzzy set provides a convenient way of
    defining abstraction - a process which plays a basic role in
    human thinking and communication
   All theories that use the basic concept of fuzzy set can be
    called in a whole Fuzzy Theory
   Rough classification of Fuzzy Theory can be depicted as
    follows [note that dependencies between the branches are not
    shown] :




                                                                   29
                              Fuzzy Theory


  Fuzzy                     Fuzzy                   Uncertainty &
Mathematics             Decision-Making              Information


              Fuzzy Systems               Fuzzy Logic
                                            & AI


                                                                    30
31
32
33
34
35
      crisp (classical) set A   A = set of TALL people      fuzzy set A


1.0                                     1.0

                                       0.65



0.0                                     0.0

               1.75m               height                1.75m




                                                                          36
37
Membership Functions
   Main types of membership functions (MF):
 (a) Triangular MF is specified by 3 parameters {a,b,c}:

                           0,                     if x  a
                           (x - a) (b - a),     if a  x  b
                          
       trn(x : a, b, c)  
                           (c - x) (c - b),     if b  x  c
                           0,
                                                  if x  c

 (b) Trapezoidal MF is specified by 4 parameters {a,b,c,d}:

                            0,                   if x  a
                            (x - a) (b - a), if a  x  b
                         
                         
     trp(x : a,b,c, d)     1,              if b  x  c
                            (d - x) (d - c),   if c  x  d
                         
                         
                            0,                     if x  d

                                                                38
(c) Gaussian MF is specified by 2 parameters {a,}:
                        - (x - a)2 
   gsn(x : a, )  e xp            
                        2         
                                   

(d) Bell-shaped MF is specified by 3 parameters {a,b,}:

                             1
   bll(x : a,b,)                     2b
                            x-
                      1
                             a

(e) Sigmoidal MF is specified by 2 parameters {a,b}:

                            1
    sgm(x : a,b) 
                      1  e- a(x -b)



                                                           39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Terima Kasih




               57

								
To top