drabrh note on fuzzy logic by other author

Upload: drabrajib-hazarika

Post on 01-Jun-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    1/17

    Fuzzy logicFuzzy logic

    IntroductionIntroduction

    Aleksandar RakiAleksandar Raki rakicrakic @[email protected]

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    2/17

    2

    ContentsContents

    DefnitionsDefnitionsBit o HistoryBit o History

    Fuzzy ApplicationsFuzzy ApplicationsFuzzy SetsFuzzy SetsFuzzy BoundariesFuzzy Boundaries

    Fuzzy RepresentationFuzzy RepresentationLinguistic Variables and HedgesLinguistic Variables and Hedges

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    3/17

    3

    De nitionDe nitionExperts rely onExperts rely on common sensecommon sense !en t!ey sol"e proble#s$!en t!ey sol"e proble#s$

    How can we re resent e! ert knowledge t"at uses #agueHow can we re resent e! ert knowledge t"at uses #agueand am$iguous terms in a com uter%and am$iguous terms in a com uter%

    Fuzzy logic is not logic t!at is uzzy% but logic t!at is used toFuzzy logic is not logic t!at is uzzy% but logic t!at is used todescribe uzziness$ Fuzzy logic is t!e t!eory o uzzy sets% setsdescribe uzziness$ Fuzzy logic is t!e t!eory o uzzy sets% setst!at calibrate "agueness$t!at calibrate "agueness$

    Fuzzy logic is based on t!e idea t!at all t!ings ad#it oFuzzy logic is based on t!e idea t!at all t!ings ad#it o degreesdegrees $$ &e#perature% !eig!t% speed% distance% beauty ' all co#e on a &e#perature% !eig!t% speed% distance% beauty ' all co#e on asliding scale$sliding scale$

    &!e #otor is running &!e #otor is running slig"tly "otslig"tly "ot $$ &o# is a &o# is a #ery tall#ery tall guy$guy$

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    4/17

    4

    De nitionDe nition &!e concept o a set and set t!eory are po er ul concepts in &!e concept o a set and set t!eory are po er ul concepts in#at!e#atics$ Ho e"er% t!e principal notion underlying set#at!e#atics$ Ho e"er% t!e principal notion underlying sett!eory% t!at an ele#ent can (exclusi"ely) eit!er belong to set ort!eory% t!at an ele#ent can (exclusi"ely) eit!er belong to set ornot belong to a set% #a*es it ell nig! i#possible to representnot belong to a set% #a*es it ell nig! i#possible to represent#uc! o !u#an discourse$ Ho is one to represent notions li*e+#uc! o !u#an discourse$ Ho is one to represent notions li*e+

    large proftlarge proft!ig! pressure!ig! pressuretall #antall #an#oderate te#perature#oderate te#perature

    ,rdinary set-t!eoretic representations ill re.uire t!e,rdinary set-t!eoretic representations ill re.uire t!e

    #aintenance o a crisp di/erentiation in a "ery artifcial #anner+#aintenance o a crisp di/erentiation in a "ery artifcial #anner+!ig!!ig!not .uite !ig!not .uite !ig!"ery !ig! 0 etc$"ery !ig! 0 etc$

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    5/17

    5

    De nitionDe nition1any decision-#a*ing and proble#-sol"ing tas*s are too co#plex to be1any decision-#a*ing and proble#-sol"ing tas*s are too co#plex to beunderstood .uantitati"ely% !o e"er%understood .uantitati"ely% !o e"er% eo le succeed $y usingeo le succeed $y usingknowledge t"at is im recise rat"er t"an reciseknowledge t"at is im recise rat"er t"an recise $$Fuzzy set t!eory rese#bles !u#an reasoning in itsFuzzy set t!eory rese#bles !u#an reasoning in its use ofuse ofa ro!imate information and uncertainty to generate decisionsa ro!imate information and uncertainty to generate decisions $$2t as specifcally2t as specifcally designed to mat"ematically re resentdesigned to mat"ematically re resentuncertaintyuncertainty and "agueness and pro"ide or#alized tools or dealingand "agueness and pro"ide or#alized tools or dealing

    it! t!e i#precision intrinsic to #any proble#s$it! t!e i#precision intrinsic to #any proble#s$Since *no ledge can be expressed in a #ore natural ay by using uzzySince *no ledge can be expressed in a #ore natural ay by using uzzysets% #any engineering and decision proble#s can be greatly si#plifed$sets% #any engineering and decision proble#s can be greatly si#plifed$Boolean logic uses s!arp distinctions$ 2t orces us to dra lines bet eenBoolean logic uses s!arp distinctions$ 2t orces us to dra lines bet een#e#bers o a class and non-#e#bers$#e#bers o a class and non-#e#bers$

    For instance% e #ay say% &o# is tall because !is !eig!t is 343 c#$ 2For instance% e #ay say% &o# is tall because !is !eig!t is 343 c#$ 2e dre a line at 345 c#% e ould fnd t!at Da"id% !o is 367 c#% ise dre a line at 345 c#% e ould fnd t!at Da"id% !o is 367 c#% iss#all$s#all$2s Da"id really a s#all #an or e !a"e 8ust dra n an arbitrary line in2s Da"id really a s#all #an or e !a"e 8ust dra n an arbitrary line int!e sand9t!e sand9

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    6/17

    6

    &it of History&it of HistoryFuzzy% or #ulti-"alued logic% as introduced in t!e 37:5s by ;anFuzzy% or #ulti-"alued logic% as introduced in t!e 37:5s by ;anLu*asie icz% a $ 2t is li*ely t!at t!e #an is tall$

    &!is or* led to an inexact reasoning tec!ni.ue o ten called &!is or* led to an inexact reasoning tec!ni.ue o ten calledossi$ility t"eoryossi$ility t"eory $$

    2n 37>? Lotf @ade!% publis!ed !is a#ous paper Fuzzy sets $2n 37>? Lotf @ade!% publis!ed !is a#ous paper Fuzzy sets $@ade! extended t!e or* on possibility t!eory into a or#al@ade! extended t!e or* on possibility t!eory into a or#alsyste# o #at!e#atical logic% and introduced a ne concept orsyste# o #at!e#atical logic% and introduced a ne concept orapplying natural language ter#s$ &!is ne logic or representingapplying natural language ter#s$ &!is ne logic or representingand #anipulating uzzy ter#s as calledand #anipulating uzzy ter#s as called fuzzy logicfuzzy logic $$

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    7/17

    7

    '"e 'erm (Fuzzy )ogic('"e 'erm (Fuzzy )ogic(*"y (fuzzy(%*"y (fuzzy(%As @ade! said% t!e ter# is concrete% i##ediate and descripti"eC eAs @ade! said% t!e ter# is concrete% i##ediate and descripti"eC eall *no !at it #eans$ Ho e"er% #any people ere repelled by t!eall *no !at it #eans$ Ho e"er% #any people ere repelled by t!e

    ord uzzy% because it is usually used in a negati"e sense$ord uzzy% because it is usually used in a negati"e sense$

    *"y (logic(%*"y (logic(%Fuzziness rests on uzzy set t!eory% and uzzy logic is 8ust a s#all partFuzziness rests on uzzy set t!eory% and uzzy logic is 8ust a s#all parto t!at t!eory$o t!at t!eory$

    &!e ter# uzzy logic is &!e ter# uzzy logic is used in two sensesused in two senses +++arrow sense+arrow sense + Fuzzy logic is a branc! o uzzy set t!eory% !ic!+ Fuzzy logic is a branc! o uzzy set t!eory% !ic!deals (as logical syste#s do) it! t!e representation anddeals (as logical syste#s do) it! t!e representation andin erence ro# *no ledge$ Fuzzy logic% unli*e ot!er logicalin erence ro# *no ledge$ Fuzzy logic% unli*e ot!er logicalsyste#s% deals it! i#precise or uncertain *no ledge$ 2n t!issyste#s% deals it! i#precise or uncertain *no ledge$ 2n t!isnarro % and per!aps correct sense% uzzy logic is 8ust one o t!enarro % and per!aps correct sense% uzzy logic is 8ust one o t!ebranc!es o uzzy set t!eory$branc!es o uzzy set t!eory$&road ,ense&road ,ense + uzzy logic synony#ously it! uzzy set t!eory$+ uzzy logic synony#ously it! uzzy set t!eory$

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    8/17

    8

    Fuzzy A licationsFuzzy A lications &!eory o uzzy sets and uzzy logic !as been applied to &!eory o uzzy sets and uzzy logic !as been applied toproble#s in a "ariety o felds+proble#s in a "ariety o felds+

    pattern recognition% decision support% data #ining pattern recognition% decision support% data #ining in or#ation retrie"al% #edicine% la % taxono#y%in or#ation retrie"al% #edicine% la % taxono#y%

    topology% linguistics% auto#ata t!eory% ga#e t!eory% etc$topology% linguistics% auto#ata t!eory% ga#e t!eory% etc$

    And #ore recently uzzy #ac!ines !a"e been de"elopedAnd #ore recently uzzy #ac!ines !a"e been de"elopedincluding+including+

    auto#atic train control% tunnel digging #ac!inery%auto#atic train control% tunnel digging #ac!inery%

    !o#e appliances+ as!ing #ac!ines% air conditioners%!o#e appliances+ as!ing #ac!ines% air conditioners%etc$etc$

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    9/17

    9

    Fuzzy A licationsFuzzy A licationsAd#ertisement- Ad#ertisement-

    Extra*lasse =as!ing 1ac!ine - 3 55 rp#$ &!e Extra*lasse #ac!ineExtra*lasse =as!ing 1ac!ine - 3 55 rp#$ &!e Extra*lasse #ac!ine!as a nu#ber o eatures !ic! ill #a*e li e easier or you$!as a nu#ber o eatures !ic! ill #a*e li e easier or you$

    Fuzzy Logic detects t!e type and a#ount o laundry in t!e dru#Fuzzy Logic detects t!e type and a#ount o laundry in t!e dru#and allo s only as #uc! ater to enter t!e #ac!ine as is reallyand allo s only as #uc! ater to enter t!e #ac!ine as is reallyneeded or t!e loaded a#ount$ And less ater ill !eat up .uic*er -needed or t!e loaded a#ount$ And less ater ill !eat up .uic*er -

    !ic! #eans less energy consu#ption$!ic! #eans less energy consu#ption$

    Foam detectionFoam detection &oo #uc! oa# &oo #uc! oa# is co#pensated by an additional rinse cycle+ 2is co#pensated by an additional rinse cycle+ 2Fuzzy Logic detects t!e or#ation o too #uc! oa# in t!e rinsingFuzzy Logic detects t!e or#ation o too #uc! oa# in t!e rinsingspin cycle% it si#ply acti"ates an additional rinse cycle$ Fantasticspin cycle% it si#ply acti"ates an additional rinse cycle$ FantasticIm$alance com ensationIm$alance com ensation 2n t!e e"ent o i#balance% Fuzzy Logic i##ediately calculates t!e2n t!e e"ent o i#balance% Fuzzy Logic i##ediately calculates t!e#axi#u# possible speed% sets t!is speed and starts spinning$ &!is#axi#u# possible speed% sets t!is speed and starts spinning$ &!ispro"ides opti#u# utilization o t!e spinning ti#e at ull speed G0pro"ides opti#u# utilization o t!e spinning ti#e at ull speed G0*as"ing wit"out wasting / wit" automatic water le#el*as"ing wit"out wasting / wit" automatic water le#elad0ustmentad0ustmentFuzzy auto#atic ater le"el ad8ust#ent adapts ater and energyFuzzy auto#atic ater le"el ad8ust#ent adapts ater and energyconsu#ption to t!e indi"idual re.uire#ents o eac! as!consu#ption to t!e indi"idual re.uire#ents o eac! as!progra##e% depending on t!e a#ount o laundry and type o abricprogra##e% depending on t!e a#ount o laundry and type o abricG0G0

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    10/17

    10

    1ore De nitions1ore De nitionsFuzzy logic is a set o #at!e#atical principles or *no ledgeFuzzy logic is a set o #at!e#atical principles or *no ledgerepresentation based onrepresentation based on degrees of mem$ers"idegrees of mem$ers"i $$Inli*e t o-"alued Boolean logic% uzzy logic isInli*e t o-"alued Boolean logic% uzzy logic is multi/#aluedmulti/#alued $ 2t$ 2tdeals it!deals it! degrees of mem$ers"idegrees of mem$ers"i andand degrees of trut"degrees of trut" $$Fuzzy logic uses t!e continuu# o logical "alues bet een 5Fuzzy logic uses t!e continuu# o logical "alues bet een 5

    (co#pletely alse) and 3 (co#pletely true)$ 2nstead o 8ust blac*(co#pletely alse) and 3 (co#pletely true)$ 2nstead o 8ust blac*and !ite% it e#ploys t!e spectru# o colours% accepting t!atand !ite% it e#ploys t!e spectru# o colours% accepting t!att!ings can be partly true and partly alse at t!e sa#e ti#e$t!ings can be partly true and partly alse at t!e sa#e ti#e$

    &!e concept o a &!e concept o a setset is unda#ental to #at!e#atics$is unda#ental to #at!e#atics$Ho e"er% our o n language is also t!e supre#e expression o sets$Ho e"er% our o n language is also t!e supre#e expression o sets$For exa#ple%For exa#ple% car car indicates t!eindicates t!e set of carsset of cars $ =!en e say a car% e$ =!en e say a car% e

    #ean one out o t!e set o cars$#ean one out o t!e set o cars$

    (a ) Boolean Logic. (b) Multi-valued Logic.1 10.2 0.4 0.6 0.800 10

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    11/17

    11

    Cris #s. Fuzzy ,etsCris #s. Fuzzy ,ets

    150 210170 180 190 200160 Height, cm

    Degree of embership

    Tall Men

    150 210180 190 200

    1.0

    0.0

    0.2

    0.4

    0.6

    0.8

    160

    Degree of embership

    170

    1.0

    0.0

    0.2

    0.4

    0.6

    0.8

    Height, cm

    Fu ! "et#

    $%i#& "et#

    &!e classical exa#ple in uzzy sets is tall #en$ &!e ele#ents o t!e uzzy &!e classical exa#ple in uzzy sets is tall #en$ &!e ele#ents o t!e uzzysetsettall #en are all #en% but t!eir degrees o #e#bers!ip depend on t!eirtall #en are all #en% but t!eir degrees o #e#bers!ip depend on t!eir

    !eig!t$!eig!t$

    &!e &!e x-axisx-axis represents t!erepresents t!e uni#erse of discourseuni#erse of discourse ' t!e range o all' t!e range o allpossible "alues applicable to a c!osen "ariable$ 2n our case% t!e "ariable ispossible "alues applicable to a c!osen "ariable$ 2n our case% t!e "ariable is

    t!e #an !eig!t$ According to t!is representation% t!e uni"erse o #enJst!e #an !eig!t$ According to t!is representation% t!e uni"erse o #enJs!eig!ts consists o all tall #en$!eig!ts consists o all tall #en$

    'eg%ee o Me *e%#+i&

    Fuzzy

    Ma%,

    -o+n

    To

    Bo*

    Bill

    1

    1

    1

    0

    0

    1.00

    1.00

    0.98

    0.82

    0.78

    ete%

    "teven

    Mi,e

    'avid

    $+%i#

    Crisp

    1

    0

    0

    0

    0

    0.24

    0.15

    0.06

    0.01

    0.00

    /a e eig+t c

    205

    198

    181

    167

    155

    152

    158

    172

    179

    208

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    12/17

    12

    A Fuzzy ,et "asA Fuzzy ,et "as&oundaries&oundariesLetLet X X be t!e uni"erse o discourse and its ele#ents be denoted asbe t!e uni"erse o discourse and its ele#ents be denoted as x x $ 2n t!e$ 2n t!e

    classical set t!eory%classical set t!eory% cris setcris set A A ofof X X is de ned as functionis de ned as function f f A A22 x x 3 called3 calledt"e c"aracteristic function oft"e c"aracteristic function of A A

    f f A A (( x x ) +) + X X K5% 3 % !ereK5% 3 % !ere

    &!is set #aps uni"erse &!is set #aps uni"erse X X to a set o t o ele#ents$ For any ele#entto a set o t o ele#ents$ For any ele#ent x x oo

    uni"erseuni"erse X X % c!aracteristic unction% c!aracteristic unction f f A A (( x x ) is e.ual to 3 i) is e.ual to 3 i x x is an ele#ent o setis an ele#ent o set A A % and is e.ual to 5 i% and is e.ual to 5 i x x is not an ele#ent ois not an ele#ent o A A $$2n t!e uzzy t!eory%2n t!e uzzy t!eory% fuzzy setfuzzy set A A of uni#erseof uni#erse X X is de ned $y functionis de ned $y function A A 22 x x 3 called t"e mem$ers"i function of set3 called t"e mem$ers"i function of set A A

    A A (( x x ) + M) + M G5% 3 % !ereG5% 3 % !ere A A (( x x ) N 3 i x is totally in AC) N 3 i x is totally in AC A A (( x x ) N 5 i x is not in AC) N 5 i x is not in AC5 O5 O A A (( x x ) O 3 i x is partly in A$) O 3 i x is partly in A$

    &!is defnition o set allo s a continuu# o possible c!oices$ For any &!is defnition o set allo s a continuu# o possible c!oices$ For anyele#entele#ent x x o uni"erseo uni"erse X X % #e#bers!ip unction% #e#bers!ip unction A A (( x x ) e.uals t!e degree to) e.uals t!e degree to

    !ic!!ic! x x is an ele#ent o setis an ele#ent o set A A $ &!is degree% a "alue bet een 5 and 3%$ &!is degree% a "alue bet een 5 and 3%represents t!erepresents t!e degree of mem$ers"idegree of mem$ers"i % also called% also called mem$ers"i #aluemem$ers"i #alue %%o ele#ento ele#ent x x in setin set A A $$

    =

    A x

    A x x f A i 0

    i 1)(

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    13/17

    13

    Fuzzy ,etFuzzy ,etRe resentationRe resentation

    First% e deter#ine t!eFirst% e deter#ine t!e#e#bers!ip unctions$ 2n our#e#bers!ip unctions$ 2n our

    tall #en exa#ple% e cantall #en exa#ple% e candefne uzzy sets odefne uzzy sets o talltall %%short short andand averageaverage #en$#en$

    &!e uni"erse o discourse or &!e uni"erse o discourse ort!ree defned uzzy setst!ree defned uzzy setsconsist o all possible "aluesconsist o all possible "alueso t!e #enJs !eig!ts$o t!e #enJs !eig!ts$For exa#ple% a #an !o isFor exa#ple% a #an !o is34P c# tall is a #e#ber o34P c# tall is a #e#ber ot!et!e averageaverage #en set it! a#en set it! adegree o #e#bers!ip odegree o #e#bers!ip o5$3% and at t!e sa#e ti#e% !e5$3% and at t!e sa#e ti#e% !eis also a #e#ber o t!eis also a #e#ber o t!e talltall #en set it! a degree o 5$P$#en set it! a degree o 5$P$

    150 210170 180 190 200160

    Height, cm Degree of Membership

    Tall Men

    150 210180 190 200

    1.0

    0.0

    0.2

    0.4

    0.6

    0.8

    160

    Degree of Membership

    "+o%t ve%age "+o%tTall

    170

    1.0

    0.0

    0.2

    0.4

    0.6

    0.8

    Fu ! "et#

    $%i#& "et#

    "+o%t ve%age

    Tall

    Tall

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    14/17

    14

    Fuzzy ,etFuzzy ,etRe resentationRe resentation

    &ypical #e#bers!ip unctions t!at can be used to &ypical #e#bers!ip unctions t!at can be used torepresent a uzzy set are sig#oid% gaussian and pi$represent a uzzy set are sig#oid% gaussian and pi$Ho e"er% t!ese unctions increase t!e ti#e o co#putation$Ho e"er% t!ese unctions increase t!e ti#e o co#putation$ &!ere ore% in practice% #ost applications use &!ere ore% in practice% #ost applications use linear tlinear t

    functionsfunctions $$

    Fu ! "u*#et A

    Fuzziness

    1

    0$%i#& "u*#et A Fuzziness

    ( x)

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    15/17

    15

    )inguistic 4aria$les)inguistic 4aria$lesAt t!e root o uzzy set t!eory lies t!e idea o linguistic "ariables$At t!e root o uzzy set t!eory lies t!e idea o linguistic "ariables$A linguistic #aria$le is a fuzzy #aria$leA linguistic #aria$le is a fuzzy #aria$le $ For exa#ple% t!e$ For exa#ple% t!estate#ent ;o!n is tall i#plies t!at t!e linguistic "ariable ;o!nstate#ent ;o!n is tall i#plies t!at t!e linguistic "ariable ;o!nta*es t!e linguistic "alue tall$ta*es t!e linguistic "alue tall$2n uzzy expert syste#s%2n uzzy expert syste#s% linguistic #aria$les are used inlinguistic #aria$les are used infuzzy rulesfuzzy rules $ For exa#ple+$ For exa#ple+2F2F indind is strongis strong

    &HEQ &HEQ sailingsailing is goodis good

    2F2F pro8ect durationpro8ect duration is longis long &HEQ &HEQ co#pletion ris*co#pletion ris* is !ig!is !ig!

    2F2F speedspeed is slois slo &HEQ &HEQ stopping distancestopping distance is s!ortis s!ort

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    16/17

    16

    )inguistic 4aria$les and)inguistic 4aria$les andHedgesHedges

    &!e range o possible "alues o a linguistic "ariable represents t!e &!e range o possible "alues o a linguistic "ariable represents t!euni"erse o discourse o t!at "ariable$ For exa#ple% t!e uni"erse ouni"erse o discourse o t!at "ariable$ For exa#ple% t!e uni"erse odiscourse o t!e linguistic "ariablediscourse o t!e linguistic "ariable speedspeed #ig!t !a"e t!e range#ig!t !a"e t!e rangebet een 5 and 5 *# ! and #ay include suc! uzzy subsets asbet een 5 and 5 *# ! and #ay include suc! uzzy subsets as veryveryslowslow %%slowslow %%mediummedium %%fast fast % and% and very fast very fast $$A linguistic "ariable carries it! it t!e concept o uzzy set .ualifers%A linguistic "ariable carries it! it t!e concept o uzzy set .ualifers%calledcalled "edges"edges $$Hedges are ter#s t!at #odi y t!e s!ape o uzzy sets$ &!ey includeHedges are ter#s t!at #odi y t!e s!ape o uzzy sets$ &!ey includead"erbs suc! asad"erbs suc! as very very %%somewhat somewhat %%quitequite %%more or lessmore or less andand slightly slightly $$

    "+o%t

    3e%! Tall

    "+o%tTall

    Degree of Membership

    150 210180 190 200

    1.0

    0.0

    0.2

    0.4

    0.6

    0.8

    160 170

    Height, cm

    ve%age

    Tall3e%! "+o%t 3e%! Tall

  • 8/9/2019 Drabrh note on Fuzzy Logic by other author

    17/17

    17

    )inguistic 4aria$les and)inguistic 4aria$les andHedgesHedges

    Hedge athematical Expression

    little

    "lig+tl!

    3e%!

    t%e el!

    Hedge athematical Expression raphical !epresentation

    A ( x )1.

    A ( x )1.7

    A ( x )2

    A ( x )

    Hedge Mathematical Expression Hedge Mathematical

    Expression raphical !epresentation

    3e%! ve%!

    Mo%e o% le##

    ndeed

    "o e:+at

    2 A ( x )2

    A ( x )

    A ( x )

    i 0 A 0.5

    i 0.5 ; A 1

    1 2 1 A ( x )2

    A ( x )4

    &ypical !edges+ &ypical !edges+