Top Banner

of 31

Part08 Fuzzy Logic

Jun 02, 2018

Download

Documents

Naman Verma
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • 8/11/2019 Part08 Fuzzy Logic

    1/31

    1

    Fuzzy Logic

  • 8/11/2019 Part08 Fuzzy Logic

    2/31

    2

    Introduction

    Application areas

    Fuzzy Control

    Subway trains

    Cement kilns

    Washing Machines

    Fridges

  • 8/11/2019 Part08 Fuzzy Logic

    3/31

    3

    Fuzzy Sets

    Extension of Classical Sets

    Not just a membership value of in the set

    and out the set, 1 and 0

    but partial membership value, between 1 and 0

  • 8/11/2019 Part08 Fuzzy Logic

    4/31

    4

    Example: Height

    Tall people: say taller than or equal to 1.8m

    1.8m , 2m, 3m etc member of this set

    1.0 m, 1.5m or even 1.79999m not a member

    Real systems have measurement uncertainty

    so near the border lines, many

    misclassifications

  • 8/11/2019 Part08 Fuzzy Logic

    5/31

    5

    Member Functions

    Membership function

    better than listing membership values

    e.g. Tall(x) = {1 if x >= 1.9m ,

    0 if x

  • 8/11/2019 Part08 Fuzzy Logic

    6/31

    6

    Example: Fuzzy Short

    Short(x) = {0 if x >= 1.9m ,

    1 if x

  • 8/11/2019 Part08 Fuzzy Logic

    7/31

    7

    Fuzzy Set Operators

    Fuzzy Set:

    Union

    Intersection

    Complement

    Many possible definitions

    we introduce one possibility

  • 8/11/2019 Part08 Fuzzy Logic

    8/31

    8

    Fuzzy Set Union

    Union ( fA(x) and fB(x) ) =

    max (fA(x) , fB(x) )

    Union ( Tall(x) and Short(x) )

  • 8/11/2019 Part08 Fuzzy Logic

    9/31

    9

    Fuzzy Set Intersection

    Intersection ( fA(x) and fB(x) ) =

    min (fA(x) , fB(x) )

    Intersection ( Tall(x) and Short(x) )

  • 8/11/2019 Part08 Fuzzy Logic

    10/31

    10

    Fuzzy Set Complement

    Complement( fA(x) ) = 1 - fA(x)

    Not ( Tall(x) )

  • 8/11/2019 Part08 Fuzzy Logic

    11/31

    11

    Fuzzy Logic Operators

    Fuzzy Logic:

    NOT (A) = 1 - A

    A AND B = min( A, B)

    A OR B = max( A, B)

  • 8/11/2019 Part08 Fuzzy Logic

    12/31

    12

    Fuzzy Logic NOT

  • 8/11/2019 Part08 Fuzzy Logic

    13/31

    13

    Fuzzy Logic AND

  • 8/11/2019 Part08 Fuzzy Logic

    14/31

    14

    Fuzzy Logic OR

  • 8/11/2019 Part08 Fuzzy Logic

    15/31

    15

    Fuzzy Controllers

    Used to control a physical system

  • 8/11/2019 Part08 Fuzzy Logic

    16/31

    16

    Structure of a Fuzzy Controller

  • 8/11/2019 Part08 Fuzzy Logic

    17/31

    17

    Fuzzification

    Conversion of real input to fuzzy set values

    e.g. Medium ( x ) = {

    0 if x >= 1.90 or x < 1.70,

    (1.90 - x)/0.1 if x >= 1.80 and x < 1.90,

    (x- 1.70)/0.1 if x >= 1.70 and x < 1.80 }

  • 8/11/2019 Part08 Fuzzy Logic

    18/31

    18

    Inference Engine

    Fuzzy rules

    based on fuzzy premises and fuzzy

    consequences

    e.g.

    If height is Short and weight is Light then feetare Small

    Short( height) AND Light(weight) =>

    Small(feet)

  • 8/11/2019 Part08 Fuzzy Logic

    19/31

    19

    Fuzzification & Inference

    Example If height is 1.7m and weight is 55kg

    what is the value of Size(feet)

  • 8/11/2019 Part08 Fuzzy Logic

    20/31

    20

    Defuzzification

    Rule base has many rules

    so some of the output fuzzy sets will have

    membership value > 0

    Defuzzify to get a real value from the fuzzy

    outputs One approach is to use a centre of gravity method

  • 8/11/2019 Part08 Fuzzy Logic

    21/31

    21

    Defuzzification Example

    Imagine we have output fuzzy set values

    Small membership value = 0.5

    Medium membership value = 0.25

    Large membership value = 0.0

    What is the deffuzzified value

  • 8/11/2019 Part08 Fuzzy Logic

    22/31

    22

    Fuzzy Control Example

  • 8/11/2019 Part08 Fuzzy Logic

    23/31

    23

    Input Fuzzy Sets

    Angle:- -30 to 30 degrees

  • 8/11/2019 Part08 Fuzzy Logic

    24/31

    24

    Output Fuzzy Sets

    Car velocity:- -2.0 to 2.0 meters per second

  • 8/11/2019 Part08 Fuzzy Logic

    25/31

    25

    Fuzzy Rules

    If Angle is Zero then output ?

    If Angle is SP then output ?

    If Angle is SN then output ?

    If Angle is LP then output ?

    If Angle is LN then output ?

  • 8/11/2019 Part08 Fuzzy Logic

    26/31

    26

    Fuzzy Rule Table

  • 8/11/2019 Part08 Fuzzy Logic

    27/31

    27

    Extended System

    Make use of additional information

    angular velocity:- -5.0 to 5.0 degrees/ second

    Gives better control

  • 8/11/2019 Part08 Fuzzy Logic

    28/31

    28

    New Fuzzy Rules

    Make use of old Fuzzy rules for angular

    velocity Zero

    If Angle is Zero and Angular vel is Zero

    then output Zero velocity

    If Angle is SP and Angular vel is Zero

    then output SN velocity

    If Angle is SN and Angular vel is Zero

    then output SP velocity

  • 8/11/2019 Part08 Fuzzy Logic

    29/31

    29

    Table format

  • 8/11/2019 Part08 Fuzzy Logic

    30/31

    30

    Complete Table

    When angular velocity is opposite to the

    angle do nothing

    System can correct itself

    If Angle is SP and Angular velocity is SN

    then output ZE velocity

    etc

  • 8/11/2019 Part08 Fuzzy Logic

    31/31

    31

    Example

    Inputs:10 degrees, -3.5 degrees/sec

    Fuzzified Values

    Inference Rules

    Output Fuzzy Sets

    Defuzzified Values