.


:




:

































 

 

 

 


1




Fuzzy Logic Toolbox , . , , . . :

  • anfisedit - FIS , ANFIS
  • findcluster - fuzzy c-means
  • fuzzy - FIS. FIS - , -. fuzzy GUI-: mfedit, ruleedit, ruleview surfview
  • mfedit - . (drag)
  • ruleedit -
  • ruleview - . , , . (drag)

Simulink

Fuzzy Logic Toolbox , Simulink:

  • fuzblock -
  • sffis - , Simulink

Fuzzy Logic Toolbox :

  • defuzzdm -
  • fcmdemo - 2D- fuzzy c-means
  • fuzdemos - Fuzzy Logic Toolbox
  • gasdemo - ANFIS ( )
  • invkine - -
  • irisfcm - fuzzy c-means
  • juggler -
  • noisedm -
  • slbb - ( Simulink)
  • slcp - ( Simulink)
  • sltank - ( Simulink)
  • sltankrule - ( Simulink)
  • sltbu - ( Simulink)
  • mgtsdemo - -
  • trips -
  • shower -
  • slcp1 - " "
  • slcpp1 - " "
  • slcpp1 - " "
  • mfdemo - , Fuzzy Logic Toolbox
  • drydemo - ANFIS
ADDMF

:

FIS_name=addmf(FIS_name, varType, varIndex, mfName, mfType, mfParams)

:

MatLab . - newfis. addmf :

  1. FIS_name MatLab;
  2. varType , . - input - output ;
  3. varIndex , ;
  4. mfName (). ;
  5. mfType () . ;
  6. mfParams .

addmf, .. 1. addmf . addvar.

.

FIS_name=addmf(FIS_name, input, 1, , trapmf, [150, 155, 165, 170])

- FIS_name [150, 155, 165, 170].

\ \

ADDRULE

:

FIS_name= addrule (FIS_name, ruleList)

:

MatLab . addrule :

  1. FIS_name MatLab;
  2. ruleList .

indexed. ruleList , .. . m+n+2, m (n) () .

m , .. - . , . 0 , , .. none.

n , .. - . , .

. [0, 1].

. 1 , 2 .

.

FIS_name=addrule(FIS_name, [1 1 1 1 1; 1 2 2 0.5 1])

FIS_name , :

1=MF1 2=MF1, 1=MF1 1,

1=MF1 2=MF2, 1=MF2 0.5,

MF1 (MF2) 1 (2).

\ \

ADDVAR

:

FIS_name= addvar (FIS_name, varType, varName, varBound)

:

MatLab . addrvar :

  1. FIS_name MatLab;
  2. varType . - input - output ;
  3. varName . ;
  4. varBound , .

addvar, .. 1. .

.

FIS_name=addrule(FIS_name, input, , [155 205])

FIS_name , [155 205].

\ \

ANFIS

:

[fis, error] = anfis(trndata)

[fis, error] = anfis(trndata, initfis)

[fis, error, stepsize] = anfis(trndata, initfis, trnopt, dispopt, [], optmethod)

[fis, error, stepsize, chkfis, chkerror] = anfis(trndata, initfis, trnopt, dispopt, chkdata)

:

ANFIS Adaptive Network based Fuzzy Inference System. . , , , . . . , , .

anfis - , 1991 (Jang). anfis , . anfis .

anfis :

  1. trndata . . , -. , . , anfis SISO ( - ) MISO ( );
  2. initfis , anfis. . anfis , . initfis anfis genfis1, . . , , initfis . , .
  3. trnopt :

trnopt(1) ( 10);
trnopt(2) ( 0);
trnopt(3) ( 0.01);
trnopt(4) ( 0.9);
trnopt(5) ( 1.1);

  1. dispopt , MatLab . 1. dispopt :

dispopt(1) ANFIS-: ..;
dispopt(2) ;
dispopt(3) , ( );
dispopt(4) .
1;

  1. chkdata . , . . , . . . () . ;
  2. optmethod , . : 1 0 . , ( ) . , , . , , optmethod 0.

