0% found this document useful (0 votes)
58 views49 pages

SC Chap2 Fall 2016

This document provides an introduction to fuzzy sets and fuzzy logic. It defines key terms like membership functions, fuzzy boundaries, linguistic variables and hedges. It discusses properties of fuzzy sets like support, core, crossover and convexity. Examples are given of fuzzy sets with discrete and continuous universes. The document also outlines topics that will be covered in subsequent chapters like set-theoretic operations on fuzzy sets and formulating membership functions.

Uploaded by

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

SC Chap2 Fall 2016

This document provides an introduction to fuzzy sets and fuzzy logic. It defines key terms like membership functions, fuzzy boundaries, linguistic variables and hedges. It discusses properties of fuzzy sets like support, core, crossover and convexity. Examples are given of fuzzy sets with discrete and continuous universes. The document also outlines topics that will be covered in subsequent chapters like set-theoretic operations on fuzzy sets and formulating membership functions.

Uploaded by

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

‫البمجية‬

‫مساق الحوسبة ر‬
Soft Computing 8702661
Dr. Labib Arafeh,
Associate Professor
[email protected]

Ch2 SC Fall 2016 1


Outlines
• Introduction
• Basic Definitions &Terminology
• Set-theoretic Operations
• Membership Function (MF)
• Set-Theoretic Operations
• MF Formulation & Parameterization
• Fuzzy Union, Intersection and
Complement
Ch2 SC Fall 2016 2
Introduction

NONFUZZY SET FUZZY SET


100 COOL 100 COOL
MEMBERSHIP
(PERCENTAGE)

10 15 20 10 15 20
Air Temperature Air Temperature
Ch2 SC Fall 2016 3
• Sets with fuzzy boundaries
Degree of Membership of “tall men”
No Name Height (cm)
Crisp Fuzzy
1 Fadi 206 1 1
2 Rami 190 1 1
3 Hani 175 0 0.8
4 Sami 160 0 0.7
5 Hadi 155 0 0.4
A = Set of tall people

Crisp set A Fuzzy set A


1.0 1.0
.9
.5 Membership
function

175 185 190 Heights 175 185 190 Heights


Universe of discourse
Ch2 SC Fall 2016 4
• Characteristics of Membership Functions (MFs):
– Subjective (Individual) measures  MFs specified for
the same concept by different persons may vary
considerably (The “sensible number of children in a
family”). This subjectivity comes from individual
differences in perceiving or expressing abstract concepts
– Not probability functions.
MFs “tall” in Asia

.8

.5 “tall” in the US

.1 “tall” in NBA

175 Heights
Ch2 SC Fall 2016 5
Basic definitions & Terminology
• Classical Set vs Fuzzy set:
– Let X be the universe of discourse and its elements be
denoted as x.
– In the classical set theory, crisp set A of X is defined as
function fA(x) called the characteristic function of A
1, if x  A

f A ( x ) : X  {0,1}, where f A ( x )  

0, if x  A
–In the fuzzy theory, fuzzy set A of universe of discourse X is
defined by function  A (x) (membership function of set A)
 A ( x) : X  [0,1], where  A ( x)  1 if x is totally in A;
 A ( x)  0 if x is not in A;
0   A ( x)  1 if x is partly in A.
Ch2 SC Fall 2016 6
• Formal definition:
If X is a collection of objects denoted generally by x, then
A fuzzy set A in X is expressed as a set of ordered pairs:
A  {( x ,  A ( x ))| x  X }

Membership
Universe or
Fuzzy set function
universe of discourse
(MF)

A fuzzy set is totally characterized by a


