# An RSSI-Based Localization, Path Planning and Computer Vision-Based Decision Making Robotic System
## 2 Methodology
The black dotted points were the sample area and \(Tx_{1}\), \(Tx_{2}\), and \(Tx_{3}\) were wireless local area networks. \(D_{1}\), \(D_{2}\), and \(D_{3}\) were the distance between starting the sampling point from position 1 to transmitters. The different position of wireless node points affects the result. A total of 20 samples are collected in 25 m\({}^{2}\) (10 m \(\times\) 2.5 m) area. The system flow graph is in Figure 3. The robot asks for user input mapping position for the database. For better accuracy, the mapping point should be as dense as possible, and so here the distance between two consecutive points is 0.5 m. The system registers the link quality and the RSSI values for all the samples and points under consideration. The database stores these values as Q (link quality out of 70), DB (RSSI value), and Pos (position number), and also two separate CSV files which are operated by model defining and prediction modules. The model prediction module uses data-specific regression or classification models, such as KNN, RBF-SVM, RF, and MLP algorithms. An optimal model is selected based on accuracy and data processing time. Here this database is tested for different models, such as different regression models and classification models. The database was split into 70:30 training:testing values for prediction, and based on their respective higher fit score, minimum root-mean-square Error (RMSE), and processing time, the model was selected. This prediction model was applied to the real-time scan values for robot localization. The robot scanned for new values and registered the RSSI values only for the link quality that was between 35 and 65. If the link quality were to degrade, the prediction model error would increase, indicating the wrong robot position in the mapped area. For each position in mapping, the database contains magnetic orientation values. At the time of optimal path generation, the path from one fixed position to the target position is decided by connecting the nearest optimal points, as shown in Figure 4. The sampling points are in black dots and the objects in different shapes and colors. The sample node is described in (column, row) format. If the starting point was (0,5) and the target was (3,1) the optimal path was shown in red as the number of points connected to nearby reaching points. At the time of sampling, the reaching points are well registered. The starting point (0,5) was connected to point (0,4), (1,0), (1,4), (2,4), and (1,5). The connecting path from (1,0) node is a black dotted line. The estimated path from source to the destination was calculated by the algorithm and listed in Figure 4. The path which has minimal hoping points will be declared as the optimal path. At the time of path following, the presence of a number of nodes means that the system has to localize correctly after reaching the specific node. To minimize time to reach the destination, the number of hoping points should be minimum. Figure 2: RSSI values for different positions. The connecting points are stored in the database with the corresponding angle and distance. Based on the starting point and the target point, the algorithm estimates all possible paths. As shown in Figure 4, five paths were estimated from the starting point (0,5) to the target point (3,1). The algorithm calculates the connecting point path that reaches to the target point. The minimal distance path is considered optimal. The estimated path \"\(a\)\" which is marked in red, \((0,5)\rightarrow(1,0)\rightarrow(3,1)\), is the shortest path among all possible estimated paths. At the time of path following, when the robot faces the obstacles, the algorithm calculates a new optimal path for the same destination. The robot tries to reach the destination, and in the interim period, the system is enabled to start capturing frames from the on-board camera unit. Figure 4: Path planning. Figure 3: System flow graph. The system contains the database of the authorized person images.