PLT 328 ROBOTICS CONTROL CHAPTER 2 FUZZY LOGIC
PLT 328 ROBOTICS CONTROL CHAPTER 2: FUZZY LOGIC CONTROL
Objectives �To understand the importance of fuzzy logic control in decision making �To investigate the process of fuzzy inference logic �To analyse and design robot arm control through fuzzy logic principles
WHAT IS FUZZY LOGIC? Definition of fuzzy Fuzzy – “not clear, distinct, or precise; blurred” Definition of fuzzy logic A form of knowledge representation suitable for notions that cannot be defined precisely, but which depend upon their contexts.
Cont § What is Fuzzy Logic? § Problem-solving control system methodology § Linguistic or "fuzzy" variables § Example: IF (process is too hot) AND (process is heating rapidly) THEN (cool the process quickly) Advantages § § Uses imprecise language Inherently robust Fails safely Modified and tweaked easily Disadvantages §Operator's experience required §System complexity
TRADITIONAL REPRESENTATION OF LOGIC Slow Speed = 0 bool speed; get the speed if ( speed == 0) { // speed is slow } else { // speed is fast } Fast Speed = 1
FUZZY LOGIC REPRESENTATION For every problem must represent in terms of fuzzy sets. What are fuzzy sets? Slowest [ 0. 0 – 0. 25 ] Slow [ 0. 25 – 0. 50 ] Fast [ 0. 50 – 0. 75 ] Fastest [ 0. 75 – 1. 00 ]
FUZZY LOGIC REPRESENTATION CONT. Slowest Slow Fast float speed; get the speed if ((speed >= 0. 0)&&(speed < 0. 25)) { // speed is slowest } else if ((speed >= 0. 25)&&(speed < 0. 5)) { // speed is slow } else if ((speed >= 0. 5)&&(speed < 0. 75)) { // speed is fast } else // speed >= 0. 75 && speed < 1. 0 { // speed is fastest } Fastest
ORIGINS OF FUZZY LOGIC Traces back to Ancient Greece Lotfi Asker Zadeh ( 1965 ) First to publish ideas of fuzzy logic. Professor Toshire Terano ( 1972 ) Organized the world's first working group on fuzzy systems. F. L. Smidth & Co. ( 1980 ) First to market fuzzy expert systems.
Fuzzy Set Theory Conventional theory 38. 7°C 38°C 40. 1°C 41. 4°C Fuzzy set theory 42°C 39. 3°C “Strong Fever” 37. 2°C 38. 7°C 38°C 40. 1°C 39. 3°C “More-or-Less” Rather Than “Either-Or” ! © INFORM 1990 -1998 41. 4°C 42°C “Strong Fever” 37. 2°C Slide 9
Example �Humans say things like "If it is sunny and warm today, I will drive fast" �Fuzzy Linguistic Variables: �Temp: {Freezing, Cool, Warm, Hot} v. Question: What is the temperature? v. Answer: It is warm. v. Question: How warm is it?
Example (cont) �How cool is 36 F° ? �It is 30% Cool and 70% Freezing 0. 7 0. 3 2/9/2004 Fuzzy Logic 11
Fuzzy Logic Controller Rule extraction Crisp inputs Fuzzification process Defuzzification process Inference Fuzzy sets of input variables Output fuzzy set Crisp outputs
Fuzzification �The process where the crisp quantities are converted to fuzzy (crisp to fuzzy) by using set of Membership Functions (MF) �MF- graphical representation of magnitude of participation of each input (min 0, max 1) �Types of membership
Fuzzification (Example) Let the linguistic variables are: Very light – w ≤ 30 Light – 30 < w ≤ 45 Average – 45 < w ≤ 60 Heavy – 60 < w ≤ 75 Very heavy – w > 75 By using triangular form, plot the fuzzy membership function for the “weight of people. ”
Fuzzification (Cont) �How do we use fuzzy membership functions in predicate logic? �Fuzzy logic Connectives: �Fuzzy Conjunction, �Fuzzy Disjunction, �Operate on degrees of membership in fuzzy sets
Fuzzification (Example) let A denotes age in years. (1) Very young (vy) – A < 15 (2) Young (y) – 12 ≤ A < 30 (3) Middle aged (m) – 25 ≤ A < 50 (4) Old (o) – 45 ≤ A < 65 (5) Very old (vo) – 60 < A By using triangular form, plot the fuzzy membership function for the age of people.
Calculate the maximum value �To map the input variables into fuzzy numbers: �Example : By using triangular form, plot the fuzzy membership function for the fuzzy set of distance : -range from 3 to 12 The fuzzy set : Very slow, Slow, Medium, Fast, Very fast
Example
Example 2 An avoid-obstacle robot is controlled based on two inputs of sonar-elapse time and distance sensor. The output of the controller is the linear velocity of robot. The input variable of sonar-elapse time is partitioned in the Universe of Discourse (Uo. D) [0 45] which is defined by three membership functions which are slow (S), medium (M) and fast (F). The input variable of distance sensor is partitioned in the Universe of Discourse (Uo. D) [0 30] which is defined by three membership functions which are zero distance (ZD), middle distance (MD) and large distance (LD). The output variable of linear velocity is partitioned in the Universe of Discourse (Uo. D) [-20 40] which is defined by five membership functions which are negative (N), zero (Z) and positive small (PS), positive medium (P) and positive (P).
Ans
Exercise 1 A mobile robot is controlled based on the distance d and the angle orientation ɸ. The output of the controller are the speed of the right and the left wheels, V. The variable distance d is partitioned in the Universe of Discourse (Uo. D) [0 10 cm] which is defined by three membership functions which are short (S), intermediate (I) dan long (L). The angle ɸ should be partitioned in the Uo. D [− 30°] and defined by three membership functions which are negative (N), zero (Z) and positive (P). For speed V is partitioned in the Uo. D [0 100] and defined by five memberships functions are determined which are zero (Zr), far (F), medium (M), big (B), and very big (VB). Draw suitable triangular form of fuzzy membership functions with respect to Uo. D for distance d, angle ɸ and speed V.
Ans Input : distance Input : orientation Output : speed
- Slides: 26