Soft computing
Soft computing
● Crisp Set: A person is "Tall" if height ≥ 180 cm, else "Not Tall".
○ H={180,185,190,195}H = \{180, 185, 190, 195\}
● Fuzzy Set: A person is "Tall" with varying degrees of membership:
○ H={(160,0.2),(170,0.5),(180,0.8),(190,1.0)}H = \{ (160, 0.2), (170, 0.5), (180, 0.8),
(190, 1.0) \}
In a fuzzy set, a person who is 170 cm tall may be considered "partially tall" with a
membership value of 0.5, rather than being strictly "tall" or "not tall".
Consider a fuzzy logic system that controls a fan’s speed based on temperature.
○ A temperature of 18°C might belong to both "Low" (0.7) and "Medium" (0.3).
○ A temperature of 28°C might belong to both "Medium" (0.6) and "High" (0.4).
3. Decision Making (Fuzzy Inference System - FIS):
○ If temperature = 25°C, the system calculates fan speed as moderate (60%) and
fast (40%), leading to a final speed of 70% rotation speed.
Final Summary
Topic Key Takeaways
● Definition: The union of two fuzzy sets A ∪ B is computed using the maximum of their
membership functions.
● Formula: μA∪B(x)=max(μA(x),μB(x))\mu_{A \cup B}(x) = \max (\mu_A(x), \mu_B(x))
● Example:
Let fuzzy sets be:
○ A (Tall People): μ_A(170) = 0.5, μ_A(180) = 0.8
○ B (Heavy People): μ_B(170) = 0.6, μ_B(180) = 0.7
○ A ∪ B (Tall OR Heavy People):
■ μ_A∪B(170) = max(0.5, 0.6) = 0.6
■ μ_A∪B(180) = max(0.8, 0.7) = 0.8
● Definition: The intersection of two fuzzy sets A ∩ B is computed using the minimum of
their membership functions.
● Formula: μA∩B(x)=min(μA(x),μB(x))\mu_{A \cap B}(x) = \min (\mu_A(x), \mu_B(x))
● Example:
○ A ∩ B (Tall AND Heavy People):
■ μ_A∩B(170) = min(0.5, 0.6) = 0.5
■ μ_A∩B(180) = min(0.8, 0.7) = 0.7
2. Fuzzy Relations
A fuzzy relation describes how two fuzzy sets are connected. It extends the concept of
classical relations by allowing partial membership instead of strict relationships.
R(A,B)=A×BR(A, B) = A \times B
Example:
Here, a young person has a high membership (0.9) in the low salary category.
Condition Action
Unlike classical logic (which is true or false), fuzzy propositions assign partial truth values.
3.3. Fuzzy Implications
Fuzzy implications define how the truth of one fuzzy statement affects another.
● Uses minimum operation for "AND" and maximum operation for "OR".
● Example:
○ IF Humidity is High (0.8) AND Temperature is Hot (0.7),
○ THEN Air Conditioner Power = min(0.8, 0.7) = 0.7.
3.
Inference System Execution:
Final Summary
Concept Key Takeaway
Fuzzy Rules & Inference Uses "IF-THEN" logic for decision making
1. Defuzzification Techniques
1.1 What is Defuzzification?
Defuzzification is the process of converting fuzzy output (membership values between 0
and 1) into a single crisp value. Since fuzzy logic systems process information in a fuzzy
manner, we need to extract precise numerical values for real-world use.
● Machines and actuators require crisp values (e.g., fan speed must be set to a
specific RPM).
● Humans need precise decisions (e.g., "Set AC to 25°C, not 'somewhat cool'").
● Bridges the gap between fuzzy logic and real-world applications.
2. Bisector Method Splits the fuzzy area into two Used when COG is too
equal halves computationally expensive
4. Largest of Maximum Takes largest x-value where Used when preference is for
(LoM) membership is max larger outputs
5. Smallest of Maximum Takes smallest x-value where Used when preference is for
(SoM) membership is max smaller outputs
Example: Defuzzification of Fan Speed
2. Rule Base Set of if-then rules defining "IF temperature is Hot, THEN fan
(Knowledge Base) system behavior speed is High"
Anti-lock Braking System (ABS) Adjusts braking force based on road conditions
Pacemakers & Life Support Adjusts heart pacing based on patient conditions
Final Summary
Concept Key Takeaways
Fuzzy Logic Controller (FLC) A system that makes decisions based on fuzzy
rules
● Fuzzy logic extends classical logic by allowing values between 0 and 1, rather than just
True (1) or False (0).
● It mimics human reasoning in situations where decisions are not purely black or white.
● Example: Instead of defining "Tall" as height > 180 cm, fuzzy logic allows partial
membership (e.g., 175 cm is 0.7 "Tall").
A Fuzzy Inference System (FIS) processes fuzzy inputs and generates a decision.
Since fuzzy logic produces fuzzy outputs, defuzzification converts them into crisp values for
practical use.
Centroid Method (COG) Computes center of gravity Most common, used in AI &
robotics
Largest of Maximum Takes largest x-value with max Used when higher values
(LoM) membership are preferred
Smallest of Maximum Takes smallest x-value with max Used when lower values are
(SoM) membership preferred
1. Define inputs (e.g., temperature, humidity) and outputs (e.g., fan speed).
2. Define fuzzy sets and membership functions.
3. Create a rule base (e.g., "IF temperature is High, THEN fan speed is Fast").
4. Use fuzzy inference to process inputs.
5. Apply defuzzification to generate a crisp output.
Final Summary
Concept Key Takeaways
Fuzzy Sets Membership values range between 0 and 1, rather than strict True/False
Fuzzy Inference Uses IF-THEN rules to process fuzzy data and make decisions
Defuzzification Converts fuzzy values into precise outputs for real-world use
Conclusion
Fuzzy logic enables intelligent decision-making in systems where data is uncertain or
imprecise. It is widely applied in AI, automation, medical diagnosis, control systems, and
robotics, making it a crucial part of soft computing.