0% found this document useful (0 votes)
43 views62 pages

Fuzzy Logic

Fuzzy logic allows for intermediate values between binary evaluations like "warm" and "cold" by using fuzzy sets and membership functions between 0 and 1. This allows computers to process imprecise concepts like "rather warm" in a way that mimics human thinking. Fuzzy logic uses linguistic variables defined by membership functions over a universe of discourse to represent vague concepts. Common shapes for membership functions include triangular, trapezoidal, and Gaussian. Properties of fuzzy sets include the core, support, and boundary.

Uploaded by

manoj pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
43 views62 pages

Fuzzy Logic

Fuzzy logic allows for intermediate values between binary evaluations like "warm" and "cold" by using fuzzy sets and membership functions between 0 and 1. This allows computers to process imprecise concepts like "rather warm" in a way that mimics human thinking. Fuzzy logic uses linguistic variables defined by membership functions over a universe of discourse to represent vague concepts. Common shapes for membership functions include triangular, trapezoidal, and Gaussian. Properties of fuzzy sets include the core, support, and boundary.

Uploaded by

manoj pandey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 62

Introduction to Fuzzy Sets and Fuzzy Logic

1
Fuzzy
Fuzzy Logic
Logic
Fuzzy logic is a multivalued logic that allows intermediate
values to be defined between binary evaluations (such as
either “warm” or “cold”). In fuzzy logic, notions such as
“rather warm” or “pretty cold” can be formulated
mathematically, and thus can be processed by computers. By
enabling computers to process such imprecise notions, it may
be possible to develop machines that mimic human-like
thinking.

2
Why
Why Fuzzy
Fuzzy
• Based on intuition and judgment

• No need for a mathematical model

• Provides a smooth transition between members and


nonmembers

• Relatively simple, fast and adaptive

• Less sensitive to system fluctuations

• Can implement design objectives, difficult to express


mathematically, in linguistic or descriptive rules.
3
Why
Why Fuzzy
Fuzzy
• Complex, ill-defined processes difficult for description and
analysis by exact mathematical techniques
• Approximate and inexact nature of the real word;
vague concepts easily dealt with by humans in daily life

Thus, we need other technique, as supplementary to


conventional quantitative methods, for manipulation of
vague and uncertain information, and to create systems that
are much closer in spirit to human thinking. Fuzzy logic is a
strong candidate for this purpose.

4
 Boolean/Crisp set A is a mapping for the elements of S to the
set {0, 1}, i.e., A: S  {0, 1}
 Characteristic function:

