0% found this document useful (0 votes)
156 views21 pages

Membership Function

(1) Fuzzy membership functions define the degree to which elements belong to fuzzy sets and can take various forms like triangular, trapezoidal, Gaussian. (2) Fuzzy operations like union, intersection, and complement are defined based on fuzzy membership functions and t-norms/t-conorms like minimum and maximum. (3) Common fuzzy sets and operations are demonstrated through an example, showing the union is the maximum membership degree at each point while intersection is the minimum.
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)
156 views21 pages

Membership Function

(1) Fuzzy membership functions define the degree to which elements belong to fuzzy sets and can take various forms like triangular, trapezoidal, Gaussian. (2) Fuzzy operations like union, intersection, and complement are defined based on fuzzy membership functions and t-norms/t-conorms like minimum and maximum. (3) Common fuzzy sets and operations are demonstrated through an example, showing the union is the maximum membership degree at each point while intersection is the minimum.
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/ 21

Fuzzy Membership Functions

Fuzzy Operations
Fuzzy Union
F U i
Fuzzy Intersection
Fuzzy Complement
Some info for LAB
• Work on an m-file (open m-file for each task,
write your programme, save the file (e.g.,
lab2task1), then execute the file. Now, this
fil h
file has bbecome a ffunction
ti iin MATLAB)
MATLAB). ((see
the first week’s slides - Week 1).

• Use help <function


<function>
> (e.g., help newfis) if
you don’t’ know how to use the ffunction. It
gives you information about how to use the
f
function
ti and d what
h t parameters
t it requires
i
Fuzzy Membership Functions
• One of the keyy issues in all fuzzyy sets is how to
determine fuzzy membership functions
• The membership function fully defines the fuzzy
set
• A membership function provides a measure of
the degree of similarity of an element to a fuzzy
set
e be s p functions
• Membership u ct o s ca
can ta
take
ea anyy form,
o , but
there are some common examples that appear
in real applications
• Membership functions can
– either be chosen by the user arbitrarily, based
on the user’s experience
p ((MF chosen byy two
users could be different depending upon their
experiences, perspectives, etc.)
– Or
O beb ddesigned
i d using
i machine hi llearning
i
methods (e.g., artificial neural networks,
genetic algorithms, etc.)
• There are different shapes of membership
functions; triangular, trapezoidal,
piecewise-linear, Gaussian, bell-shaped,
etc.
• Triangular membership function
– a, b and c represent the x coordinates of the three
vertices of µA(x) in a fuzzy set A (a: lower boundary
and c: upper boundary where membership degree is
zero, b: the centre where membership degree is 1)

µA(x)
1
⎧0 if x ≤ a ⎫
⎪x −a ⎪
⎪ if a ≤ x ≤ b ⎪
⎪ ⎪
μ A ( x) = ⎨ b − a ⎬
⎪c − x if b ≤ x ≤ c ⎪
⎪c − b ⎪

⎩0 if x ≥ c ⎪

0
a b c x
• Gaussian membership function
⎡ 1 x−c m

μ A ( x, c, s, m) = exp ⎢− ⎥
⎢⎣ 2 s ⎥⎦
– c: centre
– s: width
– m: fuzzification factor (e.g., m
m=2)
2)
µA(x) 1

0.9
c=5
0.8

0.7

0.6
s=2
0.5

0.4 m=22
0.3

0.2

0.1

0
0 1 2 3 4 5 6 7 8 9 10
x
1

0.9

08
0.8

0.7 c=5
0.6

0.5

04
0.4
s=0.5
0.3

0.2

0.1
m=2
0
0 1 2 3 4 5 6 7 8 9 10

0.9

0.8

0.7
c=5
0.6

0.5

0.4
s=5
0.3

0.2
m=2
0.1

0
0 1 2 3 4 5 6 7 8 9 10
1

09
0.9

0.8
c=5
0.7

0.6
s=2
0.5

0.4
m=0.2
0.3
0 1 2 3 4 5 6 7 8 9 10

09
0.9

0.8 c=5
0.7

0.6

05
0.5
s=5
0.4

0.3

0.2
m=5
01
0.1

0
0 1 2 3 4 5 6 7 8 9 10
Fuzzy Operations
(Fuzzy Union
Union, Intersection
Intersection, and
Complement)
• F
Fuzzy llogic
i begins
b i by b barrowing
b i notions
ti from
f crisp
i logic,
l i just
j t as
fuzzy set theory borrows from crisp set theory. As in our extension
of crisp set theory to fuzzy set theory, our extension of crisp logic to
fuzzyy logic
g is made byy replacing
p g membershipp functions of crispp
logic with fuzzy membership functions [J.M. Mendel, Uncertain Rule-
Based Fuzzy Logic Systems, 2001]
• In Fuzzy Logic, intersection, union and complement are defined in
terms of their membership functions
• This section concentrates on providing enough of a theoretical base
for you to be able to implement computer systems that use fuzzy
logic
g
• Fuzzy intersection and union correspond to ‘AND’ and ‘OR’,
respectively, in classic/crisp/Boolean logic
• These two operators will become important later as they are the
b ildi blocks
building bl k forf us to beb able
bl to compute with
i h fuzzy
f if-then
if h rules
l
Classic/Crisp/Boolean Logic
• Logical AND (∩) • Logical OR (U)
Truth Table Truth Table
A B A∩B A B AUB
0 0 0 0 0 0
0 1 0 0 1 1
1 0 0 1 0 1
1 1 1 1 1 1

A
B A
B

Crisp Intersection Crisp Union


Fuzzy Union
• The union (OR) is calculated using t-conorms
• tt-conorm
conorm operator is a function s(.,.)
• Its features are
– s(1,1) = 1, s(a,0) = s(0,a) = a (boundary)
– s(a,b) ≤ s(c,d) if a ≤ c and b ≤ d (monotonicity)
– s(a,b) = s(b,a) (commutativity)
– s(a,s(b,c))
( (b )) = s(s(a,b),c)
( ( b) ) (associativity)
( i ti it )
• The most commonly used method for fuzzy union is to
take the maximum.
maximum That is,
is given two fuzzy sets A and B
with membership functions µA(x) and µB(x)

μ AUB ( x) = max((μ A ( x),


) μ B ( x))
Fuzzy Intersection
• The intersection (AND) is calculated using t-norms.
• tt-norm
norm operator is a function t(.,.)
• Its features
– t(0,0) = 0, t(a,1) = t(1,a) = a (boundary)
– t(a,b) ≤ t(c,d) if a ≤ c and b ≤ d (monotonicity)
– t(a,b) = t(b,a) (commutativity)
– t(a t(b,c))
t(a, t(b c)) = t(t(a
t(t(a,b),c)
b) c) (associativity)
• The most commonly adopted t-norm is the minimum.
That is,, given
g two fuzzyy sets A and B with membership
p
functions µA(x) and µB(x)
μ A∩ B ( x) = min(μ A ( x),
) μ B ( x))
Fuzzy Complement
• To be able to develop fuzzy systems we also have
to deal with NOT or complement.
p
• This is the same in fuzzy logic as for Boolean
logic
• For a fuzzy set A, A denotes the fuzzy
complement of A
• Membership function for fuzzy complement is

