0% found this document useful (0 votes)
10 views46 pages

Fuzzy Logic

Fuzzy logic is a mathematical framework that deals with uncertainty and imprecision, allowing for degrees of truth rather than strict true/false values. It is widely used in various applications, such as washing machines and air conditioners, to mimic human decision-making processes. The architecture of fuzzy logic systems includes components like rule base, fuzzification, inference engine, and defuzzification, which work together to handle real-world problems effectively.

Uploaded by

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

Fuzzy Logic

Fuzzy logic is a mathematical framework that deals with uncertainty and imprecision, allowing for degrees of truth rather than strict true/false values. It is widely used in various applications, such as washing machines and air conditioners, to mimic human decision-making processes. The architecture of fuzzy logic systems includes components like rule base, fuzzification, inference engine, and defuzzification, which work together to handle real-world problems effectively.

Uploaded by

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

Fuzzy Logic and Fuzzy

Sets
Introduction to Fuzzy Logic
Introduction to Fuzzy Logic
• The term fuzzy refers to things that are not clear or are vague.

• In real-world problems, decisions cannot be categorized as strictly true or false as in


binary logic; instead, they fall somewhere between partially true and partially false.
This is exactly where fuzzy logic kicks in. It handles concepts that are not precisely
defined but rather appear on a spectrum of possibilities.
• By introducing the flexibility to work with uncertainties and imprecise data, fuzzy logic
mirrors human decision-making processes, addressing the shortcomings of traditional
binary logic systems.
Introduction to Fuzzy Logic
In classical logic, we say:

"The weather is hot (True/False)."In fuzzy logic, we say:

"The weather is hot with a degree of 0.8."


Introduction to Fuzzy Logic
Introduction to Fuzzy Logic
For example: Fuzzy logic is widely used in various domains where precise
decision-making is difficult:

Washing machines: Adjust wash time based on dirt level.

Air conditioners: Adjust cooling based on room temperature.

Automatic transmission in cars: Smooth gear shifts based on speed and road
conditions.
Introduction to Fuzzy Logic
• Fuzzy logic, introduced by Lotfi Zadeh in 1965, is a mathematical framework
for dealing with uncertainty and imprecision.
• Fuzzy logic is an extension of classical logic and makes it possible to deal
with imprecise and uncertain data. Superset of Boolean logic that has been extended to
handle the concept of partial truth.
• Unlike traditional binary logic (which operates in strict true (1) or false (0) values), fuzzy logic
deals with degrees of truth, allowing values to range between 0 and 1.

• This means that states can be "partially true" or "somewhat false".

• Fuzzy Logic is a form of many-valued logic in which the truth values of variables
may be any real number between 0 and 1 both inclusive, instead of just the
traditional values of true or false. This is useful in situations where concepts
cannot be strictly categorized but exist on a spectrum. It is used to deal with
imprecise or uncertain information and is a mathematical method for
representing vagueness and uncertainty in decision-making.
Introduction to Fuzzy Logic
• The fuzzy theory provides a mechanism for representing linguistic
constructs such as "high," "low," "medium," "tall," "many."
• In general, fuzzy logic provides an inference structure that enables
appropriate human reasoning capabilities.
• Fuzzy logic is used in modern air conditioners to provide smooth and
efficient temperature control by adjusting cooling intensity
dynamically instead of simply switching between ON and OFF states.
• If the room is slightly warm, the AC lowers the cooling power slightly.
Key Concepts in Fuzzy Logic: Fuzzy Sets
• Fuzzy sets provide a mathematical framework for
mapping the uncertainty of fuzzy logic.

• In contrast to conventional mathematical sets, they


enable partial membership. They achieve this by
allowing so-called degrees of membership to be set
between 0 and 1.

• An element can have partial membership, meaning it belongs to a set


to a certain degree (e.g., 0.3, 0.7, etc.).
Key Concepts in Fuzzy Logic: Fuzzy Sets

A fuzzy set is a collection of elements where each element has a degree of membership between 0 and 1,
rather than being strictly in or out of the set (as in classical sets). The set theory of classical is the subset of
Fuzzy set theory. Fuzzy logic is based on this theory, which is a generalization of the classical theory of set (i.e.,
crisp set).
Key Concepts in Fuzzy Logic: Fuzzy Sets
Key Concepts in Fuzzy Logic: Fuzzy Sets

