0% found this document useful (0 votes)
19 views30 pages

Chapter 4 - Fuzzy Logic Lecture

The document provides an introduction to fuzzy logic, highlighting its role in dealing with uncertainty and imprecision through mathematical tools and linguistic constructs. It explains the concepts of fuzzy sets, operations on classical and fuzzy sets, fuzzification, defuzzification, and fuzzy inference systems, including methods like Mamdani and Takagi-Sugeno. Additionally, it discusses fuzzy decision-making processes and their applications in real-world scenarios.
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)
19 views30 pages

Chapter 4 - Fuzzy Logic Lecture

The document provides an introduction to fuzzy logic, highlighting its role in dealing with uncertainty and imprecision through mathematical tools and linguistic constructs. It explains the concepts of fuzzy sets, operations on classical and fuzzy sets, fuzzification, defuzzification, and fuzzy inference systems, including methods like Mamdani and Takagi-Sugeno. Additionally, it discusses fuzzy decision-making processes and their applications in real-world scenarios.
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/ 30

FUZZY LOGIC

INTRODUCTION TO FUZZY LOGIC USING MATLAB

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 1/31


INTRODUCTION
“The closer one looks at a real world problem, the fuzzier becomes its
solution” - (Zadeh 1973)
The Fuzzy Logic tool was introduced in 1965

It is a mathematical tool for dealing with uncertainty.

It offers to a soft computing partnership the important concept of computing


with words’. Lotfi A. Zadeh
1921 – 2017
It provides a technique to deal with imprecision and information granularity.

The fuzzy theory provides a mechanism for representing linguistic constructs


such as “many,” “low,” “medium,” “often,” “few.”
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 2/31
FUZZY LOGIC
Provides an inference structure that enables appropriate human
reasoning capabilities.

Traditional binary set theory describes crisp events, events that


either do or do not occur.

A theory based upon the notion of relative graded membership


and so are the functions of mentation and cognitive processes.

Interesting due to their ability to model uncertain or ambiguous


data so often encountered in real life
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 3/31
FUZZY LOGIC SYSTEM IN GENERAL

The uncertainty is found to arise from :


• Ignorance
• Chance and randomness
• Due to lack of knowledge
• Vagueness - like the fuzziness that exists in our natural language.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 4/31
CLASSICAL SETS AND FUZZY SETS

Suitable problems to be represented by classical set

• The clock speeds of computers CPUs.


• The operating temperature of an air conditioner.
• The operating currents of an electronic motor or a generator set.
• The integers 1–100.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 5/31


CLASSICAL SET : AN EXAMPLE
Let universe comprised of four elements X = {1, 2, 3, 4}.
Find cardinal number, power set, and cardinality of the power set.
Solution:
• The cardinal number is the number of elements in the defined set.
• The defined set X consists of four elements 1, 2, 3, and 4.
• Therefore, the Cardinal number = ηx = 4.
• The power set consists of all possible sets of X.
• It is given by,
• Power set P(X) = {Ø, {1}, {2}, {3}, {4}, {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}, {1, 2, 3}, {2, 3,
4}, {1, 3, 4}, {1, 2, 4}, {1, 2, 3, 4}}
• Cardinality of the power set is given by, ηP (X) = 2ηx = 24 = 16.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 6/31


OPERATIONS ON CLASSICAL SETS
Union

• A ∪ B = {x/x ∈ A or x ∈ B} .

Intersection

• A ∩ B = {x/x ∈ A and x ∈ B} .

Complement

• A = {x/x /∈ A,x ∈ X} .

Difference

• A|B = {x/x ∈ A and x /∈ B}

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 7/31


PROPERTIES OF CLASSICAL SETS
Commutativity A ∪ B = B ∪ A, A ∩ B = B ∩ A.

Associativity A ∪ (B ∪ C)=(A ∪ B) ∪ C, A ∩ (B ∩ C)=(A ∩ B) ∩ C.

Distributivity A ∪ (B ∩ C)=(A ∪ B) ∩ (A ∪ C), A ∩ (B ∪ C) = A ∩ B) ∪ (A ∩ C).

