ARTIFICIAL INTELLIGENCE
MR50106
Unit – III
FUZZY LOGIC
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 2
Odisha
CONTENTS
֍ Introduction to crisp sets and fuzzy sets,
֍ Basic fuzzy set operations
֍ Fuzzy logic modeling and control.
֍ Fuzzification, inferencing and defuzzification.
֍ Fuzzy knowledge and rule bases.
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 3
Odisha
Unit – 3 Lecture 1
Objective of Today’s Lecture
Understand the basics of Fuzzy Logic
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 4
Odisha
Fuzzy Logic
Introduction
Fuzzy un-clear or ambiguous
Antonym of fuzzy crisp
Crisp clear, clean, and sharp
First time introduced by Lotfi Abdelli Zadeh (1965), University of California,
Berkley, USA
Applied in steam engine control by Mamdani in 1974
Fuzzy logic was made practically useful in Japan in the 1990s
L.A. Zadeh (1921-2017)
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 5
Odisha
Fuzzy Logic
Example
Fuzzy Logic vs. Crisp Logic
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 6
Odisha
Fuzzy Logic
Example
Fuzzy Logic vs. Crisp Logic
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 7
Odisha
Fuzzy Logic
Example
Fuzzy Logic vs. Crisp Logic
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 8
Odisha
Fuzzy Logic
Crispy Set
Examples of Crispy set: -
Set of Natural Numbers: N={1, 2, 3, 4, 5, 6, 7, ......,n}.
Set of Prime Numbers less than 50: X={2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47}.
A ∪ B = { x | x ∈ A OR x ∈ B }.
o Set A = {10, 11, 12, 13}, Set B = {11, 12, 13, 14, 15}, then A ∪ B = {10, 11, 12, 13, 14, 15}
A ∩ B = { x | x ∈ A AND x ∈ B }.
o Set A = {10, 11, 12, 13}, Set B = {11, 12, 14} then A ∩ B = {11, 12}
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 9
Odisha
Fuzzy Logic
Concept of Fuzzy Set
Fuzzy logic is a mathematical language to express something.
Fuzzy logic deals with Fuzzy set.
Fuzzy logic is a generalization of the classical theory of set (i.e., crisp set) introduced by Zadeh in 1965.
A fuzzy set is a collection of values which exist between 0 and 1.
Fuzzy sets are denoted or represented by the tilde (~) character.
In the fuzzy set, the partial membership also exists.
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 10
Odisha
Fuzzy Logic
Definition
Membership function (and Fuzzy set)
If X is a universe of discourse and x ∈ X, then a fuzzy set A in X is defined as a set of ordered pairs, that is
A = {(x, µA(x))|x X}
where µA(x) is called the membership function for the fuzzy set A.
Note: µA(x) map each element of X onto a membership grade (or membership value) between 0 and 1 (both
inclusive).
Question: How (and who) decides µA(x) for a Fuzzy set A in X?
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 11
Odisha
Fuzzy Logic
Example
X = All cities in India
A = City of comfort
A={(New Delhi, 0.7), (Bangalore, 0.9), (Chennai, 0.8), (Hyderabad, 0.6), (Kolkata, 0.3), (Kharagpur, 0)}
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 12
Odisha
Fuzzy Logic
Operations on Fuzzy Set
Given à and B are the two fuzzy sets, and X be the universe of discourse with the following respective
member functions:
1. Union Operation: The union operation of a fuzzy set is defined by:
μA∪B(x) = max (μA(x), μB(x))
A = {( X1, 0.6 ), (X2, 0.2), (X3, 1), (X4, 0.4)} B = {( X1, 0.1), (X2, 0.8), (X3, 0), (X4, 0.9)}
AUB = {( X1, 0.6), (X2, 0.8), (X3, 1), (X4, 0.9)}
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 13
Odisha
Fuzzy Logic
Operations on Fuzzy Set
Given à and B are the two fuzzy sets, and X be the universe of discourse with the following respective
member functions:
2. Intersection Operation :The intersection operation of fuzzy set is defined by:
μA∩B(x) = min (μA(x), μB(x))
A = {( X1, 0.3 ), (X2, 0.7), (X3, 0.5), (X4, 0.1)} B = {( X1, 0.8), (X2, 0.2), (X3, 0.4), (X4, 0.9)}
A∩B = {( X1, 0.3), (X2, 0.2), (X3, 0.4), (X4, 0.1)}
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 14
Odisha
Fuzzy Logic
Operations on Fuzzy Set
Given à and B are the two fuzzy sets, and X be the universe of discourse with the following respective
member functions:
3. Complement Operation: The complement operation of fuzzy set is defined by:
μĀ(x) = 1-μA(x),
A = {( X1, 0.3 ), (X2, 0.8), (X3, 0.5), (X4, 0.1)}
Ā= {( X1, 0.7 ), (X2, 0.2), (X3, 0.5), (X4, 0.9)}
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 15
Odisha
Fuzzy Logic
Difference between Classical Set Theory and Fuzzy Set Theory
Classical Set Theory Fuzzy Set Theory
This theory is a class of those sets having sharp boundaries. This theory is a class of those sets having un-sharp
boundaries.
This set theory is defined by exact boundaries only 0 and 1. This set theory is defined by ambiguous boundaries.
In this theory, there is no uncertainty about the boundary's In this theory, there always exists uncertainty about the
location of a set. boundary's location of a set.
This theory is widely used in the design of digital systems. It is mainly used for fuzzy controllers.
Asutosh Patnaik, Asst. Prof., Dept. of EEE, CGU,
01-05-2021 16
Odisha