Intelligent Optimization of Adaptive Dynamic Window Approach for Mobile Robot Motion Control Using Fuzzy Logic

The paper presents an adaptive dynamic window approach (DWA) for mobile robot dynamic obstacles avoidance optimized utilizing a fuzzy logic controller. Most of the present work on autonomous navigation in dynamic environments does not take into account the dynamics of the obstacles. One of the methods used in research today for dynamic obstacles avoidance is the dynamic window approach. The (DWA) is a well-known navigation scheme. One problem facing the DWA is how to optimize the weights of its objective function to allow the robot to move towards the goal while avoiding collisions in all environments. The main contribution of this paper is to build an intelligent system that will be able to optimize the objective function weights of the dynamic window to make it more resilient to changes and moves as fast as possible towards the goal using fuzzy logic system. The proposed new adaptive controller was able to reduce the failure rate of the DWA from 20% to only five per cent in static environments, and maintain more than 60% success rate in dynamic environments with up to 25 obstacles/100 m2, on the other hand the basic algorithm was failing to less than 50% with 15 obstacles/100 m2.


I. INTRODUCTION
Autonomous mobile robot trajectory planning algorithms can be divided into two sections, path planning and obstacles avoidance algorithms. The path planning algorithms are used to generate a suitable path between two points from the robot starting position to the goal point depending on a model or a map of the environment, while on the other hand, the obstacle avoidance algorithms are concerned with avoiding collision with obstacles that may exist on the path calculated by the path planning algorithm. These obstacles can either be static or dynamic. Static obstacles can be considered directly on the path planning algorithm to generate a collision free path to the goal. However, dynamic obstacles locations are changing with time which make them difficult to consider The associate editor coordinating the review of this manuscript and approving it for publication was Shaohua Wan. on the path planning algorithm. Re-planning of the path can be computationally expensive and time consuming. Hence, obstacles avoidance algorithms are generated to allow the robot to maintain its overall path while avoiding collisions with these obstacles which is based on motion commands rather than path planning.
Several types of algorithms were developed for obstacles avoidance such as the vector field histogram (VFH) [1], the lane curvature method (LCM) [2], bug algorithms, and Dynamic Window Approach (DWA) [3]. The latest showed superior performance compared to others [4], [5]. Intelligent algorithms were also deployed to develop obstacles avoidance solutions such as in [6], hybrid fuzzy potential field was proposed for autonomous mobile robot dynamic motion planning in dynamic environments. A parallel elite genetic algorithm was utilized for path planning for autonomous robot navigation in [7]. A hybrid learning approach was presented in [8] for obstacle avoidance using a neuro-fuzzy controller based on supervised learning, a reinforcement learning method based on the fuzzy actor-critic learning algorithm was used to tune the algorithm after being implemented on the hardware to adapt to new environments without human intervention [8]. A behavior based intelligent controller was proposed in [9], [10] for mobile robot navigation. A fuzzy logic expert system was used to select among different behaviors based on behavior coordination module. The proposed approach provides superiority compared to conventional potential field approach. The reinforcement learning and deep reinforcement learning based approaches were also deployed to deal with the varying characteristic of dynamic environment for mobile robot navigation [11], [12]. This paper focuses on enhancing the dynamic window approach [3] that is used for dynamic obstacles avoidance by proposing an intelligent adaptive DWA to deal with the varying characteristic of dynamic environment. The dynamic window approach is an obstacles avoidance method that takes into account the kinematic and dynamic constraints of a mobile robot. Kinematic constraints are taken into account by directly searching the velocity space of a mobile robot. The search space is the set of tuples (v, ω) of the translational velocity v and rotational velocities ω that are achievable by the robot [13]. This search space is reduced to the admissible velocities allowing the robot to stop safely. Due to the limited accelerations of the motors, a further restriction is imposed on the velocities. The robot only considers velocities that can be reached within the next time interval. These velocities form the dynamic window which is centered on the current velocities of the robot in the velocity space.
Several enhancements were proposed on the original DWA algorithm. One of the methods to improve the performance of the DWA is the global dynamic window approach presented by Brock and Khatib in 1999 [13]. This method extends the original DWA by incorporating a simple and efficient motion planning algorithm without prior knowledge of the environment. H. Berti et al., used the Lyapunov stability criteria on the DWA [14] as a control strategy to guarantee and characterize goal arrival. The method uses an ideal control law that drives the robot to the goal guaranteeing a global convergence. A navigation function is used to drive the robot to the goal by avoiding collisions and considering the robot dynamic constraints.
In 2011, Chih-Chung Chou et al. introduced a new enhancement on the dynamic window approach called DWA* [15]. Their method realizes the environmental information as interval configuration for fast processing. A candidate velocity is derived by analyzing the intervals to find navigable areas in the environment. For each candidate velocity, the new robot position is computed as a new node and saved in a search tree. This process is repeated until the goal is expanded or the tree depth reaches a certain value. The deepest node is then determined as a temporal goal.
Xiuyun LI et al., introduced an improved dynamic window approach in 2017 [16]. The algorithm is based on obstacle sensing. The analysis of traverse feasibility is conducted by using the scanned data. The robot is modelled as rectangular and the scanning area is divided into 6 regions.
In 2015, Zhang Hong et al. suggested using fuzzy logic to change the weight parameters of the objective function for the dynamic window approach [17]. Their proposal to change the objective function weights is based on the distribution of obstacles around the robot in three different areas, target position, and target orientation. In 2018, O.A. Abubakr et al. presented a reduced design for the work of Zhang Hong et al. [18]. In their model they removed both the target orientation and target position from the weight optimization fuzzy controller. They introduced a new fuzzy controller with simplified rules set that enhances the performance of the fuzzy controller.
In the last decade, several attempts were made to address the problems of the dynamic window approach and to optimize its performance. P. Saranrittichai et al., published a paper on robust local obstacle avoidance [19]. In 2014, Lima et al. used an image based dynamic window approach for navigation in urban environments [20]. A modified DWA was proposed in [21] to limit the robot speed in crowded environment with many obstacles using fuzzy logic rules. In [22] the DWA was integrated with a feedback linearization controller for autonomous vehicle navigation. The DWA was utilized in [23] to provide advanced driving assist systems to control the linear and angular velocities of the vehicle to assist obstacle avoidance. Another driving assist system [24] utilized an Image-based DWA to implement human vehicle cooperative navigation system. In [25] the DWA and follow the gap method were used to implement real time obstacle avoidance navigation system for hovercraft. In [26] the DWA is utilized to implement a hybrid path planning approach for unmanned surface vehicle (USV) combined with A* global path planner algorithm.
In this paper, we propose an intelligent fuzzy controller to optimize the weights of the objective function for the dynamic window approach. The fuzzy logic system exploits its ability to provide a robust system to deal with uncertainty and imprecision to solve the robot navigation problem in dynamic environment. Fuzzy logic system presents the weights of the dynamic window approach objective function by a flexible set of If-Then rules. These rules characterize the nonlinear dynamic behavior of the weight which reflects the expert system knowledge to adapt the weight. Thus the proposed system will be able to adapt the dynamic window approach weights based on the received complete or partial information form the surrounding robot environment [4], [6]. The proposed fuzzy controller depends on the distribution of obstacles in five areas around the robot. The fuzzy controller has a set of 32 rules that tune the three weight parameters of DWA based on the distance to the nearest obstacle in each of the five areas. The proposed controller is validated in both simulation and experiment using a Qbot open-architecture ground Quanser robot built on a Kobuki differential mobile platform [27], [28], [29]. The mobile robot platform is supported VOLUME 10, 2022 with real-time based controller under MATLAB/Simulink using QUARC software from Quanser [30]. The results are compared with both the basic dynamic window approach with static weight parameters and another fuzzy controller in [17], [18].
Sections II and III describe the problem we intend to solve and the fundamentals of the DWA. The proposed intelligent solution is described in section IV. Section V evaluates the proposed approach and compares it to existing solutions in both simulation and experimental works. Finally, the concluding remarks are presented in section VI.