Idempotency A ∪ A = A, A ∩ A = A.

Identity A ∪ φ = A A ∩ X = A A ∩ φ = φ A ∪ X = X.

Transitivity If A ⊆ B ⊆ C, then A ⊆ C.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 8/31


DE MORGAN’S LAW
• Efficient in proving the tautologies and contradictions in logic.
• The De Morgan’s Law are given by A ∩ B = A ∪ B, A ∪ B = A ∩ B.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 9/31


FUZZY SET
• In the classical set, its characteristic function assigns a value of either
1 or 0 to each individual in the universal set, thereby discriminating
between members and nonmembers of the crisp set under
consideration.
• The values assigned to the elements of the universal set fall within a
specified range and indicate the membership grade of these elements
in the set.
• Larger values denote higher degrees of set membership such a
function is called a membership function and the set is defined by it is
a fuzzy set.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 10/31
FUZZY SET OPERATIONS
• Considering 3 fuzzy sets A ∼ , B ∼ and C ∼
on the universe X.
• For a given element x of the universe, the
following function theoretic operations for
the set theoretic operations unions,
intersection and complement are defined for
A ∼ , B ∼ and C ∼ on X:
• Union: µA ∼ ∪ B ∼ (x) = µA ∼ (x)VµB ∼ (x).
• Intersection: µA ∼ ∩ B ∼ (x) = µA ∼ (x)ΛµB ∼ (x).
• Complement µ− A ∼ (x)=1 − µA ∼ (x).

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 11/31


FUZZY SET OPERATIONS

• Any fuzzy set defined on a universe x is a subset of that universe.


• The membership value of any element x in the null set φ is 0, and
the membership value of any element x in the whole set x is 1.
• This statement is given by De Morgan’s laws stated for classical
sets also hold for fuzzy sets, as denoted by these expressions. ∩ =
− ∪− , ∪ =− ∩− .

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 12/31


PROPERTIES OF FUZZY SET
Commutativity ∪ =∪ ,∩=∩.

Associativity ∪ ( ∪ )=( ∪ ) ∪ , ∩ (∩ )=(∩ ) ∩ .

Distributivity ∪ (∩ )=(∪ ) ∩ (∪ ), ∩ (∪ )=(∩ ) ∪ (∩ ).

Idempotency ∪ =,∩ = .

Identity ∪ φ = and ∩ X = , ∩ φ = φ and ∪ X = X.

Transtivity If ⊂ ⊂ then ⊂

Involution = = .

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 13/31


Fuzziness in a fuzzy set is
MEMBERSHIP characterized by its
membership functions.
FUNCTIONS
It classifies the element in the
set, whether it is discrete or
continuous.
The membership functions can
be formed by graphical
representations.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 14/31
FUZZIFICATION
• Fuzzification is an important concept in the fuzzy logic theory.
• Fuzzification is the process where the crisp quantities are converted to fuzzy (crisp to fuzzy).
• By identifying the uncertainties present in the crisp values, we form the fuzzy values.
• The conversion of fuzzy values is represented by the membership functions.
• In any practical applications, in industries, etc., measurement of voltage, current,
temperature, etc., there might be a negligible error. This causes imprecision in the data.
• This imprecision can be represented by the membership functions.
• Hence fuzzification is performed.
• Fuzzification process involves assigning membership values for the given crisp quantities.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 15/31


MEMBERSHIP VALUE ASSIGNMENT
There are various methods to assign the membership values or the membership
functions to fuzzy variables. The assignment can be just done by intuition or by
using some algorithms or logical procedures. The methods for assigning the
membership values are listed as follows:
• Intuition
• Inference
• Rank ordering
• Angular fuzzy sets
• Neural networks
• Genetic algorithms
• Inductive reasoning

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 16/31