anfis :

  1. fis , , ;
  2. error , . ;
  3. stepsize , ;
  4. chkfis , , . anfis ;
  5. chkerror - , . . anfis .

.

anfis , . anfis . , , , ( - , , ) [] NaN. [] NaN , , . , anfis.m.

.

fis, y=sin(x) [0, 1].

x=(0:0.04:1);
y=sin(x);
trndata=[x y];
[fis, error, stepsize]=anfis(trndata)

\ \

CONVERTFIS
, Fuzzy Logic Toolbox v.1 Fuzzy Logic Toolbox v.2

:

FIS_new= convertis (FIS_old)

:

, FIS_old Fuzzy Logic Toolbox v.1 FIS_new, Fuzzy Logic Toolbox v.2.

\ \

DEFUZZ

:

crisp = defuzz (x, mf, method)

:

, . . . defuzz :

  1. x , , ;
  2. mf x , ;
  3. method . :

centroid ;
bisector ;
mom ;
som - ;
lom - .

1. , m-. x mf .

.

[0, 2, 4, 10]);, {0, 0.1, 0.2,,10}.

x=0:0.1:10;
mf=trapmf(x, [0, 2, 4, 10]);
crisp=defuzz(x, mf, centroid)

\ \

DISCFIS
,

:

[XI, YI, XO, YO, R] = discfis (fis, numPts)

:

, . discfis :

  1. fis ;
  2. numPts , . 181. , 181 . , .

discfis 5 :

  1. XI - . numPts x Ninp, Ninp , ;
  2. YI XI . numPts x Ninp, , ;
  3. XO - . numPts x Nout, Nout , ;
  4. YO XO . numPts x Nout, , . YO ;
  5. R .

:

fis = readfis (tipper);
[XI, YI, XO, YO, R] = discfis (fis)

===================================================================

Tipper.

\ \

DSIGMF

:

y = dsigmf(x, params)

:

. .

dsigmf :

  1. x , ;
  2. params . [a1 c1 a2 c2].

dsigmf y, x.

:

x = 0: 0.1: 10;
y1 = dsigmf (x, [5 1 8 7]);
y2 = dsigmf (x, [5 4 5 7]);
y3 = dsigmf (x, [5 6 2 7]);
plot (x, [y1; y2; y3])
title ('dsigmf: a1=5, c2=7')
ylim([0 1.05])
legend(c1=1, a2=8, c1=4, a2=5, c1=6, a2=2)

===================================================================

[0, 10].

\ \

EVALFIS

:

output = evalfis(input, fis)

output = evalfis(input, fis, numPts)

[output, IRR, ORR, ARR] = evalfis(input, fis)

[output, IRR, ORR, ARR] = evalfis(input, fis,, numPts)

:

. evalfis , :

  1. input , . M x N, N ; M . ;
  2. fis ;
  3. numPts , . 101. , 101 . , .

evalfis :

  1. output , input. M x L, M ; L fis;
  2. IRR NR x N, NR fis; N . , ;
  3. ORR numPts x (NR*L), numPts ; NR fis; L fis. , . numPts ;
  4. ARR numPts x L, numPts ; L fis. , . numPts .

IRR, ORR ARR , . IRR, ORR ARR . .

.

- tipper, . , service=3 food=8.

fis = readfis('tipper');
tip = evalfis([3 8], fis)

\ \

EVALMF

:

y = evalmf (x, params, type)

:

evalmf :

  1. x , ;
  2. params , ;
  3. type . :
    1 - 'trimf';
    2 - 'trapmf';
    3 - 'gaussmf';
    4 gauss2mf';
    5 - 'sigmf';
    6 - 'dsigmf';
    7 - 'psigmf';
    8 - 'gbellmf';
    9 - 'smf';
    10 - 'zmf';
    11 - 'pimf'.
    , m-.

evalmf y, x.

:

x = 0: 0.1: 10;y = evalmf (x, [0 3 9], 1);plot (x, y)title (Triangular membership function with parameters [0 3 9]')





:


: 2015-11-23; !; : 659 |


:

:

: , .
==> ...

1813 - | 1419 -


© 2015-2024 lektsii.org - -

: 0.059 .