Introduction to Fuzzy Logic - PowerPoint PPT Presentation

About This Presentation
Title:

Introduction to Fuzzy Logic

Description:

'Mathematics that refers to reality is not certain and ... 'While the mathematician constructs a theory in terms of ' ... Fuzzy quantifiers: most, few, ... – PowerPoint PPT presentation

Number of Views:470
Avg rating:3.0/5.0
Slides: 67
Provided by: eecs3
Category:

less

Transcript and Presenter's Notes

Title: Introduction to Fuzzy Logic


1
Introduction to Fuzzy Logic
  • Adnan Yazici
  • Dept. of Computer Engineering, Middle East
    Technical University, 06531, Ankara/Turkey

2
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 perfectobjects, 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

3
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
  • Database
    Intelligent information systems

? Knowledge Intelligence
? Knowledge base AI
4
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.

5
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 persons 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.

6
Introduction (cont.)
7
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.

8
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.

9
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.

10
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.

11
Introduction (cont.)
  • Fuzzy Logic was motivated by two objectives
  • First, it aims to alleviate 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.

12
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,...

13
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

14
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.

15
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.

16
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.

17
Fuzzy Sets
  • Mathematically speaking, a fuzzy set is
    characterized by mapping from its universe of
    discourse into the interval, 0,1.
  • Each fuzzy set is defined in terms of a relevant
    universal set U by a membership function, denoted
    as ?A(u), where u ? U.
  • Formally, membership functions are the functions
    of the form
  • ?A U --gt 0,1 is called the membership
    function of A.
  • The set A(u, ?A(u)) u?U is called a fuzzy
    set in U.
  • Given a fuzzy set A, which is a subset of the
    universe set, U, the support of A denoted by Supp
    (A), is an ordinary set defined as the set of
    elements whose degree of membership in A is
    greater than 0.
  • Supp (A) u ? U ?A(u) gt 0.

18
Fuzzy Sets (cont.)
  • ?A x ?A(u) ? ? is called ?-cut.
  • ?1A ? ?2A and ?1A ? ?2A, when ?1? ?2, which
    implies that the set of all distinct ?-cuts (as
    well as strong ?-cuts) is always a nested family
    of crisp sets.
  • ?A x ?A(u) gt ? is called strong ?-cut.
  • 0A x ?A(u) gt 0 is called support of A.
  • 1A x ?A(u) 1 is called core of A.
  • When the core of A is not empty, A is called
    normal otherwise, it is called subnormal.
  • The largest value of A is called the height of A,
    denoted as hA.
  • The set of distinct values of ?A(u),?u? U is
    called the level set of A and denoted as ?A.

19
Fuzzy Sets (cont.)

20
Fuzzy Sets (cont.)
  • The significance of ?-cut representation of fuzzy
    sets is that it connects fuzzy sets with crsip
    sets.
  • While each crisp set is a collection of a
    colection of objects that are conceived as a
    whole, each fuzzy set is a collection of nested
    crisp sets that are also conceived as a whole.
  • Fuzzy sets are thus wholes of a higher category.
  • Example A 0.2/x1 0.4/x20.6/x30.8/x41/x5
  • Its level set is ?A 0.2,0.4,0.6, 0.8,1, so it
    is associated with only 5-distinct ?-cuts, which
    are defined as follows
  • 0.2A 1/x11/x21/x31/x41/x5
  • 0.4A 0/x11/x21/x31/x41/x5
  • 0.6A 0/x10/x21/x31/x41/x5
  • 0.8A 0/x10/x20/x31/x41/x5
  • 1A 0/x10/x20/x30/x41/x5

21
Fuzzy Sets (cont.)
  • Theorem (Decomposition theorem of fuzzy sets)
    For any A ? F(X),
  • A ???0,1 ?A
  • We now convert each of the ?-cuts to a special
    fuzzy set ?A defined for each u?A by the formula
    ?A ?.??A(u). We obtain the following results
  • 0.2A 0.2/x10.2/x20.2/x30.2/x40.2/x5
  • 0.4A 0/x10.4/x20.4/x30.4/x40.4/x5
  • 0.6A 0/x10/x20.6/x30.6/x40.6/x5
  • 0.8A 0/x10/x20/x30.8/x40.8/x5
  • 1A 0/x10/x20/x30/x41/x5
  • The union of these five special fuzzy set is
    exactly the original fuzzy set A, that is, A
    0.2A ? 0.4 A ? 0.6 A ? 0.8 A ? 1A
  • A 0.2/x1 0.4/x20.6/x30.8/x41/x5

