• Tidak ada hasil yang ditemukan

Rule (i)

N/A
N/A
Protected

Academic year: 2024

Membagikan "Rule (i)"

Copied!
23
0
0

Teks penuh

(1)
(2)
(3)

Rule (i):

IF <FP1i> THEN <FP2i> : Rule Base دعاوق هاگیاپ ) ) دشاب هدش داجیا دناوت یم یناسنا شناد ساسارب هک

.

(4)
(5)

Input: x

1

, x

2

, …, x

i

, …, x

N

دادعت n

1

n

2

n

i

n

N
(6)

Output: y: B

1

, B

2

, …, B

i

, …, B

N

دادعت : n

y
(7)
(8)

هجیتن ،ینادمم مازلتسا ساسارب Rule (k)

دوب دهاوخ ریز تروص هب

:

(9)

نکمم تسا

یلیخ زا

نیا نیناوق

اب مه رد

داضت

،دنشاب هب

نیمه

لیلد زا

بیکرت یلصف

(s-norm) نیا

نیناوق

رد هلحرم

عیمجت

هدافتسا دوش یم

.

(10)

زا یکی زا

یاه شور یزافان

یزاس دیاب

هدافتسا درک

و هجیتن

لصاح ار

هب کی ددع

رلاکسا لیدبت

دومن .

لاثم زا

یکی زا

یاه شور ریز

هدافتسا درک

:

(11)

یکی رگید

زا ییاه شور هک

رد سکابلوت یزاف

بلتم هدافتسا

هدش شور

Bisector تسا

.

(12)

یکی رگید

زا ییاه شور هک

رد سکابلوت یزاف

بلتم هدافتسا

هدش شور

SOM

، MOM

و LOM تسا

. Smallest

Mean of Maxima.

Largest

(13)

یکی زا

شور هدافتسا

زا سابلوت یزاف

بلتم تسا

. شور رگید

نتشون تاروتسد

رد کی همانرب

تسا .

یتاروتسد هک

رد بلتم یم

ناوت زا

اهنآ یارب

داجیا کی

متسیس

یزاف زا

اهنآ هدافتسا

درک دنترابع

زا :

newfis 

addvar 

addmf 

addrule 

(14)

newfis  :

کی متسیس

دیدج یزاف

ار داجیا یم

دنک .

a=newfis(fisName,fisType,andMethod,orMethod, impMethod,aggMethod,defuzzMethod);

لاثم :

fisName='MyFis';

fisType='mamdani';

andMethod='min';

orMethod='max';

impMethod='min';

aggMethod='max';

defuzzMethod='bisector';

(15)

addvar  :

اهریغتم ار

داجیا

،دنک یم اه یدورو

( Inputs )

و اه یجورخ (

Outputs )

a = addvar(a,'varType','varName',varBounds);

لاثم :

fis=addvar(fis,'input','Velocity',[0 140]);

fis=addvar(fis,'input','Distance',[0 100]);

fis=addvar(fis,'output','Acceleration',[-100 100]);

(16)

addmf  :

عباوت تیوضع

ار داجیا یم

دنک .

a = addmf(a,'varType',varIndex,'mfName','mfType', mfParams);

لاثم :

fis=addmf(fis,'input',1,'LS','trapmf',[-inf -inf 30 50]);

fis=addmf(fis,'input',1,'MS','trapmf',[30 50 70 90]);

fis=addmf(fis,'input',1,'HS','trapmf',[70 90 inf inf]);

fis=addmf(fis,'input',2,'SD','gaussmf',[21.23,0]);

fis=addmf(fis,'input',2,'MD','gaussmf',[21.23,50]);

fis=addmf(fis,'input',2,'LD','gaussmf',[21.23,100]);

(17)

addmf  :

لاثم :

fis=addmf(fis,'output',1,'NB','trapmf',[-inf -inf -80 -20]);

fis=addmf(fis,'output',1,'NS','trimf',[-80 -20 0]);

fis=addmf(fis,'output',1,'ZR','trimf',[-20 0 20]);

fis=addmf(fis,'output',1,'PS','trimf',[0 20 80]);

fis=addmf(fis,'output',1,'PB','trapmf',[30 69 inf inf]);

(18)

addrule  :

نیناوق ار

داجیا دنک یم

.

a = addrule(a,ruleList) ;

The format that the rule list matrix must take is very specific. If there are m inputs to a system and n outputs, there must be exactly m + n + 2 columns to the rule list.

The first m columns refer to the inputs of the system. Each column contains a number that refers to the index of the membership function for that variable.

The next n columns refer to the outputs of the system. Each column contains a number that refers to the index of the membership function for that variable.

The m + n + 1 column contains the weight that is to be applied to the rule. The weight must be a number between zero and one and is generally left as one.

The m + n + 2 column contains a 1 if the fuzzy operator for the rule's antecedent is AND. It contains a 2 if the fuzzy operator is OR.

(19)

addrule  :

لاثم :

Rules=[1 1 3 1 1 1 2 4 1 1

1 3 5 1 1 2 1 2 1 1 2 2 3 1 1 2 3 4 1 1 3 1 1 1 1

3 2 2 1 1 3 3 3 1 1];

fis=addrule(fis,Rules);

LD MD

SD D

V

PB PM

ZR LS

PM ZR

NM MS

ZR NM

NB

HS

(20)

surfview()  :

راتفر یدورو

و یجورخ ار

تبسن هب

مه

ناشن دهد یم

هک تلاح هتسویپ

دراد

. هب نیناوق :ruleview()  تروص

یکیفارگ ار

شیامن

دهد یم

. 

plotmf() :

عباوت تیوضع

ار شیامن دهد یم

.

لاثم  :

surfview(fis) ruleview(fis)

plotmf(fis,'input',1)

(21)

 Y = evalfis (U , FIS)

This function simulates the Fuzzy Inference System FIS for the input data U and returns the output data Y.

لاثم :

Acceleration=evalfis(Inputs,fis);

(22)

surfview(fis) ruleview(fis)

figure

plotmf(fis,'input',1) figure

plotmf(fis,'input',2) figure

plotmf(fis,'output',1)

Distance=20;

Velocity=linspace(0,140,800)';

Inputs=[Velocity Distance*ones(size(Velocity))];

Acceleration=evalfis(Inputs,fis);

figure

plot(Velocity,Acceleration);

لاثم

:

(23)

یم  ناوت

هجیتن ار

رد کی لیاف

اب روتسد writefis

هریخذ

درک .

لاثم :

FileName='MyFis.fis';

writefis(fis,FileName);

Referensi

Dokumen terkait

هنیهب یرتکاب طسوت میساتپ للاحنا یزاس Pseudomonas fluorescens حرط زا هدافتسا اب تکلاپ - خساپ حطس شور و نمرب RSM ولدیعس یفرشا زاناس -1 یدمص سابع -2 ینایقدص یلوسر نسحریم 2 -*