Upload
manish
View
215
Download
0
Embed Size (px)
Citation preview
7/31/2019 Fuzzy Logic and Design
1/61
CS 288: Fuzzy Logic & Design
M.Tech. (Computer Science & Engg.)
Uttarakhand Technical University
7/31/2019 Fuzzy Logic and Design
2/61
What is a fuzzy set?
Crisp Set: An element either belongs or does notbelong to a set.
Example People in a town divided into two sets set of all males and set of all females.
Fuzzy Set: An element belongs to a set with certaindegree of belongingness.
Example People in a town divided into two sets set of young people and set of old people.
7/31/2019 Fuzzy Logic and Design
3/61
Crisp logic
Crisp logic: 2-level logic TRUE / FALSE or YES /NO or 1 / 0
That is, discrete binary truth value.
So, hard decision logic.
Crisp sets based on crisp logic.
But, crisp logic does not apply to most real-world
situations.
Example No precise boundary between young andold people.
7/31/2019 Fuzzy Logic and Design
4/61
Concept of fuzzy logic
Fuzzy logic: Multi-level logic conceived by Zadehin 1965.
Continuous range of truth value, i.e., extent of truth
(or falsity) in the range 0 to 1
So, soft decision logic as much as the humanreasoning, e.g., very young, moderately young, notso young, and so on.
Fuzzy sets based on fuzzy logic.
Crisp logic (set) is a special case of fuzzy logic (set).
7/31/2019 Fuzzy Logic and Design
5/61
Why fuzzy logic?
Limited precision.
A way of handling uncertainty.
Quantitative methods of handling qualitative issues.
To introduce human-like thinking in computers.
Applications:
Control systems Pattern recognition
Decision making
7/31/2019 Fuzzy Logic and Design
6/61
Fuzzy set definition
IfXis a collection of objects denoted generically byx, then a fuzzy setA inXis a set of ordered pairsgiven as
X= Universal set
x= Set element
A = Fuzzy set;
= Membership grade;
Xxxx
AA )(
)(xA
XA
1,0)( xA
7/31/2019 Fuzzy Logic and Design
7/61
Membership function
Membership grade is the degree ofbelongingness of elementxin the fuzzy setA.
That is, it is the measure of the extent by whichxsatisfies the property of fuzzy setA.
Membership function: User defined function forcalculating the membership grade
Probabilistic measure
Possibilistic measure
)(xA
7/31/2019 Fuzzy Logic and Design
8/61
Membership function
Membership vs probability measure:
Membership grade = degree of belongingness
Probability measure = chance of belongingness
Example Probability thatxis young is 0.8;membership ofxin set of young people is 0.8
Multi-dimensional membership grade: Membership
grade based on multiple criteria
Example Membership grade for a person infuzzy set TALL depends on his height and age.
NA x 1,0)(
7/31/2019 Fuzzy Logic and Design
9/61
Some definitions
Support: The support of a fuzzy setA in theuniversal setXis the crisp set that contains all theelements ofXthat have non-zero membership gradeinA.
Power set: The set of all possible fuzzy subsets ofX.
Empty fuzzy set: whose support is a null set.
Height: The height of a fuzzy set is the largestmembership grade attained by any element in theset.
Normalization: A fuzzy set is normalized when atleast one of its elements attain the maximumpossible membership grade which is generally one.
7/31/2019 Fuzzy Logic and Design
10/61
Some definitions
-cut: An -cut of a fuzzy set is a crisp set that
contains all the elements whose membership gradeis at least equal to .
It implies
Level set: The crisp set of all membership gradevalues, including 0.
2121 ifAA
XxxAA somefor)(
7/31/2019 Fuzzy Logic and Design
11/61
Some definitions
Convex fuzzy set: A fuzzy set is convex if and only ifeach of its -cuts is a convex set.
Scalar cardinality: Sum of the membership grades ofall elements.
Fuzzy cardinality: It is the fuzzy set defined as
AAA
~
]1,0[,)1(,)(),(min)( srxsrx AAA
7/31/2019 Fuzzy Logic and Design
12/61
Operations on fuzzy sets
Set inclusion:
Set equivalence:
Proper subset:
Set complement
Set union
Set intersection
XxxxBA BA ),()(if
XxxxBA BA ),()(if
)()(such thatand
),()(if
xxx
XxxxBA
BA
BA
7/31/2019 Fuzzy Logic and Design
13/61
Set complement
The complement operation is defined by a function
C: [0,1] [0,1] and the complement of a fuzzy set
A is given as
Axiomatic requirements:
C(0) = 1, C(1) = 0
Ifa < b then C(a) C(b) C(.) is a continuous function
C(.) is involutive, i.e., C( C(a) ) = a
xxC
AA )(
7/31/2019 Fuzzy Logic and Design
14/61
Complement functions
Sugeno class:
Yager class:
Standard complement:
,1,
1
1)(
a
aaC
,0,1)( 1 WaaC WWW
1or0for,1)( WaaC
7/31/2019 Fuzzy Logic and Design
15/61
Set union
The union operation is defined by a function
U: [0,1] [0,1] [0,1] and the union of fuzzy sets
A and B is given as
Axiomatic requirements:
U(0,0) = 0, U(0,1) = U(1,0) = U(1,1) = 1
Commutative: U(a,b) = U(b,a) Monotonic: Ifa p, b q then U(a,b) U(p,q)
Associative: U( U(a,b), c) = U(a, U(b,c))
xxxUBABA )(),(
7/31/2019 Fuzzy Logic and Design
16/61
Set union
U(.) is continuous function
Idempotent: U(a,a) = a
Union functions:
Standard: max(a,b)
Algebraic sum: a + b ab
Bounded sum: min(1, a+b)
Drastic union: Umax(a,b) = a,ifb=0= b, ifa=0
= 1, otherwise
7/31/2019 Fuzzy Logic and Design
17/61
Set intersection
The intersection operation is defined by a function
i: [0,1] [0,1] [0,1] and the intersection of fuzzy
setsA and B is given as
Axiomatic requirements:
i(1,1) = 1, i(0,0) = i(0,1) = i(1,0) = 0
Commutative:i(a,b) = i(b,a) Monotonic: Ifa p, b q then i(a,b) i(p,q)
Associative: i( i(a,b), c) = i(a, i(b,c))
xxxiBABA )(),(
7/31/2019 Fuzzy Logic and Design
18/61
Set intersection
i(.) is continuous function
Idempotent: i(a,a) = a
Intersection functions: Standard: min(a,b)
Algebraic product: ab
Bounded difference: max(0, a+b1)
Drastic intersection: imin(a,b) = a,ifb=1
= b, ifa=1
= 0, otherwise
7/31/2019 Fuzzy Logic and Design
19/61
Properties of fuzzy set operations
Commutative:
Associative:
Idempotent:
Distributive:
Identity:
ABBAABBA ;
)()()(
);()()(
CABACBA
CABACBA
AXAAA ;
CBACBA
CBACBA
)()(
;)()(
AAAAAA ;
7/31/2019 Fuzzy Logic and Design
20/61
Properties of fuzzy set operations
We have
Absorption:
De Morgans Laws:
Involution:
Equivalence formula:
XXAA ;
ABAAABAA )(;)(
BABABABA ;
AA
BABABABA
7/31/2019 Fuzzy Logic and Design
21/61
Properties of fuzzy set operations
Note the following which are different fromconventional crisp set:
(Law ofnon-contradiction)
(Law ofexcluded middle)
AA
XAA
7/31/2019 Fuzzy Logic and Design
22/61
Fuzzy set decomposition
Representations of fuzzy sets by crisp sets
For every in the level set ofA, find the -cut.
To obtain backA:
From every -cut obtained above, form a fuzzy
set as
Then,
Ax
xAx
xA~
A
AA
~
7/31/2019 Fuzzy Logic and Design
23/61
Extension principle
Mapping fuzzy subsets ofXto fuzzy subsets ofYviaa function f.
If more than one element maps to the sameelement yin Y, the maximum of the membershipgrades of these elements inA is taken as themembership grade ofyin f(A).
YAfxfxfxf
Af
XAxxxA
YXf
n
n
n
n
)(;)(
...)()(
)(
;...
:
2
2
1
1
2
2
1
1
7/31/2019 Fuzzy Logic and Design
24/61
Extension principle
If no element inXis mapped to y, membershipgrade ofyis zero.
Let,
Then membership grade ofyin f(A1,A1, ,An) isequal to the minimum of the membership grades of
xk inAk, for k= 1 to n.
YyxxxfYXXXf
n
n
,.....,,,.....,,:
21
21
7/31/2019 Fuzzy Logic and Design
25/61
Fuzzy arithmetic
Addition, subtraction, multiplication, division,maximum, minimum, exponentiation, logarithm aredefined.
Types of numbers:
Scalars integers, real numbers
Intervals exact value not known but the boundscan be established.
Fuzzy numbers uncertain numbers with a
knowledge of range of possible values and valuethat is more possible than others, e.g.,approximately 5.
7/31/2019 Fuzzy Logic and Design
26/61
Fuzzy numbers
It is a fuzzy set with different degree of closeness toa crisp number.
Membership function ought to be normal and
convex.
All fuzzy set operations are applicable to fuzzynumbers
Intersection, union, -cuts, extension, etc.
Operation similar to arithmetic operations are alsoapplicable
7/31/2019 Fuzzy Logic and Design
27/61
Linguistic variables
When fuzzy numbers are connected to linguisticconcepts, such as terms like very small, small,medium, and so on.
Linguistic variable characterized by:
Name of the variable
Set of linguistic terms
Universal set
Syntactic rule
Semantic rule
7/31/2019 Fuzzy Logic and Design
28/61
Linguistic variables
7/31/2019 Fuzzy Logic and Design
29/61
Interval number
For an intervalA = [a, b]:
Widthw(A) = b a
Magnitude |A| = max( |a|, |b| )
ImageA= [b, a]
InverseA1 = [1/b, 1/a]
For two intervalsA = [a, b] and P=[p, q]:
EqualityA = Pwhen a=p, b=q
InclusionA subset ofB ifp a b q
Distanced(A,B) = max( |ap|, |bq| )
7/31/2019 Fuzzy Logic and Design
30/61
Arithmetic operations on intervals
For intervalsA and P, and operatorwe define
Division,A/ P, is not defined when 0 is an elementin P.
The result of an arithmetic operation on closedintervals is again a closed interval.
/,.,,*
PpAapaPA ,**
7/31/2019 Fuzzy Logic and Design
31/61
Arithmetic operations on intervals
Addition:
Subtraction:
Multiplication:
Division:
Note that:
However,
],[ qbpaPA
],[ pbqaPAPA
qbpbqapaqbpbqapaPA .,.,.,.max,.,.,.,.min.
q
b
p
b
q
a
p
a
q
b
p
b
q
a
p
aPAPA ,,,max,,,,min./ 1
]1,1[/and]0,0[ AAAA
AAAA /1and0
7/31/2019 Fuzzy Logic and Design
32/61
Properties of interval operations
Commutative
Associative
Identity
Distributive:
Sub-distributive:
Inclusion monotonicity:
CABACBACcBbcb
..).(,everyfor0.If
CABACBA ..).(
QPBAQPBA
QPBAQPBA
QBPA
//;..
;
,If
7/31/2019 Fuzzy Logic and Design
33/61
Fuzzy number and fuzzy interval
A fuzzy number is a fuzzy set on
such that
A is normal (height(A) = 1)
-cut of A is a closed interval for all in the
range (0, 1]
The support of A is bounded
Since all -cuts are closed intervals, every fuzzynumber is a convex fuzzy set.
Membership function is continuous.
1,0: A
7/31/2019 Fuzzy Logic and Design
34/61
Fuzzy number and fuzzy interval
Comparison of a real number and a crisp intervalwith a fuzzy number and a fuzzy interval.
7/31/2019 Fuzzy Logic and Design
35/61
Arithmetic on fuzzy numbers
Definition based on cutworthiness:
Definition based on extension principle:
BAxxBA
BABA
**
**
1,0
)(),(minmax)(*
* yxz BAyxz
BA
7/31/2019 Fuzzy Logic and Design
36/61
Arithmetic on fuzzy numbers
Addition:
7/31/2019 Fuzzy Logic and Design
37/61
Arithmetic on fuzzy numbers
Subtraction:
7/31/2019 Fuzzy Logic and Design
38/61
Arithmetic on fuzzy numbers
Multiplication:
7/31/2019 Fuzzy Logic and Design
39/61
Arithmetic on fuzzy numbers
Division:
7/31/2019 Fuzzy Logic and Design
40/61
MIN and MAX operators
For intervals:
For fuzzy numbers:
),max(),,max(),(MAX
),min(),,min(),(MIN
qbpaPA
qbpaPA
)(),(minsup)(,MAX
)(),(minsup)(,MIN
),max(
),min(
yBxAzBA
yBxAzBA
yxz
yxz
7/31/2019 Fuzzy Logic and Design
41/61
MIN vs min operators
7/31/2019 Fuzzy Logic and Design
42/61
MAX vs max operators
7/31/2019 Fuzzy Logic and Design
43/61
Properties of MIN and MAX
Commutative
Associative
Idempotent
Absorption
Distributive
7/31/2019 Fuzzy Logic and Design
44/61
Interval equations
A +X= P
X= PA is not the solution except when
A = [a, a]
The solution is
X= [p a, q b]
The above solution exists iff
p a q b
7/31/2019 Fuzzy Logic and Design
45/61
Fuzzy number equations
The solution to a fuzzy equationA*X= B is obtainedby solving a set of interval equationsX, one foreach nonzero in the set
Final solution
The solution forA +X= B exists iff
p a q bwhereA = [a, b] and P = [p,
q], for all
p ap a q b q bfor
BA
]1,0(
Xxx
X
7/31/2019 Fuzzy Logic and Design
46/61
Fuzzy number equations
Similarly, for fuzzy number equationsA.X= B, X=B /A is not the solution
Solution exists iff
p / a q / bwhereA = [a, b] and P = [p,
q], for all
p / a q / bp/ a q / bfor
7/31/2019 Fuzzy Logic and Design
47/61
Crisp relation
Crisp relation:
Example:
X={dollar, pound, rupee}
Y= {USA, Canada, Britain, India}
Relation = (currency, country)
Then R = { (dollar,USA), (dollar, Canada),(pound,Britain), (rupee,India) }
YXRYyXxxRyyxR ,,,,
7/31/2019 Fuzzy Logic and Design
48/61
Fuzzy relation
Fuzzy relation:
Example:
X={New York (NY), Paris (P)}
Y= {Beijing (B), New York (NY), London (L)}
Relation = Very far
Then R = { 1/(NY,B); 0.6/(NY,L); 0/(NY, NY);0.9/(P,B); 0.7/(P,NY); 0.3/(P,L) }
YXRYyXxyxRR
,,
,
7/31/2019 Fuzzy Logic and Design
49/61
Some terminologies
Domain of a relation
Range of a relation
Height of a relation
-cut of a relation
Inverse of a relation
7/31/2019 Fuzzy Logic and Design
50/61
Properties of relation
Reflexive
Else, irreflexive and -reflexive in fuzzy relation
Symmetric
Asymmetric and anti-symmetric
Transitive:
Max-min and max-product transitive in fuzzyrelation
Non-transitive and anti-transitive
7/31/2019 Fuzzy Logic and Design
51/61
Properties of fuzzy relation
xyyxXyx
yxxyyx
Xyxxyyx
xxXx
Xxxx
Xxxx
Xxxx
RR
RR
RR
R
R
R
R
,,,,:Asymmetric
0,,0,:symmetric-Anti
,,,,:Symmetric
0,,:eIrreflexiv
,1,:reflexive-Anti
,0,:reflexive-
,1,:Reflexive
7/31/2019 Fuzzy Logic and Design
52/61
Properties of fuzzy relation
Non-transitive: neither transitive nor anti-transitive.
Xzxzyyxzx
Xzxzyyxzx
Xzxzyyxzx
Xzxzyyxzx
RRXy
R
RRXy
R
RRXyR
RRXy
R
,,,,max,
:transitive-antiproduct-Max
,,,,max,
:ansitiveproduct tr-Max,,,,,minmax,
:transitive-antimin-Max
,,,,,minmax,
:tivemin transi-Max
7/31/2019 Fuzzy Logic and Design
53/61
Poset and lattice
Partial order: reflexive, anti-symmetric andtransitive.
Partially ordered set (poset)
Maximal and minimal elements
Greatest and least elements
Upper and lower bounds of subsets
Greatest lower bound
Least upper bound Lattice: A poset whose every 2-element subset has
GLB and LUB in the poset.
7/31/2019 Fuzzy Logic and Design
54/61
Fuzzy measures
Fuzzy measure assigns a value [0, 1] to each crispsubsets of the universal set signifying the degree ofevidence or belief that a particular element belongsto the subset.
Axioms:
Boundary condition:
Monotonicity:
1,0 Xgg
BgAgBA
7/31/2019 Fuzzy Logic and Design
55/61
7/31/2019 Fuzzy Logic and Design
56/61
Plausibility measure
Associated with each belief measure is a plausibilitymeasure defined as
Alternatively,
APlABel
ABelABelAPl
1
1
1
....)1(..........
....
21
1
21
APlAPl
AAAPl
AAPlAPlAAAPl
n
n
ji
ji
i
in
7/31/2019 Fuzzy Logic and Design
57/61
Probability measure
Probability assignment is a mapping function:
m: P(X) [0, 1]
such that m() = 0 and P(X)m(A) = 1
Observations:
Not necessarily m(X)=1
Not necessarily m(A) m(B) when setA issubset or equal to set B.
No relationship between m(A) and m() required.
7/31/2019 Fuzzy Logic and Design
58/61
Probability measure
Computation of belief and plausibility:
Focal element: Ifm(A) > 0, thenA is called a focalelement ofm.
Fis the set of focal elements.
(F,m) is called body of evidence.
ABAB
BmAPlBmABel )()()()(
7/31/2019 Fuzzy Logic and Design
59/61
Probability measure
Total ignorance:
Single support function: m is a single support
function focused atA if
AAPlPl
XAABelXBel
XAXPAAmXm
1)(,0)(
0)(,1)(
),(0)(,1)(
ABXBBm
sXmsAm
,,0)(
1)(,)(
7/31/2019 Fuzzy Logic and Design
60/61
Probability measure
Combining evidence: standard method (Dempstersrule of combination)
AAm
ACmBm
CmBm
Am
CB
ACB
,0)(
,)()(1
)()(
)(
12
21
21
12
7/31/2019 Fuzzy Logic and Design
61/61
Possibility measure
Possibility measure is particular cases of plausibilityand belief measures.
The focal elements of a body of evidence are
nested. The associated belief and plausibility measures are
called consonants.
Properties:
)(),(max
)(),(min
BPlAPlBAPl
BBelABelBABel