Obstacle Avoidance and Target Tracking by Two Wheeled Differential Drive Mobile Robot using ANFIS in Static and Dynamic Environment

. This paper proposes an idea for navigation and target acquiring for an autonomous robot in static as well dynamic environment using a tuned and trained Sugeno-type fuzzy inference system. This term for such system is Adaptive Neuro Fuzzy Inference System (ANFIS). ANFIS incorporates benefits from both fuzzy logic controller and neural networks and therefore is a robust tool to solve the stated problem. The input/output training data used to tune the system parameters is intuitively chosen and can be considered expert knowledge. Simulation results are achieved using in-build MATLAB functions. The architecture of the entire system consists of four ANFIS controllers. Two of them are used to control the wheel velocities of left and right wheel of the robot in order to get to the target defined by the user. The remaining two ANFIS controllers are utilized to successfully avoid obstacles encountered on the way to target.


Introduction
A two wheeled differential drive robot is the most rudimentary type of autonomous vehicle which finds its application ranging from a simple backyard project to industrial applications such as monitoring, transportation and countless more. The most essential behavior we seek in robots is obstacle avoidance and energy efficiency. Energy efficiency can also be defined as finding an optimal route to target position. The path planning and navigation are one of central design problem and also an area of current ongoing research. Considerable efforts have been done in the last decade to deal with such problems. The autonomous must be capable to gather and extrapolate information from the surrounding using sensors. The acquired data from all onboard sensors is fed to a controller to plan and execute its mission within its environment without human intervention [1].
Primarily, there are two ways a path planning problem can be classified: the local planning and the global planning [2]. In the local planning, the environment in which the robot is deployed is either only partially known or completely unknown. Whereas, in the global planning, complete environment is priori-known and the components of the environment (i.e. obstacles) should be static [3]. The robot must use sensors to perceive its surroundings and plan the motion accordingly.
In the current literature, there have been many techniques used to solve the dilemma of the navigation and path planning. Some of the most popular methods are the Visibility Graph algorithm [4], Voronoi Diagram [5], Bug Algorithm and the Potential Field Method. Just to give an example, in Potential field method, there are two opposite forces at work -an attractive potential pulling the object towards the goal point while a repulsive force pushing the object away from the obstacles present in the environment. Nevertheless, this method is susceptible to becoming stuck at a local search minimum.
In recent years, due to the advent of modern computing techniques coupled with computational resources has made solving the path planning and navigation problem undemanding. These techniques include genetic algorithm [6,7]. In [8], a control algorithm for obstacle avoidance for mobile robots based on fuzzy controller was presented. The environment information surrounding the robot detected by the ultrasonic sensors is fuzzified, and then used as an input into a fuzzy control system. The output obtained from the fuzzy control system is used to drive the robot. The simulation results show that the algorithm can help the robot to avid obstacles safely and is certainly feasible. In [9], fuzzy logic controllers having different membership functions are developed, tested and then used to navigate robots. Firstly, a fuzzy controller was used with 4 types of input members, two types of output members and three parameters each. Upon further development, two types of fuzzy controllers were developed having similar input and output membership functions but with five parameters each rather than three. Each of the robots were using ultrasonic sensor array to measure the distances of obstacles around them and an infrared sensor for detecting heading of the target. In [10], path planning of a mobile robot in an unknown environment was designed by utilizing a fuzzy logic system. Similar to [9], ultrasonic sensors were deployed to detect the distance and positions of obstacles. Using this fuzzy logic system, angular velocities of left and right wheel for the two wheeled robots were controlled. This method also required another new rule table that was required considering the distances to obstacles and the angle between the robot and the goal.
Chi and Less [11], showed an artificial neural network which was applied to learn the environment from sensory data for moving along a collision free course. The FIS was trained offline by using suitable datasets and the obtained parameters were fed into the robot. The training and testing of the FIS were done with the help of the ANFIS toolbox of MATLAB. Singh [12], did an analysis on an adaptive neuro-fuzzy technique for the navigation of a mobile robot in an unknown environment. The results improved the validity of the proposed technique to determine the optimal time and create a collision free trajectory. A neuro-fuzzy based system for the behavior-based control of a mobile robot for reactive navigation was touched upon in [14], by Joshi and Zaveri.
From the literature survey, it can be seen that there are still some areas that have not been addressed. Such as the online sensing information from the 3 directions (front, right, left) during the navigation and the complexity of the navigation environment. All those areas have been included in this paper to formulate a new problem definition for solving the path planning problem in a complex static environment containing multiple obstacles having different sizes and shapes.
The overall goal of this proposed idea can be seen as the implementation of ANFIS model which has the ability to avoid becoming stuck at any local minimum and generates a smooth trajectory from the start point to goal point in unknown environment. Simply put, ANFIS helps in guiding the mobile robot to reach its final goal position while efficiently and successfully avoiding obstacles through the workspace.
The entire process of developing a fuzzy-based controller that can successfully avoid collisions and reach a target in an efficient manner has been divided into two main steps: firstly, the obstacle avoidance controller and then the target acquiring controller. The obstacle avoidance controller constitutes two ANFIS controllers. Each of them receives the same three inputs, which are the front, right and left distances acquired from the sensors mounted on the robot. The output of the first ANFIS is used to control the right wheel's angular velocity while the other ANFIS is used for angular velocity control of the left wheel. The target acquiring controller is implemented, similar to the obstacle avoidance controller, using two ANFIS controllers. Instead of using three inputs, these controllers use only one input each which is the angle difference between the autonomous ground vehicle's direction and the target's angle. Again, the output of first ANFIS controller is used to control the right wheel velocity while the output of second ANFIS is used to control the wheel velocity of the left wheel of the robot.

