Reasoning Under Uncertainty (7hrs) · Introduction to AI

Introduction to fuzzy logic and fuzzy sets

Watch lectures

Introduction to Fuzzy Logic and Fuzzy Sets — Beginner-Friendly Notes

1. Why Fuzzy Logic Exists

Classical sets/logic are crisp: hot or not, true or false. Real language is vague: "warm", "tall", "high temperature" are matters of degree. Fuzzy logic formalises degrees of truth in [0,1].

Crisp: x∈Setx \in Set is 0 or 1. Fuzzy: μSet(x)∈[0,1]μ_Set(x) \in [0,1] is degree of membership.

2. Fuzzy Sets — Core Idea

A fuzzy set AA is characterised by membership function μA(x)μ_A(x).

Example — Temperature:

  • Crisp: Hot={x∣x>30°C}Hot = \{x | x > 30°C\} → 30.1°C is hot, 29.9°C is not (brittle edge).
  • Fuzzy: μHot(x)μ_Hot(x) rises gradually: μHot(25)=0.2μ_Hot(25)=0.2, μHot(30)=0.6μ_Hot(30)=0.6, μHot(35)=1.0μ_Hot(35)=1.0 — no sharp boundary.

Common membership shapes: triangular, trapezoidal, Gaussian.

3. Operations (like sets, but on membership degrees)

For fuzzy sets A,BA,B at element xx:

  • Complement: $μ_{
    eg A}(x)=1-μ_A(x)$
  • Intersection (AND): μA∧B(x)=min⁡(μA(x),μB(x))μ_{A \land B}(x)=\min(μ_A(x), μ_B(x)) (often min⁡\min)
  • Union (OR): μA∨B(x)=max⁡(μA(x),μB(x))μ_{A \lor B}(x)=\max(μ_A(x), μ_B(x)) (often max⁡\max)
  • Product alternative: μA∧B=μA⋅μBμ_{A \land B}=μ_A \cdot μ_B (also used)

4. Fuzzy Logic — Rules and Inference (concept)

Fuzzification: crisp input → fuzzy degrees (e.g., temp 32°C → Hot 0.7, Warm 0.3).

Fuzzy rules: IF TemperatureTemperature is Hot AND HumidityHumidity is High THEN FanFan is Fast (linguistic rules).

Inference: combine rule premises via min⁡/max⁡\min/\max, then aggregate consequents.

Defuzzification: fuzzy result → crisp action (e.g., centroid of output fuzzy set → fan speed 78%).

Pipeline:

Crisp inputs → Fuzzify → Rule Evaluation → Aggregate → Defuzzify → Crisp output

Example — AC controller: inputs: temp/membership, humidity/membership → rules like "if hot and humid then cool high" → defuzzify to compressor power.

5. Fuzzy vs Probability (exam must-distinguish)

  • Probability: uncertainty about whether event occurs (randomness) — e.g., P(rain)=0.6P(rain)=0.6.
  • Fuzziness: degree to which property holds (vagueness) — e.g., "rain is heavy" to degree 0.6.
    Both use [0,1] but mean different things.

6. Where Used

  • Control systems (washing machines, AC, cement kilns), early expert systems, Japanese trains, consumer electronics — where human-like vague rules suffice without precise models.

7. One-Line Summary

Fuzzy sets generalise crisp sets with membership μA(x)∈[0,1]μ_A(x)\in[0,1] and fuzzy logic reasons with linguistic if-then rules via fuzzification, min⁡/max⁡\min/\max inference and defuzzification, modelling vagueness rather than randomness.

8. Quick Self-Check

  1. Give μHot(28°C)μ_Hot(28°C) for a triangular Hot that starts at 20, peaks at 40.
  2. Why is "tall person = 180cm threshold" crisp but inadequate?
AI LearningWeb Platform

Coursify — Personal AI Course Generator

Struggling with a difficult subject or concept? Turn any engineering topic into a structured course with interactive lessons, quizzes, and research-backed explanations.

← All Introduction to AI modules