Upcoming SlideShare
Loading in …5
×

# Ch02

3,561 views

Published on

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
Your message goes here
• Be the first to comment

No Downloads
Views
Total views
3,561
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
117
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
• 02/19/11 ... In this talk, we are going to apply two neural network controller design techniques to fuzzy controllers, and construct the so-called on-line adaptive neuro-fuzzy controllers for nonlinear control systems. We are going to use MATLAB, SIMULINK and Handle Graphics to demonstrate the concept. So you can also get a preview of some of the features of the Fuzzy Logic Toolbox, or FLT, version 2.
• 02/19/11 Specifically, this is the outline of the talk. Wel start from the basics, introduce the concepts of fuzzy sets and membership functions. By using fuzzy sets, we can formulate fuzzy if-then rules, which are commonly used in our daily expressions. We can use a collection of fuzzy rules to describe a system behavior; this forms the fuzzy inference system, or fuzzy controller if used in control systems. In particular, we can can apply neural networks?learning method in a fuzzy inference system. A fuzzy inference system with learning capability is called ANFIS, stands for adaptive neuro-fuzzy inference system. Actually, ANFIS is already available in the current version of FLT, but it has certain restrictions. We are going to remove some of these restrictions in the next version of FLT. Most of all, we are going to have an on-line ANFIS block for SIMULINK; this block has on-line learning capability and it ideal for on-line adaptive neuro-fuzzy control applications. We will use this block in our demos; one is inverse learning and the other is feedback linearization.
• 02/19/11 A fuzzy set is a set with fuzzy boundary. Suppose that A is the set of tall people. In a conventional set, or crisp set, an element is either belong to not belong to a set; there nothing in between. Therefore to define a crisp set A, we need to find a number, say, 5??, such that for a person taller than this number, he or she is in the set of tall people. For a fuzzy version of set A, we allow the degree of belonging to vary between 0 and 1. Therefore for a person with height 5??, we can say that he or she is tall to the degree of 0.5. And for a 6-foot-high person, he or she is tall to the degree of .9. So everything is a matter of degree in fuzzy sets. If we plot the degree of belonging w.r.t. heights, the curve is called a membership function. Because of its smooth transition, a fuzzy set is a better representation of our mental model of all? Moreover, if a fuzzy set has a step-function-like membership function, it reduces to the common crisp set.
• 02/19/11 Here I like to emphasize some important properties of membership functions. First of all, it subjective measure; my membership function of all?is likely to be different from yours. Also it context sensitive. For example, I 5?1? and I considered pretty tall in Taiwan. But in the States, I only considered medium build, so may be only tall to the degree of .5. But if I an NBA player, Il be considered pretty short, cannot even do a slam dunk! So as you can see here, we have three different MFs for all?in different contexts. Although they are different, they do share some common characteristics --- for one thing, they are all monotonically increasing from 0 to 1. Because the membership function represents a subjective measure, it not probability function at all.
• Normal MF: MF(x) = 1 for at least one value of x Sum normal partition: Partition for which the sum of all MF(x) = 1 for all x \\in X Fuzzy singleton: MF(x) = 1 for x = x1, 0 for x ~= x1 Fuzzy number: fuzzy set which is normal and convex Bandwidth: domain over which MF(x) &gt;= 1/2 Symmetry: MF is an even function with respect to the center of its domain Open left: MF(x) -&gt; 1 as x-&gt; -inf, and MF(x) -&gt; 0 as x -&gt; +inf Open right: MF(x) -&gt; 0 as x -&gt; -inf, and MF(x) -&gt; 1 as x -&gt; +inf Closed: MF(x) -&gt; 0 as x -&gt; +/-inf 02/19/11
• Support: domain over which MF &gt; 0 Core: domain over which MF = 1 Crossover: points at which MF = 1/2 alpha-cut (alpha-level set): domain over which MF &gt;= alpha strong alpha-cut (strong alpha-level set): domain over which MF &gt; alpha 02/19/11
• Corrected by Dan Simon 02/19/11
• Bounded product: max(0, a+b-1) Drastic product: a if b=1, b if a=1, 0 if a &lt; 1 and b &lt; 1 02/19/11
• Algebraic sum: a+b-ab Bounded sum: min(1, a+b) Drastic sum: a if b=0, b if a=1, 1 if a&gt;0 and b&gt;0 02/19/11
• De Morgan&apos;s laws are rules relating the logical operators &amp;quot;and&amp;quot; and &amp;quot;or&amp;quot; in terms of each other via negation : P AND Q = NOT [ (NOT P) OR (NOT Q) ] P OR Q = NOT [ (NOT P) AND (NOT Q) ] 02/19/11
• 02/19/11
• ### Ch02