Consider a fuzzy set of Tall people

A ={(150cm,0),(160cm,0.2),(170cm,0.5),(180cm,0.8),(190cm,1)}

where:
•The first value in each pair represents height (in cm).
•The second value represents the degree of membership (µ_Tall) in the "tall" fuzzy set.
"Tall People": membership
varies between 0 and 1
Some key terms
• Degree of an object belongs to Fuzzy Set is denoted by membership value between 0 to 1.
• The fundamental concept of Fuzzy Logic is the membership function, which defines the degree of
membership of an input value to a certain set or category.
• The membership function is a mapping from an input value to a membership degree between 0
and 1, where 0 represents non-membership and 1 represents full membership.
• Fuzzy Logic is implemented using Fuzzy Rules, which are if-then statements that express the
relationship between input variables and output variables in a fuzzy way. The output of a Fuzzy
Logic system is a fuzzy set, which is a set of membership degrees for each possible output value.

• In summary, Fuzzy Logic is a mathematical method for representing vagueness and uncertainty in
decision-making, it allows for partial truths, and it is used in a wide range of applications. It is
based on the concept of membership function and the implementation is done using Fuzzy rules.
Some key terms
• Linguistic variables and linguistic terms are key concepts in fuzzy logic
that help model vague or imprecise information.
• Linguistic Variables: Linguistic variables are the input or output variables
of the system whose values are words from a natural language, instead
of numerical values. The fuzzy set theory is rooted in linguistic variables.
These are variables described in natural language, such as "high,"
"medium," or "low." They are used in fuzzy logic to facilitate human-like
reasoning and communication.
• A linguistic variable is a fuzzy variable. For example:
The statement “John is tall” implies that the linguistic variable John takes
the linguistic Value tall.
Linguistic Term: A linguistic term (or linguistic value) is a specific word or
phrase that describes a particular state of a linguistic variable.
Height is the linguistic variable. Small, Medium, and Tall are
the linguistic terms representing different categories.
X-axis (Height in meters).
Different height values are mapped to different membership
degrees. Y-axis (Membership Degree μ)
Small (Blue Curve): represents people of short height.

People shorter than 1.60 m have high membership (μ≈1).As


height increases, membership in the "Small" category
gradually decreases. Almost 0 membership for heights above
1.75 m.

Medium (Green Curve): Represents people of average


height.
•Maximum membership (μ≈1) occurs around 1.70 - 1.75 m.
Membership gradually reduces as we move towards smaller
•A person 1.70 m tall belongs to both Small (low or taller heights.
membership) and Medium (high membership). Tall (Red Curve): Membership starts increasing after 1.75 m.
•A person 1.80 m tall belongs to both Medium and
•Maximum membership (μ=1) at 2.0 m and beyond.
Tall categories. •People below 1.75 m have little to no membership in the
•This is a fundamental property of fuzzy logic, "Tall" category.
allowing for gradual transitions instead of strict
boundaries.
Types of Membership Functions
• Different types of membership functions are used depending on the
nature of the fuzzy variable and the application. Or depending on
how uncertainty or fuzziness needs to be modeled.
is defined by three parameters: the start, the peak (where
membership is 1), and the end.

It is simple to compute. Used when data has a single peak and linear transitions are sufficient.
Suppose real-world moderate temperatures are mostly between 15°C and 35°C, with 25°C being the most common
moderate temperature. Set a=15, b=25, and c=35.
•A temperature of 25°C has full membership (1).
•The membership function starts at 0 for x=15.It increases linearly from 15°C to 25°C, reaching 1 at 25°C. Then it
decreases linearly from 25°C to 35°C, reaching 0 at 35°C.
It is defined by four parameters: the start, the start of the flat top, the end of the flat top, and
the end.

Example: "High Speed of a Car" (km/h)


a=40, b=60, c=120, d=150
• Speeds between 60 and 120 km/h have full membership (1).
• Speeds between 40-60 km/h and 120-150 km/h have partial membership.
Example: “Senior citizen Age"
•X= age
•b = midpoint (e.g., b = 60)

