Professional Documents
Culture Documents
(fuzzy systems)
Topics to be covered
Introduction
2
References
1. Fuzzy Logic Toolbox. For use with Matlb. Users guide.
Ver. 2
2. J. S. R. Jang “Neuro Fuzzy and Soft Computing. A
comprehensive approach to Learning and Machine Intelligence
3. Fuzzy sets and system; Theory and applications
ebook
4. Leonid Reznik " Fuzzy controllers”, ebook
5. Jan Jantzen ,’'Foundations of Fuzzy Control’’, 2007 John Wiley &
Sons Ltd, ebook
6. Kevin M. Passino,“Fuzzy Control “, ebook
7. S. N. Sivanandam, et, al ‘’Introduction to
Fuzzy Logic using MATLAB” ebook
(numerical Exs)
8. S. Sumathi and Surekha P. (Computational 3
Intelligence Paradigms :Theory and Application
What Is Fuzzy Logic?
❑ Humans are more efficient in dealing with
fuzzy data than computers (e.g crossing a
busy road).
❑ Fuzzy logic is used to convey the human
capability of handling fuzzy information to
the computer
❑ It is a mathematical tool to capture and
handle the fuzzy data that is used in the
natural language
4
What Is Fuzzy Logic?
A 400 kg mass is
approaching Look out
your head at 50
m/sec !!
5
Precise man Fuzzy man
6
What Is Fuzzy Logic?
Some pearls of folk wisdom
Don’t be penny wise and pound foolish
7
Types and Modeling of Uncertainties
8
Types and Modeling of Uncertainties
service tip
Input Output (interpreted as) ( is assigned
Terms Terms to be )
poor cheep
good
average
excellent
generous 10
What Is Fuzzy Logic?
-Linguistic Rules,Variables and values
Rules
If service is poor then tip is cheep
If service is good then tip is average
If service is excellent then tip is
generous
Input Linguistic Output
Linguistic
Values Linguistic Values
Linguistic
variable
variable
Linguistic Rules of a fuzzy systems are the laws it
execute
Linguistic variables defines a concept of our everyday
language
Linguistic values describe the characteristic of the Linguistic 11
variables
The root and development of fuzzy logic
• Fuzzy set thory was introduced by Professor Lotfi Zadeh
(USA) in 1965. as an extension of the classical set thory
• 1972 First working group on fuzzy systems in Japan by
Toshiro Terano
• 1973 Paper about fuzzy algorithms by Zadeh (USA)
• 1974 Steam engine control by Ebrahim Mamdani (UK)
• Too many events, inventions and projects to mention till
1991
• After 1991 fuzzy technology came out of scientific
laboratories and became an industrial tool.
• In the last two decades, the fuzzy sets theory has
established itself as a new methodology for dealing with
any sort of ambiguity and uncertainty.
12
What are the main areas of fuzzy logic
applications?
The following list includes just a small number of successful projects
and is intended to demonstrate a huge diversity of possible
applications.
15
Applications cont.
❖ Medicine technology: cancer diagnosis (Kawasaki
Medical School)
❖ Automatic motor-control for vacuum cleaners with a
recognition of a surface condition and a degree of soiling
(Matsushita)
16
17
18
…. Applications.Medical
applications review…..
• The possibility of applying fuzzy set theory to biological and medical sciences was
first discussed by Zadeh
• Fuzzy clustering algorithms have been used in the classification of:
– EEG (com) patterns (Adey,1972; Larsen et al., 1972)
– ECG patterns (Albin, 1975),
– of hypertension (Fordon and Fu, 1976),
– of abdominal diseases (Bezdek and Castelaz),
– of chromosomes (Lee, 1975), and
– of leukocytes (E.T. Lee 1973). com
• Models of neurons based on fuzzy automata are described in Lee and Lee (1974)
and Butnariu (1977).
• Sanchez has studied the representation of medical knowledge by means of fuzzy
relations) for the purpose of automated diagnosis.
• Sanchez and Sambuc presented an application to diagnosis in thyroid pathology
• Wechsler has described a medical expert system based on fuzzy concepts.
• Lastly, Malvache and Vidal (1974) have developed a fuzzy model of visual perception.
Fuzzy Set Theory
20
Outline
Fuzzy sets:
o Basic Definitions and Terminology
o MF formulation and parameterization
Set theoretic operations
o Union
o Intersection
o Complement
o Others
21
Fuzzy Sets
• A classical set X is a collection of definite,
distinguishable objects of our intuition that can be
members of
treated as a whole. The objects are the X
• A crisp (classical) set is a set for which each
value either is or is not contained in the set.
• For a fuzzy set, every value has a membership
value, and so is a member to some extent.
• Themembership value defines the extent to
which a variable is a member of a fuzzy set.
• The membership value is from 0 (not at all a
member of the set) to 1.
22
Fuzzy
Conventional (Boolean) Set
Set
Theory
159.9cm
148cm 140c
170cm m 180cm
190c 160c
180c
190cm
m m
160cm m
“Tall Man ”
Fuzzy Set Theory
145cm
150cm
Container boundaries that include 148cm
or exclude elements 170cm 180cm
190cm
160cm
24
Membership Functions (MFs)
• Characteristics of MFs:
– Subjective measures
– Not probability functions
MF Is “tall” in
s Asia
.
8
. Is “tall” in the
5 US
is“tall” in
. NBA
1
160 Height
cm s
25
Fuzzy Sets
• Formal definition:
A fuzzy set A in X is expressed as a set of
ordered pairs:
Membershi Universe or
Fuzzy
p universe of
set
function 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) beteewn 0 and one 26
Fuzzy Sets with Discrete Universes
• Fuzzy set C = “desirable city to live in”
X = {Khartoum, Cairo, Meca,} discrete and
nonordered UOD
C = {(Me, 0.9), (Kh, 0.8), (Ca, 0.6)}
• Fuzzy set A = “preferred number of children”
X = {0, 1, 2, 3, 4, 5, 6} (discrete ordered UOD)
A = {(0, .1), (1, .3), (2, .7), (3, 1), (4, .6), (5, .2), (6, .1)}
27
Fuzzy Sets with Cont. Universes
28
Alternative Notation
X is continuous
29
Alternative Notation Example
30
Fuzzy Partition
• In practice when the UOD X is continuous, we
usually partition it into several fuzzy sets
• Fuzzy sets used for partitioning are called
linguistic values, e.g. {“young”, “middle aged”,
and “old”}:
lingmf.
31
m
More Definitions and Terminology
• Support
▪ α-cut, strong α-cut
• Convexity
• Core
• Bandwidth
• Normality
• Symmetricity
• Crossover points
• Fuzzy singleton
32
MF Terminology
M
F
1
.
5
α
0
Cor X
e
Crossover
points
α - cut
Suppor
t
33
M
F
1
.
5
α
0
Cor X
e
Crossover
points
α - cut
Suppor
t
Def: Support
The support S(A) of a fuzzy set A is the crisp set of all
the elements of the universal set (UOD) for which
membership function has non-zero value
S (A) = { u ∈ U/ μ A( u ) > 0 }
34
M
F
1
.
5
α
0 Cor X
e
Crossover
points
α - cut
Suppor
t
Def: α – cut (or α lvel) set
The set of elements that belong to the fuzzy set A at least to the
degree α is called the α-level-set or α-cut-set
.
5
α
0
Cor X
e
Crossover
points
α - cut
Suppor
t
36
Fuzzy Inference
Systems
quiz
1. Consider the two fuzzy set:
.
5
α
0
Cor X
e
Crossover
points
α - cut
Suppor
t
Def: Core:
Is the set of all elements x in X that belong to the fuzzy set A such
that μA(x)=1:
38
MF Terminology cont..
Definition Normality
A fuzzy set is normal if its core is nonempty. In
other words, we can always find a point x ε X such
that μA(x)=1
0.5
45 Age
40
Convexity of Fuzzy Sets
• A fuzzy set A is convex if for any λ in [0,
1],
Definition Bandwidth:
for a Normal and Convex Fuzzy Set the bandwidth or width is
the distance between the two unique crossover point
42
MF Terminology cont..
Definition: Symmetry:
A Fuzzy Set is symmetric if its MF is symmetric
around a certain point x=c, namely
43
Formulation of Commonly Used MFs
MFs of one dimension
• Triangular MF: is specified by three parameters{ a,b ,c} as
follows:
Line eqn: y=y1+m(x-x1)
Matlab code
x = 0:100;
mf = trimf (x, [20, 60, 80]);
plot(x, mf);
axis([-inf inf 0 1.2]);
ylabel('Membership Grades');
title ('Triangular MF');
44
Formulation of Commonly Used MF
MFs of one dimension
• Trapezoidal MF: is specified by four parameters{ a,b ,c,d } as
follows:
Matlab code
x = 0:100;
mf = trapmf(x, [10, 20, 60, 95]);
plot(x, mf);
axis([-inf inf 0 1.2]);
ylabel('Membership Grades');
title(' Trapezoidal MF');
45
Formulation of Commonly Used MF
MFs of one dimension
• Smooth Trapezoidal MF: is specified by four parameters{ a,
b ,c,d } as follows:
d
b c
a
46
Formulation of Commonly Used MF
MFs of one dimension
• Gaussian MF: is specified by two parameters {c , σ } as follows:
Matlab code
clear; clc;
x = 0:100;
mf = gaussmf(x, [20 50]);
plot(x, mf);
%axis([-inf inf 0 1.2]);
ylabel('Membership Grades');
title(' Gaussian MF');
47
Formulation of Commonly Used MF
MFs of one dimension
• Generalized bell MF: is specified by three parameters {a, b, c } as follows:
Matlab code
clear; clc;
x = 0:100;
mf = gbellmf (x, [20, 4, 50]);
plot (x, mf);
axis([-inf inf 0 1.2]);
Ylabel ('Membership Grades');
title(' Generalized Bell MF');
48
--------Generalized bell MF:
• Effects of the parameters
b
a
49
Matlab code
x = (-10:0.4:10)'; a = 5;
b = 2; b = 2;
c = 0; mf1 = gbellmf(x, [a, b, -5]);
mf1 = gbellmf(x, [2, b, c]); mf2 = gbellmf(x, [a, b, 0]);
mf2 = gbellmf(x, [4, b, c]); mf3 = gbellmf(x, [a, b, 5]);
mf3 = gbellmf(x, [6, b, c]); mf = [mf1 mf2 mf3];
mf = [mf1 mf2 mf3]; subplot(223); plot(x, mf); title('(c)
subplot(221); plot(x, mf); title('(a) Changing ''c''');
Changing ''a'''); axis([-inf inf 0 1.2]);
axis([-inf inf 0 1.2]);
c = 0;
a = 5; mf1 = gbellmf(x, [4, 4, c]);
c = 0; mf2 = gbellmf(x, [6, 6, c]);
mf1 = gbellmf(x, [a, 1, c]); mf3 = gbellmf(x, [8, 8, c]);
mf2 = gbellmf(x, [a, 2, c]); mf = [mf1 mf2 mf3];
mf3 = gbellmf(x, [a, 4, c]); subplot(224); plot(x, mf); title('(d)
mf = [mf1 mf2 mf3]; Changing ''a'' and ''b''');
subplot(222); plot(x, mf); title('(b) axis([-inf inf 0 1.2]);
Changing ''b''');
axis([-inf inf 0 1.2]);
50
Commonly Used MFs
• Sigmoidal MF: is defined by:
Where a controls the slope at x=c
51
Formulation of Commonly Used MF
MFs of one dimension
• Sigmoidal MF: Matlab code used for last fig:
x = (-10:0.4:10)'; subplot(223); plot(x, y1, x, y3);
y1 = sigmf (x, [1, -5]); text(-4, 0.7, 'y1'); text(5, 0.7, 'y3');
y2 = sigmf (x, [2, 5]); axis([-inf inf 0 1.2]);
y3 = sigmf (x, [-2, 5]); title ('(c) y1 = sig(x;1,-5); y3 = sig(x;
-2,5)');
subplot(221); plot (x, y1, x, y2);
text(-5, 0.9, 'y1'); text(4, 0.6, 'y2'); subplot(224); plot(x, y1.*y3);
axis([-inf inf 0 1.2]); axis([-inf inf 0 1.2]);
title ('(a) y1 = sig(x;1,-5); y2 = title ('(d) y1*y3');
sig(x;2,5)');
52
Cylindrical Extension
MF of two dimensions
• MFs with two inputs (each from different UOD)
is referred to as two-dimensional MFs
• One natural way to extend one-dimensional
MFs to two-dimensional MFs is viacylindrical
extension , defined next:
• If A is a fuzzy set in X, then the cylindrical
extension in the Cartesian space is a fuzzy set
defined by:
* 53
Cylindrical Extension
MF of two dimensions
54
Matlab code for the previous fig
xx = (0:1:20)';
yy = (0:1:20)';
In symbols:
56
Set Theoretic Operations
illustration of the Subset concept
x = 0:100;
B = gbellmf(x, [30, 2, 50]);
A = 0.9*gaussmf(x, [15, 60]);
plot(x, A, x, B);
axis([-inf inf 0 1.2]);
title('A Is Contained in B');
ylabel('Membership Grades');
%Set (gca, 'xticklabels', []);
text(25, 1.0, 'B');
text(42, 0.75, 'A');
57
Set-Theoretic Operations
Union:( disjunction)
Intersection( or conjunction):
com
Complement:
This corresponds
to the logical NOT
58
operation.
More on Fuzzy Intersection and Fuzzy Union
:
Fuzzy intersection:
The intersection of two sets A and B is, in general,
specified by a function T: [0,1]* [0,1] [0,1] which
aggregates two membership grades as follows
* 59
T-Norm examples
Tm(a, S m(a,
b) b)
Ta(a, b) S a(a, b)
* Tb(a, b) S b(a, b) 62
clear subplot(224); plot (x, min(A,B));
x = (0:1:100)'; Set (gca, 'xticklabels', []);
A = gbellmf(x, [20, 4, 40]); axis([-inf inf 0 1.2]);
B = gaussmf(x, [ 20, 70]); Title ('(d) Fuzzy Set "A AND B"');
64
Example [2]
Assume
• A={(1,0), (2,.5),(3,1)}
• B={(1,1), (2,.5),(3,0)}
• A ×B can be arranged as a two-dimensional fuzzy set :
65
Example
67
Product of a two fuzzy sets
Example
Find A.B
Solution
68
Equality:
two fuzzy sets A and B are said to beequal A=B if
Example
69
Product of a fuzzy set with a crisp number
Multiplying a fuzzy set A by a crisp number a results in a new fuzzy set a.A with
the MF :
Example
70
Power of a fuzzy set
α
the α power of a fuzzy set A is a new set A with the MF :
Example
71
Difference
Difference of two fuzzy sets A and B is a new set A-B defined as:
Example
Find A-B
Solution
72
Disjunctive sum
The disjunctive sum of two fuzzy sets A and B is a new set
defined as:
Example
Find
Solution
73
Properties of the fuzzy sets[3]
• The properties of the classical set also suits for the
properties of the fuzzy sets. The important properties of
fuzzy set includes:
• 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).
74
Properties of the fuzzy sets[3]
• Idem potency (the same power)
A∪A = A, A∩A = A.
• Identity
A∪ φ = A and A∩X = A ,A∩ φ = φ and A∪ X = X.
where
Φ is the empty set (the degree of membership of all its elements is
zero)
• Transitivity
If A⊂B⊂C then A⊂C
• Involution (double complement)
.
75
Set Theoretic Operations
Example
Consider the universe U and the two sets A(u) and B(u) in the
following table .Determine :
U 0 1 2 3 4 5 6 7 8 9 comment
Solution
Complement
Union Max is
used
intersection
min is
used
78
Fuzzy rules and fuzzy
reasoning
79
Topics to be covered
• Introduction
• Extension principle of fuzzy sets
• Fuzzy relations
o def
o Projection of fuzzy relations
o Cylindrical extension of fuzzy relations
o Composition of fuzzy relations
o Fuzzy max-min and
o max-product composition operation
• Fuzzy if-then rules
– Linguistic variable ,values, and, modifiers
– Fuzzy if- then rule base
83
What do we need this extension principle
for?
• It gives us the rule of how to calculate an
output of a fuzzy system
• If we know the structure of the system,
containing algebraic and logical blocks,
and the system inputs are fuzzy. On the
basis of this principle we can determine
.
the outputs of the system.
84
Extension Principle
Suppose that
A is a fuzzy set on X
:
* 85
Example: Application of the extension principle
to fuzzy sets with discrete UOD
Let A = 0.3/–2+ 0.4/–1 +0.8/0 +1/1+0.7/2}
and y = f (u) = u 2. (many to one mapping)
-2 4
-1
0 1
1
2 0
Then
B = 0.3/4+ 0.4/1+ 0.8/0+ 1/1, 0.7/ 4
= (0.3V0.7)/4+(0.4v1)/1+0.8/0
=0.7/4+ 1/1 +0.8/0
86
Crisp relation
Crisp relation determine the relation between the elements of two crisp
sets and is defined by
Where:
1 means complete relation and
0 means no relation
Ex:
X={1,2} Y={A,B}
The Cartesian space is
87
----Crisp relation
88
Composition of crisp relation
Max-min composition:
Max- product
Example
Using Max-min
composition:
90
Using Max-product
composition:
91
Composition example()
Given
y1 y2 y3 y4 z1 z2
y1 0 1
R= x1 1 0 1 0 S=
y2 0 0
x2 0 0 0 1 y3 0 1
x3 0 0 0 0 y4 0 0
Find
Max z1 z2
R*C
Answer
x1 0 1
T=
x2 0 0
x3 0 0
92
Fuzzy Relations
• Examples:
– x is close to y (x and y are numbers)
– x depends on y (x and y are events)
– x and y look alike (x, and y are persons or
objects)
– If x is large, then y is small (x is an observed
reading and Y is a corresponding action)*
* 93
Ex 3.3 [6]
94
Projection of fuzzy relations
• For a fuzzy relation R(x,y), the projection on X denoted by R1 is
given by:
Example
X projection
Example
95
2D MF Projection
Two-dimensional Projection Projection
MF onto X onto Y
project.
* m 96
Cylindrical extension of fuzzy relations
• Cylindrical extension from an x projection is done by filling all the
columns of the matrix by the x projection
Cylindrical
X projection ext
97
Composition
* 98
Example 1:
let R1=‘ x is relevant to y’’
let R2=‘ y is relevant to z’’
Find the relation R3= ‘’x is relevant to z’’ using max-min
composition
Solution
Row1,col1
Row1,col2
Row2,col1
Row2,col2
99
Example 2
100
Example 3:
let R1=‘ x is relevant to y’’. let R2=‘ y is relevant to z’’
Find the relation R3= ‘’x is relevant to z’’ using max-min composition
R3 =
function : max_star.m
0.7000 0.5000
0.7000 0.6000
0.6000 0.3000
101
Max-product Composition
• Max-product composition:
* 102
Example 4:
let R1=‘ x is relevant to y’’. let R2=‘ y is relevant to z’’
Find the relation R3= ‘’x is relevant to z’’ using max-product composition
R3 =
function : max_star.m
0.4900 0.3000
0.6300 0.4800
0.5400 0.2400
103
104
105
0.
6
0.42
106
Linguistic variables and hedges
Linguistic Variable
• A linguistic variable is one
with a value that is a natural
language expression
referring to some quantity
of interest.
• So the value of the linguistic
variable is a word? or a
word sentence. This is the
main difference between a
linguistic variable and a
numerical one.
107
Linguistic variable and values
Linguistc var Age [year] height
108
Linguistic variables and hedges
Linguistic Variable
❑ Generally, a linguistic variable is a composite term u =
u1, u2, ....,un which is a concatenation()اﻟﺳﻠﺳﻠﺔof atomic
terms u1, u2, ...,un
❑ atomic terms can be divided into four categories:
o primary terms , which are the labels of specified
fuzzy subsets of the universe of discourse (e.g. small
and big);
o Connectives: AND, OR and the negation NOT;
o hedges: such as VERY, MOST, RATHER,
SLIGHTLY, MORE OR LESS, etc.;
o markers such as parenthesis.
109
Linguistic variables and hedges
primary terms
• A primary term is actually just a name or a label of a fuzzy
set. It usually describes the word which is used by experts
to express their opinion about the value of one of the
object characteristics, e.g old, large, fast, etc.
110
Linguistic variables and hedges
connectives
• The connectives (AND, OR, and NOT) realise the
operations of intersections, union, complement considered
earlier.
• Example :How can we express
• slow or medium,
• not fast and medium ?
111
Linguistic variables and hedges
hedges( modifiers)
113
Example : consider a fuzzy set
Another example
Extremely A = A 3
114
Linguistic variables and hedges
hedges
115
Fuzzy rules
116
Fuzzy rules
– Relational format: eg
Error change- in error output
N N NB
N z NM
N p z
117
Fuzzy rules
N Z P
Error N z NS Z
Z NS Z PS
P Z PS PB
118
Fuzzy rules
-1 0 1
Error -1 0 -1 0
0 -1 0 1
1 0 1 2
119
Properties of Set of Rules
o Completeness,
o Consistency,
o Continuity, and
o Interaction.
120
a) Completeness
A set of IF–THEN rules is complete if any
combination of input values result in an appropriate
output value.
b) Consistency
A set of IF–THEN rules is inconsistent if there are two
rules with the same rules-antecedent but different
rule-consequents.
c) Continuity
A set of IF–THEN rules is continuous if it does not have neighboring rules with
output fuzzy sets that have empty intersection.
121
Lecture
122
quiz
• Let A = {0.3/–2+ 0.4/–1 +0.8/0 +1/1+0.7/2} be a
set in U
and
• Find B in Y ?
123
Topics
124
Compositional rule of inference
Compositional rule of inference plays the key
role in fuzzy reasoning
This concept (by zadeh) is not a new concept and we
used same idea in fuzzy relations. Moreover the
extension principle is a special case of the
compositional rule of inference.
It is a generalization of the following familiar notion:
125
Compositional Rule of Inference
• Derivation of y = b from x = a and y = f(x)
y y
com
b b
y= y=
f(x) f(x)
a x x
a
a and b: points
a and b: intervals
y = f(x) : a
curve y = f(x) : an interval-valued
* function 126
Compositional Rule of Inference
• a is a fuzzy set and y = f(x) is a fuzzy relation:
See comm
* cri. 127
Step 1: cylindrical extension of A
Rule: if x is A then y is B
Fact: x is A
Consequent (Conclusion): y is B
Generalized modus ponens (GMP):
in much human reasoning MP is employed in an
approximate manner. For example if we have the
previous rule and we know that “the tomato is more
or les red, then we can infer that “the tomato is more or
les ripe. This is written as:
Rule: if x is A then y is B
Fact: x is A’
Consequent (Conclusion): y is B’
Where A’ is close to A and B’ is close to B
(1)
Implication
or equivalently; relation
(2)
Mamdani
Mamdani
Lukasiewicz
zadeh
kleene=-Dienes
▪ Max-Product
▪ Min-Max
▪ Max-Max
▪ Min-Min
133
Case :Single rule with single antecedent
Rule: if x is A then y is B
Fact: x is A’
Conclusion: y is B’
This is the simplest case and the formula is available in eqn (1)
(1)
A’ A B
w
X Y
A’
B
’
X Y
x is A’ y is
B’
* 135
Example Given the fuzzy rule
Solution
Using Mamdani implication
The implication relation is:
0. 0. 0.
BY EXTION-ROW TO CLM
2
0. 2
0. 2
0.
5 5 4
0. 0. 0.
6 7 4
Using Max-Min composition
0. 0. 0.
5 5 4
136
---
or
---
or
Cylindrical extension of A’ :
(1)
Max -product
Min- Max
Min- Min
Max -Max
138
Example 2:
Given:
1 2 3 4
70 0.3 0.4 0.4 0.4 Using Max-Min compositional rule
80 0.3 0.5 0.6 0.6
90 0.3 0.5 0.7 0.8
10 0.3 0.5 0.7 0.9 Two other approaches
0 to be worked in the class
139
2 nd approach:
Y projection
1 2 3 4
70 0.3 0.4 0.4 0.4
80 0.3 0.5 0.6 0.6
90 0.3 0.5 0.7 0.8
10 0.3 0.5 0.7 0.9
0
3 nd approach:
Case: Single rule with multiple antecedent
Z
X Y
A’ B
’ C
’
Z
x is A’ X y is Y z is
*
B’ C’ 141
In this case the rule can be represented by ternary relation
Firing
Where strength
* 143
• Graphics representation:
A’ A B B C
1 ’ 1 1
w
1
Z
X Y
A’ A B B C
2 ’ 2 w
2
2
Z
X Y
T-norm
A’ B
’ C
’ Z
x is A’ X y is Y z is
B’ C’
* 144
Example : Multiple rule with single antecedent
Given
145
s1 s2
H1 H2
146
Lecture
Fuzzy Inference Systems
Stop 29/02/2012
Fuzzy Inference
Systems
quiz
1. Consider the two fuzzy set:
Schematic diagram
Rulebase
Database
(Fuzzy
(MFs)
rules)
inpu outpu
t Fuzzy reasoning t
Mamdani fuzzy inference systems
project project
Step 2: Rule Evaluation
(matching)
• Take the fuzzified inputs, μ (x1) = 0.5, μ
A1 A2
0.25
0.75
168
….Example
• For the case where we have symmetric triangular output membership
functions that peak at one and have a base width ofw , simple geometry
can be used to show that the area under a triangle “chopped off” at a
h is given by:
height of
Usin
g
169
COG Defuzzification Example2
• Consider the last example but with product implication. The
implied fuzzy sets are now as shown below
170
Centre Average Defuzzification:
171
Example (centre average ):
Suppose that the implied fuzzy sets of a two rule system are as shown below
0.25
0.75
Example1 (Mamdani FIS): A FIS has two inputs (x and
y) and one output (u). These fuzzy variables are defined by
the following membership functions:
N Z P
50 100 x, y, u
0
And the control strategy is represented by the
following rule base
R1 If x is N and y is N Then u is N
R2 If x is Z and y is Z Then u is Z
R3 If x is P and y is P Then u is P
R2
R3
3. Implication
R1:
R2:
0 50 100 u
The area of this implied fuzzy set
isR3 is off
175
Example2 ( Mamdani inference)[3.2.1[2 ]]
Take the inference in the next Figure where the input and output
membership functions are smooth trapezoidal defined by.
μNeg = μSTrapezoid(x;−100,−100,−60, 0)
μZero = μSTrapezoid(x;−90,−20, 20, 90)
μPos = μSTrapezoid(x;0,60,100, 100)
where
177
solution
Inserting u for x the discrete conclusion term set is represented by three
vectors
Neg = [1 0.93 0 0 0]
Pos = [0 0 0 0.93 1]
178
Step 2: implication :
using minimum implication the implied fuzzy sets for the three rules are:
179
Takagi-Sugeno (T S) FIS type:
• Rule base
If X is A 1 and Y is B 1 then Z = p1*x + q 1*y + r 1
If X is A 2 and Y is B 2 then Z = p2*x + q 2*y + r 2 T-S FIS
(where the p i ,,q i and ri are real numbers) the functional fuzzy
system is referred to as a “Takagi-Sugeno fuzzy system.”
180
---Takagi-Sugeno (T S) FIS type:
• Rule base
If X is A 1 and Y is B 1 then Z = p1*x + q 1*y + r 1
If X is A 2 and Y is B 2 then Z = p2*x + q 2*y + r 2
• Fuzzy reasoning
A B z1 =
1 1 w
1 p1*x+q1*y+r
1
X Y
A B z2 =
2 2 w p2*x+q2*y+r
2 2
X Y w1*z1+w2*z
x= y= z= 2
3 2 Π w1+w
2
Example. We illustrate Sugeno’s reasoning method by the following
simple example
182
solution
The firing level of the first rule
is
α2
the individual output of the second rule is z2 = x0 + y0 = 3+3 = 6.
α3
the individual output of the third rule is z3 = x0 +2y0 = 3+6 = 9.
183
Mamdani VS Sugeno
185
Case Studies