$ This information is provided by the
$ Aptronix FuzzyNet
$ http://www.aptronix.com/fuzzynet
$ email fuzzynet@aptronix.com
$ Aptronix may also be reached by phone
$ at 408-261-1898 or
$ FAX at 408-490-2729
$
$ FILENAME: pdlm2.fil
$ this symbol is the comment symbol
$ the part from symbol $ to the end of line is ignored
$ next line is empty and is ignored
fiu tvfi (min max);
$mamdani/tvfi (min max prod sum binter bunion) 1.0 4 5 6 7 8
>velocity " " [
PL (@0,255, @32,255, @80,0),
PM (@32,0, @80, 255, @112,0),
PS (@80,0, @112,255, @144,0),
NS (@112,0, @144,255, @176,0),
NM (@144,0, @176,255, @222,0),
NL (@176,0, @222,255, @255,255)
];
$ end of labels
>angle " " [
NL (@0,255, @64,0),
NM (@0,0, @64, 255, @128,0),
ZR (@64,0, @128,255, @192,0),
PM (@128,0, @192,255, @255,0),
PL (@192,0, @255,255)
];
< voltage "volt" * (
NL = 0, $ voltage is an output variable
NM = 90, $ *=centroid, ^= max, ^+=right max, ^-=left max.
NS = 106,
PS = 150,
PM = 166,
PL = 255
);
$ rules start here:
if velocity is NL and angle is NL then voltage is NL;
if velocity is NL and angle is NM then voltage is NL;
if velocity is NL and angle is ZR then voltage is NL;
if velocity is NL and angle is PM then voltage is NM;
if velocity is NL and angle is PL then voltage is NS;
if velocity is NM and angle is NL then voltage is NL;
if velocity is NM and angle is NM then voltage is NL;
if velocity is NM and angle is ZR then voltage is NM;
if velocity is NM and angle is PM then voltage is NS;
if velocity is NM and angle is PL then voltage is PS;
if velocity is NS and angle is NL then voltage is NL;
if velocity is NS and angle is NM then voltage is NM;
if velocity is NS and angle is ZR then voltage is NS;
if velocity is NS and angle is PM then voltage is PS;
if velocity is NS and angle is PL then voltage is PM;
if velocity is PS and angle is NL then voltage is NM;
if velocity is PS and angle is NM then voltage is NS;
if velocity is PS and angle is ZR then voltage is PS;
if velocity is PS and angle is PM then voltage is PM;
if velocity is PS and angle is PL then voltage is PL;
if velocity is PM and angle is NL then voltage is NS;
if velocity is PM and angle is NM then voltage is PS;
if velocity is PM and angle is ZR then voltage is PM;
if velocity is PM and angle is PM then voltage is PL;
if velocity is PM and angle is PL then voltage is PL;
if velocity is PL and angle is NL then voltage is PS;
if velocity is PL and angle is NM then voltage is PM;
if velocity is PL and angle is ZR then voltage is PL;
if velocity is PL and angle is PM then voltage is PL;
if velocity is PL and angle is PL then voltage is PL
end