Ch03

611 views

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
611
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
24
Comments
0
Likes
0
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.
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • 02/19/11
  • Ch03

    1. 1. Chapter 3: Fuzzy Rules and Fuzzy Reasoning <ul><li>J.-S. Roger Jang ( 張智星 ) </li></ul><ul><li>CS Dept., Tsing Hua Univ., Taiwan </li></ul><ul><li>Modified by Dan Simon </li></ul><ul><li>Cleveland State University </li></ul>Fuzzy Rules and Fuzzy Reasoning
    2. 2. Outline <ul><li>Extension principle </li></ul><ul><li>Fuzzy relations </li></ul><ul><li>Fuzzy if-then rules </li></ul><ul><li>Compositional rule of inference </li></ul><ul><li>Fuzzy reasoning </li></ul>
    3. 3. Extension Principle A is a fuzzy set on X : The image of A under f(.) is a fuzzy set B: where y i = f(x i ) , for i = 1 to n . If f(.) is a many-to-one mapping, then
    4. 4. Example: Extension Principle 0 1 2 3 0 1 4 9 0 1 2 3 0 1 4 9 -1 y = x 2  (x)  (x)  (y)  (y) Example 1 Example 2
    5. 5. Fuzzy Relations <ul><li>A fuzzy relation R is a 2D MF: </li></ul><ul><li>Examples: </li></ul><ul><ul><li>x is close to y (x and y are numbers) </li></ul></ul><ul><ul><li>x depends on y (x and y are events) </li></ul></ul><ul><ul><li>x and y look alike (x and y are persons or objects) </li></ul></ul><ul><ul><li>If x is large, then y is small (x is an observed instrument reading and y is a corresponding control action) </li></ul></ul>
    6. 6. Example: x is close to y
    7. 7. Example: X is close to Y
    8. 8. Max-Min Composition <ul><li>The max-min composition of two fuzzy relations R 1 (defined on X and Y ) and R 2 (defined on Y and Z ): </li></ul><ul><ul><li>Associativity: </li></ul></ul><ul><ul><li>Distributivity over union: </li></ul></ul><ul><ul><li>Weak distributivity over intersection: </li></ul></ul><ul><ul><li>Monotonicity: </li></ul></ul>(max) (min)
    9. 9. Max-Star Composition <ul><li>Max-product composition: </li></ul><ul><li>In general, we have max * compositions: </li></ul><ul><li>where * is a T-norm operator. </li></ul>
    10. 10. Example 3.4 – Max * Compositions R 1 : x is relevant to y R 2 : y is relevant to z How relevant is x=2 to z=a? y=  y=  y=  y=  x=1 0.1 0.3 0.5 0.7 x=2 0.4 0.2 0.8 0.9 x=3 0.6 0.8 0.3 0.2 z=a z=b y=  0.9 0.1 y=  0.2 0.3 y=  0.5 0.6 y=  0.7 0.2
    11. 11. Example 3.4 (cont’d.) 1 2 3    a b  0.4 0.2 0.8 0.9 0.9 0.2 0.5 0.7 x y z
    12. 12. Linguistic Variables <ul><li>A numerical variable takes numerical values: </li></ul><ul><li>Age = 65 </li></ul><ul><li>A linguistic variables takes linguistic values: </li></ul><ul><li>Age is old </li></ul><ul><li>A linguistic value is a fuzzy set. </li></ul><ul><li>All linguistic values form a term set (set of terms): </li></ul><ul><ul><li>T(age) = {young, not young, very young, ... </li></ul></ul><ul><ul><li>middle aged, not middle aged, ... </li></ul></ul><ul><ul><li>old, not old, very old, more or less old, ... </li></ul></ul><ul><ul><li>not very young and not very old, ...} </li></ul></ul>
    13. 13. Operations on Linguistic Values Concentration: Dilation: Contrast intensification: intensif.m (very) (more or less)
    14. 14. Linguistic Values (Terms) complv.m How are these derived from the above MFs?
    15. 15. Fuzzy If-Then Rules <ul><li>General format: </li></ul><ul><ul><li>If x is A then y is B </li></ul></ul><ul><ul><li>This is interpreted as a fuzzy set </li></ul></ul><ul><li>Examples: </li></ul><ul><ul><li>If pressure is high, then volume is small. </li></ul></ul><ul><ul><li>If the road is slippery, then driving is dangerous. </li></ul></ul><ul><ul><li>If a tomato is red, then it is ripe. </li></ul></ul><ul><ul><li>If the speed is high, then apply the brake a little. </li></ul></ul>
    16. 16. Fuzzy If-Then Rules A is coupled with B: (x is A)  (y is B) A A B B A entails B: (x is not A)  (y is B) Two ways to interpret “If x is A then y is B” y x x y
    17. 17. Fuzzy If-Then Rules <ul><li>Example: </li></ul><ul><li>if (profession is athlete) then (fitness is high) </li></ul><ul><li>Coupling: Athletes, and only athletes, have high fitness. </li></ul><ul><li>The “if” statement (antecedent) is a necessary and sufficient condition. </li></ul><ul><li>Entailing: Athletes have high fitness, and non-athletes may or may not have high fitness. </li></ul><ul><li>The “if” statement (antecedent) is a sufficient but not necessary condition. </li></ul>
    18. 18. Fuzzy If-Then Rules <ul><li>Two ways to interpret “If x is A then y is B”: </li></ul><ul><ul><li>A coupled with B: ( A and B – T-norm) </li></ul></ul><ul><ul><li>A entails B: ( not A or B ) </li></ul></ul><ul><ul><ul><li>Material implication </li></ul></ul></ul><ul><ul><ul><li>Propositional calculus </li></ul></ul></ul><ul><ul><ul><li>Extended propositional calculus </li></ul></ul></ul><ul><ul><ul><li>Generalization of modus ponens </li></ul></ul></ul>
    19. 19. Fuzzy If-Then Rules <ul><li>Fuzzy implication </li></ul>fuzimp.m A coupled with B (bell-shaped MFs, T-norm operators) Example: only fit athletes satisfy the rule
    20. 20. Fuzzy If-Then Rules A entails B (bell-shaped MFs) Arithmetic rule: (x is not A)  (y is B)  (1 – x) + y Example: everyone except non-fit athletes satisfies the rule fuzimp.m
    21. 21. Compositional Rule of Inference <ul><li>Derivation of y = b from x = a and y = f(x) : </li></ul>a and b : points y = f(x) : a curve Crisp : if x = a, then y=b a b y x x y a and b : intervals y = f(x) : interval-valued function Fuzzy : if (x is a) then (y is b) a b y = f(x) y = f(x)
    22. 22. Compositional Rule of Inference <ul><li>A is a fuzzy set of x and y = f(x) is a fuzzy relation: </li></ul>cri.m
    23. 23. Fuzzy Reasoning <ul><li>Single rule with single antecedent </li></ul><ul><ul><li>Rule: if x is A then y is B </li></ul></ul><ul><ul><li>Premise: x is A’, where A’ is close to A </li></ul></ul><ul><ul><li>Conclusion: y is B’ </li></ul></ul><ul><li>Use max of intersection between A and A’ to get B’ </li></ul>A X w A’ B Y x is A’ B’ Y A’ X y is B’
    24. 24. Fuzzy Reasoning <ul><li>Single rule with multiple antecedents </li></ul><ul><ul><li>Rule: if x is A and y is B then z is C </li></ul></ul><ul><ul><li>Premise: x is A’ and y is B’ </li></ul></ul><ul><ul><li>Conclusion: z is C’ </li></ul></ul><ul><li>Use min of (A  A’) and (B  B’) to get C’ </li></ul>A B X Y w A’ B’ C Z C’ Z X Y A’ B’ x is A’ y is B’ z is C’
    25. 25. Fuzzy Reasoning <ul><li>Multiple rules with multiple antecedents </li></ul><ul><ul><li>Rule 1: if x is A1 and y is B1 then z is C1 </li></ul></ul><ul><ul><li>Rule 2: if x is A2 and y is B2 then z is C2 </li></ul></ul><ul><ul><li>Premise: x is A’ and y is B’ </li></ul></ul><ul><ul><li>Conclusion: z is C’ </li></ul></ul><ul><li>Use previous slide to get C 1 ’ and C 2 ’ </li></ul><ul><li>Use max of C 1 ’ and C 2 ’ to get C’ (next slide) </li></ul>
    26. 26. Fuzzy Reasoning <ul><li>Multiple rules with multiple antecedents </li></ul>A 1 B 1 A 2 B 2 X X Y Y w 1 w 2 A’ A’ B’ B’ C 1 C 2 Z Z C’ Z X Y A’ B’ x is A’ y is B’ z is C’
    27. 27. Fuzzy Reasoning: MATLAB Demo <ul><li>>> ruleview mam21 (Matlab Fuzzy Logic Toolbox) </li></ul>
    28. 28. Other Variants <ul><li>Some terminology: </li></ul><ul><li>Degrees of compatibility (match between input variables and fuzzy input MFs) </li></ul><ul><li>Firing strength calculation (we used MIN) </li></ul><ul><li>Qualified (induced) MFs (combine firing strength with fuzzy outputs) </li></ul><ul><li>Overall output MF (we used MAX) </li></ul>

    ×