22
Fuzzy Sets (cont.)
  • Any property of fuzzy sets that is derieved from
    classical set theory is called a cutworthy
    property.
  • Examples
  • A B iff ?A(u) ?B(u), ?x ?X, similarly,
  • A B iff ?A ?B, ?? ?0,1
  • A ? B iff ?A ? ?B, ?? ?0,1
  • The convexity of fuzzy sets A fuzzy set defined
    on the set of real numbers (or more generally, on
    any n-dim Euclidean space) is said to be convex
    iff all of its ?-cuts are convex in the classical
    sense. For a fuzzy set to be convex the graph
    must have just one peak.

convex
non convex
23
Fuzzy Sets (cont.)
  • In order to develop computation with fuzzy sets,
    we need to take crisp functions and fuzzify them.
    A principle for fuzzyfying crisp functions is
    called the extension principle.
  • f X?Y, where X and Y are crisp sets.
  • We say that the function is fuzzified when it is
    extended to act on fuzzy sets defined on X and Y.
    Formally, the fuzzified function, f, has the
    form
  • f F(X) ? F(Y), where F(X) and F(Y) denote the
    fuzzy power set (the set of all fuzzy subsets) of
    X and Y, respectively.
  • To qualify as a fuzzified version of f, function
    f must conform to f within the extended domain
    F(X) and F(Y). This is guaranteed when a
    principle is employed that is called an extension
    principle. According to this principle,
  • B f(A) is determined for any given fuzzy set
    A?F(X) via the formula B(y) max xyf(x) A(x)
    for all y ?Y.
  • When the maximum does not exist, it is replaced
    with the supremum.

24
Fuzzy Sets (cont.)
  • The inverse function, f-1, is from F(Y) to F(X).
  • f-1 F(Y) ? F(X).
  • According to the extension principle, for any
    B?F(Y),
  • f-1(B) (x) B(f(x)) B(y), for all x ?X,
    where y f(x).
  • Example Employees ages and their salaries
  • Query What is a young employees salary?
  • Answer We use extension principle here. Let us
    have a function f X? Y, where X
    20,25,30,35,40,45,50,55,60,65 and
  • Y 2.5, 3, 3.5, 4.0, 4.5, 5.0

Age in years 20 25 30 35 40 45 50 55 60 65
Salary in K 2.5 2.5 3.0 3.5 3.5 4.0 4.0 4.5 4.5 5.0
25
Fuzzy Sets (cont.)
  • First step Formulate the meaning of the concept
    young as a fuzzy set A of general form A
    ?A(x) / x for all x ?X. Assume that
  • Ayoung 1/20 1/250.8/300.6/350.4/400.2/450
    /500/550/600/65
  • Second step Use the fuzzy set A and information
    in the table to determine an appropriate fuzzy
    set B that captures the meaning of the linguistic
    expression young employees salary.
  • This fuzzy set is dependent on A via function f
    which for each x in X assigns a particular y
    f(x) in Y. This dependency is expressed by the
    general form
  • B(y) max xyf(x) A(x) max xyf(x) ?A(x) /
    f(x)
  • B ?A(x) / f(x) 1/f(20) 1/f(25) 0.8/f(30)
    0.6/f(35) 0.4/f(40) 0.2/f(45) 0/f(50)
    0/f(55) 0/f(60) 0/f(65)
  • 1/2.5 1/2.50.8/30.6/3.50.4/3.50.2/40/40
    /4.50/4.50/5
  • Third step B(y) max xyf(x) A(x) 1/2.5
    0.8/30.6/3.50.2/40/4.50/5, which denotes the
    salary of young employes in the company.

