Uploaded by alemayehuabera46

fuzzy

advertisement
 •
•
•
•
•
In giving instructions to an aircraft autopilot,
it is not possible to turn the plane “slightly to
the west”; an autopilot device does not
understand the natural language of a
human. We have to turn the plane by 15 , for
example, a crisp number.
ƕ
“Crisp” Input
Fuzzification
“Fuzzy” Input
Fuzzy Logic
“Fuzzy” Output
De-Fuzzification
“Crisp” Output
!
" ,QSXW
)X]]LILFDWLRQ
,QIHUHQFH
(QJLQH
'HIX]]LILFDWLRQ 2XWSXW
)X]]\
.QRZOHGJHEDVH
#
,QSXW
)X]]LILHU
,QIHUHQFH
(QJLQH
'HIX]]LILHU
2XWSXW
)X]]\
.QRZOHGJHEDVH
&RQYHUWVWKHFULVSLQSXW WRDOLQJXLVWLF
YDULDEOH XVLQJWKHPHPEHUVKLSIXQFWLRQV
VWRUHGLQWKHIX]]\NQRZOHGJHEDVH
$
• Fuzzification is the process of making a crisp quantity
fuzzy.
• In the real world, hardware such as a digital voltmeter
generates crisp data, but these data are subject to
experimental error.
%
&' ( )*
•
•
•
•
•
+ , *
, *
) *
"- *
+ "- *
./
&' ( )*
•
•
•
•
•
Very Tall (7 feet)?
Tall (6 feet)?
Average (5 feet)?
Short (4 feet)?
Very Short (3 feet)?
..
Degree of Membership
0 + "- "-
1
) , + ,
0.75
Very Short
Short
Average
Tall
Very Tall
0.5
0.25
0
2
3
4
5
6
7
8
Input (feet)
.
" 1
/ĨLJŽƵĂƌĞϱ ĨĞĞƚ͗
• + 2 /3
• , 2 /3
• ) 2 .//3
• "- 2 /3
• + "- 2 /3
•
•
•
•
•
+ , 4 *
, # *
) ! *
"- *
+ "- *
^ĂŵĞĂƐŽŽůĞĂŶůŽŐŝĐ
;ƐŽĨĂƌ͙Ϳ
.
Examples:
If you are 5½ feet:
• Very tall - 0%
• Tall - 50%
• Average - 50%
• Short - 0%
• Very Short - 0%
•
•
•
•
•
Very Tall (7 feet)?
Tall (6 feet)?
Average (5 feet)?
Short (4 feet)?
Very Short (3 feet)?
NOT Boolean logic
.
How tall is Kevin?
Kevin is 6’ 2”
•
•
•
•
•
Very Tall Tall Average Short Very Short -
.!
How tall is Kevin?
Kevin is 6’ 2”
•
•
•
•
•
Very Tall - 25%
Tall - 75%
Average - 0%
Short - 0%
Very Short - 0%
.#
• 5 5 - 5
- 6 ) 6 5 ) 7
,- - 5 ) 7 , - 6 ) 1 “ ”8 “ '”8
“--”7 ,- ' 51
.7 9 - - 8 - 7
7 9 - 8 5 - 7
7 9 - 5 8 - - 7
– :' 5
5
6 - - ) 5 ) 7
.4
9
9 ;.
9 ;
" 92,&<
0 = 9 ;
9
,QSXW
)X]]LILHU
,QIHUHQFH
(QJLQH
'HIX]]LILHU
2XWSXW
)X]]\
.QRZOHGJHEDVH
8VLQJ,I7KHQW\SHIX]]\UXOHV FRQYHUWVWKH
IX]]\LQSXWWRWKHIX]]\RXWSXW
.%
9
• ) • -
5 5
- 8 ƚĞŵƉĞƌĂƚƵƌĞ ĂŶĚ ŵŽŝƐƚƵƌĞ
) Ϭ͘ϳ ĂŶĚ Ϭ͘ϭ
-
- ) 7
- - 5
) 5 5 - - ) 7 ,- ' -
- 7 , 5 - -
-5 5 >29< 57 ,- -5 - ) - ,&< -
) - 9 7 ,-8 - -5 ) /748 /7.8 5 /7. .8 8 5
) 7
/
Graphical Technique of Inference
.
Graphical Technique of Inference
Example:
1
1
1
Rule 1: if x1 is A~ 1 and x2 is A~ 2 , then y is B~
2
2
2
Rule 2: if x1 is A~ 1 or x2 is A~ 2, then y is B~
input(i) = 0.35
input(j) = 55
• 6 6 5 6 7 " 5 - -)
5 8 5 7
• - 8 -
5
– . ?--? )
– – ? '? ) 7
• >29< -5 5 '- ) - 5 - 7 "8
) /74 - ' - -- ) 5 ' - - 7
0 @
0 :
!
0 @
#
0 @
4
0 @
$
> %
> /
0 @
.
“Crisp” Input
Fuzzification
“Fuzzy” Input
Fuzzy Logic
-orF.A.M.
“Fuzzy” Output
De-Fuzzification
“Crisp” Output
) ) •
•
•
•
9 , - ,6
"-' 6 6 A
) 8 6
6 7
1
0
Light
Medium
Heavy
1
Short
0
50
100
150
xn = 200
Medium
10
Long
20
30
Green light duration
yn = 40
Traffic density
,-
6 6 25 5
- 5 8 >5B7
!
Fuzzy Associative Memories (FAMs)
A fuzzy system with n non-interactive inputs and a single
output. Each input universe of discourse, x1, x2, …, xn is
partitioned into k fuzzy partitions
The total # of possible rules governing this system is given
by:
If x1 is partitioned into k1 partitions
x2 is partitioned into k2 partitions
:
.
xn is partitioned into kn partitions
l = k1 • k2 • … • kn
#
Fuzzy Associative Memories (FAMs)
Example: for n = 2
A1
B1
A2
C1
B2
A3
A4
C4
C4
A5
C4
B4
C3 C3
B5
C3
A → A1  A7
B → B1  B5
A7
C3 C3
C1
B3
A6
C2
C1
C1 C2
C1
C4
C4
C1 C2
C1
C3
l = k1 • k2 = 7*5=35 rules
Output: C → C1  C4
4
Fuzzy Associative Memories (FAMs)
Example:
Non-linear membership function: y = 10 sin x
$
Fuzzy Associative Memories (FAMs)
Few simple rules for y = 10 sin x
1. IF x1 is Z or P B, THEN y is z.
2. IF x1 is PS, THEN y is PB.
3. IF x1 is z or N B, THEN y is z
4. IF x1 is NS, THEN y is NB
FAM for the four simple rules
x1
NB
NS
z
PS
PB
y
z
NB
z
PB
z
%
“Crisp” Input
Fuzzification
“Fuzzy” Input
Fuzzy Logic
-orF.A.M.
“Fuzzy” Output
De-Fuzzification
“Crisp” Output
/
Defuzzification
(Fuzzy-To-Crisp conversions)
Defuzzification is the process: round it off to the nearest
vertex.
Ɣ
Fuzzy set (collection of membership values).
.
DEFUZZIFICATION
defuzzification means the conversion of the fuzzy output
values into crisp values. For example, if we say "the output
force must be large" and large variable takes the values
between (70, 90) N, then what is the force will be needed 75
or 80 or …N, we can know what is the force we want by
using defuzzification method. There are different types of
defuzzification methods.
,QSXW
)X]]LILHU
,QIHUHQFH
(QJLQH
'HIX]]LILHU
2XWSXW
)X]]\
.QRZOHGJHEDVH
• &RQYHUWVWKHIX]]\RXWSXW RIWKHLQIHUHQFH
HQJLQHWRFULVS XVLQJPHPEHUVKLSIXQFWLRQV
DQDORJRXVWRWKHRQHVXVHGE\WKHIX]]LILHU
!
,QSXW
)X]]LILHU
,QIHUHQFH
(QJLQH
'HIX]]LILHU
2XWSXW
)X]]\
.QRZOHGJHEDVH
"
&HQWURLG
„
9 5 - ' ) ' 5 - ' C 7
- - ) =D 6
5 1
b
³ µ (x ) x dx
A
COG =
a
b
³ µ (x ) dx
A
a
„
„
5 5 -5 5 - ) - 8 8
- ) 8 Ăď7
ƌĞĂƐŽŶĂďůĞĞƐƚŝŵĂƚĞ 6 6 56
) 7
µ(x)
1.0
0.8
A
0.6
0.4
0.2
0.0
150
a
160
b
170
180
190
200
X
210
5
$
Defuzzification Methods
1)Max-membership principle
µ
1
µc
(Z*)
≥ µc(z) ∀ z ∈ Z
z*
2)Centroid principle
z
µ
1
³ µc ( z) •
zdz
z* =
³ µ c ( z )dz
z*
z
%
Defuzzification Methods
3)Weighted average method
(Only valid for symmetrical output membership functions)
µ
*
z =
¦ µc ( z ) •
z
.9
~
¦ µc ( z )
.5
~
0
a
b
z
Formed by weighting each functions in the output by its
respective maximum membership value
5 ) 5 -5
) "/
Defuzzification Methods
4)Mean-max membership
µ
(middle-of-maxima method)
1
z * = (a + b ) 2
0
a
z*
b
z
".
Defuzzification Methods
Example :
A railroad company intends to lay a new rail line in a particular part of a
county. The whole area through which the new line is passing must be
purchased for right-of-way considerations. It is surveyed in three stretches,
and the data are collected for analysis. The surveyed data for the road are
given by the sets B~ 1, B~ 2 and B~ 3 , where the sets are defined on the universe of
right-of-way widths, in meters. For the railroad to purchase the land, it must
have an assessment of the amount of land to be bought. The three surveys
on the right-of-way width are ambiguous , however, because some of the
land along the proposed railway route is already public domain and will not
need to be purchased. Additionally, the original surveys are so old (circa
1860) that some ambiguity exists on the boundaries and public right-of-way
for old utility lines and old roads. The three fuzzy sets B~ 1, B~ 2 and B~ 3 , shown in
the figures below, represent the uncertainty in each survey as to the
membership of the right-of-way width, in meters, in privately owned land.
We now want to aggregate these three survey results to find the single most
nearly representative right-of-way width (z) to allow the railroad to make its
initial estimate
"
Defuzzification Methods
"!
Defuzzification Methods
Centroid method:
z* =
³ µ ( z) • zdz =
³ µ ( z)dz
B
~
B
~
3.6
4 § z −3·
5.5
6
7
8
º
ª1
«³0 (.3z ) zdz + ³1 (.3z )dz + ³3.6 ¨ 2 ¸ zdz + ³4 (.5) zdz + ³5.5 (z − 5)zdz + ³6 zdz + ³7 (8 − z )zdz»
©
¹
¼
¬
3.6
4 § z −3·
5.5
6
7
8
ª1
º
÷ «³ (.3z )dz + ³ (.3)dz + ³ ¨
dz + ³ (.5)dz + ³ ( z − 5)dz + ³ dz + ³ (8 − z )dz »
¸
1
3.6
4
5.5
6
7
© 2 ¹
¬0
¼
= 4.9meters
"
Defuzzification Methods
Weighted-Average Method:
z* =
(.3 × 2 .5 ) + (.5 × 5 ) + (1 × 6 .5 ) = 5 .41meters
.3 + .5 + 1
Mean-Max Method: (6 + 7) / 2 = 6.5meters
""
Defuzzification Methods
Three other popular methods are available
because of their appearance in some
applications:
5)The Center of Sums,
6)Center of Largest Area,
7)First of Maxima Methods
"#
Defuzzification Methods
5)Center of sums Method
Faster than any defuzzification method
Involves algebraic sum of individual output fuzzy sets,
instead of their union
Drawback: intersecting areas are added twice.
³ z ¦k =1 µC (z )dz
n
z* =
z
~k
³¦
z
n
k =1
µC ( z )dz
~k
It is similar to the weighted average method, but the
weights are the areas, instead of individual membership
values.
"4
Defuzzification Methods
6) Center of largest area: If the output fuzzy set has at
least two convex sub regions, then the center of gravity
(i.e., z‫ כ‬is calculated using the centroid method) of the
convex fuzzy sub region with the largest area is used to
obtain the defuzzified value z‫ כ‬of the output
"$
7) First (or last) of maxima: This method uses the
overall output or union of all individual output fuzzy sets
Ck to determine the smallest value of the domain with
maximized membership degree in Ck.
"%
džĂŵƉůĞ͗ ' - - 5 ' 8 ' ' - 5 5 ) - . -58 8 5 ! 5 & 1
.ĐĞŶƚĞƌŽĨƐƵŵƐŵĞƚŚŽĚ1 5 - -5
#/
;ϮͿ ĐĞŶƚĞƌ ŽĨ ůĂƌŐĞƐƚ ĂƌĞĂ 1 ,- -58 )5 - 7 78 nj‫ כ‬E ͘ϵͿ ĂƐ ƚŚĞ ĐĞŶƚƌŽŝĚ ŵĞƚŚŽĚ - ) 8 7
! nj.E#5 njE47
#.
& ( • ' - '
5 5 ' ' 5F - ) )
• ' -) ' '5; 5
5 - '5
- 5 '
-
• ' -) - ;;) )
#
& ( • 6 - - – - 85 5 -' 5 5 - 6 - ' 6 5
5
' -
6 :
6 : ./-
#/4/$/%/.//ƒ
'5;
& ( 5
#!
• 6 - - – - 85 5 -' 5 5 - 6 - 6
7
6 - 7
7
' 6 5
6
7
7 7-7 77@7
2./2"/"./5 - ;;) )
#
" & • - ƚĞŵƉ - <ǁŝŶĚͺƐƉĞĞĚ - ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ 6; ) ƚĞŵƉ ' <ǁŝŶĚͺƐƉĞĞĚ 6 :
- ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ ; ) ƚĞŵƉ =0ƚĞŵƉ ' - ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ ;- #
" & - 5
' Ϭ
Ϭ͘ϯϱ
Ϭ͘ϲ
Ϭ
-
Ϭ
Ϭ͘ϰ 6 :
Ϭ
Ϭ͘ϱϱ
6 : #/4/$/%/.//ƒ
E$4ƒ
./-
'5;
5 E%-
##
" & 5
' Ϭ
Ϭ͘ϯϱ
Ϭ
• - /
/7
ƚĞŵƉ - <ǁŝŶĚͺƐƉĞĞĚ - ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ 6; ) /7#
/
-
Ϭ͘ϲ
Ϭ
/7
ƚĞŵƉ ' <ǁŝŶĚͺƐƉĞĞĚ 6 : - ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ ; ) /7
Ϭ͘ϰ
/7(
ƚĞŵƉ =0ƚĞŵƉ ' /7#
- ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ ;- 6 :
Ϭ
Ϭ͘ϱϱ
#4
/7#
" & 6
7
- 7
7
Ϭ͘ϲ
Ϭ
Ϭ͘ϱϱ
Ϭ
• - /
/7
ƚĞŵƉ - <ǁŝŶĚͺƐƉĞĞĚ 6
7
Ϭ
- ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ 6; ) /7#
/
/7
ƚĞŵƉ ' <ǁŝŶĚͺƐƉĞĞĚ 6 :
- ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ ; ) /7
/7(
/7#
ƚĞŵƉ =0ƚĞŵƉ ' - ĐŚĂŶŐĞͺŝŶͺǀĂůǀĞ ;- /7#
#$
" & • 5 - 6
7
Ϭ
- 7
7
Ϭ͘ϲ
Ϭ
Ϭ͘ϱϱ
6
7
Ϭ
7#
7
#%
Download