DEFUZZIFICATION
• Fuzzy to crisp conversions.
• The fuzzy results generated cannot be used as such to the applications
• Necessary to convert the fuzzy quantities into crisp quantities for further
processing.
• Has the capability to reduce a fuzzy to a crisp single-valued quantity or as a set, or
converting to the form in which fuzzy quantity is present
• Can also be called as “rounding off” method.
• A natural and necessary process due to the output to any practical system cannot
be given using the linguistic variables like “moderately high,” “medium,” “very
positive,” etc., it has to be given only in crisp quantities.
• These crisp quantities are thus obtained from the fuzzy quantities.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 17/31
Defuzzification Methods :
• Max-membership principle
• Centroid method
• Weighted average method
• Mean–max membership
• Centre of sums
• Centre of largest area
• First of maxima or last of maxima
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 18/31
FUZZY INFERENCE SYSTEM (FIS)
• Other names: fuzzy RBS, fuzzy model, fuzzy expert system, fuzzy associative memory.
• A major unit of a fuzzy logic systemFormulates suitable rules and based upon the rules the
decision is made.
• Mainly based on the concepts of the fuzzy set theory, fuzzy IF–THEN rules, and fuzzy
reasoning.
• Uses “IF. . . THEN. . . ” statements, and the connectors present in the rule statement are
“OR” or “AND” to make the necessary decision rules.
• The basic FIS can take either fuzzy inputs or crisp inputs, but the outputs it produces are
always fuzzy sets.
• When the FIS is used as a controller, it is necessary to have a crisp output.
• Defuzzification : to extract a crisp value that best represents a fuzzy set.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 19/31
FIS consists of :
a rule base containing a number of fuzzy IF–THEN rules;

a database which defines the membership functions of the fuzzy sets used in the fuzzy rules;

a decision-making unit which performs the inference operations on the rules;

a fuzzification interface which transforms the crisp inputs into degrees of match with linguistic values; and

a defuzzification interface which transforms the fuzzy results of the inference into a crisp output.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 20/31
THE WORKINGS OF FIS
• The crisp input is converted in to fuzzy by using fuzzification method.
• After fuzzification the rule base is formed. The rule base and the database are jointly
referred to as the knowledge base. Defuzzification is used to convert fuzzy value to the
real world value which is the output.
• The steps of fuzzy reasoning (inference operations upon fuzzy IF–THEN rules) performed
by FISs are:
1. Compare the input variables with the membership functions on the antecedent part to obtain the
membership values of each linguistic label. (this step is often called fuzzification.)
2. Combine (through a specific t-norm operator, usually multiplication or min) the membership values
on the premise part to get firing strength (weight) of each rule.
3. Generate the qualified consequents (either fuzzy or crisp) or each rule depending on the firing
strength.
4. Aggregate the qualified consequents to produce a crisp output. (This step is called defuzzification.)
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 21/31
MAMDANI’S FUZZY INFERENCE METHOD
1. Determining a set of fuzzy rules

2. Fuzzifying the inputs using the input membership


functions

3. Combining the fuzzified inputs according to the fuzzy


rules to establish a rule strength

4. Finding the consequence of the rule by combining


the rule strength and the output membership function

5. Combining the consequences to get an output


distribution

6. Defuzzifying the output distribution (this step is only


if a crisp output (class) is needed).
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 22/31
TAKAGI-SUGENO FUZZY METHOD
• A typical fuzzy rule in a Sugeno fuzzy model :
IF x is A and y is B THEN z = f(x,y), where
AB are fuzzy sets in the antecedent;
Z = f(x,y) is a crisp function in the
consequent.
• Usually f(x,y) is a polynomial in the input variables x
and y, but it can be any other functions that can
appropriately describe the output of the output of
the system within the fuzzy region specified by the
antecedent of the rule.
• When f(x,y) is a first-order polynomial, we have the
first-order Sugeno fuzzy model.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 23/31


Advantages of the Sugeno Advantages of the Mamdani
Method Method
• It is computationally efficient. • It is intuitive.
• It works well with linear • It has widespread acceptance.
techniques (e.g., PID control). • It is well suited to human input.
• It works well with optimization Fuzzy inference system is the
and adaptive techniques. most important modeling tool
• It has guaranteed continuity of based on fuzzy set theory. The
the output surface. FISs are built by domain experts
• It is well suited to mathematical and are used in automatic
analysis. control, decision analysis, and
various other expert systems.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 24/31


