Fuzzy - PowerPoint PPT Presentation

About This Presentation
Title:

Fuzzy

Description:

FUZZY & ANFIS Use MATLAB TIP TIPPER TIPPER OUTLINE Fuzzy logic toolbox Fuzzy: use command line Fuzzy: use GUI ANFIS ... – PowerPoint PPT presentation

Number of Views:373
Avg rating:3.0/5.0
Slides: 59
Provided by: Valued461
Category:
Tags: anfis | fuzzy

less

Transcript and Presenter's Notes

Title: Fuzzy


1
Fuzzy ANFIS
  • Use MATLAB

2
Outline
  • Fuzzy logic toolbox
  • Fuzzy use command line
  • Fuzzy use GUI
  • ANFIS use command line
  • ANFIS use GUI

3
Outline
  • Fuzzy logic toolbox
  • Fuzzy use command line
  • Fuzzy use GUI
  • ANFIS use command line
  • ANFIS use GUI

4
Fuzzy Logic Toolbox
  • ???XXX.fis
  • ??System?Input?Output?Rule????
  • ?????????????(trimf)???(trapmf)?????(gbellmf)???(
    gaussmf)???2(gauss2mf),?????sigmf?dsigmf?psigmf?pi
    mf?smf?zmf??
  • ????(Rule)? ifthen ???

5
??????
  • Sigmf
  • Dsigmf
  • Psigmf
  • Pimf
  • Smf
  • Zmf
  • Trimf
  • Trapmf
  • Gbellmf
  • Gaussmf
  • Gauss2mf

6
????(Rule)
  • ?????
  • if (x is A) and (y is B) then (z is a)(1)
  • if (x is A) or (y is C) then (z is ß)(1)
  • ?????
  • (x A) (y B) gt (z a)(1)
  • (x A) (y C) gt (z ß)(1)
  • ?????
  • 1 2, 1(1)1 ??????ABC??????
  • 1 3, 2(1)2 ???a ß??????

7
Outline
  • Fuzzy logic toolbox
  • Fuzzy use command line
  • Fuzzy use GUI
  • ANFIS use command line
  • ANFIS use GUI

8
ExampleTipper
9
  • ??MATLAB?????M-file

10
System
  • System
  • ??????????,?System,Inputs,Outputs?Rules?
  • Name'tipper1' ???tipper1.fis
  • Type'mamdani' Mamdani style
  • NumInputs2 ???????
  • NumOutputs1 ???????
  • NumRules3 ?????
  • AndMethod'min' ?????????????
  • OrMethod'max'
  • ImpMethod'min'
  • AggMethod'max'
  • DefuzzMethod'centroid'

11
Input1
  • Input1
    ????????
  • Name'service'
    ????
  • Range0 10
    ????
  • NumMFs3
    ??????????
  • MF1'poor''gaussmf',1.5 0
    ????????
  • MF2'good''gaussmf',1.5 5
    ????????
  • MF3'excellent''gaussmf',1.5 10 ????????

12
Input1
13
Input2
  • Input2 ????????
  • Name'food'
  • Range0 10
  • NumMFs2
  • MF1'rancid''trapmf',0 0 1 3
  • MF2'delicious''trapmf',7 9 10 10

14
Input2
15
Output1
  • Output1 ??????
  • Name'tip'
  • Range0 30
  • NumMFs3
  • MF1'cheap''trimf',0 5 10
  • MF2'average''trimf',10 15 20
  • MF3'generous''trimf',20 25 30

16
Output1
17
Rules
  • If (service is poor) or (food is rancid) then
    (tip is cheap) (1)
  • If (service is good) then (tip is average) (1)
  • If (service is excellent) or (food is delicious)
    then (tip is generous) (1)

18
Rules
  • Rules ??????,???????
  • 1 1, 1 (1) 2
  • 2 0, 2 (1) 2
  • 3 2, 3 (1) 2

19
  • ???tipper1.fis
  • ?tipper1.fis??MATLAB?
  • tipperreadfis('tipper1')
  • ??tipper
  • evalfis(5 5,tipper) ?????????
  • ans 15.0000
  • evalfis(5 510 32 9,tipper) ??????
  • ans 15.0000 24.9220 16.8196

20
????
  • ??????
  • plotmf(tipper,'input',1)
  • ??????
  • showrule(tipper) ?????
  • showrule(tipper,1 3,'symbolic') ?????
  • ?????????
  • surfview(tipper)

21
???????
22
Outline
  • Fuzzy logic toolbox
  • Fuzzy use command line
  • Fuzzy use GUI
  • ANFIS use command line
  • ANFIS use GUI

23
??FUZZY LOGIC TOOLBOX GUI
  • ?MATLAB command window??fuzzy

24
(No Transcript)
25
??input/output
26
??????
27
??????
28
???????
29
????????
30
????????
31
??/??????
32
Service
33
Food
34
Tip
35
??????
36
??????
37
??Tipper
38
??Tipper
39
Outline
  • Fuzzy logic toolbox
  • Fuzzy use command line
  • Fuzzy use GUI
  • ANFIS use command line
  • ANFIS use GUI

40
??demo?????
  • load mgdata.dat
  • time mgdata(, 1)
  • x mgdata(, 2)
  • for t1181117,
  • Data(t-117,)x(t-18) x(t-12) x(t-6) x(t)
    x(t6)
  • end
  • trnDataData(1500, )
  • chkDataData(501end, )

41
mgdata
42
??????FIS
  • fismat genfis1(trnData)
  • fismatgenfis1(inputData,2,'gauss2mf','constant')

43
??ANFIS
  • fismat1,error1,ss,fismat2,error2
    anfis(trnData,fismat,,,chkData)

44
??ANFIS
  • anfis_output evalfis(trnData(,14)
    chkData(,14),fismat2)
  • index 1251124
  • subplot(211), plot(time(index), x(index)
    anfis_output)
  • xlabel('Time (sec)')
  • title('MG Time Series and ANFIS Prediction')
  • subplot(212), plot(time(index), x(index) -
    anfis_output)
  • xlabel('Time (sec)')
  • title('Prediction Errors')

45
(No Transcript)
46
Outline
  • Fuzzy logic toolbox
  • Fuzzy use command line
  • Fuzzy use GUI
  • ANFIS use command line
  • ANFIS use GUI

47
??ANFIS EDIT GUI
  • ?MATLAB command window??anfisedit

48
??demo??
  • ?MATLAB command window??????
  • load fuzex1trnData.dat
  • load fuzex2trnData.dat
  • load fuzex1chkData.dat
  • load fuzex2chkData.dat

49
?workspace????
50
(No Transcript)
51
(No Transcript)
52
(No Transcript)
53
??????FIS
54
(No Transcript)
55
??FIS??
56
??ANFIS
57
?????ANFIS????
58
  • Thanks!!
Write a Comment
User Comments (0)
About PowerShow.com