PLT 328 ROBOTICS CONTROL CHAPTER 2 FUZZY LOGIC
PLT 328 ROBOTICS CONTROL CHAPTER 2: FUZZY LOGIC CONTROL
Rule extraction �The fuzzy rule-based system uses IF–THEN rule-based system y = low, Sky color = blue, �Three general forms: Climate = hot a=5 (1) Assignment statements p=q+r Temperature = high (2) Conditional statements The assignment statement is found (3) Unconditional statements to restrict the value of a variable to a specific equality. Rule 1: IF condition C 1 THEN restriction R 1 Rule 2: IF condition C 2 THEN restriction R 2. . . Rule n: IF condition Cn THEN restriction Rn If x = y Then both are equal, If Mark > 50 Then pass, If Speed > 1, 500 Then stop. These statements can be said as fuzzy conditional statements, such as If condition C Then restriction F
Fuzzy Inference Methods �The most important two types of fuzzy inference method 1. Mamdani’s fuzzy (Mamdani and Assilian (1975)). 2. Sugeno method (Sugeno (1985)). �Mamdani use fuzzy sets as rule consequent �Sugeno employ linear functions of input variables as rule consequent.
Mamdani method �The fuzzy set for each output variable that needs defuzzification. . �The Mamdani-style fuzzy inference process is performed in four steps: 1. Fuzzification of the input variables 2. Rule evaluation (inference) 3. Aggregation of the rule outputs (composition) 4. Defuzzification
Mamdani method (Cont) �Advantages: • It is intuitive. • It has widespread acceptance. • It is well suited to human input
Sugeno method �have a fuzzy antecedent part and functional consequent �typical fuzzy rule in a Sugeno fuzzy model has the format: IF x is A and y is B THEN z = f(x, y), Fuzzy set Nonfuzzy set
Sugeno method (Cont) �Advantages • It is computationally efficient. • It works well with linear techniques (e. g. , PID control). • It works well with optimization and adaptive techniques. • It has guaranteed continuity of the output surface. • It is well suited to mathematical analysis.
Fuzzy Disjunction �A B max(A, B) �A B = C "Quality C is the disjunction of Quality A and B" (A B = C) (C = 0. 75) 2/9/2004 Fuzzy Logic 8
Fuzzy Conjunction �A B min(A, B) �A B = C "Quality C is the conjunction of Quality A and B" (A B = C) (C = 0. 375) 2/9/2004 Fuzzy Logic 9
Fuzzy Conjunction (Example) Calculate A B given that A is. 4 and B is 20 Determine degrees of membership: A = 0. 7 B = 0. 9 Apply Fuzzy AND A B = min(A, B) = 0. 7 2/9/2004 Fuzzy Logic 10
Fuzzy Inference �The ‘AND’ statement in the rules translates to a min operation �Ex: Given d=1. 5, ɸ = -13° IF d is S AND ɸ is N, THEN V is F
Fuzzy Inference (cont) �The ‘OR’ statement in the rules translates to a max operation �Ex: Given d=1. 5, ɸ = -13° �IF d is S OR ɸ is N, THEN V is F
Input 1 : angle - negative (N), zero (Z) and positive (P). Input 2: distance - short (S), intermediate (I) and long (L). Output: speed - slow (Sl), medium (M)and fast (F). Sketch/plot the oputput for: �Rule 1: If angle is N and distance is S, then speed is Sl
�Rule 3: If angle is N or distance is L, then speed is F �Rule 5: If angle is not Z and distance is I, then speed is M
�Rule 7: If angle is not P or distance is S, then speed is Sl �Rule 9: If angle is P and distance is L, then speed is not F
Defuzzification �Convert fuzzy grade to Crisp output
Defuzzification – Centroid method �Centroid Method: the most prevalent and �physically appealing of all the defuzzification �methods [Sugeno, 1985; Lee, 1990] � Often called: • Center of area • Center of gravity
Defuzzification – Max-membership principle �Also known as height method
Defuzzification - Weighted average method �Valid for symmetrical output membership functions �Formed by weighting each functions in the output by its respective maximum membership value
Defuzzification – Mean-max membership �Middle of maxima �Maximum membership is a plateau
Defuzzification – Example �Find an estimate crisp output from the following � 3 membership functions for � 1 - Centroid � 2 – Weighted average � 3 – Mean-max membership
Centroid
Weighted Average
Mean -max
Example of Fuzzy Inference System �SMART FARMING WITH FUZZY INFERENCE SYSTEM Crips output
Process
Input variables
Membership function
Output variable
Rules of extraction
Output
Application fuzzy on GUI
Exercise 1 (Final exam 2017)
Exercise 2 (Final exam 2018)
Answer
Final exam 2019
- Slides: 43