Fuzzy Logic
Fuzzy Logic
Fuzzy Set: A fuzzy set is an extension of a crisp set. Crisp set allow only full
membership or no membership at all, where as fuzzy sets allow partial
membership.
A = {( x ), μA( x )) : x ε X}
The support of a fuzzy set A in X, is the crisp set of all elements x ∈ X, such that
μA (x) > 0. It is denoted by S(A).
fuzzy set A of X be, {(2,0), (3,0.1), (4,0.4), (5,0.5), (7,0.2), (8,0.6), (9,1.0), (10,0),
(11,0)}.
An α-cut of a fuzzy set A is Aα that contains all the elements of X that have a
membership greater than or equal to the specified value of α.
Fuzzy set A is said to be the subset of B if and only if μA(x) ≤ μB(x) for all x.
Symbolically,
A ⊆ B ⇔ μA(x) ≤ μB(x)
Union:
The union of two fuzzy sets A and B is related to each other by,
The x axis depicts the universe of discourse, whereas the y axis represents the
grades of membership in the [0, 1] interval.
There are various membership functions, the most commonly used ones are:
Triangular membership function
● Trapezoid membership function
● Gaussian membership function
● S-membership function
● Exponential membership functions
● Generalized bell shaped membership function
● Polynomial membership term
Triangular Membership Functions
Defined by a lower limit a, an upper limit b, and a value m, where a < m < b. the
tuple {a, m, b}, denotes the location of the corresponding corners.
● Due to their simple formulae and computational efficiency, both triangular and trapezoidal MFs
have been extensively used in real time applications.
● However, they are not smooth at the corner points.
Gaussian Membership Function
Described by a central parameter m and a standard deviation denoted by k; k > 0.
The smaller the value of k is, the narrower the “bell” is.
S-membership function
Illustrative Example
Key Difference
● Fuzziness represents gradual change and partial truth (shades of gray), where
elements belong to a category to varying degrees.
● Probability represents uncertainty and binary outcomes (black or white), measuring
how likely an event is to happen.
Fuzzy Membership
Let a, b, c, d, and e be five students who scored 55, 35, 60, 85 and 75 out of 100
respectively in Mathematics. The students constitute the universe of discourse U =
{a, b, c, d, e} and a fuzzy set M of the students who are good in Mathematics is
defined on U with the help of the following membership function.
Crisp Relations:
● Crisp relation R between two crisp sets A and B, two elements, x from A and y
from B, are either related, or not. (no scope of being partially related)
● Crisp relation is defined as a subset of the Cartesian product of sets
Example
Example:
Let P = {Tony, Bobby, Mike} be a set of three students and Q = {Math, Phy, Chem}
be a set of three subjects in which Tony, Bobby, and Mike have taken a test.
A relation R between a student and a subject in which they have secured A grade
as:
Example:
● Let A and B be two fuzzy sets on reference sets X and Y respectively. The fuzzy
Cartesian product of A and B, denoted by A × B, is defined as A × B ⊆ X × Y, and μ A ×
(a, b) = min {μA(a), μB(b)} ∀a ∈ X, ∀b ∈ Y.
B
● A fuzzy relation R between two fuzzy sets A and B is a subset of the fuzzy
Cartesian product A×B. Hence R ⊆ A × B.
Operations on Fuzzy Relations
Example:
FUZZY LOGIC BASICS
Fuzzy Truth Values:
➔ In classical (or crisp) logic there are only two possible truth values, true and
false.
➔ Unlike crisp truth values, there are various fuzzy truth values including the
crisp truth values.
FUZZY LOGIC BASICS
Fuzzy Truth Values:
➔ In classical (or crisp) logic there are only two possible truth values, true and false.
➔ Unlike crisp truth values, there are various fuzzy truth values including the crisp
truth values.
Example:
● Classical Logic: A temperature sensor defines “Hot” as temperatures above 30°C (strict boundary).
● Fuzzy Logic: Instead of a hard threshold, we define a membership function where:
○ 28°C → 0.2 (Slightly Hot)
○ 30°C → 0.5 (Moderately Hot)
○ 35°C → 0.9 (Very Hot)
○ 40°C → 1 (Completely Hot)
Example:
● Classical Proposition: "The water is hot" (either true or false).
● Fuzzy Proposition: "The water is somewhat hot (0.6 truth value)" or "The
water is very hot (0.9 truth value)".
Example:
Fuzzy logic uses special operations to process fuzzy values. These are similar to
classical logic operations but work with degrees of truth.
Basic Operations:
1. Fuzzy Union (OR, max) – "At least one condition should hold."
○ If "Weather is Warm" = 0.6
○ If "Weather is Humid" = 0.8
○ Then "Weather is Warm OR Humid" = max(0.6, 0.8) = 0.8
2. Fuzzy Intersection (AND, min) – "Both conditions should hold."
○ If "Traffic is Heavy" = 0.7
○ If "Road is Slippery" = 0.5
○ Then "Traffic is Heavy AND Road is Slippery" = min(0.7, 0.5) = 0.5
3. Fuzzy Negation (NOT, 1 - value) – "Opposite of a condition."
○ If "Air is Polluted" = 0.6
○ Then "Air is NOT Polluted" = 1 - 0.6 = 0.4
Fuzzy truth and linguistic variables
If p Then q
● p and q are atomic fuzzy propositions known as the antecedent and the
consequent respectively.
● A fuzzy statement p = ‘x is A’: Its truth value is given by the membership value
of the fuzzy set A
● The fuzzy rule R : If ‘x is A’ Then ‘y is B’
● Symbolically expressed as R : A (x) → B (y)
The fuzzy rule If ‘x is A’ Then ‘y is B’ can be expressed as a fuzzy relation
between A and B where
1. Mamdani
2. Zadeh
● Mamdani’s interpretation of fuzzy rule:
where A is a fuzzy set on some universe U and B and C are fuzzy sets on the
universe V.
● The truth value of R:
● Represented as:
Example