This file is raw output from pdftotext and may not be ideal for distribution. If you are a maintainer for Hackipedia, please sit down when you have time and clean this text version up. Source PDF: /mnt/fw-js/docs/Algorithms/Fuzzy logic/Introduction to Fuzzy Logic Control with Application to Mobile Robotics.pdf Like all conversions the text below should be fully readable as UTF-8 unicode text. --------------------------------------------------------------- Introduction to Fuzzy Logic Control With Application to Mobile Robotics Edward Tunstel, Tanya Lippincott and Mo Jamshidi NASA Center for Autonomous Control Engineering Department of Electrical and Computer Engineering University of New Mexico Albuquerque, NM 87131 ABSTRACT: 2. FUZZY SET THEORY A brief introduction to fuzzy set theory and its application to control systems is provided. Fuzzy In classical set theory a set, C, is comprised of sets do not have sharp boundaries and are therefore elements, x ∈ U, whose membership in C is described able to represent linguistic terms which may be by the characteristic, or membership function considered "gray" or vague. Aspects of fuzzy set theory and fuzzy logic are highlighted in order to µ C ( x ) : U → {0, 1} (1) illustrate distinct advantages, as contrasted to classical sets and logic, for use in control systems. where U is the universe of discourse, a collection of Using a mobile robot navigation problem as an elements that can be continuous or discrete. The example, the synthesis of a fuzzy control system is membership function µC(x) implies that the element x examined.. either belongs to the set (µC(x) = 1) or it does not (µC(x) = 0). In fuzzy set theory a fuzzy set, F , is ˜ Keywords: mobile robots, fuzzy logic control, fuzzy described by the membership function sets, rover, autonomy µ F ( x ) : U → [0,1] ˜ (2) 1. INTRODUCTION where elements, x ∈ U, have degrees of membership in F with any value between 0 and 1 inclusive. Note ˜ "The world is not black and white but only shades of that a fuzzy membership function is a so-called gray." In 1965, Zadeh [1] wrote a seminal paper in possibility function and not a probability function. A which he introduced fuzzy sets, sets with unsharp membership value of zero corresponds to the case boundaries. These sets are considered gray areas where the element is definitely not a member of the rather than black and white in contrast to classical fuzzy set. A membership value of one corresponds to sets which form the basis of binary or Boolean logic. elements with full membership in the fuzzy set. Fuzzy set theory and fuzzy logic are convenient tools Membership values in the open interval (0, 1) for handling uncertain, imprecise, or unmodeled data correspond to partial membership and indicate a in intelligent decision-making systems. It has also measure of uncertainty or imprecision associated with found many applications in the areas of information the element. sciences and control systems. A comparative example of a crisp set and a fuzzy In this paper, fundamental concepts of fuzzy sets set can be illustrated by using the linguistic term and logic are briefly presented. Its utility for ÔfarÕ in reference to relative distance between objects. synthesis of control systems is discussed in the The term ÔfarÕ can take on different meanings to context of an application to mobile robot motion different individuals, and in different contexts. For control. In mobile robotics, a fuzzy logic based illustrative purposes, let ÔfarÕ be 2 meters control system has the advantage that it allows the (approximately 2 meters in the fuzzy set case). A intuitive nature of collision-free navigation to be graphical representation of a crisp set and a fuzzy set easily modeled using linguistic terminology. Due to for ÔfarÕ is shown in Figure 1. the relative computational simplicity of fuzzy rule- Membership functions can be defined as functions based systems, intelligent decisions can be made in which take on a variety of possible shapes determined real-time, thus allowing for uninterrupted robot at the discretion of the fuzzy system designer. motion. Moreover, accurate (expensive) sensors and Commonly used function shapes (fuzzy logic detailed models of the environment are not absolutely terminology given in parentheses) include triangular necessary for autonomous navigation [2]. (Λ), trapezoidal (Π), delta (singleton), positively sloped ramp (Γ), and negatively sloped ramp (L). . B.S. degree in electrical engineering, University of These are shown in Figure 2. The ramp functions are New Mexico. Currently pursuing M.S. degree, electrical engineering, with an expected graduation date of May, sometimes referred to as right shoulders (Γ) and left 1997; Networks and Control Systems concentration shoulders (L). with emphasis on fuzzy control of mobile robots. Degree of membership The operator in this equation is referred to as the min-operator represented by the logical term AND. 1 For details on complements and other fuzzy logical 0.75 operations see [1] or [3]. 0.5 Consider the Cartesian product of two universes U 0.25 and V defined by 0 0 1 2 3 4m U × V = {(u, v) | u ∈ U ; v ∈ V} Distance to object a. Crisp set which combines elements of U and V in a set of ordered pairs. A fuzzy relation R is a mapping: Degree of membership 1 0.75 R : U × V → [0,1] where 0.5 0.25 µ R (u, v) = µ ˜ (u, v) = min[ µ ˜ (u), µ ˜ (v)] (5) A× B ˜ A B 0 0 1 2 3 4m Distance to object The composition of two relations, R(u,v) and S(v,w), b. Fuzzy set is denoted by T = R o S . Its membership value can be determined by the following expression Figure 1 Graphical representations of ‘far’. µ T (u, w ) = max[ µ R (u, v) • µS (v, w )] (6) which is called the max-product composition. Another common compositional rule of inference is the max-min composition [3]. Fuzzy relations can be represented linguistically by natural language statements in the form of fuzzy if- then rules. A collection of such rules is referred to as a rule-base. Accompanied by suitable membership functions, the rule-base is a core ingredient of any fuzzy rule-based expert system. Π Λ Singleton Γ L 3. FUZZY LOGIC CONTROL Figure 2 Common fuzzy membership functions. Fuzzy logic based controllers are expert control systems that smoothly interpolate between rules. Fuzzy sets, like classical crisp sets, are subject to Rules fire to continuous degrees and the multiple set operations such as union, intersection, and resultant actions are combined into an interpolated complement [1] which are used to express logic result. Processing of uncertain information and statements or propositions. The union of two fuzzy savings of energy using common-sense rules and sets A and B with membership functions µ A ( x ) and ˜ ˜ ˜ natural language statements are the bases for fuzzy logic control. As pointed out by Lee [4], fuzzy logic µ ˜ ( x ) is a fuzzy set C = A ∪ B , whose membership ˜ ˜ ˜ controllers provide a means of transforming the B function is related to those of A and B as follows: ˜ ˜ linguistic control strategy based on expert knowledge into an automatic control strategy. µ ˜ ( x) = µ ˜ = max[ µ ˜ ( x ), µ ˜ ( x )] (3) Fuzzy controller rule-bases typically take the ˜ ( x) A∪ B C A B form of a set of if-then rules whose antecedents (ÔifÕ parts) and consequents (ÔthenÕ parts) are propositions The operator in this equation is referred to as the involving fuzzy membership functions. If X and Y are max-operator and is represented by the logical term input and output universes of discourse of a fuzzy OR. The intersection of A and B is a fuzzy set ˜ ˜ controller with a rule-base of size n, the usual if-then D = A ∩ B whose membership function is given by: ˜ ˜ ˜ rule takes the following form µ D ( x) = µ ˜ ( x ) = min[ µ ˜ ( x ), µ ˜ ( x )] (4) ˜ ˜ ˜ A∩ B ˜ A B IF x is A i THEN y is Bi discourse for range spans the interval [0m, 4m]. The where x and y represent input and output fuzzy goal direction input covers a universe spanning ±π linguistic variables, respectively, and A i ∈ X and ˜ radians. The actuator control, or steering direction, covers ±π/2 radians. The corresponding fuzzy sets are B ∈ Y (1 ≤ i ≤ n) are fuzzy sets representing ˜ i shown in Figure 3 where the labels of Figure 3b are linguistic values of x and y. Typically in robotics listed in Table I. applications, the input x refers to sensory data and y to actuator control signals. In general, the rule Degree of Membership antecedent consisting of the proposition "x is A i "˜ Very Close Far 1 could be replaced by a conjunction of similar 0.75 close propositions; the same holds for the rule consequent 0.5 ˜ "y is Bi ". We can formally define a fuzzy system . 0.25 behavior (rule-base) as a function (B), from sensor 0 space (S) to actuator space (A), i.e. B : S → A , where 0.0 0.17 0.5 1.0 2.0 3.0 4.0 the universes of discourse for S and A are such that Distance in Meters n n a. Side Sensor S ⊂ ℜ and A ⊂ ℜ . Embodied in this function is a fuzzy relation between fuzzy sets defined over S and Degree of Membership fuzzy sets over A. This fuzzy relation is the actual 1 I II III rule-base of the fuzzy control system. 0.75 3.1 Mobile robot application 0.5 0.25 Mobile robots are typically equipped with several 0 sensor modalities which may include range sensors, A B C D E tactile/contact sensors, encoders, and vision systems. b. Front Sensor and Direction of Goal Given such sensor modalities, the usual procedure for fuzzy control synthesis consists of first defining Degree of membership linguistic terminology for the inputs and outputs, partitioning the sensor space and actuator space using 1 Great Right Straight Left Great appropriate fuzzy sets (membership functions), and 0.75 Right Left formulating fuzzy rules that satisfactorily govern the 0.5 desired response of the robot in all practical situations. 0.25 The subject of discussion in this paper is a mobile 0 o robot modeled after LOBOT, a custom-built robot -100 -50 0 50 100 driven by a 2-wheel differential configuration with Degree of turn two supporting casters. It is octagonal in shape, c. Steering Direction stands about 75 cm tall and measures about 60 cm in width. Range sensing is achieved using a layout of Figure 3. Membership functions 16 ultrasonic transducers (arranged primarily on the front, sides, and forward-facing obliques); optical encoders on each driven wheel provide position Table I. information. Assuming a constant linear speed of Input Front sensor Goal Direction 5cm/sec, we synthesize a fuzzy controller that uses I Very close Right four inputs and one output. The inputs are relative obstacle ranges to the front, left and right, and the II Close Zero angle in the direction of a designated goal location. III Far Left Their respective linguistic terms are: FS (front A 0.0 -π sensor), LS (left sensor), RS (right sensor), and DIR. B 0.2 -π/2 The individual sensor inputs are derived from pre- C 0.3 0 processed data from multiple sensors on the D 0.75 π/2 corresponding sides of the robot. The output is a E 1.0 π direction in which to turn in order to satisfy avoiding Units meters radians obstacles and navigating to the goal. Its linguistic term is TURN-ANGLE. The range input space was partitioned based on a relevant maximum sensor Based on the membership functions selected, a range measurement of 4m, i.e. the universe of rule-base was designed to effect motion behavior suitable for collision-free navigation to designated goal locations. A total of 36 rules were formulated. An example of one of these is: 5. SUMMARY IF: LS is Close and RS is Close and FS is Far and DIR is Zero A brief introduction to fuzzy sets and logic was given THEN: TURN-ANGLE is Straight. with emphasis on its application to intelligent control of mobile robots. Insights into the synthesis procedure of such fuzzy control systems is provided 4. SIMULATION via an exercise in developing a fuzzy controller for autonomous navigation. The performance of the A simulation is described here to demonstrate the resulting control system was demonstrated using a behavior of the fuzzy controller described above. It is simulated navigation task described in the context of a two-dimensional mock simulation of a Mars rover a simplified two-dimensional Mars rover mission navigation task. The scenario is as follows. A scenario. planetary rover is deployed at a scientifically At the ACE Center, research is ongoing in the area interesting landing site near Ares Tiu on Mars. of intelligent control of autonomous mobile robots. Human operators on Earth command the rover to Focal areas include hierarchical fuzzy control, genetic navigate to a designated location where experiments programming applications to intelligent controller are to be performed. The roverÕs immediate task is design, and embedded fuzzy control at the to autonomously navigate to the goal under sensor- microprocessor and integrated circuit level. based control, i.e. no internal map of the environment is used. REFERENCES 15 [1] Zadeh, L.A., ÒFuzzy SetsÓ, Information and Control, Vol. 12, pp. 338-353, 1965. [2] Martinez, A., E. Tunstel and M. Jamshidi 10 ÒFuzzy Logic Based Collision Avoidance for a Mobile RobotÓ, Robotica, Vol. 12 No. 6, pp. 521- Y (meters) 527, 1994. [3] Jamshidi, M., T. Ross and N. Vadiee (Eds.), 5 Fuzzy Logic and Control: Software and hardware applications, Prentice Hall, Englewood Cliffs, NJ, 1993. [4] Lee, C.C., ÒFuzzy Logic in Control Systems: Fuzzy logic controller - Part IÓ, IEEE Transactions 0 on Systems, Man and Cybernetics, Vol. 20 No. 2, 0 5 10 15 pp. 408-418, 1990. X (meters) Figure 4. Fuzzy controlled sensor-based navigation. The simulation result is illustrated in Figure 4 which shows a 225m2 region cluttered with an arbitrary distribution of obstacles. The simulated mobile robot (rover) is displayed as an octagon with a radial line segment indicating the robotÕs heading. ItÕs initial location is (x y θ) = (2.0m 2.0m π rad.) and the goal is located at (X, Y) = (14.0m, 12.0m). Using a fuzzy controller as developed above, the rover was able to successfully negotiate a smooth path to the goal location. In the figure, the robot icon is displayed every 10 seconds as it traverses the path.