II. PROBLEM STATEMENT
The main idea of the dynamic window approach is to select from all velocity tuples only the ones that allow the robot to stop before hitting an obstacle with respect to the kinematic capabilities of the robot. These velocities are called the admissible velocities. Hence, the dynamic window contains only those velocities that can be achieved by the robot within its dynamic limitations. This results in a search space to find the next motion command that allows the robot to approach its goal while avoiding collision with the nearest obstacle. After determining the search space, a velocity is selected based on the criteria target heading, clearance, and velocity using the objective function G (v, ω) as follows: where: Heading = the alignment of the robot with the goal. Dist. = the distance to the nearest obstacle to the robot. Velocity = the linear velocity of the robot. Figure 1 shows the main distances and angles required for the objective function of the dynamic window approach. From equation (1) and figure 1, the heading angle is the angle between the robot heading angle and the goal point (g x , g y ) denoted as and can be calculated as follows: where: = goal heading. ψ = goal angle with respect to the global frame. ϕ = robot heading angle with respect to the global frame. Then: The heading is maximized for the objective function and this is performed using equation (4). The second parameter in the objective function is the (dist) which is the distance from the robot center (R x ,R y ) to the nearest obstacle (d x , d y ) indicated as d obs in figure 1 and is calculated as follows: The last component is the velocity and it is measured as the linear velocity of the robot on the axis v from the figure.
The three components of the objective function are necessary. For example, increasing the weights of only the clearance and velocity parameters of the objective function; the robot would be able to avoid collision with very high speed but with no incentive to move towards the goal location. This can be applied to any of the components which make all of them of equal effect over the whole approach.
The main objective of this paper is to find the parameters for these three components that give the optimal performance under any given condition by applying an intelligent algorithm that adjusts the weight effect of each component depending on the current location of the robot with respect to the nearest obstacle and the goal point. Also, depending on the current translational and rotational velocities of the robot.

