2_fuzzylog_sbic_en

Embed Size (px)

Citation preview

  • 8/7/2019 2_fuzzylog_sbic_en

    1/23

    1

    Introduction to Fuzzy LogicIntroduction to Fuzzy Logicand Fuzzy Controland Fuzzy Control

    2

    Fuzzy logic and fuzzy control 2

    Fuzzy Logic allows obtaining conclusions from vague,ambiguous or imprecise information

    Linguistic variable

    A variable whose values are words or phrases in a natural or syntheticlanguage

    Knowledge is expressed through subjective concepts Tall, short, cold, hot, positive, zero, big,

    Fuzzy rule: IF THEN

    A rule in which the antecedent and the consequent are propositionscontaining linguistic variables

    Fuzzy logic

  • 8/7/2019 2_fuzzylog_sbic_en

    2/23

    3

    Fuzzy logic and fuzzy control 3

    Rule based, linguistic, symbolic, qualitative,

    The users view (interface)

    Fuzzy control

    Fuzzy control, users view

    4

    Fuzzy logic and fuzzy control 4

    Non linear, Quantitative, ...

    The process view

    Fuzzy control

    Fuzzy control, process view

  • 8/7/2019 2_fuzzylog_sbic_en

    3/23

    5

    Fuzzy logic and fuzzy control 5

    The reality (the process to be controlled) is non linear

    Linear systems are, in general, a good local approximation of anon linear system

    Linear control is, in general, sufficient (PID, for example)

    However, there is an increasing need of non linear control Increasing functionality/complexity

    Fast production changes

    Higher precision

    Larger operating ranges

    Non linear control

    Larger operating range of aninverted pendulum

    6

    Fuzzy logic and fuzzy control 6

    Non linear process

    Non linear dynamics

    Non linear dynamics + constraints on the inputs, states, outputs

    Non linear specifications

    Time-optimal control

    Constraints

    Small signal vs large signal behaviour

    Need of non linear control

  • 8/7/2019 2_fuzzylog_sbic_en

    4/23

    7

    Fuzzy logic and fuzzy control 7

    In the controller

    Feedback path

    Direct path

    Non linearities in control

    In the process model Basis for model based

    controller design

    Part of a model basedcontroller

    8

    Fuzzy logic and fuzzy control 8

    Difficult representation

    Different approaches (parameterizations)

    Look-up tables

    Splines

    Fuzzy systems

    Neural networks

    Wavelets Analytic functions

    Radial basis functions

    Logic and selection

    Non linear mappings

  • 8/7/2019 2_fuzzylog_sbic_en

    5/23

    9

    Fuzzy logic and fuzzy control 9

    Introduced by Lotfi Zadeh in the early 1960s

    Fuzzy sets theory / logic for dealing with non probabilisticuncertainties

    Application domains

    Control systems, supervision, maintenance Decision support systems

    Data classification, pattern recognition, computer vision

    Knowledge based systems

    First application automatic control

    Abe Mamdani, Queen Mary College, 1974

    Steam turbine and boiler

    Fuzzy logic

    10

    Fuzzy logic and fuzzy control 10

    Non linear connection

    Manual control is typically non linear, e.g. on-off control

    Fuzzy logic based control: motivation

    Conceptual evolution of fuzzy logic based control

  • 8/7/2019 2_fuzzylog_sbic_en

    6/23

    11

    Fuzzy logic and fuzzy control 11

    Conventional or fuzzy

    Model-based control

    Stages for implementation of model based control

    12

    Fuzzy logic and fuzzy control 12

    Heuristic fuzzy control

    Stages for implementation of heuristic based fuzzycontrol

  • 8/7/2019 2_fuzzylog_sbic_en

    7/23

    13

    Fuzzy logic and fuzzy control 13

    The set

    Crisp sets

    { }AxxA = |:

    The characteristic function

    ( )1,

    0,

    A

    x Ax

    otherwise

    =

    Set operations:

    Intersection

    Union

    Complement

    Subset

    Definition of crisp sets andmembership values of their elements

    Membershipvalue

    14

    Fuzzy logic and fuzzy control 14

    Fuzzy sets.Membership functions and membership value

    Membership function and membership value

    [ ]1,0: xA

    ( )( ){ }UxxxA A = |,

    Fuzzy sets definition

    Membershipvalue

  • 8/7/2019 2_fuzzylog_sbic_en

    8/23

    15

    Fuzzy logic and fuzzy control 15

    Typical membership functions

    M

    embershipvalue

    Gaussian

    Triangular/Trapezoidal/Rectangular

    Membershipvalue

    16

    Fuzzy logic and fuzzy control 16

    Typical membership functions

    Singleton

    Membership function example: singleton

    Mem

    bershipvalue

  • 8/7/2019 2_fuzzylog_sbic_en

    9/23

    17

    Fuzzy logic and fuzzy control 17

    Support, nucleous and -cut

    Characterization and properties of a fuzzy set

    A(x)

    18

    Fuzzy logic and fuzzy control 18

    Fuzzy set operations

    Intersection: AND

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

    BA

    Union: OR BA

    ( ) ( ) ( )( )xxx BABA = ,max

    Complement: NOT 'A( ) ( )xx AA = 1'

  • 8/7/2019 2_fuzzylog_sbic_en

    10/23

    19

    Fuzzy logic and fuzzy control 19

    Intersection operators

    Probabilistic AND (product operator):

    ( ) ( ) ( )xxx BABA =

    Lukasiewicz AND (bounded difference):

    ( ) ( ) ( )( )1,0max += xxx BABA

    Other T-Norm operators ...

    [ ] [ ] [ ]1,01,01,0

    20

    Fuzzy logic and fuzzy control 20

    Union operators

    Probabilistic OR:

    Lukasiewicz OR (bounded sum):

    ( ) ( ) ( ) ( ) ( )xxxxx BABABA +=

    Other T-Conorm operators ...

    [ ] [ ] [ ]1,01,01,0

    ( ) ( ) ( )( )xxx BABA += ,1min

  • 8/7/2019 2_fuzzylog_sbic_en

    11/23

    21

    Fuzzy logic and fuzzy control 21

    Fuzzy logic

    Generalization of ordinary boolean logic

    Propositions have truth values between 0 and 1, the membershipvalues in the fuzzy sets

    Truth values of simple propositions

    22

    Fuzzy logic and fuzzy control 22

    Fuzzy logic

    AND, OR and NOT connect simple propositions into compoundpropositions

    Fuzzy inference is expressed by:

    IF THEN

    1 1 2 2( is ) AND ( is ) OR ...

    i ix A x A

    1 1 2 2 1 1 2IF ( is ) AND ( is ) OR ... THEN ( is ) AND ( ...)

    i i ix A x A u B u

  • 8/7/2019 2_fuzzylog_sbic_en

    12/23

    23

    Fuzzy logic and fuzzy control 23

    Fuzzy logic

    A very large body of theory has been developed

    Very little of this theory is needed to understand/use fuzzycontrol

    Fuzzy set theory and its use in control

    24

    Fuzzy logic and fuzzy control 24

    Architecture of a fuzzy control system

    A fuzzy system is consituted by:

    Knowledge Base, or Rule Base

    Inference mechanism

    Interfaces

    Fuzzification: numbers - > fuzzy sets

    Defuzzification: fuzzy sets -> numbers

  • 8/7/2019 2_fuzzylog_sbic_en

    13/23

    25

    Fuzzy logic and fuzzy control 25

    Architecture of a fuzzy control system

    Architecture of a fuzzy system with its input and output interfaces

    Which of the subsystems most influence the controllerperformance?

    26

    Fuzzy logic and fuzzy control 26

    Inference systems

    Mamdani inference system:

    Prototype of a rule, being A and Bfuzzy sets:

    IF is THEN isx A u B

    Takagi-Sugeno inference system:

    Prototype of a rule, being A a fuzzy set:

    IF is THEN ( )x A u f x=

    A fuzzy set, the f(x) function, is, in general, a linear

    combination of the inputs:

    nn xlxllxf +++= ...)( 110

  • 8/7/2019 2_fuzzylog_sbic_en

    14/23

    27

    Fuzzy logic and fuzzy control 27

    Steps of a Mamdani inference system

    1. Input fuzzy set evaluation

    i. Temperature is Cold with a truth value of 0.7

    ii. Temperature is OK with a truth value of 0.3

    iii. Temperature is Hot with a truth value of 0.0

    Fuzzy set evaluation, depending on the input crisp values

    Members

    hipvalue

    28

    Fuzzy logic and fuzzy control 28

    Steps of a Mamdani inference system

    2. Evaluate the firing level of each rule:

    IF Tempis LowAND Pressureis AverageTHEN ...

    Firing level of each rule Operators for the antecedent of a rule

  • 8/7/2019 2_fuzzylog_sbic_en

    15/23

    29

    Fuzzy logic and fuzzy control 29

    Steps of a Mamdani inference system

    Depends of the definition of each operator ...

    IF ... THEN uis Zero

    3. Evaluate the fuzzy output of each rule:

    Determining the consequent of a rule

    30

    Fuzzy logic and fuzzy control 30

    Steps of a Mamdani inference system

    4. Fuzzy output aggregation

    Fuzzy output aggregation, including all active rules, using the max operator

  • 8/7/2019 2_fuzzylog_sbic_en

    16/23

    31

    Fuzzy logic and fuzzy control 31

    Steps of a Mamdani inference system

    Other choices: Centre of sums, Mean of maximum, ...

    5. Defuzzification. Defuzzifier: Fuzzy set B-> number y

    Common choice: Center of Gravity

    ( )

    ( )

    =

    U U

    U U

    duu

    duuuu

    =

    =

    =

    ni iU

    ni iUi

    u

    uuu

    1

    1

    )(

    )(

    Deffuzification with Centre of Gravity COG, for continuous anddiscrete fuzzy sets.

    (u

    )

    32

    Fuzzy logic and fuzzy control 32

    Steps of a Mamdani inference system

    Defuzzification methods: Centre of gravity (left) and Mean of maximum (right),alternative: first maximum

    5. Defuzzification (cont.)

  • 8/7/2019 2_fuzzylog_sbic_en

    17/23

    33

    Fuzzy logic and fuzzy control 33

    Mamdani inference systems: internal vision

    Architecture of a Mamdani controller

    34

    Fuzzy logic and fuzzy control 34

    Mamdani inference systems: external vision

    Mamdani generic control surface (non linear)

    Example: Mamdani controller for two input variables

    ZX, Y

  • 8/7/2019 2_fuzzylog_sbic_en

    18/23

    35

    Fuzzy logic and fuzzy control 35

    Piecewise constant systems with extensive interpolation

    Overlap of the input membership functions define the interpolationregions

    Very little reason to use anything but singletons as outputmembership functions

    Mamdani inference systems: look-up tables

    Mamdani system: inputs, look-up table and control surface

    ZX, YControl

    (Z)

    Control

    (Z)

    36

    Fuzzy logic and fuzzy control 36

    Takagi-Sugeno inference systems

    Rules for a Takagi-Sugeno inference system:

    IF is THEN ( )x A u f x=

    A fuzzy set, the f(x) function is, in general, a linear combinationof the inputs:

    0 1 1( ) ... n nf x b b x b x= + + +

    The steps of the inference system are:

    1. Input fuzzy set evaluation

    2. Calculation of the firing degree (weight) of each rule

    3. Calculation of the output of each rule

    4. Calculation of the output by weighted average

  • 8/7/2019 2_fuzzylog_sbic_en

    19/23

    37

    Fuzzy logic and fuzzy control 37

    Takagi-Sugeno inference systems

    The global output of a Takagi-Sugeno inference system is:

    Takagi-Sugeno controller: rules firing level (weights) and rule output

    =

    =

    =

    Ni i

    Ni ii

    w

    uwu

    1

    1

    38

    Fuzzy logic and fuzzy control 38

    Takagi-Sugeno inference systems: internal vision

    Architecture of a Takagi-Sugeno controller

  • 8/7/2019 2_fuzzylog_sbic_en

    20/23

    39

    Fuzzy logic and fuzzy control 39

    Takagi-Sugeno inference systems: external vision

    Generally, the Takagi-Sugeno controller can be viewed as a set ofhyper surfaces with weighted connections

    Control surface (non linear) of aTakagi-Sugeno controller

    ZX, Y

    R1: IF Xis NAND Yis NTHEN

    u1=b01+b11X+b12Y

    R2: IF Xis NAND Yis PTHEN

    u2=b02+b21X+b22Y

    R3: IF Xis PAND Yis NTHEN

    u3=b03+b31X+b32Y

    R4: IF Xis PAND Yis PTHEN

    u4=b04+b41X+b42Y

    Example:

    40

    Fuzzy logic and fuzzy control 40

    Takagi-Sugeno inference systems: look-up tables

    Piecewise linear systems with interpolation

    Operating regions interpolation regions

    Gain-scheduling

    Takagi-Sugeno system: inputs, look-up tables and control surface

    ZX, Y

  • 8/7/2019 2_fuzzylog_sbic_en

    21/23

    41

    Fuzzy logic and fuzzy control 41

    Summary

    Introduction to fuzzy logic and fuzzy logic based controllers

    Linguistic variables e linguistic values

    Linguistic rules

    Membership functions

    Fuzzy sets, operations with fuzzy sets

    Fuzzification, Inference and Defuzzification

    Fuzzy logic controller structures

    Mamdani

    Takagi-Sugeno

    42

    Fuzzy logic and fuzzy control 42

    References

    D. Driankov, H. Hellendorn, M. Reinfrank, An Introduction toFuzzy Control. Springer-Verlag, Berlin, 1993

    L. Reznik, Fuzzy Controllers. Newnes, 1997

    K. M. Passino, S. Yurkovich, Fuzzy Control. Addison-Wesley,Menlo Park, 1998

  • 8/7/2019 2_fuzzylog_sbic_en

    22/23

    43

    Fuzzy logic and fuzzy control 43

    Appendix: Fuzzy relations

    The classical relation between two universes, Uand Vis defined as:

    1 1 1 1

    2 1 1 1

    a b c

    R U V

    = =

    ( ){ }, ,U V u v u U v V =

    It combines any element of Uwith any element of Vin orderedpairs, and makes associations without restrictions between uand v

    The strength of the ordered pairs of the elements of each universe ismeasured by the characteristic function, with values of 1 (complete relation)or 0 (no relation)

    Example:

    ( )1,2U = ( ), ,V a b c= ( ) ( ) ( ) ( ) ( ) ( ){ }1, , 1, , 1, , 2, , 2, , 2,U V a b c a b c =

    In a matrix representation:

    44

    Fuzzy logic and fuzzy control 44

    Fuzzy relations

    A fuzzy Relation, R, maps elements of one universe into the otheruniverse through the cartesian product of the two universes

    The relation strength between the pairs is measured by a membershipfunction:

    ( ) ( ) ( )

    ( ) ( ) ( )

    min 0.2,0.3 min 0.2,0.5 min 0.2,1 0.2 0.2 0.2=

    min 0.9,0.3 min 0.9,0.5 min 0.9,1 0.3 0.5 0.9R

    =

    [ ]: 0,1R U V

    Example, using the min operator:

    ( ) ( ) ( ) ( )( ), , min ,R A B A Bu v u v u v = =

    ( )1 0.2,0.9A = ( )2 0.3,0.5,1A = [ ]1 20.2

    0.3 0.5 10.9

    R A A

    = =

  • 8/7/2019 2_fuzzylog_sbic_en

    23/23

    45

    Fuzzy logic and fuzzy control 45

    Fuzzy relations

    Ris a fuzzy relation between universes Uand V. Sis a fuzzyrelation between universes Vand W. The fuzzy relation T, relatingthe elements of Ucontained in R, with the elements of Wcontainedin Sis given by the composition:

    ( ) ( )( ){ }max min , , ,R Sv V

    T R S u v v w

    = =

    0.6 0.8;

    0.7 0.9R

    =

    0.3 0.1;

    0.2 0.8S

    =

    Example, using min-max, the relation T=RoS:

    0.3 0.8

    0.3 0.8R S

    =

    The element T(1,1) is obtained by: max{min(0.6, 0.3), (0.8, 0.2)}

    R S S R It is verified that: