# Reactive Obstacle-Avoidance Systems for Wheeled Mobile Robots Based on Artificial Intelligence
## 4 Results and Comparisons
### Case II: Mobile Robot and Neural Networks  
The output vector comprises three elements that correspond to each of the basic activities that control the mobile robot. Their element values are coded so that the respective movement to run is 1, and the other three are equal to 0. Thus, the neural network will produce the output vector (1,0,0,0) if the control of the action is to turn right, a vector (0,1,0,0) if it is turn left, a (0,0,1, 0) vector if the action is to advance, and, finally, a (0,0,0,1) vector if it is back. The designed decision-making algorithm is shown in Figure 14.  
The neural algorithm was developed and implemented in the mobile robot as an integrated system; the coding was carried out in Matlab. The architecture of the neural network and the learning algorithms' design are monitored and disconnected in the Matlab software, where the values of synaptic weights and bias extract the link, respectively. Figure 15a shows the training characteristics concerning the behavior of the mid-squared error of the neural network in the backpropagation training. Matlab shows satisfactory results observed in training, where Figure 15b shows the script for system simulation and implementation. The programming of the neural network designed for the mobile robot as an integrated system was based on (1) synaptic weights of the hidden layers, (2) synaptic weights of the output layer, (3) bias or weights of each layer, and (4) knowledge of the activation functions that are used in each of the layers. In the first hidden layer, _tansig_ is used and, in the remaining layers, _logsig_ is used. Figure 14: Decision-making algorithm using BP-ANN. Figure 13: Example of degree of membership. The synaptic weight matrices of the architecture of Figure 10, where **W1**, with five rows and three columns, stores the weights that connect the input layer with the hidden layer. The input variables are obtained from vector \(X\). In addition, the weights connecting the hidden layer with the next layer are stored in matrix **W2**, which is composed of four rows and five columns. In the case of the weights that connect layers, they are stored in matrix **W3**, which consists of four rows and four columns. Finally, as with the last hidden layer and the layer's output, the data are stored in matrix **W4**, which has four rows and four columns. It is important to note that the bias corresponding to each layer is stored in a vector, to have four vectors, which are **b**. After processing the information, the output obtained from this network decides the action to be taken. Therefore, this information is used so that the robot can avoid obstacles found in the environment. Physical implementation and analysis. The dimensions of the robot in Figure 7c are 26-cm length, 12-cm high, 24-cm separation between wheels, and an average speed of 10 cm/s traveling in a straight line. The wheels were covered with non-slip material to improve the performance on smooth surfaces. The sensors work correctly because the sensors for this type of object must be made of relatively dense materials. The aim is that the reflected ultrasonic signal is properly generated and then detected by the transducer. The algorithm used for robot learning and navigation was implemented in Matlab language and can easily be extended to include new restrictions and actions in the environment. The robot's adaptability was verified by the interaction of the robot with a group of people in an open exhibition space. People played the role of dynamic obstacles, i.e., they used their feet to block the mobile robot's movement, even if they had another mobile robot. Table 2 shows results obtained by different neural architectures and backpropagation learning algorithms, implemented for decision-making in the mobile robot in the presence of obstacles in front of the used ultrasonic sensors (the sensors' average response time was 65 ms).