A person below 50 has very low membership (close to 0).A person around 60 has partial membership (0.5).
A person above 70 has high membership (close to 1).
Gaussian Membership function: A smooth and bell-shaped function useful for cases where smooth transitions are
needed.
•Example: The average normal body temperature
is 37°C.
•A temperature of 37°C has full membership (1).
•A temperature of 38.5°C or 35.5°C has partial
membership (~0.6).
•A temperature far from 37°C (e.g., 40°C or 34°C)
has very low membership (~0.1 or less).

•A small deviation (like ±1.5°C) is still considered


normal, but the further we go from 37°C, the
membership decreases gradually.
Singleton Membership function: A Singleton Membership Function is a special type of fuzzy membership function
where the fuzzy set contains only a single crisp value with full membership (1), while all other values have zero
membership (0).
Basic concepts of membership
functions
Basic concepts of membership
functions
Consider a Fuzzy Set for "Tall People"

Support: The set of all elements where μ(x) > 0.


Example: Heights that have some degree of membership in "Tall".
Support(TALL) = {160, 170, 175, 180, 185, 190, 195}

Core: The set of elements where μ(x) = 1.


Example: The heights that are fully considered "Tall".
Core(TALL) = {185, 190, 195}

Crossover Points: The elements where μ(x) = 0.5, indicating a transition from "not tall" to "tall".
Example: If μ(170) = 0.4 and μ(175) = 0.6, then crossover occurs around 170-175cm.

Normality: A fuzzy set is normal if at least one element has a membership value of 1.
Example: Since TALL has μ(185) = 1, μ(190) = 1, μ(195) = 1 it is a normal fuzzy set.
Consider a Fuzzy Set for "Tall People"
Types of fuzzy sets

Subnormal fuzzy set:.


Types of fuzzy sets

Non-convex fuzzy set: A non-convex fuzzy set is a fuzzy


set where the membership function does not follow the
convexity property, meaning there exists at least one point
where the membership value decreases and then increases
again.
Types of fuzzy sets
Architecture of Fuzzy Logic
• In the architecture of the Fuzzy Logic system, each
component plays an important role. The architecture
consists of the different four components which are
given below.
1.Rule Base
2.Fuzzification
3.Inference Engine
4.Defuzzification
Cont.
• 1. Rule Base

Cont.
Rule Base is a component used for storing the set of rules and the If-Then conditions
given by the experts are used for controlling the decision-making systems. There are so
many updates that come in the Fuzzy theory recently, which offers effective methods for
designing and tuning of fuzzy controllers. These updates or developments decreases the
number of fuzzy set of rules.

• 2. Fuzzification
• Fuzzification is a module or component for transforming the system inputs, i.e., it
converts the crisp number into fuzzy steps. The crisp numbers are those inputs which
are measured by the sensors and then fuzzification passed them into the control
systems for further processing. This component divides the input signals into following
five states in any Fuzzy Logic system:
• Large Positive (LP)
• Medium Positive (MP)
• Small (S)
• Medium Negative (MN)
• Large negative (LN)
Cont.
• 3. Inference Engine
• This component is a main component in any Fuzzy Logic system (FLS), because all the
information is processed in the Inference Engine. It allows users to find the matching
degree between the current fuzzy input and the rules. After the matching degree, this
system determines which rule is to be added according to the given input field. When
all rules are fired, then they are combined for developing the control actions.