The Architecture and Design of the Mobile Robot's ANFIS Controller
In this section, the proposed ANFIS controllers are discussed in depth. There are four ANFIS controllers which have been designed to accomplish the navigation task, which can be grouped under two groups. The first group is the one that oversees the obstacle avoidance mission while the other group has the oversight on the target acquisition task. As both controller groups are giving output of the same nature (i.e. left and right wheel velocities), a decision has to be made upon which controller output to choose in order to get an overall intended behavior. This is resolved through a switch block structure and it decides on which controller will be activated. The decision is quite intuitive also. The obstacle avoidance is the primary goal of the robot regardless of target approaching efficiency. Therefore, it should always exhibit collision avoidance behavior and when there are no obstacles in the vicinity it should shift to target tracking behavior. Moreover, while the robot is in target approaching behavior and suddenly it detects an obstacle, it then should fall back to its basic primitive behavior. Such behavioral switching is done with the help of the switch block. The information from the sensors (front distance, left distance, and right distance) can be combined in order to generate a Boolean signal namely, 'Obstacle Sensing Signal' abbreviated as OS. If the value of OS is True (1) then the bot will fall back to obstacle avoidance and if the value is False (0) then the set behavior is of target approaching.

Target Reaching ANFIS Controller
As stated previously, there are two dedicated ANFIS controllers to drive the right and left wheel with a given angular velocities. The input for this pair of controllers is the angle difference, AD. However, when both the target point and mobile robot are assumed to be a point entity then there is no requirement to calculate the AD. As, the robot can be manipulated to move in the line of sight when there is no obstacle around. However, the final aim of this project is to move beyond point entities and solve the path planning problem for a two-dimensional body. The output of the first controller is the angular velocity for the right wheel and for the second controller, the returned value is the angular velocity for the left wheel. The training for the target acquiring controller is done using a total of 40 sets of data. The training data for input and output ranges are given in Table 1. The purpose of this training is to adjust the membership function parameters to obtain the required model.   Table 1. The number of membership functions were kept three for the angle difference input. This number gives a reasonable amount of error as shown in the Figure. The type of membership function is triangular. The relationship of surface view between angle difference and the output for the first and second ANFIS controllers is illustrated in Figure 3 and 4 as follows.

Obstacle Avoidance ANFIS Controller
The most focal behavior in the entire deployment of the mobile robot is finding a path with zero collisions with obstacles. The third and fourth ANFIS controllers are utilized to steer away the robot when it is in close proximity with obstacles. The structure of both FIS files is similar and each ANFIS has three inputs and one output. Inputs are namely Front Distance, Left Distance and Right Distance while the output is left or right wheel's angular velocity. To train the ANFIS for obstacle avoidance behavior, a dataset consisting 20 entries was selected for the training purpose. This training dataset is given in Table 2. Such training decides the optimum membership function limits, resulting in the required model. Figure 5 and 6 denotes the training instance for the fuzzy inference system for left and right wheel velocity respectively. It can be seen that, there is a considerable amount of error in the model even after the training. However, the number of membership functions chosen for the ANFIS were three and for all inputs the type of all membership functions was kept triangular. Keeping this in mind, the error in the model is reasonable. The surface view between inputs and the output for the given ANFIS controllers are outlined in Figure 7 through 12.