1. 1. Slides for Fuzzy Sets, Ch. 2 of Neuro-Fuzzy and Soft Computing <ul><li>J.-S. Roger Jang ( 張智星 ) </li></ul><ul><li>CS Dept., Tsing Hua Univ., Taiwan </li></ul><ul><li>http://www.cs.nthu.edu.tw/~jang </li></ul><ul><li>[email_address] </li></ul><ul><li>Modified by Dan Simon </li></ul><ul><li>Fall 2010 </li></ul>Neuro-Fuzzy and Soft Computing: Fuzzy Sets
2. 2. Fuzzy Sets: Outline <ul><li>Introduction </li></ul><ul><li>Basic definitions and terminology </li></ul><ul><li>Set-theoretic operations </li></ul><ul><li>MF formulation and parameterization </li></ul><ul><ul><li>MFs of one and two dimensions </li></ul></ul><ul><ul><li>Derivatives of parameterized MFs </li></ul></ul><ul><li>More on fuzzy union, intersection, and complement </li></ul><ul><ul><li>Fuzzy complement </li></ul></ul><ul><ul><li>Fuzzy intersection and union </li></ul></ul><ul><ul><li>Parameterized T-norm and T-conorm </li></ul></ul>
3. 3. A Case for Fuzzy Logic <ul><li>“ So far as the laws of mathematics refer to reality, they are not certain. And so far as they are certain, they do not refer to reality.” </li></ul><ul><li>- Albert Einstein </li></ul>
4. 4. Probability versus Fuzziness <ul><li>I am thinking of a random shape (circle, square, or triangle). What is the probability that I am thinking of a circle? </li></ul><ul><li>Which statement is more accurate? </li></ul><ul><li>It is probably a circle. </li></ul><ul><li>It is a fuzzy circle. </li></ul>
5. 5. <ul><li>Two similar but different situations: </li></ul><ul><li>There is a 50% chance that there is an apple in the fridge. </li></ul><ul><li>There is half of an apple in the fridge. </li></ul>Probability versus Fuzziness
6. 6. Paradoxes <ul><li>A heterological word is one that does not describe itself. For example, “long” is heterological, and “monosyllabic” is heterological. </li></ul><ul><li>Is “heterological” heterological? </li></ul>
7. 7. Paradoxes <ul><li>Bertrand Russell’s barber paradox (1901) </li></ul><ul><li>The barber shaves a man if and only if he does not shave himself. Who shaves the barber? … </li></ul><ul><li>S: The barber shaves himself </li></ul><ul><li>Use t(S) to denote the truth of S </li></ul><ul><li>S implies not-S, and not-S implies S </li></ul><ul><li>Therefore, t(S) = t(not-S) = 1 – t(S) </li></ul><ul><li>t(S) = 0.5 </li></ul><ul><li>Similarly, “heterological” is 50% heterological </li></ul>
8. 8. Paradoxes <ul><li>Sorites paradox: </li></ul><ul><li>Premise 1: One million grains of sand is a heap </li></ul><ul><li>Premise 2: A heap minus one grain is a heap </li></ul><ul><li>Question: Is one grain of sand a heap? </li></ul>Number of grains “ Heap-ness” 0 100%
9. 9. Fuzzy Sets <ul><li>Sets with fuzzy boundaries </li></ul>A = Set of tall people Membership function Heights 5’10’’ 6’2’’ .5 .9 Fuzzy set A 1.0 Heights 5’10’’ 1.0 Crisp set A
10. 10. Membership Functions (MFs) <ul><li>Characteristics of MFs: </li></ul><ul><ul><li>Subjective measures </li></ul></ul><ul><ul><li>Not probability functions </li></ul></ul>Membership Height 5’10’’ .5 .8 .1 “ tall” in Asia “ tall” in the US “ tall” in NBA
11. 11. Fuzzy Sets <ul><li>Formal definition: </li></ul><ul><ul><li>A fuzzy set A in X is expressed as a set of ordered pairs: </li></ul></ul>Universe or universe of discourse Fuzzy set Membership function (MF) A fuzzy set is totally characterized by a membership function (MF).
12. 12. Fuzzy Sets with Discrete Universes <ul><li>Fuzzy set C = “desirable city to live in” </li></ul><ul><ul><li>X = {SF, Boston, LA} (discrete and nonordered) </li></ul></ul><ul><ul><li>C = {(SF, 0.9), (Boston, 0.8), (LA, 0.6)} </li></ul></ul><ul><li>Fuzzy set A = “sensible number of children” </li></ul><ul><ul><li>X = {0, 1, 2, 3, 4, 5, 6} (discrete universe) </li></ul></ul><ul><ul><li>A = {(0, .1), (1, .3), (2, .7), (3, 1), (4, .6), (5, .2), (6, .1)} </li></ul></ul>
13. 13. Fuzzy Sets with Cont. Universes <ul><li>Fuzzy set B = “about 50 years old” </li></ul><ul><ul><li>X = Set of positive real numbers (continuous) </li></ul></ul><ul><ul><li>B = {(x,  B (x)) | x in X} </li></ul></ul>
14. 14. Alternative Notation <ul><li>A fuzzy set A can be alternatively denoted as follows: </li></ul>X is discrete X is continuous Note that  and integral signs stand for the union of membership grades; “/” stands for a marker and does not imply division.
15. 15. Fuzzy Partition <ul><li>Fuzzy partitions formed by the linguistic values “young”, “middle aged”, and “old”: </li></ul>lingmf.m
16. 16. More Definitions <ul><li>Support </li></ul><ul><li>Core </li></ul><ul><li>Normality </li></ul><ul><li>Crossover points </li></ul><ul><li>Fuzzy singleton </li></ul><ul><li> -cut, strong  -cut </li></ul><ul><li>Convexity </li></ul><ul><li>Fuzzy numbers </li></ul><ul><li>Bandwidth </li></ul><ul><li>Symmetricity </li></ul><ul><li>Open left or right, closed </li></ul>
17. 17. MF Terminology MF X .5 1 0 Core Crossover points Support  - cut  These expressions are all defined in terms of x .
18. 18. Convexity of Fuzzy Sets <ul><li>A fuzzy set A is convex if for any  in [0, 1], </li></ul>A is convex if all its  -cuts are convex . (How do you measure the convexity of an  -cut?) convexmf.m
19. 19. Set-Theoretic Operations <ul><li>Subset: </li></ul><ul><li>Complement: </li></ul><ul><li>Union: </li></ul><ul><li>Intersection: </li></ul>
20. 20. Set-Theoretic Operations subset.m fuzsetop.m
21. 21. MF Formulation <ul><li>Triangular MF: </li></ul>Trapezoidal MF: Generalized bell MF: Gaussian MF:
22. 22. MF Formulation disp_mf.m
23. 23. MF Formulation <ul><li>Sigmoidal MF: </li></ul>Extensions: <ul><ul><li>Abs. difference of two sig. MF </li></ul></ul><ul><ul><li>(open right MFs) </li></ul></ul><ul><ul><li>Product </li></ul></ul><ul><ul><li>of two sig. MFs </li></ul></ul>disp_sig.m c = crossover point a controls the slope, and right/left
24. 24. MF Formulation <ul><li>L-R (left-right) MF: </li></ul>Example: difflr.m c=65 a=60 b=10 c=25 a=10 b=40
25. 25. Cylindrical Extension Base set A Cylindrical Ext. of A cyl_ext.m
26. 26. 2D MF Projection Two-dimensional MF Projection onto X Projection onto Y project.m
27. 27. 2D Membership Functions 2dmf.m
28. 28. Fuzzy Complement N ( a ) : [0,1]  [0,1] <ul><li>General requirements of fuzzy complement: </li></ul><ul><ul><li>Boundary: N(0)=1 and N(1) = 0 </li></ul></ul><ul><ul><li>Monotonicity: N(a) > N(b) if a < b </li></ul></ul><ul><ul><li>Involution: N(N(a)) = a </li></ul></ul><ul><li>Two types of fuzzy complements: </li></ul><ul><ul><li>Sugeno’s complement (Michio Sugeno): </li></ul></ul><ul><ul><li>Yager’s complement (Ron Yager, Iona College): </li></ul></ul>
29. 29. Fuzzy Complement negation.m Sugeno’s complement: Yager’s complement:
30. 30. Fuzzy Intersection: T-norm <ul><li>Analogous to AND, and INTERSECTION </li></ul><ul><li>Basic requirements: </li></ul><ul><ul><li>Boundary: T(0, 0) = 0, T(a, 1) = T(1, a) = a </li></ul></ul><ul><ul><li>Monotonicity: T(a, b)  T(c, d) if a  c and b  d </li></ul></ul><ul><ul><li>Commutativity: T(a, b) = T(b, a) </li></ul></ul><ul><ul><li>Associativity: T(a, T(b, c)) = T(T(a, b), c) </li></ul></ul><ul><li>Four examples (page 37): </li></ul><ul><ul><li>Minimum: T m (a, b) </li></ul></ul><ul><ul><li>Algebraic product: T a (a, b) </li></ul></ul><ul><ul><li>Bounded product: T b (a, b) </li></ul></ul><ul><ul><li>Drastic product: T d (a, b) </li></ul></ul>
31. 31. T-norm Operator Minimum: T m (a, b) Algebraic product: T a (a, b) Bounded product: T b (a, b) Drastic product: T d (a, b) tnorm.m
32. 32. Fuzzy Union: T-conorm or S-norm <ul><li>Analogous to OR, and UNION </li></ul><ul><li>Basic requirements: </li></ul><ul><ul><li>Boundary: S(1, 1) = 1, S(a, 0) = S(0, a) = a </li></ul></ul><ul><ul><li>Monotonicity: S(a, b)  S(c, d) if a  c and b  d </li></ul></ul><ul><ul><li>Commutativity: S(a, b) = S(b, a) </li></ul></ul><ul><ul><li>Associativity: S(a, S(b, c)) = S(S(a, b), c) </li></ul></ul><ul><li>Four examples (page 38): </li></ul><ul><ul><li>Maximum: S m (a, b) </li></ul></ul><ul><ul><li>Algebraic sum: S a (a, b) </li></ul></ul><ul><ul><li>Bounded sum: S b (a, b) </li></ul></ul><ul><ul><li>Drastic sum: S d (a, b) </li></ul></ul>
33. 33. T-conorm or S-norm tconorm.m Maximum: S m (a, b) Algebraic sum: S a (a, b) Bounded sum: S b (a, b) Drastic sum: S d (a, b)
34. 34. Generalized DeMorgan’s Law <ul><li>T-norms and T-conorms are duals which support the generalization of DeMorgan’s law: </li></ul><ul><ul><li>T(a, b) = N(S(N(a), N(b))): a and b = not(not a, or not b) </li></ul></ul><ul><ul><li>S(a, b) = N(T(N(a), N(b))): a or b = not(not a, and not b) </li></ul></ul>T m (a, b) T a (a, b) T b (a, b) T d (a, b) S m (a, b) S a (a, b) S b (a, b) S d (a, b)
35. 35. Parameterized T-norm and S-norm <ul><li>Parameterized T-norms and dual T-conorms have been proposed by several researchers: </li></ul><ul><ul><li>Yager </li></ul></ul><ul><ul><li>Schweizer and Sklar </li></ul></ul><ul><ul><li>Dubois and Prade </li></ul></ul><ul><ul><li>Hamacher </li></ul></ul><ul><ul><li>Frank </li></ul></ul><ul><ul><li>Sugeno </li></ul></ul><ul><ul><li>Dombi </li></ul></ul>