Friday, September 20, 2019

Fuzzy Logic Control of a Mobile Robot

Fuzzy Logic Control of a Mobile Robot Abstract In this report the development of mobile robot using fuzzy inference system is presented. The mobile robot has three inputs and two outputs. The three inputs are proximity measures of the wall and the two outputs are turning rate and speed of the mobile robot. The mobile robot is developed to follow the tracking path and avoid collision with the obstacle. Contents Overview and Introduction Input and Output ranges Appendix Construction and performance of the rules MATLAB code for control task Critical evaluation Overview In the beginning of the development of the mobile robot, the virtual robot must be used for the development hence kiks robot is considered. The fuzzy inference system is designed by using MATLAB and implemented on a robot which is kiks robot. The kiks robot is setup by installing the kiks software and the related files are extracted and executed on MATLAB. Then the FIS is designed by coding and deciding the inputs and outputs for the kiks. The turning rate and speed of the robot is defined as per the rules of the parameters for robot movement and to avoid collision with the obstacles. The steps involved are: Defining universe of discourse Deciding the fuzzy sets Define membership functions The fuzzy interference system used is mamdani FIS which involves Fuzzification of input variables Rule evaluation Aggregation of rule output DE fuzzification Introduction The fuzzy control systems are rule based or knowledge based system which contains collection of IF-THEN rules. The advantage of fuzzy system is it is wide usage in performing variety of computational and measurements. The advantages of using fuzzy system in navigation system are: Capabilities of handling uncertain and non-precise information. Real time operation Easy combinations and execution of various behaviours. Develop perception based strategies. Better and easy implementation. The construction of fuzzy system depends on two important parameters which are identifying the universe of discourse and defining correct membership function. The reason for using mamdani over sugeno is because it uses fuzzy terms defined by the shape of the membership function. The mamdani type fuzzy system is better to choose for more human like behaviour of the robot which entails a substantial computational burden. The building of the autonomous mobile robot involves few main considerations which are, path tracking, avoidance of the obstacle and behaviour co-ordination. The definition of universe of discourse and membership function and combination of rules are important for smooth movement and better outcome of the robot. Path tracking involves navigation of the desired path which is computed and defined by human operator tracking walls or obstacles. The difficulties of path tracking deals with incomplete perception of environment, inaccurate measurements and sensor fusion. Avoidance of obstacle using fuzzy logic involves avoiding the unforeseen or dynamic obstacles while it tracking a path or moving towards a target. Fuzzy logic for behaviour co-ordination is used to improve the total performance of the navigation system. The infrared sensor with 6 sensors for the forward direction and 2 sensors for the backward direction. In this phase of training robot, I have used 2 sensors for right, 2 for left and 2 for front sensing. The sensor input is noun used slow, fast, medium. The fuzzy variables are adjectives that modify the variable, left right medright slowright slowleft. In the mamdani type of fuzzy system, the fuzzifier performs measuring of the input variables, scale mapping and fuzzification. The number of membership function defines the shapes of the initial inputs defined by the user. It holds a value of 0 and 1 which indicates the degree of belonging of the quantity to a fuzzy set. Input and Output ranges. Input Membership function Input range Left Far, Intermediate, Close [0 21] Front Far, Intermediate, Close [0 21] Right Far, Intermediate, Close [0 21] Output Membership function Output range Turning rate Slowright, slowleft, medright, left, right, front. [0 200] Speed Veryslow, slow, medium, fast, veryfast. [0 200] Input range for a sensor is 10bits and the input value for sensor is 1024, the sensors are grouped into 2 and wherein each one variable defined by 1024(210) i.e. 2048 therefore that divided by 100 is 21, hence the input range is [0 21]. The input is taken left, right, front with 2 sensors each. The membership function for them is defined far, intermediate, close for the robot to sense the obstacle. The outputs are turn and speed, where in turn has membership functions slowright, slowleft, medright, right, left, front for the robot to turn to a direction when the robot is nearing the robot. The range of the speed is considered as [0 200] as the robot movement was meant to be faster compared to when the speed was in the range [0 100] because the robot must cover more distance in less time and better speed. The membership function for speed is taken as slow, veryslow, fast, veryfast, medium as the robot should move in different direction with different speed so that the robot follows th e path and is not disturbed by sudden obstacle. The combination of the membership functions are rules for the robot to follow to follow the path and along with that to avoid obstacles and give smoother movement. Appendix   Ã‚  Ã‚  Ã‚  Ã‚  Ã‚   1a. Movement of robot in arena1   Ã‚   1b. Monitored simulation of arena1    2a. Movement of robot in arena2    2b. Monitored simulation of arena2. Construction and performance of fuzzy rules. If (left is far) and (front is far) and (right is far) then (turn is medright)(speed is fast) (1) If (left is far) and (front is far) and (right is intermediate) then (turn is front)(speed is medium) (1) If (left is far) and (front is far) and (right is close) then (turn is slowleft)(speed is medium) (1) If (left is far) and (front is intermediate) and (right is far) then (turn is medright)(speed is fast) (1) If (left is far) and (front is intermediate) and (right is intermediate) then (turn is front)(speed is medium) (1) If (left is far) and (front is intermediate) and (right is close) then (turn is slowleft)(speed is very_slow) (1) If (left is far) and (front is close) and (right is far) then (turn is medright)(speed is very_slow) (1) If (left is far) and (front is close) and (right is intermediate) then (turn is slowleft)(speed is very_slow) (1) If (left is far) and (front is close) and (right is close) then (turn is slowright)(speed is very_slow) (1) If (left is intermediate) and (front is far) and (right is far) then (turn is right)(speed is fast) (1) If (left is intermediate) and (front is far) and (right is intermediate) then (turn is front)(speed is fast) (1) If (left is intermediate) and (front is far) and (right is close) then (turn is slowleft)(speed is slow) (1) If (left is intermediate) and (front is intermediate) and (right is far) then (turn is medright)(speed is very_slow) (1) If (left is intermediate) and (front is intermediate) and (right is intermediate) then (turn is front)(speed is medium) (1) If (left is intermediate) and (front is intermediate) and (right is close) then (turn is slowleft)(speed is fast) (1) If (left is intermediate) and (front is intermediate) and (right is far) then (turn is slowleft)(speed is slow) (1) If (left is intermediate) and (front is close) and (right is intermediate) then (turn is slowright)(speed is very_slow) (1) If (left is intermediate) and (front is close) and (right is close) then (turn is slowright)(speed is very_slow) (1) If (left is close) and (front is far) and (right is far) then (turn is medright)(speed is slow) (1) If (left is close) and (front is far) and (right is intermediate) then (turn is front)(speed is medium) (1) If (left is close) and (front is far) and (right is close) then (turn is slowleft)(speed is veryfast) (1) If (left is close) and (front is intermediate) and (right is far) then (turn is right)(speed is fast) (1) If (left is close) and (front is intermediate) and (right is intermediate) then (turn is front)(speed is medium) (1) If (left is close) and (front is intermediate) and (right is close) then (turn is slowleft)(speed is medium) (1) If (left is close) and (front is close) and (right is far) then (turn is slowright)(speed is very_slow) (1) If (left is close) and (front is close) and (right is intermediate) then (turn is slowright)(speed is very_slow) (1) If (left is close) and (front is close) and (right is close) then (turn is slowleft)(speed is very_slow) (1) If (left is far) and (front is far) and (right is far) then (turn is slowright)(speed is fast) (1) If (left is far) and (front is intermediate) and (right is far) then (turn is slowright)(speed is fast) (1) If (left is far) and (front is close) and (right is far) then (turn is slowright)(speed is medium) (1) If (left is far) and (front is close) and (right is intermediate) then (turn is slowright)(speed is slow) (1) If (left is far) and (front is close) and (right is close) then (turn is slowright)(speed is fast) (1) If (left is intermediate) and (front is close) and (right is close) then (turn is slowright)(speed is very_slow) (1) If (left is intermediate) and (front is far) and (right is close) then (turn is slowright)(speed is very_slow) (1) If (left is intermediate) and (front is intermediate) and (right is close) then (turn is slowright)(speed is fast) (1) If (left is close) and (front is far) and (right is far) then (turn is slowright)(speed is far) (1) If (left is close) and (front is intermediate) and (right is intermediate) then (turn is slowright)(speed is far) (1) If (left is close) and (front is close) and (right is close) then (turn is slowright)(speed is slow) (1) If (left is close) and (front is close) and (right is close) then (turn is slowright)(speed is veryfast) (1) MATLAB Code to implement the control task % - %   (c) 2000-2004 Theodor Storm %   http://www.tstorm.se %   Modified by Lily Meng 16th September 2009 % - function FIS_navigate(port,baud,time) % FIS_navigate(port,baud,time) % port = serial port to communicate with (port simulated robot, port>=0 ==> real robot % baud = baud rate % time = time to run behaviour if nargin

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.