SlideShare une entreprise Scribd logo
1  sur  37
1
Fundamentals of Fuzzy Logic
• Introduction
• Fuzzy Set and example
• Fuzzy Terminology
• Fuzzy Logic Control and case study of
Room Cooler
• Fuzzy Regions, Fuzzy Profiles and Fuzzy
Rules
• Fuzzification
• Defuzzifier
2
Introduction
• Fuzzy systems, Neural networks and Genetic
Algorithms are a part of soft computing
technologies
• Assume that the problems to be solved belong
to a multidimensional input-output space or
search space; for example a two input and one
output space where the inputs and output are
related with nonlinear function
• The objective is to find the best input that
produces the required output
3
Introduction contd..
• Fuzzy systems and Neural networks model
such complex nonlinearity by combining
multiple simple functions
• Neural networks use sigmoid or other simple
functions and synaptic weights
• Fuzzy systems use several rules and
membership functions
4
Introduction to fuzzy logic
• Uncertainty is inherent in accessing
information from large amount of data;
for example words like near and slow in
sentences like” My house is near to the
office, “He drivels slowly”
• If we set slow as speeds <=20 and fast
otherwise, then is 20.1 is fast?
5
Introduction to fuzzy logic contd..
• Fuzzy logic deals with techniques to capture
the essence of comprehension and embed it on
the system
• Thus using fuzzy logic a gradual transition
from slow to high speed is allowed
• Due to the comprehension, fuzzy logic
provides higher intelligence quotient to
machines
6
Crisp sets and Fuzzy sets
Crisp sets: In a crisp set, members belong to the group
identified by the set or not
slow = {s such that 0 <= s <= 40}
fast = {s such that 40 < s <70}
40.1 belongs to set fast, hence 40.1 is not slow
Drawback of crisp sets: Suppose a physical system has
to apply brakes if the speed of the vehicle is fast and
release the brake if the speed is slow. If the speed is
in the interval [39, 41], such a system would
continuously keep jerking which is not desired
7
Fuzzy Sets
• To reduce the complexity of
comprehension, vagueness is introduced
in crisp sets
• Fuzzy set contains elements; each
element signifies the degree or grade of
membership to a fuzzy aspect
• Membership values denote the sense of
belonging of a member of a crisp set to a
fuzzy set
8
Example of a fuzzy set
• Consider a crisp set A with elements representing
ages of a set of people in years
• A = { 2, 4, 10, 15, 20, 30, 35, 40, 45, 60, 70}
• Classify the age in terms of six fuzzy variables or
names given to fuzzy sets as: infant, child, adolescent,
adult, young and old
• Membership is different from probabilities
• Memberships do not necessarily add up to one
9
Ages and their memberships
Table 1.
Age Infant Child Adole
scent
Young Adult Old
2 1 0 0 1 0 0
4 0.1 0.5 0 1 0 0
10 0 1 0.3 1 0 0
15 0 0.8 1 1 0 0
21 0 0 0.1 1 0.8 0.1
30 0 0 0 0.6 1 0.3
0 0 0 0 0.5 1 0.35
40 0 0 0 0. 4 1 0.4
45 0 0 0 0.2 1 0.6
60 0 0 0 0 1 0.8
70 0 0 0 0 1 1
Explanation of Example
• How to categorize a person with age 30?
• A person with age 40 is old?
• The table 1. shows the fuzzy sets namely ages,
infant, child, adolescent, adult, young and old
• The values in the table indicate the memberships to
the fuzzy sets
• For example, consider the fuzzy set child.
• A child with age 4 belongs to the fuzzy set child with
0.5 membership value and a child with age 10 is
100% member
10
Explanation of Example contd..
• As per the table 1. a person with age 30 is 60%
young and 100% adult
• A person with age 40 is 40% young and 100%
adult
• A person with age 60 is 100% adult and 80%
old
11
12
Features of Fuzzy Sets
1. A complex nonlinear input-output relation is
represented as a combination of simple input-output
relations
2. The simple input-output relation is described in
each rule
3. The system output from one rule area to the next
rule area gradually changes
4. Fuzzy logic systems are augmented with techniques
that facilitate learning and adaptation to the
environment; thus logic and fuzziness are separate
in fuzzy systems
13
Features of Fuzzy Sets contd..
• In Conventional two value logic based systems
logic and fuzziness are not different
• fuzzy logic systems modify rules when logic is
to be changed and change membership
functions when fuzziness is to be changed
Some Fuzzy Terminology
• Universe of Discourse (U): The range of all possible
values that comprise the input to the fuzzy system
• Fuzzy set: A set that has members with membership
(real) values in the interval [0,1]
• Membership function: It is the basis of a fuzzy set.
The membership function of the fuzzy set A is given
by µA: U [0,1]
14
Fuzzy Terminology contd..
• Support of a fuzzy set (Sf): The support S of a fuzzy
set f in a universal crisp set U is that set which
contains all elements of the set U that have a non-zero
membership value in f
the support of the fuzzy set adult S adult is given by
S adult= {21,30,35,40,45,60,70}
Depiction of a fuzzy set: A fuzzy set in a universal crisp
set U is written as
f =µ1/s1 + µ2/s2+…+ µn/sn wher µi is the membership, si
is the corresponding term in the support set ; + and / are only
user for representation purpose; fuzzy set OLD is depicted as
Old =0.1/21+0.3/30+0.35/35+0.4/40+0.6/45+0.8/60+1/70 15
Fuzzy Set Operations
• Union: The membership function of the union
of two fuzzy sets A and B is defined as the
maximum of the two individual membership
functions. It is equivalent to the Boolean OR
operation µ AUB = max( µA, µ B)
• Intersection: The membership function of the
Intersection of two fuzzy sets A and B is
defined as the minimum of the two individual
membership functions. It is equivalent to the
Boolean AND operation µ A^B = min(µA, µ B)
16
Fuzzy Set Operations contd..
Complement: The membership function of the
complement of a fuzzy set A is defined as the
negation of the specified membership function
It is equivalent to the Boolean NOT operation
µ Ac
= (1- µA)
17
Fuzzy Inference Processing
• There are three models for Fuzzy processing
based on the expressions of consequent parts
in fuzzy rules
Suppose xi are inputs and y is the consequents
in fuzzy rules
1.Mamdani Model: y = A
where A is a fuzzy number to reflect fuzziness
• Though it can be used in all types of systems,
the model is more suitable for knowledge
processing systems than control systems 18
Fuzzy Inference Processing contd..
2. TSK (Takagi-Sugano-Kang) model:
y = a0 + ai xi where ai are constantsƩ
The output is the weighted linear combination of input
variables (it can be expanded to nonlinear
combination of input variables)
Used in fuzzy control applications
3. Simplified fuzzy model: y = c
where c is a constant
Thus consequents are expressed by constant values
19
Applications of Fuzzy Logic
• Fuzzy logic has been used in many
applications including
- Domestic appliances like washing machines
and cameras
-Sophisticated applications such as turbine
control, data classifiers etc.
- Intelligent systems that use fuzzy logic
employ techniques for learning and adaptation
to the environment
20
Case Study: Controlling the speed of a motor in a room cooler
• Through this case study we can understand fuzzy
logic, defining fuzzy rules and fuzzy inference and
control mechanisms
• Mamdani style of inference processing is used
• Problem: A room cooler has a fan encased in a box
with wool or hay. The wool is continuously
moistened by water that flows through a pump
connected to a motor. The rate of flow of water is to
be determined; it is a function of room temperature
and the speed of motor
• The speed of the motor is based on two parameters:
temperature and humidity; humidity is increased to reduce
temperature 21
Case Study: Operation of a room cooler contd..
• Two input variables –room temperature and cooler
fan speed control the output variable – flow rate of
the water. The fuzzy regions using fuzzy terms for
input-output are defined as follows
Variable name Fuzzy terms
Temperature Cold, Cool, Moderate, Warm and Hot
Fan speed Slack, Low, Medium, Brisk, fast
((rotations per minute)
Flow rate of water Strong Negative (SN), Negative (N),
Low-Negative (LN), Medium (M), Low-Positive
(LP), Positive (P), and High-Positive (HP)
22
Case Study: Operation of a room cooler contd..
• Fuzzy profiles are defined for each of the three parameters by
assigning memberships to their respective values
• The profiles have to be carefully designed after studying the
nature and desired behavior of the system
23
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49
Temperature
Degree of
membership
Cold Cool Moderate Warm
Fig.1. Fuzzy relationships for the inputs
Temperature
1.2
1
0.8
0.6
0.4
0.2
0
Hot
Case Study: Operation of a room cooler contd..
Figure 2. Fuzzy relationships for the inputs Fan Motor speed
24
1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49
Motor speed RPM
Degree of
membership
Slack Low Medium Brisk Fast
1.2
1
0.8
0.6
0.4
0.2
0
Slack Low Medium Brisk Fast
Case Study: Operation of a room cooler contd..
Figure 3. Fuzzy relationships for the outputs Water Flow Rate
25
0 0.2 0.4 0.6 0.8 1 1.2 14 1.6
Flow rate (ml/Sec)
Degree of
membership
SN N LN M LP P HP
1.2
1
0.8
0.6
0.4
0.2
0
Fuzzy Rules for fuzzy room cooler
• The fuzzy rules form the triggers of the fuzzy engine
• After a study of the system, the rules could be written as
follows
R1: If temperature is HOT and fan motor speed is
SLACK then the flow-rate is HIGH-POSITIVE
R2: If temperature is HOT and fan motor speed is LOW
then the flow-rate is HIGH-POSITIVE
R3: If temperature is HOT and fan motor speed is
MEDIUM then the flow-rate is POSITIVE
R4: If temperature is HOT and fan motor speed is
BRISK then the flow-rate is HIGH-POSITIVE
Fuzzy Rules for fuzzy room cooler contd..
• R5: If temperature is WARM and fan motor speed is
MEDIUM then the flow-rate is LOW-POSITIVE
• R6: If temperature is WARM and fan motor speed is
BRISK then the flow-rate is POSITIVE
• R7: If temperature is COOL and fan motor speed is
LOW then the flow-rate is NEGATIVE
• R8: If temperature is MODERATE and fan motor
speed is LOW then the flow-rate is MEDIUM 27
Fuzzification
• The fuzzifier that performs the mapping of the
membership values of the input parameters
temperature and fan speed to the respective
fuzzy regions is known as fuzzification. This is
the most important step in fuzzy systems
• Suppose that at some time t, the temperature is
42 degrees and fan speed is 31 rpm. The
corresponding membership values and the
fuzzy regions are shown in Table 2
28
Example of fuzzification
• From Figure 1., the temperature 42 degrees
correspond to two membership values 0.142 and 0.2
that belong to WARM and HOT fuzzy regions
respectively
• Similarly From Figure 2., the fan speed 31 rpm
corresponds to two membership values 0.25 and
0.286 that belong to MEDIUM and BRISK fuzzy
regions respectively Table 2
29
Parameters Fuzzy Regions Memberships
Temperature Warm, hot 0.142, 0.2
Fan Speed medium, brisk 0.25, 0.286
Example of fuzzification contd..
• From Table 2, there are four combinations possible
• If temperature is WARM and fan speed is MEDIUM
• If temperature is WARM and fan speed is BRISK
• If temperature is HOT and fan speed is MEDIUM
• If temperature is HOT and fan speed is BRISK
• Comparing the above combinations with the left side
of fuzzy rules R5, R6, R3, and R4 respectively, the
flow-rate should be LOW-POSITIVE, POSITIVE,
POSITIVE and HIGH-POSITIVE
• The conflict should be resolved and the fuzzy region is to be
given as a value for the parameter water flow-rate
30
Defuzzification
• The fuzzy outputs LOW-POSITIVE, POSITIVE, and HIGH-
POSITIVE are to be converted to a single crisp value that is
provided to the fuzzy cooler system; this process is called
defuzzification
• Several methods are used for defuzzification
• The most common methods are
1. The centre of gravity method and
2. The Composite Maxima method
The centroid, of a two-dimensional shape X is the intersection of all
straight lines that divide X into two parts of equal moment about the line
or the average of all points of X. (Moment is a quantitative measure of
the shape of a set of points.)
In both these methods the composite region formed by the
portions A, B, C, and D (corresponding to rules R3, R4, R5
and R6 respectively) on the output profile is to be computed31
Defuzzification contd..
32
• ttttt1 4 7… 37 40 43 46 48
1 4 … 13…. 31 34 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Hot
Medium
Temperature 42 D Centigrade Motor speed (RPM) 31
0.25
1.2
1
0.8
0.6
0.4
0.2
0
Rule R3
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
P
0.2
Flow rate (ml/Sec)
Min(0.2,0.25) = 0.2
C
Figure
4.1
Figure
4.2
Figure 4.3
Defuzzification contd..
33
• ttttt1 4 7… 37 40 43 46 48
1 4 … 28 ..31.. 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Hot
Brisk
Temperature 42 D Centigrade Motor speed (RPM) 31
0.286
1.2
1
0.8
0.6
0.4
0.2
0
Rule R4
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
HP
0.2
Flow rate (ml/Sec)
Min(0.2,0.286) = 0.2
D
Figure 5.1
Figure 5.2
Figure 5.3
Defuzzification contd..
34
• ttttt1 4 7..28.. 40 43 46 48
1 4 … 13…. 31 34 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Warm
Medium
Temperature 42 D Centigrade Motor speed (RPM) 31
0.25
1.2
1
0.8
0.6
0.4
0.2
0
Rule R5
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
LP
0.142
Flow rate (ml/Sec)
Min(0.142,0.25) = 0.25
A
Figure 6.1
Figure 6.2
Figure 6.3
Defuzzification contd..
35
• ttttt1 4 7..28.. 40 43 46 48
1 4 …13.. 28..31 34 37 40 43 46 48
1.2
1
.8
.6
. 4
.2
0
1.2
1
.8
.6
.4
.2
0
Warm
Brisk
Temperature 42 D Centigrade Motor speed (RPM) 31
0.286
1.2
1
0.8
0.6
0.4
0.2
0
Rule R6
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
P
0.142
Flow rate (ml/Sec)
Min(0.142,0.286) =0.142
B
Figure 7.1
Figure 7.2
Figure 7.3
Defuzzification contd..
36
Temperature 42 D Centigrade Motor speed (RPM) 31
1.2
1
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6
P
Flow rate (ml/Sec)
LP
HP
Centroid
A B is within C as it is
a subset of the
region C
D
Figure 8When parameters are connected by AND
the minimum of their memberships is taken
The area C is the region formed by the
application of rule R3 as shown in Figure 4.3
The area D is the region formed by the
application of rule R4 as shown in Figure 5.3
The area A is the region formed by the
application of rule R5 as shown in Figure 6.3
The area B is the region formed by the
application of rule R6 as shown in Figure 7.3
The composite region formed by the portions
A, B, C and D on the output profile is shown
in Figure 8.
The centre of gravity of this composite
region is the crisp output or the desired flow
rate value
Steps in Fuzzy logic based system
• Formulating fuzzy regions
• Fuzzy rules
• Embedding a Defuzzification procedure
In Defuzzification procedure, depending on the
application, either the centre of gravity or the
composite maxima is found to obtain the crisp output

Contenu connexe

Tendances

Tendances (20)

Classical Sets & fuzzy sets
Classical Sets & fuzzy setsClassical Sets & fuzzy sets
Classical Sets & fuzzy sets
 
Fuzzy arithmetic
Fuzzy arithmeticFuzzy arithmetic
Fuzzy arithmetic
 
Neuro-fuzzy systems
Neuro-fuzzy systemsNeuro-fuzzy systems
Neuro-fuzzy systems
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Defuzzification
DefuzzificationDefuzzification
Defuzzification
 
Fuzzy Logic in the Real World
Fuzzy Logic in the Real WorldFuzzy Logic in the Real World
Fuzzy Logic in the Real World
 
What is the Expectation Maximization (EM) Algorithm?
What is the Expectation Maximization (EM) Algorithm?What is the Expectation Maximization (EM) Algorithm?
What is the Expectation Maximization (EM) Algorithm?
 
Minmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slidesMinmax Algorithm In Artificial Intelligence slides
Minmax Algorithm In Artificial Intelligence slides
 
Fuzzy Set
Fuzzy SetFuzzy Set
Fuzzy Set
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy Membership Function
Fuzzy Membership Function Fuzzy Membership Function
Fuzzy Membership Function
 
Fuzzy logic control
Fuzzy logic controlFuzzy logic control
Fuzzy logic control
 
Fuzzy logic and application in AI
Fuzzy logic and application in AIFuzzy logic and application in AI
Fuzzy logic and application in AI
 
Application of fuzzy logic
Application of fuzzy logicApplication of fuzzy logic
Application of fuzzy logic
 
State Space Search in ai
State Space Search in aiState Space Search in ai
State Space Search in ai
 
Fuzzy expert system
Fuzzy expert systemFuzzy expert system
Fuzzy expert system
 
Introduction to fuzzy logic
Introduction to fuzzy logicIntroduction to fuzzy logic
Introduction to fuzzy logic
 
Crisp set
Crisp setCrisp set
Crisp set
 
If then rule in fuzzy logic and fuzzy implications
If then rule  in fuzzy logic and fuzzy implicationsIf then rule  in fuzzy logic and fuzzy implications
If then rule in fuzzy logic and fuzzy implications
 
Presentation on fuzzy logic and fuzzy systems
Presentation on fuzzy logic and fuzzy systemsPresentation on fuzzy logic and fuzzy systems
Presentation on fuzzy logic and fuzzy systems
 

En vedette

Fuzzy Logic Ppt
Fuzzy Logic PptFuzzy Logic Ppt
Fuzzy Logic Ppt
rafi
 
Classical relations and fuzzy relations
Classical relations and fuzzy relationsClassical relations and fuzzy relations
Classical relations and fuzzy relations
Baran Kaynak
 
33412283 solving-fuzzy-logic-problems-with-matlab
33412283 solving-fuzzy-logic-problems-with-matlab33412283 solving-fuzzy-logic-problems-with-matlab
33412283 solving-fuzzy-logic-problems-with-matlab
sai kumar
 
Abhimanyu alekh deepak_fuzzy interfearence design
Abhimanyu alekh deepak_fuzzy interfearence designAbhimanyu alekh deepak_fuzzy interfearence design
Abhimanyu alekh deepak_fuzzy interfearence design
Deepak Kumar
 
Fuzzy logic and fuzzy time series edited
Fuzzy logic and fuzzy time series   editedFuzzy logic and fuzzy time series   edited
Fuzzy logic and fuzzy time series edited
Prof Dr S.M.Aqil Burney
 
Sensor field oriented control of 1 phase induction motor using
Sensor field oriented control of 1 phase induction motor usingSensor field oriented control of 1 phase induction motor using
Sensor field oriented control of 1 phase induction motor using
HPE Continuity
 

En vedette (19)

Fuzzy logic ppt
Fuzzy logic pptFuzzy logic ppt
Fuzzy logic ppt
 
Fuzzy Logic Ppt
Fuzzy Logic PptFuzzy Logic Ppt
Fuzzy Logic Ppt
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy Sets Introduction With Example
Fuzzy Sets Introduction With ExampleFuzzy Sets Introduction With Example
Fuzzy Sets Introduction With Example
 
L1 fuzzy sets & basic operations
L1 fuzzy sets & basic operationsL1 fuzzy sets & basic operations
L1 fuzzy sets & basic operations
 
Intelligence control using fuzzy logic
Intelligence control using fuzzy logicIntelligence control using fuzzy logic
Intelligence control using fuzzy logic
 
Classical relations and fuzzy relations
Classical relations and fuzzy relationsClassical relations and fuzzy relations
Classical relations and fuzzy relations
 
33412283 solving-fuzzy-logic-problems-with-matlab
33412283 solving-fuzzy-logic-problems-with-matlab33412283 solving-fuzzy-logic-problems-with-matlab
33412283 solving-fuzzy-logic-problems-with-matlab
 
T2 fs talk
T2 fs talkT2 fs talk
T2 fs talk
 
Abhimanyu alekh deepak_fuzzy interfearence design
Abhimanyu alekh deepak_fuzzy interfearence designAbhimanyu alekh deepak_fuzzy interfearence design
Abhimanyu alekh deepak_fuzzy interfearence design
 
Fuzzy logic and fuzzy time series edited
Fuzzy logic and fuzzy time series   editedFuzzy logic and fuzzy time series   edited
Fuzzy logic and fuzzy time series edited
 
Fuzzy control and its applications
Fuzzy control and its applicationsFuzzy control and its applications
Fuzzy control and its applications
 
Sensor field oriented control of 1 phase induction motor using
Sensor field oriented control of 1 phase induction motor usingSensor field oriented control of 1 phase induction motor using
Sensor field oriented control of 1 phase induction motor using
 
Soft computing08
Soft computing08Soft computing08
Soft computing08
 
Fuzzy logic-introduction
Fuzzy logic-introductionFuzzy logic-introduction
Fuzzy logic-introduction
 
Facts on Grid Friendly Wind Plants
Facts on Grid Friendly Wind PlantsFacts on Grid Friendly Wind Plants
Facts on Grid Friendly Wind Plants
 
Fuzzy Logic Application in Robotics( Humanoid Push Recovery)
Fuzzy Logic Application in Robotics( Humanoid Push Recovery)Fuzzy Logic Application in Robotics( Humanoid Push Recovery)
Fuzzy Logic Application in Robotics( Humanoid Push Recovery)
 
A method for controlling the bandwidth of high energy, fewoptical-cycle
A method for controlling the bandwidth of high energy, fewoptical-cycleA method for controlling the bandwidth of high energy, fewoptical-cycle
A method for controlling the bandwidth of high energy, fewoptical-cycle
 
Neon catalog 2
Neon catalog 2Neon catalog 2
Neon catalog 2
 

Similaire à Fuzzy Logic

Similaire à Fuzzy Logic (20)

Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
109 me0422
109 me0422109 me0422
109 me0422
 
LVTS APC fuzzy controller
LVTS APC fuzzy controllerLVTS APC fuzzy controller
LVTS APC fuzzy controller
 
Fuzzy Logic Controller.pptx
Fuzzy Logic Controller.pptxFuzzy Logic Controller.pptx
Fuzzy Logic Controller.pptx
 
fuzzy-logic nit-Bharat.ppt
fuzzy-logic nit-Bharat.pptfuzzy-logic nit-Bharat.ppt
fuzzy-logic nit-Bharat.ppt
 
Fuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with ImplementationFuzzy Logic Seminar with Implementation
Fuzzy Logic Seminar with Implementation
 
Fuzzy logic 2014
Fuzzy logic 2014Fuzzy logic 2014
Fuzzy logic 2014
 
Greedy method
Greedy methodGreedy method
Greedy method
 
Fuzzy Controller Design Procedure System
Fuzzy Controller Design Procedure SystemFuzzy Controller Design Procedure System
Fuzzy Controller Design Procedure System
 
Fuzz2
Fuzz2Fuzz2
Fuzz2
 
Unit8: Uncertainty in AI
Unit8: Uncertainty in AIUnit8: Uncertainty in AI
Unit8: Uncertainty in AI
 
Optimization of Fuzzy Logic controller for Luo Converter using Genetic Algor...
Optimization of Fuzzy Logic controller for Luo Converter using  Genetic Algor...Optimization of Fuzzy Logic controller for Luo Converter using  Genetic Algor...
Optimization of Fuzzy Logic controller for Luo Converter using Genetic Algor...
 
Fuzzification of College Adviser Proficiency Based on Specific Knowledge
Fuzzification of College Adviser Proficiency Based on Specific KnowledgeFuzzification of College Adviser Proficiency Based on Specific Knowledge
Fuzzification of College Adviser Proficiency Based on Specific Knowledge
 
Fuzzy logic member functions
Fuzzy logic member functionsFuzzy logic member functions
Fuzzy logic member functions
 
01.pdf
01.pdf01.pdf
01.pdf
 
Class13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdfClass13_Quicksort_Algorithm.pdf
Class13_Quicksort_Algorithm.pdf
 
What is Fuzzy Logic?
What is Fuzzy Logic?What is Fuzzy Logic?
What is Fuzzy Logic?
 
System Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event SchedulingSystem Simulation and Modelling with types and Event Scheduling
System Simulation and Modelling with types and Event Scheduling
 
5954987.ppt
5954987.ppt5954987.ppt
5954987.ppt
 

Dernier

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 

Dernier (20)

UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptxHMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
HMCS Vancouver Pre-Deployment Brief - May 2024 (Web Version).pptx
 

Fuzzy Logic

  • 1. 1 Fundamentals of Fuzzy Logic • Introduction • Fuzzy Set and example • Fuzzy Terminology • Fuzzy Logic Control and case study of Room Cooler • Fuzzy Regions, Fuzzy Profiles and Fuzzy Rules • Fuzzification • Defuzzifier
  • 2. 2 Introduction • Fuzzy systems, Neural networks and Genetic Algorithms are a part of soft computing technologies • Assume that the problems to be solved belong to a multidimensional input-output space or search space; for example a two input and one output space where the inputs and output are related with nonlinear function • The objective is to find the best input that produces the required output
  • 3. 3 Introduction contd.. • Fuzzy systems and Neural networks model such complex nonlinearity by combining multiple simple functions • Neural networks use sigmoid or other simple functions and synaptic weights • Fuzzy systems use several rules and membership functions
  • 4. 4 Introduction to fuzzy logic • Uncertainty is inherent in accessing information from large amount of data; for example words like near and slow in sentences like” My house is near to the office, “He drivels slowly” • If we set slow as speeds <=20 and fast otherwise, then is 20.1 is fast?
  • 5. 5 Introduction to fuzzy logic contd.. • Fuzzy logic deals with techniques to capture the essence of comprehension and embed it on the system • Thus using fuzzy logic a gradual transition from slow to high speed is allowed • Due to the comprehension, fuzzy logic provides higher intelligence quotient to machines
  • 6. 6 Crisp sets and Fuzzy sets Crisp sets: In a crisp set, members belong to the group identified by the set or not slow = {s such that 0 <= s <= 40} fast = {s such that 40 < s <70} 40.1 belongs to set fast, hence 40.1 is not slow Drawback of crisp sets: Suppose a physical system has to apply brakes if the speed of the vehicle is fast and release the brake if the speed is slow. If the speed is in the interval [39, 41], such a system would continuously keep jerking which is not desired
  • 7. 7 Fuzzy Sets • To reduce the complexity of comprehension, vagueness is introduced in crisp sets • Fuzzy set contains elements; each element signifies the degree or grade of membership to a fuzzy aspect • Membership values denote the sense of belonging of a member of a crisp set to a fuzzy set
  • 8. 8 Example of a fuzzy set • Consider a crisp set A with elements representing ages of a set of people in years • A = { 2, 4, 10, 15, 20, 30, 35, 40, 45, 60, 70} • Classify the age in terms of six fuzzy variables or names given to fuzzy sets as: infant, child, adolescent, adult, young and old • Membership is different from probabilities • Memberships do not necessarily add up to one
  • 9. 9 Ages and their memberships Table 1. Age Infant Child Adole scent Young Adult Old 2 1 0 0 1 0 0 4 0.1 0.5 0 1 0 0 10 0 1 0.3 1 0 0 15 0 0.8 1 1 0 0 21 0 0 0.1 1 0.8 0.1 30 0 0 0 0.6 1 0.3 0 0 0 0 0.5 1 0.35 40 0 0 0 0. 4 1 0.4 45 0 0 0 0.2 1 0.6 60 0 0 0 0 1 0.8 70 0 0 0 0 1 1
  • 10. Explanation of Example • How to categorize a person with age 30? • A person with age 40 is old? • The table 1. shows the fuzzy sets namely ages, infant, child, adolescent, adult, young and old • The values in the table indicate the memberships to the fuzzy sets • For example, consider the fuzzy set child. • A child with age 4 belongs to the fuzzy set child with 0.5 membership value and a child with age 10 is 100% member 10
  • 11. Explanation of Example contd.. • As per the table 1. a person with age 30 is 60% young and 100% adult • A person with age 40 is 40% young and 100% adult • A person with age 60 is 100% adult and 80% old 11
  • 12. 12 Features of Fuzzy Sets 1. A complex nonlinear input-output relation is represented as a combination of simple input-output relations 2. The simple input-output relation is described in each rule 3. The system output from one rule area to the next rule area gradually changes 4. Fuzzy logic systems are augmented with techniques that facilitate learning and adaptation to the environment; thus logic and fuzziness are separate in fuzzy systems
  • 13. 13 Features of Fuzzy Sets contd.. • In Conventional two value logic based systems logic and fuzziness are not different • fuzzy logic systems modify rules when logic is to be changed and change membership functions when fuzziness is to be changed
  • 14. Some Fuzzy Terminology • Universe of Discourse (U): The range of all possible values that comprise the input to the fuzzy system • Fuzzy set: A set that has members with membership (real) values in the interval [0,1] • Membership function: It is the basis of a fuzzy set. The membership function of the fuzzy set A is given by µA: U [0,1] 14
  • 15. Fuzzy Terminology contd.. • Support of a fuzzy set (Sf): The support S of a fuzzy set f in a universal crisp set U is that set which contains all elements of the set U that have a non-zero membership value in f the support of the fuzzy set adult S adult is given by S adult= {21,30,35,40,45,60,70} Depiction of a fuzzy set: A fuzzy set in a universal crisp set U is written as f =µ1/s1 + µ2/s2+…+ µn/sn wher µi is the membership, si is the corresponding term in the support set ; + and / are only user for representation purpose; fuzzy set OLD is depicted as Old =0.1/21+0.3/30+0.35/35+0.4/40+0.6/45+0.8/60+1/70 15
  • 16. Fuzzy Set Operations • Union: The membership function of the union of two fuzzy sets A and B is defined as the maximum of the two individual membership functions. It is equivalent to the Boolean OR operation µ AUB = max( µA, µ B) • Intersection: The membership function of the Intersection of two fuzzy sets A and B is defined as the minimum of the two individual membership functions. It is equivalent to the Boolean AND operation µ A^B = min(µA, µ B) 16
  • 17. Fuzzy Set Operations contd.. Complement: The membership function of the complement of a fuzzy set A is defined as the negation of the specified membership function It is equivalent to the Boolean NOT operation µ Ac = (1- µA) 17
  • 18. Fuzzy Inference Processing • There are three models for Fuzzy processing based on the expressions of consequent parts in fuzzy rules Suppose xi are inputs and y is the consequents in fuzzy rules 1.Mamdani Model: y = A where A is a fuzzy number to reflect fuzziness • Though it can be used in all types of systems, the model is more suitable for knowledge processing systems than control systems 18
  • 19. Fuzzy Inference Processing contd.. 2. TSK (Takagi-Sugano-Kang) model: y = a0 + ai xi where ai are constantsƩ The output is the weighted linear combination of input variables (it can be expanded to nonlinear combination of input variables) Used in fuzzy control applications 3. Simplified fuzzy model: y = c where c is a constant Thus consequents are expressed by constant values 19
  • 20. Applications of Fuzzy Logic • Fuzzy logic has been used in many applications including - Domestic appliances like washing machines and cameras -Sophisticated applications such as turbine control, data classifiers etc. - Intelligent systems that use fuzzy logic employ techniques for learning and adaptation to the environment 20
  • 21. Case Study: Controlling the speed of a motor in a room cooler • Through this case study we can understand fuzzy logic, defining fuzzy rules and fuzzy inference and control mechanisms • Mamdani style of inference processing is used • Problem: A room cooler has a fan encased in a box with wool or hay. The wool is continuously moistened by water that flows through a pump connected to a motor. The rate of flow of water is to be determined; it is a function of room temperature and the speed of motor • The speed of the motor is based on two parameters: temperature and humidity; humidity is increased to reduce temperature 21
  • 22. Case Study: Operation of a room cooler contd.. • Two input variables –room temperature and cooler fan speed control the output variable – flow rate of the water. The fuzzy regions using fuzzy terms for input-output are defined as follows Variable name Fuzzy terms Temperature Cold, Cool, Moderate, Warm and Hot Fan speed Slack, Low, Medium, Brisk, fast ((rotations per minute) Flow rate of water Strong Negative (SN), Negative (N), Low-Negative (LN), Medium (M), Low-Positive (LP), Positive (P), and High-Positive (HP) 22
  • 23. Case Study: Operation of a room cooler contd.. • Fuzzy profiles are defined for each of the three parameters by assigning memberships to their respective values • The profiles have to be carefully designed after studying the nature and desired behavior of the system 23 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 Temperature Degree of membership Cold Cool Moderate Warm Fig.1. Fuzzy relationships for the inputs Temperature 1.2 1 0.8 0.6 0.4 0.2 0 Hot
  • 24. Case Study: Operation of a room cooler contd.. Figure 2. Fuzzy relationships for the inputs Fan Motor speed 24 1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 Motor speed RPM Degree of membership Slack Low Medium Brisk Fast 1.2 1 0.8 0.6 0.4 0.2 0 Slack Low Medium Brisk Fast
  • 25. Case Study: Operation of a room cooler contd.. Figure 3. Fuzzy relationships for the outputs Water Flow Rate 25 0 0.2 0.4 0.6 0.8 1 1.2 14 1.6 Flow rate (ml/Sec) Degree of membership SN N LN M LP P HP 1.2 1 0.8 0.6 0.4 0.2 0
  • 26. Fuzzy Rules for fuzzy room cooler • The fuzzy rules form the triggers of the fuzzy engine • After a study of the system, the rules could be written as follows R1: If temperature is HOT and fan motor speed is SLACK then the flow-rate is HIGH-POSITIVE R2: If temperature is HOT and fan motor speed is LOW then the flow-rate is HIGH-POSITIVE R3: If temperature is HOT and fan motor speed is MEDIUM then the flow-rate is POSITIVE R4: If temperature is HOT and fan motor speed is BRISK then the flow-rate is HIGH-POSITIVE
  • 27. Fuzzy Rules for fuzzy room cooler contd.. • R5: If temperature is WARM and fan motor speed is MEDIUM then the flow-rate is LOW-POSITIVE • R6: If temperature is WARM and fan motor speed is BRISK then the flow-rate is POSITIVE • R7: If temperature is COOL and fan motor speed is LOW then the flow-rate is NEGATIVE • R8: If temperature is MODERATE and fan motor speed is LOW then the flow-rate is MEDIUM 27
  • 28. Fuzzification • The fuzzifier that performs the mapping of the membership values of the input parameters temperature and fan speed to the respective fuzzy regions is known as fuzzification. This is the most important step in fuzzy systems • Suppose that at some time t, the temperature is 42 degrees and fan speed is 31 rpm. The corresponding membership values and the fuzzy regions are shown in Table 2 28
  • 29. Example of fuzzification • From Figure 1., the temperature 42 degrees correspond to two membership values 0.142 and 0.2 that belong to WARM and HOT fuzzy regions respectively • Similarly From Figure 2., the fan speed 31 rpm corresponds to two membership values 0.25 and 0.286 that belong to MEDIUM and BRISK fuzzy regions respectively Table 2 29 Parameters Fuzzy Regions Memberships Temperature Warm, hot 0.142, 0.2 Fan Speed medium, brisk 0.25, 0.286
  • 30. Example of fuzzification contd.. • From Table 2, there are four combinations possible • If temperature is WARM and fan speed is MEDIUM • If temperature is WARM and fan speed is BRISK • If temperature is HOT and fan speed is MEDIUM • If temperature is HOT and fan speed is BRISK • Comparing the above combinations with the left side of fuzzy rules R5, R6, R3, and R4 respectively, the flow-rate should be LOW-POSITIVE, POSITIVE, POSITIVE and HIGH-POSITIVE • The conflict should be resolved and the fuzzy region is to be given as a value for the parameter water flow-rate 30
  • 31. Defuzzification • The fuzzy outputs LOW-POSITIVE, POSITIVE, and HIGH- POSITIVE are to be converted to a single crisp value that is provided to the fuzzy cooler system; this process is called defuzzification • Several methods are used for defuzzification • The most common methods are 1. The centre of gravity method and 2. The Composite Maxima method The centroid, of a two-dimensional shape X is the intersection of all straight lines that divide X into two parts of equal moment about the line or the average of all points of X. (Moment is a quantitative measure of the shape of a set of points.) In both these methods the composite region formed by the portions A, B, C, and D (corresponding to rules R3, R4, R5 and R6 respectively) on the output profile is to be computed31
  • 32. Defuzzification contd.. 32 • ttttt1 4 7… 37 40 43 46 48 1 4 … 13…. 31 34 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Hot Medium Temperature 42 D Centigrade Motor speed (RPM) 31 0.25 1.2 1 0.8 0.6 0.4 0.2 0 Rule R3 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 P 0.2 Flow rate (ml/Sec) Min(0.2,0.25) = 0.2 C Figure 4.1 Figure 4.2 Figure 4.3
  • 33. Defuzzification contd.. 33 • ttttt1 4 7… 37 40 43 46 48 1 4 … 28 ..31.. 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Hot Brisk Temperature 42 D Centigrade Motor speed (RPM) 31 0.286 1.2 1 0.8 0.6 0.4 0.2 0 Rule R4 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 HP 0.2 Flow rate (ml/Sec) Min(0.2,0.286) = 0.2 D Figure 5.1 Figure 5.2 Figure 5.3
  • 34. Defuzzification contd.. 34 • ttttt1 4 7..28.. 40 43 46 48 1 4 … 13…. 31 34 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Warm Medium Temperature 42 D Centigrade Motor speed (RPM) 31 0.25 1.2 1 0.8 0.6 0.4 0.2 0 Rule R5 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 LP 0.142 Flow rate (ml/Sec) Min(0.142,0.25) = 0.25 A Figure 6.1 Figure 6.2 Figure 6.3
  • 35. Defuzzification contd.. 35 • ttttt1 4 7..28.. 40 43 46 48 1 4 …13.. 28..31 34 37 40 43 46 48 1.2 1 .8 .6 . 4 .2 0 1.2 1 .8 .6 .4 .2 0 Warm Brisk Temperature 42 D Centigrade Motor speed (RPM) 31 0.286 1.2 1 0.8 0.6 0.4 0.2 0 Rule R6 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 P 0.142 Flow rate (ml/Sec) Min(0.142,0.286) =0.142 B Figure 7.1 Figure 7.2 Figure 7.3
  • 36. Defuzzification contd.. 36 Temperature 42 D Centigrade Motor speed (RPM) 31 1.2 1 0.8 0.6 0.4 0.2 0 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 P Flow rate (ml/Sec) LP HP Centroid A B is within C as it is a subset of the region C D Figure 8When parameters are connected by AND the minimum of their memberships is taken The area C is the region formed by the application of rule R3 as shown in Figure 4.3 The area D is the region formed by the application of rule R4 as shown in Figure 5.3 The area A is the region formed by the application of rule R5 as shown in Figure 6.3 The area B is the region formed by the application of rule R6 as shown in Figure 7.3 The composite region formed by the portions A, B, C and D on the output profile is shown in Figure 8. The centre of gravity of this composite region is the crisp output or the desired flow rate value
  • 37. Steps in Fuzzy logic based system • Formulating fuzzy regions • Fuzzy rules • Embedding a Defuzzification procedure In Defuzzification procedure, depending on the application, either the centre of gravity or the composite maxima is found to obtain the crisp output