+ All Categories

UNIT IV

Date post: 18-Dec-2015
Category:
Upload: gowthamucek
View: 222 times
Download: 8 times
Share this document with a friend
Description:
neural net 3rd unit
Popular Tags:
28
1 UNIT-4 FUZZY LOGIC CONTROL www.Vidyarthiplus.com
Transcript
  • 1UNIT-4

    FUZZY LOGIC CONTROL

    www.Vidyarthiplus.com

  • Fuzzy Membership Functions

    Fuzzy Operations

    Fuzzy Union

    Fuzzy Intersection

    Fuzzy Complement

    2

    www.Vidyarthiplus.com

  • Some info for LAB

    Work on an m-file (open m-file for each task,

    write your programme, save the file (e.g.,

    lab2task1), then execute the file. Now, this file

    has become a function in MATLAB). (see the first

    weeks slides - Week 1).

    Use help (e.g., help newfis) if you

    dont know how to use the function. It gives you

    information about how to use the function and

    what parameters it requires

    3

    www.Vidyarthiplus.com

  • Fuzzy Membership Functions

    One of the key issues in all fuzzy sets is how to determine fuzzy membership functions

    The membership function fully defines the fuzzy set

    A membership function provides a measure of the degree of similarity of an element to a fuzzy set

    Membership functions can take any form, but there are some common examples that appear in real applications

    4

    www.Vidyarthiplus.com

  • Membership functions can

    either be chosen by the user arbitrarily, based on the users experience (MF chosen by two users could be different depending upon their experiences, perspectives, etc.)

    Or be designed using machine learning methods (e.g., artificial neural networks, genetic algorithms, etc.)

    There are different shapes of membership functions; triangular, trapezoidal, piecewise-linear, Gaussian, bell-shaped, etc.

    5

    www.Vidyarthiplus.com

  • Triangular membership function

    a, b and c represent the x coordinates of the three vertices

    of A(x) in a fuzzy set A (a: lower boundary and c: upper

    boundary where membership degree is zero, b: the centre

    where membership degree is 1)

    =

    cxifcxbif

    bcxc

    bxaifabax

    axif

    xA

    0

    0

    )(

    a b cx

    A(x)1

    0

    6

    www.Vidyarthiplus.com

  • Gaussian membership function

    c: centre s: width m: fuzzification factor (e.g., m=2)

    A(x)

    =

    m

    As

    cxmscx

    21

    exp),,,(

    0 1 2 3 4 5 6 7 8 9 100

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    x

    c=5

    s=2

    m=2

    7

    www.Vidyarthiplus.com

  • c=5

    s=0.5

    m=20 1 2 3 4 5 6 7 8 9 10

    0

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    0 1 2 3 4 5 6 7 8 9 100

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    c=5

    s=5

    m=2

    8

    www.Vidyarthiplus.com

  • c=5

    s=2

    m=0.2

    c=5

    s=5

    m=5

    0 1 2 3 4 5 6 7 8 9 100.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    0 1 2 3 4 5 6 7 8 9 100

    0.1

    0.2

    0.3

    0.4

    0.5

    0.6

    0.7

    0.8

    0.9

    1

    9

    www.Vidyarthiplus.com

  • Fuzzy Operations

    (Fuzzy Union, Intersection, and Complement)

    Fuzzy logic begins by barrowing notions from crisp logic, just as fuzzy set theory borrows from crisp set theory. As in our extension of crisp set theory to fuzzy set theory, our extension of crisp logic to fuzzy logic is made by replacing membership functions of crisp logic with fuzzy membership functions [J.M. Mendel, Uncertain Rule-Based Fuzzy Logic Systems, 2001]

    In Fuzzy Logic, intersection, union and complement are defined in terms of their membership functions

    This section concentrates on providing enough of a theoretical base for you to be able to implement computer systems that use fuzzy logic

    Fuzzy intersection and union correspond to AND and OR, respectively, in classic/crisp/Boolean logic

    These two operators will become important later as they are the building blocks for us to be able to compute with fuzzy if-then rules

    10

    www.Vidyarthiplus.com

  • Logical AND () Logical OR (U)Truth Table

    A B A B

    0 0 0

    0 1 0

    1 0 0

    1 1 1

    Truth TableA B A UU B0 0 00 1 11 0 11 1 1

    Crisp UnionCrisp Intersection

    AAB

    B

    Classic/Crisp/Boolean Logic

    11

    www.Vidyarthiplus.com

  • Fuzzy Union

    The union (OR) is calculated using t-conorms t-conorm operator is a function s(.,.) Its features are

    s(1,1) = 1, s(a,0) = s(0,a) = a (boundary) s(a,b) s(c,d) if a c and b d (monotonicity) s(a,b) = s(b,a) (commutativity) s(a,s(b,c)) = s(s(a,b),c) (associativity)

    The most commonly used method for fuzzy union is to take the maximum. That is, given two fuzzy sets A and B with membership functions A(x) and B(x)

    ))(),(max()( xxx BAAUB =12

    www.Vidyarthiplus.com

  • Fuzzy Intersection

    The intersection (AND) is calculated using t-norms. t-norm operator is a function t(.,.) Its features

    t(0,0) = 0, t(a,1) = t(1,a) = a (boundary) t(a,b) t(c,d) if a c and b d (monotonicity) t(a,b) = t(b,a) (commutativity) t(a, t(b,c)) = t(t(a,b),c) (associativity)

    The most commonly adopted t-norm is the minimum. That is, given two fuzzy sets A and B with membership functions A(x) and B(x)

    ))(),(min()( xxx BABA =

    13

    www.Vidyarthiplus.com

  • Fuzzy Complement

    To be able to develop fuzzy systems we also have to deal with NOT or complement.

    This is the same in fuzzy logic as for Boolean logic

    For a fuzzy set A, A denotes the fuzzy complement of A

    Membership function for fuzzy complement is

    )(1)( xx AA

    =

    14

    www.Vidyarthiplus.com

  • 15

    4.2 Knowledge Base

    1. The database provides necessary

    definitions that are used to define

    linguistic variables and fuzzy data

    manipulation in the FLC.

    2. The rule base characterizes the

    control goals and control policy by

    means of a set of linguistic control

    rules.

    www.Vidyarthiplus.com

  • 16

    5.2 Knowledge Base

    Fig. 4(a) Membership functions for Error

    - 2 - 1 .5 - 1 - 0 .5 0 0 .5 1 1 .5 2

    0

    0 .2

    0 .4

    0 .6

    0 .8

    1

    E R R O R

    D

    e

    g

    r

    e

    e

    o

    f

    m

    e

    m

    b

    e

    r

    s

    h

    i

    p

    N L N M N S Z E P S P M P L

    www.Vidyarthiplus.com

  • 17

    5.2 Knowledge Base Cont.

    Fig. 4(b) Membership functions for Change in Error

    - 0 . 5 - 0 . 4 - 0 . 3 - 0 . 2 - 0 . 1 0 0 . 1 0 . 2 0 . 3 0 . 4 0 . 5

    0

    0 . 2

    0 . 4

    0 . 6

    0 . 8

    1

    C H A N G E I N E R R O R

    D

    e

    g

    r

    e

    e

    o

    f

    m

    e

    m

    b

    e

    r

    s

    h

    i

    p

    N L N M N S Z E P S P M P L

    www.Vidyarthiplus.com

  • 18

    5.2 Knowledge Base Cont.

    Fig. 4(c) Membership functions for Change in Output

    - 0 .0 3 - 0 .0 2 -0 .0 1 0 0 .0 1 0 .0 2 0 .0 3

    0

    0 .2

    0 .4

    0 .6

    0 .8

    1

    C H A N G E IN O U T P U T

    D

    e

    g

    r

    e

    e

    o

    f

    m

    e

    m

    b

    e

    r

    s

    h

    i

    p

    N L N M N S Z E P S P M P L

    www.Vidyarthiplus.com

  • 19

    4.3 Decision Making Logic

    Based on the fuzzified inputs and rule

    base, fuzzy output is determined by

    applying the rules of Boolean Algebra

    (Union and Intersection).

    www.Vidyarthiplus.com

  • 20

    Genetic Algorithms (GA) OVERVIEW

    A class of probabilistic optimization algorithms

    Inspired by the biological evolution process

    Uses concepts of Natural Selection and Genetic Inheritance (Darwin 1859)

    Originally developed by John Holland (1975)

    Particularly well suited for hard problems where little is known about the underlying search space

    Widely-used in business, science and engineering

    www.Vidyarthiplus.com

  • 21

    Classes of Search TechniquesSearch Techniqes

    Calculus Base

    TechniqesGuided random search

    techniqes

    Enumerative

    Techniqes

    BFSDFS Dynamic

    Programming

    Tabu Search Hill Climbing Simulated

    Anealing

    Evolutionary

    Algorithms

    Genetic

    Programming

    Genetic

    Algorithms

    Fibonacci Sort

    www.Vidyarthiplus.com

  • 22

    A genetic algorithm maintains a population of

    candidate solutions for the problem at hand,

    and makes it evolve by

    iteratively applying a set of stochastic

    operators.

    www.Vidyarthiplus.com

  • 23

    Stochastic operators

    Selection replicates the most successful solutions

    found in a population at a rate proportional to

    their relative quality

    Recombination (Crossover) decomposes two

    distinct solutions and then randomly mixes their

    parts to form novel solutions

    Mutation randomly perturbs a candidate solution

    www.Vidyarthiplus.com

  • 24

    Simple Genetic Algorithm{

    initialize population;evaluate population;while TerminationCriteriaNotSatisfied{

    select parents for reproduction;perform recombination and mutation;evaluate population;

    }}

    www.Vidyarthiplus.com

  • 25

    The Evolutionary Cycle

    selection

    population evaluation

    modification

    discard

    deleted

    members

    parents

    modified

    offspring

    evaluated offspring

    initiate &

    evaluate

    www.Vidyarthiplus.com

  • 26

    GA Cycle

    www.Vidyarthiplus.com

  • 27

    Crossover

    www.Vidyarthiplus.com

  • 28

    Mutation

    www.Vidyarthiplus.com


Recommended