# Reactive Obstacle-Avoidance Systems for Wheeled Mobile Robots Based on Artificial Intelligence
## 3 System Analysis
### Case I: Mobile Robot and Fuzzy Logic
To simplify data in images, morphology can offer this process, keeping essential features and suppressing those aspects that are irrelevant. The system searches depth features and, at the same time, removes small unknown regions surrounded by known regions, providing a higher definition from the objects and their depth into the environment. Specifically, this module uses the geodesic erosion algorithm, highlighting those pixels with the lowest sharpness whenever their neighboring pixels are sharper, providing depth images with a lower amount of dark particles. Figure 5d shows a depth image, which has been processed by the morphological reconstruction. Figure 4: Diagram of the reactive navigation system, which has four modules: pixel-wise bit reduction, morphological reconstruction, average depth, and fuzzy system. Module 3: Average depth. In this context, the robot can go to different places, and the system takes into account the work volume of the robot. Thus, the depth image processed by the previous module is divided into Left Subimage, Center Subimage, and Right Subimage (see Figure 6a-c) [28]. Each sub-image has a size of 211 \(\times\) 400 pixels, representing the possible reference paths where the mobile platform can go: turn right, forward, and turn left. This division is computed by two factors: (1) the dimensions of the mobile robot (length = 400 millimeters, width = 410 millimeters, and height = 150 + 630 millimeters, where 150 millimeters are due to the physical robot and 630 millimeters are due to the Kinect sensor and its support) and (2) the sensed effective distance by the Kinect sensor (about 3000 millimeters). The module implements the method proposed by [29], computing the threshold value and differentiating high and low depths. For each sub-image, if the amount of unknown data (0-values) is more considerable than a given percentage (67% in this case), the sub-image data suggest nearby obstacles, and the average depth is computed by using the mean of the low-valued depths. Otherwise, the average depth is computed by using the mean of the high-valued depths. If there are no low-valued depths, then the high-valued depths are used. In a few words, the average depth in each sub-image provides the region with a lower probability of collision, and if this region is not determined, then the robot is stopped. Figure 5: (**a**) RGB image; (**b**) original 16-bit depth image; (**c**) 8-bit normalized depth image (pixelwise bit reduction); and (**d**) 8-bit reconstructed depth image (morphological reconstruction). Figure 6: (**a**) Left Subimage; (**b**) Center Subimage; (**c**) Right Subimage; and (**d**) Fuzzy logic system. From this information, the reactive navigation system must compute the turning path, taking into account the imprecise data and avoiding sudden movements. This scenario enables the implementation of fuzzy control. Module 4: Fuzzy logic system. This module implements a fuzzy control for the reactive navigation of the mobile platform (see Figure 6d). The used tool for this development was Matlab's Fuzzy Logic Toolbox. The fuzzy inference system receives the average depth values obtained from each sub-image as inputs. It provides an output variable in sexagesimal degrees between \(-90^{\circ}\) and \(90^{\circ}\), representing the turning angle. A Sugeno inference system is used because it is computationally effective by generating numeric outputs and not requiring a defuzzification process. Sugeno systems work with adaptive and optimization techniques, and these implemented in navigation guarantee continuity in the output surface [30]. The depth variables obtained by each sub-image (Left, Center, and Right) are inputs. Each has three linguistic values: Near, representing the depth of the close objects, Medium, considering the depth of those objects located neither so far nor so near, and Far, to indicate distant objects (see Figure 6). Trapezoidal membership functions are used for the linguistic values Near and Far, and a Triangular one is used for Medium.