FUZZY DECISION MAKING
• Fundamental activity of human beings.
• In any decision process we consider the information about the outcome and
choose among two or more alternatives for subsequent action.
• If good decisions are made, then we may get a good expected output.
• Decision making is defined to include any choice or selection alternatives.
• A decision is said to be made under certainty, where the outcome for each action
can be determined precisely.
• A decision is made under risk.
• When the only available knowledge concerning the outcomes consists of their
conditional probability distributions.
• The uncertainty existing is the prime domain for fuzzy decision (FD) making.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 25/31
TYPES OF FUZZY DECISION MAKING
Fuzzy Ordering
• Fuzzy ordering involves the decision made on rank basis.

Individual Decision Making


• A decision situation in this model is characterized by:
• 1. Set of possible actions
• 2. Set of goals pi(i ∈ xn), expressed in terms of fuzzy set
• 3. Set of constraints Qi(j ∈ xm), expressed in terms of fuzzy sets

Multi-Person Decision Making


• When decision are made by many persons, the difference of it from the individual decision maker is:
• 1. The goals of single decision makers differ, such that each places a different ordering
arrangements.
• 2. The individual decision makers have access to different information upon which to base their
decision.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 26/31


TYPES OF FUZZY DECISION MAKING
Multi-Objective Decision Making
• The process involves the selection of one alternative ai, from many alternatives A,
given a collection or set, say {0} objectives which is important for a decision maker.
• Define universe of n alternatives, i.e., A = {a1,a2,...,an} and set of “r” objectives
O = {01, 02,..., 0r}.

Fuzzy Bayesian Decision Method


• Classical Bayesian decision methods preassumes that the future states of the
nature can be characterized as probability events.
• The problem here in fuzzy Bayesian method is that the events are vague and
ambiguous and uncertain.
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 27/31
APPLICATIONS OF FUZZY LOGIC
Fuzzy Logic in Power Plants • Fuzzy Logic Supervisory Control for Coal Power Plant

Fuzzy Logic in Data Mining • Adaptive Fuzzy Partition in Data Base Mining: Application to Olfaction

Fuzzy Logic in Image Processing • Image Filtering, Edge Detection, and Edge Tracing Using Fuzzy Reasoning

Fuzzy Logic in Biomedicine • Fuzzy Logic-Based Anesthetic Depth Control

• Fuzzy Logic Enhanced Control of an AC Induction Motor with a DSP


Fuzzy Logic in Industrial and Control • Truck Speed Limiter Control by Fuzzy Logic
Applications • Analysis of Environmental Data for Traffic Control Using Fuzzy Logic
• Optimization of a Water Treatment System Using Fuzzy Logic

• Fuzzy Knowledge-Based System for the Control of a Refuse Incineration Plant Refuse Incineration
Fuzzy Logic Applications in • Application of Fuzzy Control for Optimal Operation of Complex Chilling Systems
Industrial Automation
• Fuzzy Logic Control of an Industrial Indexing Motion Application

Fuzzy Logic in Automotive • Antilock-Braking System and Vehicle Speed Estimation


Applications
• Multi-feature Pattern Recognition
Fuzzy Logic in Control • Automatic Generation Control Using Fuzzy Logic Controllers

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 28/31


APPLICATION OF FUZZY EXPERT SYSTEM
• Applications of Hybrid Fuzzy Expert Systems in Computer Networks
Design
• Fuzzy Expert System for Drying Process Control
• A Fuzzy Expert System for Product Life Cycle Management
• A Fuzzy Expert System Design for Diagnosis of Prostate Cancer
• The Validation of a Fuzzy Expert System for Umbilical Cord Acid–
Base Analysis
• A Fuzzy Expert System Architecture Implementing Onboard
Planning and Scheduling for Autonomous Small Satellite
Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 29/31
THANK YOU!
Reference : Sivanandam, N & Sai, Sumathi & Deepa, S N. (2007). Introduction to fuzzy logic using MATLAB. 10.1007/978-3-540-35781-0.

Maslina Zolkepli @ Fuzzy Logic Lecture 02/06/2025 30/31

You might also like