Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
11 views16 pages

Soft Computing Assignment 1

The document outlines an assignment on designing a controller for determining the wash time of a washing machine using the Mamdani method. It details the process of defining input and output variables, establishing fuzzy rules, fuzzification, rule evaluation, and defuzzification to derive the wash time based on the dirtiness of clothes. Additionally, it compares the Mamdani method with the Sugeno fuzzy model, highlighting their respective advantages in interpretability and computational efficiency.

Uploaded by

dkvidsemail
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views16 pages

Soft Computing Assignment 1

The document outlines an assignment on designing a controller for determining the wash time of a washing machine using the Mamdani method. It details the process of defining input and output variables, establishing fuzzy rules, fuzzification, rule evaluation, and defuzzification to derive the wash time based on the dirtiness of clothes. Additionally, it compares the Mamdani method with the Sugeno fuzzy model, highlighting their respective advantages in interpretability and computational efficiency.

Uploaded by

dkvidsemail
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Soft Computing

Assignment
ROHIT KUMAR 2023UCM2382
DHEERAJ 2023UCM2313
QUESTION 1

Design a controller to determine the wash time of a domestic washing


machine.
Assume the input is dirt and grease on clothes. Use three descriptors for input
variables and five descriptors for output variable. Derive the set of rules for
controller action and defuzzification. The design should be supported by
figures
wherever possible. Show that if the clothes are soiled to a larger degree, the
wash time will be more and vice versa. Solve using MAMDANI METHOD.
Show all the steps.
MAMDANI •Define input & output variables with linguistic terms.
•Define membership functions for each variable.
METHOD
•Establish fuzzy rules (If-Then statements).
•Fuzzify input values using membership functions.
•Apply rules using min operator.
•Aggregate outputs using max operator.
•Defuzzify (Centroid) to get crisp wash time.
•Validate that higher dirt → higher wash time.
INPUT (DIRTINESS) OUTPUT (WASH TIME)

INPUT & OUTPUT LOW VERY SHORT

MEDIUM SHORT
VARIABLES
HIGH MEDIUM

LONG

VERY LONG
MEMBERSHIP
FUNCTIONS (INPUT)

SCALE: 0 (CLEAN) – 10 (DIRTY)


LOW: 0–4
MEDIUM: 3–7
HIGH: 6–10
MEMBERSHIP
FUNCTIONS (OUTPUT)
WASH TIME SCALE: 10 – 60 MINS
VERY SHORT: 10–20
SHORT: 20–30
MEDIUM: 30–40
LONG: 40–50
VERY LONG: 50–60
RULE BASE
WE NEED TO DEFINE RULES BASED ON INPUT-
OUTPUT RELATIONSHIP.
SINCE WE HAVE 1 INPUT (DIRTINESS) AND 5 OUTPUT
DESCRIPTORS, RULES COULD BE:
1.IF DIRTINESS IS LOW → WASH TIME IS VERY SHORT
2.IF DIRTINESS IS MEDIUM → WASH TIME IS MEDIUM
3.IF DIRTINESS IS HIGH → WASH TIME IS VERY LONG

TO MAKE IT SMOOTHER, WE CAN USE 5 RULES BY


SPLITTING MEDIUM INPUT INTO LOW-MEDIUM AND
HIGH-MEDIUM:
FUZZIFICATION

•Suppose actual dirtiness = 7 (on a 0–10 scale).


•We find its membership in Low, Medium, High:
1 .Low: μ_low(7) = 0 (outside range)
2.Medium: μ_med(7) = (8−7)/(8−5) = 1 /3 ≈ 0.33
3.High: μ_high(7) = (7−6)/(10−6) = 1 /4 = 0. 25

Interpretation: Clothes are somewhat Medium dirty and


slightly High dirty.
RULE EVALUATION
•USE THE MIN OPERATOR FOR AND/OR. APPLY FUZZIFICATION TO
OUTPUT:
•RULE 3: IF MEDIUM (Μ=0.33) → WASH TIME = MEDIUM → CLIP
MEDIUM MEMBERSHIP AT 0.33
•RULE 5: IF HIGH (Μ=0.25) → WASH TIME = VERY LONG → CLIP
VERY LONG MEMBERSHIP AT 0.25
•OUTPUT FUZZY SET AFTER AGGREGATION: TAKE MAX FOR
OVERLAPPING RANGES.
•MEDIUM: 0.33
•VERY LONG: 0.25
GRAPHICALLY, YOU WOULD CLIP THE TRIANGLES AT THESE
HEIGHTS AND COMBINE
DEFUZZIFICATION

Weighted Average
(Centroid):
Medium (32.5 min, μ=0.33)
Very Long (52.5 min, μ=0.25)
Result = 41.1 min
QUESTION 2
SUGENO FUZZY MODEL – GENERAL STEPS

1.Fuzzification – compute the degree of membership for each input using its
membership functions.
2.Rule Evaluation – identify which fuzzy rules are triggered based on nonzero
memberships and calculate their firing strengths (often the min of memberships).
3.Rule Output Calculation – each rule produces a crisp output (a constant or linear
function).
4.Aggregation – combine all outputs using a weighted average, where weights are
firing strengths.
5.Defuzzification (Output Computation) – the final crisp result is obtained by dividing
the weighted sum of outputs by the sum of firing strengths.
FUZZIFICATION

FOR INPUT 1 (I₁ = 6):


LOW (L): Μ = (10 – 6) / (10 – 5) = 0.8
MEDIUM (M): Μ = (6 – 5) / (10 – 5) = 0.2
HIGH (H): SINCE I₁ < 10, Μ = 0
FOR INPUT 2 (I₂ = 2.2):
NOT KNOWN (NK): SINCE I₂ > 2, Μ = 0
FAMILIAR (FR): Μ = (3 – 2.2) / (3 – 2) = 0.8
VERY FAMILIAR (VF): Μ = (2.2 – 2) / (3 – 2) = 0.2
Rule Output Calculation
Compute crisp outputs using the rule equations:
•Rule 1: y1 = I1 + 2 × I2 = 6 + 2 × 2.2 = 10.4
•Rule 2: y2 = I1 + 3 × I2 = 6 + 3 × 2.2 = 12.6
•Rule 3: y3 = 2 × I1 + 2 × I2 = 2 × 6 + 2 × 2.2 = 16.4 Final Answer:
•Rule 4: y4 = 2 × I1 + 3 × I2 = 2 × 6 + 3 × 2.2 = 18.6 The output of the
Sugeno fuzzy model for
Defuzzification L1 = 6 and L2 = 2.2 is
Compute the weighted average of the outputs: approximately 12.74
•Numerator:
•(0.8 × 10.4) + (0.2 × 12.6) + (0.2 × 16.4) + (0.2 × 18.6)
•= 8.32 + 2.52 + 3.28 + 3.72 = 17.84
•Denominator:
•0.8 + 0.2 + 0.2 + 0.2 = 1.4
Conclusion
In Mamdani, output is obtained using fuzzy sets + centroid defuzzification.
In Sugeno, outputs are either constants or functions, and the final result is a
weighted average.
Both models prove useful: Mamdani for interpretability, Sugeno for efficiency
in computation.

You might also like