III. DYNAMIC WINDOW APPROACH (DWA)
The dynamic window approach was first proposed by D. Fox et al. [3]. The algorithm utilizes the sensory data from the robot with respect to the velocity as well as the obstacles around the robot to give the robot wheels the next suitable velocity command that will enable the robot to safely avoid collision and move towards the goal. Its main advantage is that it considers the robot kinematic constraints. The algorithm searches a well-chosen velocity space which is the combination of all possible set of tuples (v, ω). The concept of DWA is to get an optimal velocity command in the velocity space directly by maximizing the objective function. Figure 2 demonstrates how the velocity space is calculated. There are three kinds of velocity spaces defined in DWA. The first velocity space is made up of all the possible velocities the robot can achieve V s . Each velocity in the second velocity space ensures that the robot can stop before crashing into any obstacle if this velocity, V a , is selected. The third velocity space contains the velocities that can be reached in a clock cycle, and it is also called the Dynamic Window V d . The resultant velocity search space is given by V r .
Based on the kinematics specification of the robot and the existence of obstacles in the environment the algorithm  calculates the dynamic window for the robot given by: The second step is to pick the most appropriate velocity command. Firstly, each velocity in V r is sampled to calculate its appropriateness with the objective function which is defined in equation 1 where α, β and γ are constants and their summation is equal to 1.
From the equation, the heading is the angle between the robot heading angle and the goal location which is denoted by angle in figure 1. dist is the distance to the nearest obstacle and is denoted by d obs . Velocity is the linear velocity of the robot which is used to force the robot to move towards the goal. After evaluating all the velocities using the objective function, the velocity command with the highest evaluation is selected as the next velocity command.

IV. FUZZY IMPROVED DYNAMIC WINDOW APPROACH
The fuzzy logic controller is applied to the DWA to optimize the weights of the objective function based on the existence of obstacles around the robot. Figure 3 shows the block diagram of the DWA system after adding the fuzzy controller. Figure 4 shows the different areas that are checked for obstacles. The area in front of the robot is divided into 5 regions with 36 • for each region.
The five distance values from each area are used as inputs to the fuzzy controller. In this fuzzy controller Mamdani inference engine is used [31]. This inference engine uses (max−min) operator for composition, minimum operator for implication, maximum operator for aggregation and centroid for defuzzification. Firstly, input fuzzification is applied. Fuzzification is the process of converting the given crisp input values into their fuzzy values matching degree. Each input in the controller has two fuzzy terms: [near and far] with Gaussian bell membership for each term denoted as µ i where: Each of these parameters has a physical meaning. c determines the center of the corresponding membership function, a is the half width, and b with a controls the slopes at the crossover points. Figure 5 shows the fuzzy input for one of the areas. The fuzzy logic has three outputs, one for each of the weight elements [α, β, and γ ]. Every fuzzy output consists of five membership functions [very small, small, medium, high, and very high] with Gaussian bell shapes. Figure 6 shows the membership functions for one of the fuzzy outputs. All the fuzzy outputs are identical.
The implication process is the process of evaluating all the fuzzy rules with respect to the given fuzzy inputs [32]. For the developed fuzzy controller, a set of 32 rules are assigned for all the different cases and only a sample of the rules are shown here as follows:

