Fuzzy Logic Controller
FUZZY LOGIC CONTROLLER to determine the wash time of Domestic washing machines
Design a fuzzy logic controller to determine the wash time of the domestic washing machine. Assume the input is dirt & grease on clothes. Use three descriptors for input variables and five descriptors for output variables. Derive the set of rules for controller action and defuzzification. Show that if the cloths are solid to a larger degree the wash time will be more and vice versa.
Table of Contents
Step 1:
Define Input and Output Variables:
Input Variable:
- Dirt
(SD) Small dirt
(MD) Medium dirt
(LD) Large dirt
- Grease
(NG) No grease
(MG) Medium grease
(LG) Large grease
Output Variable:
- Wash Time
Very Short (VS)
Short (S)
Medium (M)
Long (L)
Very Long (VL)
Step 2:
Define Membership Functions:
Define membership functions and output variables (We use triangular Membership function)
* Membership Function for Dirt:
* Membership Function for Grease:
* Membership Function for Wash time:
Step 3:
From a rule base:
Step 4:
Rule Evaluation:
Assume Dirt = 60%, Grease = 70%
The above four equation leads to 4 rules that need to evaluate:
- Dirt is Medium and Grease is Medium
- Dirt is Medium and Grease is Large
- Dirt is Large and Grease is Medium
- Dirt is Large and Grease is Large
Since the antecedent part of each of the above rule is connected by and operator we use min operator to evaluate strength of each rule.
MAX Membership function
Step 5:
Defuzzification:
Since we use “Mean of Max” defuzzification technique
Maximum strength = Max (S1, S2, S3, S4)
= Max (3/5, 2/5, 1/5, 1/5)
= 3/5
This corresponds to rule 1
. Rule 1: Dirt is medium and Grease is medium has maximum strength (3/5)
To find out the final defuzzified value, we now take average (mean) of μM (z)
This is the output of wash time of washing machine. This is the practical application of Fuzzy logic controller