unit-3

Download as pdf or txt
Download as pdf or txt
You are on page 1of 23

VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)

Application of Soft Computing


ALIGARH
UNIT-IV : Fuzzy Logic-I
(Introduction)

Table of Content
1) Basic concepts of fuzzy logic
2) Fuzzy sets and Crisp sets
3) Fuzzy set theory and operations
4) Properties of fuzzy sets
5) Fuzzy and Crisp relations
6) Fuzzy to Crisp conversion

pg. 1 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

The word fuzzy refers to things which are not clear or are vague. Any event, process, or function
that is changing continuously cannot always be defined as either true or false, which means that we
need to define such activities in a Fuzzy manner.

In 1965 Lotfi Zadeh, published his famous paper “Fuzzy sets”. This new logic for representing and
manipulating fuzzy terms was called fuzzy logic, and Zadeh became the Master/Father of fuzzy
logic. Fuzzy logic is the logic underlying approximate, rather than exact, modes of reasoning. It
operates on the concept of membership. The membership was extended to possess various "degrees
of membership" on the real continuous interval [0, l].

In fuzzy systems, values are indicated by a number (called a truth value) ranging from 0 to l,
where 0.0 represents absolute falseness and 1.0 represents absolute truth.

Fuzzy logic is a type of logic that uses a range of values between 0 and 1 to represent the truth
value of variables, instead of the binary values of 0 and 1 used in Boolean logic. Fuzzy logic is
based on the idea that people often make decisions based on imprecise information, and that much
data is in some state between completely true and completely false.

pg. 2 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

Introduction to Fuzzy Logic


Fuzzy Logic is a form of many-valued logic that deals with reasoning that is approximate rather
than fixed and exact. Unlike classical logic where variables must be either true or false, fuzzy logic
variables may have a truth value that ranges between 0 and 1. This allows for a more flexible and
human-like way of reasoning.

The term fuzzy refers to things which are not clear or are vague. In the real world many times we
encounter a situation when we can’t determine whether the state is true or false, their fuzzy logic
provides a very valuable flexibility for reasoning. In this way, we can consider the inaccuracies and
uncertainties of any situation. In Boolean system truth value, 1.0 represents absolute truth value
and 0.0 represents absolute false value. But in the fuzzy system, there is no logic for absolute truth
and absolute false value. But in fuzzy logic, there is intermediate value too present which is partially
true and partially false.

In other words, we can say that fuzzy logic is not logic that is fuzzy, but logic that is used to
describe fuzziness. There can be numerous other examples like this with the help of which we can
understand the concept of fuzzy logic. Fuzzy Logic was introduced in 1965 by Lofti A. Zadeh in
his research paper “Fuzzy Sets”. He is considered as the father of Fuzzy Logic.

pg. 3 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

A classical set is a collection of objects with certain characteristics. For example, the user may
define a classical set of negative integers, a set of persons with height less than 6 feet, and a set of
students with passing grades. Each individual entity in a set is called a member or an element of
the set

Key Concepts

1. Fuzzy Sets: Unlike classical sets where an element either belongs or does not belong to a
set, fuzzy sets allow for partial membership. An element can belong to a set to a certain
degree, represented by a membership function.

2. Membership Functions: These functions define how each point in the input space is
mapped to a membership value between 0 and 1. Common shapes of membership functions
include triangular, trapezoidal, and Gaussian.

3. Linguistic Variables: These are variables whose values are words or sentences in a natural
or artificial language. For example, temperature can be a linguistic variable with values like
"cold," "warm," and "hot."

4. Fuzzy Rules: These are conditional statements that form the basis of fuzzy logic systems.
They are usually in the form of "IF-THEN" statements. For example, "IF temperature is
high THEN fan speed is high."

5. Fuzzy Inference System (FIS): This system uses fuzzy logic to map inputs to outputs. It
involves three main steps:

o Fuzzification: Converting crisp input values into fuzzy values using membership
functions.

o Rule Evaluation: Applying fuzzy rules to the fuzzified inputs to generate fuzzy
outputs.

o Defuzzification: Converting fuzzy outputs back into crisp values.

Applications
Fuzzy logic is widely used in various fields due to its ability to handle uncertainty and approximate
reasoning. Some common applications include:

• Control Systems: Used in appliances like washing machines, air conditioners, and cameras
to make decisions based on imprecise inputs.

pg. 4 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH
• Automotive Systems: Applied in automatic gearboxes, braking systems, and navigation
systems.

• Decision Making: Used in financial systems, medical diagnosis, and risk assessment.

Fuzzy logic provides a way to model complex systems where traditional binary logic is insufficient.
It mimics human decision-making and reasoning, making it a powerful tool in artificial intelligence
and control systems.

Crisp Sets

Crisp sets are the sets that we have used most of our life. In a crisp set, an element is either a
member of the set or not. For example, a jelly bean belongs in the class of food known as candy.
Mashed potatoes do not.

Crisp Sets are the traditional sets used in classical logic and mathematics. In a crisp set, an element
either belongs to the set or it does not. There is no in-between or partial membership. This is also
known as binary logic.

• Membership: An element has a membership value of either 0 (not in the set) or 1 (in the
set).

• Example: Consider the set of even numbers. The number 4 is in the set (membership value
1), while the number 5 is not (membership value 0).

Fuzzy Sets

pg. 5 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

