Unit2 Notes
Unit2 Notes
Fuzzy Logic: Fuzzy Sets, Operations on Fuzzy Sets, Fuzzy Relations, Membership Functions:
Fuzzy Rules and Fuzzy Reasoning, Fuzzy Inference Systems, Fuzzy Expert Systems, Fuzzy
Decision Making.
Learning Outcomes:
After completion of this unit, the student will be able to:
1.Name what are fuzzy sets, fuzzy operations and relations(L1)
2.Define fuzzy reasoning and fuzzy inference systems(L1)
3.Illustrate fuzzy expert systems and decision making using fuzzy logic (L2)
4. Explain fuzzy expert system
5. Elaborate fuzzy decision making
Fuzzy set
Fuzzy operations
Fuzzy rule and reasoning
Fuzzy system
Multi attribute(median ranking method)
Multi criteria(TOPSIS)
Fuzzy Sets:
A fuzzy set is a concept from fuzzy logic, introduced by Lotfi A. Zadeh in 1965. Unlike classical
sets, where an element either belongs to the set (membership value = 1) or does not belong to
it (membership value = 0), fuzzy sets allow for degrees of membership. This means an
element can partially belong to a set, with its membership represented by a value in the range
[0, 1].
Benefits
● Models uncertainty and vagueness effectively.
● Mimics human reasoning in situations where boundaries are not well-defined.
Operations on fuzzy sets extend classical set operations to account for the graded membership
of elements. These operations use membership functions to define how fuzzy sets interact.
Below are the primary operations:
1. Union (OR)
The union of two fuzzy sets A and B is defined by taking the maximum of their membership
values for each element.
μA∪B(x)=max(μA(x),μB(x))
Example:
2. Intersection (AND)
The intersection of two fuzzy sets A and B is defined by taking the minimum of their
membership values for each element.
μA∩B(x)=min(μA(x),μB(x))
Example:
3. Complement (NOT)
The complement of a fuzzy set A is defined by subtracting the membership value from 1.
μ¬A(x)=1−μA(x)
Example:
4. Difference
The difference between two fuzzy sets A and B is defined as the membership function:
μA−B(x)=min(μA(x),1−μB(x))
Example:
5. Cartesian Product
The Cartesian product of two fuzzy sets A and B is defined as a fuzzy relation R, where:
μR(x,y)=min(μA(x),μB(y))
Example:
6. Alpha-Cut
An alpha-cut of a fuzzy set A is a crisp set containing all elements of A whose membership
value is greater than or equal to a threshold α:
Aα={x∈X∣μA(x)≥α}
Example:
● T-Norm (AND): Combines two membership values using functions like min\minmin,
product, etc.
● T-Conorm (OR): Combines two membership values using functions like max\maxmax,
probabilistic sum, etc.
Fuzzy Relations
Fuzzy relations are an extension of classical relations in set theory, where the relationships
between elements are represented with degrees of membership. Instead of binary relationships
(present or absent), fuzzy relations allow for partial relationships, quantified using membership
values in the range [0,1].
Definition:
A fuzzy relation R between two fuzzy sets A and B in universal sets X and Y, respectively, is
defined by a membership function:
μR(x,y):X×Y→[0,1]
Here, μR(x,y) represents the degree to which x (from X) is related to y (from Y).
Representation:
1. Tabular Representation:
○ Membership values are arranged in a matrix, where rows correspond to elements
of X and columns to elements of Y.
2. Graphical Representation:
○ Fuzzy relations can be visualized using graphs, where edges are weighted by
membership values.
3. Set Representation:
○ A fuzzy relation R is expressed as:R={((x,y),μR(x,y))∣x∈X,y∈Y}.
5. Composition: The composition of two fuzzy relations R1⊆X×Y and R2⊆Y×Z is:
μR(x,z)=max min(μR1(x,y),μR2(y,z)), y∈Y
Applications:
1. Medical Diagnosis: Fuzzy expert systems assist in diagnosing diseases based on
symptoms with varying degrees of severity.
2. Control Systems: Used in systems like washing machines, air conditioners, and
elevators for decision-making.
3. Finance: Helps assess credit risks, stock market predictions, and portfolio management.
4. Industrial Automation: Used in robotics and production line management.
5. Weather Forecasting: Makes predictions based on ambiguous meteorological data.
● Inputs:
1. Temperature: Ranges from 0°C to 40°C
2. Humidity: Ranges from 0% to 100%
● Output:
1. Fan Speed: Ranges from 0% (off) to 100% (full speed)
Here is a sample dataset that includes the inputs (temperature and humidity) and the expected
outputs (fan speed) based on a fuzzy logic model:
10 20 10
25 50 50
30 70 75
35 90 90
Step-by-Step Fuzzy Expert System
1. Define Fuzzy Sets (Membership Functions)
Fuzzy sets represent vague concepts like "cold," "warm," and "hot." For each input and output:
● Temperature:
○ Cold: 0 to 20°C (peak membership at 10°C)
○ Warm: 10 to 35°C (peak at 25°C)
○ Hot: 30 to 40°C (peak at 35°C)
● Humidity:
○ Low: 0 to 50% (peak at 25%)
○ Medium: 30 to 70% (peak at 50%)
○ High: 60 to 100% (peak at 80%)
● Fan Speed:
○ Low: 0 to 50% (peak at 25%)
○ Medium: 25 to 75% (peak at 50%)
○ High: 50 to 100% (peak at 75%)
Rules determine how input fuzzy sets map to output fuzzy sets.
Example Data
We will apply the fuzzy expert system to the following input:
● Temperature = 30°C
● Humidity = 70%
Step 1: Fuzzification
● Temperature (30°C):
○ Membership in "cold" = 0 (outside range)
○ Membership in "warm" = 0.5 (closer to warm than hot)
○ Membership in "hot" = 0 (closer to hot)
● Humidity (70%):
○ Membership in "low" = 0 (outside range)
○ Membership in "medium" = 0.2 (closer to high than medium)
○ Membership in "high" = 0.8 (closer to high)
1. Rule 1: Cold (0) AND Low (0) → Fan Speed = Low (0)
2. Rule 2: Warm (0.5) AND Medium (0.2) → Fan Speed = Medium (min(0.25, 0.2) =
0.2)
3. Rule 3: Hot (01) AND High (0.8) → Fan Speed = High (min(0.75, 0.8) = 0.75)
4. Rule 4: Hot (0.1) AND Low (0) → Fan Speed = Medium (0)
We combine the outputs from all the rules using the max method. The fuzzy output is
aggregated as follows:
Result
For a temperature of 30°C and humidity of 70%, the fuzzy expert system predicts a fan
speed of ~70%.
Fuzzy Decision Making:
Applications
1. Control Systems:
○ Used in home appliances (e.g., air conditioners, washing machines) for adaptive
control.
2. Healthcare:
○ Diagnosis systems that handle imprecise symptoms and patient data.
3. Business Analytics:
○ Decision-making under uncertainty, such as investment strategies and risk
assessment.
4. Engineering:
○ Traffic management, robotics, and autonomous systems.
5. Environmental Science:
○ Managing resource allocations and predicting climate changes.
● IF Credit Score is High AND Income Level is High THEN Loan Approval is High.
Process:
1. Fuzzify inputs.
2. Apply fuzzy rules.
3. Defuzzify output to provide a crisp decision (e.g., a likelihood score for loan approval).
Fuzzy Decision-Making Systems (FDMS) can be categorized based on their structure, purpose,
and application domains. Below are the primary types of fuzzy decision-making systems:
Steps in TOPSIS
1. Construct Decision Matrix: List alternatives and their performance values for each
criterion.
2. Normalize the Decision Matrix: Normalize the values to bring them to a comparable
scale.
3. Weight the Normalized Matrix: Multiply the normalized values by the criteria weights.
4. Determine Ideal and Anti-Ideal Solutions:
○ Ideal Solution: Best values for each criterion (max for benefits, min for costs).
○ Anti-Ideal Solution: Worst values for each criterion (min for benefits, max for
costs).
5. Calculate Distance: Compute the Euclidean distance of each alternative from the ideal
and anti-ideal solutions.
6. Compute Relative Closeness: Calculate how close each alternative is to the ideal
solution.
7. Rank Alternatives: Rank alternatives based on their relative closeness scores.
P1 2.0 8 3
P2 3.5 9 4
P3 1.5 7 2
Step-by-Step Solution
https://youtu.be/kfcN7MuYVeI?si=HH4ctMbnb_o09Hlu