This document contains an attempt at answering the questions from the 2009 CS4001 Fuzzy Logic exam
A = Men
& B = Women
S:
𝝁A: small(x) = 1 if x ≤ 142
𝝁A: small(x) = (172-x)/(172-142) if 142 < x ≤ 172
𝝁A: small(x) = 0 if x ≥ 172
𝝁B: small(x) = 1 if x ≤ 137
𝝁B: small(x) = (161-x)/(161-137) if 137 < x ≤ 161
𝝁B: small(x) = 0 if x ≥ 161
T:
𝝁A: tall(x) = 1 if x ≥ 191
𝝁A: tall(x) = (191-x)/(191-167) if 167 < x ≤ 191
𝝁A: tall(x) = 0 if x ≤ 167
𝝁B: tall(x) = 1 if x ≥ 186
𝝁B: tall(x) = (186-x)/(186-160) if 160 < x ≤ 186
𝝁B: tall(x) = 0 if x ≤ 160
The linguistic hedge very changes the membership function of a fuzzy set to its square.
02 = 0
and 12 = 1
, so the derived membership functions are:
A = Men
& B = Women
VS Derived:
𝝁A: small(x) = 1 if x ≤ 142
𝝁A: small(x) = ((172-x)/(172-142))2 if 142 < x ≤ 172
𝝁A: small(x) = 0 if x ≥ 172
𝝁B: small(x) = 1 if x ≤ 137
𝝁B: small(x) = ((161-x)/(161-137))2 if 137 < x ≤ 161
𝝁B: small(x) = 0 if x ≥ 161
VVS Derived:
𝝁A: small(x) = 1 if x ≤ 142
𝝁A: small(x) = ((172-x)/(172-142))4 if 142 < x ≤ 172
𝝁A: small(x) = 0 if x ≥ 172
𝝁B: small(x) = 1 if x ≤ 137
𝝁B: small(x) = ((161-x)/(161-137))4 if 137 < x ≤ 161
𝝁B: small(x) = 0 if x ≥ 161
VT Derived:
𝝁A: tall(x) = 1 if x ≥ 191
𝝁A: tall(x) = ((191-x)/(191-167))2 if 167 < x ≤ 191
𝝁A: tall(x) = 0 if x ≤ 167
𝝁B: tall(x) = 1 if x ≥ 186
𝝁B: tall(x) = ((186-x)/(186-160))2 if 160 < x ≤ 186
𝝁B: tall(x) = 0 if x ≤ 160
VVT Derived:
𝝁A: tall(x) = 1 if x ≥ 191
𝝁A: tall(x) = ((191-x)/(191-167))4 if 167 < x ≤ 191
𝝁A: tall(x) = 0 if x ≤ 167
𝝁B: tall(x) = 1 if x ≥ 186
𝝁B: tall(x) = ((186-x)/(186-160))4 if 160 < x ≤ 186
𝝁B: tall(x) = 0 if x ≤ 160
It can be seen that the membership functions that have been derived will give different membership values than the ones listed in the tables, for the same heights:
VS From table:
𝝁A: very small(129) = 1
𝝁A: very small(143) = 0.5
𝝁A: very small(157) = 0
𝝁B: small(131) = 1
𝝁B: small(143) = 0.5
𝝁B: small(155) = 0
VS From derivations:
𝝁A: very small(129) = 1
𝝁A: very small(143) = 0.934
𝝁A: very small(157) = 0.25
𝝁B: small(131) = 1
𝝁B: small(143) = 0.562
𝝁B: small(155) = 0.062
VVS From table:
𝝁A: very very small(126) = 1
𝝁A: very very small(137) = 0.5
𝝁A: very very small(148) = 0
𝝁B: very very small(117) = 1
𝝁B: very very small(135) = 0.5
𝝁B: very very small(153) = 0
VVS From Derivations:
𝝁A: very very small(126) = 1
𝝁A: very very small(137) = 1
𝝁A: very very small(148) = 0.401
𝝁B: very very small(117) = 1
𝝁B: very very small(135) = 1
𝝁B: very very small(153) = 0.0123
VT From table:
𝝁A: very tall(202) = 1
𝝁A: very tall(189) = 0.5
𝝁A: very tall(176) = 0
𝝁B: very tall(192) = 1
𝝁B: very tall(181) = 0.5
𝝁B: very tall(170) = 0
VT From Derivations:
𝝁A: very tall(202) = 1
𝝁A: very tall(189) = 0.840
𝝁A: very tall(176) = 0.1406
𝝁B: very tall(192) = 1
𝝁B: very tall(181) = 0.652
𝝁B: very tall(170) = 148
VVT From table:
𝝁A: very very tall(214) = 1
𝝁A: very very tall(198) = 0.5
𝝁A: very very tall(182) = 0
𝝁B: very very tall(208) = 1
𝝁B: very very tall(191) = 0.5
𝝁B: very very tall(174) = 0
VVT From Derivations:
𝝁A: very very tall(214) = 1
𝝁A: very very tall(198) = 1
𝝁A: very very tall(182) = 0.1526
𝝁B: very very tall(208) = 1
𝝁B: very very tall(191) = 1
𝝁B: very very tall(174) = 0.084
The different memberships functions given for the same values show that the derived membership functions are not the same as those listed in the table.
Note to student readers: It is difficult to decipher the model answer, but my answer is shown below
The results above show that there is a shift in class frontier, as if there were only a steepening in the membership functions from the hedge VERY then the values for 𝝁(x) would not change for x = 0
or x = 1
. We can see above that the values for 𝝁(x) do change for these values.
Note to student readers: I've put this is a slightly different layout than the model answer.
Here are properties of T-Norm:
Requirement | Satisfaction |
---|---|
Boundary | T(0,0) = 0 & T(a,1) = T(1,a) = a |
Monotonicity | T(a,b) < T(c,d) if a<c & b<d |
Commutativity | T(x,y) = T(y,x) |
Associativity | T(x, T(y,z)) = T(T(x,z),y) |
The properties of T-Norm imply:
T(1,0) = 0
T(1,0.5) = 0.5
T(1,1) = 1
T(0,1) = 0
0 ≤ T(0,0.5) ≤ T(0,1) = 0
0 ≤ T(0,0) ≤ T(0,1) = 0
0 ≤ T(0.5,0) ≤ T(1,0) = 0
T(0.5,1) = 0.5
And finally for T(0.5,0.5)
:
0 ≤ T(0,0) ≤ T(0.5,0.5) ≤ T(1,0.5) = 0.5
So T(0.5,0.5) = 0
or T(0.5,0.5) = 0.5
...
I think Gordon could make use of a Fuzzy Based Knowledge system because he can then make use of his Fuzzy non-crips concepts such as 'RANCID' and 'GRAND'.
Gordon, who knows how much he wants to give the staff under different circumstances, may not have the capabilities to come up with the complex equations to perfectly model what he means for them to be tipped in certain circumstances. By using a Fuzzy Based Knowledge system, Gordon can model highly non-linear functions in a way that is intuitive to him.
Linguistic Variables:
SERICE,FOOD,TIP
Term sets:
SERVICE = {POOR,AVERAGE,SUPERB}
FOOD = {RANCID,GOOD,GRAND}
TIP = {SMALL,ORDINARY,GENEROUS}
Service:
𝝁poor(x) = 1 if x ≤ 2
𝝁poor(x) = (8-x)/(8-2) if 2 < x < 8
𝝁poor(x) = 0 if x ≥ 8
𝝁superb(x) = 0 if x ≤ 2
𝝁superb(x) = 1-(8-x)/(8-2) if 2 < x < 8
𝝁superb(x) = 1 if x ≥ 8
𝝁average(x) = 0 if x ≤ 2
𝝁average(x) = 2*(1-(8-x)/(8-2)) if 2 < x < 5
𝝁average(x) = 2*(8-x)/(8-2) if 5 ≤ x < 8
𝝁average(x) = 0 if x ≥ 8
Food:
𝝁rancid(x) = 1 if x ≤ 2
𝝁rancid(x) = (8-x)/(8-2) if 2 < x < 8
𝝁rancid(x) = 0 if x ≥ 8
𝝁grand(x) = 0 if x ≤ 2
𝝁grand(x) = 1-(8-x)/(8-2) if 2 < x < 8
𝝁grand(x) = 1 if x ≥ 8
𝝁average(x) = 0 if x ≤ 2
𝝁average(x) = 2*(1-(8-x)/(8-2)) if 2 < x < 5
𝝁average(x) = 2*(8-x)/(8-2) if 5 ≤ x < 8
𝝁average(x) = 0 if x ≥ 8
Tip:
𝝁small(x) = 1 if x ≤ 1/3
𝝁small(x) = (2/3-x)/(2/3-1/3) if 1/3 < x < 2/
𝝁small(x) = 0 if x ≥ 2/3
𝝁generous(x) = 0 if x ≤ 1/3
𝝁generous(x) = 1-(2/3-x)/(2/3-1/3) if 1/3 < x < 2/
𝝁generous(x) = 1 if x ≥ 2/3
𝝁average(x) = 0 if x ≤ 1/3
𝝁average(x) = 2*(1-(2/3-x)/(2/3-1/3)) if 1/3 < x < 1/2
𝝁average(x) = 2*(2/3-x)/(2/3-1/3) if 1/2 ≤ x < 2/3
𝝁average(x) = 0 if x ≥ 2/3
Fuzzification:
In the fuzzification step, the inputs are put in the membership functions of the fuzzy sets:
SERVICE:
𝝁poor(3) = 5/6
𝝁average(3) = 1/3
𝝁superb(3) = 1/6
FOOD:
𝝁rancid(7) = 1/6
𝝁average(7) = 1/3
𝝁grand(7) = 5/6
Rule 1 firing degree: min(1/6,5/6) = 1/6
Rule 2 firing degree: min(1/3,1/3) = 1/3
Rule 3 firing degree: min(1/6,5/6) = 1/6
Inference:
In the inference step, the firing degrees are combined with the rule outputs:
TODO: ....
In the classical operation of process control, to be able to calculate u(t) one needs to define the constants KP, KD & KD. These constants are very difficult to find for the process to behave the way it should.
In process control that uses fuzzy logic, u(t) is defined in fuzzy terms that are intuitive and easy for humans to come up with.
Temperature = {COLD, COOL, PLEASANT, WARM, HOT}
SPEED = {BLAST, MINIMAL, SLOW, FAST, MEDIUM}
Rule 1: IF Temperature is HOT THEN Speed is BLAST
Rule 2: IF Temperature is COLD THEN Speed is MINIMAL
Rule 3: IF Temperature is COOL THEN Speed is SLOW
Rule 4: IF Temperature is WARM THEN Speed is FAST
Rule 5: IF Temperature is PLEASANT THEN Speed is MEDIUM
I will be using a Zero-Order TSK controller to model the system because of the single crisp valued outputs from the output terms. In a Zero-Order TSK controller, the outputs are linear functions of the input values. TSK controllers are a lot easier and need no defuzzification.
Temperature:
𝝁COLD(x) = 1 if x < 10
𝝁COLD(x) = (15-x)/(15-10) if 10 ≤ x ≤ 15
𝝁COLD(x) = 0 if x > 15
𝝁COOL(x) = 0 if x < 10
𝝁COOL(x) = (x-10)/(15-10) if 10 ≤ x ≤ 15
𝝁COOL(x) = (18-x)/(18-15) if 15 < x ≤ 18
𝝁COOL(x) = 0 if x > 18
𝝁PLEASANT(x) = 0 if x < 14
𝝁PLEASANT(x) = (x-14)/(18-14) if 14 ≤ x ≤ 18
𝝁PLEASANT(x) = (22-x)/(22-18) if 18 < x ≤ 22
𝝁PLEASANT(x) = 0 if x > 22
𝝁WARM(x) = 0 if x < 20
𝝁WARM(x) = (x-20)/(25.5-20) if 20 ≤ x ≤ 25.5
𝝁WARM(x) = (29-x)/(29-25.5) if 25.5 < x ≤ 29
𝝁WARM(x) = 0 if x > 29
𝝁HOT(x) = 0 if x < 20
𝝁HOT(x) = 1-(27-x)/(27-20) if 20 ≤ x ≤ 27
𝝁HOT(x) = 1 if x > 27
Speed:
MINIMAL = 0
SLOW = 30
MEDIUM = 50
FAST = 75
BLAST = 100
Temperature = 12
𝝁COLD(12) = 0.6
𝝁COOL(12) = 0.4
𝝁PLEASANT(12) = 0
𝝁WARM(12) = 0
𝝁HOT(12) = 0
The following rules fire to the following degrees:
Rule 2 firing degree: 0.6
Rule 3 firing degree: 0.4
Output = (0*0.6 + 30*0.4)/(0.6+0.4) = 12