If (a is N) and (b is N) and (c is N) and (d is N) and (e is N) then (α is M) (β is VH) (γ is S) If (a is N) and (b is N) and (c is F) and (d is N) and (e is N) then (α is M) (β is M) (γ is M) If (a is N) and (b is F) and (c is N) and (d is N) and (e is F) then (α is S) (β is VH) (γ is VH) If (a is N) and (b is N) and (c is N) and (d is N) and (e is N) then (α is M) (β is VH) (γ is S) If (a is F) and (b is N) and (c is N) and (d is F) and (e is F) then (α is S) (β is H) (γ is M) If (a is F) and (b is F) and (c is N) and (d is F) and (e is N) then (α is S) (β is VH) (γ is M) If (a is F) and (b is F) and (c is F) and (d is F) and (e is F) then (α is H) (β is M) (γ is M) . . . .
Tables 1 and 2 demonstrates the fuzzy associative memory of the intelligent system. Table 1 contains all the different possible output combinations of the objective function parameters while the input in area a is fixed to Near and table 2 when a is far.
The inference engine will use every rule and evaluate it with the inputs and set the output values based on the fuzzy VOLUME 10, 2022   outputs membership functions shown in figure 6 using the minimum operator ( ∧ ) for rule input composition and rule output implication as in eq. (8) and (9), where * can be α, β, or γ ). After the implication process, comes the aggregation of the consequents. In order to make a decision, all the rules implication must be combined together. Aggregation is the process by which the fuzzy sets that represent the outputs of each rule are combined into a single fuzzy set using using the max operator ( ), as in eq. (10). In the last step, the defuzzification is implemented. The defuzzification is the process of converting the aggregated fuzzy set into a single number [33]. The method we are using for this step is the center of area centroid as in eq. (11).
where R is the number of rules.

A. SIMULATION RESULTS
In this section, the proposed fuzzy improved dynamic window approach ''FIDWA'' is compared against the original dynamic window approach ''DWA'' [3] and the fuzzy dynamic window approach ''FDWA'' [17]. The results are compared in simulation with both static and dynamic obstacles. The performances of the algorithms are compared in terms of the path length required to reach the goal, the average linear velocity of the robot, and the time needed to reach the goal.

1) SIMULATION VALIDATION IN A U-SHAPE ENVIRONMENT
In figure 7 the three algorithms are tested in an environment consisted of a U-shape wall where the robot is required to detect the wall and move around it to reach the goal point. From the figure, It can be noticed that FDWA was unable to move around the wall as the robot was driven directly towards the goal because of the small distance. The FIDWA gave the shortest possible path compared to the other approaches and reached the goal in approximately only 18 seconds.

2) SIMULATION VALIDATION IN A CORRIDOR ENVIRONMENT
In this test, the robot is required to enter a narrow corridor and move through to reach the goal point. In figure 8a the DWA algorithm was applied different combinations of weight parameters. The robot was unable to move through the narrow corridor in all combinations. In figure 8b the FDWA algorithm was applied in the corridor environment. The robot was able to enter the corridor but it failed to exit and was  stuck inside. In figure 8c the FIDWA was tested in the same simulation environment. The robot was able to move in the narrow corridor and follow it until it exits the corridor and then move towards the goal point.

3) SIMULATION VALIDATION IN A STATIC ENVIRONMENT
The performance of the three algorithms is tested with increasing number of static obstacles. Every algorithm was tested several times with specific number of static point obstacles and the success rate was recorded. Then the number of obstacles was increased and the process is repeated again. Figure 9 demonstrates the performance index of the three algorithms with increasing the number of obstacles from 10 to 30 obstacles. From the figure, the FIDWA is always having the best performance in all cases with a success rate of 80% or more for up to approximately 20 obstacles. The performance of the FIDWA drops to less than 50% success rate for only 30 obstacles or more between the robot and the goal point.

