0% found this document useful (0 votes)
6 views

Unit2 Notes

Module II covers the fundamentals of fuzzy logic, including fuzzy sets, operations, relations, and expert systems. Students will learn to define and illustrate fuzzy reasoning, inference systems, and decision-making processes. The module emphasizes practical applications in various fields such as control systems, healthcare, and business analytics.

Uploaded by

Likhit Pvss
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Unit2 Notes

Module II covers the fundamentals of fuzzy logic, including fuzzy sets, operations, relations, and expert systems. Students will learn to define and illustrate fuzzy reasoning, inference systems, and decision-making processes. The module emphasizes practical applications in various fields such as control systems, healthcare, and business analytics.

Uploaded by

Likhit Pvss
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 20

Module II: Basics of Fuzzy Logic Number of hours(LTP) 9 0 6

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].

Key Characteristics of Fuzzy Sets


1. Membership Function:
○ A fuzzy set is defined by a membership function, μA(x), which assigns a
membership value to each element xxx in the universal set X.
○ μA(x) maps x to a value in [0,1], where:
■ μA(x)=0: x does not belong to the fuzzy set.
■ μA(x)=1: x fully belongs to the fuzzy set.
■ 0<μA(x)<1: x partially belongs to the fuzzy set.
2. Gradual Transition:
○ Unlike crisp sets, where the boundary between membership and non-
membership is sharp, fuzzy sets allow for gradual transitions.
3. Representation:
○ A fuzzy set A in a universal set X can be written as: A={(x,μA(x))∣x∈X} where
μA(x) is the degree of membership.
Example
Consider the universal set X of all possible temperatures. Define a fuzzy set A as "hot
temperatures." The membership function μA(x) could be defined such that:

● μA(20)=0: 20°C is not hot.


● μA(30)=0.5: 30°C is somewhat hot.
● μA(40)=1: 40°C is fully hot.

Applications of Fuzzy Sets


Fuzzy sets are widely used in:

● Control systems (e.g., air conditioners, washing machines)


● Decision-making and expert systems
● Pattern recognition and image processing
● Natural language processing
● Artificial intelligence and machine learning

Benefits
● Models uncertainty and vagueness effectively.
● Mimics human reasoning in situations where boundaries are not well-defined.

Operations of Fuzzy Sets:

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:

If μA(x)=0.3 and μB(x)=0.7, then μA∪B(x)=max⁡(0.3,0.7)=0.7.

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:

If μA(x)=0.3 and μB(x)=0.7, then μA∩B(x)=min⁡(0.3,0.7)=0.3

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:

If μA(x)=0.4, then μ¬A(x)=1−0.4=0.6.

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:

If μA(x)=0.6 and μB(x)=0.8, then μA−B(x)=min(0.6,1−0.8)=min(0.6,0.2)=0.2.

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:

If μA(x)=0.5 and μB(y)=0.8, then μR(x,y)=min⁡(0.5,0.8)=0.5

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:

If μA(x)=0.7 for x, and α=0.6, then x belongs to Aα.

7. T-Norms and T-Conorms


These generalize the AND and OR operations:

● 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}.

Operations on Fuzzy Relations


1. Union:
μR1∪R2(x,y)=max(μR1(x,y),μR2(x,y))
2. Intersection:
μR1∩R2(x,y)=min(μR1(x,y),μR2(x,y))
3. Complement:
μ¬R(x,y)=1−μR(x,y)
4. Projection: The projection of a fuzzy relation R onto X or Y is obtained by taking the
maximum membership value over Y or X, respectively:
μRX(x)=max⁡μR(x,y), y∈Y

μRY(y)=max μR(x,y), x∈X

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

Properties of Fuzzy Relations


1. Reflexivity:
μR(x,x)=1 for all x∈X
2. Symmetry:
μR(x,y)=μR(y,x) for all x,y∈X
3. Transitivity:
μR(x,z)≥min(μR(x,y),μR(y,z)) for all x,y,z∈X
Properties of Fuzzy Relations
Operations on Fuzzy Relations with Examples
Fuzzy Expert System
A fuzzy expert system is a type of expert system that uses fuzzy logic instead of binary logic
to reason and infer conclusions. Fuzzy expert systems are particularly effective in dealing with
uncertain, vague, or imprecise data, making them suitable for real-world applications where
crisp boundaries and binary decisions are insufficient.
Key Components of a Fuzzy Expert System:
1. Fuzzification Module:
Converts crisp inputs (precise numerical data) into fuzzy sets.
For example, a temperature of 30°C might be classified as "warm" with a degree of
membership 0.7 and "hot" with a degree of membership 0.3.
2. Explanatory Interface: Established the communication between the user and the
system.It has Fuzzification and Defuzzification modules.
3. Knowledge Base:
Contains fuzzy rules (if-then statements) and the fuzzy sets that describe the problem
domain.
Example rule:
If temperature is "warm" and humidity is "high," then fan speed is "medium."
4. Inference Engine:
Applies fuzzy reasoning to evaluate the rules and derive fuzzy conclusions.
Example: If the temperature is "warm" (0.7 membership) and the humidity is "high" (0.8
membership), the engine calculates the degree of truth for the conclusion.
5. Metaknowledge Base: Contain rules about the use of production rules in the knowledge
base.
6. Defuzzification Module:
Converts the fuzzy conclusions into crisp outputs (precise results) for practical use.
Common defuzzification methods include centroid, mean of maxima, and bisector.

