32
Fuzzy Logic Prem Kalra Department of Computer Science and Enginering IIT Delhi

Fuzzy Logic - IIT Delhi

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

FuzzyLogic

PremKalraDepartmentofComputerScience

andEngineringIITDelhi

Boolean(Crisp)Logic

•  Isitraining– Yes/No– True/FalseCrispanswerIfanswer–maybe,maynotbe,…(vague)Notacrispanswer(fuzzyanswer)

FuzzyLogic

•  Isthispersontall?–  Yes/No–  Verytall,quitetall,notsotall,nottall,

7’ 6’ 5’6” 5’BeSer(moreprecise)descripTon!IntroducedbyZadeh(1965),UniversityofCaliforniaBerkley

FuzzyLogic

� ApproximaTon(“granulaTon”)AcolorcanbedescribedpreciselyusingRGBvalues,oritcanbeapproximatelydescribedas“red”,“blue”,etc.� Degree(“graduaTon”)Twodifferentcolorsmaybothbedescribedas“red”,butoneisconsideredtobemoreredthantheother

� FuzzylogicaSemptstoreflectthehumanwayofthinking

FuzzySet

X=EnTrepopulaToninaclassM=AllmalepopulaTon(m1,m2,m3,…,mN)F=AllfemalepopulaTon(f1,f2,f3,…,fL)CrispSets

M F

FuzzySet

X=EnTrepopulaToninaclassofSIV895/CSM802S=AllgoodstudentsS={(s,g)|sεX}andg(s)isameasurementofgoodnessofstudents.Forexample:S={(Rakesh,0.8),(Sunita,0.7),(Farhan,0.1),(Joseph,0.9)}etc

FuzzySetCrispSet FuzzySetS={s|sεX} F={(s,µ)|sεX}

µ(s)isthedegreeofs.ItisacollecTonofelements ItisacollecTonofordered

pairsInclusioniscrisp(yesorno) Inclusionisfuzzy,i.e.ifpresent

thenwithadegreeofmembership

Crispsetisafuzzysetwithextrememembershipvalues(0or1).

RelatedTermsFuzzyrelaTonRelaTonshipscanalsobeexpressedonascaleof0to1e.g.degreeofresemblancebetweentwopeopleFuzzyvariableVariablewith(labelsof)fuzzysetsasitsvaluesLinguisTcvariableFuzzyvariablewithvaluesthatarewordsorsentencesinalanguagee.g.variablecolorwithvaluesred,blue,yellow,green…LinguisTchedgeTermusedasamodifierforbasictermsinlinguisTcvaluese.g.wordssuchasvery,abit,rather,somewhat,etc.

FuzzySet

ExamplesFuzzySetIfcoldisafuzzyset,exacttemperaturevaluesmightbemappedtothefuzzysetasfollows:•  15degrees→0.2(slightlycold)•  10degrees→0.5(quitecold)•  0degrees→1(extremelycold)

MembershipFuncTonIfXisauniverseofdiscourseandxεX,thenafuzzysetAinXisdefinedasasetoforderedpairs,thatisA={(x,µΑ(x))|xεX}where,µΑ(x)iscalledthemembershipfuncTonforthefuzzysetA.Note:µΑ(x)mapeachelementofXontoamembershipgrade(ormembershipvalue)between0and1(bothinclusive).

MembershipFuncTonAfuzzysetiscompletelycharacterizedbyitsmembershipfuncTon.So,itwouldbeimportanttolearnhowamembershipfuncToncanbeexpressed(mathemaTcallyorotherwise).Note:AmembershipfuncToncanbeon(a)adiscreteuniverseofdiscourseand(b)aconTnuousuniverseofdiscourse.

MembershipFuncTonNote:AmembershipfuncToncanbeon(a)adiscreteuniverseofdiscourseand(b)aconTnuousuniverseofdiscourse.

MembershipFuncTonSingleton MF

MembershipFuncTonRectangular MF

MembershipFuncTonTriangular MF

MembershipFuncTonTrapeziodal MF

MembershipFuncTonGaussian MF

MembershipFuncTonBell (Cauchy) MF

MembershipFuncTonSigmoidal MF

ExampleCourse Grading (Crisp)

E

ExampleCourse Grading (Fuzzy)

E

OperaTonsonFuzzySets

OperaTonsonFuzzySets

OperaTonsonFuzzySets

ProperTes

ProperTes

A

OperaTonsonFuzzySetsExample

OperaTonsonFuzzySetsExample

OperaTonsonFuzzySetsExample

FuzzyvsProbability

Fuzzy:WhenwesayaboutcertaintyofathingExample:ApaTentcometothedoctorandhehastodiagnosesothatmedicinecanbeprescribed.Doctorprescribedamedicinewithcertainty60%thatthepaTentissufferingfromflue.So,thediseasewillbecuredwithcertaintyof60%anduncertainty40%.Here,insteadofflue,otherdiseaseswithsomeothercertainTesmaybe.Probability:WhenwesayaboutthechanceofaneventtooccurExample:IndiawillwintheT20tournamentwithachance60%meansthatoutof100matches,Indiaown60matches.

FuzzySystem

OperaTonsonFuzzySetsExercise