26
Fuzzy Sets (cont.)
  • Now let us answer the query Who are employees
    with low salary?
  • Answer
  • First, assume that Blow 1/2.50.75/30.5/3.50.2
    5/40/4.50/5
  • f-1(B) (x) B(f(x))
  • B(f(20)/20B(f(25)/25B(f(30)/30B(f(35)/35B(f(4
    0)/40B(f(45)/45 B(f(50)/50B(f(55)/55B(f(60)/60
    B(f(65)/65
  • 1/201/250.75/300.5/350.5/400.25/450.25/50
    0/550/600/65
  • This fuzzy set is defined on X and represents the
    age of employees with low salaries.

27
Fuzzy Sets (cont.)
28
Fuzzy Sets (cont.)
  • Basic operations
  • Set union A ? B ? u,?A ? B (u) (u ? A? u ?
    B) ? ? (A ? B) (u) Max (?A(u), ?B(u))
  • Set intersection A?B? u,?A ? B (u) (u?A ? u?B)
    ? ? (A ? B) (u) Min (?A(u), ?B(u))
  • Set equality A B ? u,?A (u) (u ? A ? u ?
    B) ? ?A(u) ?B(u)

29
Fuzzy Sets (cont.)
  • Basic operations
  • Set Complement?? u,??A (u) (??A (u)
    (1- ?A(u))
  • Set containment A? B ? u ?u (u? A? u? B) ?
    ?A(u) ? ?B(u)
  • ConcentrationCON(A)u,?CON(A) (u) (u?A ?
    ? CON(A) (u) (?A(u))2
  • DilationDIL(A) u, ?DIL(A) (u) (u ? A ?
  • ? DIL(A) (u) (?A(u))1/2

30
Fuzzy Sets (cont.)
 
?very A (u) ? ?A (u) ?
?More-or-Less A (u)
31
Fuzzy Sets (cont.)
?tv(a)
Fairly False
Fairly True
1 0.8 0.45 0.4 0.3 0.2 0
False
Very False
True
Very True
Absolutley False
Absolutley True
0
0.8 (for u) 1
32
Fuzzy Sets (cont.)
  • Types of membership functions
  • The most commonly used membership functions in
    practice are triangles, trapezoids, bell curves,
    Gaussian, and sigmoid functions.
  • Triangular membership function is specified by
    three parameters a,b,cas follows
  •   Trapezoidal membership function is specified by
    four parameters a,b,c,d as follows
  •   A Gaussian membership function is specified by
    two parameters m,?) as follows
  •   Gaussian (xm,?) exp (-(x-m)2/?2)
  • where m and ? denote the center and width of the
    function, respectively. We control the shape of
    the function by adjusting the parameter ?. A
    small ? will generate a thin membership
    function, while a big ? will lead to a flat
    membership function.

33
Fuzzy Sets (cont.)
  • Designing membership functions
  • How do we determine the exact shape of the
    membership function for a fuzzy set? A
    membership function can be designed in three
    ways
  • Interview those who are familiar with the
    underlying concepts and later adjust it based on
    a tuning strategy,
  • Construct it automatically from data,
  • Learn it based on feedback from the system
    performance.

34
Fuzzy Sets (cont.)
  • The guidelines for membership function design
  • Use parameterizable functions that can be defined
    by a small number of parameters. Parameterizable
    membership functions reduce the system design
    time and facilitate the automated tuning of the
    system.
  • The parameterizable membership functions most
    commonly used in practice are the triangular and
    trapezoidal membership functions, because of
    their simplicity.
  • If you want to learn the membership function
    using neural network learning techniques, choose
    a differentiable (or even continuous
    differentiable) membership function (e.g.,
    Gaussian).

35
Fuzzy Sets (cont.)
  • Designing antecedent membership functions
  • The membership functions of an input variables
    fuzzy sets should usually be designed in a way
    that the following two conditions are satisfied
  • Unless there is a good reason, use symmetric
    membership functions. This guideline has an
    additional benefit from the viewpoint of
    stability analysis.
  • Each membership function overlaps only with the
    closest neighboring membership functions
  • Ai ? Aj ? ? j ? i, j1, i-1, where Ai are
    fuzzy sets.
  • For any possible input data, its membership
    values in all relevant fuzzy sets should sum to 1
    (or nearly so), ?i ?Ai (x) ? 1

36
Linguistic Variables
  • A linguistic variable enables its value to be
    described both qualitatively by a linguistic term
    (i.e., a symbol serving as the name of a fuzzy
    set) and quantitatively by a corresponding
    membership function, (which express the meaning
    of the fuzzy set).
  • For example, if TradingQuantity is Heavy, the
    fuzzy set Heavy describes the quantity of the
    stock market trading in one day. The variable
    TradingQuantity demonstrates the linguistic
    variable.

37
Linguistic Variables (cont.)
  • A linguistic variable is like a composition of a
    symbolic variable (whose value is a symbol, e.g.,
    Shape is Cylinder)) and a numeric variable (whose
    value is a number, e.g., Height 4)).
  • Using the notion of the linguistic variable to
    combine these two kinds of variables into a
    uniform framework is, in fact, one of the main
    reasons that fuzzy logic has been successful in
    offering intelligent approaches in engineering
    and many other areas that deal with continuous
    problem domains.

38
Possibility Distributions
  • A possibility distribution, ?, maps a given
    domain of definition into the interval 0,1.
  • We can view a possibility distribution as a
    mechanism for interpreting factual statements
    involving fuzzy sets.
  • Example the statement, Temperature is High,
    where High is defined as ?High T ? 0,1,
    translates into a possibility distribution, ?(T)
    ?High (T).
  • For more complex statement, Temperature is High
    but not too high translates into a possibility
    distribution in terms of conjunction of the terms
    High and Not VeryHigh
  • ?(T) min(?High(T),?NotVeryHigh(T))min?High(T),
    (1-?High(T))2. 

39
Possibility Distributions (cont.)
  • Fuzzy logic offers an appealing alternative, such
    as assigning the fuzzy set Young to the age of
    the suspect. Thus, we obtain a distribution about
    the possibility degree of the suspects age
    (e.g., the possibility that the suspect is 19 is
    0.7, while the possibility of 21 - 28 is 1.0),
  • ?Age(suspect) (x) ?Young (x),
  • where ? denotes a possibility distribution of
    the suspects age, and x is a variable
    representing a persons age.
  • Nec(A?X) denotes the necessity of the condition
    X is A given the possibility distribution ?X.

40
Possibility Distributions
  • The possibility and necessity are two related
    measures
  • 1a.Total necessity implies total possibility,
    Nec(A?X)1?Pos(A?X) 1
  • 1b. No possibility implies no necessity,
  • Pos(A?X) 0 ? Nec(A?X) 0
  • 2a. A variable is not possible to be NOT A iff
    it is necessarily A
  • 1- Pos(?A?X) 1 ? Nec(A?X) 1,
  • 2b. Pos(?A?X) 1 ? 1 - Nec(A?X) 1,
  • we can review 2b as follows
  • 2b. 1- Pos(?A?X) 0 ? Nec(A?X) 0.

41
Possibility Distributions (cont.)
  • These observations can provide insights on the
    general relationships between the two measures.
    The relationships 1a and 1b can be generalized to
    Nec (A?X) ? Pos(A?X)
  • The relationships 2a and 2b can be generalized
    to
  • 1- Pos(?A?X) Nec(A?X).
  • Thus, one can automatically derive necessity
    measure using a possibility measure.
  • In general, when we assign a fuzzy set A to a
    variable X, the assignment results in a
    possibility distribution of X, which is defined
    by As membership function ?X (x) ?A (x).

42
Possibility Distributions (cont.)
  • The possibility measure for a variable X to
    satisfy the condition X is A given a
    possibility distribution ?X is defined to be
  • Pos(A?X) sup xi?U (?A ? ?X ),
  • where ? denotes a fuzzy intersection (i.e., a
    fuzzy conjunction) operator.
  • A common choice of the fuzzy intersection
    operator for calculating the possibility measure
    is the min operator. Thus,
  • Pos(A?X) supxi?U min (?A (xi), ?X (xi)).
  • It is easy to derive the corresponding formula
    for the necessity measure
  • Nec(A?X) infxi?U max (?A (xi), 1-?X (xi)).

43
Possibility Distributions
  • Example Let the universe of discourse of a
    persons age be 10,15,20,25,30,35,40,45,50, and
  • The age possibility distribution of a suspect
    (denoted J) be
  • ?Age (J) 0.2/15 0.5/20 1/25 0.8 /30
  • Suppose that the membership function for the
    linguistic term Young is defined as a discrete
    fuzzy set as follows
  • Young 1/10 1/15 1/20 0.8 / 25 0.4 /30
    0.2 /35
  • Using the equation
  • Pos(?A?X) Pos(?Young ?Age (J)) sup
    xi?U (?Young ? ?Age (J)
  • Pos(?Young ?Age (J)) max min (?Young ,
    ?Age (J))
  • max 0.2?1, 0.5?1, 1?0.8, 0.8?0.4
  • max 0.2, 0.5,0.8, 0.4
  • Pos(?Young ?Age (J)) 0.8

44
Possibility Distributions (cont.)
  • Example (cont.) Let the universe of discourse of
    a persons age be 10,15,20,25,30,35,40,45,50,
    and
  • The age possibility distribution of a suspect
    (denoted J) be
  • ?Age (J) 0.2/15 0.5/20 1/25 0.8 /30
  • Suppose that the membership function for the
    linguistic term Young is defined as a discrete
    fuzzy set as follows
  • Young 1/10 1/15 1/20 0.8 / 25 0.4
    /30 0.2 /35
  • To calculate the necessity measure, we first
    calculate the complement of the possibility
    distribution of a suspect Js age
  • 1-?Age(J) 1/100.8/150.5/200/250.2/301/35
    1/401/451/50
  • The necessity measure is obtained by
  • Nec(A?X) infxi?U ?A(xi) ? 1-?X (xi)
  • Nec(?Young ?Age (J)) infxi?Umax(?Young, 1-
    ?Age (J)
  • Nec(?Young?Age(J))min1?1,1?0.8,1?0.5,0.8?0,0.4
    ?0.2,0.2?1,0?1,0?1,0?1
  • min 1, 1, 1, 0.8, 0.4, 1, 1,1, 1
    0.4.
  • Therefore, the possibility that suspect J is
    young is 0.8, while the necessity that he/she is
    young is 0.4.

45
Fuzzy If-Then Rules
  • There are two different kinds of fuzzy rules
    Fuzzy mapping rules and Fuzzy implication rules.
  • A fuzzy mapping rule describes an association
    therefore, its fuzzy relation is constructed from
    the Cartesian product of its antecedent fuzzy
    condition and its consequent fuzzy condition.
  • A fuzzy implication rule, however, describes a
    generalized logic implication therefore, its
    fuzzy relation needs to be constructed from the
    semantics of a generalization to implication in
    multi-valued logic.
  • The difference between the semantics of fuzzy
    mapping rules and fuzzy implication rules can be
    seen from the difference in their inference
    behavior. Even though these two types of rules
    behave the same when their antecedents are
    satisfied, they behave differently when their
    antecedents are not satisfied.
  • Example
  • Implication rule (logic representation), Mapping
    rule (procedural representation)
  • Given x ? 1,3 ? y ? 7,8, Statement
    If x ? 1,3 Then y ? 7,8
  • Input x5 Variable value x5
  • Infer y is unkown (y ? 0,10 Execution
    result no action

46
Fuzzy Mapping Rules
  • The needs to approximate a function of interest
    is often due to one or more of the following
    reasons
  • The mathematical structure of the function is not
    precisely known.
  • The function is so complex that finding its
    precise mathematical form is either impossible or
    practically infeasible due to its high cost.
  • Even if finding the function is not impractical,
    implementing the function in its precise
    mathematical form in a product or service may be
    too costly. This is particularly important for
    low cost high volume products (e.g., automobiles,
    cameras, and many other consumer products).

47
Fuzzy Mapping Rules
  • Fuzzy rule-based function approximation is a
    partition-based technique.
  • The partition-based approximation techniques
    approximate a function by partitioning the input
    space of the function and approximate the
    function in each partitioned region separately
    (e.g., piecewise linear approximation).
  • Because each fuzzy rule approximates a small
    segment of the function, the entire function is
    approximated by a set of fuzzy mapping rules. We
    refer to such a collection of fuzzy mapping rules
    as fuzzy rule-based models or simply fuzzy models
    (describing a mapping (i.e., function) from a set
    of input variables to a set of output variables.)
  • Example a fuzzy model of the stock market can be
    used to predict future changes of the IMKB
    average. A fuzzy control model of a petrochemical
    process can be used to predict the future state
    of the process.

48
Fuzzy Mapping Rules
  • A fuzzy model can be defined as a model that is
    obtained by fusing multiple local models that are
    associated with fuzzy subspaces of the given
    input space.
  • The result of fusing multiple local models is
    usually a fuzzy conclusion, which is converted to
    a crisp final output through a defuzzification
    process.
  • The main difference between fuzzy and nonfuzzy
    rules for function approximation lies in their
    interpolative reasoning capability, which
    allows the output of multiple fuzzy rules to be
    fused for a given input.

49
Fuzzy Mapping Rules
  • The four major concepts in fuzzy rule-based
    models thus are as follows
  • 1.       Fuzzy partition,
  • 2.       Mapping of fuzzy subregion to local
    models,
  • 3.       Fusion of multiple local models,
  • 4.       Defuzzification.

50
Fuzzy partition
  • A fuzzy partition of a space is a collection of
    fuzzy subspaces whose boundaries partially
    overlap and whose union is the entire space.
  • Formally, a fuzzy partition of a space as a
    collection of fuzzy subspace Ai of S that
    satisfies the following condition
  • ? ?Ai(x) 1, ?x ? S.
  • That is, for any element of the space, its
    membership degree in all subspaces always adds up
    to 1.
  • We call a collection of fuzzy subspaces Ai of S a
    weak fuzzy partition of S if and only if it
    satisfies the following condition
  • 0lt ? ?Ai(x) ? 1, ?x ? S.
  • The greater than 0 condition requires each
    element in the space S to be covered by at least
    one fuzzy subspace in the partition. The sum to
    1 condition of a fuzzy partition can be relaxed
    to the sum to less or equal to 1 condition
    because the interpolative reasoning of fuzzy
    models includes a normalization step.
  • Research Note It has been shown that ? ?Ai(x)
    1 is a desirable property in a framework for
    analyzing the stability of fuzzy logic
    controllers.

51
Mapping a Fuzzy Subspace to a Local Model
  • A local model for a subspace of the entire input
    space describes the systems input-output mapping
    relationship in the small subspace. In contrast,
    a global model for an input space describes the
    systems input-output relationship for the entire
    input space.
  • Because the scope of the local model is smaller
    than that of a global model, it is usually easier
    to develop a local model.
  • In particular, a nonlinear global model (i.e.,
    whose input-output mapping function is not
    linear) can often be approximated by a set of
    linear local models. This can be understood by
    remembering the well-known approximation
    technique called piecewise linear approximation,
    which approximates an arbitrary nonlinear
    function using segments of lines.
  • The following figure shows such an approximation
    technique, where dotted line indicates the
    function being approximated. 

52
Mapping a Fuzzy Subspace to a Local Model
  • Piecewise linear approximation has two major
    components 
  • 1.       Partitioning the input space to crisp
    regions
  • 2.       Mapping each partitioned region to a
    linear local model.
  • The main difference between fuzzy modeling and
    piecewise linear approximation is that the
    transition from one local subregion to a
    neighboring one is gradual rather than abrupt.
  • Generally, the mapping from a fuzzy subspace to a
    local model is represented as a fuzzy if-then
    rule in the form of
  • If ?x is in FSi Then yj LMi (x) 
  • where ?x and yj denote the vector of input
    variables and output variable, respectively, FSi
    and LMi denote ith fuzzy subspace and the
    corresponding local model, respectively.

53
Mapping a Fuzzy Subspace to a Local Model
  • The local model can be of four different types
  • 1.  Crisp constant This type of local model is
    simply a crisp (nonvisual) constant. For example
  • If xi is Small Then y 4.5
  • 2. Fuzzy constant A local model that is a fuzzy
    constant (e.g., Small) belong to this type. For
    example
  • If xi is Small Then y is Medium
  • 3. Linear Model this describes the output as a
    linear function of the input variables, such as
  • If x1 is Small And x2 is Large Then y 2x1
    5x2 3.

54
Fusion of local models through interpolative
reasoning
  • Fuzzy models use interpolative reasoning to fuse
    multiple local models into a global model.
  • The basic idea behind interpolative reasoning is
    analogous to drawing a conclusion from a panel of
    experts, each of whom is specialized in a subarea
    of the entire problem.
  • Each experts opinion is associated with a
    weight, which reflects the degree to which the
    current situation is in the experts specialized
    area.
  • These weighted opinions are combined to form an
    overall opinion.
  • In this analogy, an expert corresponds to a fuzzy
    if-then rule, the specialized subarea of the
    expert corresponds to the fuzzy subspace
    associated with the if-part of the rule.
  • The weight of an experts opinion is determined
    by the degree to which the current situation
    belongs to the subspace.

55
Defuzzification
  • We may interpret a possibility distribution
    either through linguistic approximation, or
    through defuzzification.
  • The former gives a qualitative interpretation,
    while the latter gives a quantitative summary and
    is more commonly used in fuzzy logic
    applications, i.e., industrial applications.
  • Given a possibility distribution of a fuzzy
    models output, defuzzification amounts to
    selecting a single representative value that
    captures the essential meaning of the given
    distribution. There are three common
    defuzzification techniques mean of maximum,
    center of area, and height.
  • Mean of Maximum (MOM) This calculates the
    average of those output values that have the
    highest possibility degrees. Suppose y is A is
    a fuzzy conclusion to be fuzzified. We can
    express the MOM defuzzification method using the
    following formula MOM (A) ?y?P y / P
  • Where P is the set of output values y with
    highest possibility degree in A. If P is an
    interval, the result of MOM defuzzification is
    obviously the midpoint in that interval. This
    technique does not take into account the overall
    shape of the possibility distribution.

56
Defuzzification
  • Center of Area (COA) This method (also referred
    to as the center-of-gravity, or centroid method)
    is the most popular defuzzification technique.
    Unlike MOM, the COA method takes into account the
    entire possibility distribution in calculating
    its representative point. This method is similar
    to the formula for calculating the center of
    gravity in physics, if we view ?A(x) as the
    density of mass at x. If x is discrete, the
    fuzzification result of A is
  • COA(A) ?x ?A(x) x / ?x ?A(x).
  •   The main disadvantage of the COA method is its
    high computational cost. However, the calculation
    can be simplified for some fuzzy models.

57
Defuzzification
  • The Height Method This method can be viewed as a
    two step procedure. First we convert the
    consequent membership function Ci into crisp
    consequent y ci where ci is the center of
    gravity of Ci. The centroid defuzzification is
    then applied to the rules with crisp consequents
    with the following formula
  • y ?Mi1 wici / ?Mi1 wi
  • where wi is the degree to which ith rule matches
    the input data. This method reduces the
    computation cost and facilitates the application
    of neural networks learning to fuzzy systems
    hence, many well-known neuro-fuzzy models use
    this type of defuzzification method. The main
    disadvantage of this method is that it is not
    well justified and is often considered an
    approximation to the centroid defuzzification.

58
A Theoretical Foundation of Fuzzy Mapping Rules
  • A mathematical representation of fuzzy mapping
    rules A fuzzy mapping rule imposes an elastic
    constraint on possible associations between input
    and output variables.
  • It is elastic because a fuzzy tule can describe
    input-output associations that are somewhat
    possible (i.e., the gray area between totally
    possible and totally impossible).
  • The degree of possibility of an input-output
    association imposed by a rule R can be expressed
    as a possibility distribution, denoted by ?R.
  • Since a fuzzy relation is a general way for
    describing a possibility distribution, it is
    natural to use it to represent the possibility
    distribution imposed by a fuzzy rule.
  • How do you construct the fuzzy relation that
    represent fuzzy mapping rules?
  • The answer is to use the concept of Cartesian
    product.
  • A fuzzy mapping rule is represented
    mathematically as fuzzy relations formed by the
    Cartesian product of the variables referred to in
    the rules if-part and then-part. For example,
    the mapping rule is IF x is A, THEN y is
    B, which is mathematically represented as a fuzzy
    relation R defined as
  • ?R(x,y)?A?B(x,y)min?A(x), ?B(y).

59
A Theoretical Foundation of Fuzzy Mapping Rules
  • Example Let us consider the following fuzzy
    mapping rule from X to Y where X
    2,3,4,5,6,7,8,9 and Y 1,2,3,4,5,6
  • If x is Medium, Then y is Small
  • where Medium and Small are fuzzy subsets of X and
    Y characterized by the following membership
    functions
  • Medium ? 0.1/2 0.3/3 0.7/4 1/5 1/6
    0.7/7 0.5/8 0.2/9
  • Small ? 1/1 ½ 0.9/3 0.6/4 0.3/5 0.1/6
  • The fuzzy relation R representing the rule is the
    Cartesian product of Medium and Small. If we use
    the min operator to construct the Cartesian
    product, we have ?R(x,y) min?Medium(x),
    ?Small(y).
  • The resulting fuzzy relation representing the
    rule is

60
A Theoretical Foundation of Fuzzy Mapping Rules
  • The theoretical foundation of fuzzy mapping rules
    is a fuzzy graph and a compositional rule of
    inference. A fuzzy graph can be conveniently
    described by fuzzy rules in the form of
  • If x is A Then y is B
  • Such a statement (or rule) generalizes the
    dependency relationship between variables in a
    lookup table such as
  • If x is 5 Then y is 10
  • If x is 10 Then y is 14
  • A set of such dependencies form a functional
    mapping from x to y. Generalizing point-to-point
    mappings to a mapping from fuzzy sets to fuzzy
    sets introduces two benefits. 
  • We can reduce the total number of point-to-point
    rules required for approximating a function
  • Using words in fuzzy rules makes it easier to
    capture, understand, and communicate the
    underlying human knowledge. 
  • Let f be a fuzzy graph described by a set of
    fuzzy mapping rules in the form of
  • If x is Aj Then y is Bj. 

61
A Theoretical Foundation of Fuzzy Mapping Rules
  • The fuzzy graph can be expressed mathematically
    as
  • f ?j A j ? Bj
  • where A and B are two fuzzy subsets of X and Y
    respectively. A fuzzy graph f from X to Y is
    union of Cartesian products involving linguistic
    input-output associations (iei., pairs if x is
    Ai and y is Bi). The resulting fuzzy graph is
    basically a fuzzy relation. 
  • The inference (i.e., interpolative reasoning) of
    such a fuzzy rule-based model is based on the
    compositional rule of inference. The net effect
    is a possibility distribution over the domain of
    definition of the output variable.
  • In particular, B A o f
  • where f represents the fuzzy graph of a given
    fuzzy model, A is an input which can be fuzzy or
    crisp, and B is the inferred output value before
    defuzzification.
  • Using the definion of a compositional rule of
    inference, we express this as
  • A o f ProjY (cyl-ext(A) ? f) ProjY
    cyl-ext(A) ? (?i Ai?Bi)
  • ?x ?X cyl-ext(A) ? (?i Ai?Bi)
  • where X and Y are the universe of discourse of x
    and y resepectively, and cyl-ext(A) is the
    cylindirical extension of A to X ?Y.

62
A Theoretical Foundation of Fuzzy Mapping Rules
  • Example Consider the following rule (again)
  • If x is Medium Then y is Small
  • Input data is X is Small, where Small for x is
    defined as
  • Small ? 1/2 0.9/3 0.6/4 0.3/5 0.1/6
  • To find out the possible values of y, we compose
    the possible values of x with the fuzzy relation
    T using the sup-min composition

0.6 0.6 0.6 0.6 0.3 0.1, y0.6/10.6/20.6/
30.6/40.3/50.1/6 as the result of the
inference.
In this example, we consider only one rule.
However, a fuzzy model for function approximation
is usually formed by a set of fuzzy mapping
rules. In such a case, the fuzzy relation of the
entire model (denoted FM) is constructed by
forming the union of fuzzy relations of
individual rules ?FM ?R1 ? ?R2 ? ??Rn
63
Types of Fuzzy Rule-Based Models
  • There are three types of fuzzy rule-based models
    for function approximation
  • 1.       The Mamdani model
  • 2.       The Takagi-Sugeno-Kang (TSK) model,
  • 3.       Koskos additive model (SAM) 
  • The inference scheme of SAM is similar to that of
    TSK model. Both of them use an inference
    analogous to the weighted sum to aggregate the
    conclusion of multiple rules into a final
    conclusion. Therefore, we refer to these rule
    models as additive rule models.
  • One of the main advantages of the TSK model is
    that it can approximate a function using fewer
    rules.
  • In contrast, the Mamdani model combines inference
    results of rules using superimposition, not
    addition. Hence nonadditive rule model.
  • The Mamdani and SAM use rules whose consequent
    part is a fuzzy set (uses a fuzzy constant as its
    rules local model).
  • The TSK model uses a rule whose then part is a
    linear model (uses a linear local model). The
    fundamental difference between the Mamdani and
    SAM lies in the choice of composition,
    conjunction, and disjunction operators in their
    reasoning (inference mechanism).

64
Types of Fuzzy Rule-Based Models
  •  The Mamdani Model
  • One of the most widely used fuzzy models in
    practice is the Mamdani model, which consists of
    the following linguistic rules that describe a
    mapping from U1 ? U2 ? ? Ur to W.
  • Ri If x1 is Ai1 and and x r is Air Then y is
    Ci
  •   where xj is (j 1,2,..r) are the input
    variables, y is the output variable, and Aij and
    Ci are fuzzy sets for xj and y respectively.
  • Given inputs of the form x1 is A1 , x2 is A2
    x r is Ar where A1 ,A2 Ar are fuzzy subsets
    of U1, U2, ,Ur (e.g., fuzzy numbers), the
    contribution of rule Ri to a Mamdani models
    output is a fuzzy set whose membership function
    is computed by
  • ?Ci (y) (?i1 ? ?i2 ? ? ?ir ) ? ?Ci (y)
  • where ?Ci (y) is the matching degree of rule
    Ri, and where ?ij is the matching degree between
    xj and Ris condition about xj.
  • ?ij sup xj (?Aj (xj) ? ?Aij (xj) )

65
Types of Fuzzy Rule-Based Models
  •   and ? denotes the min operator. This is the
    clipping inference method.
  • The final output of the model is the aggregation
    of outputs from all rules using the max operator.
  • ?C (y) max (?C1(y), ?C2(y),..., ?Cm(y))
  • Notice that the output C is a fuzzy set. This
    output can be defuzzified into a crisp output
    using one of the defuzzification techniques.
  • The Mamdani model can be derived from the
    following operators
  • Sup-min composition
  • Min for Cartesian product
  • Min for conjunctive conditions in rules
  • Max for aggregating multiple rules

66
Fuzzy If-Then Rules
Write a Comment
User Comments (0)
About PowerShow.com