{
1 if x is an element of set A
 A(x) = 0 if x is not an element of set A

• Fuzzy set F is a mapping for the elements of S to the interval


[0, 1], i.e., F: S  [0, 1]
• Characteristic function: 0  F(x)  1
• 1 means full membership, 0 means no membership and anything in
between, e.g., 0.5 is called graded membership
5
Definition of a fuzzy set
Classical set A in X is
a set of ordered pairs
A  x, I A x  x  X ,
defined by indicator
function I A x  0,1

Fuzzy set A in X is as
a set of ordered pairs
A  x,  A x  x  X ,
defined by membership
function 0   A x   1

6
One can define the crisp set “circles” as:

The fuzzy set “circles can be defined as:

7
Fuzzy
Fuzzy Linguistic
Linguistic variables
variables
Examples of fuzzy measures include:
close, heavy, light, big, small, smart, fast, slow, hot, cold,
Tall, Short, ....,
•Fuzzy sets and concepts are commonly used in natural language

John is tall
Dan is smart
Alex is happy
The class is hot

8
Crisp
Crisp membership
membership function
function
Crisp membership functions ( µ) are either one or zero.
• e.g. Numbers greater than 10.

A ={x | x>10}

μA( x )

10 9
Fuzzy
Fuzzy membership
membership function
function
The set, B, of numbers near to 2 can be represented by a
membership function:

10
Fuzzy
Fuzzy membership
membership function
function

11
Crips & Fuzzy Membership functions

12
Linguistic Hedges
 Modifying the meaning of a fuzzy set using
hedges such as very, more or less, slightly, etc.
tall
 Very F = F2
 More or less F = F1/2
 etc.
More or less tall
Very tall

13
Fuzzy
Fuzzy membership
membership function
function
Triangular MF

14
Fuzzy
Fuzzy membership
membership function
function
Trapezoidal MF

15
Fuzzy
Fuzzy membership
membership function
function
Gaussian MF

16
Fuzzy
Fuzzy membership
membership function
function

17
Fuzzy
Fuzzy membership
membership function
function

18
Fuzzy
Fuzzy membership
membership function
function

19
Fuzzy
Fuzzy membership
membership function
function

The list of MFs introduced here is by no means


exhaustive

Other specialized MFs can be created for specific


applications if necessary

Any type of continuous probability distribution


functions can be used as an MF

20
Properties
Properties of
of Fuzzy
Fuzzy set
set

μA( x )
1

Height
Core
0
Boundary Boundary

Support

21
Properties
Properties of
of Fuzzy
Fuzzy set
set

μA( x )
1

Height
Core
0
Boundary Boundary

Support

Core: Comprises those elements x of the Universe


Such that:  A ( x)  1
core ( A)  {x  X |  A ( x)  1} 22
Properties
Properties of
of Fuzzy
Fuzzy set
set

μA( x )
1

Height
Core
0
Boundary Boundary

Support

Support: Comprises those elements x of the Universe


Such that:  A ( x)  0
Support ( A)  {x  X |  A ( x)  0} 23
Properties
Properties of
of Fuzzy
Fuzzy set
set

μA( x )
1

Height
Core
0
Boundary Boundary

Support

Boundary: Comprises those elements x of the


Universe Such that: 0   A ( x)  1
Boundary ( A)  {x  X | 0   A ( x)  1} 24
Properties
Properties of
of Fuzzy
Fuzzy set
set

Normal Subnormal
Properties
Properties of
of Fuzzy
Fuzzy set
set

26
Fuzzy Variable

• A fuzzy variable is defined by the quadruple


V = { x, l, u, m}
• X is the variable symbolic name: temperature
• L is the set of labels: low, medium and high
• U is the universe of discourse
• M are the semantic rules that define the meaning of
each label in L (membership functions).

27
Fuzzy Variable Example

• X = Temperature
• L = {low, medium, high}
• U = {xX | -70o <= x <= +70o}
• M= low medium high
1.0

0.0

-70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70

28
Fuzzy Variable
• Completude: A variable is complete if for any x 
X there is a fuzzy set such as (x)>0

Complete

1.0

Incomplete
0.0
-70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70

29
Fuzzy
Fuzzy membership
membership function
function

30
Fuzzy
Fuzzy membership
membership function
function

31
Example: Short, Medium height and Tall

Medium
1.0
Short Tall

5’ 5’6” 6’ 6’6” 7’

Note: Short(x) + Medium(x) + Tall(x)  1.


Someone who is 6’1” is simultaneously short, of medium height
and tall in various degrees which don’t add to 1. 32
Partition of Unity

• A fuzzy variable forms a partition of unity if for


each input value x
p

μ
i=1
Ai (x)  1

• where p is the number of sets to which x belongs


• There is no rule to define the overlapping degree
between two neighbouring sets
• A rule of thumb is to use 25% to 50%

33
Partition of Unity

1,0

Partition of
0,5
Unity
0,0

-70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70

1,0
No Partition
0,5
of
Unity
0,0

-70 -60 -50 -40 -30 -20 -10 0 10 20 30 40 50 60 70

34
Partition of Unity cont

• Any complete fuzzy variable may be


transformed into a partition of unity using
the equation

μ A (x)
μ Aˆ (x) = p
i
for i = 1, , p
μ
i
Aj (x)
j=1

35
Example: Light, Medium weight and
Heavy
Medium
1.0
Light Heavy

60 70 80 90 100
Weight (Kg)

36
 A.B ( x)  min( A ( x) ,  B ( x))
 Example: Medium and Tall

Medium
1.0
Short Tall


Medium and Tall

5’ 5’6” 6’ 6’6” 7’

Note: No one is a full member of this set.


37
Fuzzy
Fuzzy Logic
Logic Operations
Operations

Fuzzy union operation or fuzzy OR :

 A B ( x)  max( A ( x) ,  B ( x))
Fuzzy intersection operation or fuzzy AND

 A.B ( x)  min( A ( x) ,  B ( x))


Complement operation

 A ( x)  1   A ( x)
38
 A.B ( x)  min( A ( x) ,  B ( x))

39
 A.B ( x)  min( A ( x) ,  B ( x))

40
 A B ( x)  max( A ( x) ,  B ( x))

41
 A B ( x)  max( A ( x) ,  B ( x))

42
 A B ( x)  max( A ( x) ,  B ( x))

Medium
1.0
Short Medium or Tall

Tall

5’ 5’6” 6’ 6’6” 7’

43
 A ( x)  1   A ( x)

 A (x)
 A (x)

 A (x)  A (x)

44
 A ( x)  1   A ( x)

Negation:  A ( x)  1   A ( x)

1.0
Not Tall Tall

5’ 5’6” 6’ 6’6” 7’

45
Fuzzy
Fuzzy Logic
Logic Operations
Operations

46
Discrete
Discrete fuzzy
fuzzy subset
subset
A simple example of a discrete universe and a discrete fuzzy subset
of it, is:

X={-3, -2, -1, 0, 1, 2, 3, 4}

A= 0.6/-3 + 0.0/-2 + 0.3/-1 + 0.6/0 + 1.0/1 + 0.6/2 + 0.3/3 + 0.5/4

47
 A.B ( x)  min( A ( x) ,  B ( x))
Let A and B be fuzzy subsets of the universe X={-3, -2, -1, 0, 1, 2, 3, 4}
A= 0.6/-3 + 0.0/-2 + 0.3/-1 + 0.6/0.0 + 1.0/1 + 0.6/2 + 0.3/3 + 0.5/4
B= 0.2/-3 + 0.6/-2 + 0.4/-1 + 0.6/0.0 + 0.5/1 + 0.4/2 + 0.5/3 + 0.3/4
AB = 0.2/-3 + 0.0/-2 + 0.3/-1 + 0.6/0.0 + 0.5/1 + 0.4/2 + 0.3/3 + 0.3/4

48
Possible
Possible operators
operators for
for AND
AND in
in fuzzy
fuzzy logic
logic

 A ( x)   B ( x)
 A ( x)   B ( x)
 A ( x)   B ( x)   A ( x)   B ( x)
max{0,  A ( x )   B ( x )  1}
 A ( x)   B ( x)
2  [ A ( x )   B ( x )   A ( x )   B ( x )]
49
 A B ( x)  max( A ( x) ,  B ( x))

Let A and B be fuzzy subsets of the universe X={-3, -2, -1, 0, 1, 2, 3, 4}


A= 0.6/-3 + 0.0/-2 + 0.3/-1 + 0.6/0.0 + 1.0/1 + 0.6/2 + 0.3/3 + 0.5/4
B= 0.2/-3 + 0.6/-2 + 0.4/-1 + 0.6/0.0 + 0.5/1 + 0.4/2 + 0.5/3 + 0.3/4
AB = 0.6/-3 + 0.6/-2 + 0.4/-1 + 0.6/0.0 + 1.0/1 + 0.6/2 + 0.5/3 + 0.5/4

50
Possible
Possible operators
operators for
for OR
OR in
in fuzzy
fuzzy logic
logic

 A ( x)   B ( x)   A ( x)   B ( x)
 A ( x )   B ( x )  2 A ( x )   B ( x )
1   A ( x)   B ( x)

 A ( x)   B ( x)
1   A ( x )   B ( x )]

min{1,  A ( x )   B ( x )}
51
 A ( x)  1   A ( x)
Let A be fuzzy subset of the universe
X={-3, -2, -1, 0, 1, 2, 3, 4}

A = 0.6/-3 + 0.0/-2 + 0.3/-1 + 0.6/0.0 + 1.0/1 + 0.6/2 + 0.3/3 + 0.5/4

A = 0.4/-3 + 1.0/-2 + 0.7/-1 + 0.4/0.0 + 0.0/1 + 0.4/2 + 0.7/3 + 0.5/4

52
Methods
Methods of
of Deductive
Deductive inference
inference

•• Mamdani
Mamdani systems
systems

•• Sugeno
Sugeno models
models

•• Tsukamoto
Tsukamoto models
models

53
Methods
Methods of
of Deductive
Deductive inference
inference

54
Defuzzification
Defuzzification methods
methods

55
Defuzzification
Defuzzification methods
methods

56
Defuzzification
Defuzzification methods
methods

57
Defuzzification
Defuzzification methods
methods

58
Defuzzification
Defuzzification methods
methods

59
Defuzzification
Defuzzification methods
methods

60
Defuzzification
Defuzzification methods
methods

61
Example
Example

62

You might also like