4) SIMULATION VALIDATION IN A DYNAMIC ENVIRONMENT
In the next test, the algorithms are tested in a dynamic environment as demonstrated in figure 10. The environment consists of several static obstacles and six dynamic point obstacles moving in a circle and a line. In this case all the algorithms were able to reach the goal point. Table 3 compares the results of the three algorithm. From the table, the shortest path was achieved using the FIDWA with the highest average linear velocity. Moreover, the FIDWA required the least amount of time to reach the goal point with 26 seconds. Lastly, the failure rate of each algorithm is tested with moving obstacles. In this test a fixed number of randomly moving obstacle in the same area was simulated and the three algorithms were tested 40 times within the same environment to reach the goal point and the results were recorded. Figure 11 shows the results of this test. From the figure, it can be observed that the failure rate of the dynamic window approach to achieve its task was reduced considerably by using the proposed FIDWA. Moreover, the time required was also reduced while achieving a higher average velocity. Nevertheless the path length was on average the same between the FDWA and the FIDWA. Hence, we can say that the main contribution of the FIWDA is reducing the failure rate of the dynamic window approach to less than 5%, and reducing the average time required to reach the goal point by approximately 16% compared to the other controllers.

1) EXPERIMENTAL SETUP
In this section, the proposed FIDWA controller is validated experimentally. The proposed approach performance is evaluated in several static and dynamic environments. In these experiments the Qbot open-architecture ground robot from Quanser is used, this robot is built on a Kobuki differential mobile platform [27], [28], [29]. The robot is equipped with a Kinect sensor [28], [29] to detect the obstacles and is supported with real-time based controller under MATLAB/Simulink using QUARC software [29], [30]. The Kinect sensor utilizes the measured depth data with a range of 5m. Table 4 and figure 12, show the physical properties of the robot. The mobile robot uses odometric localization using its encoder sensors to localize itself within the map of the robot   surrounding environment. All the results in this section are collected directly by the robot odometric localization module. Figure 13 shows a snapshot from the laboratory where all experiments were conducted.

2) EXPERIMENTAL VALIDATION IN STATIC ENVIRONMENT
Firstly, the FIDWA was tested in an environment with multiple static obstacles as shown in figure 14a. In this experiment, the robot was designed to reach the goal point located in a straight line a head of the robot while avoiding six static obstacles. The robot was able to reach the goal without hitting any of the static obstacles. Figure 14b shows the results collected from the robot and the map drawn by the Kinect sensor. Figure 15 shows the velocities of the robot during the static obstacles test, while figure 16 shows the change in the weight parameters during the same test.

3) EXPERIMENTAL VALIDATION IN DYNAMIC ENVIRONMENT
Next, the FIDWA was tested in an environment with one dynamic obstacle and a small corridor as shown in figure 17a. In this experiment, the environment included several static obstacle and one dynamic obstacle moving in a circular motion. The robot is supposed to avoid all static and dynamic obstacles and move around the corridor to reach the goal point. The robot was able to avoid the obstacle successfully and reach the goal location as shown in figure 17b. Figures 18  and 19 show the robot velocities and the change in the weight parameters appropriately during the test.

4) EXPERIMENTAL VALIDATION WITH SEVERAL WAY-POINTS ENVIRONMENT
Lastly, the algorithm was tested with several way-points as shown in figure 20. In this experiment, the robot had more VOLUME 10, 2022      is on the side of the first goal where the robot is supposed to change its heading to reach the goal. Third goal (W3) is at the same distance of the starting point of the robot with some static obstacles on the way. The robot was able to reach each goal successfully while avoiding all the obstacles in its way as can be seen from figure 21. This test proves the possibility of using this controller with another global path planning algorithm to avoid obstacles between way-points calculated by the path planning algorithm. Figure 22 shows the velocities of the   robot during the way-points test, and figure 23 demonstrates the objective function weights changes within the same test.

VI. CONCLUSION
In this paper, a new optimization technique for dynamic window approach is presented. The DWA is based on the kinematic model of the robot. One of the main problems facing the dynamic window approach is the selection of the weights of its objective function. The proposed technique depends on the physical properties of the environment around the robot. The algorithm then uses a fuzzy logic controller to update the weight parameters of the objective function. The FLC inputs are the distances to the nearest obstacles in five areas in front of the robot, while its outputs are the weight parameters.
The proposed method is compared with the other methods the basic DWA and FDWA in both static and dynamic environments. The algorithms are compared using three different criteria: the path length, the average linear velocity, and the time required to reach the goal. Real experiments were conducted to validate the performance of the FIWDA.
The results show that the proposed technique can considerably improve the performance of the original DWA algorithm in terms of success rate to reach the goal point, the path length, the average velocity, and also the time required, with very minimal sacrifices to processing power required compared to the original DWA.

ACKNOWLEDGMENT
This article represents the opinions of the author(s) and does not mean to represent the position or opinions of the American University of Sharjah.