μ ( x) = 1 − μ A ( x)
A
Example 1:
Suppose we have the following (discrete) fuzzy sets:
A = 0.4/1+0.6/2+0.7/3+0.8/4
B = 0.3/1+0.65/2+0.4/3+0.1/4

The union of the fuzzy sets A and B


= 0.4/1+0.65/2+0.7/3+0.8/4
0 4/1+0 65/2+0 7/3+0 8/4
The intersection of the fuzzy sets A and B
= 0.3/1+0.6/2+0.4/3+0.1/4
0 3/1+0 6/2+0 4/3+0 1/4
The complement of the fuzzy set A
= 0.6/1+0.4/2+0.3/3+0.2/4
Example 1: (cont.)
Let’s show the fuzzy sets A and B graphically

1 1

0.8 0.8

0.6 0.6

0.4 0.4

0.2 0.2

0 0
1 2 3 4 5 1 2 3 4 5

A B
Example 2 (2003 exam question)

Given two fuzzy sets A and B

a. Represent A and B fuzzy sets graphically


b. Calculate the of union of the set A and set B
c. Calculate the intersection of the set A and set B
d. Calculate the complement of the union of A and B

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

B = 0.1 / − 2 + 0.4 / − 1 + 0.7 / 0 + 1.0 / 1 + 0.5 / 2 + 0.2 / 3 + 0.0 / 4


Example 2 (cont)

a
Example
p 2 ((cont))
b
Union = max (A,
(A B) = 0.1 / − 2 + 0.4 / − 1 + 0.7 / 0 + 1.0 / 1 + 0.6 / 2 + 0.3 / 3 + 0.0 / 4

c
Intersection = min (A,
(A B) = 0.0 / − 2 + 0.3 / − 1 + 0.6 / 0 + 1.0 / 1 + 0.5 / 2 + 0.2 / 3 + 0.0 / 4

d
Complement of (b) = 1 - max(A, B) = 0.9 / − 2 + 0.6 / − 1 + 0.3 / 0 + 0.0 / 1 + 0.4 / 2 + 0.7 / 3 + 1.0 / 4
Example 3: Graphical representation of the Fuzzy
operations (taken from J
J.M.
M Mendel
Mendel, Uncertain
Rule-Based Fuzzy Logic Systems, 2001)
Consider the fuzzy sets A = damping ratio x considerably
larger than 0.5, and B = damping ratio x approximately
equal to 0.707. Note that damping ratio is a positive real
number, i.e., its universe of discourse, X, is the positive
real numbers 0 ≤ x ≤ 1
Consequently, A = {( x, μ A ( x)) xεX } and B = {( x, μ B ( x)) xεX }
where, example, µA(x) and µB(x) are specified,
where for example specified as:
⎧0 if 0 ≤ x ≤ 0.5⎫
⎪ ⎪ μ B ( x) =
1
0 ≤ x ≤1
μ A ( x) = ⎨ 1 ⎬
if 0.5 < x ≤ 1 ⎪ 1 + ( x − 0.707) 4
⎪1 + ( x − 0.5) − 2
⎩ ⎭
Example 3: (cont.)
( ) µA(x),
Figure (a):
Fi ( ) µB(x)
( ) (b) µAUB(x)
Figure (b):
Fi ( )
Figure (c): µA∩B(x) Figure (d): µB(x), µB(x)
Example 3: (cont.)
• This example demonstrates that for fuzzy sets
sets, the
Law of Excluded Middle and Concentration are
broken,, i.e.,, for fuzzy
y sets A and B:
− −
A ∪ A ≠ X and A ∩ A ≠ O/
• In fact, one of the ways
y to describe the difference
between crisp set theory and fuzzy set theory is to
explain that these two laws do not hold in fuzzy set
theory

You might also like