Unit 3-RG
Unit 3-RG
FUZZY LOGIC
1. Deals with uncertainty and partial 1. Deals with certainty and absolute
truths. truths.
2. Uses membership functions to 2. Uses binary values (true or false) to
represent the degree to which a represent the truthfulness of a
statement is true. statement.
3. Is more suitable for problems that 3. Is more suitable for problems that
involve human judgment or perception. involve clear-cut rules or criteria.
4. Is more complex and computationally 4. Is simpler and less computationally
expensive. expensive.
5. Fuzzy logic is used in many 5. Crisp logic is used in many
applications, such as artificial applications, such as digital circuits,
intelligence, control systems, and computer programming, and
image processing. mathematics.
6. Fuzzy logic is a multi-valued logic 6. Crisp logic is a binary logic system,
system, which means that it can handle which means that it can only handle
values between 0 and 1. This makes it two valuestrue or false. This makes it
well-suited for handling uncertainty. difficult to handle uncertainty, which is
common in the real world.
Universal set :A universal set(universe of discourse) is a set that contains all the possible
elements relevant to a specific context or problem.It is denoted by E.
Given a set A whose objects are a 1, a 2, a 3,..., an, we write A as A = { a 1,a 2,... , an}. Here,a 1,
a 2,..., an are called the members of the set.
Here, A ⊂ B,
On the other hand, if A is contained in or equivalent to that of B then we denote the subset
relation as A ⊆ B. In such a case, A is called the improper subset of B.
Power set:The power set of a set A, is the set that contains all possible subsets of set A, including
the empty set (∅) and the set A itself.“
Example
Let A = {3, 4, 6, 7}
P( A) = {{3}, {4}, {6}, {7}, {3, 4}, {4, 6}, {6, 7}, {3, 7}, {3, 6}, {4, 7}, {3,
Membership Function:
Membership function is the graphical way of visualizing the degree of membership of any value
in a given fuzzy set. In the graph, X-axis represents the universe of discourse and the Y-axis
represents the degree of membership in the range [0, 1]
(or)
Membership function is a mathematical function that maps each element in the universe of
discourse to a value between 0 and 1. The value of the membership function indicates the degree
to which the element belongs to the fuzzy set.
A value of 0 indicates that the element does not belong to the fuzzy set at all, while a
value of 1 indicates that the element completely belongs to the fuzzy set. Values between 0 and 1
indicate that the element partially belongs to the fuzzy set.
Membership functions can be used to model a wide variety of concepts, such as temperature,
height, and intelligence etc.
Different shapes of membership functions exist. The shapes could be triangular, trapezoidal,
curved, or their variations as shown in Fig. below:
Triangular membership function: The triangular membership function is defined by three
parameters a, b and c, where c defines the base and b defines the height of the triangle.
Trapezoidal membership function: The trapezoidal membership function is defined by four
parameters: a, b, c and d as shown in fig below.
Gaussian membership function: A Gaussian MF is specified by two parameters {m, σ} and can
be defined as follows.
Generalized bell-shaped function: It is also called Cauchy MF. A generalized bell MF is
specified by three parameters {a, b, c} and can be defined as follows.
Fuzzy set:
Crisp set operations Fuzzy set operations
Given à and B̃ are the two fuzzy sets, and X be Given A and B are the two crisp sets.
the universe of discourse with respective
member functions μÃ(x) and μB̃ (x)
The union operation of crisp sets is defined
The union operation of fuzzy sets is defined by:
by:
B = {1, 4, 6, 8}
A ∪ B = {1, 2, 4, 6, 8}
The intersection operation of fuzzy sets is The intersection operation of crisp sets is
defined by: defined by:
A = {2, 4, 6, 8}
B = {1, 4, 6, 8}
A⋂ B = {4, 6, 8}
Fuzzy relation: Fuzzy relation is a fuzzy set defined on the Cartesian product of sets X1, X 2,...,
Xn where the n-tuples ( x 1, x 2,..., xn) may have varying degrees of membership within the
relation. The membership values indicate the strength of the relation between the tuples.
(or)
A fuzzy relation is a relationship between two universal sets of elements, where the strength of
the relationship is expressed by a membership degree.
The relationship between the "height" of a person and the "attractiveness" of that person
The relationship between the "speed" of a car and the "risk of an accident"
Fuzzy inference system (FIS): A fuzzy inference system (FIS) is a system that uses fuzzy logic
rules to map input variables to output variables based on fuzzy rules and membership functions.
Fuzzy knowledge base: It is also known as fuzzy rule base. The fuzzy rule base contains a
number of fuzzy IF THEN rules. A data base which defines the membership functions of the
fuzzy sets using the fuzzy rules.
Inference engine: The inference engine evaluates the fuzzy rules and produces a fuzzy output
set.
Defuzzifier: The defuzzifier converts the fuzzy output of the inference engine to crisp output
value.
Figure below shows the architecture of FIS.
Mamdani fuzzy inference system : The Mamdani fuzzy inference system is a popular type of
fuzzy logic system that uses fuzzy rules and membership functions to make decisions based on
input variables. It is named after its inventor, Ebrahim Mamdani.
Mamdani fuzzy inference process is basically performed by the following four steps:
1. Fuzzification: The input variables are converted from crisp values to fuzzy sets. This is
done by using membership functions, which define the degree to which each input value
belongs to each fuzzy set.
2. Rule evaluation:In this step, each fuzzy rule is evaluated. This involves assessing the
extent to which the antecedent (IF part) of the rule is satisfied by the input data and then
using an implication method (such as max-min or max-product) to calculate the degree to
which the consequent (THEN part) of the rule is activated.
3. Aggregation:The consequents of all the rules are aggregated into a single fuzzy set. A
fuzzy aggregation operator, such as "maximum" (for "OR" logic) or "minimum" (for
"AND" logic), is employed to combine the individual rule outputs into a collective
representation.
4. Defuzzification:In the final step the aggregated fuzzy set is converted back to a crisp
output value. This is done using various defuzzification method, such as the center of
gravity method or mean of bisector method.
Example: Consider a two rule system where each rule has two antecedents and one
consequent as follows:
Rule 2: IF x is A or x is A THEN y is B
1 1
2
2 2
2 2 2
We can apply any defuzzification technique to find the final crisp output for given case.
Sugeno-type fuzzy inference system :A Sugeno-type fuzzy inference system, also known as the
Takagi-Sugeno-Kang (TSK) Fuzzy Model, is a variant of fuzzy logic-based systems used for
decision-making, control, and modeling.
The Sugeno-type inference process is typically performed in three main steps:
1. Fuzzification: In the fuzzification step, the system converts crisp input values into
fuzzy sets using membership functions. These membership functions quantify the degree
to which each input value belongs to each fuzzy set.
2. If-Then Rules: The system then evaluates a set of "if-then" rules, each comprising an
antecedent and a consequent. The antecedent specifies conditions based on fuzzy input
variables and their associated membership functions. The consequent typically consists of
crisp functions, often linear equations, which follow the form of "IF x is A and y is B
THEN Z = px + qy + r," where A and B are fuzzy sets, and p, q, and r are crisp
coefficients.
3. Rule Evaluation and Crisp Output Value: All the rules are evaluated to determine
their strengths based on the degree to which the antecedent conditions are satisfied. The
rule strengths are aggregated by weighted average method to form a crisp output value.
This final output is suitable for applications where precise, deterministic outputs are
required.
The TSK model is widely applied in areas such as control systems, pattern recognition, and
decision-making processes, where precise, deterministic outputs are essential.
Example of TSK Model:
Defuzzification: The process of conversion of fuzzy sets(fuzzy output) into a crisp value is
called defuzzification.
Some common defuzzification methods include:
1. Centroid Method
2. Centre of sums (COS) method
3. Mean of maxima(MOM)
1.Centroid Method: It is also known as centre of gravity or centre of area(COA) method. This
method calculates the center of area of the fuzzy set.
For a continuous membership function crisp output value given by the expression
For a discrete membership function crisp output value is given by the expression
Where n=number of elements
2.Centre of Sums (COS) Method: This method calculates the average of the crisp values of all
of the fuzzy set's members.
3.Mean of Maxima (MOM): This method calculates the average of the maximum membership
values of the fuzzy set. Crisp output value is given by the expression
a) 0 and 1.
b) -1 and 1.
c) 0 and infinity.
d) 1 and infinity.
3. The function that maps each element to its degree of membership in a fuzzy set is called:
a) Intersection function.
b) Complement function.
c) Membership function.
d) Union function.
a) Union (OR)
b) Intersection (AND)
c) Complement (NOT)
d) Translation (SHIFT)
5. The property of a fuzzy set that ensures its membership values are within the range [0, 1] is
called:
a) Normalization property.
b) Extension principle.
d) Membership principle.
7. In a Mamdani fuzzy inference system, the consequent part of the fuzzy rules is represented as:
a) A mathematical expression.
8. The Sugeno fuzzy inference system differs from the Mamdani system in that the consequent
part is represented by:
c) A binary decision.
10. Defuzzification methods are used to convert fuzzy outputs into crisp values, and one
common method is:
a) Union method.
b) Interpolation method.
c) Centroid method.
Answers:
9.What are the differences between the Mamdani and Sugeno fuzzy inference methods?
In the Mamdani method, the consequent part of rules is represented using fuzzy sets, while in the
Sugeno method, it is represented by crisp mathematical expressions based on input variables.
10.How does a fuzzy rule-based system work, and what are defuzzification methods?
A fuzzy rule-based system uses IF-THEN rules with linguistic terms to convert fuzzy inputs into
fuzzy outputs. Defuzzification methods convert the fuzzy outputs into crisp values, such as the
centroid method or weighted average.
Long questions
(i) power set (ii) super set (iii) cardinality (iv) Universe of discourse (v) subset
3.What do you understand by membership functions? Draw the different membership functions.