Features of Fuzzy Expert Systems:


● Handles Uncertainty: Can deal with imprecise and noisy data.
● Linguistic Variables: Uses human-friendly terms like "high," "low," or "medium."
● Adaptability: Easy to update by modifying fuzzy rules.
● Interpretable: The rules are simple and intuitive.

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.

Problem: Controlling Fan Speed


We aim to determine the speed of a fan based on two inputs: temperature (°C) and humidity
(%).

● 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:

Temperature (°C) Humidity (%) Expected Fan Speed (%)

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%)

2. Define Fuzzy Rules

Rules determine how input fuzzy sets map to output fuzzy sets.

1. If temperature is cold AND humidity is low, THEN fan speed is low.


2. If temperature is warm AND humidity is medium, THEN fan speed is medium.
3. If temperature is hot AND humidity is high, THEN fan speed is high.
4. If temperature is hot AND humidity is low, THEN fan speed is medium.

Example Data
We will apply the fuzzy expert system to the following input:

● Temperature = 30°C
● Humidity = 70%

Step 1: Fuzzification

Convert crisp inputs into fuzzy values:

● 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)

Step 2: Apply Rules

Evaluate rules using the fuzzy memberships:

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)

Step 3: Aggregate Outputs

We combine the outputs from all the rules using the max method. The fuzzy output is
aggregated as follows:

● For the Low fuzzy set: μlow=max(0)=0


● For the Medium fuzzy set: μmedium=max(0.2,0)=0.2
● For the High fuzzy set: μhigh=max(0.75)=0.75

Combine the results of all rules:


● Low: 0
● Medium: 0.2
● High: 0.75

Result
For a temperature of 30°C and humidity of 70%, the fuzzy expert system predicts a fan
speed of ~70%.
Fuzzy Decision Making:

Components of Fuzzy Decision-Making Systems


1. Fuzzification:
○ Converts crisp input data into fuzzy values using membership functions.
○ Example: Temperature = 30°C → Membership in "Warm" = 0.7, "Hot"
= 0.3.
2. Rule Base:
○ Contains a set of IF-THEN rules to define relationships between inputs and
decisions.
○ Example: IF Temperature is High AND Humidity is Low THEN Fan Speed is
High.
3. Inference Engine:
○ Applies the fuzzy rules to input data to determine fuzzy outputs.
○ Uses reasoning methods like Mamdani or Sugeno inference.
4. Defuzzification:
○ Converts fuzzy outputs into crisp decisions.
○ Methods: Centroid, Mean of Maximum, Largest of Maximum.

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.

Example: Fuzzy Decision in Loan Approval


Inputs:

● Credit Score: "Low", "Medium", "High"


● Income Level: "Low", "Moderate", "High"
Rule:

● 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:

1. Fuzzy Multi-Criteria Decision Making (FMCDM)


● Purpose: Helps in decision-making scenarios where multiple conflicting criteria need to
be evaluated.
● Key Features:
○ Evaluates alternatives based on a set of fuzzy criteria.
○ Uses weights to indicate the importance of each criterion.
● Examples:
○ Selection of suppliers in supply chain management.
○ Decision-making in environmental impact assessments.

2. Fuzzy Multi-Objective Decision Making (FMODM)


● Purpose: Handles decisions with multiple objectives that may conflict with one another.
● Key Features:
○ Objectives are expressed in fuzzy terms (e.g., maximize "profitability" and
minimize "risk").
○ Employs compromise solutions and trade-offs.
● Examples:
○ Portfolio optimization in finance.
○ Product design optimization.

3. Fuzzy Rule-Based Decision Systems


● Purpose: Uses a set of IF-THEN rules to handle complex decision-making scenarios.
● Key Features:
○ Incorporates human-like reasoning through fuzzy rules.
○ Rules are often derived from expert knowledge.
● Examples:
○ Intelligent traffic control systems.
○ Adaptive control systems in robotics.
4. Fuzzy Inference Systems (FIS)
● Purpose: Processes fuzzy inputs to produce fuzzy or crisp outputs using inference
mechanisms.
● Key Features:
○ Includes Mamdani and Sugeno types of inference systems.
○ Commonly used for system modeling and control.
● Examples:
○ Predictive maintenance in industrial systems.
○ Medical diagnosis systems.

TOPSIS (Technique for Order of Preference by Similarity to Ideal Solution)


TOPSIS is a decision-making method used to rank alternatives based on their closeness to an
ideal solution and their distance from an anti-ideal solution. It’s suitable for scenarios involving
multiple criteria that may have conflicting objectives.

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.

Research Project Selection


Scenario:
A funding agency evaluates several research project proposals based on the
following criteria:

1. Budget Requirement (minimize): The total budget requested by the project.


2. Expected Impact (maximize): A measure of the potential societal or
scientific impact.
3. Completion Time (minimize): The expected time to complete the project.

The decision-maker's preferences for these criteria are fuzzy:

● Budget Requirement: "Low" (fuzzy term).


● Expected Impact: "High" (fuzzy term).
● Completion Time: "Short" (fuzzy term).
Dataset:

Here are the details of 3 project proposals:

Project Budget($M) Expected Impact(1-10) Completion Time(Years)

P1 2.0 8 3

P2 3.5 9 4

P3 1.5 7 2

Step-by-Step Solution

We will use Fuzzy TOPSIS to solve this.

https://youtu.be/kfcN7MuYVeI?si=HH4ctMbnb_o09Hlu

You might also like