• 4. Defuzzification
• Defuzzification is a module or component, which takes the fuzzy set inputs generated
by the Inference Engine, and then transforms them into a crisp value. It is the last step
in the process of a fuzzy logic system. The crisp value is a type of value which is
acceptable by the user. Various techniques are present to do this, but the user has to
select the best one for reducing the errors.
Cont.
• A graph that defines how each point in the input space is mapped to
membership value between 0 and 1. Input space is often referred to as the
universe of discourse or universal set (u), which contains all the possible
elements of concern in each particular application.
• There are largely three types of fuzzifiers:
• Singleton fuzzifier
• Gaussian fuzzifier
• Trapezoidal or triangular fuzzifier
• This function of Membership was introduced in the first papers of fuzzy set
by Zadeh.
• For the Fuzzy set B, the membership function for X is defined as: μB:X → [0,1].
In this function X, each element of set B is mapped to the value between 0 and
1.
• This is called a degree of membership or membership value.
Significance of fuzzy logic in AI
• Handles Uncertainty & Incompleteness
Many real-world AI applications involve incomplete or noisy data. Fuzzy logic helps
make optimal decisions even when exact inputs are not available.
• Mimics Human Reasoning
People naturally think in fuzzy terms (e.g., "warm", "tall", "likely"), and fuzzy logic
helps AI systems interpret qualitative data the way humans do.
• Adaptive & Flexible
Unlike strict rule-based systems, fuzzy logic adapts well to dynamic environments
and can update decisions based on new data.
Improved Control Systems: Fuzzy logic is widely used in control systems (e.g.,
robotics, industrial automation) where crisp logic would be too rigid.
Significance of fuzzy logic in AI
Fuzzy Logic in Autonomous Vehicle Navigation.
A self-driving car needs to adjust its speed based on the distance to the car ahead and the road conditions.
Traditional logic might define strict rules, such as:
IF the distance to the next car is > 50 meters, THEN maintain high speed.
IF the distance is between 20 and 50 meters, THEN maintain moderate speed.
IF the distance is < 20 meters, THEN reduce speed.
This rigid approach fails to handle gradual changes smoothly. Instead, fuzzy logic introduces degrees of distance
and speed control.
Step 1: Define Fuzzy Sets
Instead of sharp boundaries, we define fuzzy sets for distance and speed:
Distance Categories: Near: (0m - 30m) → µ(Near) is high for smaller values.
Medium: (20m - 60m) → µ(Medium) peaks at 40m.
Far: (50m - 100m) → µ(Far) is high for larger values.
Speed Categories:
Slow: (0 - 30 km/h) Moderate: (20 - 60 km/h)Fast: (50 - 120 km/h)
Significance of fuzzy logic in AI
Step 2: Define Fuzzy Rules
Using fuzzy inference, we create a set of rules that adjust speed dynamically:
IF Distance is Near, THEN Speed should be Slow.
IF Distance is Medium, THEN Speed should be Moderate.
IF Distance is Far, THEN Speed should be Fast.
IF Distance is Near AND Traffic Density is High, THEN Speed should be Very Slow.
IF Distance is Medium AND Road is Wet, THEN Speed should be Lower than Moderate.
Step 3: Apply Fuzzy Inference and Defuzzification
Suppose the car detects a distance of 35 meters to the next vehicle.
This value falls between the Medium and Near categories.
The fuzzy inference system (FIS) evaluates multiple rules simultaneously and assigns weightage to "Slow" and
"Moderate" speeds.
Using defuzzification (e.g., centroid method), the system computes an optimal speed, say 42 km/h instead of
jumping between strict categories.
Significance of fuzzy logic in AI
Benefits of Using Fuzzy Logic in Autonomous Vehicles
Smooth Transitions: Avoids sudden changes in speed, making driving
safer.
Adaptability: Works under uncertain conditions (e.g., different road
surfaces, traffic conditions).
Better Human-like Decision Making: Mimics how human drivers adjust
speed in real-time.
Cont.
• Applications of Fuzzy Logic
• Fuzzy logic’s ability to model complex systems with human-like reasoning makes it invaluable in
various fields:
1. Control Systems: Fuzzy logic is widely used in control systems where precise mathematical models
are difficult to obtain. For example, fuzzy logic controls temperature systems by processing inputs
like “too hot,” “warm,” “cool,” and “too cold.”
2. Consumer Electronics: Many household appliances, such as washing machines, utilise fuzzy logic to
optimise performance. A fuzzy logic washing machine can adjust water levels and energy
consumption based on the load’s size and fabric type, ensuring efficient operation.
3. Automotive Systems: Modern cars incorporate fuzzy logic for various functions, including
suspension systems, transmission control, and even determining socio-economic classes for
market analysis.
4. Medical Devices: Fuzzy logic is employed in medical devices for monitoring and diagnostic
purposes, such as taking blood pressure and assessing patient conditions with imprecise data.
• Medical Diagnosis: Used in expert systems to assess symptoms with varying degrees of severity.
• Helps in diagnosing diseases where symptoms overlap.
• Robotics & Decision-Making: Autonomous robots use fuzzy logic to navigate and avoid obstacles.
Cont.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy