A fuzzy logic system has two crisp inputs, temperature and pressure.
Trapezoidal membership functions are specified by the four bytes
P1, P2, S1, |S2|, where P1 and P2 are the x-coordinates of the two base points
of the trapezoid and where S1 and |S2| are the absolute values of the
two slopes. The membership functions for temperature are as follows:
cold: $00, $33, $00, $0F
warm: $22, $99, $0F, $0F
hot: $88, $FF, $0F, $00
The membership functions for pressure are as follows:
low: $00, $44, $00, $0F
medium: $33, $BB, $0F, $0F
high: $AA, $FF, $0F, $00
The system has one crisp output, speed.
The singleton membership functions for speed are as follows:
slow = $30 , partial = $60 , fast = $90
The rule base is as follows:
Rule 1: If temperature is cold and pressure is low then speed is slow.
Rule 2: If temperature is cold and pressure is medium then speed is slow.
Rule 3: If temperature is cold and pressure is high then speed is partial.
Rule 4: If temperature is warm and pressure is low then speed is slow.
Rule 5: If temperature is warm and pressure is medium then speed is partial.
Rule 6: If temperature is warm and pressure is high then speed is fast.
Rule 7: If temperature is hot and pressure is low then speed is partial.
Rule 8: If temperature is hot and pressure is medium then speed is fast.
Rule 9: If temperature is hot and pressure is high then speed is fast.
-
Let the crisp temperature input be $24 and the crisp pressure input be $B0.
Calculate the fuzzy input values (expressed in hex format) for the
six input membership functions.
-
Assuming that the fuzzy output values had all been initialized to $00,
calculate the corresponding fuzzy output values (expressed in hex format)
for the three output membership functions.
-
Calculate the crisp output value for speed (expressed in hex format).