.


:




:

































 

 

 

 


Fismain fis_in mam21.fis > fis_out




: % - - UNIX. fismain mex-, evalfis.m, , .

fis_out, . 1211, .

, mex- fismain, MatLab :

fis = readfis (mam21);
matlab_out = evalfis(input_data, fis);
load fis_out
max(max(abs(matlab_out fis_out)))

. 10 -13. .

- , :

  • - ANSI- K&R- ( ) ;
  • - , , . , 11 ;
  • fismain.c main(). , ;
  • fis.c, ;
  • Macintosh fismain : fismain.in ; fismain.fis ; fismain.out . fismain.c; .

 

fuzzy - . x1= x2=, y=. x1= x2=, y=a0+a1x1+a2x2". , , . , - .

3.1.

, , . .

:

% y=x1^2*sin(x2-1)
% x1[-7,3] x2[-4.4,1.7].
n=15;
x1=-7:10/(n-1):3;
x2=-4.4:6.1/(n-1):1.7;
y=zeros(n,n);
for j=1:n
y(j,:)=x1.^2*sin(x2(j)-1);
end
surf(x1,x2,y)
xlabel('x1')
ylabel('x2')
zlabel('y')
title('Target');

, . 3.1. , , .

.3.1.

1. fis- fuzzy . , . 3.2.

.3.2. FIS-Editor

2. . Edit Add input.

3. . input1, x1 <Enter>.

4. . input2, x2 <Enter>.

5. . output1, y <Enter>.

6. . File Export To disk , , first.

7. . x1.

8. x1. -7 3 Range (. . 3.3) <Enter>.

9. x1. 3 . Edit Add MFs... . 3 . <Enter>.

10. x1. (. . 3.3). , , , Name <Enter>. , , , Name <Enter>. , , , Name <Enter>. , . 3.3.

.3.3. x1

11. x2. 5 . x2 x2. x2. -4.4 1.7 Range (. . 3.4) <Enter>. Edit Add MFs.... gaussmf MF type 5 Number of MFs. <Enter>.

3.4. x2

12. 10 x2: , , , , . , . 3.4.

13. y. 5 . y y. y. -50 50 Range (. . 3.5) <Enter>. Edit Add MFs.... 5 Number of MFs. <Enter>.

3.5. y

14. 10 y: , , , , . , . 3.5.

15. RuleEditor. Edit Edit rules....

16. , . 3.1 :

  1. x1=, y=;
  2. x1= x2=, y=;
  3. x1= x2=, y=;
  4. x1= x2=, y= ;
  5. x1= x2=, y= ;
  6. x1= x2=, y=;
  7. x1= x2=, y=;
  8. x1= x2= , y=;
  9. x1= x2= , y=.

Add rule. . 3.6 . , .

3.6. RuleEditor

17. . File Export To disk.

. 3.7 . View rules... View. Input , .

3.7. RuleViewer

. 3.8 -, . View surface... View. . 3.1 . 3.8 , .

3.8. - SurfaceViwer

3.2.

, , (. 3.1). :

  1. x1=, y=0;
  2. x1= x2=, y=2x1+2x2+1;
  3. x1= x2=, y=4x1-x2;
  4. x1= x2=, y=8x1+2x2+8;
  5. x1= x2=, y=50;
  6. x1= x2=, y=50.

.

1. fis- fuzzy . , . 3.2.

2. . File New fis Sugeno.

3. . Edit Add input.

4. . input1, x1 <Enter>.

5. . input2, x2 <Enter>.

6. . output1, y <Enter>.

7. . File Export To disk , , FirstSugeno.

8. . x1.

9. x1. -7 3 Range (. . 3.9) <Enter>.

3.9. x1

10. x1. , 3 , . x1. (. . 3.9). Name. Name. Name <Enter>. , . 3.9.

11. x2. 3 , . x2 x2. x2. -4.4 1.7 Range (. . 3.10) <Enter>. x2: , , . , . 3.10.

3.10. x2

12. , . y y. , . , 3.2 5 : y=50; y=4x1-x2; y=2x1+2x2+1; y=8x1+2x2+8; y=0. Add Mfs Edit. Number of MFs 2 OK.

13. . mf1. , 50, Name, onstant Type. 50 Params.

mf2 , 8+8x1+2x2. Linear Type 8 2 8 Params. : , .., .

mf3 , 1+2x1+2x2, 2 2 1.

mf4 , 4x1-x2, 4 -1 0.

mf5 , 0, - 0.

, . 3.11.

3.11. -

14. RuleEditor. Edit Edit rules.... . Add rule. . 3.12 .

3.12.

. 3.13 . View rules... View. Input , . .

. 3.13

. 3.14 -, . View surface... View. . 3.1, . 3.8 . 3.14 , . , . , , - .

3.14. -

, . .. 5- .. 2000 -2002 . fuzzy football.

[Fis- football.fis]

, :

  • x1 ( );
  • x2 ( , );
  • x3 ( , - - );
  • x4 ( HP/HG - GP/GG, HP , ; HG - , , ; GP , ; HG - , );
  • x5 ( );

, .

(y) .

-:

  • x1 {_ (); _ (); _ ()};
  • x2 {_ (); (); (); _ ()};
  • x3 { (); _ (); (); _ (); ()};
  • x4 {_ (); (); (); _ ()};
  • x5 {_ (); _ (); _ ()};
  • y {_ (); (); (); (); _ ()}.

, 1-x5 (y) . 4.1. , , : x1=_ 2=_ 3= 4=_ 5=_, y=_.

4.1.

x1 x2 x3 x4 x5 y
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

175 , 1.60, (, , ) 0.64.

9- . , 1-8 9- . 6, 7,...., 26 . 7 , 21*7=147 .

. 6- . x2-x5 7- , 8- .. 26 . , x5 - , , .. 14- . x1 i- x1(i)=x1(6)/(i-5), x1(6) - x1 6- . , .. .

.4.1 . 4.2, .

. 4.1

4.2 -

      1-2
      1-2
       
       
       
       
       
       
       
       
       
       
       
       




:


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


:

:

, ; , .
==> ...

1787 - | 1551 -


© 2015-2024 lektsii.org - -

: 0.04 .