Fuzzy sets, on the other hand, allow elements to be partially in a set. Each element is given a degree
of membership in a set. This membership value can range from 0 (not an element of the set) to 1 (a
member of the set). It is clear that if one only allowed the extreme membership values of 0 and 1,
that this would actually be equivalent to crisp sets. A membership function is the relationship
between the values of an element and its degree of membership in a set. An example of membership
functions. In this example, the sets (or classes) are numbers that are negative large, negative
medium, negative small, near zero, positive small, positive medium, and positive large. The value,
µ, is the amount of membership in the set.

Fuzzy Sets extend the concept of crisp sets by allowing partial membership. In a fuzzy set, an
element can belong to the set to a certain degree, represented by a membership value between 0
and 1. This allows for more nuanced and flexible reasoning.

• Membership: An element can have any membership value between 0 and 1, indicating the
degree to which it belongs to the set.

• Example: Consider the set of "tall people." Instead of a strict cutoff height, a person who
is 180 cm tall might have a membership value of 0.8 in the set of tall people, while a person
who is 170 cm tall might have a membership value of 0.5.

Key Differences

1. Binary vs. Gradual Membership:

o Crisp Sets: Membership is binary (0 or 1).

o Fuzzy Sets: Membership is gradual (any value between 0 and 1).

2. Precision vs. Flexibility:

o Crisp Sets: Precise and clear-cut boundaries.

o Fuzzy Sets: Flexible and can handle uncertainty and vagueness.

3. Applications:

o Crisp Sets: Used in situations where clear, unambiguous classification is needed.

o Fuzzy Sets: Used in scenarios where human-like reasoning and handling of


imprecise information are required.

pg. 6 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

Visual Representation

• Crisp Set: A simple Venn diagram where an element is either inside or outside the circle.

• Fuzzy Set: A Venn diagram with a gradient, showing varying degrees of membership.

Fuzzy sets are particularly useful in fields like artificial intelligence, control systems, and decision-
making processes where binary logic falls short in handling real-world complexities.

Operations on Fuzzy sets

Operations on Fuzzy sets The well-known operations which can be performed on fuzzy sets are the
operations of union, intersection, complement, algebraic product and algebraic sum. Much research
concerning fuzzy sets and their applications to automata theory, logic, control, game, topology,
pattern recognition, integral, linguistics, taxonomy, system, decision making, information retrieval
and so on, has been earnestly undertaken by using these operations for fuzzy sets. In addition to
these operations, new operations called "bounded-sum" and In addition to these operations, new
operations called "bounded-sum" and "bounded-difference" are introduced by Zadeh (1975) to
investigate the fuzzy reasoning which provides a way of dealing with the reasoning problems which
are too complex for precise solution.

pg. 7 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 8 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 9 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

Example:

pg. 10 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 11 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 12 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 13 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 14 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

Difference Between Crisp Set and Fuzzy Set

S.No Crisp Set Fuzzy Set

1 Crisp set defines the value is either Fuzzy set defines the value between 0 and
0 or 1. 1 including both 0 and 1.

2 It specifies the degree to which something


It is also called a classical set.
is true.

3 It shows full membership It shows partial membership.

Eg1. She is 18 years old. Eg1. She is about 18 years old.


4
Eg2. Rahul is 1.6m tall Eg2. Rahul is about 1.6m tall.

pg. 15 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

5 Crisp set application used for


Fuzzy set used in the fuzzy controller.
digital design.

6 It is bi-valued function logic. It is infinite valued function logic

7 Full membership means totally Partial membership means true to false,


true/false, yes/no, 0/1. yes to no, 0 to 1.

Defuzzification Methods

Fuzzy rule based systems evaluate linguistic if-then rules using fuzzification, inference and
composition procedures. They produce fuzzy results which usually have to be converted into crisp
output. To transform the fuzzy results in to crisp, defuzzification is performed. Defuzzification is
the process of converting a fuzzified output into a single crisp value with respect to a fuzzy set. The
defuzzified value in FLC (Fuzzy Logic Controller) represents the action to be taken in controlling
the process.

Different Defuzzification Methods

The following are the known methods of defuzzification.

 Center of Sums Method (COS)

 Center of gravity (COG) / Centroid of Area (COA) Method

 Center of Area / Bisector of Area Method (BOA)

 Weighted Average Method

 Maxima Methods

o First of Maxima Method (FOM)

o Last of Maxima Method (LOM)

o Mean of Maxima Method (MOM)

pg. 16 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

Example:

pg. 17 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 18 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 19 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 20 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 21 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

pg. 22 Faculty : Shanu Gupta(CSE Department)


VISION INSTITUTE OF TECHNOLOGY, Subject: (BCS056)
Application of Soft Computing
ALIGARH

Difference between Fuzzification and Defuzzification:

S.No. Comparison Fuzzification Defuzzification

Precise data is converted Imprecise data is converted into


1. Basic into imprecise data. precise data.

Fuzzification is the Defuzzification is the inverse process


method of converting a of fuzzification where the mapping is
crisp quantity into a fuzzy done to convert the fuzzy results into
2. Definition quantity. crisp results.

Like, Stepper motor and D/A


3. Example Like, Voltmeter converter

Intuition, inference, rank


ordering, angular fuzzy Maximum membership principle,
sets, neural network, centroid method, weighted average
4. Methods etcetera. method, center of sums, etcetera.
5. Complexity It is quite simple. It is quite complicated.

It can use IF-THEN rules


for fuzzifying the crisp It uses the center of gravity methods
6. Use value. to find the centroid of the sets.

pg. 23 Faculty : Shanu Gupta(CSE Department)

You might also like