Doç. Dr. GÜRAY SONUGÜR

Doç. Dr. Güray SONUGÜR – Öğrenci Bilgi Paylaşım Platformu

BMK Hafta 6 Soru Çözümleri

(Normal Öğretim)

clear;clc;

b=newfis (‘sicaklikNem_devirSure’);

 

b=addvar(b,’input’,’topraknemi’ , [0 100]);

b=addmf(b, ‘input’ ,1,’az’ , ‘trimf’ , [-40 0 40]);

b=addmf(b, ‘input’ ,1,’orta’ , ‘trimf’ , [20 50 80]);

b=addmf(b, ‘input’ ,1,’cok’ , ‘trimf’ , [60 100 140]);

 

b=addvar(b,’input’,’topraksıcaklığı’ , [-20 50]);

b=addmf(b, ‘input’ ,2,’cokdusuk’ , ‘trapmf’ , [-40 -20 -10 -5]);

b=addmf(b, ‘input’ ,2,’dusuk’ , ‘trimf’ , [-20 0 15]);

b=addmf(b, ‘input’ ,2,’orta’ , ‘trimf’ , [-2 15 30]);

b=addmf(b, ‘input’ ,2,’sıcak’ , ‘trimf’ , [15 30 50]);

b=addmf(b, ‘input’ ,2,’coksıcak’ , ‘trapmf’ , [35 40 50 50]);

 

b=addvar(b,’output’,’motorsure’ , [0 60]);

b=addmf(b, ‘output’ ,1,’cokaz’ , ‘trimf’ , [-35 0 15]);

b=addmf(b, ‘output’ ,1,’az’ , ‘trimf’ , [0 20 35]);

b=addmf(b, ‘output’ ,1,’orta’ , ‘trimf’ , [18 30 45]);

b=addmf(b, ‘output’ ,1,’fazla’ , ‘trimf’ , [30 45 60]);

b=addmf(b, ‘output’ ,1,’cokfazla’ , ‘trimf’ , [45 60 100]);

 

b=addvar(b,’output’,’devirsayısı’ , [0 250]);

b=addmf(b, ‘output’ ,2,’cokyavasdevir’ , ‘trapmf’ , [-50 0 25 50]);

b=addmf(b, ‘output’ ,2,’yavasdevir’ , ‘trimf’ , [25 75 100]);

b=addmf(b, ‘output’ ,2,’idealhız’ , ‘trimf’ , [75 125 175]);

b=addmf(b, ‘output’ ,2,’hızlıdevir’ , ‘trimf’ , [150 180 225]);

b=addmf(b, ‘output’ ,2,’cokhızlıdevir’ , ‘trapmf’ , [200 225 250 250]);

 

rulkey=[ 1 0 5 5 1 1;2 3 2 2 1 1;2 4 2 3 1 1;3 0 1 1 1 1;2 5 3 4 1 1;2 1 1 2 1 1;2 2 1 1 1 1];

b=addrule(b,rulkey);

 

 

 

 

 

 

 

 

 

 

 

 

 

(İkinci Öğretim)

clear;clc;

b=newfis (‘sicaklikNem_devirSure’);

 

b=addvar(b,’input’,’topraknemi’ , [0 100]);

b=addmf(b, ‘input’ ,1,’az’ , ‘trimf’ , [-40 0 40]);

b=addmf(b, ‘input’ ,1,’orta’ , ‘trimf’ , [20 50 80]);

b=addmf(b, ‘input’ ,1,’cok’ , ‘trapmf’ , [50 80 100 140]);

 

b=addvar(b,’input’,’topraksıcaklığı’ , [-20 50]);

b=addmf(b, ‘input’ ,2,’cokdusuk’ , ‘trapmf’ , [-40 -20 -10 -5]);

b=addmf(b, ‘input’ ,2,’dusuk’ , ‘trimf’ , [-20 0 15]);

b=addmf(b, ‘input’ ,2,’orta’ , ‘trimf’ , [-2 15 30]);clc

b=addmf(b, ‘input’ ,2,’sıcak’ , ‘trimf’ , [15 30 50]);

b=addmf(b, ‘input’ ,2,’coksıcak’ , ‘trimf’ , [20 50 50]);

 

b=addvar(b,’output’,’motorsure’ , [0 60]);

b=addmf(b, ‘output’ ,1,’cokaz’ , ‘trimf’ , [-35 0 15]);

b=addmf(b, ‘output’ ,1,’az’ , ‘trimf’ , [0 20 35]);

b=addmf(b, ‘output’ ,1,’orta’ , ‘trimf’ , [18 30 45]);

b=addmf(b, ‘output’ ,1,’fazla’ , ‘trimf’ , [30 45 60]);

b=addmf(b, ‘output’ ,1,’cokfazla’ , ‘trapmf’ , [35 60 80 100]);

 

b=addvar(b,’output’,’devirsayısı’ , [0 250]);

b=addmf(b, ‘output’ ,2,’cokyavasdevir’ , ‘trapmf’ , [-50 0 25 50]);

b=addmf(b, ‘output’ ,2,’yavasdevir’ , ‘trimf’ , [25 75 100]);

b=addmf(b, ‘output’ ,2,’idealhız’ , ‘trapmf’ , [55 95 125 175]);

b=addmf(b, ‘output’ ,2,’hızlıdevir’ , ‘trimf’ , [150 180 225]);

b=addmf(b, ‘output’ ,2,’cokhızlıdevir’ , ‘trapmf’ , [200 225 250 250]);

 

rulkey=[ 1 0 5 5 1 1;2 3 2 2 1 1;2 4 2 3 1 1;3 0 1 1 1 1;2 5 3 4 1 1;2 1 2 1 1 1;2 2 1 3 1 1];

b=addrule(b,rulkey);