membership function (MF). MF maps each
element of X to a membership grade (or value)
between 0 and 1.
Ch2 SC Fall 2016 7
•Fuzzy Sets with Discrete Universes:
– Fuzzy set C = “desirable city to live in”
X = {JER, RAM, HEB} (discrete and non-ordered)
C = {(JER, 0.9), (RAM, 0.8), (HEB, 0.6)}
(subjective membership values!)
– Fuzzy set A = “sensible number of children”
X = {0, 1, 2, 3, 4, 5, 6} (discrete universe)
A = {(0, .1), (1, .3), (2, .7), (3, 1), (4, .6), (5, .2), (6, .1)}
Member function on a Discrete Universe
(subjective 1
Membership Grades

Membership 0.8

0.6

values!) 0.4

0.2

0
0 1 2 3 4 5 6
X = Number of Children

Ch2 SC Fall 2016 8


• Fuzzy Sets with A Continuous Universe:
– Fuzzy set B = “about 50 years old”
X = Set of positive real numbers of possible ages for
human beings (continuous)
B = {(x, µB(x)) | x in X}

Membership Function on a Continous Universe


1.00
0.90

1 0.80
μB(x)  2
membership Grades

0.70
 x  50 
1  
0.60

 10 
0.50
0.40
0.30
0.20
0.10
0.00
0 10 20 30 40 50 60 70 80 90 100
x = Age

Ch2 SC Fall 2016 9


• A fuzzy set A can be alternatively denoted as follows:

X is discrete
A  μ (x
x i X
A i )/x i

X is continuous A   μ A (x)/x
X

The Summation & integration signs stand for the union of


membership grades; / stands for a marker and does not
imply division.
• Rewriting previous examples (S9 and S10) using the
above equation:
C = 0.9 / JER+ 0.8 / RAM + 0.6 / HEB
A = 0.1/0 + 0.3/1 + 0.7/2 + 1.0/3 + 0.6/4 + 0.2/5 + 0.1/6

Ch2 SC Fall 2016 10


• Linguistic variables: To express the knowledge:
– Hot, Cold;
– High, Low;
Fadi is tall
– Tall, Short;
– Slow, Fast.

• Hedges (operators): To modify the degree truth of


linguistic variables in the sense of:
– Concentration (Very);
– Dilation (Somewhat);
Rami is very tall
– Intensification (Indeed);
– Power (Very Very).
Ch2 SC Fall 2016 11
• Fuzzy Partition:
– Fuzzy partitions of AGE Can be formed by the
linguistic values
– “young”, “middle aged”, and “old”:
Slide20

Ch2 SC Fall 2016 12


– Support(A) = {x  X | A(x) > 0}
= Ᾱ0
– Core(A) = {x  X | A(x) = 1}
= A1
Core is exactly one point

Ch2 SC Fall 2016 13


Normality: core(A)  0 (nonempty)  A is a normal fuzzy
set (That is, A is normal if its MF equals 1 some where,
otherwise it is sub-normal)
Crossover(A) = {x  X | A(x) = 0.5}

Ch2 SC Fall 2016 14


Fuzzy Singelton:
A fuzzy set whose support is a single point in X with
μA(x) = 1
The fuzzy singleton “45 years old”

Ch2 SC Fall 2016 15


• Convexity of Fuzzy Sets: A fuzzy set A is convex if and
only if for any x1 and x2 ε X and λ ε [0, 1],

Fuzzy Logic with


Engineering Applications
By Timothy J. Ross
Ch2 SC Fall 2016 16
• Fuzzy numbers: a fuzzy number A is a fuzzy set in real line
R that satisfies the conditions for normality & convexity;
– Normalization: The maximum membership grade for an
element in a fuzzy set is said to be normalized.
– A set which is not normalized can be made so by
altering all the membership values in proportion so as
to make the largest value 1.
µ NORM(A) (x)=µ A (x) / max(µ A (x)) for x є X
– The following operation converts a sub-normal, non-
empty fuzzy set into its normal version:

Ch2 SC Fall 2016 17


• Bandwidths: for a normal & convex fuzzy set, the
bandwidth or width is the distance between two unique
crossover points:
Width (A) = |x2 – x1|
Where
A(x1) = A(x2) = 0.5

• Symmetry: A fuzzy set A is symmetric if its MF is


symmetric around a certain point x = c, namely,

A(c + x) = A(c – x) for all (x)  X


Ch2 SC Fall 2016 18
• Open left, open right, closed:
The fuzzy set “young” is Open Left
The fuzzy set “old” is Open Right
The fuzzy set “middle age” is Closed

open left fuzzy set A  lim μ A(x)  1 and lim μ A(x)  0


x -  x  

open right fuzzy set A  lim μ A(x)  0 and lim μ A(x)  1


x -  x  

closed fuzzy set A  lim μ A(x)  lim μ A(x)  0


x -  x  
Ch2 SC Fall 2016 19
Set-Theoretic Operations
• Equality
• Containment
• Union
• Intersection
• Complement
• Normalization
• Algebraic product:
µA•B(x)=µA(x)•µB(x) for all x є X
• Concentration and Dilation

Ch2 SC Fall 2016 20


• Complement:
o Crisp: What doesn’t belong to the set?
o FS: How much do elements not belong to the set?
• Containment:
o Crisp: Which sets belong to which other sets?
o FS: Which sets belong to other sets?
• Intersection:
o Crisp: Which element belongs to both sets?
o FS: How much of the element is in both sets?
• Refer to Table 2.1, PP. 22 shown on the next slide.
Ch2 SC Fall 2016 21
Ch2 SC Fall 2016 22
• Containment (Subset): FS A is contained in FS B

A  B   A  B
• Complement:
A  X  A  A ( x )  1  A ( x )

Ch2 SC Fall 2016 23


• Union:
C  A  B  c ( x)  max(  A ( x), B ( x))   A ( x )  B ( x )

• Intersection:

C  A  B  c ( x )  min( A ( x ), B ( x ))  A ( x ) B ( x )

Ch2 SC Fall 2016 24


MF Formulation & Parameterization
MFs of One Dimension:
 Triangular MF: trimf (x; 20, 60, 80)

 x a c  x 
trimf ( x ; a, b , c )  max min ,  , 0
  b  a c  b 
Traingular MF
1

0.8
Membership Grades

0.6

0.4

0.2

0
0 10 20 30 40 50 60 70 80 90 100

Ch2 SC Fall 2016 25


 Trapezoidal MF: trapmf (x; 10, 20, 60, 95)

 x a d  x 
trapmf ( x ; a, b , c , d )  max min , 1,  , 0
 b a d c 

Ch2 SC Fall 2016 26


 Gaussian MF: gaussmf (x; 50, 20)

2
1  x c 
  
gaussmf ( x; c,  )  e 2  

Ch2 SC Fall 2016 27


 Generalized bell MF: gbellmf (x; 20, 4, 50)
1
gbellmf ( x; a, b, c) 
xc
2b

1
a

Ch2 SC Fall 2016 28


– Change of parameters in the generalized bell MF
1
gbellmf ( x; a, b, c) 
xc
2b

1
a

Ch2 SC Fall 2016 29


Physical meaning of parameters in a generalized bell MF
1
gbellmf ( x; a, b, c) 
xc
2b

1
a
Ch2 SC Fall 2016 30
• Gaussian MFs and bell MFs achieve smoothness, they
are unable to specify asymmetric Mfs which are
important in many applications;
• Asymmetric & close MFs can be synthesized using
either the absolute difference or the product of two
sigmoidal functions. sigmf(x; a, c)  1
• Sigmoidal MF: 1  e  a( x c )
Extensions:
Abs. difference
of two sig. MF

Product
of two sig. MF

Ch2 SC Fall 2016 31


• A sigmoidal MF is inherently open right (+ve a), or left
(-ve A) & thus, it is appropriate for representing
concepts such as “very large” or “very negative”;
• Sigmoidal MF are mostly used as activation function of
artificial neural networks (NN);
• A NN should synthesize a close MF in order to simulate
the behavior of a fuzzy inference system;
• Left –Right (L-R) MF:

Ch2 SC Fall 2016 32


Example: FL ( x)  max( 0, 1  x 2 FR ( x)  max( 0,1  x 2 )

c=65 c=25
a=60 a=10
b=10 b=40

• The list of MFs introduced are not exhaustive;


• Any type of continuous probability distribution
functions can be used as a MF, provided that a set of
parameters is given to specify the appropriate
meanings of the MF.
• Other specialized MFs can be created for specific
applications if necessary;
Ch2 SC Fall 2016 33
• MFs of two dimensions
– In this case, there are two inputs assigned to a MF: this
MF is a two dimensional MF. A one input MF is called
ordinary MF;
– Extension of a one-dimensional MF to a 2-dimensional
MF via cylindrical extensions:
• If A is a fuzzy set in X, then its cylindrical extension in

X x Y is a fuzzy set C(A) defined by: C ( A)   ( x ) /( x, y )
XxY
A

• C(A) can be
viewed as a
2-D fuzzy
set;

Ch2 SC Fall 2016 34


• Projection of fuzzy sets (decrease dimension)
– Let R be a two-dimensional fuzzy set on X x Y. Then
the projections of R onto X and Y are defined as:
and
respectively.
Two-dimensional Projection Projection
MF onto X onto Y

Ch2 SC Fall 2016 35


• Composite & non-composite MFs: (MFs of 2-D are
either composite or non-composite.)
– Suppose that the fuzzy A = “(x,y) is near (3,4)” is
defined by:   x  3 2 2
 A (x, y)  exp       y  4  
  2  
  x  3 2    y  4 2 
 exp      exp     
  2     1  
 G(x;3,2) * G( y;4,1)
» This two-dimensional MF is composite
» The fuzzy set A is composed of two statements:
“x is near 3” & “y is near 4”
»These two statements are respectively defined as:
 near 3 (x) = G(x;3,2) and  near 4 (x) = G(y;4,1)
» Expressed as an analytic expression of two 1-D
MFs.
Ch2 SC Fall 2016 36
» If a fuzzy set is defined by:

» it is non-composite.
• A composite 2-dimensional MF is usually the result of
two statements joined by the AND or OR
connectives.
• Composite 2-dimensional MFs based on min & max
operations
– Let trap(x) = trapezoid (x;-6,-2,2,6)
trap(y) = trapezoid (y;-6,-2,2,6)
be two trapezoidal MFs on X and Y respectively,
Ch2 SC Fall 2016 37
trap(x) = trapezoid (x;-6,-2,2,6)
trap(y) = trapezoid (y;-6,-2,2,6)
By applying min & max operators, we obtain 2-D MFs
on XxY.

Two dimensional MFs defined by the min and max operators

Min & Max


Operators
for a bell
function
Ch2 SC Fall 2016 38
More on Fuzzy Union,
Intersection & Complement
– Fuzzy complement
• Another way to define reasonable & consistent
operations on fuzzy sets
– General requirements:
» Boundary: N(0)=1 and N(1) = 0
» Monotonicity: N(a) > N(b) if a < b
» Involution: N(N(a)) = a  Optional
(double complement of a fuzzy set is the set itself)
Ch2 SC Fall 2016 39
– Two types of fuzzy complements:
» Sugeno’s complement: (s > -1)

(Family of fuzzy complement operators)


» Yager’s complement: (w > 0)

Ch2 SC Fall 2016 40


– Fuzzy Intersection and Union:

• The intersection of two fuzzy sets A and B is


specified in general by a function

T: [0,1] x [0,1]  [0,1] with ~


 A B (x )  T  A (x ),  B (x )   A (x ) *  B (x )
~
where * is a binary operator for the function T.

This class of fuzzy intersection operators are


called T-norm (triangular) operators.

Ch2 SC Fall 2016 41


•T-norm operators should satisfy Go back to Slide22:
• Boundary: T ( 0 , 0 ) = 0 , T ( a , 1 ) = T ( 1 , a ) = a
Correct generalization to crisp sets

• Monotonicity: T ( a , b ) ≤ T ( c , d ) i f a ≤ c a n d b ≤ d
A decrease of membership in A & B cannot increase a
membership in A  B

• Commutativity: T ( a , b ) = T ( b , a )
T is indifferent to the order of fuzzy sets to be combined

• Associativity: T ( a , T ( b , c ) ) = T ( T ( a , b ) , c )
Intersection is independent of the order of pair wise
groupings
Ch2 SC Fall 2016 42
• T-norm (cont.)

– Four of the most frequently used T-norm operators are:

•Minimum: Tmin(a, b) = min ( a,b) = a  b

•Algebraic product: Tap(a, b) = ab

•Bounded product: Tbp(a, b) = 0 V (a + b – 1)

•Drastic product: Tdp(a, b) =

Ch2 SC Fall 2016 43


Knowing that a & b are between 0 & 1, the surface plots of
these four T-norm operators as functions of a & b are:
Algebraic Bounded Drastic
Minimum: product: product: product:
Tmin(a, b) Tap(a, b) Tbp(a, b) Tdp(a, b)

The corresponding surfaces when


a = μA(x) = a = trapmf(x; 3, 8, 12, 17) and
b = μB(x) = trapmf(y; 3, 8, 12, 17)are:
Minimum: Algebraic Product: Bounded Product: Drastic Product:
Tmin(a, b) Tap(a, b) Tbp(a, b) Tdp(a, b)

Ch2 SC Fall 2016 44


Both Surfaces together. Observe:
T dp( a , b ) ≤ T bp( a , b ) ≤ T ap( a , b ) ≤ T min( a , b )

Minimum: Bounded product:


Tm(a, b) Tb(a, b)
Algebraic product: Drastic product:
Ta(a, b) Td(a, b)

Ch2 SC Fall 2016 45


• T-conorm or S-norm: operator is a binary mapping S(.,.)
The fuzzy union operator is defined by a function
S: [0,1] x [0,1]  [0,1]
which aggregates two membership function as:
~
 A B  S A (x ),  B (x )   A (x )   B (x )
~
where  is a binary operator for the function s, which
is called an s-norm satisfying:
– Boundary: S ( 1 , 1 ) = 1 , S ( a , 0 ) = S ( 0 , a ) = a
– Monotonicity: S ( a , b ) ≤ S ( c , d ) i f a ≤ c a n d b ≤ d
– Commutativity: S ( a , b ) = S ( b , a )
– Associativity: S ( a , S ( b , c ) ) = S ( S ( a , b ) , c )
Ch2 SC Fall 2016 46
– T-conorm or S-norm (cont.)

•Four T-conorm operators:

–Maximum: S(a, b) = max( a,b) = a V b

–Algebraic sum: S(a, b) = a + b - ab

–Bounded sum: S(a, b) = 1  (a + b)


a, if b  0
–Drastic sum: S(a, b) = 
b, if a  0
1, if a, b  0

Ch2 SC Fall 2016 47
T-conorm or S-norm. Observe:
Smax(a, b) ≤ Sap(a, b) ≤ Sbp(a, b) ≤ Sdp(a, b)

Maximum: Algebraic sum: Bounded sum: Drastic sum:


S (a, b) S (a, b) S (a, b) S (a, b)

~ ~
 

Ch2 SC Fall 2016 48


• Generalized DeMorgan’s Law:

– T-norms T(., .) and T-conorms S(., .) are duals which


support the generalization of DeMorgan’s law:

» T(a, b) = N(S(N(a), N(b)))

» S(a, b) = N(T(N(a), N(b)))

N(.) is a fuzzy complement operator

Tm(a, b) Sm(a, b)
Ta(a, b) Sa(a, b)
Tb(a, b) Sb(a, b)
Td(a, b) Sd(a, b)

Ch2 SC Fall 2016 49

You might also like